Functions Reference
35
Gx6377MatrixGetRow
Purpose
Returns the state of all relays of the specified group and row.
Syntax
Gx6377MatrixGetRow
(
nHandle, nGroup, nRow, pdwStates, pnStatus
)
Parameters
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:
0 = GX6377_GROUP_A
1 = GX6377_GROUP_B
If the Switch Matrix is configured as one group of 2x32 the only Group number is:
0 = GX6377_GROUP_A
nRow
SHORT
Row numbers are:
0 = GX6377_ROW_0
1 = GX6377_ROW_1
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.
Comments
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.
Example
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”);
See Also
Gx6377MatrixSetRow, Gx6377MatrixGetChannel, Gx6377MatrixClose, Gx6377MatrixOpen,
GxSWGetErrorString
Содержание GX6377
Страница 2: ......
Страница 8: ...vi GX6377 User s Guide ...
Страница 22: ...14 GX6377 User s Guide ...
Страница 34: ...26 GX6377 User s Guide ...
Страница 56: ...48 GX6377 User s Guide ...