10-10-2006 02:15 PM
10-10-2006 02:26 PM
You are correct, it is getting out of control. Have you considered a 2D array with current state, next state, and the settings for each state. You could control your progam using an Excel spreadsheet that would simplify things greatly. Let me know what you thing of the idea.
I would also write a few subVIs. One for controlling the exhaust that looks like it is always the same bit flipper. A second VI for the valve control. Looks like it is just a waking bit across multiple ports. I would find a way to do this with code and not hard code each value. in the end you need to reduce the number of case structures to make it maintainable.
10-10-2006 02:31 PM
10-10-2006 02:45 PM
Excel was just one of many solutions to your problem. Export the Excel file to a text format, read it from disk, and use it as an input to your program.
Attached is a simple solution for controlling the ports done in LV 8.0. You need to finish it!
10-10-2006 03:04 PM
10-10-2006 03:11 PM
10-10-2006 05:42 PM
10-10-2006 09:23 PM
10-10-2006 10:48 PM
It's an array of SIX FALSE values, one for each LED indicator. The LEDs form an array on the front panel, so we need to update all six values. At each iteration, we start with a template of six OFF values, then one of them is turned on whenever needed to display the appropriate state, using "replace array subset" before the final array reached the indicator terminal.