04-07-2015 08:58 AM
Hi,
I try to create a timer with a pause, a reset and a stop button but it doesn't work. I did some research and found a timer vi that can start, stop, pause but not reset. That vi uses the vi express Elapsed time wich allows to reset and reset automatically the timer with a boolean constant (or button) . My timer can pause only when reset and reset automatically are set at true.Has anybody have an idea of how I can improve my code in order to have a vi that behaves like a chronometer (a vi that can pause, stop and reset)? My vi is in the link below.
Thank you
04-07-2015 09:25 AM
https://decibel.ni.com/content/thread/11393?tstart=0
04-07-2015 09:35 AM - edited 04-07-2015 09:42 AM
FunctionalGlobalVariable is the good way, and you can extend its funcionality as you need, like to have separate functions, and reading different states. So it can be very flexible inside a main VI, you can call it from different places, without causing race conditions. Have a look at this solution, but of course usually you just need something much simpler FGV for your application...
edit: just to note it, in the above post community example, it is not elegant (neither efficient) to put connector pane controls and indicators inside a case structure (for example in a CLD exam you get point deduction for that! 🙂 ).