LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

xy graph cluster resize

Solved!
Go to solution

Hello,

 

In a previous version of the program, I had used a XY graph, input was a cluster of 3 elements. 

now i need to add 2 more elements to the display. 

 

The XY graph does not accept this new cluster of 5 elements..

I tried creating a new XY graph, this also is notable to accept the new cluster.

I tried the suggestion in the previous forum on clusters, with no luck

http://forums.ni.com/t5/LabVIEW/What-makes-a-cluster-unresizable/td-p/892805/page/3

 

Is the max size of cluster, input to XY graph 3? if so what else can I use to display a cluster of five elements?

 

Thanks,

Pallavi

Thanks...

Pallavi
Download All
0 Kudos
Message 1 of 10
(3,713 Views)

XY graphs don't accept clusters of five elements (or three elements). What gave you that idea???

 

An XY graph accepts for example the following:

 

  • A cluster of an x-array and y-array for a single plot and an 1D array of such clusters of size N for N plots.
  • A 1D array of complex data for a single plot or a 1D cluster array of such array for multiple plots.
  • An array of points (a point is a cluster of exactly two numerics) or a cluster array of such arrays for multiple plots.
  • etc.

See for example this post for a solution using complex data.

 

Please attach your VI for improved help.

 

0 Kudos
Message 2 of 10
(3,708 Views)

Altenbach,

 

I've attached the part of vi plotting the values from a pid controller..( all double values)

the XY graph named "Process Value, Set Value V/s Time" shows as cluster of 3 elements.

this works fine as is..

I want to plot 2 more elements in addition and for this I need to increase the size of the XY graph "Process Value, Set Value V/s Time" cluster size to 5...

 

I'm using LV8.5

Thanks...

Pallavi
0 Kudos
Message 3 of 10
(3,699 Views)
Solution
Accepted by topic author Palchen

I have posted a snippet because I can't save back to 8.5. You are implementing this incorrectly. I believe what you want is what is shown below. Just add a new array and cluster for every additional plot you want to add. Let me know if this isn't what you want.

 

Message 4 of 10
(3,693 Views)

First of all, your x-values are spaced equally in time, meaning there is absolutely no need to even use an xy graph. A plain waveform graph is sufficient. You could even use a chart.

 

From the way you were bundling five scalars in the first image of this thread, it almost seems to me that you intended using a chart all along, maybe?

 

Anyway, here is a comparison using xy graph, waveform graph, and waveform chart. Modify as needed. (there are many more ways to do this)

 

For the waveform displays, all you need is set the axis increment according to dt to make the x-axis correspond the the correct timing.

 

 

 

Download All
Message 5 of 10
(3,682 Views)

Greg,

 

the implementation u've shown seems to correct my errors..thanks..

 

Altenbach,

 

yours is more compact especially the chart implementation.. 

regarding the timing, in the vi, i just put a timed loop, in actual program, i have other sequences following, like reading the data from PID controller (modbus RTU ), and later i'm saving the data to an excel file, so i do need the timing info. (i've attached a snippet of data saved).. 

Is it possible in your implementation to get the timing info as an array as well? ( the timing interval is not uniform in my case- although i dont know why)

 

 

Thanks...

Pallavi
0 Kudos
Message 6 of 10
(3,662 Views)

@Palchen wrote:

Is it possible in your implementation to get the timing info as an array as well? ( the timing interval is not uniform in my case- although i dont know why)

 

 



Because you are running on a Windows machine, which is not deterministic. There is no guarantee you will get equal spacing in your timing.

0 Kudos
Message 7 of 10
(3,613 Views)

Palchen wrote:

Is it possible in your implementation to get the timing info as an array as well?


If the time spacing is not uniform, you need an xy graph and keep the timing information for each point.

0 Kudos
Message 8 of 10
(3,611 Views)

Altenbach.... 

I would never have thought of converting the array into complex no. the way u've done it..... I learnt something new........thanks a lot...

Thanks...

Pallavi
0 Kudos
Message 9 of 10
(3,590 Views)

I'm using the implementation greg suggested mainly because I don't have to change too many things. 

Although both implementations are solutions, I'm not able mark both responses - greg and altenbach- as solutions...

Thanks...

Pallavi
0 Kudos
Message 10 of 10
(3,580 Views)