10-27-2022 08:08 AM
Dear Labview community,
It has to be mentioned thatI am still a beginner while working with labview so please be lenient in case of silly mistakes.
My current task was to create program for a force displacement measurement with in total 6 channels. The duration of a standard test is around 11 days at a sample rate of 10 Hz.
Generally, the program works fine but after approx. 2 days the program displays an error that says "Not enough memory to complete this operation". My first encounter to the problem was that a created a while loop that empties the data puffer after a certain number of cycles or loop iterations. Unfortunately, that didn't help and now I have no further idea how to approach the problem.
I attached on overview of the block diagram. I would be thankful for a hint how to target my problem.
My labview version is 2021.
10-27-2022 08:18 AM
Hi JaTie,
@JaTie21 wrote:
I attached on overview of the block diagram. I would be thankful for a hint how to target my problem.
Generic answer: attaching an image showing just a small part of your program does not allow us to edit/debug/run your VI using LabVIEW. Helping is quite limited with that prerequisite…
@JaTie21 wrote:
My current task was to create program for a force displacement measurement with in total 6 channels. The duration of a standard test is around 11 days at a sample rate of 10 Hz.
Generally, the program works fine but after approx. 2 days the program displays an error that says "Not enough memory to complete this operation". My first encounter to the problem was that a created a while loop that empties the data puffer after a certain number of cycles or loop iterations. Unfortunately, that didn't help and now I have no further idea how to approach the problem.
Somehow somewhere your program uses too much memory!
"6 ch * 10 S/s * 8 bytes/S * 11 d * 86400 s/d" = 456192000 bytes ~= 435MB. I hope your program does not try to hold the whole data in memory while trying to build up arrays using BuildArray or InsertIntoArray…
One problem might be charts showing a large number of waveforms. Even when you name them "graph" these still are "charts" with their own memory buffer…
10-27-2022 08:32 AM
@GerdW wrote:
Hi JaTie,
@JaTie21 wrote:
I attached on overview of the block diagram. I would be thankful for a hint how to target my problem.
Generic answer: attaching an image showing just a small part of your program does not allow us to edit/debug/run your VI using LabVIEW. Helping is quite limited with that prerequisite…
@JaTie21 wrote:
My current task was to create program for a force displacement measurement with in total 6 channels. The duration of a standard test is around 11 days at a sample rate of 10 Hz.
Generally, the program works fine but after approx. 2 days the program displays an error that says "Not enough memory to complete this operation". My first encounter to the problem was that a created a while loop that empties the data puffer after a certain number of cycles or loop iterations. Unfortunately, that didn't help and now I have no further idea how to approach the problem.
Somehow somewhere your program uses too much memory!
"6 ch * 10 S/s * 8 bytes/S * 11 d * 86400 s/d" = 456192000 bytes ~= 435MB. I hope your program does not try to hold the whole data in memory while trying to build up arrays using BuildArray or InsertIntoArray…
One problem might be charts showing a large number of waveforms. Even when you name them "graph" these still are "charts" with their own memory buffer…
First of all thank you for your quick response. Now, I attached the full VI and added the "stream TDMS" subvi.
I think that I don't store the full data set somewhere in the memory because therefore I used the "stream into TDMS" Vi's.
Do you think that I should use a different way to display my waveform graphs?
10-27-2022 09:03 PM
Have you checked the MeasurementData queue backlog?
10-28-2022 12:03 AM
@zou wrote:
Have you checked the MeasurementData queue backlog?
Can you roughly tell me how I can do that, please?
10-28-2022 02:08 AM
I also would be glad to know something about backlog.
As an advice about memory usage - check whether 6 digits precision is enough for you and transfer all data types from DBL to SGL datatype, or, in case of DAQmx card even FXP (cant open your main.vi because of earlier LV version). It will strongly reduce memory usage.
10-28-2022 09:39 AM
Get Queue Status will return # of elements in the queue.
If you enqueue faster than dequeue, then you will have backlog in the queue.
LabVIEW will try to allocate more and more memory to hold the data in the queue.