AioGetAiChannelSequence


Function

Retrieves the channel sequence when the conversion is performed. This function can only be used for the following devices.

AIO-163202G-PE, AIO-163202UG-PE, AIO-123202G-PE, AIO-123202UG-PE, AI-1664UG-PE
ADA16-32/2(PCI)F, AIO-163202F-PE
AD12-16(PCI)EV, AD12-16U(PCI)EV,
AD16-16(PCI)EV, AD16-16U(PCI)EV,
AIO-121601E3-PE, AIO-121601UE3-PE, AIO-161601E3-PE, AIO-161601UE3-PE
AI-1216I2-PCI
AIO-163202FX-USB

Format

Ret = AioGetAiChannelSequence ( Id , AiSequence , AiChannel )

Parameters

Id [ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the Device ID retrieved from AioInit function.

AiSequence [ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the conversion sequence of the channel.

0

First conversion channel

1

Second conversion channel

...

...

Maximum number of channels - 1

Last conversion channel

AiChannel [ C, C++ : short * ] [ Python : ctypes.POINTER(ctypes.c_short) ]
Specifies the address of the variable that stores the channel that is retrieved the conversion sequence.

Return value

Ret [ C, C++ : long ] [ 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.

11770

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

11771

Pointer to Sequence is NULL
Specify the address of variable to parameter.

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.

21770

The value of AiChannel 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

Retrieves the channel of the conversion sequence 0.

C, C++

long Ret;
short AiChannel;
Ret = AioGetAiChannelSequence ( Id , 0 , &AiChannel );
 

Python

Ret = ctypes.c_long()
AiChannel = ctypes.c_short()
Ret.value = caio.AioGetAiChannelSequence ( Id , 0 , ctypes.byref(AiChannel) )
 

See also

AioSetAiChannelSequence