06-06-2011 05:15 AM
Hi
For my vi I need to have a button that activates a pop-up window which contain text or graph with a close button.would u please help me how can I do this in Labview
Solved! Go to Solution.
06-06-2011 05:30 AM - edited 06-06-2011 05:31 AM
Hi,
You can go through the vi which i have attached. Read the explanation from the block diagram of the sub Vi.
You must go through the LabVIEW Basic materials provided with the kit for learning more about creating SubVIs and using them.
Regards,
Nitzz
(Give kudos to good Answers, Mark it as a solution if your problem is Solved;))
06-06-2011 06:21 AM
Thanks Nitzz
just would u plz help how did u manage to add your subvi icon to the main block diagram.I tried to make another pop up window but I don't know how to select and call my subvi
06-06-2011 06:24 AM
Hi,
Either you can drag and drop a vi into the block diagram of the main vi in which case the dropped vi will become a subVI automatically, Or you can right click on the block diagram of the main VI and click on "Select a VI" and browse the VI which you want to load as a sub VI.
Regards,
Nitzz
(Kudos are always Welcome;))
06-06-2011 08:24 AM
thanks
would u plz have a look at the new main.vi . I have added another sub vi but it is not working
06-06-2011 02:57 PM
Hi,
I can't open the Untitled111.vi as it is in LabVIEW 10 and i have only 2009 version. But i suppose the part you are missing is the VI properties settings. Open the Untitled111.vi, rightclick the vi icon on the upper right side of the front panel, and click on VI Properties.
From the drop down menu of catagory, select Window Appearance.
Then select Custom below and click on customize button.
Another page opens in which select " Show front panel when called " and "close afterwards if originally closed"
Then save the vi and use it in the main vi. When you press the button from the main vi, it will open and start running as needed.
Regards,
Nitzz
(Give kudos to good Answers;))
06-08-2011 11:22 AM
Perfect.
Many thanks Nitzz
06-22-2011 05:34 PM
The example was very clean and easy to understand. I downloaded your example and added a numeric indicator on the mainVI iteration terminal. It seems the mainVI stops executing when the subVi is called. This is a problem for me as my mainVI has all of my control logic in it. How can I accomplish exactly what you have done execpt that the subvi is secondary and the mainVI continues to execute? I have searched the forums thoroughly and have not found any help/examples that fit my needs. Basically my mainVI needs to continually execute and if a subVI with "show front panel" is called then the front panel shows but does not affect the mainVI execution at all. Thanks in advance
06-23-2011 12:34 AM
Hi Trinity32244,
If I understood you correctly, you want to run two VIs simultaneously and also you want one of the VIs to be called from the other. If you follow my example and do this it won't work because, if you place the subVI which runs continuously in a While loop and then call it, the while loop wont get into its next itration untill the SubVI is closed. So its not that the main VI while loop is stopping. Its just that its waiting for the subVI to stop to make its next itration.
To accomplish what you want, I don't think putting the subVI in the same While loop would help. You can make two while loops running in parallel, put all your code into one while loop and the subVI in the other while loop and then call the subVI from the main while loop. In this case both will run simultaneously. I have attached an example which shows how to do it. Download both and run a.vi. Not the best example, but still, I think it will help you.:)
Regards,
Nitzz
(Kudos are always Welcome;))
06-23-2011 07:01 AM
Thanks!!!!! This was exactly what I was looking for. This is a much simpler approach then most of the threads that I found previously that seemed to be making a mountain out of a mole hill. For a newbie in labview this is by far the easiest to follow method of creating a custom pop-up.