Functions Reference
41
Gx6377RelayGetChannel
Purpose
Returns the state of the specified channel for the specified relays type.
Syntax
Gx6377RelayGetChannel
(
nHandle, nRelayType, nChannel, pnState, pnStatus
)
Parameters
Name
Type
Comments
nHandle
SHORT
Handle to a GX6377 board.
nRelayType
SHORT
Specifies the type of relay:
0 = GX6377_RELAY_TYPE_HIGH_CURRENT
1 = GX6377_RELAY_TYPE_FORM_A
2 = GX6377_RELAY_TYPE_FORM_C
nChannel
SHORT
Specifies the relay number according to the specified the type of relay as follow:
GX6377_RELAY_TYPE_HIGH_CURRENT: Channels 1-5
GX6377_RELAY_TYPE_FORM_A: Channels 1-4
GX6377_RELAY_TYPE_FORM_C: Channels 1-4
pnState
LPSHORT
Returned relay state. Closed = 1, Open = 0.
pnStatus
LPSHORT
Returned status: 0 on success, negative number on failure.
Comments
Use the
Gx6377RelayGetGroupChannels
to retrieve the status of all channels of the specified relays type.
Example
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);
See Also
Gx6377RelayOpen, Gx6377RelayClose, Gx6377RelaySetChannels, 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 ...