Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Controling Program Flow

Controling Program Flow

Controling Program Flow

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.

RE: Controling Program Flow

If I understand correctly, your stop button is caught in an event. When pressed, this event executes and terminates the while loop that encloses the program.

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

You didn't get it right. The stop button stops a loop that exists inside the event, not the program loop. But don't worry I have already solved this issue by digging a little deeper in the LabView help.
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close