10-23-2013 02:29 PM
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
10-23-2013 02:45 PM
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!
10-23-2013 09:56 PM
Here
10-24-2013 12:53 PM
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
10-24-2013 01:04 PM
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.
10-24-2013 01:10 PM
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!!!!
10-24-2013 02:11 PM - edited 10-24-2013 02:14 PM
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
10-24-2013 02:47 PM
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???
10-24-2013 02:50 PM
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.
10-24-2013 03:07 PM
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.