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
Solution
Accepted by topic author mak49

Hi mak,

 

but i had still problem, when press stop button it stop(pause) in display, but runs in background

Because you use ElapsedTime.

Use your own time counting routine, it's rather easy once you define your needed logic…

 

Why do you need those stacked case structures to calculate day/h/m/s? Why not use some basic math taught in school in the first 4 classes?

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 11 of 16
(1,792 Views)
Thank you for your code, you simplified my program
What type of logic i have to use to rectify my problem
0 Kudos
Message 12 of 16
(1,766 Views)
Solution
Accepted by topic author mak49

Hi mak,

 

you need to define that logic on your own!

 

A good starting point is a flowchart: define your program states (Start, Pause, Stop) and define what should happen in those states. Once you made your mind up you can start to program in LabVIEW…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 13 of 16
(1,764 Views)
Solution
Accepted by topic author mak49

I done some works based on your suggestions... But still i had problems, when i pressed reset button it reset on display, but after sometimes i again pressed start but it start from where i stopped..here i use 'increment-feedback'

 

Before i use elapsed time instead of 'increment-feed back'...then i cant stop the timer,...it runs in background.. When i pressed stop it stopped in display but runs in background Please help me...i need a stop watch, with start/stop and reset button..same function of a digital stop watch

Here i attached my code

0 Kudos
Message 14 of 16
(1,733 Views)
Solution
Accepted by topic author mak49

I'd suggest you watch these videos: http://www.ni.com/tutorial/14554/en/

 

The topic you're tackling is one that's a big part of the CLD exam.  It's important enough to the exam that there are tutorial videos to discuss the topic.

0 Kudos
Message 15 of 16
(1,726 Views)
Solution
Accepted by topic author mak49

What is the purpose of the increment For Loop?  You just keep adding 1 and use that to define your time.  But no where do you define how fast those loops run.

 

Where is your pause functionality? 

 

Your Reset doesn't reset because your are keeping a feedback node inside your one case structure.  You don't need that feedback node because the shift register is going to do that work for you.

 

Try using a state machine architecture like it has been suggested.

0 Kudos
Message 16 of 16
(1,724 Views)