Gx6062ConnectChannels

Purpose

Connects two channels according to the specified mode.

Syntax

Gx6062ConnectChannels (nHandle, nChannel1, nChannel2, nMode, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX6062 board.

nChannel1

SHORT
First channel to connect. Channel numbers are from 1 (GX6062_CHANNEL_FIRST) to 60 (GX6062_CHANNEL_LAST).

nChannel2

SHORT
Second channel to connect. Channel numbers are from 1 (GX6062_CHANNEL_FIRST) to 60 (GX6062_CHANNEL_LAST)
nMode
SHORT
  • 0 = Connection mode between the two specified channels can be as follow (see comments for details):
  • 1 =  GX6062_CONNECT_BREAKALL_BEFORE_MAKE GX6062_CONNECT_BREAK_BEFORE_MAKE
  • 2 = GX6062_CONNECT_MAKE_BEFORE_BREAK
  • 3 = GX6062_CONNECT_MAKE
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

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:

o Disconnects all relays in all groups

o Close the desired relays (channels) and connect the path between them.

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.

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.

The Gx6062GetChannel 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 connect channel 3 to channel 15 using GX6062_CONNECT_BREAK_BEFORE_MAKE connection mode:

 

SHORT nStatus;

Gx6062ConnectChannels (nHandle, 3, 15, GX6062_BREAK_BEFORE_MAKE, &nStatus);

 

See Also

Gx6062DisconnectChannels, Gx6062ConnectGroupToExternalCoax, Gx6062SetGroupRelays, Gx6062GetChannel, GxSWGetErrorString