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: 

executable doesn't run sub-panels

Solved!
Go to solution

Hi all!

 

I have to write a labview program that runs multiple VIs depending on what the user wants. Thus, in order to be able to test individual VIs if something goes wrong I constructed an event handled structure with a tab controller. Each tab controller has a subPanel which points to a VI that I need to control from the main panel once the app is running. Everything goes perfectly until I build the executable when everything is loaded to the main, but I cannot control anything! (I keep pressing the buttons, but they don't activate anything). All buttons control one event in my structure (i.e. control DC motor, record measurements, stop measurements etc)

 

In the image attached, there's an example with my VI which controls a power supply for a DC motor. It's supposed to be controlled by the 'Set voltage' button and every time that button is clicked the user can just update the voltage until they are satisfied. However, despite the fact that in the main labview VI everything works, the executable does nothing!

 

Any idea what i may be missing/doing wrong? How are we supposed to use supPannels in order to work in an executable?

 

Thanks for all the help anyone can provide!

simm01

Download All
Message 1 of 9
(4,981 Views)
Solution
Accepted by topic author simm01
The compiler doesn't understand path constants in this context. You'll need to "always include" them in the build, or, replace them with a Static VI ref, in which case they'll automatically be included in the build.
/Y
G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 2 of 9
(4,967 Views)

I can't use the first method as for some reason it doesn't let me select other VIs than the main one when building the executable.

I tried the static reference method, but this time I can't even see the VI and the buttons don't work again. Is this how I am supposed to use a static reference? (see the 2 jpeg files attached)

Download All
0 Kudos
Message 3 of 9
(4,952 Views)

Hi simm,

 

VI needed for "always include" when building an executable have to be part of your project!

 

I tried the static reference method

When something doesn't work you should check error messages/wires. Until now you don't do so…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 9
(4,938 Views)

You should use the error cluster and it will help you figure out what is going on.  Instead of using VI Path, use VI Name.  When you specify the name of the VI as a string, LabVIEW will load the VI in memory.

Message 5 of 9
(4,937 Views)

Thanks everyone! I added the individual VIs to the project and used static reference and everything is working now! Smiley Happy

Message 6 of 9
(4,911 Views)

I have a quite complex project that requires me to have multiple executable running.

My problem is as follow:

MAIN.exe need to load in a sub panel any of the other.exe.

All the exe has been compiled in labview. The main.exe come from a diferent project than the other.exe.

In labview everything is working.

I can access sucessfully the control and indicator value of the other.exe trough vi server.

Using the same VI reference, should work in the sub panel. But why it is not working?

Thanks

Benoit

0 Kudos
Message 7 of 9
(4,146 Views)

Hi Benoit,

 

main point: executables use all their own memory space. You can use VI server to communicate between executables.

 

Beside of this: how do you load executables into subpanels?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 9
(4,141 Views)

well you teach me nothing there...

As what I can see, if your vi is in a different executable, it is impossible to put this vi in a sub panel. so I create a "duplication" of this vi without the code and I apply the control and indicator property. the other solution I found is to exchange data trough VI server as well and then apply those to the vi in the sub panel.

Benoit

0 Kudos
Message 9 of 9
(4,085 Views)