AioSetAiScanClock


Function

Sets the conversion speed.

Format

Ret = AioSetAiScanClock ( Id , AiScanClock )

Parameters

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

AiScanClock [ VB.NET : Single ] [ C, C++ : float ] [ C# : float ] [ Python : ctypes.c_float ]
Specifies the conversion speed in usec.
The available range differs by the device.

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.

12240

The value of AiScanClock 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 input operation must be stopped.

20003

Can not use because another process is using the device
When another process is using the device, all functions except for those that support multi-process can not be performed.

22240

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

Initial value

The fastest conversion speed is set for each device.

Remarks

Available conversion speed is changed by sampling clock period.
This function cannot be used on devices without the analog input function.
If the device is in operation, the function cannot be performed.

Specifications based on devices

AI-1664UG-PE

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

Usable AiScanClock is 1 to 1638 (Unit : usec).
Initial value is AiScanClock = 1.

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

Usable AiScanClock is 10 to 1638 (Unit : usec).
Initial value is AiScanClock = 10.

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

Usable AiScanClock is 2 to 1638 (Unit : usec).
Initial value is AiScanClock = 2.

AD12-16(PCI)EV
AD16-16(PCI)EV
AIO-121601E3-PE
AIO-161601E3-PE

Usable AiScanClock is 10 to 1638.
Initial value is AiScanClock = 10.

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

Usable AiScanClock is 1 to 1638.
Initial value is AiScanClock = 1.

AIO-163202FX-USB

Usable AiScanClock is 2 to 1638 (Unit : usec).
Initial value is AiScanClock = 2.

DEMO DEVICE

Usable AiScanClock is 1 to 0xffffffff.
Initial value is AiScanClock = 1.

Example

Sets 100usec to the conversion speed.

VB.NET

Dim Ret As Integer
Ret = AioSetAiScanClock ( Id , 100 )
 

C, C++

long Ret;
Ret = AioSetAiScanClock ( Id , 100 );
 

C#

int Ret;
Ret = aio.SetAiScanClock ( Id , 100 );
 

Python

Ret = ctypes.c_long()
Ret.value = caio.AioSetAiScanClock ( Id , 100 )