From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Is Task Done doesn't work with retriggerable counter?

Solved!
Go to solution

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!

0 Kudos
Message 1 of 4
(2,822 Views)

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

0 Kudos
Message 2 of 4
(2,819 Views)

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!

0 Kudos
Message 3 of 4
(2,816 Views)
Solution
Accepted by topic author HugoKrajnc

You can use the CO.PulseDone Property with a DAQmx Channel Property Node:

 

Untitled.png

 

Christian

0 Kudos
Message 4 of 4
(2,813 Views)