07-18-2019 07:49 AM
Hello all,
I have run into a spot of bother with one of my VIs...
Anytime I edit my VIs block diagram memory usage as viewed in task manager increases by approx 200MB until i get an error message stating there is not enough memory to complete this operation (in task manager LabVIEW is show to be using 3.3 GB of memory!).
The VI isn't even running it is when I am editing!!
My version of LabVIEW is LabVIEW 13.0.1f5 running on a Dell Inspiron-17 i5 CPU with 8GB Ram Windows 10 Home.
I have attached a few images showing memory usage increasing as I place an Add function to the block diagram.
I am pulling my hair out trying to work out what is going on? Has anyone come across anything like this before??
Thanks for looking!
Iain
Solved! Go to Solution.
07-18-2019 09:17 AM
Does the same thing happen with a new, empty VI? If so, I would say you need to reinstall LabVIEW. If not, I suspect something in your VI is corrupt. I see some sort of toolkit is being used. Maybe one of those VIs is corrupt. You could try deleting those and see what happens. You might also try recreating the VI.
07-18-2019 09:46 AM
Hello,
A new VI doesn't appear to have the problem. I have been trying to systematically remove sub VIs from the main VI but that is proving to be quite difficult as deleting wires/sub VIs causes the memory usage to shoot through the roof and I quickly get the out of memory error.
I don't particularly want to have to rebuild the VI from scratch, but maybe i'll have to if i can't find the offending article!
07-18-2019 10:13 AM
What are you ultimately trying to do here? Is the project you working in a project? If so you can simply do a save as and save the vi structure to a new location. This will take all of the relevant vi's to the new location. This will get rid of any vi's that you are no longer using or have no callers. You need to be a little cautious thought. There may be vi's that are used but are called dynamically.
Just a thought.
07-18-2019 10:18 AM
I have literally just found the offending item....
I have a waveform chart and when I deleted that saved/re-opened the VI the memory usage had dropped right down to 200MB with no discernible increase when editing the block diagram.
I will have to look into why my chart was causing this issue. maybe it holds on to it's data if it's not re-initialised when the VI loads/runs?!
07-18-2019 10:24 AM
What was the size of the chart history and how many traces does it have?
07-18-2019 10:33 AM
Hello,
The chart has only one plot and using the property node History Data for the chart wired to an array the array is empty when the VI is run.
07-18-2019 10:38 AM
@Goomba79 wrote:The chart has only one plot and using the property node History Data for the chart wired to an array the array is empty when the VI is run.
That just clears the history. You can only configure the history size at edit time (right-click..chart history length (default is 1024)) and it determines how much memory gets allocated to for the history data, cleared or not.
What is the datatype? (scalar, waveform, dynamic, etc.)
07-18-2019 10:41 AM
Overall, your code scares me. 😮 [Event structure inside case structure inside while loop inside case structure inside while loop] is just not something I would probably do. I am sure there is a better way.
07-22-2019 03:03 AM
Hello,
Apologies for my slow response. I had a long weekend and am not allowed to take my work laptop off site!
I have set the chart history length to the lowest possible value (10) as I do not need to keep a history of the data that is being displayed.
The datatype that I am displaying are U16 values produced by an A to D converter on a radio receiver I read over an SPI link.
Thanks,
Iain