Manual Number: 00650-010-6
Page 13
Chapter 6: Software
The AOBx/16 cards are straightforward to program. The following example is in BASIC, but for
languages such as C or Pascal the procedure is simplified by their support of two-byte output
operations:
To output an analog value with 16-bit resolution, a corresponding decimal number N between
0 and 65536 is calculated (2^16 = 65536).
N/65536 = V(out)/V(full scale)
Then the number is split between high and low bytes, as follows:
H% = INT (N / 256)
L% = N - (H% * 256)
Next the data are written to the selected analog output channel. (See the preceding I/O Address
Map.) In this example, we will assume analog output on channel zero (AO 0).
OUT (BASE + 0), L%
OUT (BASE + 1), H%
For simplicity, it was assumed that the simultaneous-update capability was not used.
Examples of this routine are found on the sample disk along with examples in other languages.
VisualBASIC™ Utility Driver
Extensions to the Standard Edition VisualBASIC language are provided on the diskette provided
with your card. The extensions are in a directory named VBACCES. These extensions are in the
form of a .DLL, a .GBL, and a VisualBASIC sample. Together these files allow you to access the
port and main memory space in a fashion similar to BASIC, QuickBASIC, Pascal, C/C
++
, Assem-
bly, and most other standard languages.
Содержание AOB8/16
Страница 1: ...Model AOB8 16 AOB16 16 Product Manual MANUAL NUMBER 00650 010 6C...
Страница 3: ...Page iv This page intentionally left blank...
Страница 7: ...Page viii This page intentionally left blank...
Страница 15: ...Manual Number 00650 010 6 Page 6 AOB8 16 AOB16 16 Manual Figure 3 1 Option Selection Map...
Страница 21: ...Manual Number 00650 010 6 Page 12 AOB8 16 AOB16 16 Manual This page intentionally left blank...
Страница 25: ...Manual Number 00650 010 6 Page 16 AOB8 16 AOB16 16 Manual This page intentionally left blank...
Страница 27: ...Manual Number 00650 010 6 Page 18 AOB8 16 AOB16 16 Manual This page intentionally left blank...
Страница 31: ...Manual Number 00650 010 6 Page 22 AOB8 16 AOB16 16 Manual This page intentionally left blank...
Страница 37: ...Manual Number 00650 010 6 Page 28 AOB8 16 AOB16 16 Manual This page intentionally left blank...