05-14-2014 06:30 AM - edited 05-14-2014 06:40 AM
Hi All,
I need a method to call a subvi from another Vi ,Subvi should be in non exicution mode. Can anyone help me please..
on a button click subvi will be opened but currently,it is exicuting while load. I need it in non exicution.
Thanks ....
Solved! Go to Solution.
05-14-2014 07:13 AM - edited 05-14-2014 07:14 AM
05-14-2014 07:35 AM
Why do you need it non-executing?
I am totally guessing at what you really want here. You likely want an OK button on your subVI and then have its code execute. This would allow the user to input data first. If this is the case, then you want to use an Event Structure on your subVI looking for that OK button to be pressed and then the logic put inside of that event case.
05-14-2014 07:48 AM
I would suggest the same solution as Jim .
If you directly call a subVI from within your code, LabVIEW will execute it. Whereas using an Invoke Node, you can put a reference of the VI into memory and manipulate it without running it. Property Nodes can also be used. There are some fun experiments you can try with the Property Nodes on a non-running VI.
05-14-2014 08:06 AM
I also agree with crossrulz..
We simply do not know what you want to do with your non-running VI. You could actually want to edit it... 😉
So to understand the behavior of dealing with a non-running VI and references to it, I created a small example.
Open both VIs in the zipped file. Do not run the one called notRun.vi, but do run the other. Then toggle the switch in the non-running VI and look at the LED indicator in the VI that is running.
05-14-2014 08:36 PM - edited 05-14-2014 08:37 PM
Thank you all for replies..i could understand something.....But i cant open your labview ,because i am using 8.0 . 😞
behalf I need the subvi in non exicution mode to give the input and run sub vi.
according to which button user click it should open the reference VI and user need to give input and run it.
But i cannot give the file path,as jim said,because for customer we will give exicution file only....
I attached Main GUI .Here when click on conrtroller it need to open corresponding VI.
Best Regards...
05-14-2014 08:59 PM
I've read this whole thread a few times and I still can't figure out what you are trying to do. 😞
05-14-2014 09:40 PM - edited 05-14-2014 09:42 PM
Hi Bill
My doubt is almost similar with 'opening a a Subvi in Edit mode' thread..
http://forums.ni.com/t5/LabVIEW/opening-a-a-Subvi-in-Edit-mode/td-p/425589
05-14-2014 09:42 PM
05-15-2014 01:44 AM
I develped it using event structure.So in subvi on start button click ,the event will start.
and on exit button click(exit event) ,labview will return to main VI.
And it is working well ..
Because i am beginner in labview it took some time to
understand about event structure.Thank you all...