07-31-2012 05:34 PM
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.
Solved! Go to Solution.
07-31-2012 06:18 PM - edited 07-31-2012 06:18 PM
@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.
07-31-2012 06:30 PM
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?
07-31-2012 09:42 PM - edited 07-31-2012 09:50 PM
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.
07-31-2012 11:27 PM
08-01-2012 12:35 PM - edited 08-01-2012 12:36 PM
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).
08-01-2012 01:19 PM
Why won't this work? A functional global can be accessed globally. Unless your code is actually different applications...
08-01-2012 01:29 PM - edited 08-01-2012 01:31 PM
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.
08-01-2012 01:39 PM
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).
08-01-2012 01:43 PM
Thank you - crossrulz
Yesterday I was close but didn't make last step.