Jump to content

Show Fron Panel of subvi in EXE


Recommended Posts

Hi you all,

I have been searching all over this forum trying to find how I reference a sub vi when compiled to exe-file, i mean to be able to show/close front panel of the sub vi. It runs nicely from project but not when compiled. The sub vi is just a serial port reader, showing buffers, error messages etc. At the moment I'm able to open sub vi (NP_Serial) running the EXE file, but the VISA reports an argument error. If I delete Static VI ref. the NP_Serial is working fine, but i'm not able to show the Front Panel when using EXE file.

I have also been trying the open.method but with the same result.

post-10678-1222288027.png?width=400

Anyone hwo can help me out?

I know i can use the custom settings - "show when called", but that is not convinient for me as the sub vi is called every loop from the top vi.

regards

Kenneth

Link to comment

When building an exe, the front panel of subvi's is automatically removed. Go into the build and manually uncheck the "remove frontpanel" checkbox.

But I this may not work to see the front panel.

Re-architect your code to call the subVI and display as a subpanel in your top-level VI. This way it is always visible. This screen shot shows how to open a VI as a subpanel, given the VI name and path. The loop is just a re-try incase the open fails.

post-2680-1222297614.jpg?width=400

You can add a tab to the top level VI and embed the subpanel in it, so that you have additional screen space.

Put the data coming out of the subpanel VI on a Q and read that in the top-level VI.

N.

Link to comment

Hi

Thanks for your replay Neville D

I will re-organize my code to your recomendation at a later stage. I actually solved my problem, i had done a blunder in the NP_serial sub vi. I did not close all ports properly when closing application so when I tried the exe-file the ports were already occupied. I also did som chages in the build properties, I put the NP_Serial in "always included".

-kl

Link to comment

QUOTE (PaulG. @ Sep 25 2008, 03:23 PM)

...but your called VI needs to be under the "always included"...

I don't think it has to be set as always included, if it being used by static VI reference as indicated in the screenshot. But I would recommend that you retrieve the VI name from the static VI reference instead of having a constant specifying the name.

Here is a little trick I used in the past to force a FP to be included in a build, without having to explicitly set this in the build specifications;

1. Open VI properties

2. goto "Window Appearance" , customize

3. uncheck the "Allow user to close window" option

I don't remember if I used this in LabVIEW 8.5, as I recall it is enough to have VIs included as static VI references, but I might be wrong.

/J

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.