Gx5641SetChannelOutputState

Purpose

Sets the specified channel Output State.

Syntax

Gx5641SetChannelOutputState (nHandle, nChannel, nState, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle to a GX5641 board.
nChannel
SHORT
Channel range is: GX5641_FIRST_CHANNEL (0) to GX5641_LAST_CHANNEL (63).
pnState
PSHORT
Channel output states are as follows:
0. GX5641_CHANNEL_OUTPUT_DISABLE - channel output is disabled.
1. GX5641_CHANNEL_OUTPUT_ENABLE - channel output is enabled.
pnStatus

 

PSHORT
Returned status: 0 on success, negative number on failure.

Comments

For protection, by default all channels are disabled after power-up and reset. The channels can be enabled and or disabled by calling Gx5641SetChannelOutputState.

Example

The following enables channel 0 output state:

 

SHORT nState;

Gx5641SetChannelOutputState (nHandle, 0, GX5641_CHANNEL_OUTPUT_ENABLE, &nStatus);

 

See Also

Gx5641GetChannelOutputState, Gx5641GetChannelMode, Gx5641GetGroupDifferentialPortDirection, Gx5641SetChannelDifferentialPort,  GxPioGetErrorString