LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using events to recognize a clicked front panel button

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

0 Kudos
Message 1 of 3
(2,489 Views)

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

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 3
(2,476 Views)
Ahhh... much thanks
0 Kudos
Message 3 of 3
(2,475 Views)