Opens a relay or relay driver at the specified board.
Gx6315Open (nHandle, nRelayType, nChannel, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Handle to a GX6315 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-45 for the high current relay, 1-9 for the relay drivers. |
pnStatus |
LPSHORT |
Returned status: 0 on success, negative number on failure. |
The Gx6315GetChannel function can be used to retrieve the current channel state.
The following example opens relay 1 and relay driver 2:
Gx6315Open(nHandle, 0, 1, &nStatus);
Gx6315Open(nHandle, 1, 2, &nStatus);