LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Auto-Timer

Solved!
Go to solution

Attached is a VI that I am working on.  I do not mind having to start the timer automatically but I would really like to have it start when the selected pressure is reached.

 

Once reached, if the pressure drops below the desired pressure, the timer should stop, restart at 0 and start again when the pressure is reached (meaning the timer will only run while the pressure is >= user input and must go for at least 3 minutes to complete.).  As a side note, if I pause the timer manually, time still continues to accumulate and when it is started again it is as if it were never paused.

 

I have tried to work through this with the enegineers but they do not seem to get what I'm talking about.  Any help is appreciated.

0 Kudos
Message 1 of 12
(4,620 Views)
Something like this should get you going.
Tim
GHSP
0 Kudos
Message 2 of 12
(4,602 Views)

I'm sorry, but I didn't notice any difference in the code or functions.  I have tried so many ways to figure this out....

0 Kudos
Message 3 of 12
(4,595 Views)
Solution
Accepted by topic author sterry

If you hit the start test button once the pressure is above the desired pressure it will start counting elapsed time. If thie pressure drops back down it should reset the time.

 

You will have to hit the start test button to get it to prompt for the pressure level. From there it will start evaluating the time. I also changed the slide control to precent done. See the attached code.

Tim
GHSP
0 Kudos
Message 4 of 12
(4,593 Views)
Did this help?
Tim
GHSP
0 Kudos
Message 5 of 12
(4,559 Views)
Wow, that's fantastic.  Thank you.  Since I'm still learning the software this was a bit of a stretch but I see your logic.
0 Kudos
Message 6 of 12
(4,551 Views)
I did notice one mistake. I did not look for the start button to be pushed before I started the counting of the elapsed time. Here is the corrected version.
Tim
GHSP
0 Kudos
Message 7 of 12
(4,547 Views)

By chance, how do you think the best way to only start the timer when the dialog box is complete would be?  The graph going is fine, but the timer should only start when the user has chosen a pressure.  Because as it is, the timer starts when the VI starts and when you do hit Start Test, it just picks up (say at 15 seconds) and starts... but it needs to either start when the test does or at least reset to 0 when the user chooses it.

 

Just some hints would help 🙂  I can probably figure it out

0 Kudos
Message 8 of 12
(4,538 Views)
The last change that I just added fixed that problem. Take a look at that. and here it is again just in chase.
Tim
GHSP
0 Kudos
Message 9 of 12
(4,533 Views)
I did not notice your reply as I was writing mine.  I appreciate it
0 Kudos
Message 10 of 12
(4,522 Views)