Multiple event structures can cause lots of trouble. In your case, I recommend using a single event structure to capture your front panel events. You can leave your simple state machine structure alone and put the event structure in a "wait" case, or get fancy and use a queued state machine. I like the queued state machine approach for large applications since I can command a VI to execute a particular state from within a subVI or asyncronous top-level VI. With the queued state machine, I like to place the event structure in its own while loop with the queue reference wired in to it. When a particular event fires, the event case can put a state on the queue.
Since you are diving in to a large application, it may be well worth your while to hire an Allian
ce Member to help you for a few days. We can get you started on the correct path very quickly and you will have some solid code to which you can refer.
We do this stuff every day.
Daniel L. Press
PrimeTest Corp.
www.primetest.com