LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to pass large amounts of data to subroutines?

Hi Zorro,

 

Yes that sounds correct.

Suggestion:

All of the "Gold bar" contributors here are volunteers. We work as a team because we can not always get back to a thread in a timely fashion. To get the most out of us, keep posting new version of your code so whoever happen to be available at the time can help out without having to go back to the begining of the thread, la la la.

You also may want to start a new thread asking how to bench-mark the performance of your code snippets to support your work.

Have fun!

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 21 of 25
(1,224 Views)
Thank you!
0 Kudos
Message 22 of 25
(1,220 Views)
Here's the latest copy of my code.  I changed the FGV to dump in the whole array from the DaqMX instead of each single element.  I ran the loop for 50 seconds and only had 14 late iterations.  Is there anything else I could do to make this code more efficient?

Message Edited by zorro349 on 02-07-2007 08:05 AM

0 Kudos
Message 23 of 25
(1,219 Views)

In conclusion, With the help of Greg, I realized I was using "Insert Into Array" instead of "Subset of Array" in my FGV Vi's..  Ahaha, no wonder they were slow.  Everytime I tried to write to the FGV i was redimensioning my arrays, which is slow when dealing w/ 1mS loops.  Thank you all for your help.

 

Message Edited by zorro349 on 02-07-2007 09:50 AM

0 Kudos
Message 24 of 25
(1,202 Views)
A single-element queue is a queue which is limited to having one entry.  Internally, that makes the queue reference a pointer (although a very safe one, since you can't dereference it to zero and crash your program).  I have attached a LV7.0 version of a single element queue object.  In this case, the object is a cluster with a single boolean.  In your case, the object would be 900 variables.  You can split these up into multiple clusters and multiple objects, or you can make one giant object with an array of 900 elements.  It is really up to you.  Change the "object" by changing the Data control in the Controls folder.  If you are unfamiliar with strict typedef controls, remember to Apply Changes from the File menu if any of the other code is open.  You may also need to Apply Changes from the DataRef.
0 Kudos
Message 25 of 25
(1,176 Views)