Free memory of waveform graph

Hello,
I'm logging temperature data once a minute and display 4 plots with 1440 points (data of one day) in a waveform graph.
The data of the waveform graph is updated every 2 minutes. Over the time the application allocates continously more memory (maybe until the system crashes).
Could anyone tell me how I can free the memory used by the waveform graph or its history ?
Thanks for any help,
Ralf.

How to Clear Charts & Graphs.vi in LabVIEW help "Search Examples" demonstrates ways to clear charts before, during and after execution. This may provide you with some clues that you can apply to your vi.

Similar Messages

  • Memory leak in Waveform Graph?

    Either thier is a huge memory leak in the waveform graph or I am really doing something wrong.
    I created an example app with a waveform graph and a button the contructor looks as follows:
    Form1(void)
    InitializeComponent();
    vals = gcnew array<double>(60000) ;
    for (int i=0; i<60000; i++)
    vals[i]=Math:in(Math:: PI*2*60/6000.0*i) ;
    and the click event looks like this:
    System::Void button1_Click(System:: Object^ sender, System::EventArgs^ e)
    this->waveformGraph1->Plots->Clear() ;
    NationalInstruments::UI::WaveformPlot^ plot = gcnew NationalInstruments::UI::WaveformPlot(xAxis1, yAxis1) ;
    plot->PlotY(vals) ;
    plot->LineColor = Color::Red ;
    this->waveformGraph1->Plots->Add(plot) ;
    every time I click the button the memory used on my system goes up by about 10 MB.  I tried this also with using this->waveformGraph1->PlotY(vals) and the memory usage stays solid as a rock.
    Am I doing something wrong or what is causing the leak so I can work around it, my program plots 4 arrays of this size on one graph per test result.

    The plot uses some unmanaged resources (gdi objects and other handles), which is why it implements IDisposible. Because of the GC, resource cleanup is not deterministic, clean up occurs when the GC deems it necessary. Calling delete (which based on C++/CLI syntax) ultimately ends up calling Dispose and this forces the object to release any handles it might have immedietly. See the documentation for the .NET Dispose pattern for more information.
    If you don't call delete, what would end up happening is that eventually at some point in the application, the GC would fire and cleanup all the objects and handles and you would see a drop in the applications memory footprint, but you would need to run the application for a while before that might happen. In a long application run, things would end up stabilizing.
    Bilal Durrani
    NI

  • What causes memory use of my program increase? (Write to Spreadshee​t? Running in LV environmen​t? External dlls? Waveform graphs?)

    Hi 
      I have attached a plot for the discussion here..
      I am monitoring the memory usage by my VI thru calling a window's dll to keep checking that (Many thanks to Matt). 
      I saw raising slopes and flat (wow! First time I catch this, that's what I am expecting)
      I am thinking where could there be a reason for memory growing up!
    What I did:-
    1. Mostly use queues (all limited # of elements) for parameters delivery between loops and between subVIs
    2. I close Obtained queue ref. every time I finish with it (only leaving a few keeping alive so they won't be killed)
    3. For all arrays I initialized with a fixed size array constant and do all jobs with Replace subset, Index Array and that In-place block.
    Above are measures I intended to use to save memory.
      However for a few points I think there might cause a memory grows, and I wish that someone can share with me your experience or give me an answer...
    1. Write to spread file:-- I keep using this to log data, events into harddisk, in my use I always append new logs/data to the existing file, however I keep doing it all the time throughout the run-time.
    2. Running my program in LV.exe -- I havn't compiled it yet. However when I was taking the plot's data, my PC is left with no one using it.
    3. There is a couple of external dlls running -- however it sounds to me from other's view point, external dll's resource doesn't count into Labview.exe. Since I am monitoring Labview's memory use, that couldn't be a source of the raising I see from this plot, right?
    4. Waveform graphs -- I am not sure whether this can be a problem. Everytime I feed data into a waveform control, I initialized a constant array and then replace elements into it, I don't think my data source is casuing any problem.
      Can someone comment on my above descriptions of my program?
    Raymond

    vgbraymond wrote:
    1. Write to spread file:-- I keep using this to log data, events into harddisk, in my use I always append new logs/data to the existing file, however I keep doing it all the time throughout the run-time.
    Write to spreadsheet file is a high level VI that opens and closes the file with every call. I would recommend to open the file once at the start of the programs, then append using lowlevel functions. Close the file after the program is done.
    Have you done any profiling to see which subVIs shows the bulk of the memory use?
    You might also turn off debugging to see if it makes a difference. Don't open the front panel of subVIs (and avoid functions that force the front panel to be in memory) unless they need to show something important to the user.
    It would really help if we could see some actual code. Can you strip it down to the essentials that still show the problem?
    LabVIEW Champion . Do more with less code and in less time .

  • How do I change the data used by a Waveform graph dependent upon which tab window is active?

    Hi,
    First I want to say thank you in advanced!!  Let me describe the situation a little bit.  My front panel VI (see attachment) has a tab control and on each tab window I have an intensity chart with a free-drag cursor.  Below the tab control window I am trying to display either the row or the column of data where the cursor is located, I can do this for each intensity chart individually.  I am trying to clean the block diagram up a little bit and instead of using 4 Waveform Graphs, I want to use only one, can the data that is displayed in the wave form graph is associated with which page is active on the Tab Control.  Can this be done?  And how can I do it?
    Thank you again,
    ~Daniel DeWitte
    Solved!
    Go to Solution.
    Attachments:
    Changing Waveform graph data.JPG ‏123 KB

    Simply wire the tab terminal to a case structure that switches the data going to the graph terminal
    (sorry,posting by phone, cannot look at your code...)
    LabVIEW Champion . Do more with less code and in less time .

  • Real time waveform graph in while loop

    Hi
    I have a VI which includes a subVI that reads data from an oscilloscope and presents the output in the form of a cluster made up of the initial time t(0), a time interval delta t and an array of voltage readings.
    This cluster can then be wired to a waveform graph in the usual way. All of this is situated within a while loop in my VI and on each iteration of the loop I obtain a waveform graph of the voltage readings starting at the same time t(0) and ending at the same time t. However I want my graph to begin at a time t(0) when I set my VI running and then continuously acquire and build up the data on each iteration of the while loop so after my VI has finished executing I have a complete graph of all the voltage readings acquired after the set number of iterations of the loop. I know on the Express X-Y Graph VI you can double-click the node and deselect the box that says 'clear data on each call' - if I could do this in my case that would be great but I can't use an x-y graph because I have an array of y-values to plot on each iteration.
    If anyone can help me out it would be much appreciated - I'm sure there must be an easy solution to this but I'm going out of my mind trying to find out what it is!
    Many thanks,
    Bex.

    As usual, you have several options.
    You can use an XY Graph by generating the X values yourself. This will ensure that you place the data exactly where you want it on the X axis. This is fast, but does involve a memory cost.
    You can use a Waveform Graph with a waveform input instead of the cluster you are using. Use the Build Waveform primitive instead of the bundler to make your waveform. Set the t0 values to the appropriate values (negatives do work, as do small numbers - time is in seconds, use the To Time Stamp primitive to convert from DBL to timestamp). Finally, you need to set the Waveform Graph to use the t0 values. Pop up on the Waveform Graph and make sure Ignore Time Stamp is not checked. Depending on your version of LabVIEW, you may have to pop up on the graph or the axis. When you unselect Ignore Time Stamp, you will probably want to reformat the X-axis again. The Waveform Graph clears data at each iteration, so you will need to replot all your data each time. Just create an array of waveforms and keep adding to it. The t0s will put the waveforms in the right places. Yes, this may cause memory problems.
    Finally, you can use the Waveform Chart, which does have memory. Create the waveforms like you did for the Waveform Graph and send them to the chart. It will remember what was sent to it from run to run. Make sure you set the Chart History Length (pop up on chart and select Chart History Length...) to long enough to hold your entire data. You can use a property node to get the data back at the end, if you need to.
    Good luck!
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Multiple Waveform Graphs

    Dear group,
    I have a user panel that contains three waveform graphs in which only one
    graph is visible to the user. All three graphs plot the contents of the same
    one dimensional array; although only one graph is being displayed all three
    graphs contain a plot of the array. The user selects whether to display
    graph 1,2 or 3 using a Dialog Ring.
    This is the question I have: is it better to have all three charts plotted
    simultaneously even though only one is being displayed or is it better to
    only plot the chart that is being displayed on the screen?
    In the case of the former do I use much more memory or slow down the
    execution of my program more than in the case of the latter?
    Thank you in advance,
    Luca

    My apologies, it should say graph instead of chart.
    Luca
    "Greg McKaskle" wrote in message
    newst5oc.86746$[email protected]..
    >
    > > In the case of the former do I use much more memory or slow down the
    > > execution of my program more than in the case of the latter?
    > >
    >
    > In part of your question you call the control a graph, and in other
    > parts a chart. The answer depends a bit on which you are showing and
    > hiding. Graphs only show the most recent data written to them, charts
    > retain and show history.
    >
    > Neither the graph or chart will have much overhead receiving data while
    > hidden. On the otherhand, it isn't zero either since they will at least
    > be doing a data copy so they can draw with correct data wh
    en shown.
    >
    > It will be easiest to send the data all the time since otherwise, you
    > will need to send fresh data when showing the graph. If dealing charts,
    > not only will you need to update the current data, but the history will
    > be old. You will need to clear or write the history.
    >
    > If it doesn't cause a problem, write to them always, but if you can
    > measure a problem or have spare time on your hands, add code to make the
    > update conditional and deal with the data when being shown.
    >
    > Greg McKaskle
    >

  • How to change the properties of waveform graph from time domain to frequency domain?

    Actually, I want my output waveform graph give me the answer in x-component in frequency instead of time after the FFT. My output waveform graph gives the x-components in time instead of frequency. How to change the properties of the waveform graph?

    vasus wrote:
    Hi,
           I amtaking sensor input signals through NI FPGA cRIO-9004. i am analysing this using wave graph. the problem is i am not getting accurate singal.How to decrease the frequency? 
    You are responding to a very old (8 years) thread, be aware that that might not be the best option.
    However, you want to decrease the frequency? or increase?
    What is the code you are running?
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Free memory after TDMS logging

    Hi, how can I free memory after reading TDMS files. I haev a very big TDMS file that contains 17000000 digital samples, after reading the data and graphing it I would like to delete it from memory because it is no longer needed. I have noticed I should close LabVIEW to free that space. Is there any way to free that memory after reading and plotting?
    Thanks

    LabVIEW wil take care of the memory management. Thus, there is no explicit way for you to free memory in LabVIEW. In fact, I don't think you should do that by yourself. LabVIEW has quite good memory optimation strategy and it wll track all the memory usage in your VI and reuse/free memory when there is no reference to it. As for TDMS, once the data is read out from the TDMS VIs, there will be no additional data copy inside.

  • Saving portion of data acquired from FPGA and visualize it on HOST RT Waveform Graph

    Hi all,
    i'm using FPGA to acquire data @1 Mhz from a Custom module in a SCTL an place it in a block memory Target Scoped FIFO1 Block memory of 1023 elements.
    What i want to do is acquire a known waveform and and visualize acquired data just to check if data is corrupted or if samples are correctly representing waveform.
    I'm reading data from FIFO1 and placing in a MEMORY in another SCTL to not affect 1st SCTL.
    My intention in this is to create a one shot reading operation to place 1023 elements from FIFO1 to MEMORY (attached pic).
    After this i have another while loop that perform communication with the HOST to read data from MEMORY.
    data type is FXP signed 24 bits word with 24 bit integer part. 
    I cannot visualize anything on the host waveform graph.. Can you tell me why?
    I've attached FPGA vi and HOST vi.
    Thanks in advance.
    Attachments:
    1.png ‏60 KB
    TEST acquired waveform.vi ‏170 KB
    Host Testing Acquired Data.vi ‏112 KB

    Hi Mariano,
    I need your complete project in order to review your application. Anywhere, you could try to run this example, that shows you the best practice in order to achieve data integrity ensuring no underflow/overflow events in data transfer.
    In RT VI you can try to use Type Cast function in order to obtain DBL values from FXP ones.
    Look @ this white paper that allows you to use floating point in FPGA side.
    I hope that the above informations will help you in solve your issue.
    Best Regards.
    CLA_CUP

  • My macbook pro model mid 2009 is running slow. free memory is 35 mbs and inactive memory is  1.36 gb with a total of 5 gb RAM memory

    Problem description:
    too much inactive memory 1.87 gb and free memory only 35 mb
    EtreCheck version: 2.1.1 (104)
    Report generated 10 December 2014 3:30:26 pm IST
    Hardware Information: ℹ️
      MacBook Pro (13-inch, Mid 2009) (Verified)
      MacBook Pro - model: MacBookPro5,5
      1 2.26 GHz Intel Core 2 Duo CPU: 2-core
      5 GB RAM Upgradeable
      BANK 0/DIMM0
      1 GB DDR3 1067 MHz ok
      BANK 1/DIMM0
      4 GB DDR3 1067 MHz ok
      Bluetooth: Old - Handoff/Airdrop2 not supported
      Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
      NVIDIA GeForce 9400M - VRAM: 256 MB
      Color LCD 1280 x 800
    System Software: ℹ️
      OS X 10.10.1 (14B25) - Uptime: 4:42:54
    Disk Information: ℹ️
      WDC WD5000LPVT-80G33T2 disk0 : (500.11 GB)
      S.M.A.R.T. Status: Verified
      EFI (disk0s1) <not mounted> : 210 MB
      [redacted] (disk0s2) / : 499.25 GB (142.01 GB free)
      Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
      HL-DT-ST DVDRW  GS23N 
    USB Information: ℹ️
      Apple Inc. Built-in iSight
      Apple Internal Memory Card Reader
      Apple Inc. Apple Internal Keyboard / Trackpad
      Apple Computer, Inc. IR Receiver
      Apple Inc. BRCM2046 Hub
      Apple Inc. Bluetooth USB Host Controller
    Gatekeeper: ℹ️
      Anywhere
    Kernel Extensions: ℹ️
      /System/Library/Extensions
      [not loaded] com.driver.KUSBModemCDC07 (4.0.2) [Support]
      [not loaded] com.driver.KUSBModemDataA07 (4.0.2) [Support]
    Startup Items: ℹ️
      JHHPortDetect: Path: /Library/StartupItems/JHHPortDetect
      Sudochmod: Path: /Library/StartupItems/Sudochmod
      Startup items are obsolete in OS X Yosemite
    Launch Agents: ℹ️
      [not loaded] com.adobe.AAM.Updater-1.0.plist [Support]
      [running] com.bjango.istatmenusagent.plist [Support]
      [loaded] com.google.keystone.agent.plist [Support]
      [loaded] com.oracle.java.Java-Updater.plist [Support]
      [running] jp.co.canon.CUPSCAPT.BG.plist [Support]
      [loaded] org.macosforge.xquartz.startx.plist [Support]
    Launch Daemons: ℹ️
      [loaded] com.adobe.fpsaud.plist [Support]
      [invalid?] com.adobe.SwitchBoard.plist [Support]
      [running] com.bjango.istatmenusdaemon.plist [Support]
      [loaded] com.google.keystone.daemon.plist [Support]
      [loaded] com.microsoft.office.licensing.helper.plist [Support]
      [loaded] com.oracle.java.Helper-Tool.plist [Support]
      [loaded] com.oracle.java.JavaUpdateHelper.plist [Support]
      [loaded] org.macosforge.xquartz.privileged_startx.plist [Support]
      [loaded] org.tcpdump.chmod_bpf.plist [Support]
    User Launch Agents: ℹ️
      [loaded] com.adobe.ARM.[...].plist [Support]
    User Login Items: ℹ️
      iTunesHelper Application (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
      Caffeine Application (/Applications/Caffeine.app)
      AdobeResourceSynchronizer ApplicationHidden (/Applications/Adobe Reader.app/Contents/Support/AdobeResourceSynchronizer.app)
      Dropbox Application (/Applications/Dropbox.app)
      HyperDock Helper UNKNOWN (missing value)
    Internet Plug-ins: ℹ️
      o1dbrowserplugin: Version: 5.38.6.0 - SDK 10.8 [Support]
      Default Browser: Version: 600 - SDK 10.10
      AdobePDFViewerNPAPI: Version: 11.0.09 - SDK 10.6 [Support]
      FlashPlayer-10.6: Version: 15.0.0.246 - SDK 10.6 [Support]
      Flash Player: Version: 15.0.0.246 - SDK 10.6 Mismatch! Adobe recommends 16.0.0.235
      QuickTime Plugin: Version: 7.7.3
      googletalkbrowserplugin: Version: 5.38.6.0 - SDK 10.8 [Support]
      SharePointBrowserPlugin: Version: 14.0.0 [Support]
      AdobePDFViewer: Version: 11.0.09 - SDK 10.6 [Support]
      zako: Version: zako 1.0.0.0 - SDK 10.8 [Support]
      iPhotoPhotocast: Version: 7.0 - SDK 10.8
      JavaAppletPlugin: Version: Java 7 Update 71 Check version
    User internet Plug-ins: ℹ️
      BlueStacks Install Detector: Version: Unknown
    Safari Extensions: ℹ️
      AdBlock
      ClickToFlash
      Awesome Screenshot
      Breaking News
      The New York Times
    3rd Party Preference Panes: ℹ️
      Flash Player  [Support]
      Java  [Support]
    Time Machine: ℹ️
      Skip System Files: NO
      Mobile backups: ON
      Auto backup: YES
      Volumes being backed up:
      Arupreet: Disk size: 499.25 GB Disk used: 357.24 GB
      Destinations:
      CHIKKI [Local]
      Total size: 331.41 GB
      Total number of backups: 2
      Oldest backup: 2014-06-10 13:36:00 +0000
      Last backup: 2014-09-08 13:57:40 +0000
      Size of backup disk: Too small
      Backup size 331.41 GB < (Disk used 357.24 GB X 3)
    Top Processes by CPU: ℹ️
          8% python
          3% WindowServer
          3% uTorrent
          2% SystemUIServer
          0% mtmfs
    Top Processes by Memory: ℹ️
      1.29 GB JavaAppLauncher
      123 MB SystemUIServer
      102 MB iStatMenusDaemon
      86 MB com.apple.WebKit.WebContent
      81 MB WindowServer
    Virtual Memory Information: ℹ️
      50 MB Free RAM
      1.97 GB Active RAM
      1.90 GB Inactive RAM
      673 MB Wired RAM
      6.70 GB Page-ins
      8 MB Page-outs
    Diagnostics Information: ℹ️
      Dec 10, 2014, 10:48:11 AM Self test - passed
      Dec 9, 2014, 02:54:15 AM VLC_2014-12-09-025415_Arus-MacBook-Pro.crash

    Not sure if using Terminal would help:
    Launch Activity Monitor
    Select Memory tab
    Launch Terminal
    type sudo purge
    password
    10-15 sec later Terminal should refresh and show freed memory & cache

  • How can I get the cursor value from a waveform graph

     Is there a way to get the value of cursor position on the waveform graph so mathematical calculations be performed on those values. We can see the value in cursor legend, but can we extract those values for future calculations in the block diagram somehow.

    Right-click on the waveform graph icon.  Select Create>Property Node>Cursor>Cursor Position.  That spits out a a xy cluster for the current cursor position.
    If you have more than one cursor, you can either set up a loop and set the Active Cursor property node (right click the property node and select "Change to Write") or you can pull everything you ever wanted to know about every cursor with the Cursor List property node. 

  • Set get parameter but free memory id is not working

    Hi All,
    I am using set get parameter  to transfer data from one module to another .
    But when i am trying to clear the memory id using Free memory id .
    it is not doing that.
    Does it work with import export.
    What method i should use to clear this memory id ..
    Thanks in advance
    ANit gautam

    Clears the memory:
    SET PARAMETER ID pid FIELD space.

  • How to get the data from a waveform graph?

    Hellow!
    I have a waveform graph which has the experiment signal, so how can i do to save the X,Y data in a file?
    thanks!
    Mike

    Hii,
           You can store the data as shown in the vi, just use the signal data by converting it into the numeric form and give it instead of random data.
    Hope this will help.
    Thanks,
    Nishant
    Message Edited by Nishant on 04-16-2006 11:21 PM
    Attachments:
    file write.vi ‏31 KB

  • Data acquisition and waveform graph plot

    Dear All
    My signal is out put of current transformer which is 2v dc. I succesfully configure usb 1208fs with labview8.2. Now I want to plot my input signal on the waveform graph in frequency vs amplitude(db). Can any one guide me how can i plot my data?

    Hi,
    Could you strip the VISA stuff and re-post your VI so I could run it and see where is the difference coming from. A few observations though
    1. Always try to wire from left to right and top to bottom so that your block diagram code is readable.
     2. A waveform graph gets completely redrawn everytime you give it soem data ao it is typically used outside any loops. If you want to display a waveform inside a loop, it is better to use waveform chart.
    Regards,
    Ankita

  • High cache usage of free memory

    I dont know if this is normal but my fresh archlinux x86_64 install with Xfce uses round 300Mb of 4Gb ram space after boot but then after i start and close some programs i get to 3 Gb used of 3.87 Gb free memory when all applycation are closed. Now i understand that kernel caches some data in memory but i cant clear it all with commands:
    sync
    echo 1 > /proc/sys/vm/drop_caches
    echo 2 > /proc/sys/vm/drop_caches
    echo 3 > /proc/sys/vm/drop_caches
    After i do that system reports 540 Mb used compared to 300Mb from boot. Is there a way to limit the ammount of cache usage so i dont end up having all free memory used by cache?
    Last edited by Anril (2009-12-29 13:19:52)

    Ram that is unused is wasted ram, the linux kernel manages it very well so no worries there.
    If you have swap usage it's because most probably you have things stored in the ram that are not being used often but cannot be discarded too so things being used more often take precedence.
    If you think you have enough ram for all your needs then why not disable swap? I've read that there might be a speed penalty for running without swap but I've been running my system without swap (arch64 4G ram) and I've never had any bad surprises.
    There are a few things that might prompt swap usage (don't quote me on that though, it just seems to me to be the case), if you copy many files from one place to the other the kernel will use all the ram available to try to cache them, if you copy many GB then all the ram will get filled (and maybe other things will get evicted to swap).
    It's not a bug, free ram is there to be used, things that have been used/needed recently get to stay in the ram, other things can go to the swap, if you can cache a file that has been recently used and need to use it again shortly after then it's much faster if it is in the ram instead of having to read it again from the hard disk. The logic behind it is good, it's just that some corner cases may make behave badly.

Maybe you are looking for

  • How do I stop the Finder from seeing SMB (Windows) shares on the network?

    I have the OPPOSITE problem most people have -- Windows Sharing works TOO WELL. I've donated a refurbished eMac to the local homeless shelter. I figured I'd made the system secure, and prevented any monkey business. Turns out the windows machines on

  • Date range From Fiscal period range

    Hi All, How can we get the date range for a given fiscal period range? please help. Thanks Gaurav Mittal

  • POSDM Multiple days in one file

    POSDM has received a file on one day which contains two days trading. How can this file be split in POSDM to reflect the data on the individual days? The /POSDW/STOREDAYCHANGEKEY process copies the data from one store/day key effectively duplicating

  • When will a camera raw plugin beavailable for the Nikon D810

    I recently purchased a Nikon D810 but can not see the images when I download them to either Lightroom or Photoshop.  I am told I need a new plug-in. When will onebe available?

  • Alv text display

    Hi expert, In alv report totals are displayed as "TOTAL", And i need to display grand total as "GRAND TOTAL" as a text, but it over write the text as "TOTAL" as "GRAND TOTAL". I will write the code below. FORM subtotal_text CHANGING p_total TYPE any