Waveform graph number of points

Hi,
In my app I´m receiving data (a 10Hz sine wave) continuously (serial port) and plotting it on a chart and on a graph. After several number of points plotted, about 18000, the sine wave appears wrong on both waveform chart and graph. Is it a problem with memory?
Thanks,
Celia 
Attachments:
plot.doc ‏195 KB

Hi Celia,
the vi seems to be ok.
But as I told you before:
You collect your data in the "array" by using "build array" function - this is ok so far. The you feed those data to the "array" indicator - and also to the "waveform chart". And probably here is the problem: You feed the chart with an array when you should only feed the single values! The chart has it's own memory called "chart history" (you set it to 250 values)!
The more values you collect the bigger memory blocks LabView has to allocate/calculate/move in RAM! And you keep on moving memory blocks from shift register to "array" indicator, chart AND graph. All three indicators have their own memory copy of the data, and in each iteration LabView has to allocate bigger memory blocks for each indicator. This takes it's time...
And due to this behaviour the iteration time is getting longer resulting in "undersampling" of your sin wave...
When you need constant iteration time, you should separate DAQ and display into different loops connected by queues. There are plenty example coming with LabView and also here in the forum!
I added your vi, slightly edited. Read the comments in the last frame! (You don't need a sequence here, it's all in the dataflow )
Message Edited by GerdW on 09-18-2007 09:42 AM
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome
Attachments:
RecWaveChart2.vi ‏95 KB

Similar Messages

  • Waveform graph - Number of major ticks on x scale

    Hello all!
    I'm trying to display meteorological measurements throughout a day in a minute resolution. For that purpose I'm using a Waveform Chart with fixed length on x-axis (0-1440). However, major ticks are distributed by 100, i.e. 0, 100, 200, 300, ..., 1400, 1440. How can I distribute these points by 60, so that I can put hour labels 00:00, 01:00, 02:00 etc.
    Thanks!
    Regards,
    Marko.

    There is a Marker Spacing property to which you can write a custom array. This sets the scale Marker spacing to arbitrary.  See attached vi as an example.  Work still needed to make it look acceptable regarding labels.
    You could make the marker every 1 hour, the minor tick (not labled) cannot be controlled,  A long chart will have 10 minute minor tick
    - half the size of the chart and it will be 20 minute
    If you want continuous output I think you need to use a Waveforn Chart rather than a Waveform Graph with chart history length set to 86400 (number of seconds in 24 hours
     

  • How do I determine the number of plots on a waveform graph?

    How do I determine the number of plots that have previously been plotted on a waveform graph? I am loading dynamic data from a file. If I convert to an array and size it and there is only one plot, I get the number of data points and I don't know how to tell the difference.

    Usually by reading the graph terminal or a local of it and determining the first or second dimension (not sure which at the moment) size of the resulting 2 dimensional array. If it is a 1 dimensional array you have either only one plot or an array of clusters each representing one plot. But as these data types are determined by compile time, there shouldn't be a problem with this causing ambiguity.
    Rolf K
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Waveform-Graph - Specify number of divisions (lines)

    Hello,
    is there a way to set the number of vertical and horicontal lines in a waveform-graph?
    I want to change the look that it looks like an osciloscope-display with 10x8 divisions.
    Is this posibble?
    Thx

    Hi OnlyOne,
    so you don't want to use gridlines? You want some kind of overlay?
    Options:
    1) Put a picture indicator on top of your graph. Make it transparent background. Draw lines as needed - and you can choose any color...
    2) In LV8+ you can put a picture in the background of a graph. So create a picture like in point 1 and set it as background in your graph (using property node).
    3) Create property nodes for your decorations and change the color of those lines: Open reference to vi, get panel -> decorations[] -> colors... Or use the coloring tool ("brush") at edit time!
    Why not use gridlines of the graph?
    Message Edited by GerdW on 05-14-2008 01:28 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Programmatically Changing Waveform Graph and the number of plots

    I have a waveform graph that needs to display a variable number of plots based on the number of inputs.  Is there a way to programmatically adjust the number of plots displayed on the waveform graph?

    You need to use the Active Plot input before the Plot Name(s).  Property nodes are read from top to bottom so you can alternate several pairs of ActPlot,Plot.Name;ActPlot,Plot.Name, etc.  Then wire 0,1,2,etc to the ActPlot and your chosen name to the Plot.Name right under it.  Or, use for loops and index the ActPlot input.  See the pic.
    Using LabVIEW: 7.1.1, 8.5.1 & 2013
    Attachments:
    plot names.JPG ‏37 KB

  • How do I get the reference numbers for cursors in a waveform graph (other than through an event structure)?

    I want to control cursors in a waveform graph programmatically.  I've tried using the "Cursor list" property, modifying the cursor clusters and writing the results back to the cursor list property, but this only works sporadically.  Modifying the cursors by ref number works well, but you have to get the refnumbers  from an event structure during a cursor event.  Is there any way to get cursor reference numbers aside from through an event structure?
    Thanks!

    Hi barryinbo,
    On the controls pallette, go to refnums> Control refnum>Control. Then right click the refnum and point to select vi server class>Generic > and you will see a cursor there. This will be a "loose typed refnum" but you can right click the refnum to include data type. An alternative is to drag a cursor to the refnum, this will make it strict typed.
    Hope this helps
    Chris Co.

  • Waveform chart number of clusters

    I am in the process of modifying a VI worked up by one of my coworkers.  My setup has 4 waveforms coming into a "Bundle" block and then the resulting cluster going to a waveform chart.  My coworker's VI was working with 8 waveforms.  When I copied his waveform chart into my VI and tried to connect the bundle of now 4 waveforms to that waveform chart, it gives me the error "You have connected 2 clusters with different contents.  Clusters (unnamed), a cluster of 4 elements, conflicts with cluster waveform chart, a cluster of 8 elements."  How do I change the number of elements that the waveform chart is expecting?  I've been poking around at it for a couple hours and havn't found a solution.  I tried creating a new chart but can't figure out how to make it accept clusters instead of the default double precision input.  Let me know if you need more description.  Thanks.

    I don't think it's possible to send in a cluster of waveforms to a waveform chart at all, regardless of how many waveforms are in the cluster. To send in multiple waveforms into a waveform chart, build them into an array of waveforms.
    You do need to bundle scalar data into a cluster when sending multiple single-point signals into a waveform chart so that the waveform chart doesn't confuse an array of separate signals with an array of values from one individual signal.
    Charts automatically change to the data type that is input into them. By default, they're scalar doubles. If you wire a cluster of scalars into them, then they change into scalars. My guess is you had a waveform chart configured to be a cluster of scalars, and then you were trying to wire an cluster of waveforms into it.
    In any case, always refer to the example Charts.vi in the Example Finder (Help >> Find Examples from LabVIEW) for examples of properly sending in data to waveform charts. For waveform graphs, the example is called Waveform Graph.vi, and for XY graphs the example is called XY Chart.vi. Hope this helps!
    Jarrod S.
    National Instruments

  • How to stop the counter after getting maximum amplitude from a waveform graph?

    I am using accelerometer, optical encoder and daq card (PCI MIO 16XE10) for my tyre balancing project. Basically i am trying to stop my edges count from the optical encoder to get the position for putting the mass for correcting the balancing. Could anyone please help me by telling me how i can achieve it or is there any other ways to get the position using the daq card? One more thing, could anyone tell me how to change the waveform graph to frequency domain instead of time domain?

    Time to Freq is easy. 1/time = freq. example. 1 msec period = 1000 hertz (1kHz).
    I guessing you are attempting to design a new spin balancer for tires. I would record the entire "spin cycle with index count" then search the resulting waveform for the max amplitutes. Correlate the indexes and that should give you the high point and location. You might want to count the number of revolutions, then grab that 60% of that number of peaks.

  • I would like to see the time in a waveform graph (real-time​)

    i need the x-axis of the waveform graph to show real time (from the computer clock). I have made a program with all the example. He read and log data when the chosen time has elapsed. the program work's well...but i dont't know why the x-axis blink every time he draw a point
    i can see two x-axis in the same time.
    i give you a picture of one of a part of my program, i hope someone can help me
    Attachments:
    my_software.JPG ‏128 KB

    Hi,
    I tried to reproduce what you were getting by building a simple VI but I havent had much luck (I have attached the VI).
    Could you post your code so that I can take a look at it?
    Feroz P
    National Instruments
    Attachments:
    Graph.vi ‏39 KB

  • 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

  • How to connect with waveform graph?

    hi
      i would like to know how to simulate wave form graph the input is randon number ?My problem is i cannot connect with wave form graph...
    can u show me example..like using arrary...or something else..i looking forward ur reply
    thank u

    I have an example that you may want to look at here.
    The example was for a signal generator, but there is a waveform graph to show the selected waveform.  It is an extremely basic program, but might be a good start.
    RayR

  • Y scale flip in waveform graph when using property node.

    I'm having problem with property node. I'm trying to build a stackable scope with Waveform Graph And dynamically change the number of plots. It is working. But The Y scale is flipping. The minimum goes on the upper part and the minimum scale goes down. when I change it appearance it's not very fast. It take about 1 or 2 second on my computer.
    The way it is build actually is:
    Cluster_1 is containing 8 clusters. And each of the 8 clusters are containing a Waveform Graph. By reference I change the property of each Waveform to make visible or not each of the Waveforms.
    First I would like to solve the scale problem and second accelerate the redrawing of my scope.
    Maybe there is an other way t
    o do what I need.
    Thanks.
    Nitrof
    Attachments:
    MultiScopeExample.llb ‏192 KB

    Wow, you have a neat program! The problem with your y axis flipping is because the last four charts in the cluster were programmed with a flipped axis. I relabeled the charts and it worked correctly.
    From what I could tell with your code, you do not need the sequence structures. The one inside of the even actually runs the same code twice. Remove this duplication and you should see improvement. Also clusters are slow, so you should not expect it to blink back with additional coding. Use defer panel updates to get that behavior. I incorporated these changes and attached the program.
    Jeremy Braden
    National Instruments
    Attachments:
    MultiScopeExample.vi ‏163 KB

  • Bug in Digital Waveform Graph X-Axis

    Hello,
    I am making separate queried to a database to retrieve analog and digital data over the same time period.  The data were logged at 2 second intervals.  I have verified that both result sets return the same number of values with the same t0 and dt.  I then plot the analog values on an XY Graph and the digital values on a Digital Waveform Graph.  I then use property nodes to sync the two graphs (left and right plot bounds, XScale.Range, and Cursor Position.X).  After doing this, I can see that the datasets do not line up between the two graphs.  The data on the Digital Waveform graph ends several seconds sooner than the analog data.  The x scales of the graphs appear to match but the plots don't align in time.
    Has anyone else observed this behavior?  Is there any work-around?
    Thank you,
    Peter

    There is a much simpler way to synchronize these charts. Just use a stacked chart.
    If you use a bundle function you can take two signals (almost data type) and wire them into a Waveform Chart together.
    Then on the front panel right click on the chart and select Stack Plots
    Since you only have 1 X axis now they are instrincly synched and will always write valules at the same time and update the UI together. You can skip all of the scale synching....
    Since the data you are working with has lincked time stamps, the data will need to be matched, (make sure the samples are anyched and each itteration both would have the same number of samples.
    The last allternative would be to strip the time stamp off of your data then build a new data structure, with the digital data, analog data and 1 set of matched time stamps. You can then plot this on an XY chart using the time stamp for the X axis for both of your other plots.  Let me know if you have other questions.

  • Digital Waveform graph with a lot of samples

    Hi,
    I have to display in a Digital Waveform Graph a lot of data read from a file(2.000.000 of samples for 36 signals). If I read the file and I try to display all the data, the Vi became unusable. For example, to zoom a graph region, it may take 30-40 seconds, scroll is impossible ecc, ecc..
    Apparently LV doesn't perform a decimation of points. In measurements studio 8, this problem doesn't exist...but I have to use LV 7.1..
    any suggestion ?
    At the moment I have developed a DLL in VC++ that perform a decimation of samples, but performance are not very good !
    Thank you for any idea.
    Regards.

    Hi Garraty,
    Excuse me but I have several questions for you.
    1)     Have you tried some kind of incremental approach, starting from 1 waveform and increasing towards 36? Do you experience some kind of on/off degeneration between, les’s say, 34 and 35 waveforms?
    2)     How can you decimate a digital pseudorandom sequence of 2M samples without loosing information?
    3)     Is this 2M samples an unavoidable constraint for your application?. Actually, it seems very difficult to extract some kind of visual information from a pseudorandom pattern of this length?
    Thank you very much.
    Kind Regards
    FiloP
    FiloP
    It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong.
    Richard P. Feynman

  • Control Waveform Graph - Set Lower Limit and Autoscale Upper Limit

    In a waveform graph is their a way to set the lower graph Y limit at zero and then have it autoscale the maximum Y limit as a percentage (150% for example) of the maximum Y graph value ?
    Direction to examples or a starting point to read up on would be great !
    Thanks,
    Joe
    Ireland
    Solved!
    Go to Solution.

    Turn off autoscale and set the max with a property node based on the array max of the data.
    LabVIEW Champion . Do more with less code and in less time .

Maybe you are looking for

  • Moving I-Tunes to an External Drive

    I recently bought an external hard drive and want to move my entire Music Library to the New Drive. What files/folders need to be moved in order for my I-pod to see them and Sync properly? Do I just move the I-tunes folder or do I need to have some o

  • Flash Player doesn't work with Windows 8.1

    Just purchased a new computer it has Windows 8.1 on it--Wanted to watch a You Tube video---and it said to update Flash Player--well It doesn't work at all.  Nothing I can do to make it work---any ideas on how I can get this to work--or what ever it t

  • Converting Movie for iPod

    So, I have an .MPG file that i want to work on an ipod... but when i do the whole Advanced > Convert Selection for iPod thing which turns it in to an .MP4 file... the sound of the movie goes away. Is there a way to fix it so it doesnt... or is there

  • Multivalue parameter values

    @partno is defined a multivalue parameter when I enter a single part number or leave it empty data is properly returned. when I enter multiple part numbers data is not returned.  I have tried:  604-02394, 604-03492 in the parameter prompt. I have tri

  • Can I make Animations without a new layer for every frame?

    I'm tired of having to put a new layer, new frame every second. So is it possible I can maker 2 layers for example, 1 for background and the other for the character?  Also incluing the  bunch of frames for the characters movement.