GX3501, GX3509, GX3510, GX3540
Returns the specified PIO expansion board group’s channel values.
GxFpgaPioGetGroup (nHandle, nGroup, pdwData, pnStatus)
Name |
Type |
Comments |
pnHandle |
SHORT |
Handle to a GX3500 board. |
nGroup |
SHORT |
Group value is as follows:0. GXFPGA_PIO_GROUP_A.1. GXFPGA_PIO_GROUP_B.2. GXFPGA_PIO_GROUP_C.3. GXFPGA_PIO_GROUP_D. |
pdwData |
PDWORD |
Group’s logic level values.Each of the low 20 bits represents a channel in the group. Bit 0 is the first channel in the group and bit 19 is the last channel in the group. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
This function will return the logic level of all the channels in the specified group. When using the GX3540, this function is limited to reading back values from GXFPGA_PIO_GROUP_A and GXFPGA_PIO_GROUP_D. Attempting to read back values from GXFPGA_PIO_GROUP_B or GXFPGA_PIO_GROUP_C will result in an error.
The following example gets the values of Flex I/O group A’s channel and stores them into dwData:
DWORD dwData;
GxFpgaPioGetGroup (nHandle, GXFPGA_PIO_GROUP_A, &dwData, &nStatus);
GxFpgaPioSetGroup, GxFpgaPioSetGroupDirection, GxFpgaGetErrorString