I read a good chunk of the latest LabVIEW for Everyone and restructured my program from the ground up. It works just the way I want it to. I haven't worked on it in well over a month, but if I do ever get to work on this project again, there are a couple more minor things I want to add, such as the analysis of my pressure test data and reporting to a file and/or web page. No problem to do.
So check it out and tell me what you think.
Download File:post-6787-1169848555.zip
Unzip, navigate to \...\auto\currently_used and run test_rig_auto_ctrl_3.vi.
It has an interactive UI. The front panel is a tab control and in use I'll have the tabs at the top turned off. Upon running the VI the user is brought to the first tab, "board config", where they can set parameters. Once they're done, they press the "next>" button down at the bottom and they're brought to the "cycle config" tab. Here they can alter the cycle parameters and when they're done they have the choice of going back to board config, going straight to manual control, or starting the automatic cycling of the test rig. On this page they can also set the program to pause on the results page after every cycle of the test rig, or not.
While the program is running, the "running program display" tab is activated and from here, the user can enter the manual mode at any time, and can also change back and forth between the "pause on results page" option. The test rig will usually be running 24/7 without any user watching, so it will usually be set not to pause on the results page.
To make this happen, I stuck a case structure in a while loop (to make a state machine) but I also stuck an event structure in there for doing fun things with. I use it for a couple of purposes. First, whenever I want the program to pause (such as when waiting on the user to enter information into the config pages) I wire a -1 to the timing terminal to cause it to never timeout. Second, I use it to change the flow of the state machine. When you, for instance, press one of the buttons to go to the manual control page, the event case is activated which will feed out the "manual" case constant and a boolean to correctly control the selector whose output feeds into the shift register which carries the case structure's next value.
Anyways, critiques, please? Do keep in mind this is my second labview program (a revision of my first one).