Applies To
GC5050, GX5050, GX5150, GX5280, GX5290, GX5290e
Purpose
Sets the output pins state.
Syntax
DioGetOutputState (nHandle, nOutputState, pnStatus)
Parameters
Name |
Type |
Comments |
nHandle |
SHORT |
Master or Slave board handle. |
nOutputState |
SHORT |
|
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
Comments
This function sets the output driver to enable or disable state. It has no effect on the DIO running mode or the loaded vector. When issued, this command sets all 32 I/O lines to the specified state regardless of DIO state. That is, if the board outputs are set to zero while the board is in RUN state, then the outputs will remain at zero while the board is still running.
The state setting does not have any affect if the board is in input mode.
Example
The following example sets the outputs to retain last value:
SHORT nStatus, nOutputState;
DioSetupOutputState (nHandle, 0, &nStatus);
See Also
DioGetOutputState, DioWriteIOPinsValue, DioReadIOPinsValue, DioGetErrorString