Gx3756PioGetGroup

Purpose

Returns the specified group’s four digital channels settings.

Syntax

Gx3756PioGetGroup (nHandle, nGroup, pnValue, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX3756 board.
nGroup
SHORT
Select the group to get:
0.      GX3756_PIO_GROUP0: Digital I/O group 0, group’s channels 0-3, board channels 0-3.
1.      GX3756_PIO_GROUP1: Digital I/O group 1, group’s channels 0-3, board channels 4-7.
2.      GX3756_PIO_GROUP2: Digital I/O group 2, group’s channels 0-3, board channels 8-11.
3.      GX3756_PIO_GROUP3: Digital I/O group 3, group’s channels 0-3, board channels 12-15.
4.      GX3756_PIO_GROUP4: Digital I/O group 4, group’s channels 0-3, board channels 16-19.
5.      GX3756_PIO_GROUP5: Digital I/O group 5, group’s channels 0-3, board channels 20-23.
6.      GX3756_PIO_GROUP6: Digital I/O group 6, group’s channels 0-3, board channels 24-27.
7.      GX3756_PIO_GROUP7: Digital I/O group 7, group’s channels 0-3, board channels 28-31.
8.      GX3756_PIO_GROUP8: Digital I/O group 8, group’s channels 0-3, board channels 32-35.
9.      GX3756_PIO_GROUP9: Digital I/O group 9, group’s channels 0-3, board channels 36-39.
10.   GX3756_PIO_GROUP10: Digital I/O group 10, group’s channels 0-3, board channels 40-43.
11.   GX3756_PIO_GROUP11: Digital I/O group 11, group’s channels 0-3, board channels 44-47.
12.   GX3756_PIO_GROUP12: Digital I/O group 12, group’s channels 0-3, board channels 48-51.
13.  GX3756_PIO_GROUP13: Digital I/O group 13, group’s channels 0-3, board channels 52-55.
pnValue
PSHORT
Return the specified group’s four digital channels settings. Only bits 0-3. Each bit represents a digital channel in the group, bit 0 represents channel 0, etc. A logic high (‘1’) means the channels is set to high, logic low (‘0’) means the channel is set to low.  
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

Each bit represents a digital channel in the group, bit 0 represents channl0 etc. There are 56 Digital I/O channels, channel’s direction control is set in groups of 4 channels, e.g. channels 0-3, channels 4-7, etc. Any group of channels can be programmed to be all in or all out. If a group of channels is direction is set to input, the user can use specific channel is set Gx3756PioReadGroup(), Gx3756PioReadChannel(), and Gx3756PioReadAllChannels() APIs to read back the actual logic input levels.

Channels 0-3 (Group 0) can be programmed to operate as serial-out transmitter. See Gx3756SerialOutSetMode() API for more details.

Channels 3-7 (Group 1) can be programmed as an external trigger source to channels 0-3 (Group 0), when they are set to serial-out operation mode. See Gx3756SerialOutSetMode(), and Gx3756SerialOutGetTriggerSource() APIs for more details.

See the Gx3756PioSetGroupDirection() API for complete example.

Example

The following example returns the group 0 four digital channels settings:

 

SHORT nHandle, nStatus;

SHORT nValue;

 

Gx3756PioGetGroup (nHandle, GX3756_PIO_GROUP0, &nValue, &nStatus);

 

See Also

Gx3756PioReadAllChannels, Gx3756PioReadGroup, Gx3756PioReadGroupChannel, Gx3756PioResetGroup, Gx3756PioSetAllChannels, Gx3756PioSetAllGroupsDirection, Gx3756PioSetGroup, Gx3756PioSetGroupChannel, Gx3756PioSetGroupDirection, GxFpgaGetErrorString