DioSetupChannelsOutputStates

Applies To

GX5280, GX5290, GX5290e, GX5295, File

Purpose

Sets the state of each output channel to be enabled or disabled.

Syntax

DioSetupChannelsOutputStates (nHandle, dwStates, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Board or File Board handle.
dwStates
DWORD
Each of the 32 bits represents channel’s output state.
  • Bit low channel’s output disabled
  • Bit high channel’s output enabled.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

The function enabled or disabled each channel output. Disabled channels in output mode are in Tri-State. This is useful for connecting to a user bus.

Example

The following example sets enable channels 0, 5, and 10 outputs and disable all other:

 

SHORT   nStatus;

DioSetupChannelsOutputStates (nMasterHandle, 0x421, &nStatus);

 

See Also

DioGetChannelsOutputStates, DioGetErrorString