Returns the state of all relays of the specified group and row.
Gx6377MatrixGetRow (nHandle, nGroup, nRow, pdwStates, 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:
|
pdwStates |
PDWORD |
Returned state of the relays in the row. Each bit corresponds to a relay in the selected row where a ‘1’ corresponds to a closed relay and ‘0’ to an open relay. The low order bit represents column 0 and the high order bit represents the last column.If the Switch Matrix is configured as two groups of 2x16 (default configuration) the last column is 15. If the Switch Matrix is configured as one group of 2x32 the last column is 31. |
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 Gx6377MatrixGetChannel function to retrieve the state of a specific relay.
The following example checks whether relay at group A, row 0, column 3 and 4 are closed:
DWORD dwStates;
Gx6377MatrixGetRow(nHandle, GX6377_GROUP_A, GX6377_ROW_0, &dwStates, &nStatus);
if (dwStates & 0xC)
printf(“A0-3/4 relays are closed”);
Gx6377MatrixSetRow, Gx6377MatrixGetChannel, Gx6377MatrixClose, Gx6377MatrixOpen, GxSWGetErrorString