E42_DO_SetSafeActions

 

This function code is used to set the safe action of contiguous D/O channels.

 

C/C++

int E42_DO_SetSafeActions( int hConnection,

BYTE bytSlot,

BYTE bytStartChannel,

BYTE bytCount,

DWORD dwAction[ ]);

 

Visual Basic

Declare Function E42_DO_SetSafeActions Lib "MXIO.dll" (ByVal hConnection As Long, ByVal bytSlot As Byte, ByVal bytStartChannel As Byte, ByVal bytCount As Byte, nAction As Long) 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 16.

bytStartChannel

Specifies the starting channel.

bytCount

The number of channels to be set.

dwAction

A pointer that stores the contiguous D/O channel's afe action values; each bit holds one channel value. A bit value of 0 represents the digital input status of the start channel. A bit value of 1 represents the second digital input channel's status. The values of the unused bits are random.

0: Fault Value

1: Hold last value

 

Return Value:

Succeed

MXIO_OK

Fail

Refer to Return Codes.