Gx5641GetChannelOutputState

Purpose

Returns the specified channel Output State.

Syntax

Gx5641GetChannelOutputState (nHandle, nChannel, pnState, 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 returns channel 0 output state:

 

SHORT nState;

Gx5641GetChannelOutputState (nHandle, 0, &nState, &nStatus);

 

See Also

Gx5641SetChannelOutputState, Gx5641GetChannelMode, Gx5641GetChannelDifferentialPortDirection, Gx5641SetChannelDifferentialPort, GxPioGetErrorString