LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cluster unbundle element changing the order

Solved!
Go to solution

I am using the two different cluster name 1 and 2,inside the cluster the element name are same.I am placing this two cluster in one more cluster name 3.all the three clusters are type def.I am unbundiling the 3 cluster in my program.this one is working fine.I am placing one more element in cluster 1 or 2.then my unbuldiling cluster order  is changing.

Think before Act
0 Kudos
Message 1 of 14
(3,616 Views)
Solution
Accepted by topic author Shanmugarajan

Hi Labview,

                 Can you attach a screenshot of your blockdiagram?Can't visualise more clearly from your statements.Iam asking for screenshot because Iam using LV2009.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 2 of 14
(3,613 Views)

Hi shanmugharajan,

                                You solved the issue??

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 3 of 14
(3,598 Views)

If you use the Unbundle it'll unbundle in the Tab order set in the type def, if you use Unbundle by name it should stay in the same order due to being able to connect the name.

'/Y 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 14
(3,589 Views)

I cant solve the issue

 

Think before Act
0 Kudos
Message 5 of 14
(3,582 Views)

@Shanmugarajan wrote:

I am using the two different cluster name 1 and 2,inside the cluster the element name are same.I am placing this two cluster in one more cluster name 3.all the three clusters are type def.I am unbundiling the 3 cluster in my program.this one is working fine.I am placing one more element in cluster 1 or 2.then my unbuldiling cluster order  is changing.


It depends how and where you add the element into the cluster. If you add the new element at the top then obviously the index of the elements will get changed so your undling also changes because your unbundle function checks only the element index not the element name/label.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 6 of 14
(3,548 Views)

rt click on the constant from the block diagram to reorder the list from the unbundle by name list or goto the front panel rt click the cluster and reorder...reorder cluster

 

also,you can unbundle by name the constant, "one at a time" and pick what order you want from the list...

0 Kudos
Message 7 of 14
(3,537 Views)

If you are not using unbundle by name you should. The code is basically unreadable when you use the simple unbundle. Also, the unbundle by name will ensure that your code still uses the correct element of the cluster since it is doing so by name, not position.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 8 of 14
(3,530 Views)

Hai here i have attached the vi and cluster for  your clarification

Think before Act
Message 9 of 14
(3,518 Views)

this is a bug in LabVIEW 2010 and 2011, this is however corrected in LabVIEW 2012 ( which I have tested earlier).
I found a work around, you need to use multiple levels of Unbundle by name to unbundle from nested clusters to prevent the problem.

I am attaching a screenshot of the code, which should solve your problem in LabVIEW 2010 / 2011.
Let me know if you need further assistance.


Think before Act
0 Kudos
Message 10 of 14
(3,479 Views)