LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

timed while loop

Hello to all!
 
I have a question. I am trying to visibly monitor my while loop using elapsed time from start of loop to stop.
 
I inserted a elapsed time vi into the loop but my issue is that once the while loop is stop, the timer is still functional.
I just want to stop the timer, so when i go back to the while loop i will begin at zero.
 
I tried to reset the timer with no end result,
 
Thanx 
 
0 Kudos
Message 1 of 17
(3,518 Views)
It sounds like you have the while loop inside maybe a case statement and everything is inside another while loop. In the while loop with the elapsed time function, wire a Equal to 0? function to the iteration terminal of the while loop and the output of it to the reset terminal of the elapsed time function. That way, the elapsed time function will reset on only the first iteration of the inner while loop.
Message 2 of 17
(3,511 Views)

I kinda don't understand your answer.

You are correct that I have a the elapsed time while loop inside of a case inside of a while.

what do i wire the equal to 0 input to?

ouptut (boolean) goes to iteration terminal of while loop, in my case stop if true. 

but the input is wired to what?

0 Kudos
Message 3 of 17
(3,501 Views)
I want the elapsed time to reset each time this loop is entered
0 Kudos
Message 4 of 17
(3,500 Views)
from the iteration terminal (i) wire that to a =0 function and then wire the output from the =0 function to the reset terminal of the elapsed time vi. 
 
 
 

Message Edited by jhoskins on 10-10-2005 06:42 PM




Joe.
"NOTHING IS EVER EASY"
Message 5 of 17
(3,496 Views)
I am trying to read in from a DAQmx card and periodically write to a file.  i tried encasing the write vi in a timed loop, however this seems to cause a delay to my entire program  I was wondering if there is some way to isolate the timed loop from the while loop.  Thanks
0 Kudos
Message 6 of 17
(3,238 Views)
p3:

Trying to read from a DAQmx card within a timed while loop allows you to do a continuous software timed acquisition because you can control the rate at which you are acquiring. However, I am not quite sure about the reason behind isolating the timed loop from the while loop. Would the readings from the DAQmx card still be inside the while loop? What
would be the effect of having the timed loop outside of the while loop? Are you trying to do sequential tasks? Please let me know so that we can assist you further..

Thanks,

Rudi N.
Applications Engineer
0 Kudos
Message 7 of 17
(3,214 Views)
This is the VI i am working on.  It is rather straight forward.  I just need to input some information from 2 thermocouples and 1 pressure transducer and need to be able to set the record rate since the tests will span several weeks.  Thanks
0 Kudos
Message 8 of 17
(3,175 Views)
p3:

Thank you very for posting the example you are currently working on. Instead of using a timed loop, you should consider using a case structure with "Elapsed Time" Express VI as the case selector. This will allow you to write data to the file in a periodic manner (controlled by the elapsed time Express VI). I hope this helps !!!

Regards,

Rudi N.
Applications Engineer
0 Kudos
Message 9 of 17
(3,143 Views)
excellent! I was able to get the output timed to my satisfaction thanks!
0 Kudos
Message 10 of 17
(3,124 Views)