Opens or closes all channels in the specified group.
Gx6021SetGroupRelays (nHandle, nGroup, ucRelaysState, pnStatus)
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). |
ucRelaysState |
BYTE |
Group relay state, each bit represents state of a relay:
See comments for details on each bit. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The ucGroupState parameter sets the state of all channels of the specified group. The following table describes the ucGroupState bit description:
Bit # |
Description |
0-4 |
Relays 0-4 in the group. A high (‘1’) represent closed relay, a low (‘0’) represent open relay. |
5 |
Relay connecting the specified group to the adjacent group. A high (‘1’) represent closed relay, a low (‘0’) represent open relay.Note: Not applicable to the last group (Group L). |
6 |
Relay connecting the specified group to the External Coax connector. Group A to P21 and Group D to P22.Note: Apply to Group A (first group) and Group D (last group) only |
|
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. |
The following example sets group B relays as follow: relays 1 and 2 closed, relays 3,4, and 5 open and connect the group to the next group.
SHORT nStatus;
Gx6021SetGroupRelays (nHandle, 1, 0x26, &nStatus);
Gx6021Open, Gx6021Close, Gx6021GetChannel, GxSWGetErrorString