Sets the direction of static digital channels.
GX1632e
GxAoDioSetDirection (nHandle, nDioGroup, dwDirection, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a GX1632e board. |
nDioGroup |
SHORT |
Specifies the DIO group. Model dependent.GX1632e:0. GXAO_1632_DIO_CH0_31. GXAO_1632_DIO_CH4_7 |
dwDirection |
DWORD |
The specified group’s direction. Model dependent.GX1632e:0. GXAO_1632_DIO_DIRECTION_OUTPUT1. GXAO_1632_DIO_DIRECTION_INPUT |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
On the GX1632e, changing direction from output to input does not change the data level on an undetermined channel.
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);
GxAoDioGetData, GxAoDioGetDirection,GxAoDioSetData, GxAoGetErrorString