LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to select and plot portion of a waveform chart?

I'm new in LabView and i'm currently aqcuiring data from a accelerometer(dynamic data) during several minutes, and plotting in a chart. I need to select only a part of the chart and plot in another one. 

I've seen similar posts, but they all use waveform graph and my boss specifically said to use waveform chart. Plase could someone give a direction?

0 Kudos
Message 1 of 8
(6,164 Views)

I think it will help you to understand the difference between a graph and a chart. They are essentially the same thing except the way that they handle the data. A graph will want a whole dataset to show, so the data that you write is the data you see. A chart has its own built-in memory of past data and you only need to write sections of the data at a time that you want to display. So you write 1 data point, it already has old data, and just adds the new data point to the edge of the chart and shifts everything over.

Here's a good example.

 

 If you're trying to plot a section of data between two known timestamps, you want to use a graph.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 2 of 8
(6,160 Views)

Thank you James! It really showed me the difference between chart and graph!

But i need to see the entire data (from t=0 until t=5min) when the VI stops, and sometimes zoom some parts to select which part is valid or not, and then plot the valid part in another graph. It's possible?

My solution would something like that but for waveform chart (wich don't have cursor): https://decibel.ni.com/content/docs/DOC-22642

 

0 Kudos
Message 3 of 8
(6,143 Views)
You won't have the entire dataset when the VI stops unless you have set the history long enough. Apparently you are still confused about the differences. You have the history property node which is an array that can be saved.
0 Kudos
Message 4 of 8
(6,138 Views)

What i mean by the entire data is that i can see using the zoom palette all the data of the scope chart. What i need is to plot another graph with only a valid interval using the zoom in or some other tool.

0 Kudos
Message 5 of 8
(6,126 Views)

Since you don't have cursors on charts, it get's a little tricky.

 

You could use the zoom tools to zoom the chart to a specific range and then have a button to plot the current zoomed range on a graph elsewhere. This would be a simple event trigger by a "Capture" button that pulls the scale Min/Max and grabs that section of the data from the chart and plots it on a chart.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 6 of 8
(6,115 Views)

Yes James! This is what i need! But how can be done? I understood what you said but can i implement a event trigger to capture the zoomed chart?

0 Kudos
Message 7 of 8
(6,112 Views)

I don't know how your application is set up, but I assume you have some sort of user interface. If it's not using an event structure, shame on you because it should. Smiley Happy

Here's a simple event structure I threw together that should do what you want.

I found it easier to use an XY graph to graph all the individual points. Since your Chart History outputs an array of separate waveforms, it's kind of a pain to sort through them and come out with a single clean waveform with a single dt/t0 that match for a waveform graph...

Example_VI.png

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 8 of 8
(6,094 Views)