Sets the specified channel Output State.
Gx5642SetChannelOutputState (nHandle, nChannel, nState, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a GX5642 board. |
nChannel |
SHORT |
Channel range is: GX5642_FIRST_CHANNEL (0) to GX5642_LAST_CHANNEL (63). |
pnState |
PSHORT |
Channel output states are as follows:0. GX5642_CHANNEL_OUTPUT_DISABLE - channel output is disabled.1. GX5642_CHANNEL_OUTPUT_ENABLE - channel output is enabled. |
pnStatus
|
PSHORT |
Returned status: 0 on success, negative number on failure. |
For protection, by default all channels are disabled after power-up and reset. The channels can be enabled and or disabled by calling Gx5642SetChannelOutputState.
The following enables channel 0 output state:
SHORT nState;
Gx5642SetChannelOutputState (nHandle, 0, GX5642_CHANNEL_OUTPUT_ENABLE, &nStatus);
Gx5642GetChannelOutputState, Gx5642GetChannelMode, Gx5642GetGroupDifferentialPortDirection, Gx5642SetChannelDifferentialPort, GxPioGetErrorString