Connects two channels according to the specified mode.
Gx6021ConnectChannels (nHandle, nChannel1, nChannel2, nMode, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Handle to a GX6021 board. |
nChannel1 |
SHORT |
First channel to connect. Channel numbers are from 1 (GX6021_CHANNEL_FIRST) to 20 (GX6021_CHANNEL_LAST). |
nChannel2 |
SHORT |
Second channel to connect. Channel numbers are from 1 (GX6062_CHANNEL_FIRST) to 20 (GX6062_CHANNEL_LAST) |
nMode |
SHORT |
|
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
Each group has five channels with total of twelve groups. In order to correlate the channel number (nChannel1 and nChannel2) to its group use the following formula:
Group number = (nChannel-1)/5, e.g. channel 8 is channel 3 in group B.
The following connection modes are available:
The following connection modes are available:
0 = GX6021_CONNECT_BREAKALL_BEFORE_MAKE:
o Disconnects all relays in all groups
o Close the desired relays (channels) and connect the path between them.
1 = GX6021_CONNECT_BREAK_BEFORE_MAKE:
o Disconnects all relays in all groups in the path, i.e. relays between adjacent groups and all the relays in those groups.
o Disconnect the relay preceding the first group and the relay following the second group.
o Close the desired relays (channels) and connect the path between them.
o Relays outside the path are not affected.
2 = GX6021_CONNECT_MAKE_BEFORE_BREAK:
o Close the desired relays (channels) and connect the path between them.
o Open all other relays in the path between them.
o Disconnect the relay preceding the first group and the relay following the second group.
o Relays outside the path are not affected.
3 = GX6021_CONNECT_MAKE: Connects the two specified relays together without changing the state of other relays in the path.
The Gx6021GetChannel function can be used to retrieve the current channel state.
|
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 connect channel 3 to channel 15 using GX6021_CONNECT_BREAK_BEFORE_MAKE connection mode:
SHORT nStatus;
Gx6021ConnectChannels (nHandle, 3, 15, GX6062_BREAK_BEFORE_MAKE, &nStatus);
Gx6021DisconnectChannels, Gx6021ConnectGroupToExternalCoax, Gx6021SetGroupRelays,