10-07-2009 10:40 AM
Dear All,
In my program, caller.vi calls the subvi.vi and hopes the subvi.vi return a reference of control(such as Button in the subvi.vi's frontpanel) not the control(button) itself. Would you please give me some suggestion?
Thanks.
Hugo
10-07-2009 10:43 AM - edited 10-07-2009 10:44 AM
Why???? 😮
(You can just create a reference in the subVI, create an indicator wired to the reference, and wire the indicator to an output connector.)
10-07-2009 12:07 PM
10-07-2009 06:40 PM
Thank you for your reply.
The attachments are the two vi. led2 in caller.vi can be conctrlled by ctl led2 in subvi.vi.But it is not a good way.
I want caller.vi can obtain the references of ctl led2 and led1. caller.vi registers an dynamic event which can know whether ctl led2 is pressed and the button of ctl led1 in caller.vi can control led1 in subvi.vi.
Thanks.
Hugo
10-07-2009 07:13 PM
I am not sure that I understand what you want. I made a little modification in caller.vi (LV86). Now you can change the value of led1 with the boolean ctl led1.
Jean-Marc
10-07-2009 08:45 PM
Thanks.
My LabVIEW version is 8.5:(,would you please change it?
10-07-2009 09:02 PM
10-07-2009 09:10 PM
10-07-2009 09:30 PM
Thank you.
That is really what I want to do. Is there any other way to do it? For in my program, caller.vi is the main vi. If the button in subvi.vi is pressed, the event structure in caller.vi will response.
10-07-2009 10:28 PM
hugoliang wrote:Thank you.
That is really what I want to do. Is there any other way to do it? For in my program, caller.vi is the main vi. If the button in subvi.vi is pressed, the event structure in caller.vi will response.
Have you tired using user events? This would allow you to inject the event into your event structure. Though you will need to be careful when using multiple event structures in an application since only one event structure will capture a given event.