LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
WiMAX_Eng

Disable Parts of the Block Diagram

Status: Declined
This feature already exists in LabVIEW

I don't think this has been discussed before but apologies if it has...

 

Similar to the 'skip' feature of a step in TestStand (or comments in text based programming languages) it would be nice to be able to disable parts of the block diagram to bypass parts of the code.  I do this often in electronic simulation packages to bypass (route around) parts of a circuit which can be helpful in design or debugging by isolating areas or switching off functionality.  In this way you don't have to delete anything to bypass it.  To show which parts are disabled in the block diagram those parts would be greyed out or ghost.  This of course may also affect controls and indicators which should similiarly be ghost (which has already been suggested to signify hidden controls/indicators).

I guess the alternative is to use case statements with false constants but this can mean creating space and making a mess.

12 Comments
PhillipBrooks
Active Participant
WiMAX_Eng
Member

Thanks Philip, I hadn't seen this.  However, this to me is the same as putting a case statement around the code section and wiring a False constant to the selector.  If you want to do this in different places of your code you would need to create several of these fenced off areas - either way your code can now look messed up.

RavensFan
Knight of NI

How do you expect to do it any better than this?  Yes the code "can now look messed up".  But at this point you are debugging, not trying to make aesthetically beautiful code.

TCPlomp
Trusted Enthusiast

And by using the 'Conditional Disable structure'  you can switch multiple cases at once.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
AristosQueue (NI)
NI Employee (retired)

>  And by using the 'Conditional Disable structure'  you can switch multiple cases at once.

 

 TCPlomp is correct. You can define symbols in the project tree and use them to turn on or off various chunks of code across your hierarchy.

 

Unless you have further comments, I'm going to ask that this idea be closed as "already implemented".

JackDunaway
Trusted Enthusiast

"Already Implemented" or "Already Exists" would be a great new Idea Status to add - several (most?) of the "Completed" statuses would be more accurately classified as "Already Implemented."

altenbach
Knight of NI

> However, this to me is the same as putting a case statement around the code section and wiring a False constant to the selector

 

No, That's actually quite different. 😉

 

Code in the disabled case of a diagram disable structure can be broken and the VI can still run. Broken code in a case structure breaks the VI.

WiMAX_Eng
Member

All points taken, thanks for the beating!  Please close as suggested.

Laura F.
Active Participant
Status changed to: Completed
 
G-Money
NI Employee (retired)
Status changed to: Completed
This feature already exists in LabVIEW