07-18-2024 02:14 PM
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.
07-18-2024 02:37 PM
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…
07-18-2024 03:35 PM
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.
07-18-2024 05:18 PM
@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.
Right click on the plot and select export then pick clipboard, excel or image:
07-26-2024 08:51 AM
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.
07-26-2024 09:06 AM
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?
07-26-2024 09:14 AM
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.
07-26-2024 10:05 AM
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…
07-26-2024 11:06 AM
@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.
(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.
07-26-2024 12:06 PM - edited 07-26-2024 12:08 PM
@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 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.