Gx6377RelayGetChannel (nHandle, nRelayType, nChannel, pnState, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Handle to a GX6377 board. |
nRelayType |
SHORT |
Specifies the type of relay:
|
nChannel |
SHORT |
Specifies the relay number according to the specified the type of relay as follow:
|
pnState |
LPSHORT |
Returned relay state. Closed = 1, Open = 0. |
pnStatus |
LPSHORT |
Returned status: 0 on success, negative number on failure. |
Use the Gx6377RelayGetGroupChannels to retrieve the status of all channels of the specified relays type.
The following example returns the state of channel 2 for the high current relays type:
SHORT nState;
Gx6377RelayGetChannel (nHandle, GX6377_RELAY_TYPE_HIGH_CURRENT, 2, &nState, &nStatus);
Gx6377RelayOpen, Gx6377RelayClose, Gx6377RelaySetChannels, GxSWGetErrorString