From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Access directly to Cluster on Front Panel inside other control

Solved!
Go to solution

Hi All,

 

I want to update and access directly to the Value of Cluster on the Front Panel of my VI using Reference, and Ctrl Set Value.

But my Cluster (CONTROL 1) is inside and other cluster and inside Control Tab , so "Ctrl set" function can't find the name of my Cluster .

How can i proceed ? I'm not familiar with Reference Control .

 

I have attached an extract of my VI .

0 Kudos
Message 1 of 12
(7,517 Views)

try to use a property node directly for the control/indicator

change-value-w-prop-node.png


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 2 of 12
(7,481 Views)

Try this,

 

You can modularise it a lot more than this.

Essentially you need to drill down through the structure to find the control you want.

You could create your own front panel search for control VI function and use the "Set control values by index" function to do it too.

 

(depending on how many controls, you might try getting control values by index and seeing if you can use that to scan the FP with a variant conversion?)

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 3 of 12
(7,477 Views)

@jwscs wrote:

try to use a property node directly for the control/indicator

change-value-w-prop-node.png


Well there is also the easy way too is you don't want to run headerless and have something that might be re-usable!

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 4 of 12
(7,475 Views)

I can't find a clean solution, but this works:

gncv.png

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 5 of 12
(7,464 Views)

Do you have the LV 2010 version of your file ?

0 Kudos
Message 6 of 12
(7,450 Views)

so there we have it!

 

The clean solution. - but very specific.

The generic solution - but you need to know your specific tree.

The midway solution - but it uses VI scripting, and therefore might not work in the runtime environment. (I think that is why I use the approach I do, but it could just be habit.)

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 7 of 12
(7,449 Views)
Solution
Accepted by topic author rock_31

Saved back to 8.6 in case anyone wants to see earliertest_ctrl2.png

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 8 of 12
(7,443 Views)

Thx all for your help, 

 

It's seems like i don't have other choice than do a loop and compare one by one each control with the control i want to find ?

Humm....This is what I would like to avoid....I have about 150 controls (Clusters) in my front Panel; so may be, it could take some time to do that ....

0 Kudos
Message 9 of 12
(7,425 Views)

store the reference to the control in a global or something, after you've found it.

then subsequent changes don't need you to loop through all stuff.


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 10 of 12
(7,417 Views)