From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stop watch

Solved!
Go to solution
Im trying built a stop watch for my program. I want to built a stop watch with start, stop(pause) and reset button, but dont affect main program, i want to display watch as seconds, minutes, hours and days(all are in seperate numeric indicator, im using LabVIEW 2013...please help me...
0 Kudos
Message 1 of 16
(4,837 Views)

Hi mak,

 

I'm trying built a stop watch for my program.

What have you tried so far?

 

I want to built a stop watch with start, stop(pause) and reset button

That request comes up very often. Sounds like homework to me…

 

but dont affect main program

Use a parallel loop…

 

i want to display watch as seconds, minutes, hours and days(all are in seperate numeric indicator

When you need seperate indicators some additional math is involved. But it's just some very basic math and easy to program…

 

please help me...

Show what you have done so far. Ask for specific problems and we will answer your questions.

No one will do your homework for you!

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 16
(4,831 Views)
Thank you for your reply...i done some work...like using elapsed time, i use elepsed time(s) as input for a sub vi (which convert seconds to days- hours - minute- second formate)
0 Kudos
Message 3 of 16
(4,816 Views)
But how can i use start button....after running main program i want to manage (stop/start/reset) stop watch
0 Kudos
Message 4 of 16
(4,810 Views)

I would never ask a mechanic to fix my car without bringing my car to him.  Please post some code so we can help.

Message 5 of 16
(4,797 Views)

I know I shouldn't but here is an idea of what you could do. It only handles seconds though. You'll have to try to convert them in hours and days on your own, and as long as you try the community will help I'm sure.

0 Kudos
Message 6 of 16
(4,779 Views)

I think it is fine providing solutions to a user.  Some times seeing how others do it helps understand different ways of doing it.  But you mentioned needing to do math to display minutes and hours, but all you need to do is change the display format of the indicator.  Attached is an updated version.

0 Kudos
Message 7 of 16
(4,770 Views)

Nice. In my haste I didn't think of that.

0 Kudos
Message 8 of 16
(4,760 Views)
Thank you for your help, i done some work but i had still problem, when press stop button it stop(pause) in display, but runs in background, Example: Current time 34s and i pressed 'stop' button it shows '34' After 10 second i pressed 'start' button again, then it Start from 44 s instead of 34 s Please help me Here i attach my program
0 Kudos
Message 9 of 16
(4,713 Views)

Here my program

0 Kudos
Message 10 of 16
(4,707 Views)