LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to change attributes of front panel objects from another vi?

Hi,

I have a vi, call it B, that when it is running, I would like it to disable a control on another vi that is also running, call it A. Can I do this without using globals? Thanks!
0 Kudos
Message 1 of 5
(2,906 Views)
Absolutely! All you need to do is make a reference to the control in A.vi. Pass this reference to B.vi. In B, you then wire the reference to the Property Node function (located in the VI Server palette), and wire a 0 (enabled), 1 (disabled), or 2 (disabled and grayed) to the Disabled property. With the property node, you can read or write just about everything on the control.
0 Kudos
Message 2 of 5
(2,906 Views)
Yes, sure.
See note:

http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&453D9D79FA9364D686256928006C3C41&cat=2E4161187E3DEB30862568660020BCC8

I hope it help you in many cases.
Mike

sal wrote:

> Hi,
>
> I have a vi, call it B, that when it is running, I would like it to
> disable a control on another vi that is also running, call it A. Can
> I do this without using globals? Thanks!
0 Kudos
Message 3 of 5
(2,906 Views)
If you use LV 6 you can do that by creating a reference to your control (pop up on it and create reference).
-On the B vi create a control refnum
- Pop up on it and select show control
- Drag inside it a control of the same type in vi A
- When the reference of vi A is connected to the refnum of vi B you have created, in vi B you can use property nodes to set or read what you desired from the control of vi A.

Hope that was helpful.
0 Kudos
Message 4 of 5
(2,906 Views)
Thanks for all the replies. However, I'm not sure if I can pass a control reference as suggested. My problem is that vi "A" dynamically loads and runs vi "B". Therefore, I cannot pass any parameters to B unless I do a call by reference, and then with that there is no option to have the vi NOT wait until done. Is my reasoning here correct or is there something I don't know? Thanks again.
0 Kudos
Message 5 of 5
(2,906 Views)