03-31-2016 11:03 AM - edited 03-31-2016 11:09 AM
Solved! Go to Solution.
03-31-2016 11:08 AM - edited 03-31-2016 11:09 AM
Limit the size of the array by trimming it to a maximum size (e.g. 1000/10000/100000 elements). To avoid the CPU usage / slowdown of dynamically allocating memory, you should also preallocate the array and then index in the individual elements (or keep track of the last element).
Something like this: https://decibel.ni.com/content/docs/DOC-3734
03-31-2016 11:26 AM
What! are we playing "Jeopardy" now?
<Reported to Moderator> we should consider un-editing that post or the thread makes no sence!
03-31-2016 01:51 PM
@JÞB wrote:What! are we playing "Jeopardy" now?
I'll take F words for 500.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-31-2016 01:57 PM
03-31-2016 02:25 PM
Well if nothing else, this thread has helped in creating another bullet point on the Unofficial Forum Guidelines. Maybe it is a bit long winded.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-31-2016 02:28 PM
03-31-2016 02:50 PM - edited 03-31-2016 02:51 PM
Thanks to Google and its cache, here is what it said:
I have this set up in my VI , which populates an array from 2 serial ports and displays the array to graph. I understand that my array is growing forever and i get slow downs over time, but I cannot seem to find the solution to this problem. All the commetns just say this is a bad bad idea, but none offer the solution.
I am following this example and have the serial reads populating the array input:
https://decibel.ni.com/content/docs/DOC-6604
04-01-2016 04:27 AM
The question was about building an array inside a loop, that someone had mentioned that it causes problems (CPU / memory leak) but that no-one had provided any information on how to solve it - so I gave some examples.