MXIO_ReadRegs_Ex
This function code is used to read the fix modbus address contents of a contiguous block of the I/O device's holding registers.
C/C++
int MXIO_ReadRegs_Ex( int hConnection,
BYTE bytRegisterType,
WORD wStartRegister,
WORD wCount,
WORD wRegister[ ]);
Visual Basic
Declare Function MXIO_ReadRegs_Ex Lib "MXIO.dll" (ByVal hConnection As Long, ByVal bytRegisterType As Byte, ByVal iStartRegister As Integer, ByVal iCount As Integer, iRegister As Integer) As Long
Arguments:
hConnection |
The handle for an I/O device connection. |
bytRegisterType |
Coil type to be read. The meaning for a value in an entity is as follows: |
wStartRegister |
Specifies the starting register address. The address is beginning at 0. |
wCount |
The number of registers to be read. |
wRegister |
An array that stores the register values |
Return Value:
Succeed |
MXIO_OK |
Fail |
Refer to Return Codes. |