11-13-2009 11:46 PM
Hi there,
I am a little stuck. What I am trying to do is start a timer when I push a button (which will play a sound aswell), and then compare the time to some calibration, and if the time exceeds the cal, start the timer over (and so on and so forth). When I try to use my comparison boolean result as an input to my event structure, it doesn't work. I probed each point and it looks like it latches after it gets into the event structure.
Does anyone have any suggestions? VI attached.
Thank you!
Crystal
11-13-2009 11:59 PM
I don't understand what you are trying to do. What "latches after it gets into the event structure"?
Why is the boolean in a feedback node?
Note that the timer can only restart when the button has been pressed, because the code that puts a new value of the timer into the shift register occurs in the Boolean x>y value change event. That event case only executes when the button has been pressed.
Do you want the case also to execute when the indicator light x>y? goes true? Then you need to write to the Value signalling property node of the indicator instead of the indicator terminal. Note this would wind up causing the Button, x>y event to fire on every iteration of the while loop because you would be writing to the property node on every iteration of the while loop.
11-14-2009 02:10 AM
11-14-2009 02:13 AM
Your specifications are incomplete, because you don't say what should happen if "stop timer" is pressed.
As Ravens already said, events are for user interactions and are not triggered by changes in indicators. Do you want the sould to play whenever the timer starts over?
Here's a quick draft how you could do things differently (LV2009). Maybe it gives you some ideas. Modify as needed.
11-14-2009 02:16 AM
cnassouri wrote:
Hi, I think I am going about this wrong. I'd like to delete this post and start a new thread..Is deletion by admins only?
You cannot delete posts.
This thread is just fine to continue the discussion, no need to start a new thread unless you want to discuss something else.