LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to synchronize DAQmx AI/AO finite samples?

Solved!
Go to solution

Ok, let me be be more specific:

I want to generate a sine wave on the analog output AO0 and capture it at the same time at the analog inputs AI0 and AI1.

I just added another parallel thread for the additional, second input AI1.

But it doesn't work because the two input tasks (AI0/AI1) don't start in parallel.

The second input task does not start before the first input task finishes.

Is this a hardware limitation of the DAQ card?

 

0 Kudos
Message 11 of 12
(1,049 Views)

On MIO boards, there's typically (always?) only 1 timing subsystem available for AI tasks.  Thus, only 1 task at a time is allowed to reserve the timing subsystem for doing AI.  Multiple channels are acquired by including several channels in a single task.  

 

I'm not sure whether DSA boards follow similar rules, but I'd be inclined to think they might.

 

I'm still a little confused by your description: you first state that you want to capture at AI0 and AI1 at the same time and later you state that the 1st task finishes before the 2nd tasks starts.  For the first situation, just put both channels into a single AI task.  For the second situation, you should be safe if you're able to stop (and maybe clear?) the 1st task before configuring and starting the 2nd.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 12 of 12
(1,043 Views)