AO4K_SetSafeAction

 

This function code is used to set the safe actioin for a specific channel.

 

C/C++

int AO4K_SetSafeAction( int hConnection,

BYTE bytSlot,

BYTE bytChannel,

WORD wAction);

 

Visual Basic

Declare Function AO4K_SetSafeAction Lib "MXIO.dll" (ByVal hConnection As Long, ByVal bytSlot As Byte, ByVal bytChannel As Byte, ByVal 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 32.

bytChannel

The specific channel to be set.

wAction

Stores the specific A/O channel's safe action to be get. 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.