Function
Outputs the data to the specified byte of digital output. This function supports multi-process.
Format
Ret = AioOutputDoByte ( Id , DoPort , DoData )
Parameters
Id [ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the ID retrieved from AioInit.
DoPort [ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the port of digital output.
DoData [ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the output data.
Return values
Ret [ C, C++ : long ] [ Python : ctypes.c_long ]
Return values |
Content |
0 |
Normality completion |
7 |
Execute AioResetDevice function because the device has recovered from standby mode |
10001 |
Invalid Id was specified |
10002 |
AIO driver can't be called |
14030 |
The value of DoPort is outside the designated range of the function |
14031 |
The value of DoData is outside the designated range of the function |
20001 |
This function can't be used by this device |
24030 |
The value of DoPort is outside the designated range of the device being used |
Remarks
This function cannot be used on devices without digital output functionality.
AIO-163202G-PE |
The behavior depends on the [E-series settings] jumper on device.
If the [E-series settings] jumper on the device is [Do not use as E-series compatible], you can switch the I/O direction with AioSetDioDirection. When accessing DIO00 to DIO07, specify 0 for the parameter DoPort. When accessing DIO08 to DIO15, specify 1 for the parameter DoPort.
If the [E-series settings] jumper on the device is [Use as E-series compatible], DIO00 to DIO07 are fixed as Input, and DIO08 to DIO15 are fixed as output. DIO00 to DIO07 cannot be accessed. When accessing DIO08 to DIO15, specify 0 for the parameter DoPort. |
AIO-121602LN-USB AIO-120802LN-USB |
You can switch the I/O direction with AioSetDioDirection.
When accessing DIO00 to DIO07, specify 0 for the parameter DoPort. When accessing DIO08 to DIO15, specify 1 for the parameter DoPort. |
Example
Outputs FH (Bit 0, 1, 2, 3 are ON) to port 0.
C, C++ |
long Ret; |
Python |
Ret = ctypes.c_long() |
See also