LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory problem using Wave form Chart in Lab View 7.1

Hi,
I am getting memory problem using Waveform Chart in LabView 7.1
Please see the attached word document
0 Kudos
Message 1 of 5
(3,580 Views)

Please attach the real VI and an example data file. It is impossible to troubleshoot from a clipped image of the block diagram.

  1. Why are you writing everything via value properties instead of the plain terminal of the chart?
  2. What is the chart history size?
  3. Why are you getting a new t(0) for each iteration? Since you start out with 2D data, all you need is to graph the plain array and set t0 and dt via a property node once outside the loop. It makes no sense to generate a t0 from the playback loop, because the timing has no relation to the data. It makes no sense to built a waveform at all.
  4. Why is there a shift register if you don't use its output?
  5. Why is the terminal of the chart a control instead of an indicator?
  6. What is your definition of a memory problem? Can you give a bit more detail on the exact nature of the problem (crash, slowdown, error popup, ...)
  7. ...?
0 Kudos
Message 2 of 5
(3,573 Views)

Hi,

Please see the attached sample code in Zip format

0 Kudos
Message 3 of 5
(3,566 Views)

OK, this is going to be tough! The diagram is way too big to for any serious debugging and In don't have any of your hardware so I cannot run the VI. At what point does the memory problem occur? Righ after start or after a while?

You are completely misunderstanding the spirit of dataflow programming and are using value property nodes for everything. This is very expensive because these are synchronous. Let's have a quick look at the "info bar" subVI. All controls and indicators are not connected to anything and all code is interfaced to them via value property nodes. You use 10 property noes where NONE are needed. This is just an example, that problem is pervasive throughout your entire program.

Here's an image of your code and a quick alternative that does NOT use any property nodes.

Your outer event structure has no purpose because it is not in any loop and thus cannot service any events once one event has occurred. Every later event (e.g. mouse down on the tab control) will get queued up until eternity. Not good!

You are writing to a signaling property of the "sine" graph, but there is no event listening to it. Why????

You are wiring file references across case structures and some cases are not wired through (= use default). This means that the reference becomes invalid and the original reference can never get closed later.

You don't need to read from an empty hidden chart to clear the history, just use a diagram constant!

etc. etc. etc......

Here's another small example (see notes on picture). Your entire code is full of such problems:

The problems are way too numerous for an easy fix or to really pinpoint where the memory problem originates. I would really suggest to sit down and learn about proper program design! Do a few turorials! Look at the examples that ship with LabVIEW! Who wrote this program?

After you are more familiar with LabVIEW, delete all your code and start over with a clean state machine architecture, a few shift registers, and NO value property nodes. Make sure it does not exceeed the size of your monitor.



Message Edited by altenbach on 12-18-2007 11:57 PM
Download All
Message 4 of 5
(3,556 Views)
 


Message Edited by JoeLabView on 12-19-2007 09:50 PM
0 Kudos
Message 5 of 5
(3,488 Views)