AI_Read
This function code is used to read the analog input value for a specific channel.
C/C++
int AI_Read( int hConnection,
BYTE bytSlot,
BYTE bytChannel,
double * dValue);
Visual Basic
Declare Function AI_Read Lib "MXIO.dll" (ByVal hConnection As Long, ByVal bytSlot As Byte, ByVal bytChannel As Byte, dValue As Double) As Long
Arguments:
hConnection |
The handle for an I/O device connection. |
bytSlot |
Slot number of the I/O module. The Slot number ranges from 1 to 32. But this parameter is inactive in ioLogik 2000. |
bytChannel |
The specific channel to be read. |
dValue |
A pointer that stores the specific channel's analog input value to be read. The unit is Vdc for the voltage module, and mA for the current module. |
Return Value:
Succeed |
MXIO_OK |
Fail |
Refer to Return Codes. |