03-23-2018 08:44 PM - edited 03-23-2018 08:47 PM
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!!!
Solved! Go to Solution.
03-23-2018 11:33 PM - edited 03-23-2018 11:38 PM
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.
03-26-2018 01:13 PM
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.
03-27-2018 02:01 AM
Move the Time Elapsed outside the Case and add a check for False to True transition which you wire to "reset".
/Y