LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Memory is full

Solved!
Go to solution

I wrote a code having one "for loop" where I had "write to spread sheet file" and it used to take readings and wirte those to a notepad file but there was latency because of gap between reading and writing process (it used to read then write then read and then write and so on).

To avoid this latency (between reading and writing process) I added another "for loop" where I put "write to spread sheet file" so I got two "for loops" now, one to get waveform of data and the other to write that wafeform to spread sheet file. But the code doesn't even write files until it ends taking readings but before that it gives

 

"LabVIEW Memory is full, Not enough memory to complete this operation. The top-level VI "name of the code: was stopped at unknown on the block diagram of "ni DMM Fetch Waveform (waveform data) . vi:1" Refer to the VI Memory Usage topic in the labVIEW Help for suggestions on monitoring and improving VI memory usage"

 

Please guide me how to increase the memory allocated for LabVIEW or how can I read and write files simultaneously without any latency.

I will really appreciate your help.

 

0 Kudos
Message 1 of 19
(20,973 Views)
Solution
Accepted by topic author Shaheen

@Shaheen wrote:

Please guide me how to increase the memory allocated for LabVIEW or how can I read and write files simultaneously without any latency.


 

Obviously you have a dataflow problem. Why don't you show us your VI.

 

Why do you have FOR loops? What is N? What are the loop rates? Ho much data per iteration? Do you have autoindexing output tunnels? Is there a data dependency (wire) between the loops?

 

Typically you would use a producer/consumer architecture. For example, a loop to read data and also place it into a queue and a second loop to read the accumulated queue entries and writes them to a file.

 

Also, to write most efficiently, use low level file IO. Open the file before the loop, write inside the loop, and close the file once the loop is complete.

0 Kudos
Message 2 of 19
(20,967 Views)

Thanks a lot for the comments, I have attached a world file where I took screen shots of my code.

 

This is a producer/consumer loop operation with ques, and let me know if you want me to explain more.

 

Thanks again.

0 Kudos
Message 3 of 19
(20,961 Views)

That is not quite producer/consumer.  Your consumer loop is dependent on the completion of the producer loop because of the wires running between them.

 

For parallel loops, you can't have wires running from one to the other.

0 Kudos
Message 4 of 19
(20,939 Views)

Then how should I pass those wires to the consumer loop?

 

Because there is no option in Enqueue Element to take my actual number and then pass it as it is to the Dequeue Element. In "Enqueue Element" the input (blue wire) is different then the output (green wire).

 

 

 

 

 

 

0 Kudos
Message 5 of 19
(20,934 Views)

I don't know what output green wire you are referring to.

 

Right now your queue is set up to to pass a waveform datatype.  You have a blue integer wire, a pink string wire, and a green path wire joining the two loops.  Are those all data that is associate with each piece of waveform data you are enqueuing now?

 

I doubt the pink wire is.  It isn't even originating in the producer loop.  It looks just like header information that just passes through the producer loop.

 

If the blue integer and green path wires are important data that is directly related to the waveform, you need to enqueue those as well.  What you need to do is create cluster that contains the waveform data you have now, and also an integer and a path.  In your producer loop, bundle those three pieces of data together.  Then you unbundle them out of the dequeue element function and do what you need to with them.

 

It is very odd to have a For Loop to be your loop for the consumer.  Dennis already asked why you are using For Loops instead of while loops.  There is some logic to it in your producer since you are trying to run that a fixed number of times.  But the consumer loop being a For Loop is very unusual.

 

By the way, I don't see anywhere in your code where you are destroying the queue when you are done with it before the program ends.

0 Kudos
Message 6 of 19
(20,929 Views)

Images are useless. Attach the actual VI.

0 Kudos
Message 7 of 19
(20,920 Views)

Shaheen,

 

Please attach your VI's that you are using so that we may further help you solve this issue.

 

Thank you,

Renee

Regards,

Renée M
Applications Engineer
National Instruments
0 Kudos
Message 8 of 19
(20,878 Views)

Hi all,

 

Thanks a lot to all of you for the help,

 

I have made some changes according to your (Ravens Fan) guide lines, but I am stuck at Dequeue Element in consumer loop. The output of Dequeue Element (in Consumer loop) is Variant and it is shows broken wire when I connect it to Unbundle. I made a bundle of file path (green wire), actual number (blue wire) and waveform in producer loop and then it became a cluster which is going into the Enqueue Element. I am expecting cluster out put from Dequeue Element that I can unbundle it.

 

I have attached the VI’s that you can look at them and help me please.

I really appreciated your time.

 

Best Regards,

Shaheen.

0 Kudos
Message 9 of 19
(20,859 Views)

Shaheen,

 

a variant is not a cluster. So if you hover the mouse pointer above the broken wire and display the context help (Ctrl + h), you should see a hint for this.

Using variant datatype, you have to "unpack" the actual datatype using "Variant to Data". You have to connect the dataype you want to cast into, so in your case the cluster (a prototype, not necessarily with "valid" data). After this, you can use "Unbundle" on the cast data cluster. You should preferrable use "Unbundle by Name"....

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 10 of 19
(20,856 Views)