ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic array to cluster creation

Solved!
Go to solution

Hello,

 

Is there a way that labview recognises the array size and automatically unbundle it into that many clusters as number of elements in the array?

 

PS. I am using labview 8.2 

Labview 8.2
Learner
0 Kudos
Message 1 of 7
(3,939 Views)

No, clusters are fixed in size and can only be modified in edit mode.

 

Why do you even need clusters? Can't you keep it as an array?

0 Kudos
Message 2 of 7
(3,931 Views)

I need them to plot several variables on different graphs..

Like this one below.. 

Labview 8.2
Learner
0 Kudos
Message 3 of 7
(3,919 Views)

Something like this?

Message Edited by Jeff Bohrer on 05-01-2009 09:12 AM

"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 7
(3,909 Views)
Solution
Accepted by topic author chravikumar

That would simply force you to use a default cluster of 9 elements. What if the array is more than 9?

 

@ravi:

 

You do not need to convert an array to a cluster and then unbundle the cluster to get the individual elements. Index Array is resizable. Better yet: use a for-loop with autoindexing. As to the actual graph that's being created I don't quite understand it. You are using the same X value with different Y values. That's just a vertical line. As altenbach likes to say, your code can be simplified to fit on a small stamp:

 

Message Edited by smercurio_fc on 05-01-2009 09:25 AM
Message 5 of 7
(3,902 Views)

Yes smercurio,

 What u understood is right.. i shall try the method u suggested and let you know..

 

Regards

Ravi 

Labview 8.2
Learner
0 Kudos
Message 6 of 7
(3,892 Views)

Also don't forget that xy-graphs accept complex arrays, simplifying the data structures even more. 🙂

 

(See e.g. this example.)

0 Kudos
Message 7 of 7
(3,882 Views)