09-30-2019 10:12 AM
Hello gents, as I am new to Labview I wanna ask to someone more expert how can i improve my VI (attached here). I can run my VI one time straight without any problem but the second time i run my VI, it gives me a not enough memory problem (I know i have a lot of waveforms but i cannot avoid that), any advice on how to solve this??
Thank you in advance for any reply.
Solved! Go to Solution.
09-30-2019 10:55 AM - last edited on 11-07-2024 03:19 PM by Content Cleaner
So looking at your VI, I'm going to take a brief shot in the dark and say that your problem is related to uninitialized Shift Registers.
When you don't connect a value to the left (outside edge) of the Shift Register, then it remembers the value from the previous run and uses that for its starting value.
In your case, that may be causing your problem (I certainly expect it's not what you want, it looks like it will produce invalid results).
You can correct this by connecting a valid initial value to the left outside edge of the Shift Registers (like 0).
09-30-2019 11:08 AM
The first main issue I see is you need to initialize your shift registers. Leaving them uninitialized and they will retain the last value of the previous run. Likely not your memory issue, but still something that needs corrected.
09-30-2019 11:08 AM
Which function gives you out of memory? (Channel read?)
You can significantly improve your memory footprint by eliminating all express VIs and dynamic data. Seems like very light processing of your waveforms that could be done much simpler. How many points are in your graphs? What is dt?
09-30-2019 11:54 AM
I deal with waveforms of millions of samples. I cannot avoid them. These waveforms come from high resolution measurements.
So I can work just with dynamic data types or with arrays of waveforms.
dt is the time step associated to the running waveform.
09-30-2019 11:59 AM
10-01-2019 02:13 AM
My dt value is 10 ns. Thanks.
10-01-2019 05:16 AM
Hello everybody,
this is my problem: in the attached VI everything works fine only if the Highlight Execution is activated. As soon as I try to run this VI without it, the usual error occurs: not enough memory.
Sequence and timing are my attempts to improve the VI in order to solve the problem, but it seems strange to me that it works only with Highlight Execution smoothly.
It seems that with the Highlight Ex. ON the VI has all the time needed to do its task, is this a timing problem perhaps or too many processes in parallel working?
I know that you can't see my subVIs, but the problem seems to be on the palette named "Extract Portion of Signal4".
Thanks for the help, Edmond.
10-01-2019 06:49 AM - last edited on 11-07-2024 03:19 PM by Content Cleaner
It's not immediately obvious to me why the Extract Portion of Signal Express Node would be causing you problems, but you could try replacing it with the Get Waveform Subset VI that is used inside of the Express Node.
That will also prevent you needing to convert from Dynamic Data Type (DDT) back to waveform immediately after. Perhaps some of these conversions back and forth and requiring copies of the memory block.
If you want to see what an Express Node is doing, you can right click on it and choose "Open Front Panel". This will (via a couple of prompts) convert it to a standard subVI, which you can then open and inspect.
10-02-2019 04:30 AM - last edited on 11-07-2024 03:19 PM by Content Cleaner
With the Get Waveform Subset VI instead of the Extract Portion of Signal Express Node, all the memory troubles are solved. Thank you very much!