LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scripting Help - Remove/change items from a Project

@kyle!!!

Thanks!!!

0 Kudos
Message 11 of 18
(655 Views)

Out of curiosity, why not just use a conditional disable structure around your debug VIs?  I've done this in several projects before and it is much, much simpler than what you are describing.

0 Kudos
Message 12 of 18
(642 Views)

I have thought of that. One thing I do not like about it is diagram space, the other I do not know. In a compiled application is only the enabled part kept? Is it seen as a conditional? I have a global that can enable disable the debugger VIs but there are still calling and returning times along with loading VIs into memory. I guess I'm trying to make my application as lean as possible, but the return is probably not worth the effort.

 

Cheers,

mcduff

0 Kudos
Message 13 of 18
(632 Views)

I was curious about whether or not it still in memory and checking the condition each time.  After some Google searching I was unable to find anything... so I decided to test it.

 

 

After spending way longer than I should have trying to find a way to determine if a VI is in memory as part of a compiled application without my method of determining if it is in memory placing it in memory...  the short answer is no.  If a VI is compiled as part of a conditional disable structure the VI is never actually placed in to memory.

Message 14 of 18
(621 Views)

Thanks for your effort!!

 

Edit: @BowenM tried to give you multiple kudos, but it erased the previous one, then I gave another, hopefully it went through.

0 Kudos
Message 15 of 18
(619 Views)

I would agree with BowenM Conditional Disables with Conditional Disable Symbols setup in the Project Properties is the preferred way to toggle debugging code.  I do this all the time with simulated versus actual hardware.

 

Conditional Symbols-Project Properties.png

 

One caveat to BoewnM's statement is that VIs in Disabled Diagrams are not built into executables unless you build with debugging enabled.  Then they will be included.  To ensure it is disabled, in the application builder window, go to the Advanced section and make sure it is not checked.

 

Application Properties.png

Quentin "Q" Alldredge

Owner, Q Software Innovations, LLC (QSI) | Director, GCentral | Admin, LabVIEW Wiki
Tech Lead, Hill AFB LabVIEW Center of Excellence | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner


Message 16 of 18
(602 Views)

Thanks for the advice. Just to be clear, this is also true for conditional disable structures? See below.

 

Snippet.png

 

EDIT: Just checked. It works!! Thanks.

0 Kudos
Message 17 of 18
(597 Views)

One more thing.  You can setup your own symbols in the Project Properties.  Below I setup one as  DEBUG_MODE with a value of True.

 

Conditional Disable Symbols.png

 

Then in your Conditional Disable Structures your symbols will show up.

Conditional Disable.png

 

This Conditional Disable Structure has a case for True and for False with False also being the default.  This is cool because this applies everywhere in your project.  You can have Conditional Disable Structures everywhere you need one and then to toggle them all, just set the value in the Project Properties by double-clicking the value and typing a different value.  When building make sure you have them set to the one you want it built with.  The disabled ones won't be included as long as the Debugging check is off (as I stated earlier).

Quentin "Q" Alldredge

Owner, Q Software Innovations, LLC (QSI) | Director, GCentral | Admin, LabVIEW Wiki
Tech Lead, Hill AFB LabVIEW Center of Excellence | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner


Message 18 of 18
(590 Views)