Gx5641SetGroupOutputState

Purpose

Sets the specified group output state.

Syntax

Gx5642SetGroupOutputState (nHandle, nGroup, dwStates, pnStatus)

Parameters

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)
dwStates
DWORD
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.

Comments

For protection, by default all channel’s connections (TTL and Deferential) are disabled after power-up and reset.

Example

 

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);

 

See Also

Gx5641GetGroupOutputState, Gx5641SetGroupMode, Gx5641SetGroupConversionMode, GxPioGetErrorString