Jump to content

Functions Palette/Programming/Structures: Difference between revisions

From LabVIEW Wiki
mNo edit summary
No edit summary
 
(31 intermediate revisions by 2 users not shown)
Line 1: Line 1:
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]]).
{{LabVIEW Palette Object Information
|palette = Functions Palette/Programming{{!}}Programming palette
|type    = palette
|icon    = Functions Palette - Programming Palette - Structures.png
}}


The [[Functions Palette/Programming/Structures/Stacked Sequence Structure|Stacked Sequence Structure]] is considered to be deprecated and has been removed from the Structures Palette since LabVIEW 20xx (version needed) although it is still functional to code upgraded from older versions.
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]]).


== Available structures ==
Structures have three uses. They either:
# 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 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 structure|For Loops]], [[While Loop structure|While Loops]], [[Timed Loop structure|Timed Loops]])
{{TOCright}}


* [[Functions Palette/Programming/Structures/For Loop|For Loop]]
{{LabVIEW Palette
* [[Functions Palette/Programming/Structures/While Loop|While Loop]]
|image  = Functions Palette - Programming - Structures Palette.png
* [[Functions Palette/Programming/Structures/Timed Structures|Timed Structures (Subpalette)]]
|title  = Structures palette
** [[Functions Palette/Programming/Structures/Timed Structures/Timed Loop|Timed Loop]]
|parent = Functions Palette/Programming
** [[Functions Palette/Programming/Structures/Timed Structures/Timed Sequence|Timed Sequence]]
|1      = For Loop structure{{!}}For Loop
* [[Functions Palette/Programming/Structures/Case Structure|Case Structure]]
|2      = While Loop structure{{!}}While Loop
* [[Functions Palette/Programming/Structures/Event Structure|Event Structure]]
|3      = Functions Palette/Programming/Structures/Timed Structures{{!}}Timed Structures
* [[Functions Palette/Programming/Structures/In Place Element Structure|In Place Element Structure]]
|11    = Case structure{{!}}Case Structure
* [[Functions Palette/Programming/Structures/Flat Sequence Structure|Flat Sequence Structure]]
|12    = Event structure{{!}}Event Structure
* [[Functions Palette/Programming/Structures/Stacked Sequence Structure|Stacked Sequence Structure]]
|13    = In Place Element structure{{!}}In Place Element Structure
* [[Functions Palette/Programming/Structures/Diagram Disable Structure|Diagram Disable Structure]]
|21    = Flat Sequence structure{{!}}Flat Sequence Structure
* [[Functions Palette/Programming/Structures/Conditional Disable Structure|Conditional Disable Structure]]
|22    = Formula Node structure{{!}}Formula Node
|23    = MathScript structure{{!}}MathScript Structure
|31    = Diagram Disable structure{{!}}Diagram Disable Structure
|32    = Conditional Disable structure{{!}}Conditional Disable Structure
|33    = Type Specialization structure{{!}}Type Specialization Structure
|41    = Shared Variable node{{!}}Shared Variable
|42    = Local Variable{{!}}Local Variable
|43    = Global Variable{{!}}Global Variable
|51    = Functions Palette/Programming/Structures/Decorations{{!}}Decorations
|53    = Feedback Node function{{!}}Feedback Node
}}
 
== Subpalettes ==
{| class="wikitable sortable"
! Icon
! Name
|-
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Timed Structures.png|frameless|border|Timed Structures|link=Functions Palette/Programming/Structures/Timed Structures]]
| [[Functions Palette/Programming/Structures/Timed Structures|Timed Structures]]
|-
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Decorations.png|frameless|border|Decorations|link=Functions Palette/Programming/Structures/Decorations]]
| [[Functions Palette/Programming/Structures/Decorations|Decorations]]
|}
 
== Structures ==
{| class="wikitable sortable"
! Icon
! Name
|-
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - For Loop.png|frameless|border|For Loop|link=For Loop structure]]
| [[For Loop structure|For Loop]]
|-
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - While Loop.png|frameless|border|While Loop|link=While Loop structure]]
| [[While Loop structure|While Loop]]
|-
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Case Structure.png|frameless|border|Case Structure|link=Case structure]]
| [[Case structure|Case Structure]]
|-
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Event Structure.png|frameless|border|Event Structure|link=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 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 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 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 structure]]
| [[Formula Node structure|Formula Node]]
|-
! style="text-align: center;" | [[File:Structures Palette - MathScript.png|frameless|border|MathScript|link=MathScript structure]]
| [[MathScript structure|MathScript]]
|-
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Diagram Disable Structure.png|frameless|border|Diagram Disable Structure|link=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 structure]]
| [[Conditional Disable structure|Conditional Disable Structure]]
|-
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Type Specialization Structure.png|frameless|border|Type Specialization Structure|link=Type Specialization structure]]
| [[Type Specialization structure|Type Specialization Structure]]
|-
|}
 
== Functions ==
{| class="wikitable sortable"
! Icon
! Name
|-
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Shared Variable.png|frameless|border|Shared Variable|link=Shared Variable node]]
| [[Shared Variable node|Shared Variable]]
|-
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Local Variable.png|frameless|border|Local Variable|link=Local Variable]]
| [[Local Variable|Local Variable]]
|-
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Global Variable.png|frameless|border|Global Variable|link=Structures/Global Variable]]
| [[Global Variable|Global Variable]]
|-
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Feedback Node.png|frameless|border|Feedback Node|link=Feedback Node]]
| [[Feedback Node function|Feedback Node]]
|-
|}
 
==History==
{| class="wikitable"
! Version
! Change(s)
|-
|[[File:LV2017.png|frameless|border|64x64px|LabVIEW 2017|link=LabVIEW 2017]]
| In [[LabVIEW 2017]] the [[Type Specialization structure|Type Specialization Structure]] was added in conjunction with the addition of [[Malleable VI]]s.
|-
|[[File:LV2014.png|frameless|border|64x64px|LabVIEW 2014|link=LabVIEW 2014]]
| In [[LabVIEW 2014]] the [[Stacked Sequence structure|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.
|-
|[[File:LV8-2013.png|frameless|border|64x64px|LabVIEW 8.5|link=LabVIEW 8.5]]
| In [[LabVIEW 8.5]] the [[In Place Element structure|In Place Element Structure]] was added.
|-
|[[File:LV8-2013.png|frameless|border|64x64px|LabVIEW 8|link=LabVIEW 8]]
| In [[LabVIEW 8]] the[[Diagram Disable structure|Diagram Disable Structure]], [[Conditional Disable structure|Conditional Disable Structure]] and [[Shared Variable node|Shared Variable]] were added.
|-
|[[File:LV7.png|frameless|border|64x64px|LabVIEW 7|link=LabVIEW 7 Express]]
| In [[LabVIEW 7 Express]] the [[Flat Sequence structure|Flat Sequence Structure]] and [[Feedback Node function|Feedback Node]] were added.
|-
|[[File:LV7.png|frameless|border|64x64px|LabVIEW 6|link=LabVIEW 6i]]
| In [[LabVIEW 6i]] the [[Event structure|Event Structure]] was added.
|}


[[Category:LabVIEW fundamentals]]
[[Category:LabVIEW fundamentals]]
[[Category:Structures]]
[[Category:Structures Palette]]
[[Category:Functions Palette]]

Latest revision as of 17:47, 2 July 2020

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)
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)

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 In LabVIEW 2017 the Type Specialization Structure was added in conjunction with the addition of Malleable VIs.
LabVIEW 2014 In 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 LabVIEW 8.5 the In Place Element Structure was added.
LabVIEW 8 In LabVIEW 8 theDiagram Disable Structure, Conditional Disable Structure and Shared Variable were added.
LabVIEW 7 In LabVIEW 7 Express the Flat Sequence Structure and Feedback Node were added.
LabVIEW 6 In LabVIEW 6i the Event Structure was added.