Set Channel Conversion Sequence

Normally, when converting multiple channels for one sampling, conversion is performed sequentially from 0 channel as follows.

You can change the sequence of conversion by setting the channel conversion sequence.
When the input method is the successive approximation method, the input is performed based on the setting of channel conversion sequence,
but when the input method is simultaneous sampling, since the data is input at the same time, setting the conversion sequence has no special meaning.

Set the channel conversion sequence by function AioSetAiChannelSequence.

Ret = AioSetAiChannelSequence ( Id , AiSequence , AiChannel )

In AiSequence, specify the conversion sequence for the channel.

0

First conversion channel

1

Second conversion channel

.

.

.

.

Maximum number of channels - 1

Last conversion channel

In AiChannel, specify the channel for which you set the conversion sequence.

As the example in the above figure, if you want to change the conversion sequence to 7, 6, 5, 4, 3, execute this function five times to set it.

Ret = AioSetAiChannelSequence ( Id , 0 , 7 )
Ret = AioSetAiChannelSequence ( Id , 1 , 6 )
Ret = AioSetAiChannelSequence ( Id , 2 , 5 )
Ret = AioSetAiChannelSequence ( Id , 3 , 4 )
Ret = AioSetAiChannelSequence ( Id , 4 , 3 )