09-01-2008 10:11 PM
Hello,
I'm trying to figure out how to use "events" to help me control an alarm... I can't find a good explanation or tutorial on how to use events... but my application is that, in my program there's a moment where an alarm needs to repeat every 2 seconds until someone hits a "ok" button on my fron panel... my alarm is a wav file and I tried putting this in a while loop with a 2 second timer... but that didn't work... and it felt wrong... so I'm looking towards events to help me with this.
I took the example "New Event Handler" and tried adding my own case to the event structure... my case is linked to an ok button and it just makes an led blink 5 times when it's pressed, but I don't know why after it runs that case the program closes.... and I don't see why for the other cases they have their even button wired inversely to the stop button.... but this doesn't cause the program to stop.
My question: Why does the vi close after running my event case?
the vi is attached, and I'musing LV 8.5
much thanks
M
09-01-2008 11:27 PM
Monse wrote:and I don't see why for the other cases they have their even button wired inversely to the stop button.... but this doesn't cause the program to stop.
My question: Why does the vi close after running my event case?
Yes it does. When the button is hit it will change to 'True' this causes the while loop to end.
Ton
09-01-2008 11:31 PM