From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

reset timer using an event structure

Solved!
Go to solution

I wrote a simple code to count second and the timer can be reset if I press the 'reset' buttom.

 

It works; however, there are two problems,

 

1. When I start the program, the timer takes 1 second to start

2. When I press the reset buttom, the timer also takes 1 second to respond

 

I believe it is the 1000ms connected to the left corner of the event structure. Is there a better way to overcome this issue? (the timer starts and resets immediately

when I start the program and hit the 'reset' buttom)

 

thank you!!

 

0 Kudos
Message 1 of 4
(2,544 Views)
Solution
Accepted by topic author ivy037

Dear ivy037

 

you could bring the Time Elapsed outside of the event structure as done in the attached code.  Let me know if this is satisfactory.

 

Thanks,

Robert Ward
Applications Engineer, NI
0 Kudos
Message 2 of 4
(2,535 Views)

One small movement, One big change!!

 

🙂

0 Kudos
Message 3 of 4
(2,533 Views)

@ivy037 wrote:

 

I believe it is the 1000ms connected to the left corner of the event structure. Is there a better way to overcome this issue? (the timer starts and resets immediately

when I start the program and hit the 'reset' buttom)

 

thank you!!

 


 

 

Spoiler
stopwatch[1].png

 

0 Kudos
Message 4 of 4
(2,526 Views)