LabVIEW Idea Exchange

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

Active area in Block Diagram

Status: New

Hi

While working with LabVIEW I would suggest that there are broken arrow that shows that the code is not complete if we left to wire any input or output.

I would suggest that there should be an option in the block diagram that we can select the active region (it could be as to draw box) and LabVIEW should only consider code that is inside the box and outside of the box if any unwired input  or output should be ignored.

 

I hope  I made my idea clear.

 

Thanks

Asif 

6 Comments
raphschru
Active Participant

Not completely clear to me:

 


@Asif138 wrote:

broken arrow that shows that the code is not complete if we left to wire any input or output.


What are you calling "input" and "output" ?

Control terminals ?

Node terminals, which includes SubVI terminals, Function terminals, Structure terminals… ?

 

For Nodes, they already break the VI if a required terminal is not wired…

Asif138
Active Participant

just assume as in command line coding like C or any other, we put comments in by putting // or any sign,

so also in labview if any of my terminal is unconnected so i can not run Vi unless i complete wiring,

so i want to bypass that terminal by just drawing any active area of box letting labview to read / consider only that part of code.

i hope i make my self clear.

 

Thanks

asif

raphschru
Active Participant

If you are searching an equivalent of "commenting out" code in LabVIEW, this already exists and is called a "Diagram Disable Structure":

 

Function that breaks the diagram when not wired:

 

raphschru_0-1685361453280.png

 

 

Now enclosed within a Diagram Disable Structure.

All code inside its "Disabled" case(s) is ignored by the compiler.

Only the code contained in the "Enabled" case is compiled:

 

raphschru_1-1685361507382.png

raphschru_0-1685361978213.png

 

 

To find it, open the Function Palette -> Structures -> Diagram Disable Structure

wiebe@CARYA
Knight of NI

Parent (and interface) methods very often have unwired terminals. They just serve as a function prototype.

 

Breaking a VI if the terminals are unwired would make my programming live a hole lot more difficult.  

srlm
Member

Agree with Wiebe: there are plenty of good reasons to leave control/indicator terminals unwired, so that should not be changed to be a reason to break the block diagram. If you have a section of code that is unfinished and causing errors (like unwired Required terminals), use the Diagram Disable structure, which is the equivalent of the // in text code. 

wiebe@CARYA
Knight of NI

Another reason is that the overwrite method has an indicator with a specific default value. No constant is needed... I guess controls could have different default too, but that sounds it could get confusing.