Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Finite Pulse Train

0 views
Skip to first unread message

james p martin

unread,
Jul 18, 2008, 12:10:09 PM7/18/08
to
Dear All,
 
I have an application where I am using digital finite pulses (see attached example) but I want the generation to be stopped by the user too in addition to the task completed function.
 
Also, when I use generate finite pulse / generate continuous pulses can I use the other counter to count the pulses.
 
I am using PCI 6221 & LV8.0
 
Regards
James


FINITE PULSE TRAIN.vi:
http://forums.ni.com/attachments/ni/40/6568/1/FINITE PULSE TRAIN.vi

james p martin

unread,
Jul 19, 2008, 1:40:06 AM7/19/08
to
Dear Stilly,
Thanks for the response, I am using IsTask Done VI in my example (attached file), but the user stopped action will be a Stop Push Button (it is a digital input), which is acquired by 6515 Digital I/O , so when I press the stop button generation stops only when the task is done.
Stopping dont occurs if I press stop push button.
 
thanks

Corby_B

unread,
Jul 21, 2008, 11:40:10 AM7/21/08
to
Hello james! Thanks for your post. I think what you want to do instead of "wait until DAQmx task is done" just use the "is DAQmx tasks done". That way you only call the VI once in software and it either returns true or false. If you "wait" until the task is done then you program loop will not continue until the task is finished. Take a look at the following pictures that shows you how I would do it. The task will give you a warning and tell you that you have not finished generating all the pulses yet but its just a warning and the task will stop. Let me know if you have any other questions and if this helps you with your application.Cheers!Corby_Bhttp://www.ni.com/support


False case keep generating.JPG:
http://forums.ni.com/attachments/ni/40/6572/1/False case keep generating.JPG


True case STOP program.JPG:
http://forums.ni.com/attachments/ni/40/6572/2/True case STOP program.JPG

james p martin

unread,
Jul 22, 2008, 3:10:07 AM7/22/08
to
Hello Corby,
 
Thanks for your suggestion, I am able to stop the generation of pulses from user stop, but now what happens if user dont interrupts generation dont stops after specified no. of samples, it is behaving in continuous mode manner.
 
Thanks

Corby_B

unread,
Jul 22, 2008, 7:40:08 PM7/22/08
to
Hello James, Thanks for your post back! Take a look at the new picture attached as I will have to apologize for my last picture post. I showed you a picture that reconfigures and starts a task each time your loop iterates. So the reason it was acting in a finite matter was because you were clearing and restarting the task every loop iteration. So your loop never finished the pulses. A basic rule of thumb, which I should have conveyed for you, is to always do all your configuration before you enter the loop state of your program. The picture below shows a single finite pulse train that will stop if the user interrupts the counter or the counter finishes the requested number of pulses. Hope this helps and please post back if you have any other questions.Cheers!Corby_Bhttp://www.ni.com/support


finite counter user interupt.JPG:
http://forums.ni.com/attachments/ni/40/6577/1/finite counter user interupt.JPG

james p martin

unread,
Jul 23, 2008, 8:10:08 AM7/23/08
to
Hello Corby,
 
Thanks for your help, I am able to do it now...but I want to ask that I am stopping the task forcibly, will it have any kind of adverse affect (just doubting) on my DAQ Card (PCI-6221).
 
Thanks & Regards
 
James.

james p martin

unread,
Jul 25, 2008, 2:10:08 PM7/25/08
to
Thanks Corby,
Thank you very much for your useful information, I am able to  complete my task !!.
 
With Regards
JamesMessage Edited by james p martin on 07-25-2008 12:56 PM
0 new messages