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: 

build application with conditional disabled VI's still tries to load them ...

Hi,

 

we have a big LV-project with some "conditional disabled" or with a "switch" unused VI's. But LabVIEW still tries to load them when building an application (even when they are not used). Is there a setting to prevent this behavior? Something like "ignore unused/missing VI's during built"?

 

Thanks

 

Peter

0 Kudos
Message 1 of 14
(3,888 Views)

When you say "Conditional Disable", do you mean you are putting the VI in a case structure, with a "F" boolean constant wired to the empty case?

 

If this is so, you should use the Disable structure instead.

Machine Vision, Robotics, Embedded Systems, Surveillance

www.movimed.com - Custom Imaging Solutions
0 Kudos
Message 2 of 14
(3,862 Views)

You can define custom symbols in your project properties to use in the Conditional Disable structure.  I don't know if that helps you any.

 

Capture.PNG

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 3 of 14
(3,851 Views)

conditionally disabled structures conditions are evaluated at runtime.  Therefore, the "Disabled" code case cannot be removed during compile and must be loaded unbroken for the callers to compile correctly.


"Should be" isn't "Is" -Jay
Message 4 of 14
(3,847 Views)

Ok, I understand;

 

So there is no way to prevent LabVIEW to load really not used (conditional disabled...) VI's during a build?

 

Maybe for future version?

 

Peter

0 Kudos
Message 5 of 14
(3,834 Views)
Hey Jeff!
If the conditional disables are evaluated at runtime, that implies that there is a way to set the conditional symbol values -- or at least the user defined ones -- at runtime. Yes?
Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 14
(3,822 Views)

@JÞB wrote:

conditionally disabled structures conditions are evaluated at runtime.  Therefore, the "Disabled" code case cannot be removed during compile and must be loaded unbroken for the callers to compile correctly.


I don't think that's true. If it is evaluated at runtime that would mean the compiled code must contain the code from all conditions. This can't be true since the code for some (unused) conditions can be broken and it will still work.

The condition is evaluated at design time. When changing a disable symbol it will recompile the code.

 

0 Kudos
Message 7 of 14
(3,813 Views)

The difference is disable structure and Conditional disable structure.  unconditionally disabled code can be broken as it cannot run.  Compare that to a case driven by a constant- the unreachable code is removed by the optomizer in certain conditions (We won't guess what conditions prohibit this optomization and it has been changeing a lot since 8.6 to 2013 I imagine it will continue to evolve) however, Because the optomization is not garanteed to occurr the unreachable code cannot be broken.  This is simillar to the conditional disable symbols- they are not evaluated untill runtime and the condition may depend on variables external to LabVIEW.  So, all cases must be compilable.

 

@ Mike- Yup, I believe those symbols values CAN be manipulated external to the app instance (Certainly App.Kind comes to mind).  I don't have any experience doing that. 


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 14
(3,798 Views)

OK, let me rephrase my earlier post:

Unused cases in a conditional disable structure can contain broken code and the VI is still executable. I have that all the time, e.g. for VIs that can run both on RT and Host and use target specific functionality. So NOT all cases must be executable. The disable symbols thus CAN'T change during runtime.

 

App.Kind has nothing to do with disable structures. How would you link the two?

 

0 Kudos
Message 9 of 14
(3,795 Views)

I think some of the pre-defined symbols are evaluated at runtime. For example "RUN_TIME_ENGINE".
But cases for custom symbols that you define yourself can contain broken code and still compile OK. I do this all the time as well.

0 Kudos
Message 10 of 14
(3,770 Views)