LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to display a timer on labview application?

On my application I want to have a digital timer display on it where the timer is initialy specified by the user. How can I do that?
0 Kudos
Message 1 of 13
(23,889 Views)
Can you explain in a little more detail exactly what you want to happen? There are a number of ways to implement timers--and a number of different kinds of timers.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 13
(23,889 Views)
I want to have a digital timer where it counts the number of minutes and seconds so that the user can see how many hours/minutes/senconds they have left.

Say if you set the timer to 30 minutes then the digital timer should start counting form 30 to 29 to 28...etc till it reach zero
0 Kudos
Message 3 of 13
(23,890 Views)
One way you can do this is have a numeric control that's formatted for elapsed time. The user would then enter the total timer period in this control and press a button or something to start the test process. The code's test loop would use a local variable to update the control to indicate the amount of time left.

Attached is a small example. Run it and them enter your timeout value. You can enter the time in hours, minutes and seconds. To start the timer click the Start Count Down button.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 4 of 13
(23,890 Views)
I was looking for something like that, where it takes 60 secs for my test to be completed, and meanwhile I am displaying a progress bar that shows the operator, the test progress in seconds. I wonder though why Labview does not have something like this as an express vi.
 
Thanks,
 
Shoab
Message 5 of 13
(23,686 Views)

There basicly is an Express VI that does exactly what you want. Elapsed Time.vi measures the elapsed time. It obviously counts up instead of down, but some basic arithmetic reverses the action.

Message Edited by Jarrod S. on 04-24-2006 10:54 AM

Jarrod S.
National Instruments
Message 6 of 13
(23,671 Views)
Worked beautifully. I had played around with this Express vi earlier, but couldn't get enough information in the Labview Help as it wasn't very descriptive. Thank you very much.
0 Kudos
Message 7 of 13
(23,661 Views)

If you have LabVIEW 8.0 or higher, read "Using the Elapsed Time Express VI in LabVIEW 8.0 (and Higher)"

http://digital.ni.com/public.nsf/allkb/05A9C3B0A4D5A7638625712B006FB30F

0 Kudos
Message 8 of 13
(23,223 Views)

So,I have built a VI which allows the user to enter the delay time and an emergency stop is also provided for the user to abort the timer immediately.

I have learnt this from the following link: https://www.youtube.com/watch?v=a4APkOV3MgE

there are two VIs in the folder ,the MainVI is the TimerVI.

p.s. - 'I'm a beginner  Smiley Happy   '

 

0 Kudos
Message 9 of 13
(14,274 Views)

Hi Kushagra,

 

you replied to a 11 year old thread, despite the suggestion to use ElapsedTime…

 

there are two VIs in the folder ,the MainVI is the TimerVI.

Yes, but you should not rename the subVI outside of LabVIEW! Now the main VI is searching for a missing subVI…

 

p.s. - 'I'm a beginner

Yes, with all those subtle "features".

A slightly cleaned-up version:

check.png

(Still misses a small wait in the while loop…)

Again: try to use ElapsedTime instead!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 13
(14,252 Views)