Gx5642SetGroupMode

Purpose

Sets the specified group mode.

Syntax

Gx5642SetGroupMode (nHandle, nGroup, dwMode, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle to a GX5642 board.
nGroup
SHORT
Group value is as follows:
0. GX5642_GROUP0 (channels 0 to 31)
1. GX5642_GROUP1(channels 32 to 63)
dwMode
DWORD
Group’s Mode.
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 set for conversion mode.
Bit high - channel set for static I/O mode.
pnStatus

 

PSHORT
Returned status: 0 on success, negative number on failure.

Comments

The function sets the operating mode for all the channels in the specified group.

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 Gx5642SetGroupOutputState.

Example

The following example sets the channels 1, 5, and 8 to static I/O mode:

 

Gx5642SetGroupMode (nHandle, GX5642_GROUP0, 0x00000121, &nStatus);

 

See Also

Gx5642GetGroupMode, Gx5642SetGroupConversionMode, Gx5642SetGroupOutputState, GxPioGetErrorString