LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

calling a vi from a main vi

Hi,

 

I need to create a main VI that calls other vi by clicking a "OK" button. 

 

I have all VIs created but I know that I have to create subVIs of the ones that I'm going to call and I don't know how to do it. I guess I need it to create it some how that it can be open by pressing the OK button.

 

I know also that some thing has to be done in the main VI in order to open and close that VI but I'm actually pretty lost with the whole process.

If someone can  explain how to do it, post a VI that does the whole process, or send me a link that explains the whole thing it would be really really great.

 

The other problem is that I have labview 2010. I've read things and find some examples but they are implemented in a newer version of labview and I can't open it.

 

I would really really apprecite the help.

 

Thanks in advanced,

 

R

 

0 Kudos
Message 1 of 22
(3,797 Views)

Hello rrr1,

 

There are a number of ways to go about launching subVIs, but typically you are going to want to interact with independent asynchronous VIs using VI references and the properties and methods they provide.

 

This example is pretty basic and should get you started (it's also saved in LabVIEW 8.6):

 

Community Example: How to Open a SubVI as a Separate Window

https://decibel.ni.com/content/docs/DOC-4666

 

Hope that helps!

Tom L.
0 Kudos
Message 2 of 22
(3,790 Views)

Here

 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 3 of 22
(3,751 Views)

Thank you very much to both.

 

I'm opening everything to start working with everything I have.

 

Ranjeet Singh, I tried downloading your zip but the .vi are labview 11 and I have 10. Can you do something in order for me to open them? If it's not possible saving it with a compatible version, vould you post a print screen of both VI please?

 

I'm really sorry to bother.

 

I hope I can do it with both posts.

 

Regards,

 

Rrr

 

0 Kudos
Message 4 of 22
(3,719 Views)

I think you are better off without the example that Ranjeet Singh provided, for some reason he has the subVI call configured in a non-standard way unnecessarily, and I'm not sure his example answers your question. When you click a button to open the subVI, do you need your main VI to continue running as well? If so, his example won't help you.

0 Kudos
Message 5 of 22
(3,711 Views)

Yes, I do.

 

What I need is to have a main VI that has 3 buttons. When you press the first one, another VI has to open in a new window. When the user closes that one, he should press the second button that opens another VI, and finally, he should press the last button that opens the last VI.

Neither of the subVI need information from to main VI nor transfer info to it.

They only need to be opened when the corresponding button is clicked, and each subVI can be clossed only by clicking the "X" button in the top of the window.

 

It's actually pretty simple!!

 

Thank you very much!!!! 

0 Kudos
Message 6 of 22
(3,704 Views)

you never said dynamically (all sub vi's are loaded into memory at compile).....so here's a simple one, close the vi's with the stop control  Smiley Wink

0 Kudos
Message 7 of 22
(3,691 Views)

I loved your help.

 

I'm having different problems.

 

1. My subVIs don't when I click Run. They run but I have to open them manually.

2. When I press STOP they actually don't close. They go to a state that say "SubVI waiting to Run" and I'm unable to STOP my main VI and the subVI stay open! 😞

 

Can you help me please???

 

0 Kudos
Message 8 of 22
(3,677 Views)

Can you upload your code? That will make it much easier to help you, otherwise we have to guess at what your code is doing rather than seeing the real thing.

0 Kudos
Message 9 of 22
(3,674 Views)

Sure.

It's actually a proyect.

Right now I've only implemented the first button so the first VI should work but it doesn't.

 

There several subVI in the proyect but you should try "Raiz 2" as the main VI and pressing only the first button, a th subVI that should open is "Pestaña 1- Señal para raiz 2".

 

Tell me if you are able to open it because I realized they where in the same folder. I think you'll only be able to open the VI that you need.

 

Thank you VERY much!!

 

P.D. It took a while cause I didn't have zip but rar.

0 Kudos
Message 10 of 22
(3,669 Views)