LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY graph multiplot

Solved!
Go to solution

Hello,

I want to plot a multi measurement in the same plot XY graph, but when I click to remeasure its plot the new measurement in the same plot. So, its connect the last value of the previous measurement with the first value of the next measurement i.e its doesn't create a new array but its just append the new values to the previous array. how can i create a new array on each call or just delete the line between this two values.

 

Thanks

0 Kudos
Message 1 of 13
(1,285 Views)

What format is your data in?  If you are using an array of XY pairs, they need to be combined for the graph using Build Cluster Array.

XY graph.png

0 Kudos
Message 2 of 13
(1,266 Views)

Actually I tried this build array cluster.

I attached my VI.

0 Kudos
Message 3 of 13
(1,258 Views)

Depending on how your data is stored one of these two methods may be better:

 

ArrayOfClusterArraysMultiPlot.pngArrayOfClustersMultiPlot.png

0 Kudos
Message 4 of 13
(1,255 Views)
Solution
Accepted by topic author BENTATA

@BENTATA wrote:

Actually I tried this build array cluster.

I attached my VI.


Remember that when you just send your VI, we don't get your entire hierarchy (type defs, sub VI's, ect)
Here's a link that talks about using projects to better transfer your work.

 

A few notes:

1) These solutions are used in place of the "Build XY graph," express VI's

2) You may want separate your states a little more a common cycle is:
     Initialize Instruments  -> Configure -> Read Data -> Display Data -> Read Data ... ->Save -> Disconnect Instruments -> Exit

Message 5 of 13
(1,251 Views)

But in my states I need to recycle without deleting the previous data and to plot my new data in the same graph.


@JScherer wrote:

@BENTATA wrote:

Actually I tried this build array cluster.

I attached my VI.


Remember that when you just send your VI, we don't get your entire hierarchy (type defs, sub VI's, ect)
Here's a link that talks about using projects to better transfer your work.

 

A few notes:

1) These solutions are used in place of the "Build XY graph," express VI's

2) You may want separate your states a little more a common cycle is:
     Initialize Instruments  -> Configure -> Read Data -> Display Data -> Read Data ... ->Save -> Disconnect Instruments -> Exit



@JScherer wrote:

@BENTATA wrote:

Actually I tried this build array cluster.

I attached my VI.


Remember that when you just send your VI, we don't get your entire hierarchy (type defs, sub VI's, ect)
Here's a link that talks about using projects to better transfer your work.

 

A few notes:

1) These solutions are used in place of the "Build XY graph," express VI's

2) You may want separate your states a little more a common cycle is:
     Initialize Instruments  -> Configure -> Read Data -> Display Data -> Read Data ... ->Save -> Disconnect Instruments -> Exit


 

0 Kudos
Message 6 of 13
(1,222 Views)

@BENTATA wrote:

But in my states I need to recycle without deleting the previous data and to plot my new data in the same graph.



You can do this using property nodes.  Here's an example.

XY graph plots.png

You can use the reference to the XY graph control to do this in a subVI if it suits your code structure (I couldn't look at your VI as I only have LV2015).

 

Andy

Message 7 of 13
(1,216 Views)

@PsyenceFact wrote:

@BENTATA wrote:

But in my states I need to recycle without deleting the previous data and to plot my new data in the same graph.



You can do this using property nodes.  Here's an example.

XY graph plots.png

You can use the reference to the XY graph control to do this in a subVI if it suits your code structure (I couldn't look at your VI as I only have LV2015).

 

Andy


Thanks very much for your help, Could you please tell me how to make my data output as yours  (from a 2D array to a cluster of two elemets). I tried convert array to cluster but it doesnt work.

0 Kudos
Message 8 of 13
(1,205 Views)

@BENTATA wrote:

Thanks very much for your help, Could you please tell me how to make my data output as yours  (from a 2D array to a cluster of two elemets). I tried convert array to cluster but it doesnt work.


Array To Cluster only operates on a 1D array.  You need to use Index Array to get the two rows of your 2D array (presumably containing X and Y data) then Bundle to create the cluster.  This can then be turned in to an array.

 

XY Graph.png

0 Kudos
Message 9 of 13
(1,198 Views)

Thank you for your help, I tried to connect the read value + the new data in the write value as you did but it didnt work.

0 Kudos
Message 10 of 13
(1,190 Views)