Re: What is the most efficient way of passing large amounts of data through several subVIs?
I have real huge sets of data originating from an image-like (many "pixels") data aquisition that is interpreted according to a similar large set of objects with many properties. This is all fed also through different GUI windows. Before I had this fed into and out of the sub vis via ontrols/indicators as learned. Now I just finished converting into keeping the master set of data in gobal variables and creating a local copy at the entry of the sub VI. Background of this not so common approach is, that once a front panel was open ( as in a user interface happens eventually) the data in the controls/indicators is still using up memory, Whereas since LV 7, I can release local memory like copies of global variables on exit. Of course in a man/machine interface speed is not so essential and timing performance may require a different approach, but my problem was reaching the all terminating limit of 2GB / process. Linux 64 with lots of RAM might have helped otherwise ;-) Gabi
Re: What is the most efficient way of passing large amounts of data through several subVIs?
Hi UHB, I believe the most correct answer is DON'T! Check out the solutions to past LV code challenges at http://www.ni.com/devzone/lvzone/codingchallengearchive.htm. Also check out Dr. VI's articles about moving data. Summarized. Moving large amounts of data takes a long time! It should be avoided wherever possible. This can be done by acting on data in place. When you collect the data, put directly into the object or objects that will be using that data. That way the data gets moved once. From that time forward, you perform in place operations. So... If you want to go faster, do less along the way. Ben http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=261&HRedirected=True&HUserId=101_3529&RFORMNUMBER=6";>Ben Rayner http://volt.ni.com/niwc/common.jsp?page=products_certification_cld&node=10638";> Certified LabVIEW Developer www.DSAutomation.com
What is the most efficient way of passing large amounts of data through several subVIs?
I am acquiring data at a rate of once every 30mS. This data is sorted into clusters with relevant information being grouped together. These clusters are then added to a queue. I have a cluster of queue references to keep track of all the queues. I pass this cluster around to the various sub VIs where I dequeue the data. Is this the most efficient way of moving the data around? I could also use "Obtain Queue" and the queue name to create the reference whenever I need it. Or would it be more efficient to create one large cluster which I pass around? Then I can use unbundle by index to pick off the values I need. This large cluster can have all the values individually or it could be composed of the previously mentioned clusters (ie. a large cluster of clusters).