Farid2010 Posted March 7, 2011 Report Share Posted March 7, 2011 Hi I need your help. I created a sub panel in the front panel and wrote the code to open another Vi inside this sub panel. It works,but the problem is the Vi that I want to open here has several subvi's dependencies which do not open inside the sub panel. What happens now is that the Vi opens in my sub panel but when I click in a button inside that vi ( which is linked to another sub Vi) ,the linked sub vi Opens in a full page( in a seperate window), not inside the sub panel ! How can I modify it in a way that all subsequent Vis also open inside the sub panel? Can you help me in this regard? my code image is attached. Thanks Quote Link to comment
Jon Kokott Posted March 7, 2011 Report Share Posted March 7, 2011 Hi I need your help. I created a sub panel in the front panel and wrote the code to open another Vi inside this sub panel. It works,but the problem is the Vi that I want to open here has several subvi's dependencies which do not open inside the sub panel. What happens now is that the Vi opens in my sub panel but when I click in a button inside that vi ( which is linked to another sub Vi) ,the linked sub vi Opens in a full page( in a seperate window), not inside the sub panel ! How can I modify it in a way that all subsequent Vis also open inside the sub panel? Can you help me in this regard? my code image is attached. Thanks you must use the insert vi method on the subpanel you want a front panel loaded in. For the case you describe, the second VI you launch you must also obtain a reference to (static VI reference will be your friend as long as that VI is not reentrant.) Quote Link to comment
Farid2010 Posted March 7, 2011 Author Report Share Posted March 7, 2011 Jon Thank you so much but as I am not that expert in labview,do You have any example file I can look at? Also, If I want to fit the Vi inside the sub pane ( not scrolling) what should I do? Thank you in advance Quote Link to comment
Jon Kokott Posted March 8, 2011 Report Share Posted March 8, 2011 All you have to do is call that invoke node again but use the reference to your new vi you are running. Here is a picture of what it would look like Quote Link to comment
Farid2010 Posted March 8, 2011 Author Report Share Posted March 8, 2011 Jon Do you mean I have to create an invoke node for every single SubVi linked to main Vi? Also I am wondering why my subpanel invoke looks different from yours ( it has not the reference input,although the version is 2010) can you send me the file of your example instead of image? Thank you Quote Link to comment
Neville D Posted March 8, 2011 Report Share Posted March 8, 2011 Also I am wondering why my subpanel invoke looks different from yours ( it has not the reference input,although the version is 2010) can you send me the file of your example instead of image? Thank you Farid, Jon has posted a VI snippet. Download it and you should be able to run the code. Search the examples in LabVIEW for "subpanel".. it should bring up some useful stuff. N. Quote Link to comment
Farid2010 Posted March 8, 2011 Author Report Share Posted March 8, 2011 Thanks Neville But it's a png file. Quote Link to comment
ShaunR Posted March 8, 2011 Report Share Posted March 8, 2011 Thanks Neville But it's a png file. If you are using exploere, just drag the image from explorer to an empty diagram. If you are using firefox, drag it to your desktop then drag it from there to an empty diagram. VI snippits are png image files with the actual code embedded in the image. When you drag the png image to a diagram, labview will re-create the code. Quote Link to comment
Farid2010 Posted March 8, 2011 Author Report Share Posted March 8, 2011 ShaunR It's interesting I didn't know that . Thanks. I Use Firefox and i did what you said but it just pasted it as an image and not converted to code. How can we differentiate a simple png file from a snippet? Quote Link to comment
ShaunR Posted March 8, 2011 Report Share Posted March 8, 2011 ShaunR It's interesting I didn't know that . Thanks. I Use Firefox and i did what you said but it just pasted it as an image and not converted to code. How can we differentiate a simple png file from a snippet? If you are having difficulty with firefox. Open the image in a new tab before dragging to the desktop. It can be a bit of a pain in firefox. (it's even worse in chrome) You can tell it's a snippet because it has the hand,arrow and lv icon in the top left of the diagram image. It also has the labview version in the top right. Quote Link to comment
Farid2010 Posted March 8, 2011 Author Report Share Posted March 8, 2011 ShaunR Yess! It changed to code now with the last trick you mentioned. Thank you so much Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.