AioSetAiSamplingClock


Function

If the internal clock is used, sets the internal clock.
If the internal clock isn't used, it isn't necessary to set the internal clock.

Format

Ret = AioSetAiSamplingClock ( Id , AiSamplingClock )

Parameters

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

AiSamplingClock [ VB.NET : Single ] [ C, C++ : float ] [ C# : float ] [ Python : ctypes.c_float ]
Specifies the internal clock 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.

11140

The value of AiSamplingClock is outside the designated range of the function
AiSamplingClock should be set to a value greater than or equal to 1.

20001

This function can't be used by this device

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.

21140

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

Initial value

It differs by the device type.

Remarks

Except for some products, the internal clock can be set in increments of 0.025usec (25nsec).

The available internal clock is changed by the number of channels that you use.
And, even if the internal clock can be set, the conversion would be stopped if the driver cannot process in time.
Because the USB device completely depends on your environment, please lower the clock when sampling clock period error occurs.

This function cannot be used on devices without the analog input function.
This function can be executed if the device is working.

Specifications based on devices

AI-1204Z-PE
AI-1204Z-PCI

Usable AiSamplingClock is 0.1usec to 53687091usec.
Initial value is AiSamplingClock = 0.1.
The internal clock can be set in increments of 0.0125 usec (12.5 nsec).

AI-1664UG-PE

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

Usable AiSamplingClock is 1 to107374182.
Initial value is AiSamplingClock = 1000.

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

Usable AiSamplingClock is 10 to107374182.
Initial value is AiSamplingClock = 1000.

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

Usable AiSamplingClock is 2 to107374182.
Initial value is AiSamplingClock = 1000.

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

Usable AiSamplingClock is 10 to 107374182.
Initial value is AiSamplingClock = 1000.

AI-1616L-LPE
AD16-64(LPCI)LA
AD16-16(LPCI)L
ADI16-16(LPCI)L
AI-1616LI-PE
AI-1664LA-LPE

Usable AiSamplingClock is 10 to 107374182.
Initial value is AiSamplingClock = 1000.

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

Usable AiSamplingClock is 10 to 6710886.
Initial value is AiSamplingClock = 1000.

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

Usable AiSamplingClock is 1 to 6710886.
Initial value is AiSamplingClock = 1000.

AI-1216I2-PCI

Usable AiSamplingClock is 20 to 6710886.
Initial value is AiSamplingClock = 1000.

AD12-64(PCI)
AD12-16(PCI)

Usable AiSamplingClock is 10 to 1073714824.
Initial value is AiSamplingClock = 1000.

AI-1604CI2-PCI

Usable AiSamplingClock is 20 to 1073714824.
Initial value is AiSamplingClock = 1000.

AI-1608AY-USB
AIO-160802AY-USB

Usable AiSamplingClock is 10 to 107374182.
Initial value is AiSamplingClock = 1000.

AI-1608GY-USB
AIO-160802GY-USB

Usable AiSamplingClock is 4 to 107374182.
Initial value is AiSamplingClock = 1000.

AIO-163202FX-USB

Usable AiSamplingClock is 2 to107374182.
Initial value is AiSamplingClock = 1000.

AI-1664LAX-USB

Usable AiSamplingClock is 10 to 107374182.
Initial value is AiSamplingClock = 1000.

AIO-121602LN-USB

Usable AiSamplingClock is 2 to 107374182.
Initial value is AiSamplingClock = 1000.

AIO-120802LN-USB

Usable AiSamplingClock is 5 to 107374182.
Initial value is AiSamplingClock = 1000.

AI-1608VIN-USB
AI-1608VIN-ETH

Usable AiSamplingClock is 10 to 107374182.
Initial value is AiSamplingClock = 1000

AI-1608AIN-USB
AI-1608AIN-ETH

Usable AiSamplingClock is 20 to 107374182.
Initial value is AiSamplingClock = 1000

DEMO DEVICE

Usable AiSamplingClock is 1 to 4294967295.
Initial value is AiSamplingClock = 1000.

Example

Sets 100usec to the internal clock.

VB.NET

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

C, C++

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

C#

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

Python

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

See also

AioGetAiSamplingClock