AioOutputDoBit


Function

Outputs the data to the specified bit of digital output. This function supports multi-process.

Format

Ret = AioOutputDoBit ( Id , DoBit , DoData )

Parameters

Id [ VB.NET : Short ] [ C, C++ : short ] [ C# : short ] [ Python : ctypes.c_short ]
Specifies the device ID retrieved from AioInit.

DoBit [ VB.NET : Short ] [ C, C++ : short ] [ C# : short ] [ Python : ctypes.c_short ]
Specifies the bit of digital output.

DoData [ VB.NET : Short ] [ C, C++ : short ] [ C# : short ] [ Python : ctypes.c_short ]
Specifies the output data.

0

OFF

1

ON

Return value

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
Use the Id retrieved from AioInit to specify the Id in this function.

10002

AIO driver can't be called
At first, perform AioInit function.

14020

The value of DoBit is outside the designated range of the function
Specify the digital output bit in range: 0 <= DoBit <= Max bit.

14021

The value of DoData is outside the designated range of the function

20001

This function can't be used by this device

24020

The value of DoBit is outside the designated range of the device being used

Remarks

This function cannot be used on devices without digital output functionality.

Specifications based on devices

AIO-163202G-PE
AIO-163202UG-PE
AIO-123202G-PE
AIO-123202UG-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 to 7 for the parameter DoBit.

When accessing DIO08 to DIO15, specify 8 to 15 for the parameter DoBit.

 

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 to 7 for the parameter DoBit.

AIO-121602LN-USB

AIO-120802LN-USB

You can switch the I/O direction with AioSetDioDirection.

 

When accessing DIO00 to DIO07, specify 0 to 7 for the parameter DoBit.

When accessing DIO08 to DIO15, specify 8 to 15 for the parameter DoBit.

Example

Outputs 1 (ON) to bit 0.

VB.NET

Dim Ret As Integer
Ret = AioOutputDoBit ( Id , 0 , 1 )
 

C, C++

long Ret;
Ret = AioOutputDoBit ( Id , 0 , 1 );
 

C#

int Ret;
Ret = aio.OutputDoBit ( Id , 0 , 1 );
 

Python

Ret = ctypes.c_long()
Ret.value = caio.AioOutputDoBit ( Id , 0 , 1 )
 

See also

AioOutputDoByte