Returns whether the specified channel is open or closed.
Gx6021GetChannel (nHandle, nChannel, pnState, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Handle to a GX6021 board. |
nChannel |
SHORT |
Channel numbers are from 1 (GX6021_CHANNEL_FIRST) to 20 (GX6021_CHANNEL_LAST). |
pnState |
PSHORT |
Returns channel state are as follow:
|
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
Each group has five channels with total of twelve groups. In order to correlate the channel number (nChannel) to its group use the following formula:
Group number = (nChannel-1)/5, e.g. channel 8 is channel 3 in group B.
The following example returns channel 15 state:
SHORT nState, &nStatus
Gx6021GetChannel (nHandle, 15, &nState, &nStatus);
Gx6021Close, Gx6021Open, Gx6021GetGroupRelays, Gx6021SetGroupRelays, Gx6021ConnectChannels, GxSWGetErrorString