Case Structure

LabVIEW 2018 Help


Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)


LabVIEW 2015 Help
LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help

Owning Palette: Structures

Requires: Base Development System

Contains one or more subdiagrams, or cases, exactly one of which executes when the structure executes. The value wired to the case selector determines which case to execute.

Components of a Case Structure

Selector label—Displays the value(s) for which the associated case executes. You can specify a single value or a range of values. You also can use the selector label to specify a default case.
Subdiagram(case)—Contains the code that executes when the value wired to the case selector matches the value that appears in the selector label. To modify the number or order of subdiagrams, right-click the border of the Case structure and select the appropriate option.
Case selector—Selects which case to execute based on the value of the input data. The input data can be a Boolean, string, integer, enumerated type or error cluster. The data type you wire to the case selector determines the allowed cases you can enter in the selector label.

Configuring a Case Structure

Rearranging a Case Structure

Troubleshooting a Case Structure

Example

Refer to the Case Structure - Selector Data Types VI in the labview\examples\Structures\Case Structure directory for an example of using the Case Structure.

WAS THIS ARTICLE HELPFUL?

Not Helpful