Gx6021Close

Purpose

Closes specified relay in a group.

Syntax

Gx6021Close (nHandle, nGroup, nRelay, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX6021 board.
nGroup
SHORT
Specified group number, group number can be 0 (GX6021_GROUP_FIRST) to 3 (GX6021_GROUP_LAST).
nRelay
SHORT
Specifies the Relay numbers in the group as follow:
  • 0-4: Relays 0 through 4 in the group.
  • 5: Relay connecting two adjacent groups. Groups A to D only.
  • 6: Relay connecting the specified group to the External Coax connector. Group A to P22 and Group D to P21. Apply to Group A (first group) and Group D (last group) only.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

The Gx6021ConnectGroupToExternalCoax function call can be also used to connect the specified group from the External Coax connector.

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

Warning

Caution:

1. Make sure that the switching will not cause a closed loop, which may cause distortions in high frequency signals.

2. 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 group 2 relay 1:

 

SHORT nStatus;

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

 

See Also

Gx6021Open, Gx6021GetChannel, Gx6021SetGroupRelays, Gx6021GetGroupRelays, Gx6021ConnectGroupToExternalCoax, GxSWGetErrorString