Controling Program Flow
Controling Program Flow
(OP)
I have a front panel with 5 buttons and one combobox and some graph indicators.
In the block diagram I have the Event structures for 4 of the buttons and the combobox. The 5th button (let's call him the Stop Button) is a while loop stop control inside one of the events (let's call this event of the Start Button Event).
So, for better clearence of data: The Start Button event contain the Stop Button which is a While loop stop control.
I've placed the event structures along with the buttons controls inside a while loop (that involves the hole block diagram) not for the program to exit unless the user says so.
But after I run Start Button Event and then press the Stop Button, the other events stop responding as if the application where still executing the Start Event.
Maybe the problem is in involving events in a while loop. Is there another way I can keep the program from closing so that it will always be waiting for the events?
Or is there something else I'm not seeing here? I've tried to describe the problem as best as I can.
Any suggestions will be appreciated.
In the block diagram I have the Event structures for 4 of the buttons and the combobox. The 5th button (let's call him the Stop Button) is a while loop stop control inside one of the events (let's call this event of the Start Button Event).
So, for better clearence of data: The Start Button event contain the Stop Button which is a While loop stop control.
I've placed the event structures along with the buttons controls inside a while loop (that involves the hole block diagram) not for the program to exit unless the user says so.
But after I run Start Button Event and then press the Stop Button, the other events stop responding as if the application where still executing the Start Event.
Maybe the problem is in involving events in a while loop. Is there another way I can keep the program from closing so that it will always be waiting for the events?
Or is there something else I'm not seeing here? I've tried to describe the problem as best as I can.
Any suggestions will be appreciated.





RE: Controling Program Flow
Thus if you press the stop button, the program will stop running and no more events will be caught. This is correct operation. Do not press the stop button until you are ready to terminate the program.
Wheels within wheels / In a spiral array
A pattern so grand / And complex
Time after time / We lose sight of the way
Our causes can't see / Their effects.
RE: Controling Program Flow
The problem was that I had more than one event structure inside the program loop.
The definition of a loop is to repeat after all the commands are exectued until a certain condition.
Considering instead of commands, events, LabView will not reiterate the loop until all events are executed. That's logic, but was not so clearly visible to me before. So I put all the event handling routines inside different case of the same event structure and placed this one event structure inside a program loop. Now it works fine.
Thanks for all your help, I know I posted a lot a questions, but in the beggining one has lots of doubts, right? Really thank you.