Jump to content

Problem with Sub panel! Need help


Recommended Posts

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

post-18013-0-63152200-1299529988_thumb.p

Link to comment

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

Link to comment

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

Link to comment

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.

Link to comment

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.

Link to comment

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.