DioSetupIOPinsStaticDirection

Applies To

GX5055, GX5295

Purpose

Sets the I/O pins channels direction when in static mode.

Syntax

DioSetupIOPinsStaticDirection (nHandle, dwDirection, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
DIO Master handle, Slave handle or File board handle.
dwDirection
DWORD
The 32 I/O channels directions are represented by the 32-bits. Each bit represents a channel starting from 0, e.g. channel zero is represented by bit 0.
A bit high means the channel is set to output while a bit low means channel is set to input.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Example

The following example sets the I/O pins channels direction when in static mode:

 

SHORT nStatus;

DioSetupIOConfiguration (nHandle, 0, 1, pnStatus):

 

See Also

DioGetIOPinsStaticDirection, DioReadIoPinsValidity, DioReadIOPinsValue, DioWriteIOPinsValue,  DioGetErrorString