Gx6062DisconnectChannels

Purpose

Disconnects two channels according to the specified mode.

Syntax

Gx6062DisconnectChannels (nHandle, nChannel1, nChannel2, nMode, bShortestPath, 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
Disconnect mode between the two specified channels can be as follow (see comments for details):
  • 0 = GX6062_DISCONNECT_BREAKALL
  • 1 = GX6062_DISCONNECT_BREAK
bShortestPath
BOOL
Specified if connection should try to use the Shortest Path available. The shortest path can accomplish using the path between the First (A) and Last (L) groups. Only if there are no Daisy Chain connections and the default factory cable connecting First (A) and Last (L) groups is installed.
0: FALSE: Do not try to use the shortest path.
1: TRUE: Try to use the shortest path.
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 modes are available:

a. Open all the relays in the path, i.e. all relays between adjacent groups relays in those groups, as well as the connections to the preceding first group and the succeeding second group.

b. Relays outside the path are not affected.

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

 

Example

The following example disconnect channel 3 to channel 15 using GX6062_DISCONNECT_BREAK_ALL connection mode:

 

SHORT nStatus;

Gx6062DisconnectChannels (nHandle, 3, 15, GX6062_DISCONNECT_BREAK_ALL, &nStatus);

 

See Also

Gx6062ConnectGroupToExternalCoax, Gx6062DisconnectGroupToExternalCoax, Gx6062SetGroupRelays, Gx6062GetChannel, GxSWGetErrorString