05-29-2012 04:18 PM
Hi all,
I am having a bit of problems with a NI USB-6215 board I'm using. What I'm basically doing is generating a train of pulses of a certain frequency, and I trigger these trains of pulses with a digital input. So far this is working and there is no major problems with it. Now, the part that I can't get to work is using either Is Task Done.vi or Wait Until Done.vi . I want to know exactly when the generation of these pulses have stopped so I can do certain tasks and then trigger them again.
When I use the Is Task Done.vi, I never seem to be getting any true output, signaling that the pulse generation has ended. Does anyone know if there are any known issues regarding this, or how I can get some signal to tell me that the pulse generation has stopped? If I use Wait Until Done.vi I get more or less the same results
Thanks!
Solved! Go to Solution.
05-30-2012 04:43 AM
Since the Task is retriggerable it is never considered done. So it is expected behaviour that "IsTaskDone.vi" never returns TRUE with a retriggerable Task, instead it is used to check for errors.
With a finite pulse train generation you should know when it is finished out of the frequency and the number of pulses. So if you can calculate it, why do you want to determin it in software instead?
Christian
05-30-2012 08:07 AM
Hi Christian,
Thanks for the quick reply. I thought that it might be something along those lines (being retriggerable = always on). However, since I am generating 11 pulses at 10kHz, it means that my pulse train lasts for 1.1 ms. As far as I know there are no timing functions that wait for units of time smaller than ms. This basically means that in order to wait for the pulse train to finish I need to use a 2 ms delay, which is considerably longer than what is really necessary.
Is there any trick to fix this (i.e. waiting less than ms)?
Thanks!
05-30-2012 08:49 AM
You can use the CO.PulseDone Property with a DAQmx Channel Property Node:
Christian