DioGetChannelsOutputStates

Applies To

GX5280, GX5290, GX5290e, GX5295, File.

Purpose

Returns the state of each output channel.

Syntax

DioGetChannelsOutputStates (nHandle, pdwStates, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Board or File Board handle.
pdwStates
PDWORD
Each of the 32-bit represents channel’s outputs state. Bit low channel’s outputs disabled, bit high channel’s outputs 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 returns the state of each output channel:

 

SHORT nStatus;

DioGetChannelsOutputStates (nMasterHandle, &dwStates, &nStatus);

 

See Also

DioSetupChannelsOutputStates, DioGetErrorString