LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to see a particular portion of XY graph and save that portion only

Hi,

I want to see a selected range of data in the XY graph and save the same in text file. I also want to use this selected portion further in the program. Can somebody please help?

(I want to mention that the data in XY graph changes continuously when we run the program continuously.)

0 Kudos
Message 1 of 2
(1,813 Views)

That isn't that easy to answer.

 

First, an XY graph can have arbitrary data. So the signal can go back and forwards, up and down. If a selection is made, the signal doesn't have to be continuous.

 

Usually when I'm, in this situation, the X is time, with a dX that is always positive. So, the data is going from left to right. But, with an XY graph, it doesn't need to be.

 

Showing parts of the data can be done in two ways:

1) set the X range (x min, x max) to the desired values. The user can do this (with the graph tools), or you can do this by setting the graph properties. If the data graph updates, you'll need to turn of the X autoscaling, or the autoscale will automatically scale the X axis.

2) Get the data (from the source, a buffer or the graph) and get the part you're interested in. Show this in the graph.

 

If you visualize the data using 1), do the same trick as 2) to save the part. You can use the min\max info to get the subset.

 

If you visualize the data using 2), you can save this data, as it's already the right subset.

 

I guess that is it. But there are obviously lots of details involved. Give it a try, post what you have and\or let us know where you are stuck. The implementation details depend a lot on the rest of the program...

0 Kudos
Message 2 of 2
(1,803 Views)