AioSetAoRangeAll


Function

Sets the analog output range for all channels.

Format

Ret = AioSetAoRangeAll ( Id , AoRange )

Parameters

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

AoRange [ VB.NET : Short ] [ C, C++ : short ] [ C# : short ] [ Python : ctypes.c_short ]
Specifies the analog output range from the following range with macro or value.
The available value differs by the device.

Range

Macro

Value

-10 to 10V

PM10

0

-5 to 5V

PM5

1

-2.5 to 2.5V

PM25

2

-1.25 to 1.25V

PM125

3

0 to 10V

P10

50

0 to 5V

P5

51

0 to 2.5V

P25

53

0 to 1.25V

P125

54

0 to 20mA

P20MA

100

4 to 20mA

P4TO20MA

101

1 to 5V

P1TO5

150

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.

13120

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

20001

This function can't be used by this device

20002

Can not use while by another device works
To use this function, analog output operation must be stopped.

23120

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

Initial value

It differs by the device type.
If the range is set by software, the initial value is the status when each device is powered on.
If the range is set by jumper, the initial value is the factory settings.

Remarks

This function cannot be used on devices without the analog output function.
If the device is in operation, the function cannot be performed.

Specifications based on devices

AIO-163202G-PE
AIO-163202UG-PE
AIO-123202G-PE
AIO-123202UG-PE

The range is only changed by performing the function. The output value will be 0V when this function is executed.

-10 to 10V:AoRange = 0
-5 to 5V:AoRange = 1
-2.5 to 2.5V:AoRange = 2
-1.25 to 1.25V:AoRange = 3
0 to 10V:AoRange = 50
0 to 5V:AoRange = 51
0 to 2.5V:AoRange = 53
Initial value is AoRange = 53.
Cannot set to each channel.

AIO-163202F-PE
ADA16-32/2(PCI)F

The range is only changed by performing the function.
-10 to 10V:AoRange = 0
-5 to 5V:AoRange = 1
-2.5 to 2.5V:AoRange = 2
-1.25 to 1.25V:AoRange = 3
0 to 10V:AoRange = 50
0 to 5V:AoRange = 51
0 to 2.5V:AoRange = 53
Initial value is AoRange = 53.
Cannot set to each channel.

AIO-160802L-LPE
ADA16-8/2(LPCI)L
ADAI16-8/2(LPCI)L
AIO-160802LI-PE

-10 to 10V is fixed.

AO-1604L-LPE
DA16-16(LPCI)L
DA16-8(LPCI)L
DA16-4(LPCI)L
DAI16-4(LPCI)L
AO-1604LI-PE
AO-1608L-LPE
AO-1616L-LPE
AO-1604LX-USB

-10 to 10V is fixed.

DA12-16(PCI)
DA12-8(PCI)
DA12-4(PCI)

The range is only changed by performing the function.
-10 to 10V:AoRange = 0
-5 to 5V:AoRange = 1
0 to 10V:AoRange = 50
Initial value is AoRange = 0.
It can be set for each channel.

AO-1604CI3-PCI

The range is only changed by the JP settings.
-10 to 10V:JP settings
0 to 10V:JP settings
0 to 20mA:JP settings
Initial value is set by the JP settings.
It can be set for each channel.

AIO-160802AY-USB
AIO-160802GY-USB

-10 to 10V is fixed.

AIO-163202FX-USB

The range is only changed by performing the function.
-10 to 10V:AoRange = 0
-5 to 5V:AoRange = 1
-2.5 to 2.5V:AoRange = 2
-1.25 to 1.25V:AoRange = 3
0 to 10V:AoRange = 50
0 to 5V:AoRange = 51
0 to 2.5V:AoRange = 53
Initial value is AoRange = 53.
Cannot set to each channel.

AIO-121602LN-USB
AIO-120802LN-USB

The range is only changed by performing the function.
-10 to 10V:AoRange = 0
-5 to 5V:AoRange = 1
0 to 10V:AoRange = 50
0 to 5V:AoRange = 51
Initial value is AoRange = 0.
Cannot set to each channel.

AO-1604VIN-USB
AO-1604VIN-ETH

-10 to 10V is fixed.

AO-1604AIN-USB
AO-1604AIN-ETH

0 to 20mA is fixed.

AD12-16(PCI)EV
AD12-16U(PCI)EV
AD12-64(PCI)
AD12-16(PCI)
AIO-121601E3-PE
AIO-121601UE3-PE

The range is only changed by the JP settings.
-10 to 10V:Only the JP settings
-5 to 5V:Only the JP settings
0 to 10V:Only the JP settings
Initial value is set by the JP settings.

AD16-16(PCI)EV
AD16-16U(PCI)EV
AIO-161601E3-PE
AIO-161601UE3-PE

The range is only changed by the JP settings.
-10 to 10V:Only the JP settings
0 to 10V:Only the JP settings
Initial value is set by the JP settings.

DEMO DEVICE

All ranges can be set. Initial value is AoRange = 0.
It can be set for each channel.

CPS-AO-1604LI

0 to 20mA is fixed.

CPS-AO-1604VLI

-10 to 10V is fixed.

CPSN-AO-1602LC

The range is only changed by performing the function.
-10 to 10V:AoRange = 0
-5 to 5V:AoRange = 1
0 to 10V:AoRange = 50
0 to 5V:AoRange = 51
0 to 20mA:AoRange = 100
Initial value is AoRange = 0.
It can be set for each channel.

Example

All the channel ranges are set to -10 to 10V.

VB.NET

Dim Ret As Integer
Ret = AioSetAoRangeAll ( Id , PM10 )
 

C, C++

long Ret;
Ret = AioSetAoRangeAll ( Id , PM10 );
 

C#

int Ret;
Ret = aio.SetAoRangeAll ( Id , (short)CaioConst.PM10 );
 

Python

Ret = ctypes.c_long()
Ret.value = caio.AioSetAoRangeAll ( Id , caio.PM10 )
 

See also

AioSetAoRange AioGetAoRange