LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving an XY graph.

Solved!
Go to solution

Could anyone point me in the right direction? I'm trying to save the data in an Express XY graph to a file in two columns.

 

It's a "1D array of cluster of 2 elements"

0 Kudos
Message 1 of 4
(3,108 Views)

Autoidex on a FOR loop, use "cluster to array" inside the loop, and autoindex at the right border to create a 2D array. Write it to a file.

 

See below

0 Kudos
Message 2 of 4
(3,100 Views)
Solution
Accepted by topic author glskinner84

@glskinner84 wrote:

Could anyone point me in the right direction? I'm trying to save the data in an Express XY graph to a file in two columns.

 

It's a "1D array of cluster of 2 elements"


No, it is a "1D array of Clusters of 2 elements where each element is a 1D array" That's important!

 

(I never use express VIs, but xy graphs also accept 1D arrays of points, where each point is a cluster of and x and y scalar. I thought that's what you had.)

 

Each (outer) array element is one plot and since you only have one plot, you need to index it out first. Then just unbundle and built into a 2D array. Transpose if desired.

 

 

(Of course using the express VI is overkill. A plain bundle (or RE/IM to complex) would suffice to generate the xy data for the graph.) 

Message 3 of 4
(3,093 Views)

 Thank you sir. I was trying to unbundle without indexing it appropiately. Thanks!

 

And, I am using the express because I need to retain the data for each iteration. I had some trouble using a standard xy vi. I also had trouble with clearing the graph while my vi was running. The reset input did the trick. 

0 Kudos
Message 4 of 4
(3,079 Views)