I can't seem to get my VI to fully stop, so that I can go on to do some more things in the program. I am trying to progmatically stop the vi (pictured below), so that I can return to my main gui (not pictured). The main gui just consists of a login, exit test system, and run test. Once the user presses run test, the vi pictured below opens.
I am using a producer/consumer architecture with a state machine. The problem I run into is that when I press the "Main Menu" button, it should close the pictured vi and return to the main gui. I tried using the vi server, and when the user presses the Main Menu button, it fires an event and then it goes to the Stop state in the consumer loop, which opens a reference to the vi's (one for the strip chart vi and another for the gage vi), closes the front panel using an invoke node and then closing the reference. I also tried adding in the abort vi method after the close front panel and it still gave me the same result.
Here is the catch, it does close the vi's, but it does not stop the while loops (producer and consumer), or it stops only one of the loops. I thought of putting in a constant in the event structure for when the Main Menu event is fired, but that will stop the producer loop before the consumer loop reveices the info to go to the stop state, so the consumer loop does not end.
I also tried a "dummy" control that was connected to the comsumer loop Stop terminal (for the while loop), and then progmatically changed the value in the stop case to true and then read that value in the producer loop to, hopefully, stop both loops, but it did not work either.
I am sure that it is something so stuipidly simple that I cant see it right now
Kenny
Kenny