Normally, when converting multiple channels for one sampling, conversion is performed sequentially from 0 channel as follows.
Some devices can change the sequence of conversion by setting the channel conversion sequence.
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 )