LabVIEW Case structures operate similarly to switch statements or if...then...else statements in text-based languages. Case structures allow you to run different sections of code based on the input value you provide to the structure.

A Case structure, shown as follows, has two or more subdiagrams. Refer to the Case Structure - Selector Data Types VI in the labview\examples\Structures directory for an example of using Case structures.


LabVIEW Case Structure with True case selected.

Only one case subdiagram is visible at a time, and the structure executes only one subdiagram at a time. An input value determines which subdiagram executes.

The case selector label at the top of the Case structure, shown as follows, contains the name of the selector value that corresponds to the case in the center and decrement and increment arrows on each side.


Case selector label with True value and navigation arrows.