09-26-2013 02:48 AM
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!
Solved! Go to Solution.
09-26-2013 02:58 AM - edited 09-26-2013 03:00 AM
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?
Most of your big block diagram can be done like that small snippet...
09-26-2013 01:20 PM - edited 09-26-2013 01:22 PM
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.
09-26-2013 02:16 PM
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.)
09-26-2013 06:25 PM
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.
09-26-2013 07:30 PM
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.
09-26-2013 07:45 PM
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
09-26-2013 08:10 PM
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.
09-26-2013 08:32 PM
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.
09-26-2013 08:49 PM
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.