Gx6377RelayOpen

Purpose

Opens the specified relay for the specified relays type.

Syntax

Gx6377RelayOpen (nHandle, nRelayType, nChannel, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX6377 board.
nRelayType
SHORT
Specifies the type of relay:
  • GX6377_RELAY_TYPE_HIGH_CURRENT
  • GX6377_RELAY_TYPE_FORM_A
  • GX6377_RELAY_TYPE_FORM_C
nChannel
SHORT
Specifies the relay number according to the specified the type of relay as follow:
  • GX6377_RELAY_TYPE_HIGH_CURRENT: Channels 1-5
  • GX6377_RELAY_TYPE_FORM_A: Channels 1-4
  • GX6377_RELAY_TYPE_FORM_C: Channels 1-4
pnStatus
LPSHORT
Returned status: 0 on success, negative number on failure.

Comments

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

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 opens channel 2 in the high current relays type:

 

Gx6377RelayOpen (nHandle, GX6377_RELAY_TYPE_HIGH_CURRENT, 2, &nStatus);

 

See Also

Gx6377RelayClose, Gx6377RelayGetChannel, Gx6377RelaySetChannels, GxSWGetErrorString