Gx6021Open

Purpose

Opens specified channel/relay in a group.

Syntax

Gx6021Open (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 P21 and Group D to P22. Apply to Group D (first group) and Group L (last group) only.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

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

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

Example

The following example opens group 2 relay 1:

 

SHORT nStatus;

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

 

See Also

Gx6021Close, Gx6021SetGroupRelays, Gx6021GetGroupRelays, GxSWGetErrorString