Return the state of the relay in the specified group, row and column.
Gx6616GetChannel (nHandle, nGroup, nRow, nCoulmn, pnState, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Handle to a GX6616 board. |
nGroup |
SHORT |
Group number 0-5 corresponds to groups A-F. |
nRow |
SHORT |
Row number 0 or 1. |
nColumn |
SHORT |
Column number 0 - 15. |
pnState |
LPLONG |
Returned state of the relay. 1 for close and 0 for open. |
pnStatus |
LPSHORT |
Returned status: 0 on success, negative number on failure. |
Use the Gx6616GetRow function to retrieve the state of all relays in the specified row and group.
The following example checks whether relay at group C, row 0, relay 3 is closed:
Gx6616GetChannel(nHandle, 2, 0, 3, &nState, &nStatus);
if (nClose==1)
printf("C0-3 relay is closed");
else
printf("C0-3 relay is open");
Gx6616Initialize, Gx6616GetErrorString, Gx6616GetRow, Gx6616SetRow, Gx6616Close, Gx6616Open