AioSetAoRangeAll

Function

Sets the analog output range for all channels.

 

Format

Ret = AioSetAoRangeAll ( Id , AoRange )

 

Parameter

Id [VB.NET:Short C,C++:short C#:short]

Specifies the device ID retrieved from AioInit.

 

AoRange [VB.NET:Short C,C++:short 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

±10V

PM10

0

±5V

PM5

1

0 to 10V

P10

50

0 to 5V

P5

51

0 to 20mA

P20MA

100

 

Return Value

Ret [VB.NET:Integer C,C++:long C#:int]

Define

Value

Description

AIO_ERR_SUCCESS

0

Normality completion

AIO_ERR_DLL_INVALID_ID

10001

Invalid ID was specified.

AIO_ERR_DLL_TIMEOUT

28004

Communication time out occurred.

AIO_ERR_ACCESS_RIGHT

28003

Access rights error.

AIO_ERR_AO_RANGE

13120

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

AIO_ERR_SYS_NOT_SUPPORTED

20001

This function can't be used by this device.

AIO_ERR_DEVICE_BUSY

20002

Can not use while by another device works.

AIO_ERR_AO_DEVICE_RANGE

23120

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

AIO_ERR_AO_SET_RANGE

23121

It failed in the setting of the range.

 

See also: Error Code Details

 

Initial Value

It differs by the device type.

 

Remark

This function cannot be used on devices without the analog output function.

If the device is in operation, the function cannot be performed.

The content set by this function is effective in next time controller module start as long as device configuration is not changed.

 

Specifications Based on Devices

DAI12-4(FIT)

 The range is only changed by performing the function.

±10V: AoRange = 0

±5V: AoRange = 1

0 to 10V: AoRange = 50

0 to 5V: AoRange = 51

0 to 20mA: AoRange = 100

Cannot set in the unit of channel. Sets in unit of device module.

 

DAI16-4(FIT)GY

 The range is only changed by performing the function.

±10V: AoRange = 0

0 to 20mA: AoRange = 100

Cannot set in the unit of channel. Sets in unit of device module.

 

Example

All the channel ranges are set to ±10V.

VB.NET   Ret = AioSetAoRangeAll ( Id , PM10 )

C,C++     Ret = AioSetAoRangeAll ( Id , PM10 );

C#          Ret = AIO.ccapaio.AioSetAoRangeAll ( Id , PM10 );

 

See Also

AioGetAoRange