Prototypes, Program references, Example of calculating “whichdevice – Measurement Computing Data Acquisition Systems rev.10.4 User Manual
Page 267: Visual basic

Programmer’s Manual
908794
Daq API Command Reference 4.5-37
Example of Calculating “whichDevice”
for three DBK20 P2 Exp 8255-1 Port C banks
.
For the first positioned card n= 0.
Thus for the first card’s P2 Exp 8255-1 Port C ….
whichDevice: (Note 1)
(nx8) + Diodp8255B + 4 =
n = 0
Result:
Diodp8255B + 4
For the second positioned card n= 1.
Thus for the second card’s P2 Exp 8255-1 Port C ….
(nx8) + Diodp8255B + 4 =
n = 1
Diodp8255B + 12
For the third positioned card n= 2.
Thus for the third card’s P2 Exp 8255-1 Port C ….
(nx8) + Diodp8255B + 4 =
n = 2
Diodp8255B + 20
Note 1: The equation is from the whichDevice column and “P2 Exp 8255-1” row (shaded), in the preceding table.
Prototypes
C/C++
daqIOWrite(DaqHandleT handle, DaqIODeviceType devType, DaqIODevicePort
devPort, DWORD whichDevice, DaqIOExpansionPort whichExpPort, DWORD value);
Visual BASIC
VBdaqIOWrite&(ByVal handle&, ByVal devType&, ByVal devPort&, ByVal
whichDevice&, ByVal whichExpPort&, ByVal value&)
Program References
DAQDIGIOEX01.CPP, DBK20_21EX.CPP, DBK23_24EX.CPP, DAQEX.FRM (VB)