LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to assign same reference to tow front panel elements

Solved!
Go to solution

Hello,

 

I'd like to overwrite a reference of a front panel control with another reference so two front panel controls have the same adress in memory. More specific: somewhere on my front panel (on two different tabs) I have got 2 numeric indicators and I want them to have the same address in memory so whenever I call one of the indicators by reference and change its property the second one should change in the same way. I guess there are several posibilities to synchronize two elements of the front panel but I think in my case it would be most convinient if I can just assign the same reference to both elements. I know in C++ it is pretty easy to overwrite a pointer but somehow I can'T find a way how to do this in LabView.

I would be very pleased if someone could help me or suggest an alternative way for synchronizing two front panel elements.

Thanks!

0 Kudos
Message 1 of 3
(2,391 Views)

Overwriting a pointer in Labview is not possible. Each ctrl has a reference but not be overwritten. Work arounds are local variable, global variable, shared variable, implicit/explicit property nodes, invoke (method) nodes, or best in labview is wires (data dependency).

 

Labview doesn't let you change address of pointers, your suppose to "wire" pointer reference.

0 Kudos
Message 2 of 3
(2,388 Views)
Solution
Accepted by topic author lbru

You can build the references of the different front panel elements into an array.

 

Then loop through that array (for example, For Loop with autoindexing) to perform the same property node operations on each element

0 Kudos
Message 3 of 3
(2,352 Views)