beautypg.com

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

Page 263: Visual basic

background image

Programmer’s Manual

908794

Daq API Command Reference 4.5-33


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++

daqIOReadBit(DaqHandleT handle, DaqIODeviceType devType, DaqIODevicePort
devPort, DWORD whichDevice, DaqIOExpansionPort whichExpPort, DWORD bitNum,
PBOOL bitValue);

Visual BASIC

VBdaqIOReadBit&(ByVal handle&, ByVal devType&, ByVal devPort&, ByVal
whichDevice&, ByVal whichExpPort&, ByVal bitNum&, bitValue&)

Program References

DAQEX.FRM (VB)