MXIO_WriteCoils

 

This function code is used to write the contiguous status of an I/O device's coils.

 

C/C++

int MXIO_WriteCoils( int hConnection,

WORD wStartCoil,

WORD wCount,

BYTE bytCoils[ ]);

 

Visual Basic

Declare Function MXIO_WriteCoils Lib "MXIO.dll" (ByVal hConnection As Long, ByVal iStartCoil As Integer, ByVal iCount As Integer, bytCoils As Byte) As Long

 

Arguments:

hConnection

Handle for the I/O device connection.

wStartCoil

Specifies the starting coil to be written. The address is beginning at 0.

wCount

The number of coils to be written.

bytCoils

An array that stores the coil value, each byte holds eight coil values.

 

Return Value:

Succeed

MXIO_OK

Fail

Refer to Return Codes.