Jump to content

Functions Palette/Programming/Structures: Difference between revisions

From LabVIEW Wiki
mNo edit summary
mNo edit summary
Line 28: Line 28:
}}
}}


A '''Structure''' is a construct that surrounds other programming elements.  It divides the block diagram into a hierarchy of sub-diagrams.  Some structures only contain one sub-diagram, or frame, (i.e. [[Functions Palette/Programming/Structures/For Loop|For Loops]], [[Functions Palette/Programming/Structures/While Loop|While Loops]], [[Functions Palette/Programming/Structures/In Place Element Structure|In Place Element Structures]], etc.). While others contain multiple sub-diagrams, or frames, (i.e. [[Functions Palette/Programming/Structures/Case Structure|Case Structures]], [[Functions Palette/Programming/Structures/Event Structure|Event Structures]], [[Functions Palette/Programming/Structures/Diagram Disable Structure|Diagram Disable Structures]], and [[Functions Palette/Programming/Structures/Conditional Disable Structure|Conditional Disable Structures]]).
A '''Structure''' is a construct that surrounds other programming elements.  It divides the block diagram into a hierarchy of sub-diagrams.  Some structures only contain one sub-diagram, or frame, (i.e. [[/For Loop structure|For Loops]], [[While Loop structure|While Loops]], [[In Place Element structure|In Place Element Structures]], etc.). While others contain multiple sub-diagrams, or frames, (i.e. [[Case structure|Case Structures]], [[Event structure|Event Structures]], [[Diagram Disable structure|Diagram Disable Structures]], and [[Conditional Disable structure|Conditional Disable Structures]]).


Structures have three uses. They either:
Structures have three uses. They either:
# Control the execution between blocks of code ([Flat Sequence sturcture|Flat Sequence Structure]], [[Stacked Sequence sturcture|Stacked Sequence Structure]], [[In Place Element sturcture|In Place Element Structures]], [[Timed Sequence sturcture|Timed Sequence]])
# Control the execution between blocks of code ([Flat Sequence structure|Flat Sequence Structure]], [[Stacked Sequence structure|Stacked Sequence Structure]], [[In Place Element structure|In Place Element Structures]], [[Timed Sequence structure|Timed Sequence]])
# Allow a choice between different blocks of code to execute ([[Case sturcture|Case Structures]], [[Event sturcture|Event Structures]], [[Diagram Disable sturcture|Diagram Disable Structures]], [[Conditional Disable sturcture|Conditional Disable Structures]])
# Allow a choice between different blocks of code to execute ([[Case structure|Case Structures]], [[Event structure|Event Structures]], [[Diagram Disable structure|Diagram Disable Structures]], [[Conditional Disable structure|Conditional Disable Structures]])
# Allow code to repeat execution ([[For Loop sturcture|For Loops]], [[While Loop sturcture|While Loops]], [[Timed Loop sturcture|Timed Loops]])
# Allow code to repeat execution ([[For Loop structure|For Loops]], [[While Loop structure|While Loops]], [[Timed Loop structure|Timed Loops]])


== Subpalettes ==
== Subpalettes ==
Line 52: Line 52:
! Name
! Name
|-
|-
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - For Loop.png|frameless|border|For Loop|link=For Loop sturcture]]
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - For Loop.png|frameless|border|For Loop|link=For Loop structure]]
| [[For Loop sturcture|For Loop]]
| [[For Loop structure|For Loop]]
|-
|-
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - While Loop.png|frameless|border|While Loop|link=While Loop sturcture]]
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - While Loop.png|frameless|border|While Loop|link=While Loop structure]]
| [[While Loop sturcture|While Loop]]
| [[While Loop structure|While Loop]]
|-
|-
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Case Structure.png|frameless|border|Case Structure|link=Case sturcture]]
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Case Structure.png|frameless|border|Case Structure|link=Case structure]]
| [[Case sturcture|Case Structure]]
| [[Case structure|Case Structure]]
|-
|-
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Event Structure.png|frameless|border|Event Structure|link=Event sturcture]]
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Event Structure.png|frameless|border|Event Structure|link=Event structure]]
| [[Event sturcture|Event Structure]]
| [[Event structure|Event Structure]]
|-
|-
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - In Place Element Structure.png|frameless|border|In Place Element Structure|link=In Place Element sturcture]]
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - In Place Element Structure.png|frameless|border|In Place Element Structure|link=In Place Element structure]]
| In Place Element sturcture|In Place Element Structure]]
| [[In Place Element structure|In Place Element Structure]]
|-
|-
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Flat Sequence Structure.png|frameless|border|Flat Sequence Structure|link=Flat Sequence sturcture]]
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Flat Sequence Structure.png|frameless|border|Flat Sequence Structure|link=Flat Sequence structure]]
| Flat Sequence sturcture|Flat Sequence Structure]]
| [[Flat Sequence structure|Flat Sequence Structure]]
|-
|-
! style="text-align: center;" | [[File:Functions_Palette_-_Programming_-_Structures_-_Stacked_Sequence_Structure.png|frameless|border|Stacked Sequence Structure|link=Stacked Sequence sturcture]]
! style="text-align: center;" | [[File:Functions_Palette_-_Programming_-_Structures_-_Stacked_Sequence_Structure.png|frameless|border|Stacked Sequence Structure|link=Stacked Sequence structure]]
| [[Stacked Sequence sturcture|Stacked Sequence Structure]]
| [[Stacked Sequence structure|Stacked Sequence Structure]]
|-
|-
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Formula Node.png|frameless|border|Formula Node|link=Formula Node sturcture]]
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Formula Node.png|frameless|border|Formula Node|link=Formula Node structure]]
| [[Formula Node sturcture|Formula Node]]
| [[Formula Node structure|Formula Node]]
|-
|-
! style="text-align: center;" | [[File:Structures Palette - MathScript.png|frameless|border|MathScript|link=MathScript structure]]
! style="text-align: center;" | [[File:Structures Palette - MathScript.png|frameless|border|MathScript|link=MathScript structure]]
| [[MathScript structure|MathScript]]
| [[MathScript structure|MathScript]]
|-
|-
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Diagram Disable Structure.png|frameless|border|Diagram Disable Structure|link=Diagram Disable sturcture]]
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Diagram Disable Structure.png|frameless|border|Diagram Disable Structure|link=Diagram Disable structure]]
| [[Diagram Disable sturcture|Diagram Disable Structure]]
| [[Diagram Disable structure|Diagram Disable Structure]]
|-
|-
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Conditional Disable Structure.png|frameless|border|Conditional Disable Structure|link=Conditional Disable sturcture]]
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Conditional Disable Structure.png|frameless|border|Conditional Disable Structure|link=Conditional Disable structure]]
| [[Conditional Disable sturcture|Conditional Disable Structure]]
| [[Conditional Disable structure|Conditional Disable Structure]]
|-
|-
! style="text-align: center;" | [[File:TSS Icon.pngFunctions Palette - Programming - Structures - Type Specialization Structure.png|frameless|border|Type Specialization Structure|link=Type Specialization sturcture]]
! style="text-align: center;" | [[File:TSS Icon.pngFunctions Palette - Programming - Structures - Type Specialization Structure.png|frameless|border|Type Specialization Structure|link=Type Specialization structure]]
| [[Type Specialization structure|Type Specialization Structure]]
| [[Type Specialization structure|Type Specialization Structure]]
|-
|-

Revision as of 15:49, 25 June 2020

Functions Palette/ProgrammingFor LoopWhile LoopTimed StructuresCase StructureEvent StructureIn Place Element StructureFlat Sequence StructureFormula NodeMathScript StructureDiagram Disable StructureConditional Disable StructureType Specialization StructureShared VariableLocal VariableGlobal VariableDecorationsFeedback Node
Structures palette (Click on a function to navigate, or on the arrow to go to parent palette)
Object information
Owning palette(s) Programming palette
Type Palette
Requires Basic Development Environment
Icon

A Structure is a construct that surrounds other programming elements. It divides the block diagram into a hierarchy of sub-diagrams. Some structures only contain one sub-diagram, or frame, (i.e. For Loops, While Loops, In Place Element Structures, etc.). While others contain multiple sub-diagrams, or frames, (i.e. Case Structures, Event Structures, Diagram Disable Structures, and Conditional Disable Structures).

Structures have three uses. They either:

  1. Control the execution between blocks of code ([Flat Sequence structure|Flat Sequence Structure]], Stacked Sequence Structure, In Place Element Structures, Timed Sequence)
  2. Allow a choice between different blocks of code to execute (Case Structures, Event Structures, Diagram Disable Structures, Conditional Disable Structures)
  3. Allow code to repeat execution (For Loops, While Loops, Timed Loops)

Subpalettes

Icon Name
Timed Structures Timed Structures
Decorations Decorations

Structures

Icon Name
For Loop For Loop
While Loop While Loop
Case Structure Case Structure
Event Structure Event Structure
In Place Element Structure In Place Element Structure
Flat Sequence Structure Flat Sequence Structure
Stacked Sequence Structure Stacked Sequence Structure
Formula Node Formula Node
MathScript MathScript
Diagram Disable Structure Diagram Disable Structure
Conditional Disable Structure Conditional Disable Structure
Type Specialization Structure Type Specialization Structure

Functions

Icon Name
Shared Variable Shared Variable
Local Variable Local Variable
Global Variable Global Variable
Feedback Node Feedback Node

History

Version Change(s)
LabVIEW 2017 The Type Specialization Structure was added in conjunction with the addition of Malleable VIs.
LabVIEW 2014 The Stacked Sequence Structure is considered to be deprecated and has been removed from the Structures Palette although it is still functional to code upgraded from older versions.
LabVIEW 8.5 In Place Element Structure was added.
LabVIEW 8 Diagram Disable Structure, Conditional Disable Structure and Shared Variable were added.
LabVIEW 7 Flat Sequence Structure and Feedback Node were added.
LabVIEW 6 Event Structure was added.