Gx6021GetGroupRelays

Purpose

Returns the state of all relays in the specified group.

Syntax

Gx6021GetGroupRelays (nHandle, nGroup, pucRelaysState, 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).
pucRelaysState
PBYTE
Group relay state, each bit represents state of a relay:
  • 0: Open
  • 1: Closed
See comments for details on each bit.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

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 L to P22.

Note: Apply to Group A (first group) and Group D (last group) only

 

Example

The following example returns group B relays state:

 

SHORT nStatus;

BYTE ucRelaysState;

Gx6021GetGroupRelays (nHandle, 1, &ucRelaysState, &nStatus);

 

See Also

Gx6021SetGroupRelays, Gx6021Open, Gx6021Close, Gx6021GetChannel, GxSWGetErrorString