LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

access to controls property from another VI

Solved!
Go to solution

Hi,

 

I have A.vi and B.vi. B.vi has Integer1 control .

To change Integer1 value (Value property) from A.vi I can use "Control Value:Set" method.

Is it possibly to change other properties (for example, Disable) of Integer1 control from A.vi?

 

Thanks, Andrey.

0 Kudos
Message 1 of 17
(5,502 Views)

@Vasilich2004 wrote:

Hi,

 

I have A.vi and B.vi. B.vi has Integer1 control .

To change Integer1 value (Value property) from A.vi I can use "Control Value:Set" method.

Is it possibly to change other properties (for example, Disable) of Integer1 control from A.vi?

 

Thanks, Andrey.


You would have to create a property node on B.vi for integer1 and select the disable property. You would then have to wire up a control to that, and then you can use the control.set method to set that controls value to disabled from A.vi.

 

A better way to do it would be to have a queue send a message from A.vi to B.vi and let B.vi handle the changing of the property.

0 Kudos
Message 2 of 17
(5,501 Views)

I know how to create property node with disable property in B.vi. But I don't know how to get front panel control or indicator on B.vi from this property. Can you explain?

0 Kudos
Message 3 of 17
(5,495 Views)

have you looked into refnum controls, it controls the explicit property nodes? this is an image from the top level vi block diagram.A control of a DBL (#100) is sent down to the low level vi. and a DBL(#200) is being indicated to the top level vi.

top leve refnum_BD.pngtop leve refnum_FP.png

Download All
0 Kudos
Message 4 of 17
(5,482 Views)
http://forums.ni.com/t5/LabVIEW/Strange-Problem-Cluster-of-References/m-p/1110076/highlight/true#M49... Have a look at that thread, specifically Ben's post. That's a good post on how to do it using references.
Message 5 of 17
(5,462 Views)

Thank you apok and for

 

I know this way but I can't use it.

B.vi launched A.vi by "Open VI Reference" and and then use "Run VI". I do that because A.vi should always work (not just to be in memory and helds data). It has will have 7 loops. One loop will work with UI and custom events. 6 loops will work with 3 subsystems (technology and experemntal loops per each subsystem).

0 Kudos
Message 6 of 17
(5,436 Views)

Why won't this work? A functional global can be accessed globally. Unless your code is actually different applications...

0 Kudos
Message 7 of 17
(5,428 Views)
Solution
Accepted by topic author Vasilich2004

Here is an around about way, but it will work.  Personally, I recommend the Action Engine.  It'll be easier to maintain and more flexible.

 

Remember to close out all of your references or you could accidentally leave A.vi in memory, even if it's stopped running.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 17
(5,419 Views)

Becase USR loop in Ben's example work once per call. In this case Master.vi calls Slave.vi and transfer reference through Slave.vi terminals.

In my case Slave.vi has loops which always work. So if line in Master.vi calls Slave.vi will wait foreover. So I use another way to add Slave.vi into memory and run it. (see attachment).

 

Download All
0 Kudos
Message 9 of 17
(5,409 Views)

Thank you - crossrulz

Yesterday I was close but didn't make last step.

0 Kudos
Message 10 of 17
(5,403 Views)