LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

extract x, y values from a waveform graph

I have a waveform (x, y) graph that has n number of plots in it.  Is there a way to extract the (x, y) data for each plot?  I can edit the sub vi that creates the graph and get to the data as it is being generated, but I though it would be more convenient to extract them from the graph.  I've been looking around the graph property nodes but haven't found anything that appears to give me access to the underlying data that's being plotted.

 

Jim12345678_0-1721329760016.png

 

0 Kudos
Message 1 of 20
(708 Views)

Hi,

 


@Jim12345678 wrote:

I have a waveform (x, y) graph that has n number of plots in it.  Is there a way to extract the (x, y) data for each plot?  I can edit the sub vi that creates the graph and get to the data as it is being generated, but I though it would be more convenient to extract them from the graph.


So you can access the data source (your subVI creating the plot data), but you still want to read the point data back from the data sink (our graph)?

Why should this be "more convenient"???

 

The data of each plot is in the wire going to your graph terminal! No need for property nodes…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 20
(698 Views)

The property you're looking for is the "Value" property, which will return an array of clusters of X and Y arrays.  😕

 

GerdW is right that it would only be the same data you are feeding into the graph, just requiring a lot of extraneous code for no reason.  Furthermore, I don't think you can even unbundle the array's data, since there won't be any until run-time so you end up with a broken VI.

 

Just wait until your data generation is done and use the standard cluster and array VIs to extract what you want as Gerd explained.

 

If you need more specific help, please post your VI.   

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 3 of 20
(665 Views)

@Jim12345678 wrote:

I have a waveform (x, y) graph that has n number of plots in it.  Is there a way to extract the (x, y) data for each plot?  I can edit the sub vi that creates the graph and get to the data as it is being generated, but I though it would be more convenient to extract them from the graph.  I've been looking around the graph property nodes but haven't found anything that appears to give me access to the underlying data that's being plotted.

 

Jim12345678_0-1721329760016.png

 


Right click on the plot and select export then pick clipboard, excel or image: 

 

Jay14159265_0-1721341028118.png

 

 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
Message 4 of 20
(646 Views)

I tried tinkering with the value property but never got anywhere with it.  I couldn't find a way to get to the data.  I'd try to unbundle but just got an unidentified dead end.

 

Jim12345678_0-1722001712307.png

 

0 Kudos
Message 5 of 20
(566 Views)

Hi Jim,

 


@Jim12345678 wrote:

I tried tinkering with the value property but never got anywhere with it.  I couldn't find a way to get to the data.  I'd try to unbundle but just got an unidentified dead end.


Why do you need to tinker with a property node when there is a wire holding all the data you need?

Where do you wire the data into te graph?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 20
(560 Views)

I don't.  I have my code doing what I need it to do, but the underlying VI is exporting the same data twice.  There's no reason to do that if I can get to the data in the graph.  It's one less thing I have to keep track of if I can just use the graph.

0 Kudos
Message 7 of 20
(554 Views)

Hi Jim,

 


@Jim12345678 wrote:

It's one less thing I have to keep track of if I can just use the graph.


It's more to keep track of instead of less!!!

 

You still don't understand "THINK DATAFLOW!", don't you? The data source provides all you need, why do you need to tinker with the data sink?

 


@Jim12345678 wrote:

I have my code doing what I need it to do, but the underlying VI is exporting the same data twice. 


How and where does the "underlying VI" (aka subVI?) "export the same data twice"? (Why do you need to "export" the same data twice?)

 

Generic answer: we cannot help you with your problem when all you provide is an image of a property node with an IndexArray and Unbundle function…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 20
(546 Views)

@Jim12345678 wrote:

I tried tinkering with the value property but never got anywhere with it.  I couldn't find a way to get to the data.  I'd try to unbundle but just got an unidentified dead end.

 

Jim12345678_0-1722001712307.png

 


(Without looking at your code directly/not as an image, I have to use my magic 8 ball, but...)

 

Switch from "unbundle by name" to "unbundle" and you should see some data.

Message 9 of 20
(524 Views)

@Jim12345678 wrote:

I tried tinkering with the value property but never got anywhere with it.  I couldn't find a way to get to the data.  I'd try to unbundle but just got an unidentified dead end.

 

Jim12345678_0-1722001712307.png

 


Why would you wire zero? That's unnecessary. It is your fault that the cluster elements don't have labels, so unbundling by name cannot work, but a plain unbundle will.

 

As has been always said, we cannot debug pictures and we can't really tell what kind of clusters are in the array. (there are several possibilities for that pink datatype).

 

As has been repeated before, there is absolutely no reason to use a value property node here (Even a local variable (yuk!) would be better!). Once you show us a simplified version of your entire code architecture, we can give more specific advice.

 

0 Kudos
Message 10 of 20
(515 Views)