Gx6315Open

Purpose

Opens a relay or relay driver at the specified board.

Syntax

Gx6315Open (nHandle, nRelayType, nChannel, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX6315 board.
 
nRelayType
SHORT
Specifies the type of relay 0-1:
0 for the high current relay,
1 for the driver relay.
nChannel
SHORT
Specifies the relay number. Can be 1-45 for the high current relay, 1-9 for the relay drivers.
pnStatus
LPSHORT
Returned status: 0 on success, negative number on failure.

 

  Comments

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

Example

The following example opens relay 1 and relay driver 2:

 

Gx6315Open(nHandle, 0, 1, &nStatus);

Gx6315Open(nHandle, 1, 2, &nStatus);

 

See Also

Gx6315Initialize, GxSWGetErrorString,Gx6315Reset,Gx6315Close,Gx6315GetGroupChannels.