Gx5642GetChannelOutputState

Purpose

Returns the specified channel Output State.

Syntax

Gx5642GetChannelOutputState (nHandle, nChannel, pnState, pnStatus)

Parameters

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.

Comments

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

Example

The following returns channel 0 output state:

 

SHORT nState;

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

 

See Also

Gx5642SetChannelOutputState, Gx5642GetChannelMode, Gx5642GetChannelDifferentialPortDirection, Gx5642SetChannelDifferentialPort, GxPioGetErrorString