Sets all Group channels relays to specified state.
Gx6264SetGroupChannels (nHandle , nGroup, ucStates, pnStatus)
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_A1 GX6264_GROUP_B2 GX6264_GROUP_C3 GX6264_GROUP_D4 GX6264_GROUP_E5 GX6264_GROUP_F6 GX6264_GROUP_G7 GX6264_GROUP_H |
ucStates |
BYTE |
Each bit represents a relay state:0 = Open1 = Closed. See Comments. |
pnStatus |
LPSHORT |
Returned status: 0 on success, negative number on failure. |
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. |
The following example sets relays 1 and 3 of group A to a closed state:
Gx6264SetGroupChannels (nHandle, GX6264_GROUP_A, 0x5, &nStatus);
Gx6264Initialize, Gx6264GetGroupChannels, Gx6264SetGroupMode, Gx6264GetGroupMode, GxSWGetErrorString