LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing and manipulating cluster element

Solved!
Go to solution

I have a cluster of 4 elements. One of the element is a Ring with 4 data entries. Is it possible to manipulate these 4 data entires depending on a condition?
For example, when a condition = 1; then 3 of the ring entries should be disabled and greyed. When not, all 4 entries should be enabled.

IS there a way to get local variable for these ring entries in a cluster. or any ideas?

 

Cluster

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 1 of 10
(3,496 Views)

Just right-click the direction control in the cluster (on the front panel) and select Create > Property Node > Disabled.

You can have property nodes to individual cluster elements.

 

0 Kudos
Message 2 of 10
(3,476 Views)

select Create > Property Node > Disabled makes the whole control disabled and greyed. Depending on the condition i just want to disable 2 entries (Left to Right & Bottom to Top) in the Direction Ring Control.

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 10
(3,472 Views)

Did you right-click the 'Direction' control? When doing so you get a property node to this control.

Again, on the front panel (not on the block diagram), right-click the 'Direction' control.

0 Kudos
Message 4 of 10
(3,468 Views)

Cluster2.JPGYes I did it on the front panel. I guess you didnt understand what i want.. see attachment ps

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 5 of 10
(3,459 Views)

Is it so hard?

Snippets don't really work with implicit property nodes, so I attached a vi.

 

0 Kudos
Message 6 of 10
(3,455 Views)
Solution
Accepted by topic author Nghtcrwlr

Hi

 

when you right click on the  ring control, you will have a Create->Property Node-> Disabled Items[]

 

AS LONG AS you ring control is not Strictly Type Def, or the cluster containing the ring control is not Strictly Type Defined, you can programmatically use the 'Disabled Items []' property to get the behavior.

 

When a condition is true, wire the index numbers of the items which are to be disabled to this propery node.

 

Edit: I see that dan_u has already replied, but I could not open the vi from dan_u, I have LV 2010.

 

so, attached is the vi as per my explanation.

Regards
Freelance_LV
TestAutomation Consultant
Message 7 of 10
(3,454 Views)

Hello ,

 

Refer attached VI

 

Edit : True case: C & D are Disabled and False Case: A & B are disabled.

Ignore the comments at Front panel.

 

Regards,

Bijay

0 Kudos
Message 8 of 10
(3,447 Views)

Hi all..

Thanks for the replies.... I could not open Bijays version since am having LV 2011.

dan_u's VI disables all the elements in direction.

 

Thanks to Freelance_LV. That was what i wanted. I actually didnt think of wiring the index numbers to disable.

 

Thanks

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 9 of 10
(3,429 Views)

 


@Nghtcrwlr wrote:

 

dan_u's VI disables all the elements in direction.

 


Yes, I was showing it is possible to create a property node for an element inside a cluster. I was assuming you would find your way from there...

 

0 Kudos
Message 10 of 10
(3,416 Views)