Use the AI CONFIG to set up your acquisition.
Use AI CLOCK config to set up your timing.
Use AI TRIGGER CONFIG to set up your trigger.
Use AI CONTROL to start the DAQ (use TOTAL SCANS TO ACQUIRE = 0 for
unlimited scanning.

repeat (While loop)
    Use AI READ with a NUMBER of SCANS TO READ = 0. This tells you the
    backlog (how many scans in the buffer)

    Use AI READ with NUMBER OF SCANS TO READ = to the backlog number
    from above. (this empties the buffer)

    Process the scans received into your image - append to previous
    data and re-display.

    If you are doing a fixed number of scans, add this backlog number
    to the total done so far, and see if you're done. If you're doing
    continuous, skip this step.

    Wait 100 mSec if you can, 10 mSec if you can't.

Loop (until # scans done >= # scans wanted OR Quit button, whatever).

Use AI CONTROL to stop the DAQ.

The idea is that the DAQ operation happens in the background.  You
just ask how many are available, and then read that many and use them.

You wait 100 mSec to allow the display update to happen.

Reply via email to