Retrieves I/O direction of digital I/O ports.
Ret = AioGetDioDirection ( Id , Dir )
Id
[ VB.NET : Short ] [ C, C++ : short ] [ C# : short ] [ Python : ctypes.c_short
]
Specifies the device ID retrieved from AioInit.
Dir
[ VB.NET : Integer ] [ C, C++ : long * ] [ C# : out int ] [ Python : ctypes.POINTER(ctypes.c_long)
]
Specifies the address of the variable to store the I/O direction.
Dir | Port1 (DIO08 to DIO15) | Port0 (DIO00 to DIO07) |
0x00 | Digital Input | Digital Input |
0x01 | Digital Input | Digital Output |
0x02 | Digital Output | Digital Input |
0x03 | Digital Output | Digital Output |
Ret [ VB.NET : Integer ] [ C, C++ : long ] [ C# : int ] [ 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 |
14051 |
Pointer to Dir is NULL. |
20001 |
This function can't be used by this device |
The set I/O status of each port can be retrieved.
AIO-163202G-PE |
Initial value is Dir = 0 (Port0 and Port1 are both Input) ※This function cannot be executed if the [E-series settings] jumper on the device is [Use as E-series compatible]. |
AIO-121602LN-USB |
Initial value is Dir = 0 (Port0 and Port1 are both Input) |
Devices other than the above |
This function cannot be executed. |
Retrieves the digital I/O direction being set.
VB.NET |
Dim Ret As Integer |
C, C++ |
long Ret; |
C# |
int Ret; |
Python |
Ret = ctypes.c_long() |