Returns the specified group output state.
Gx5641GetGroupOutputState (nHandle, nGroup, pdwStates, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a GX5641 board. |
nGroup |
SHORT |
Group value is as follows:0. GX5641_GROUP0 (channels 0 to 31)1. GX5641_GROUP1 (channels 32 to 63) |
pdwStates |
PDWORD |
Group’s output state.Each of the 32-bits represents a channel in the group. Bit 0 is the first channel in the group and bit 31 is the last channel in the group.Bit low - channel output is disabled.Bit high - channel output is enabled. |
pnStatus
|
PSHORT |
Returned status: 0 on success, negative number on failure. |
For protection, by default all channel’s connections (TTL and Deferential) are disabled after power-up and reset. The channels can be enabled and or disabled by calling Gx5641SetChannelOutputState.
DWORD dwMode;
// Sets all the channels in group 0 to conversion mode.
Gx5641SetGroupMode (nHandle, GX5641_GROUP0, 0, &nStatus);
// sets channels 1, 5, 8 TTL to differential conversion mode, rest of the channels are set to
// convert differential to TTL level.
Gx5641SetGroupConversionMode (nHandle, GX5641_GROUP0, 0x00000121, &nStatus);
// Enables all channels outputs.
Gx5641SetGroupOutputState (nHandle, GX5641_GROUP0, 0xFFFFFFFF, &nStatus);
// Returns all the channels in group 0 conversion mode
Gx5641GetCGroupConversionMode (nHandle, GX5641_GROUP0, &dwMode, &nStatus);
Gx5641SetGroupOutputState, Gx5641SetGroupMode, Gx5641SetGroupConversionMode, GxPioGetErrorString