Gx5642GetGroupConversionMode

Purpose

Returns the specified group channels conversion mode.

Syntax

Gx5642GetGroupConversionMode (nHandle, nGroup, pdwMode, 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)
pdwMode
PDWORD
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 - GX5642_CHANNEL_CONVERT_DIFFERENTIAL_TO_TTL – convert differential signal to TTL level.
Bit high - GX5642_CHANNEL_CONVERT_TTL_TO_DIFFERENTIAL – convert TTL level to differential.
pnStatus
 
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

The function returns the conversion mode for all the channels in the specified group.

For protection, by default all channels are disabled after power-up and reset. The channels can be enabled and or disabled by calling Gx5642SetChannelOutputState.

Note: The group should be set to conversion mode prior calling this function by calling Gx5642SetGroupMode.

Example

 

DWORD dwMode;

// Sets all the channels in group 0 to conversion mode.

Gx5642SetGroupMode (nHandle, GX5642_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.

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

// Enables all channels outputs.

Gx5642SetGroupOutputState (nHandle, GX5642_GROUP0, 0xFFFFFFFF, &nStatus);

// Returns all the channels in group 0 conversion mode

Gx5642GetCGroupConversionMode (nHandle, GX5642_GROUP0, &dwMode, &nStatus);

 

See Also

Gx5642SetGroupMode, Gx5642SetGroupConversionMode, Gx5642SetGroupOutputState, GxPioGetErrorString