LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

restarting a elapsed time function in a for loop

Hello,
 
I am having an issue while using an elasped time function inside of a while loop (I wire the Time has elapsed? boolean to the stop function of the while loop), that is consequently inside of a for loop.  The elapsed time function works correctly on its own in a while loop, but when added to a for loop will not reset for each iteration of the for loop.  I can post an example if it is needed, but has anyone run into this problem before?  I have tried wiring all the reset boolean's but I cannot get the timer to reset untill the for loop has finished.
 
Any suggestions on how to achieve this another way are welcome.
 
 
 
Thanks,
 
 
Andrew
0 Kudos
Message 1 of 3
(2,911 Views)

Ok, this is not replicated when I just build the loops and the timer without any measurement inside of the while loop, but if I am querying a power supply for the duration of the elapsed time.....then the timer will not restart, this seems like strange behavior to me unless I am missing something obvious.

 

 

Andrew

0 Kudos
Message 2 of 3
(2,911 Views)
I found the issue, I was using 2 timers inside of the for loop on the assumption that they are completely independant of one another....they are not.  if time has elapsed on one timer then it uses that time to start off the next timer, kind of a wierd behaviour but I guess I am not really using the timer in a normal manner.
 
 
Andrew
0 Kudos
Message 3 of 3
(2,904 Views)