Basically you first break all dataflow by using local variables, then you stack sequences waist deep to force dataflow. In addition, you force dataflow where it is not even needed, e.g. for parsing various parts of a string. It is completely irrelevant in what order these occur.
This is not in the spirit of LabVIEW and you are well advised to carefully read the LabVIEW style guide.
All your local variables create extra data copies. In addition you create extra data copies because your VI is peppered with coercion dots. Sometimes the array is DBL, sometimes SGL, some subVIS want I16, but you feed it I32, etc.
Still, I cannot see how this subVI causes your memory problems unless your arrays get very big. How big do they get?
Attached is a quick modification and cleanup of your "OPM Processed Sample Scan with OSNR A.vi", NO local and NO sequences! Currently, it only outpus data for values that are actually read during the call. (You return stale values on some terminals, depending on the "command"). If you want to retain that functionality, place all the output terminals inside cases and update them only if new data arrives.
I also don't like these millions of connectors on the connector pane. Maybe you can reduce your data to a few logically picked clusters.
Message Edited by altenbach on 03-31-2006 02:16 PM