Functions Palette/Programming/Structures: Difference between revisions
Appearance
mNo edit summary |
No edit summary |
||
| (9 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{LabVIEW Palette Object Information | |||
|palette = Functions Palette/Programming{{!}}Programming palette | |||
|type = palette | |||
|icon = Functions Palette - Programming Palette - Structures.png | |||
}} | |||
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: | |||
# 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}} | |||
{{LabVIEW Palette | {{LabVIEW Palette | ||
|image = Functions Palette - Programming - Structures Palette.png | |image = Functions Palette - Programming - Structures Palette.png | ||
|title = Structures palette | |title = Structures palette | ||
|parent = Functions Palette/Programming | |||
|1 = For Loop structure{{!}}For Loop | |1 = For Loop structure{{!}}For Loop | ||
|2 = While Loop structure{{!}}While Loop | |2 = While Loop structure{{!}}While Loop | ||
| Line 14: | Line 29: | ||
|32 = Conditional Disable structure{{!}}Conditional Disable Structure | |32 = Conditional Disable structure{{!}}Conditional Disable Structure | ||
|33 = Type Specialization structure{{!}}Type Specialization Structure | |33 = Type Specialization structure{{!}}Type Specialization Structure | ||
|41 = Shared Variable{{!}}Shared Variable | |41 = Shared Variable node{{!}}Shared Variable | ||
|42 = Local Variable{{!}}Local Variable | |42 = Local Variable{{!}}Local Variable | ||
|43 = Global Variable{{!}}Global Variable | |43 = Global Variable{{!}}Global Variable | ||
| Line 20: | Line 35: | ||
|53 = Feedback Node function{{!}}Feedback Node | |53 = Feedback Node function{{!}}Feedback Node | ||
}} | }} | ||
== Subpalettes == | == Subpalettes == | ||
| Line 50: | Line 53: | ||
! Name | ! Name | ||
|- | |- | ||
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - For Loop.png|frameless|border|For Loop|link= | ! 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= | ! 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= | ! 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= | ! 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= | ! 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= | ! 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= | ! 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= | ! 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]] | ! 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= | ! 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= | ! 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: | ! 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]] | | [[Type Specialization structure|Type Specialization Structure]] | ||
|- | |- | ||
| Line 93: | Line 96: | ||
! Name | ! Name | ||
|- | |- | ||
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Shared Variable.png|frameless|border|Shared Variable|link= | ! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Shared Variable.png|frameless|border|Shared Variable|link=Shared Variable node]] | ||
| [[Shared Variable|Shared Variable]] | | [[Shared Variable node|Shared Variable]] | ||
|- | |- | ||
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Local Variable.png|frameless|border|Local Variable|link= | ! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Local Variable.png|frameless|border|Local Variable|link=Local Variable]] | ||
| [[Local Variable|Local Variable]] | | [[Local Variable|Local Variable]] | ||
|- | |- | ||
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Global Variable.png|frameless|border|Global Variable|link= | ! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Global Variable.png|frameless|border|Global Variable|link=Structures/Global Variable]] | ||
| [[Global Variable|Global Variable]] | | [[Global Variable|Global Variable]] | ||
|- | |- | ||
! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Feedback Node.png|frameless|border|Feedback Node|link= | ! style="text-align: center;" | [[File:Functions Palette - Programming - Structures - Feedback Node.png|frameless|border|Feedback Node|link=Feedback Node]] | ||
| [[Feedback Node function|Feedback Node]] | | [[Feedback Node function|Feedback Node]] | ||
|- | |- | ||
| Line 113: | Line 116: | ||
|- | |- | ||
|[[File:LV2017.png|frameless|border|64x64px|LabVIEW 2017|link=LabVIEW 2017]] | |[[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]] | |[[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]] | |[[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]] | |[[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]] | |[[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]] | |[[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 Palette]] | [[Category:Structures 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:
- Control the execution between blocks of code ([Flat Sequence structure|Flat Sequence Structure]], Stacked Sequence Structure, In Place Element Structures, Timed Sequence)
- Allow a choice between different blocks of code to execute (Case Structures, Event Structures, Diagram Disable Structures, Conditional Disable Structures)
- Allow code to repeat execution (For Loops, While Loops, Timed Loops)

Subpalettes
| Icon | Name |
|---|---|
| Timed Structures | |
| Decorations |
Structures
Functions
| Icon | Name |
|---|---|
| Shared Variable | |
| Local Variable | |
| Global Variable | |
| Feedback Node |
History
| Version | Change(s) |
|---|---|
| In LabVIEW 2017 the Type Specialization Structure was added in conjunction with the addition of Malleable VIs. | |
| 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. | |
| In LabVIEW 8.5 the In Place Element Structure was added. | |
| In LabVIEW 8 theDiagram Disable Structure, Conditional Disable Structure and Shared Variable were added. | |
| In LabVIEW 7 Express the Flat Sequence Structure and Feedback Node were added. | |
| In LabVIEW 6i the Event Structure was added. |