Return the state of the relay in the specified group’s row and column.
Gx6384GetChannel (nHandle, nGroup, nRow, pnState, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Handle to a GX6384 board. |
nGroup |
SHORT |
If the Switch Matrix is configured as two groups with 32 columns (default configuration) Group numbers are:0. GX6384_GROUP_A1. GX6384_GROUP_BIf the Switch Matrix is configured as one group with 64 columns the only Group is:0. GX6384_GROUP_A |
nRow |
SHORT |
Row numbers are:0. GX6384_ROW_0: row number 0 (all models).1. GX6384_ROW_1: row number 1 (all models).2. GX6384_ROW_2: row number 2 (models Gx6384-2 and Gx6384-3 only).3. GX6384_ROW_3: row number 3 (models Gx6384-2 and Gx6384-3 only).4. GX6384_ROW_4: row number 4 (Gx6384-3 only).5. GX6384_ROW_5: row number 5 (Gx6384-3 only). |
nColumn |
SHORT |
Specified column relay number is as follows:0-31: Switch Matrix is configured as two groups with 32 columns (default configuration).0-63: Switch Matrix is configured as single group with 64 columns. |
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 with 32 columns or one group with 64 columns. 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 Gx6384GetRow 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:
SGx6384GetChannel(nHandle, GX6384_GROUP_A, GX6384_ROW_0, 3, &nState, &nStatus);
if (nClose==1)
printf(“A0-3 relay is closed”);
else
printf(“A0-3 relay is open”);
Gx6384SetGroupRow32Columns, Gx6384SetGroupRow64Columns, Gx6384GetChannel, Gx6384Close, Gx6384Open, Gx6384SetGroupsConfiguration, GxSWGetErrorString