Owning Palette: Programming VIs and Functions
Use the structures to build VIs.
| Palette Object | Description |
|---|---|
| Always Copy | Places the value of the Input input into a new memory location and returns the value in Output. Use this function to control the outcome of the LabVIEW compiler buffer allocation process. |
| Case Structure | Has one or more subdiagrams, or cases, exactly one of which executes when the structure executes. The value wired to the selector terminal determines which case to execute and can be Boolean, string, integer, or enumerated type. Right-click the structure border to add or delete cases. Use the Labeling tool to enter value(s) in the case selector label and configure the value(s) handled by each case. |
| Conditional Disable Structure | Has one or more subdiagrams, exactly one of which LabVIEW uses for the duration of execution, depending on the configuration of the conditions of the subdiagram. Use this structure when you want to disable specific sections of code on the block diagram based on some user-defined condition. Right-click the structure border to add or delete a subdiagram. |
| Diagram Disable Structure | Has one or more subdiagrams, or cases, of which only the Enabled subdiagram executes. Use the Diagram Disable structure to disable a section of the block diagram. |
| Event Structure | Has one or more subdiagrams, or event cases, exactly one of which executes when the structure executes. The Event structure waits until an event happens, then executes the appropriate case to handle that event. Right-click the structure border to add new event cases and configure which events to handle. Wire a value to the Timeout terminal at the top left of the Event structure to specify the number of milliseconds the Event structure should wait for an event to occur. The default is –1, indicating never to time out. |
| Feedback Node | Stores a data value from one VI or loop execution to the next. A Feedback Node is analogous to a z^-1 block in feedback control theory and digital signal processing. |
| Flat Sequence Structure | Consists of one or more subdiagrams, or frames, that execute sequentially. Use the Flat Sequence structure to ensure that a subdiagram executes before or after another subdiagram. |
| For Loop | Executes its subdiagram n times, where n is the value wired to the count (N) terminal. The iteration (i) terminal provides the current loop iteration count, which ranges from 0 to n-1. |
| Formula Node | Evaluates mathematical formulas and expressions similar to C on the block diagram. The following built-in functions are allowed in formulas: abs, acos, acosh, asin, asinh, atan, atan2, atanh, ceil, cos, cosh, cot, csc, exp, expm1, floor, getexp, getman, int, intrz, ln, lnp1, log, log2, max, min, mod, pow, rand, rem, sec, sign, sin, sinc, sinh, sizeOfDim, sqrt, tan, tanh. There are some differences between the parser in the Mathematics VIs and the Formula Node. |
| Global Variable | Use global variables to access and pass data among several VIs. |
| Local Variable | Use local variables to read or write to one of the controls or indicators on the front panel of a VI. |
| MathScript Node | Executes LabVIEW MathScripts. You can use the MathScript Node to evaluate scripts that you create in the LabVIEW MathScript Window. The LabVIEW MathScript syntax is similar to the MATLAB® language syntax. |
| Shared Variable | Represents a shared variable on the block diagram. To bind a Shared Variable node to a shared variable from the active project, place a Shared Variable node on the block diagram and double-click it or right-click it and select Select Variable from the shortcut menu to display the Select Variable dialog box. You also can drag a shared variable from the Project Explorer window onto the block diagram of a VI in the same project to create a Shared Variable node. |
| Stacked Sequence Structure | Consists of one or more subdiagrams, or frames, that execute sequentially. Right-click the structure border to add and delete frames or to create sequence locals to pass data between frames. Use the Stacked Sequence structure to ensure a subdiagram executes before or after another subdiagram. |
| While Loop | Repeats the subdiagram inside it until the conditional terminal, an input terminal, receives a particular Boolean value. The Boolean value depends on the continuation behavior of the While Loop. Right-click the conditional terminal and select Stop if True or Continue if True from the shortcut menu. You also can wire an error cluster to the conditional terminal, right-click the terminal, and select Stop on Error or Continue while Error from the shortcut menu. The While Loop always executes at least once. |
| Subpalette | Description |
|---|---|
| Decorations | Use the decorations located on the Decorations palette to group or separate objects on a block diagram with boxes, lines, or arrows. These objects are for decoration only and do not modify data. |
| Timed Structures and VIs | Use the Timed Structures and VIs to control the rate and priority at which a timed structure executes its subdiagram, synchronize the start time of timed structures, create timing sources, and establish a hierarchy of timing sources. |
Refer to the labview\examples\general\structs.llb for examples of using the Structures.