E42_AO_SetSafeActions

 

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

 

C/C++

int E42_AO_SetSafeActions( int hConnection,

BYTE bytSlot,

BYTE bytStartChannel,

BYTE bytCount,

WORD wAction[ ]);

 

Visual Basic

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

wAction

An array that stores the contiguous A/O channel's safe action to be set. The wAction[0] represents the value of the starting channel. The values are:

0: Safe value

1: Hold last state

2: Low Limit

3: High Limit

 

Return Value:

Succeed

MXIO_OK

Fail

Refer to Return Codes.