Gx6264SetGroupChannels

Purpose

Sets all Group channels relays to specified state.

Syntax

Gx6264SetGroupChannels (nHandle , nGroup, ucStates, 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
ucStates
BYTE
Each bit represents a relay state:
0 = Open
1 = Closed. See Comments.
pnStatus
LPSHORT
Returned status: 0 on success, negative number on failure.

Comments

The Group operation mode needs to be set to Matrix mode before using this function. See Gx6264GetGroupMode for details.

The ucStates parameter sets the state of all channels of the specified group. 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 sets relays 1 and 3 of group A to a closed state:

 

Gx6264SetGroupChannels (nHandle, GX6264_GROUP_A, 0x5, &nStatus);

 

See Also

Gx6264Initialize, Gx6264GetGroupChannels, Gx6264SetGroupMode, Gx6264GetGroupMode, GxSWGetErrorString