Gx6138Open

Purpose

Opens the specified relay.

Syntax

Gx6138Open (nHandle, nChannel, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX6138 board.

nChannel

SHORT
Specifies the relay number. Can be 1 to 38.
pnStatus
LPSHORT
Returned status: 0 on success, negative number on failure.

 

Comments

The Gx6138GetChannel function can be used to retrieve the current channel state.

Example

The following example opens relay 1 and relay 22:

 

Gx6138Open (nHandle, 1, &nStatus);

Gx6138Open (nHandle, 22, &nStatus);

 

See Also

Gx6138Initialize, GxSWGetErrorString, Gx6138Reset, Gx6138Close, Gx6138SetChannels, Gx6138GetChannel