LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array to Cluster with correct size for Plotting

Solved!
Go to solution

So I have an array of elements which I need to plot in a overview chart. But those elements are not coming as seperate values. So I found out the way to do that is by converting them to a cluster. And I did that and ran the program and it worked but with a small problem. So cluster size is more than the array size. Array size was 4 and cluster size was 9. So 5 extra values of 0 was plotted in the graph. So I need to set the cluster size but the problem the array size is not fixed. Because of that I cant set the cluster size as well. And since there is no way to set the cluster size programmatically, then what can I do to get those array elements seperately in the overview chart. Thank you. 

0 Kudos
Message 1 of 6
(1,248 Views)

The default Cluster Size is 9, Right click and change the Cluster Size to 4.

Since the array size is dynamic you can build the cluster instead of using the Array to Cluster function.

 

Share the source code you tried ,so that we can properly suggest on how to do.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 6
(1,226 Views)
Solution
Accepted by topic author govindsankar

One useful trick with charts and graphs is to open the context help window and over the BD terminal of the chart. This will show you different data types that the chart can take. In the case of a chart, it says that you can use a 2D array to get multiple plots with multiple points. A quick test seems to show that the rows are for the points and columns are for the plots, so for a single point you can build your array with N elements and then wire it to a Build Array to get a 2D array with 1 row.

 

Edit - yes, if your goal is to always have 4 plots, then the other suggestion is simpler.


___________________
Try to take over the world!
0 Kudos
Message 3 of 6
(1,221 Views)

Thank you. By converting it to 2D array I got it. 

0 Kudos
Message 4 of 6
(1,207 Views)

@Palanivel. Read my post correctly. I cannot set the cluster size to 4 because the array size is fixed. Read it correctly. 

0 Kudos
Message 5 of 6
(1,205 Views)

Sorry I Missed the last point of dynamic array, I was editing my post, good that you got the solution.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 6 of 6
(1,202 Views)