LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Not enough memory to complete this operation" message

I have written a VI to acquire analogue data from  Measurement Computing USB_1616HS using their Universal Library ULx VIs. 

 

The main VI (attached) has:

  • A loop ("Loop 1") for the user interface, updating as buttons are clicked.  Once this loop stops, control passes to a timed loop ("Loop 2") that gets data from the USB device, typically every 500 milliseconds, and passes it to a waveform chart.
  • When loop 2 stops, the data is saved.  (As much as possible of the code has been put in separate VIs, but I need all the controls in the same VI so they update properly in their loops).
  • These both sit inside a larger loop ("Loop 0")  so the program then continues and starts loop 1 again ready for a new run.

 

I usually get a message "Not enough memory to complete this operation" quite soon after starting the data acquisition.  The array sizes are all quite small eg 1000*3 - I don't think it is an array allocation problem.  Windows Task manager shows Labview using 200 Mb  (Windows 8, 64 bit, 16 Gb memory).

 

My guess is that it is something to do with the property nodes and the number of controls on the VI but without pinning it down, it's hard to know how to fix it.  Any advice?

 

Thanks

Roger

0 Kudos
Message 1 of 17
(6,037 Views)

It could be some function (e.g. the USB) throwing error 2, which LV thinks is out of memory. This is a perfect case for Highlight execution mode and Retain values; Light the two light bulbs on the toolbar and see what happens. I cant look at the code right now, but i assume you have connected stuff with the error wires?

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 17
(6,021 Views)

Thanks for the suggestion.

 

I've tried putting a simple error handler immediately after the ULx Read VI but it shows no error.

 

The Error message that pops up does not pause execution, so one cannot tell from where it comes!

 

Roger

0 Kudos
Message 3 of 17
(5,992 Views)

Hi Roger, 

 

Following what Yamaeda said, you could still possibly find the point where the error occurs using highlight execution. 

 

Even though the error doesnt stop your execution, highlight execution should slow down your application to the point your should be able to tell what part of the code is executing when the error pops up. 

 

If you could post back letting us know the result of this investigation, that would much appreciated. 

 

Kind regards,

Matt H
Applications Engineer
National Instruments UK
0 Kudos
Message 4 of 17
(5,947 Views)

Hi Matt,

 

It seems to give the message when it sets the plot names for the waveform chart - see attached screenshots.  Hope this helps!

 

Thanks

Roger

Download All
0 Kudos
Message 5 of 17
(5,918 Views)
0 Kudos
Message 6 of 17
(5,912 Views)

Hi Matt & RavensFan

 

Yes, it seems a similar problem.    I would like to think though (since it was a "known problem" in September 2011) that it has now been fixed - the thread does not say if it has or not.

 

I wondered whether it was in any way due to the actual data acquisition VI library so I wrote dummy versions of the ULx VIs that just generate random numbers.   The message still occurs. 

 

I have tried to attach a zip file but I get a message "The contents of the attachment do not match its file type" so instead I have shared the file in my LabView folder on dropbox - the link is:

https://www.dropbox.com/sh/9oqfoqsrcdgpp3l/AADFpNSfRMZEbcEO2TDJybqHa

 

 Unzip "RWM code for debugging.zip" and run  RWM_LAB front panel dummy DAQ.vi

 

(you don't need the data acquisition hardware since the code now generates random numbers instead).  Click on a few of the channel ON buttons, then "Start capture".

 

I'm still very much a novice at LabView so if my code seems truly, deeply horrible - by all means say so!

 

Thanks

Roger

 

 

 

 

0 Kudos
Message 7 of 17
(5,870 Views)

Hi Matt,

 

I've put code to demonstrate the error on dropbox:

 

https://www.dropbox.com/sh/9oqfoqsrcdgpp3l/AADFpNSfRMZEbcEO2TDJybqHa

 

(see following post).   Unzip "RWM code for debugging.zip" and run  RWM_LAB front panel dummy DAQ.vi - hope it works for you!

 

Kind regards

Roger

 

 

0 Kudos
Message 8 of 17
(5,835 Views)

Hi Roger, 

 

I don't seem to be immedietly able to recreate that error. Upon running the program, I enable to first 5 channels, and start a capture. I leave this going for about 10 seconds. stop the capture, and start it up again. If I leave that running, I don't appear to get any error. - Am I doing this right for recreation? 

 

Could you also clarify what version of LabVIEW you are using, and whether or not you are able to try this on another machine? 

 

 

Kind regards,

Matt H
Applications Engineer
National Instruments UK
0 Kudos
Message 9 of 17
(5,808 Views)

Is there a limitation to what characters can be used in a plot name?

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 10 of 17
(5,793 Views)