07-17-2007 03:52 PM
07-17-2007 05:16 PM - edited 07-17-2007 05:16 PM
Message Edited by smercurio_fc on 07-17-2007 05:16 PM
07-18-2007 09:02 PM
07-18-2007 11:41 PM - edited 07-18-2007 11:41 PM
I get dizzy just looking at all these local variables. Many are just substitute for the disconnected terminals. Why not wire directly to the terminals???
One thing I don't understand are all these "request deallocation" everywhere.
I feel that you have simply way too much code fragmentation, leading to subVIs with way too many connectors. Wouldn't it be more reasonable to e.g. combine all these array into a reasonable structure? For most subVIs, it would be sufficient to have a single SGL, a single boolean, and a single channel array as inputs. I probably would even use 2D arrays, one dimension being the parameters and one the setup#.
You have all these disconnected "code islands" with no control over execution order. You should at least ensure that the initializations below the main loop happen before the loop starts.
There are way too many duplicates to maintain on the FP. Your three tabs are identical siblings. All you probably need is a single set of control and indicators and an unfinitely thin tab control above it. Maintain all chart histories in shift registers and use plain waveform graphs. Also keep everything else in shift registers. Changing the fake tab, would then simply switch the dataset to be currently displayed, always in the SAME set of indicators.
One of the most confusing and error-prone "feature" is your use of duplicate terminal names. This, in combination with the use of local variables makes the code completely unmaintainable. In the code fragment below, we see two terminals and two local variables, all called "2 - Temp(c)" How do you keep track of all these??? (The same problem re-occurs numerous times in other places!!). Ben would probably say that you are trying to herd cats here.
Well, enough for now. The above should get you started.
Message Edited by altenbach on 07-18-2007 09:43 PM
07-19-2007 09:01 AM - edited 07-19-2007 09:01 AM
Message Edited by smercurio_fc on 07-19-2007 09:04 AM
07-19-2007 02:33 PM