D-25, Daqioreadbit, Daqiowrite – Measurement Computing WaveBook rev.3.0 User Manual
Page 221
WaveBook User’s Manual,
6-24-99
daqX API - Command Reference D-25
daqIOReadBit
DLL Function
daqIOReadBit(DaqHandleT handle, DaqIODeviceType devType, DaqIODevicePort devPort,
DWORD whichDevice, DaqIOExpansionPort whichExpPort, DWORD bitNum, PBOOL bitValue);
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&)
Delphi
daqIOReadBit(handle:DaqHandleT; devType:DaqIODeviceType; dvPort:DaqIODevicePort;
whichDevice:DWORD; whichExpPort:DaqIOExpansionPort; bitNum:DWORD; var
bitValue:longbool)
handle
Handle to the device from which to perform the I/O
devType
I/O Device type
devPort
I/O device port selection
whichDevice
I/O device selection
whichExpPort
I/O expansion port address
bitNum
I/O port bit location to read
Parameters
bitValue
I/O port bit value (TRUE - high, FALSE - low)
Returns
DerrNoError
No error (see the API Error Codes table at the end of this chapter).
See Also
daqIORead, daqIOWrite, daqIOWriteBit
Program References
None
Used With
All devices
Description
daqIOReadBit
allows you to read a specified bit on the selected device and port. The read operation will return the current state of the
selected bit in the bitValue parameter. The selected bit (specified by the bitNum parameter) corresponds to the I/O channel on the port
which is to be read. The bitValue will be TRUE indicating a high state or FALSE indicating a low state.
daqIOWrite
DLL Function
daqIOWrite(DaqHandleT handle, DaqIODeviceType devType, DaqIODevicePort devPort,
DWORD whichDevice, DaqIOExpansionPort whichExpPort, DWORD value);
C
daqIOWrite(DaqHandleT handle, DaqIODeviceType devType, DaqIODevicePort devPort,
DWORD whichDevice, DaqIOExpansionPort whichExpPort, DWORD value);
Visual BASIC
VBdaqIOWriteBit&(ByVal handle&, ByVal devType&, ByVal devPort&, ByVal whichDevice&,
ByVal whichExpPort&, ByVal bitNum&, ByVal bitValue&)
Delphi
daqIOWriteBit(handle:DaqHandleT; devType:DaqIODeviceType; dvPort:DaqIODevicePort;
whichDevice:DWORD; whichExpPort:DaqIOExpansionPort; bitNum:DWORD;
bitValue:longbool)
handle
Handle of the device to perform an I/O write operation
devType
I/O device type
devPort
I/O device port selection
whichDevice
I/O device selection
whichExpPort
I/O device expansion port address
Parameters
value
Value to write
Returns
DerrNoError
No error (see the API Error Codes table at the end of this chapter).
See Also
daqIORead, daqIOWriteBit, daqIOReadBit
Program References
None
Used With
All devices
Description
daqIOWrite
allows you to write to the specified port on the selected device. The write operation will write the settings indicated in the
value
parameter to the selected port. The value written will depend on the width of the selected port. Normally, for byte-wide ports, only
the low-order byte of the value parameter will be written. The I/O channels for the port correspond to each bit within the value written. If
the channel is to be driven to a high state, then the corresponding bit should be set. Likewise, if the channel is to be driven to a low state,
then the corresponding bit should not be set.