LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform graph

the waveform graph when acquire data moves the previous data towards right making whole data to display in reverse. i want to make the data display from left to right not right to left of display pane. can anyone help with this

0 Kudos
Message 1 of 3
(901 Views)

As a first step, attach your VI. (preferably use "save for previous", 2020 or lower).

 

  • Do you have a chart or a graph (big difference!).
  • Data in a graph does not move anything! It display whatever is wired to it. The x scale would go backwards if dx is negative, if you set it to "inverted",  or if you accumulate data in a shift register and prepend instead of append new data.
0 Kudos
Message 2 of 3
(878 Views)

Please see the response I just made to your Post "XY Graph", where I try to explain to you the difference between a Graph and a Chart (you want to be using a Chart).

 

You should also (probably) learn what a "Waveform" means in LabVIEW -- it is a data-type that NI "invented" to simplify the storage of sampled data.  I assume you know about Arrays in LabVIEW -- are you also familiar with the data type called a "Cluster"?  It is a way of grouping (named) elements that can describe a single "organization" of data.

 

In particular, a Waveform Cluster has the following components:  a TimeStamp (t0) representing the time of the first sample in the Waveform, the sampling interval (dt), expressed in seconds, a fixed-size Array (Y) of data, and an optional variant (attributes) you can use as you see fit.

 

Try this example (very very simple, to illustrate a simple point).

Simple Waveform Graph.png

You should be able to re-create this for yourself.  But it is also a LabVIEW Snippet, so if you open LabVIEW, right-click the image, and drag it to a blank Block Diagram, it should "populate" it with LabVIEW code.  Some things to note:  make the chart fairly wide -- you want to fit 1000 points in.  Also, right-click the Chart (on the Block Diagram), choose Properties,  go to Scales, and set the X-Axis to 0 Minimum and 1000 Maximum (otherwise it will use a default of 0 to 100, and you'll see the plot start "moving to the left" as it plots the latest 100 points).

 

Bob Schor

 

0 Kudos
Message 3 of 3
(876 Views)