Returns the status of the specified group.
Gx6264GetGroup (nHandle, nGroup, pnGroupStatus, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to the board. |
nGroup |
SHORT |
Group number 0-7. Corresponds to groups A-H as follow:0 GX6264_GROUP_A1 GX6264_GROUP_B2 GX6264_GROUP_C3 GX6264_GROUP_D4 GX6264_GROUP_E5 GX6264_GROUP_F6 GX6264_GROUP_G7 GX6264_GROUP_H |
pnGroupStatus |
LPSHORT |
Returned group status. See Comments. |
pnStatus |
LPSHORT |
Returned status: 0 on success, negative number on failure. |
The pnGroupStatus is:
Bits 0-2: Specifies the channel number 0-7. Applicable only if bit 3 is '1'.
Bit 3: '1' for channel is connected , '0' - all channels are open.
Bits 5-4: Not in use.
Bits 7-6: Groups A through D
Bits 7-6 |
Description |
00 |
Not Connected
|
01 |
Connected to X0 bus |
10 |
Connected to Y0 bus |
11 |
Connected to Both |
Bits 7-6: Groups E through H
Bits 7-6 |
Description |
00 |
Not Connected
|
01 |
Connected to X1 bus |
10 |
Connected to Y1 bus |
11 |
Connected to Both |
The following example prints the status of scan group A:
SHORT nGroupStatus, nChannel, nChannelConnect,
nBusConnect;
...
Gx6264GetGroup(nHandle, 0, &nGroupStatus, &nStatus);
nChannel=(nGroupStatus & 0x07);
nChannelConnect=(nGroupStatus >> 3) & 1;
nBusConnect=(nGroupStatus >> 6) & 3;
if (nChannelConnect==0)
printf ("All channels are open");
else
printf ("Channel # %d is connected", nChannel);
if (nBusConnect==0)
printf("Not connected to bus X0 or Y0");
else if (nBusConnect==1)
printf("Connected to bus X0");
else if (nBusConnect==2)
printf("Connected to bus Y0");
else // 3
printf("Connected to bus X0 and Y0");
GxSWGetErrorString, Gx6264ConnectChannel, Gx6264Initialize, Gx6264ResetGroup.