LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

call a subvi in non exicution mode

Solved!
Go to solution

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 ....

0 Kudos
Message 1 of 20
(3,306 Views)

Instead of calling the VI, open a reference to the VI and then open the Front Panel.

 

Example_VI_BD.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 2 of 20
(3,281 Views)
Solution
Accepted by jasejo

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.


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
Message 3 of 20
(3,271 Views)

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.

 

0 Kudos
Message 4 of 20
(3,266 Views)

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.

 

 

0 Kudos
Message 5 of 20
(3,260 Views)

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...

 

 

 

 

 

 

0 Kudos
Message 6 of 20
(3,222 Views)

I've read this whole thread a few times and I still can't figure out what you are trying to do.  😞

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 20
(3,209 Views)

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

0 Kudos
Message 8 of 20
(3,193 Views)
It sounds like he just wants to open the subVI and enter some values. I would suggest writing the subVI correctly instead of this silliness about non-execution mode. Perhaps some LabVIEW tutorials are appropriate before selling some code to a customer.
0 Kudos
Message 9 of 20
(3,191 Views)

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... Smiley Happy

0 Kudos
Message 10 of 20
(3,158 Views)