Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write many times in a single output task ?

Hello,
I have to generate different waveforms on 2 analog ouputs, at a precise timing value, and also, I have to display the progression of these generations. Here is the way I do:
 
In a separate thread (for timing precision):
1. Start the task
2. WriteAO
3. Sleep between 0 and 60 sec.
4. repeat steps 2 and 3 many times
5. Stop the task
 
In the main thread:
With a timer: get the property DAQmx_Write_TotalSampPerChanGenerated and display it.
 
Pb: When I'm getting the property, it works well for the 1st write sequence, but then, the number of samples doesn't increment when the other writes occur. Why and how to write different waveforms in a single task and count global samples generated ??
Remark: I don't want to stop and restart the task each time because sometimes, there is only few milliseconds between 2 writes.
 
Thanks
0 Kudos
Message 1 of 1
(2,848 Views)