AioSetAiChannelSequence


Function

Sets the channel sequence for the conversion. This function can only be used for the following devices.

Format

Ret = AioSetAiChannelSequence ( Id , AiSequence , AiChannel )

Parameters

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

AiSequence [ VB.NET : Short ] [ C, C++ : short ] [ C# : short ] [ Python : ctypes.c_short ]
Specifies the conversion sequence for the channel.

0

First conversion channel

1

Second conversion channel

...

...

Maximum number of channels - 1

Last conversion channel

AiChannel [ VB.NET : Short ] [ C, C++ : short ] [ C# : short ] [ Python : ctypes.c_short ]
Specifies the channel for which you set the conversion sequence.

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.

11760

The value of AiChannel is outside the designated range of the function
Specify the analog input channel in range: 0 <= AiChannel <= Max channel.

11761

The value of Sequence is outside the designated range of the function
Specify the order for channels to convert in range: 0 <= AiChannel <= Max channel.

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.

21760

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

21761

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

Initial value

For all devices, the conversion is performed in order of channel0, channel1, channel2 ...

Remarks

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

Example

Sets 0 to the conversion sequence of channel 3. 

VB.NET

Dim Ret As Integer
Ret = AioSetAiChannelSequence ( Id , 0 , 3 )
 

C, C++

long Ret;
Ret = AioSetAiChannelSequence ( Id , 0 , 3 );
 

C#

int Ret;
Ret = aio.SetAiChannelSequence ( Id , 0 , 3 );
 

Python

Ret = ctypes.c_long()
Ret.value = caio.AioSetAiChannelSequence ( Id , 0 , 3 )
 

See also

AioGetAiChannelSequence