Gx6315Close

Purpose

Closes a relay or relay driver for the board handle passed.

Syntax

Gx6315Close (nHandle, nRelayType, nChannel, pnStatus)

Parameters

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

Returned status: 0 on success, negative number on failure.

Comments

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

 

Warning

Caution -  When closing a relay, verify that all other relays on the same circuit that may cause a short are disconnected (a delay may be required between switching commands). Low Impedance sources such as power supplies may cause irreversible damage to this product when shorted to other signals.

Example

The following example closes relay 1 and relay driver 2:

 

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

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

 

See Also

Gx6315Initialize, Gx6315Open, Gx6315SetGroupChannels, Gx6315GetChannel.