Specifying Input Values of Subdiagrams of Case Structures

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Use a Case structure to specify two or more case subdiagrams that execute based on the input value you pass to the structure.

Complete the following steps to specify values of case subdiagrams when you create a Case structure.

  1. Add a Case structure to the block diagram.

  2. Wire an input value to the selector terminal to determine which subdiagram executes. You can position the selector terminal anywhere on the left border of the Case structure. Wire different data types to the selector terminal to create specific types of subdiagrams, as shown in the following table.
    Data TypeSubdiagrams of Case Structure
    BooleanThe structure has a True case and a False case.
    Error clusterThe structure has an Error case and a No Error case. You also can use an error cluster to handle errors.
    Integer, string, or enumerated typeThe structure can have any number of cases.
    Note Note  By default, string values you wire to the selector terminal are case sensitive. To allow case-insensitive matches, wire a string value to the selector terminal, right-click the border of the Case structure, and select Case Insensitive Match from the shortcut menu.
  3. Add objects inside the Case structure to create subdiagrams that the Case structure can execute. If necessary, add or duplicate subdiagrams.
  4. For each case, use the Labeling tool to enter a single value or lists and ranges of values in the case selector label at the top of the Case structure. The values you enter in each case selector label execute a specific subdiagram based on the input value you pass to the structure.
  5. Note  For values of case subdiagrams with a string data type, use backslash codes to indicate backslashes and non-displayable characters. For example, enter \\ to indicate a single backslash and \r to indicate a carriage return.


Not Helpful