03-31-2009 02:31 PM
JRaetz wrote:Thanks to everyone responding and trying to help.
I am using LabVIEW 8.6, and I cannot find a Read from SGL File block. I have found through subsequent testing that I can read the file in in 3 separate parts, but only once. After running the file to read it into 3 sub-arrays, if I try to run it again it will produce a memory error again. Shutting down and restarting LabVIEW fixes it again. Monitoring my memory usage, when I can succesfully read into 3 arrays, I jump from ~400MB of used memory to just under 1 GB. The second time, when reading the file does not work, I'm up to 1.2 GB used, of my 2GB available. I don't know if any of that is helpful or not, but I thought I'd add it.
What do you mean by taking a dive into the code for the block? I'm a C programmer who started using LabVIEW 3 months ago, so if I could see what was going on behind the scenes it would help, but I don't know how to do that.
Thanks again,
JR
LV handles memory management behind the scenes but it just doing mallocs and checking to ensure pointers stay in mapped regions.
Take a look at this thread since it was a similar issue.
Ben
03-31-2009 02:55 PM
03-31-2009 03:34 PM
Hi JR,
Just some thoughts:
-Are you displaying your data in arrays on the front panel? This essentially copies the data from the block diagram.
-Use the Request Deallocation function on the block diagram. This will deallocate the VI after it has finished running and reclaim memory for the rest of the program/ next run.
-As others have indicated, processing the data in smaller blocks and removing buffer allocations will be a great help.
-Reading in to 3 sub arrays sounds potentially memory hungry. It depends on what operations/modifications are done on the data.
Hope that helps.
Ruben
03-31-2009 03:40 PM