09-18-2018 12:43 PM
Hi all,
I'm preparing for my CLD and I'm learning that I have a lot of trouble around making a nonblocking timer for my applications. Currently, I make my timers like this:
Is there a better/more intuitive way to make a timer with reset and pause? I've tried using the elapsed time VI, but I can't ever seem to make it work correctly.
09-18-2018 01:08 PM
For starters you have far too many calls to Get Time. Each call will be have a different value which will make tracking your time difficult. You could also use an event loop to do your timing. This timer would run in parallel to your task and would send a message that the time has expired.
Here is some code that works.
09-18-2018 02:45 PM
09-18-2018 04:58 PM - edited 09-18-2018 05:00 PM
It appears to be functional.
What I posted early is a variation of the Elapsed Time that ships with LabVIEW. You can drop the express VI and convert it to a subVI. From there you can add the pause.
09-19-2018 11:39 AM
@Mark_Yedinak wrote:
It appears to be functional.
What I posted early is a variation of the Elapsed Time that ships with LabVIEW. You can drop the express VI and convert it to a subVI. From there you can add the pause.
How do I convert it into a sub vi I can edit? I drop the express vi -> open front panel -> convert to sub vi. but then it opens up with a clone of subElapsedTime.vi which I can't edit
09-19-2018 03:38 PM
@ATE-EGNE wrote:
@Mark_Yedinak wrote:
It appears to be functional.
What I posted early is a variation of the Elapsed Time that ships with LabVIEW. You can drop the express VI and convert it to a subVI. From there you can add the pause.
How do I convert it into a sub vi I can edit? I drop the express vi -> open front panel -> convert to sub vi. but then it opens up with a clone of subElapsedTime.vi which I can't edit
Just double click on what looks like the property node. It opens the subVI. From there you can save it and edit it.