D-24, Daqgethardwareinfo, Daqgetlasterror – Measurement Computing WaveBook rev.3.0 User Manual
Page 220: Daqioread

D-24 daqX API - Command Reference,
6-24-99
WaveBook User’s Manual
daqGetHardwareInfo
DLL Function
daqGetHardwareInfo(DaqHandleT handle, DaqHardwareInfo whichInfo, VOID * info);
C
daqGetHardwareInfo(DaqHandleT handle, DaqHardwareInfo whichInfo, VOID * info);
Visual BASIC
VBdaqGetHardwareInfo&(ByVal handle&, ByVal whichInfo&, info As Variant)
Delphi
daqGetHardwareInfo(handle:DaqHandleT; whichInfo:DaqHardwareInfo; info:pointer)
handle
Handle to the device
whichInfo
Specifies what type of device information to retrieve
Parameters
* info
Pointer to the returned device information
Returns
DerrNoError
No error (see the API Error Codes table at the end of this chapter).
See Also
daqGetDriverVersion, daqOpen
Program References
DACEX.PAS, ERREX.PAS (Delphi)
Used With
All devices
Description
daqGetHardwareInfo
allows you to retrieve specific hardware information for the specified device. The device handle must be a valid
device handle that is currently open. To open a device, see the daqOpen function.
daqGetLastError
DLL Function
daqGetLastError(DaqHandleT handle, DaqError *errCode);
C
daqGetLastError(DaqHandleT handle, DaqError *errCode);
Visual BASIC
VBdaqGetLastError&(ByVal handle&, errCode&)
Delphi
daqGetLastError(handle:DaqHandleT; var errCode:DaqError): DaqError; stdcall;
external DAQX_DLL; procedure daqDefaultErrorHandler(handle:DaqHandleT;
errCode:DaqError)
handle
Handle to the device
Parameters
*errCode
Returned last error code
Returns
DerrNoError
No error (see the API Error Codes table at the end of this chapter).
See Also
daqDefaultErrorHandler, daqProcessError, daqSetDefaultErrorHandler
Program References
None
Used With
All devices
Description
daqGetLastError
allows you to retrieve the last error condition registered by the driver.
daqIORead
DLL Function
daqIORead(DaqHandleT handle, DaqIODeviceType devType, DaqIODevicePort devPort, DWORD
whichDevice, DaqIOExpansionPort whichExpPort, PDWORD value);
C
daqIORead(DaqHandleT handle, DaqIODeviceType devType, DaqIODevicePort devPort, DWORD
whichDevice, DaqIOExpansionPort whichExpPort, PDWORD value);
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 to perform the I/O read
devType
I/O Device type
devPort
I/O port selection
whichDevice
I/O device instance to read from
whichExpPort
I/O device expansion port to read from
Parameters
value
I/O value read
Returns
DerrNoError
No error (see the API Error Codes table at the end of this chapter).
See Also
daqIOReadBit, daqIOWrite, daqIOWriteBit
Program References
None
Used With
All devices
Description
daqIORead
allows you to read the specified port on the selected device. The read operation will return the current state of the port in the
value
parameter. Normally, if the selected port is a byte-wide port, the port state will occupy the low-order byte of the value parameter.
Digital I/O channels for the port correspond to each bit within this low-order byte. If the bit is set, it indicates the channel is in a high state.
If the bit is not set, the channel is indicated to be in a low state.