LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resetting Elapsed Time VI

Solved!
Go to solution

Hello everyone,

 

I am using a using the Elapsed Time VI to log time. I have the VI inside a case structure and when the structure is True it saves the elapsed time in an array. This issue I am having is resetting the Elapsed Time VI. I want the elapsed time to reset every time the case structure switches from False to True. When the case structure is False instead of stopping and resetting the  Elapsed Time VI, it keeps counting.  I tried using the Auto Reset and Reset inputs on the VI, but it saves only the number zero. I am pretty sure I am using the Auto Reset and Reset inputs incorrectly.

 

Down below is a screen clipping of my code and an example of the time logging issue. 

 

Any information would be appreciated!!!

 

Elapsed Time.png

 

 

Time.png

0 Kudos
Message 1 of 4
(5,288 Views)
Solution
Accepted by topic author KurtzC1

You can use "boolean crossing ptbypt" on the wire going to the case selector and wire the output to the reset of the timer whenever it just switched from false to true, but not if it is already true,

 

Your image is too truncated to comment more on the code.

Message 2 of 4
(5,279 Views)

Reset will set the timer back to zero. So you should have this input be "true" when your condition is met, and "false" otherwise.

 

Auto reset will reset back to zero when the target time is reached. So if you leave the target time unwired, then it will use 1 second and reset after that.

Message 3 of 4
(5,213 Views)

Move the Time Elapsed outside the Case and add a check for False to True transition which you wire to "reset".

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 4 of 4
(5,189 Views)