LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with event structure

 Hi, I have been trying to solve my code. it has event structures and do not know how to work around. Actually, I have two buttons, the first button start an event when value change, and the second one stops a while loop inside the event when also its value changed. But the problem is, once the first buton is pressed, i cannot press the second button.

 

Please find the attached code.

0 Kudos
Message 1 of 4
(2,572 Views)

SOme points:

 

First the source of you problem is taht the 'Start Event' is configured to lock the FP unitl the event is finished, however since you stall the event with a while loop inside you will never 'finish' the event. To overcome this uncheck the setting 'Lock FP' in the event dialog.

 

Second it is a bad idea to have a while loop inside an event case, try to get the 'End loop' as an event as well.

And let this event finish the main while loop.

 

 

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 4
(2,568 Views)

Hi Thabos,

 

you should deal each control event separately.

 

Please try the vi in attachment and check whether it works.

 

Regards
MY
0 Kudos
Message 3 of 4
(2,567 Views)

thabos

 

also you should look into the example finer and tutorials to help you learn good programming practices such as how to use a event structure.

 

have a good day.

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 4 of 4
(2,561 Views)