Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Loops and Structures

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Structures are graphical representations of the loops and case statements of text-based programming languages. Use structures on the block diagram to repeat blocks of code and to execute code conditionally or in a specific order.

Like other nodes, structures have terminals that connect them to other block diagram nodes, execute automatically when input data is available, and supply data to output wires when execution completes.

Each structure has a distinctive, resizable border to enclose the section of the block diagram that executes according to the rules of the structure. The section of the block diagram inside the structure border is called a subdiagram. The terminals that feed data into and out of structures are called tunnels. A tunnel is a connection point on a structure border.

Use the following structures located on the Structures palette to control how a block diagram executes processes:

  • For Loop—Executes a subdiagram a set number of times or, if you add a conditional terminal, until a Boolean condition or an error occurs.
  • While Loop—Executes a subdiagram until a Boolean condition or an error occurs.
  • Case structure—Contains multiple subdiagrams, only one of which executes depending on the input value passed to the structure.
  • Sequence structure—Contains one or more subdiagrams that execute in sequential order.
  • Event structure—Contains one or more subdiagrams that execute when events are generated by user interaction.
  • Timed structures—Execute one or more subdiagrams with time bounds and delays.
  • Conditional Disable structure—Contains one or more subdiagrams, exactly one of which compiles and executes at run-time.
  • Diagram Disable structure—Contains one or more subdiagrams, exactly one of which compiles and executes at run-time.

Right-click the border of a structure to display its shortcut menu.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit