GxAoDioSetDirection

Purpose

Sets the direction of static digital channels.

Applies

GX1632e

Syntax

GxAoDioSetDirection (nHandle, nDioGroup, dwDirection, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle to a GX1632e board.
nDioGroup
SHORT
Specifies the DIO group.  Model dependent.
GX1632e:
0.      GXAO_1632_DIO_CH0_3
1.    GXAO_1632_DIO_CH4_7
dwDirection
DWORD
The specified group’s direction.  Model dependent.
GX1632e:
0.      GXAO_1632_DIO_DIRECTION_OUTPUT
1.    GXAO_1632_DIO_DIRECTION_INPUT
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

On the GX1632e, changing direction from output to input does not change the data level on an undetermined channel.

Example

The following example sets the direction of the low channels to input and the high channels to output:

SHORT nStatus;

 

GxAoDioSetDirection (nHandle, GXAO_1632_DIO_CH0_3, GXAO_1632_DIO_DIRECTION_INPUT, &nStatus);

GxAoDioSetDirection (nHandle, GXAO_1632_DIO_CH4_7, GXAO_1632_DIO_DIRECTION_OUTPUT, &nStatus);

 

See Also

GxAoDioGetData, GxAoDioGetDirection,GxAoDioSetData, GxAoGetErrorString