Specifying a Default Subdiagram for Case Structures

To avoid listing every possible input value, specify a default case subdiagram for the Case structure to handle out-of-range values. For example, if the case selector is an integer and you specify subdiagrams for 1, 2, and 3, you must specify a default subdiagram to execute if the input value is 4 or any other unspecified integer value. Refer to the Case Structure - Selector Data Types VI in the labview\examples\Structures directory for an example of using Case structures.

Complete the following steps to specify a default subdiagram.

  1. Move to an existing subdiagram.
  2. Right-click the selector label and select Make This The Default Case from the shortcut menu to make an existing subdiagram the default subdiagram.

You also can complete the following steps to specify a default subdiagram.

  1. Move to the subdiagram you want to make default and click on the selector label with the Labeling tool.
  2. Enter Default in the selector label.
Note  Do not add quotation marks around Default. Doing so indicates that the value is a string, rather than the default subdiagram.
  1. Press the <Enter> key.
Note Note  You cannot specify a default subdiagram if you wire a Boolean control to the case selector. Make the Boolean control TRUE or FALSE to determine which subdiagram to execute.