Not enough memory to complete operation when writing TDMS file.

Hello,
   I am new to Labview and having a bit of trouble. I attach some code here. What I want to do is sample from a NI 9220 DAQ from 16 channels at 20kHz, while from a second NI 6009 sample from 4 channels at 1000 kHz. I want to append these together and then write to a TDMS file. 
   I have tried to write this code using NIDAQmx VIs but when I have it has resulted in the two DAQs not having the right timing with each other. The 6009 samples for a longer time. 
   I have now tried instead to use the DAQ assistant to read from the two VIs and it works in that TDMS files produced have the correct timing between the two DAQS. However, if I record for more than 2 minutes, in the end I want to end up recording for a much longer time, I have the "Not enough memory to complete operation" message appearing. This still happens even if I get rid of my charts to display the data, and also if I get rid of the NI 6009 completely and just keep the 9220 sampling at 20kHz. It happens even if I repalde my TDMS write and put a write measurement assistant in which I tell it to write a series of files that are each less than 2 minutes long. 
    I think it is something to do with the amount of data I am reading and is being held in memory. What can I do about this? Also, my charts display very slowly, basically evey second when the 20k are read in. However if I lower the amount of data read the charts don't display all the data points. 
    I attach my code, thanks for your help!
    Alfredo 
Attachments:
03_02_15.vi ‏688 KB

alfredog wrote:
Hello,
   I am new to Labview and having a bit of trouble. I attach some code here. What I want to do is sample from a NI 9220 DAQ from 16 channels at 20kHz, while from a second NI 6009 sample from 4 channels at 1000 kHz. I want to append these together and then write to a TDMS file. 
   I have tried to write this code using NIDAQmx VIs but when I have it has resulted in the two DAQs not having the right timing with each other. The 6009 samples for a longer time. 
   I have now tried instead to use the DAQ assistant to read from the two VIs and it works in that TDMS files produced have the correct timing between the two DAQS. However, if I record for more than 2 minutes, in the end I want to end up recording for a much longer time, I have the "Not enough memory to complete operation" message appearing. This still happens even if I get rid of my charts to display the data, and also if I get rid of the NI 6009 completely and just keep the 9220 sampling at 20kHz. It happens even if I repalde my TDMS write and put a write measurement assistant in which I tell it to write a series of files that are each less than 2 minutes long. 
    I think it is something to do with the amount of data I am reading and is being held in memory. What can I do about this? Also, my charts display very slowly, basically evey second when the 20k are read in. However if I lower the amount of data read the charts don't display all the data points. 
    I attach my code, thanks for your help!
    Alfredo 
As far as your charts updating very slowly - the way your code is designed, your charts only get data when both 20K samples & 1M samples are done collecting.  Have you tried setting up DAQ assistant for continuous sampling instead of 20K samples or 1M samples?
-BTC
New Controls & Indicators made using vector graphics & animations? Click below for Pebbles UI

Similar Messages

  • Not enough memory to complete operation

    I've looked through the forums for the "not enough memory to complete operation" error and despite following the advice I found, the error still occurs.
    I'm using LabVIEW 2012 to try and continuously monitor our system, recording temperature, power, etc vs time (values obtained from USB-6008 DAQ).  The data being saved to file, is done every 60 seconds using a small array (no problems here).  The typical run/time memory allocation to LabVIEW is about 180MB (4GB RAM on computer).
    The issue I feel is related to our wish to display this data on graphs for extended periods of time.  The current iteration of the code works as follows.  
    1) we have 2 XY graphs with 2 plots each.  
    2) for each plot, I am initializing clusters of 2 arrays of 100,000 (XY pairs) which are wired to shift registers.  I know this is larger than can be displayed on a graph but I am currently more concerned with reducing the number of data copies.  
    3)  Every 10th data point is added into the arrays using an In Place Element Unbundle/Bundle along with a "Replace Array Subset".  This means there are approximatly 8640 points per day. (A single day is the shortest time span typically viewed)
    4)  For two plots on an XY graph, two clusters are combined in an array (using Build Array).  I think this is my problem right here.  Since everytime I update the graphs Labview has to allocate memory for the 4 XY plots. ( Am I correct here?)
    Decimating the data further when looking over multiple days will reduce the amount written to the plots.  However this operation creates data copies.  Is it worthwhile in this case? 
    Instead of initializing 4 clusters (1 for each plot) and combining into arrays later, would it be better to initialize Array of cluster of arrays (2 plots per graph) and update the data by "index / unbundle / replace array subset / bundle replace array subset" series of operations?
    Solved!
    Go to Solution.

    Hooovahh wrote:
    But what I think is more important is your middle loop is unbounded in size for its arrays.  Memory will continue to grow until it crashes.  You removed the write VI but I'm guessing you are essentially overwritting the old file with all the same data but with 1 extra data point.  Why not just write that one extra data point by appending to the existing file?  Look at the Write To Spreadsheet which shows how to append to file (it is an optional input).
    If you'll notice the section where I comment that the save VI is deleted, there is a null array wired to the shift register.  While this probably isn't the best practice, the array builds to 60, appended to the text file, and overwritten with the null array.  This is to avoid opening/closing the file every second.
    The other array there stores power and time for every data point when the sun is up for the day (probably near 50,000 data points).  This is done to calculate the days insulation by integration.  This array could probably stand some improvement using an initialized array.  (i got tunnel vision on the other part of the code and missed this).
    In regards to the graphs containing multiple days worth of data to be viewed at any time, yes this is a requirement (the more the better).  This is for monitoring a solar array at our University and, once free from bugs, will be linked to a web page using the Web Server.  So individuals may view data within the past 1,2, or even 3 weeks.  Normally, I would just have a separate VI for viewing data when desired but 24/7 access to view the updated data is a requirement.
    Am I correct in that the Build Arrays (just prior to the graphs) makes a data copy of each cluster?  Could it be this large data copy that's the cause of the error?  My understanding from other posts is that this error is generally linked to non-continuous memory allocation for arrays/clusters.  

  • Not enough memory to complete this operation windows 8

    Hi All,
    I have a problem whith a built executable where at random intervals I get a windows dialogue saying "Not enough Memory to complete this operation"
    I have searched through the forums and although there are similar posts I have not been able to get rid of this message by trying several things.  My project is a cRIO which connects and disconnects using the STM messenger service.  The HOST computer is a Producer consumer design pattern, the crio is a producer consumer with the producer being incoming TCP IP messages essentially.  The windows 8 machine shows no signs of running out of memory.  There is plenty available (8GB) and during normal execution the program is only using roughly 200MB and is stable.
    Some of the things I have tried from reading similar threads but have had no luck.
    Put a delay in TCP Send function from the cRIO (1mS).
    Disabled all writing to files for polled data / results.
    Run in windows 7 and XP compatibility mode and as administrator.
    Move whole executable into my Documents after suspecting file permissions.
    Made whole of install directory full access permissions.
    Disabled firewall and uninstalled anti Virus as its not connected to T'internet.
    Monitored cached data and disk writes using perfmon.
    Monitored Threads and seem stable.
    This build was also tested on a windows 7 machine and has been run overnight with no problems.  the executable also runs on my development machine with no problems.  The windows 8 machine has no NI max installed (Just the RT engine), the windows 7 does along with VISA drivers etc.
    When the "Not Enough...." Dialogue appears the exe hangs untill the prompt is removed.  Once the dialogue is removed the TCP Queue then catches up with Queued data so I know that there are no queues increasing in size (It has happily stored all polled data from an overnight run and then dequeues all this information to the front panel no problem)..
    Build PC:
    Windows 7 (64 bit) - LabVIEW 2013 (32 bit) full development.
    Target PC (with error message)
    Windows 8 (64 bit) - LabVIEW 2013 RTE (Installed from an installer built on machine above using recommended settings)
    Other Test Target (With no problems)
    Windows 7 64 bit - LabVIEW 2013 RTE, MAX and VISA Installed.
    Is there any way to debug this some more??  Where might I find this information in the windows event logs / perfmon etc??
    Many Thanks in advance
    Craig
    10 years+ LabVIEW experience.
    LabVIEW 2012

    Hi craigc,
    Good job with the current troubleshooting status!
    A couple of things though:
    • Have you tried building the application on the same Windows 8 machine? Does it have the same issue then?
    • Did you try increasing the Virtual Memory usage? Even though this should not haveany  influence if you are using a 64bit machine, it might still be worth a try. There's a tutorial how to do it on Windows 7 here and it should not be very different from Windows 8.
    • You have mentioned that you used perfmon. What exactly did you measure and what results did you log? 
    • Do the pop-ups show up in complete random manner or is there a pattern?
    • What about increasing the delay in TCP Send? I assume you have followed the latter suggestion from this forum post?
    Thanks!
    Mark N
    Applications Engineer
    National Instruments UK & Ireland

  • Issue with turning on project 2010 / 2013 - "There is not enough memory to complete the operation. To free up available memory, close programs, projects, or windows you aren't using, and then try again."

    I get the following error after the installation and configuration window of MS Project: "There is not enough memory to complete the operation. To free up available memory, close programs, projects, or windows you aren't using, and then try again."
    It happens both with MS Project 2010 and 2013 on a Windows 7 desktop. 
    I tried installing / uninstalling Office 2010, MS Project, tried installing 32 and then 64 bit versions, clean up, disk error checker, startup changes (msconfig), anti virus, running as Windows 7 and then Windows XP compatible mode. 
    Nothing helps. I see this issue reported as early as 2007 version of MS projects on Microsoft forums, but I do not see any solution anywhere. Any suggestions on how to fix the issue without having to reformat hard drive? Every other application, including
    all other Office programs work seamlessly. 
    I also tried Microsoft support, after an hour and a half of basically doing what I did before, I was told I have to pay 99$ for "premium" support, so someone can look at this bug. 
    I have 16 Gb RAM and more than 200Gb or hard drive free, so actual memory is not the problem. 

    This issue was originally reported with MS Project 2007 and keeps popping up since.
    A quick Google search provides more than 200K pages of results of this issue:
    https://www.google.ca/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=There+is+not+enough+memory+to+complete+the+operation.+To+free+up+available+memory%2C+close+programs%2C+projects%2C+or+windows+you+aren't+using%2C+and+then+try+again.
    And 193K results on Bing:
    http://www.bing.com/search?q=There+is+not+enough+memory+to+complete+the+operation.+To+free+up+available+memory%2C+close+programs%2C+projects%2C+or+windows+you+aren%27t+using%2C+and+then+try+again.&go=Submit&qs=n&form=QBLH&pq=there+is+not+enough+memory+to+complete+the+operation.+to+free+up+available+memory%2C+close+programs%2C+projects%2C+or+windows+you+aren%27t+using%2C+and+then+try+again.&sc=0-0&sp=-1&sk=&cvid=4cb023c1fbd94ec2bba9821b095f21f2
    Computer was defragged already. I run more tests, and specifically when MS Projects tries to run, it tries to take all memory, more than 300Gb, on the computer. (DropBox was running at the same time, and warned that there were no space. As soon as MS Project
    stopped attempting to configure itself, everything came back to normal and the available space became available again.)
    Looking through older forum posts, looks like this application tries to take "unlimited" amount of memory. Some registry fixes are mentioned potentially, but I was not able to apply them. 
    Since everything else works, this is a MS Project bug reported by multiple users on various versions of Windows, including Vista and 7, so please provide a fix and not 'not a know bug' lie. All the premium support will say, is to format the hard drive, unless
    they have a patch or a registry edit solution. If the latter is true, since the issue exists for multiple years, it should have been already been provided to users.
    Also, I am not running a SQL server, or any server, this is an installation on a local machine. 

  • Im getting an not enough memory to complete this scanning operation error

    I am using a WIA-HP CLJ CM1312 Scanner with Adobe Acrobat 9 Standard Version 9.4.6
    This machine is Windows XP with 3gigs of RAM and plenty of HDD space....
    When I try to make a color copy at a Resolution of 1200DPI I get an error saying that - "There is not enough memory to complete this scanning operation."   It only works at 600DPI
    I dont understand why I am getting this error.  I would have thought my upgrade to 3gigs of RAM would have fixed this error.  

    1200 dpi can actually mean a lot of memory.
    See if the steps under "error messages when scanning" releated to data transfer mode on this page help: http://kb2.adobe.com/cps/325/325262.html

  • Not enough memory to complete this operation

    hi everybody
    i've seen a lot of posts under this heading but could not be able to find out regarding my problem
    when i am trying to open host vi from a project explorer window , after loading about 8500 dependencies (sorry if use wrong word), its starts giving error "not enough memory to complete this operation"
    plz tell me what type of memory is this message telling about?
    regards
    aqib

    How many VIs are in your entire project? Did this problem just start? Are you upgrading to a new version of LV? Can you open smaller pieces of the entire application?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Not enough memory to complete the operation-how do i eliminate the error?

    HI All,
    I have posted the questions before in this forum,but as i am not able to cure the problem i am posting it again.
    I have  a large database oriented application to plot graph.Almost one year back given the application to the user.
    They were not getting any problem before.But now the user is telling they are getting an error message-"not enough memory to complete the operation".The same application is running in one of our pcs also.But here no problem.
    Tried  to change the vitual memory setting in the user's pc by setting to system managed size.
    But still getting the same error.
    Why the same application running finely in one pc and resulting some error in another pc?
    Except that they are getting the error message the application is running properly(ie,except that they are getting the error they are able to plot the graph.)Is there any work around for this?Atleast is there any way to hide the error message?

    Hi user_1,
    no, you can't hide that error message.
    It seems you are dealing with very big data arrays (kind of duplicate posting). Please read the knowledge base article on memory efficient programming!
    The "not enough memory" occurs when LabView has to create a data copy and doesn't get the memory needed for. The only (?) way to avoid this is efficient programming!
    When you increase the memory available in the PC the error will only occur later!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • PDF error - not enough memory to complete this operation.

    A friend with I think LION has this error when they hit print and then save as PDF on a single 1 page doc.
    PDF :  SORRY - not enough memory to complete this operation....
    Any ideas how to fix this?

    Hi,
    not sure - this is the default funtion in osx - when you hit cmd print - then lower left "SAVE AS PDF"
    hope that helps...
    Q is there a way to reset the default app?

  • Cannot load large CSV files in SignalExpress("Not enough memory to complete this operation" error)

    Hi guys,
    I'm new here and just  have browsed
    some of the related topics here regarding my problem but could not seem
    to find anything to help me fix this problem so I decided to post this.
    I currently have a saved waveform from an oscilloscope that is quite
    big in size(around 700MB, CSV file format) and I want to view this on
    my PC using SignalExpress. Unfortunately when I try to load the file
    using "Load/Save Signals -> Load From ASCII", I always get the "Not
    enough memory to complete this operation" error. How can we view and
    analyze large waveform files in SignalExpress? Is there a workaround on
    this? 
    Thanks,
    Louie
    P.S.>I'm very new to Signal Express and haven't modified any settings on it. 

    Hi Louie,
    Are you encountering a read-only message when you tried to save the boot.ini file? If so, you can try this method: right-click on My Computer >> Select "Properties", and go to the "Advanced" tab. Select "Settings", and on the next screen, there is a button called Edit. If you click on Edit you should be able to modify the "/3GB" tag in boot.ini. Are you able to change it in this manner? After reboot, you can reload the file to see if it helps.
    To open a file in SignalExpress, a contiguous chunk of memory is required. If SignalExpress cannot find a contiguous memory chunk that is large enough to hold this file, then an error will be generated. This can happen when fragmentation occurs in memory, and fragmentation (memory management) is managed by Windows, so unfortunately this is a limitation that we have.
    As an alternative, have you looked at NI DIAdem before? It is a software tool that allows users to manage and analyze large volumes of data, and has some unique memory management method that lets it open and work on large amounts of data. There is an evaluation version which is available for download; you can try it out and see if it is suitable for your application. 
    Best regards,
    Victor
    NI ASEAN
    Attachments:
    Clipboard01.jpg ‏181 KB

  • MS Project Professional 2010 - Configuration Failure - There is not enough memory to complete the operation

    Windows 7 64, MS Office Pro 2010 installed add working - 4 gig of memory 500 gig +  of free disk space.  I  get the below results when trying to start project the first time.  
    Tried usual admin rights stuff and turning off norton and firewall.  Same results after re-install, restart,
    repair, you know all the usual.
     Note I borrowed the steps below from another thread that was never answered. 
    http://answers.microsoft.com/en-us/office/forum/office_2010-project/ms-project-crash-after-configuring/e6c67a84-5749-4b19-8cbd-562189d9785c
    1. Microsoft Project Professionnal 2010 popup: Configuration Progress splash screen with progress bar and yellow wave at bottom.
    2. Microsoft Office Project MUI (English) 2010 popup: Please wait while Windows configures Microsoft Office Project MUI (English) 2010, then disappears.
    3. Microsoft Project 2010 logo popup with green wave at bottom.
    4. Steps 1-3 repeated 3 times.
    5. Microsoft Project popup: There is not enough memory to complete the operation.  To free up available memory, close programs, projects, or windows you aren't using, and try again.

    I located a solution, finally!  It was solved back in 2007. It is NOT a memory issue nor a conflict with other software as most of the forum advisers suggest. It is a pure MICROSOFT problem with Registry permissions. And as they provide no solution
    (as of 2014 yes 7 years) one has to use a registry hacking tool to take command  of the registry. The solution that worked perfectly for me is located here :
     http://www.techtalkz.com/microsoft-office/157044-unable-install-project-standard-2007-a.html
    Full thanks to David Chatfield for finding the answer back in July of 2007!

  • Building an Executable - Not Enough Memory to complete this operation

    I am trying to build an executable from my project, it is quite a large program.  During the build, within the 'initializing build' phase, I get the error message 'not enough memory to complete this operation'.  I have a decent PC running XP and 4GB ram. LabVIEW is using about 1.2GB of ram when the problem occurs.
    This is an application that I've been working on for some time and I have experienced similiar problems before.  To get round it I have added the /3GB switch to the boot.ini file.  However that is no longer working, it complains of a problem loading a dll which seems to have only started happening since moving to LV2012.
    Does anybody have any experience with solving this problem please? It is a bit of a showstopper for me at the moment.
    Thank you,
    Martin

    Hi Martin,
    Adding the 3GB switch is a solution which should still work on your system. 
    I'm a little confused, is the system still complaining about not having enough memory? Or is it just the dll problem?
    And is the error message occuring during the build, or when trying to run the .exe?
    The dll in question is associated with DAQmx. 
    If it is a runtime problem rather than a build problem, it may be that you haven't included the DAQmx driver on the target machine, in which case the answer lies in this document: http://www.ni.com/white-paper/5406/en
    If I've misunderstood, please clarify the exact issue which is currently occuring, and we can continue to troubleshoot.
    Ian S
    Applications Engineer CLD
    National Instruments UK&Ireland

  • Error on running LV application-not enough memory to complete this operation

    Hi,
    Developed an application for multi plot graph.
    The graph is having around 25 plots and and its fetching many records from the database for the pltting purpose.
    This LV application is a module of a VB real time application which is running always on the PC.
    Now when the user tries to plot the graph...some times he is getting an error message as the following
    "not enough memory to complete this operation"
    What are the reasons for such an error message and how do i eliminate this error?

    LabVIEW cannot allocate the memory needed to complete the task at hand.
    Prevent data copies of large datasets.
    Reduce the amount of data in your graphs. (Not all point can be seen as individual points, if the scale is from 0-1000 you can plot 1000 points, but with the scale 0-1000000 you can also have 1000 point instead of 1000000 and see almost no difference.
    Regards,
    André
    Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)

  • "Not enough memory to complete this operation" with Shared Variable

    I have a sizeable cluster (over a megabyte on disk) that I'd like to send over a shared variable.  When I try to set the data type of the shared variable as the cluster I get the message "Not enough memory to complete this operation" (see attached image) and the LabVIEW dialog goes into its edit-mode state.  Has anyone seen this before?
    Thanks,
    Robert C. Mortensen
    Certified LabVIEW Architect
    Certified LabVIEW Embedded Systems Developer
    Endigit
    Attachments:
    Not enough memory.PNG ‏22 KB

    Duplicate Post.

  • Not enough memory to complete this remote panel operation (LAN)

    Hi, the problem is, when i try to view or control an application thru a simple LAN, at my work, i recibe the message "Not enough memory to complete this operation"... but both PCs are very closely... So,
    are there limitations related to the amount of data involving in this kind of comminications?, my app process data acquired by a 4472 dsa PXI card, and then show results thru typical graphics...
    Also, i have noted when i perform "control tasks", they have a bad effect on my app (in the server machine), in terms of performance.
    The problems of excessive memory consumption can be avoided, when we used conventional PCs ?  and, ¿The monitoring and the control affect my application performance? 
    Thanks in advance.
    JFT

    Hi Ankita, i will read that document now...
    I work with a conventional PC and a PXI (8175). The problem is when i try to see the remote front panel thru a LAN, my application and the Remote Panel crashes, and the messages is "Not enough memory to complete this remote panel operation....". So, my question is, if it is posible to  avoid this kind of problems? or remote panels are limited to a little apps... My App acquire a lot of data (thru a DSA 4472 daq) and then it process and shows that data without problems until remote panel is activated.
    Sorry my english... and thanks anyway
    JFT

  • "Not Enough Memory to Complete this Operation" Error using notifiers in LabVIEW

    I get the (windows?) error message "Not Enough Memory to Complete this Operation" when using notifiers to send a flattened byte string as a response from one VI back to my calling VI. I do get my data and everything works out perfectly between the two VIs, but I do get this annoying error message that requires a user interface action. Why?

    Well, I'm thinking you may have stumbled across a LV issue.  I can get it to crash a lot faster than that when I clear your plot history in the top chart.  It definitely seems as though LV has a huge memory leak on charts having their history cleared.  With your 500,000 data point history, I lose about 170MB of memory every time I clear the chart history.
    When I run your VI, the first time you plot data, I see a 170MB jump in memory, which I am assuming is the chart allocating its chart buffer.  But, then I continue to see more memory being used as more data is collected (if you don't use your default 1 sample a sec rate, you can see this happen much faster - I am using 5k sample rate and 5k samples).  Eventually, even without clearing the chart history, this will cause the system to crash.
    I did a quick test and dumped the waveform and just used doubles and plotted that.  Memory usage is drastically better, as I see no memory leak during standard acquisition (I still see the memory leak when the chart is cleared however).
    You may have to rewrite to not use the waveform and signal for your chart and just use DBLs.

Maybe you are looking for