Gx6377MatrixGetChannel (nHandle, nGroup, nRow, dwColumn, pnState, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Handle to a GX6377 board. |
nGroup |
SHORT |
If the Switch Matrix is configured as two groups of 2x16 (default configuration) Group numbers are:
If the Switch Matrix is configured as one group of 2x32 the only Group number is:
|
nRow |
SHORT |
Row numbers are:
|
dwColumn |
DWORD |
If the Switch Matrix is configured as two groups of 2x16 (default configuration) Column numbers are 0 to 15.If the Switch Matrix is configured as one group of 2x32 the only Column numbers are 0 to 31. |
pnState |
PSHORT |
Returned state of the relay. 1 for close and 0 for open. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The Switch Matrix can be configured via software as two groups of 2x16 or one group of 2x32. All the Switch Matrix channels will be opened prior to applying the new configuration settings. Applying the same configuration settings will not change the current group’s channels settings.
Use the Gx6377MatrixGetRow function to retrieve the state of all relays in the specified row and group.
The following example checks whether relay at group A, row 0, relay 3 is closed:
Gx6377MatrixGetChannel(nHandle, GX6377_GROUP_A, GX6377_ROW_0, 3, &nState, &nStatus);
if (nClose==1)
printf(“A0-3 relay is closed”);
else
printf(“A0-3 relay is open”);
Gx6377Initialize, GxSWGetErrorString, Gx6377MatrixGetRow, Gx6377MatrixSetRow, Gx6377MatrixClose, Gx6377MatrixOpen