From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can LabVIEW insert subVI panel functions in multiple levels?

Solved!
Go to solution

Hi;

When using the LabVIEW insert subVI panel function, I performed a two-level subpanel insertion operation, that is, insert the display VI front panel in the main VI and insert the execution VI front panel in the display VI front panel. There is no problem when running in a programming environment. After the exe is generated, it will not run, and the front panel of the inserted subVI will not be displayed. Can LabVIEW only insert the front panel functions of a subVI?

0 Kudos
Message 1 of 7
(924 Views)

Attach your VI's so we can see what you are doing.

 

I can only guess that you aren't calling the subVI's by the correct name and path.  SubVI's take on a different path when they are in an executable as opposed to a file on the PC running in development environment

0 Kudos
Message 2 of 7
(917 Views)
Hi, Please see the attached CallSubVI. It is version 18. Run OK in the programming environment Main.vi. Application.exe runs abnormally in the APP. Am I using SubPanel wrong?
0 Kudos
Message 3 of 7
(892 Views)

Sorry, the attachment just missed

0 Kudos
Message 4 of 7
(883 Views)
Solution
Accepted by topic author hhLiu

@hhLiu wrote:

Hi;

When using the LabVIEW insert subVI panel function, I performed a two-level subpanel insertion operation, that is, insert the display VI front panel in the main VI and insert the execution VI front panel in the display VI front panel. There is no problem when running in a programming environment. After the exe is generated, it will not run, and the front panel of the inserted subVI will not be displayed. Can LabVIEW only insert the front panel functions of a subVI?


If it works in the IDE it should work compiled. You've forgot to include the VI in the build or messed up the path. (that's why VI ref constants are handy, they are included automatically and know their own path)

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 7
(868 Views)

I haven't looked at your code, but another option (other than the VI not being included or having a wrong path) is that by default LV removes the front panels from subVIs when it saves them into the EXE and without a front panel, you can't insert it into the subpanel.

 

There are a number of ways of getting LV to keep the FP, including creating a property node for a control on the FP and setting some of the FP properties (such as hiding the scrollbars).

 

Note that any subVI you want to insert will need to get this treatment.


___________________
Try to take over the world!
0 Kudos
Message 6 of 7
(854 Views)

Hi;

Thank you very much for your help, I have solved this problem in the project. It's a problem with the file path

0 Kudos
Message 7 of 7
(813 Views)