Memory leak in Real-Time caused by VISA Read and Timed Loop data nodes? Doesn't make sense.

Working with LV 8.2.1 real-time to develop a host of applications that monitor or emulate computers on RS-422 busses.   The following screen shots were taken from an application that monitors a 200Hz transmission.  After a few hours, the PXI station would crash with an awesome array of angry messages...most implying something about a loss of memory.  After much hair pulling and passing of the buck, my associate was able to discover while watching the available memory on the controller that memory loss was occurring with every loop containing a VISA read and error propogation using the data nodes (see Memory Leak.jpg).  He found that if he switched the error propogation to regular old-fashioned shift registers, then the available memory was rock-solid.  (a la No Memory Leak.jpg)
Any ideas what could be causing this?  Do you see any problems with the way we code these sorts of loops?  We are always attempting to optimize the way we use memory on our time-critical applications and VISA reads and DAQmx Reads give us the most heartache as we are never able to preallocate memory for these VIs.  Any tips?
Dan Marlow
GDLS
Solved!
Go to Solution.
Attachments:
Memory Leak.JPG ‏136 KB
No Memory Leak.JPG ‏137 KB

Hi thisisnotadream,
This problem has been reported, and you seem to be exactly reproducing the conditions required to see this problem. This was reported to R&D (# 134314) for further investigation. There are multiple possible workarounds, one of which is the one that you have already found of wiring the error directly into the loop. Other situations that result in no memory leak are:
1.  If the bytes at port property node is not there and a read just happens in every iteration and resulting timeouts are ignored.
2.  If the case structure is gone and just blindly check the bytes at port and read every iteration.
3.  If the Timed Loop is turned into a While loop.
Thanks for the feedback!
Regards,Stephen S.
National Instruments
Applications Engineering

Similar Messages

  • Can Oracle run in real time OS(such as PSOS) and communicate with data server by OCI?

    Hi, all!
    i have a question to get your help! now my oracle client running in SUN solaris communicate with oracle data server by OCI(oracle call interface). In future, my client system will port to embeded system that will use real time OS, such as PSOS, so i'm afraid that is OCI communicating with data server ok in PSOS environment??? Is there a special driver or OCI lib for PSOS?
    thanks very much!!!
    null

    I have no idea which platforms the Oracle client has been ported to. If there exists an Oracle client for PSOS, then you should have no problem with OCI there. If there's no Oracle client for PSOS, then you won't be able to make OCI calls.
    Regardless, this probably is a question better addressed to Oracle sales rather than to an ODBC forum.
    Justin

  • Please provide me some real time gaps(SD) in projects and their solutions

    hiiiiii everybody
                             please provide me some real time gaps(SD) in projects and their solutions for the sake of Interviews.
    Thanks and Regards

    hiiiiii everybody
                             please provide me some real time gaps(SD) in projects and their solutions for the sake of Interviews.
    Thanks and Regards

  • I send out emails with proper grammar.  People would reply returning my email and I would notice the grammar has changed and doesn't make sense.  What's causing this problem?

    I send out emails with proper grammar.  People would reply returning my email and I would notice the grammar has changed and doesn't make sense.  What's causing this problem?

    Have you actually compared what you sent (in your Sent Mail Folder) with what is in the reply?
    Note that Auto Correction can often change what you think that you are typing.
    Are you sure that the return message has your original message intact and not edited by the recipient?
    Bottom line: if the recipient does a simple reply to your message with the original message attached the system is not going to edit your message.

  • Why doesn't time capsule come with AirPlay and an audio out plug? I have to buy an Airport Express station and put it right on top of my time capsule to wire it to my stereo. Doesn't make sense...

    My Time Capsule is right by my stereo and would like to stream my itunes there. But it looks like I would have to add an Airport express station right on top of my time capsule to do this. Which doesn't make sense to have 2 wireless routers on top of each other. Is that the only way?

    Well you can't do it with a Time Capsule.
    You could get an Apple TV instead of an Air Port Express and then you can get video as well..

  • End of memory. Labview + Real time module + Compact Field Point 2120

    My name is Michele Ciampichetti, I'm writing from Italy.
    Frist of all, excuse for my english.
    This is my first experience with Labview, and the application is not so easy. We use Labview 8.2.1
    Our system is costituited by two different parts: there is a Compact Field Point 2120 as remote target whit some I/O card, and a PC used to releave data and memorize them (host).
    The comunication between the two targets is performed by ethernet lan with Shared Variables not bufferized and not real-time fifo.
    The problem is this: the sistem requires a big number of Vis and Variables (about 20 Vis per target and 50 variables localizated in 5 different librarys all in the remote target), and it should store data, acquisited by the FieldPoint, on a database (SQL Server 2005), one time per minute. This storage is made by Labview Database Connectivity Toolkit, and it work correctly. The problem is an excessive consumption of RAM on the PC.
    The question is this: The use of many shared variables or vis, bring the memory to always grow? I try to explain myself. When we start our application, after the first minute and registration on the database, the memory grow of approximately 1,3 Megabytes. This is repeated every minute, and after approximately two ours, Labview break down and display "Not enought memory".
    We look the on-line help for one solution, and we have found that the variables (local and shared), the concatenate funcion, the array and Vi indicators copy in memory their older value when updated. Is possible that this is the cause of our problem? There is a method to avoid it? How labview uses memory? It is possible set it up for not maintain older value in memory?
    We need to run the application up to 4 days for complete its work, is a long test for a climatic room.
    We're looking forward to hearing from you.
    Best regards
    Michele

    centerbolt is correct, you can't load a .exe or even run a program on the fieldPoint controller unless you have the Real Time module.  However, that does not mean you can't use your FieldPoint bank without the Real Time module. 
    From LabVIEW for windows you can make calls to the fieldpoint IO using the fieldpoint read/write functions. 
    This program runs on the PC not the FieldPoint controller.  If you loose network connection to the fieldpoint, your program will loose connection to the IO.  For many data logging applications this type of arrangement can work just fine.  However, if this is the only type of application you are ever going to run, then you may as well not buy the Real Time controller for your fieldpoint but the network controller only. 
    If your application requires more reliability, and/or greater determinism than can be achieved by running a program on windows, then you should use the LabVIEW Real Time module and develop a program that can run down on the FieldPoint controller independent of windows.
    Message Edited by StevenA on 07-22-2008 04:14 PM
    SteveA
    CLD
    FPGA/RT/PDA/TP/DSC
    Attachments:
    fp pallet.PNG ‏6 KB

  • Is real time support configure visa

    can we use configure visa and other visa's vi's in real time?

    Dear Mr Mazhar,
    Thank you for your post on the discussion forum. Please find the following knowledge base about Visa on a (compact) fieldpoint realtime controller; http://digital.ni.com/public.nsf/allkb/D9DC27C95A6AA9F986256B97005D360C
    So yes, the Visa VI's are available on your realtime target.
    If you are programming a realtime target (with Labview 8 or later) you are able to create a real-time VI; just add your real-time target in your project window, right click => new VI. Labview automatically sets the library's available for your realtime target.
    I hope this will help you further,
    Best regards,
    Martijn
    NINL
    Martijn S
    Applications Engineer
    NI Netherlands

  • Memory Leak..Big Time

    I've recently purchaced El Gato's EyeTV HDHomeRun & associated software to record and then export content to AppleTV2. The system can record 2 shows simultaneously and also automatically export to iTunes for streaming to AppleTV. That's where the fun begins. The recording works just fine but when the export to iTunes process begins, memory leaks, no gushes out of my system, turning my 12GB of Ram to 12MB within an hour. Paging begins, finally leading up to a Kernel Panic and shutting down my system (lost recordings).  A system restart will clear out the RAM but starting the export process agin will just wipe out all of my memory again. I've also tried repairing permissions (with SL software install disk) but the problem will persist days following. I've also purchased and installed new RAM from OWC, so I know that's not it and even reinstalled EyeTV software after contacting their Tech Support. No other software applications are runnning. Can anyone shed light on what is going on here? I'm thinking about a fresh install of 10.6.8 or going to Lion but don't know if this will even make any difference. Please HELP!

    It is entirely possible that Elgato's software writes to the memory controller in such a way that if the memory is marginal in certain bits of the board, that it would panic.     The fact the issue remanifests itself under new RAM may even indicate the problem is not the RAM, but the RAM controller itself!   An old piece of code I know from "C" programming days, malloc is the memory allocation code word.      They should be digging in the malloc codes making sure they aren't asking for points in memory they don't know exist, or create some debug routines around every malloc piece of code until it trips on your machine.

  • Oracle SGA Real Time Consumption Information(9i,10g and 11g)

    Hello,
    I need to prepare a comparative analysis report of SGA for an Oracle Production Instance
    The analysis would show the pre-allocated memory to SGA components v/s real time consumption of memory by these SGA components. I need to do this for each of following components.
    SGA itself
    Fixed Size
    Variable Size
    Database Buffers
    Redo Buffers
    The pre-allocated memory to above SGA components can be obtained by querying v$sga. But from where do I get its real time(current) memory conusmption in Oracle Production environment.
    In addition to above, i need the same information (pre-allocated and real time consumption) for following.
    Keep buffer cache
    Recycle buffer cache
    Specific block size caches
    Shared pool
    Large pool
    Java pool
    streams pool
    Which tables do I need to consider in order to derive 1)pre-allocated memory and 2)real time consumption for above mentioned SGA components
    Please advice.
    Thank you for your time in reading this post.
    Thanks,
    Ruchir

    Hi,
    Have a look at v$sgastat. Also, use statspack in 9i and AWR reports on 10g. Also, the size of the caches won't grow unless they are used. The parameters you have specified within the parameter file, like sga_target (10g onwards) and possibly the other pools if you have specified them, will show you what the caches can grow to.
    For example, you could just log onto the DB and do show parameter sga_ or shared_pool and you will seee values for these. Also, it depends whether you are running in automatic memory management mode - where the sga_target parameter is set - or manual. 9i will be manual, but 10g could be auto. In manual case, 9i, check out the parameters individually.
    Also, read the docs about the parameters shown and you will see what it says abotu them. There will be lots in the docs about performance tuning and monitoring of the instance. You might even learn some other interesting facts while reading through the docs...
    Hope this helps,
    Rob
    http://www.ora00600.com

  • Impact of real time cube on query performance and OLAP cache

    Hi:
    We have actual and plan cubes both setup as real time cubes (only plan cube is being planned against, not actual cube) and both cubes are compressed once a day.
    We are planning on implementing BIA accelerator and have questions related to query performance optimization:
    1/ Is there are any query performance benefits in changing the actual cube to be a basic cube (using program SAP_CONVERT_NORMAL_TRANS) if the F table is fully compressed
    2/ Can OLAP cache be leveraged for the queries run against the real time cubes e.g. actual cubes
    3/ What is the impact on BIA of having the actual cube as real time (whetehr or not there is data being loaded/planned during the day in that cube)
    Thank you in advance,
    Catherine

    1) Is there are any query performance benefits in changing the actual cube to be a basic cube (using program SAP_CONVERT_NORMAL_TRANS) if the F table is fully compressed
    From the performance point of view, tha actual cubes i.e std cubes are relatively better.
    2) Yes OLAP cache can be leveraged for bringing up the plan query but all the calculations are done in the planning buffer.
    3) Not sure.

  • Real Time Report Placed in iFrame and then Within a Web Applet

    Real-Time Reports built and executed BI tool retrieve real-time updates. However, when report URL is placed within an IFRAME and that is then placed in a Web Applet and the Web Applet is placed within a Page Layout Section, the real-time report no longer retrieves real-time updates.
    Do you have any ideas as to why?

    Hi Don,
    Thanks for the reply.  I had downloaded a set of samples from SAP and I have looked through a few of the set you supplied.  I am worried that I'm going to have some trouble because the samples have the reports loaded as part of the solution but I was looking to create a more generic viewer.  I don't want to have to reprogram for each and every report that is created.  That is why I was trying to use the generic parameter dialog.  After the Report Load Failed dialog comes up, it does bring up the parm dialog and hits SQL Server just fine.  Yes...the reports are passing Parms to Stored Procs in SQL Server.  The report has default parameter values. 
    What I am trying to do is search thru the application folder and gather the names of the reports located there and fill the combo box with the names of the reports.  Then the user should just be able to select a report and run it.  I can't save the data in the reports because they must be ran per the requester's date range and other desired parameters.
    Does this seem valid or am I going to have to program for EVERY single report and reprogram/recompile for every report added?  Not particularly what I want to hear.   I would have used the standard Crystal Report Viewer and had the users use that but it doesn't seem to allow you refresh the data from the viewer.
    Thanks for your help,
    Chris

  • Independent 7 Year LabView (3.0-7.1) and Real-Time Programmer w/ Signal Analysis and Audio/Video/Imaging Background

    I have been a LabView programmer since version 3.1 and now into version 7.1 - including the Real-Time platform. I also have developed database connectivity in Perl/CGI/HTML in conjunction with this experience.
    I also have over a decade of experience in Audio, Video and Imaging technology as a systems designer and production engineer. I am currently a part-time employee and an independent contractor. My company name is The Oakland Group. I am available for both short-term full-time and long-term part-time projects.
    I look forward to discussing any LabView project with you.
    Tom Held
    [email protected]
    414-964-0518

    Please see my attached resume.
    Tom Held
    Attachments:
    resume-scada.pdf ‏43 KB

  • IPad available memory NOT consistent with available memory shown in iTunes and available memory reduced after a connected sync...doesn't make sense.

    I was looking through my pictures on iPhoto on my iPad 2 and noticed in some of my albums there were duplicate pictures, but on iPhoto on my iMac there wasn't. I had also noticed that my 64GB iPad 2 had only a little over 14GB left for available memory. I decided to connect my iPad2 to my iMac and sync it with itunes but this time I unchecked Sync Photos. I was asked to remove photos which I agreed to. My intnet was to re-install my photos in hopes that I would no longer see the duplicate photos and quite possibly free up some memory. In short, none of that worked and instead the pictures remained on my iPad2 and my available memory jumped to 956MB. I then tried selecting a " Selected Events, Faces, Albums..." in the Photo section of iTunes but I did not select any albums or events or faces. The sync ended and I still had all of the pictures on my iPad2 with 7GB left of available memory showing on my iPad2 but now showing 12GB on my iTunes on the iMac.
    I then tried to do a sync again, syncing all photos and the sync cancelled. I tried it again and it went through. This sync ended with 14GB of available memory showing on iTunes on my iMac, BUT on my iPad2 it showed 7.1GB.
    None of this makes any sense. I guess I could have left it alone and viewed duplicate photos but if duplicate photos were causing available memory to be reduced, I wanted the memory to come back up for future use.
    Also, I noticed that the amount of photos being synced has randomly changed on a couple of these occassions as if I had more or less photos to sync and I haven't. I'm not sure what would cause this either.
    Where it says "Other" in the memory bar in ITunes on my iMac is 26.34 GB. Before I did the first sync it was a little over 7GB. What would cause the "Other" to consume so much memory? and what is "Other" Why did it fluctuate so drastically when I've made no changes to my iPad?
    I hope I can get some help to this.
    Thanks!

    Brock_DB wrote:
    Where it says "Other" in the memory bar in ITunes on my iMac is 26.34 GB. Before I did the first sync it was a little over 7GB. What would cause the "Other" to consume so much memory? and what is "Other" Why did it fluctuate so drastically when I've made no changes to my iPad?
    "Other" can be the cause of this storage capacity snafu that you have going on with your iPad. "Other" is pretty much what it sounds like it should be with regard to what is stored on your iPad. It is "stuff" associated with apps but not the apps themselves or any other media. It consists of Safari Bookmarks and history, Notes, text messages, email messages, contacts, photos associated with contacts and items of that nature. It should not be anywhere near 26 GB and the fact that you have much is a little bit of a problem.
    Sometimes the only way to rid your device of that bloated "other" is by restoring as a new device without using the backup. There could be something corrupt on your iPad and if you restore from a corrupted backup, you will just end up back where you started. Also, sometimes this issue is caused by syncing photos and while I don't know this for a fact, it might have something to do with the metadata associated with the photos that gets corrupted and then that might cause this "other" storage problem.
    Take a look at some of these and see if something in one of them helps.
    https://www.google.com/search?q=What%20is%20%22Other%22%20on%20my%20iPad%20and%2 0how%20do%20I%20get%20rid%20of%20it?#q=What%20is%20%22Other%22%20on%20my%20iPad% 20and%20how%20do%20I%20get%20rid%20of%20it%3F

  • How to read three parameters for exemple temperatur​e,current and voltage from the same port with visa read and separate them in a table

    Hi i want to read parameters with visa read, from three sensors related to  pic16f877a, using  module xbee ..but i want to make every one from those parameters (temperature, voltage and current) in a table ..it's the first time i use Labview so i don't know if ther is a solution for my problem so if any one have any idea please help me. thnx in advance. 

    [email protected] wrote:
    Hi i want to read parameters with visa read, from three sensors related to  pic16f877a, using  module xbee ..but i want to make every one from those parameters (temperature, voltage and current) in a table ..it's the first time i use Labview so i don't know if ther is a solution for my problem so if any one have any idea please help me. thnx in advance. 
    The short answer is: "Yes, of course."  But you are going to have to do the legwork and learn LabVIEW basics before we can offer meaningful help.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Urgent: Please help. how to solve the time delay during buffer read and write using vc++

    I need to continuously acquire data from daqmx card, write into a file and at the same time corelate (in terms of time) the data with signals from other instruments. The current problem is that there is time delay during read and write data into buffer,thus causing misalignment of the data from multiple instruments. Is there a way to solve  the delay? or Is there a way to mark the time of the data acquisition in the buffer?  If I know the starting time (e.g. 0) of data acquisition and sampling rate (e.g. 1kHz), can I simply add 1ms to each data sample in the buffer? The current code is shown below.
    void DataCollectionWin::ConnectDAQ()
    DAQmxErrChk(DAQmxCreateTask ("", &taskHandle));
        DAQmxErrChk(DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0,Dev1/ai1,Dev1/ai2,Dev1/ai3,Dev1/ai4,Dev1/ai5,Dev1/ai16,Dev1/ai17,Dev1/ai18,Dev1/ai19,Dev1/ai20,Dev1/ai21,Dev1/ai6,Dev1/ai7,Dev1/ai22","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL));
      DAQmxErrChk(DAQmxCfgSampClkTiming(taskHandle,"",1000.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,60000));
      DAQmxErrChk (DAQmxRegisterEveryNSamplesEvent(taskHandle,DAQmx_Val_Acquired_Into_Buffer,50,0,EveryNCallback,NULL));// Every 50 samples the EveryNSamplesEvent will be trigured, to reduce time delay.
      DAQmxErrChk (DAQmxRegisterDoneEvent(taskHandle,0,DoneCallback,NULL));
      DAQmxErrChk (DAQmxStartTask(taskHandle));
    int32 CVICALLBACK EveryNCallback(TaskHandle taskHandle, int32 everyNsamplesEventType, uInt32 nSamples, void *callbackData)
     DAQmxErrChk (DAQmxReadAnalogF64(taskHandle,50,10.0,DAQmx_Val_GroupByScanNumber,data,50*15,&read,NULL));
       //memcpy(l_data,data,6000);
      SetEvent(hEvent);
    l_usstatus_e[0]=g_usstatus[0];// signals from other instruments that need to be corelated with the data from daq cards.
     l_optstatus_e[0]=g_optstatus[0];
     if( read>0 ) // write data into file
       //indicator=1;
     for (i=0;i<read;i++)
     {  //fprintf(datafile,"%d\t",i);
      fprintf(datafile,"%c\t",l_usstatus_s[0]);
      fprintf(datafile,"%c\t",l_usstatus_e[0]);
            fprintf(datafile,"%c\t",l_optstatus_s[0]);
      fprintf(datafile,"%c\t",l_optstatus_e[0]);
              fprintf(datafile,"%.2f\t",data[15*i]);
     //   sprintf( pszTemp, "%f", data[6*i]);
     // pListCtrl->SetItemText(0, 2, pszTemp);
        //pWnd->m_trackinglist.SetItemText(0, 2, pszTemp);
         fprintf(datafile,"%.2f\t",data[15*i+1]);
         fprintf(datafile,"%.2f\t",data[15*i+2]);

    Hello kgy,
    It is a bit of a judgment call. You should just choose the board that you think has the most to do with your issue. For example, this issue was much more focused on setting up your data acquisition task than the Measurement Studio environment/tools, so the MultifunctionDAQ board would have been the best place for it. As for moving your post to another board, I do not believe that is possible.
    Regards,
    Dan King

Maybe you are looking for

  • Mid 2009 13" Macbook Pro scroll is choppy after upgrade from 10.6.8

    Everything is stock except for a Samsung 840 EVO SSD I installed last year. All applications display the choppy scrolling. I enabled TRIM again on the SSD since 10.9.2 disabled it, however this made no difference. I've been looking everywhere for a s

  • I can no longer unlock my phone or turn it off.

    Hello,     I've recently downloaded the iOS 7, and now I cannot slide to unlock my phone, I can't even turn my phone off because it won't allow me to slide it. I am able to pull down the notification center, and pull up the control center but when I

  • Firewire Cable for TiBook to iMac 450 DV

    I need to connect my TiBook G4 867mHz to my iMac G3 450DV via firewire to run Disk Warrior on the iMac as it is not wanting to read the CD. The Powerbook reads it fine. The TiBook is running Tiger and the iMac is running Panther. I know what I need t

  • UOM error

    while doing the gr with refe. to PO in migo i am getting error specify at least 1 unit sloc is wm managed and base unit of measurement mentioned in materila master is KG and it is also maintained in the tc CUNI please reply ASAP

  • CO: Statistical reposting from NWA to Cost Center

    Hi Gurus, My client expecting the travel expenses statistically post to Cost Center which would not affect the true posting to NWA. Is there any transaction allow us to achieve that. I've tried with the Manually reposting of cost, not sure the repost