Visit our LabVIEW Wiki Code Distribution Portal
Tags |
(This content has not been tagged yet)
|
![]() |
Sep 24 2008, 08:40 PM
Post
#1
|
|||
|
5 more posts to go! Member Posts: 5 Joined: 5-February 08 Member No.: 10678 Using LabVIEW Since:2008 LV:8.5.1 ,. ,.
|
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. ![]() 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
|
||
|
|
|||
| Ad |
Sep 24 2008, 08:40 PM
Post
#
|
||
|
|
|
||
|
|
|||
Sep 24 2008, 11:08 PM
Post
#2
|
||||
![]() Extremely Active Member Posts: 508 Joined: 2-August 05 Member No.: 2680 Using LabVIEW Since:1996 LV:8.5.1 ,8.6 ,.
|
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. 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.
|
|||
|
|
||||
Sep 25 2008, 07:44 AM
Post
#3
|
|||
|
5 more posts to go! Member Posts: 5 Joined: 5-February 08 Member No.: 10678 Using LabVIEW Since:2008 LV:8.5.1 ,. ,.
|
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
|
||
|
|
|||
Sep 25 2008, 01:23 PM
Post
#4
|
|||
|
Extremely Active Member Posts: 268 Joined: 30-December 05 Member No.: 3786 Using LabVIEW Since:1998 LV:8.5 ,8.20 ,7.1
|
Are you including your called subVI in your build specifications, i.e. you have your startup vi but your called VI needs to be under the "always included".
--------------------
|
||
|
|
|||
Sep 25 2008, 01:46 PM
Post
#5
|
|||
|
Extremely Active Member Posts: 369 Joined: 24-August 06 Member No.: 5958 Using LabVIEW Since:1995 LV:8.5 ,8.2.1 ,7.1.1
|
...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 -------------------- Wired but not weird...
|
||
|
|
|||
![]() ![]() |
| Time is now: 1st December 2008 - 08:27 PM |