12-14-2016 04:48 PM
Hi folks-
I'm a Labview newbie and I'm having trouble find the best solution to this problem: I have an Elapsed Time Express VI which I'm controling with a button (T means start, F means stop). The user can stop the timer at any time by setting the control button to F. I would like the button to automatically show F again if the timer expires before the user manually stops the timer. What LV coding mechanisms should I use to accomplish this behavior?
I've tried using the button value property node driven by my timer-running boolean but it sets the button to one state or the other all the time. It's state driven. I need a command driven design, specifically, send a command to the button to reset when the timer expires. I'm such a newbie that I don't even know what terms to look up. Please help.
Thanks - John Speth
Solved! Go to Solution.
12-14-2016 05:23 PM
(I'm the OP.) I stumbled upon a solution but I'd sure like someobdy to explain why it works. My solution is this:
1. Create a local variable that points to the button I want to reset
2. Wire the local variable to the timer-running boolean
Testing shows it works but I dunno why. Can someone please enlighten me?
12-14-2016 05:28 PM
12-14-2016 05:34 PM
Think this is what you were requesting.
12-14-2016 05:37 PM
Thanks, Hatef. I should have done that.
Here's a screen shot of my timer VI. It is the code in the SysRsrcTimer VI shown after this image.
Here's a screen shot of my code that uses the local variable. It's only a small part of the app but it covers the discussion topic.
12-14-2016 05:42 PM
Thanks for the VI Matt. I can see that it's an elegant solution. One question: Is the shift register bounding the works an essential part of your solution? I'm not that familiar with shift registers.
12-15-2016 11:01 AM - edited 12-15-2016 11:02 AM
A shift register is a feedback node that holds the previous state. This is slightly different version but may be easier to understand.