Gx5641SetChannelMode

Purpose

Sets the specified channel operating mode.

Syntax

Gx5641SetChannelMode (nHandle, nChannel, nMode, 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).
nMode
SHORT
Channel operating modes are as follows:
0. GX5641_CHANNEL_MODE_CONVERSION – channels is set for conversion mode.
1. GX5641_CHANNEL_MODE_STATIC_IO - – channels is set for static I/O mode.
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 example sets channel 0 operating mode to static I/O:

 

Gx5641GetChannelMode (nHandle, 0, GX5641_CHANNEL_MODE_STATIC_IO, &nStatus);

 

See Also

Gx5641GetChannelMode, Gx5641GetChannelDifferentialPortDirection, Gx5641SetChannelDifferentialPort, GxPioGetErrorString