Step 8 : Set Stop Condition

Set the conversion stop condition by using function AioSetAoStopTrigger.
If conversion of multiple channels is performed, the generating at the time when the external trigger is input stops after the conversion of all channels has completed.

Ret = AioSetAoStopTrigger ( Id , AoStopTrigger )

The values and meanings set in AoStopTrigger are as follows.

0

Stop conversion by the specified times

1

External trigger rising edge

2

External trigger falling edge

10

Event controller output

The values that can be set depend on the devices.
Please refer to [Specifications based on devices] of function AioSetAoStopTrigger.

 

Stop Conversion by the Specified Times

When AoStopTrigger = 0, the stop condition is [Stop conversion by the specified times].
For FIFO memory, conversion stops when all data in memory is output.
For RING memory, conversion stops when the output for the set number of repeat times is completed.

 

External Trigger Rising / Falling Edge

When AoStopTrigger = 1 or 2, the stop condition is external trigger input.
For both FIFO and RING memory, conversion stops when an external trigger is input.
If no external trigger is input during conversion, it performs the same operation as the stop condition of [Stop conversion by the specified times].

 

Event Controller Output

When AoStopTrigger = 10, conversion stops with the output signal from the event controller which is the stop condition.
Please refer to the tutorial of Event Controller.