Opens a relay or relay driver at the specified board.
Gx6115Open (nHandle, nRelayType, nChannel, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Handle to a GX6115 board. |
nRelayType |
SHORT |
Specifies the type of relay 0-1:0 for the high current relay,1 for the driver relay. |
nChannel |
SHORT |
Specifies the relay number. Can be 1-15 for the high current relay, 1-3 for the driver relays. |
pnStatus |
LPSHORT |
Returned status: 0 on success, negative number on failure. |
The Gx6115GetChannel function can be used to retrieve the current channel state.
The following example opens relay 1 and relay driver 2:
Gx6115Open(nHandle, 0, 1, &nStatus);
Gx6115Open(nHandle, 1, 2, &nStatus);
Gx6115Initialize, GxSWGetErrorString, Gx6115Reset, Gx6115Close, Gx6115GetChannels