Gx6264GetGroupChannels

Purpose

Returns all Group channels relays state.

Syntax

Gx6264GetGroupChannels (nHandle, nGroup, pucStates, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle to the board.
nGroup
SHORT
Group number 0-7. Corresponds to groups A-H as follow:
0 GX6264_GROUP_A
1 GX6264_GROUP_B
2 GX6264_GROUP_C
3 GX6264_GROUP_D
4 GX6264_GROUP_E
5 GX6264_GROUP_F
6 GX6264_GROUP_G
7 GX6264_GROUP_H
pucStates
PBYTE
Each bit represents a relay state:
0 = Open
1 = Closed. See Comments.
pnStatus
LPSHORT
Returned status: 0 on success, negative number on failure.

Comments

Each bit correlate to channel number, e.g. state of channel zero is bit zero and state of channel seven is bit seven. Value of 0 indicates that the channel is open while a value of 1 indicates that the channel is closed.

Caution - 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 returns group A channels states:

 

BYTE ucStates;

Gx6264GetGroupChannels (nHandle, 0, &ucStates, &nStatus);

 

See Also

Gx6264Initialize, Gx6264SetGroupChannels, Gx6264SetGroupMode, Gx6264GetGroupMode, GxSWGetErrorString