LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cancel event

(See my attachment for my code.)
When B1 button is pressed and then run some routine inside while loop,
I would like to receive some event signal from other button(here cancel or any ohter method) to stop the while loop.

In attachment, please note the event of cancel button's value change is used to do something.
In a normal event structure, can I realize this?
Or Do I have to change the design pattern?
0 Kudos
Message 1 of 5
(3,427 Views)
One major problem you have is that for the 'B1' event, you have it set to lock the front panel until the event finishes. Right click on the event and select 'Edit Events Handled by This Case' and change it. It's a checkbox on the bottom. In the 'B1' event, you could also wire the Cancel button straight to the conditional terminal. I don't know why you need a local.
0 Kudos
Message 2 of 5
(3,418 Views)
It is against the spirit of an event structure to prevent it from breathing by stalling it with an inner loop. You can easily use the outer loop for everything by using and manipulating the timeout. Now any other event (e.g. pressing stop) can also react if needed.
 
See attached quick modification. (LabVIEW 8.2). 🙂
0 Kudos
Message 3 of 5
(3,408 Views)
Dear,
 
As you told me, I wanted to update UI event outside loop.
altenbach, would you please give me other example in long execution time on B1 event?
Actually, I want to insert some routine to receive UI event during the while loop in B1 event.
 
0 Kudos
Message 4 of 5
(3,400 Views)
altenbach, sorry..
I understand what are you talking about.., but the timeout was reserved for other periodical routine in 1 sec period.
Any idea for my situation?


메시지가 11-12-2007 12:21 AM에 labmaster에 의해 편집되었음
0 Kudos
Message 5 of 5
(3,392 Views)