LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timed Shutoff

I'm not sure I understand what you are trying to do, nor what problem you are having, but you got a good response on measuring Elapsed Time -- basically save the Start Time in a Shift Register, and to compute Elapsed Time, get Current Time - (saved) Start Time = Elapsed Time.  No need for an Express VI (boooooo).

 

On another note, did you know you could/should branch Tag Channels?  Like this ...Branched Tag.png

 

 

Bob Schor

0 Kudos
Message 11 of 13
(382 Views)

Sorry again for the delayed response.

 

Thanks for the advise, I was able to create a time remaining program, but when I try to use it with my program the indicator doesn't do anything. I understand that since it requires a while-loop to run on its own, if it's running as a separated sub-vi it won't show anything until it has completed. To work around that, I tried including it in my program but I still have the same result - the indicator does not run down from the start time. Is there something I'm missing?

0 Kudos
Message 12 of 13
(359 Views)

Hi DeanAK,

 

Your indicators may not be changing because you have a True constant wired into the while loop stop, meaning the while loop is going to run only once each time. If you want the while loop to stop once time has elapsed, consider using the 'Elapsed' Boolean to control the stop. 

 

Additionally, do you want to measure the total elapse time from when this subVI is called? With your current set up, the Get Date/Time in Seconds function updates with every iteration, meaning that the total time elapsed is not being tracked. You can alleviate this by pulling in the start time from outside of the while loop using a second Get Time/Date in Seconds function and subtracting the current time from that initial value.

 

Hope this helps.

Erika
Technical Support Engineer
National Instruments
0 Kudos
Message 13 of 13
(336 Views)