LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I do a synchronous display of a count up timer while a sub vi (below the one with the timer)is running?

The timer is to show the elapsed time of the overall test. Currently it only updates the indicator once each time through the while loop.
0 Kudos
Message 1 of 5
(3,111 Views)
The standard aproach to doing this kind of thing invloves putting the timer in a different loop that iterates regularly to upadte the timer while the test is running.

The mechanism used to tell the timer to stop can filll a book. the simplest method uses a local copy of an indicator that reflect the stae of the test loop.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 5
(3,111 Views)
I have also done something similar with a sequence structure. Take the Tick Count in the first frame, run your VI in the second, and then take the Tick Count again in the third frame. Now take the difference of the two Tick Counts and that's how long it took to run.
J.R. Allen
0 Kudos
Message 3 of 5
(3,111 Views)
Thanks for the tip. I moved the timer vi out of the main loop and placed it in its own parallel loop. I then wired the error path to both loops so that they start at the same time. When the interval expires, both loops are terminated using a local variable of the "interval expired" indicator.
0 Kudos
Message 4 of 5
(3,111 Views)
I am just displaying a running timer while a process happens. The timer also happens to control how long this process continues. I am not "measuring" how long the process takes since that is not the intent. Thanks for the response though.
0 Kudos
Message 5 of 5
(3,111 Views)