LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Matrix of Charts - how?

Hello,

I want to create a 2D array of sweep charts. See attached photo of what I manually created using CTRL+C/CTRL+V.

I assume that placing the chart into an array will allow me to control their scale properties simultaneously and will allow me to easily choose the matrix's visible size (if I wanted to display 2x2 rather than 64x64 for example).

 

Background: I have an A/D which gathers 8 channels of data. The charts you see in the attached photo are displaying differential permutations of those 8 channels (channel1 - channel2, channel1-channel3... etc) - 28 in total.

When we will use 16 channels there will be quite a lot of charts. 

 

I am using LabView 2012 and unfortunately dragging a chart into an array doesn't do the trick. It simply doesn't work and I read about the fact that it's not supported. Not sure why though.

There must be a way to create such UI's in an elegant way.

 

I have considered using an array of clusters which contain a subpanel, but it became very messy and I failed to do it. Please tell me there is another, more elegant, way.

 

Help!

0 Kudos
Message 1 of 8
(2,882 Views)

You can't because charts and graphs are very complicated controls that heavily rely on their defined properties.  Arrays have to contain the same element where the only difference is the value of the element.  You can't change the other properties.  Things like charts are continually updating their properties such as X scale and Y scale range.

 

I think your best bet is to create as many charts as you need.  Maintain an array of references to those charts.  Hide the label and show the caption so you can programmatically change the "label" that is displayed for each one.  With that array of references, you can control which charts are visible, which are invisibile, and their respective positions so they can line up in an array-like pattern.

 

If there is an easier way, someone can point it out and then I can learn something also.

0 Kudos
Message 2 of 8
(2,869 Views)

Easier?

 

Far from easier.

 

I have put multiple sub-panels in a cluster along with a scroll bar. Using the scrool bar I was able to adjust the size, position, and visablity of the sub-panels giving impresion it was a an array of sub-panels. After loading different VIs into the sub-panels and tracking where the scroll bar was and what was visable and what was not, it looked like I broke the rules and made an array out of mixed data types.

 

Mockup of GUI Priliminary Version 1.png

 

I can not post the code but I can share a screen shot to inspire the "wildman" in others.

 

In the case of the current thread, a cluster with sub-panels or a collection of sub-panels may get you somewhere.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 8
(2,839 Views)

Ben, how did you get the subpanels into the cluster?

 

It looks like you can drop a subpanel into a cluster, but the cluster still has not datatype and the VI is broken.  I had to drop a control of a regular datatype in there in to get the cluster to be of "something" and fix the broken run arrow.

 

Is that what you needed to do?

0 Kudos
Message 4 of 8
(2,825 Views)

Ben, I think I'm gonna cry (out of frustration)! Well first of all amazing effort, but there MUST be a better and easier way. 

0 Kudos
Message 5 of 8
(2,818 Views)

It is a cluster of scroll bar and sub-panels.

 

Only the scrool bar shows up in an unbundle by name.

 

I get a ref to all of the controls that will cast as a subpanel without error and then use an invoke node to insert the proper VI in each subpanel.

 

DisimilarArray.png

 

let me know if that opens for you OK.

Ben

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 8
(2,809 Views)

@SSTBRG wrote:

Ben, I think I'm gonna cry (out of frustration)! Well first of all amazing effort, but there MUST be a better and easier way. 


Sorry to frustrate you SSTBRG

 

1st Q

 

have you concidered just using a collection of charts and using "hide/show" as required? Nothing fancy in that approach.

 

Another step is use a collection of sub-panels with a VI for each data set associated with a graph. Le the sub-VI do the work and you provied a method to let the sub-VI in the sub-panels get the data they need.

 

Does that get you anywhere or what is lacking and let us know if you need another nudge.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 8
(2,808 Views)

@SSTBRG wrote:

Ben, I think I'm gonna cry (out of frustration)! Well first of all amazing effort, but there MUST be a better and easier way. 


Thinking a bit more for you...

 

If under the gun to do it as quickly and cheaply as poosible I would create an array of ref for those charts of your and pass it to a sub-VI that computes the required diffrences and applies the update to one chart at a time using a "property node > Value node.

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 8
(2,798 Views)