LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graphs in cluster

Solved!
Go to solution

Hi,

 

When I run this vi the graps remain empty. How come the data is not being graphed? 

Also is there a better way to access the graphs in a cluster. Can I loop through the cluster? I don't want to put the graphs in an array because I want them to be able to have different properties.

 

Thank you!

Download All
0 Kudos
Message 1 of 12
(4,035 Views)

Hi power,

 

there's a lot of RubeGoldberg in your VI (just by judging your picture as I could not open your VI)...

 

- Why do you Index that 2D array in that way? Why don't you use an autoindexing FOR loop?

- Why do you generate a cluster of waveforms? Why not use an array of waveforms? Graphs can display that perfectly...

- What type is your cluster set to? Why do you have all those coercion dots on the Bundle function?

- Why do you write to the cluster "data" and to a "value" property node of the same cluster?

 

check.png

Most of your big block diagram can be done like that small snippet...

Best regards,
GerdW


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

Hi,

 

thank you very much for your vi snippet. 

I'm trying to display each waveform in a sperate graph. Since the waveforms will have sidely varying amplitues I want each array to scale the y axis differently so I can't use an array of graphs I think as the array forces them to have the same properties.

Is there any compact way of preparing the waveforms to go into the cluster of graphs? Front panel view of cluster of graphs is attached.

 

Thanks. 

0 Kudos
Message 3 of 12
(3,996 Views)

You just need to bundle the waveforms just like you are doing now.

 

(Note:  It is good to see that you know that Index Array is expandable.  You should also know that by default, the indices start at 0 and will increment from there.  There was no need to wire up all of those constants into the Index Array.  The only exception is that on a 2-D array or larger, you'd have to wire a zero constant into the very first column input if you wanted things by columns rather than rows.)

0 Kudos
Message 4 of 12
(3,978 Views)

Thanks for the tip. My problem is although I am bundeling the waveforms by name into the cluster Data the graphs are displaying nothing. I don't understand why the code is throwing no errors.

If I wire an indivudal waveform to a single graph outside the cluster it plots a line.

 

0 Kudos
Message 5 of 12
(3,958 Views)

Your waveforms are probably empty, or apparently so.

 

Why are you doing the Insert into Array stuff?  It doesn't make sense.

 

If you still need help, post a VI where you have the data in your original Array control saved as Default data.

0 Kudos
Message 6 of 12
(3,950 Views)

You can put them on a 2d array and then plot in different waveforms. You can do it in many different ways. 

Each plot can have their own Y scale/properties as you wish. 

One good way to think is to do that programatically, using References. 

Please see my example attached so you can have a better idea of what Im talking. about. 

 

Feel free to modify this subvi to update the properties you need to use for your data. 

But the concept is the same. Create references to your graphs from the main vi, build an array of references and pass this array as input to the subvis. Inside the subvi you can update as many properties as you want. Please remember to use the error cluster if you want to see if there is an error at any point. 

 

Please let me know if you need additional help. 

 

ricardo

RKO
Download All
0 Kudos
Message 7 of 12
(3,947 Views)

Thanks ROtake.

I guess I can just make 24 graphs outside of cluster. I thought the cluster would make them easier to manage.

 

If any one is looking for the challenge here is my code where the graphs in cluster wont plot with some sample data saved as default.

 

0 Kudos
Message 8 of 12
(3,941 Views)

The reason you don't anything plotted is that you turned off the visibility of Plot 0 on each one of those graphs.  The data is there, you just can't see it.

 

On each graph, right click, properties, Plots tab, Check the visibility box for plot 0.

 

As for the beginning For Loop and the Insert into Array, eliminate it.  It isn't doing anything for you.  The For loop runs zero times because you have 24 minus 24 goingg into the N terminal.  Thus you have an empty array being inserted into your array.

0 Kudos
Message 9 of 12
(3,933 Views)

Hi,

 

sorry I finally found the mistake. The legend was set to "not plot visible".

Sorry for taking up your time.

 

In general does anyone have a good idea for how to manage a lot of graphs with different properties i.e. different y axis for each graph. Is there a some kind of convient struture that I can loop through.

 

Thanks.

0 Kudos
Message 10 of 12
(3,930 Views)