Entering Values for each Case Structure Subdiagram
- Updated2025-01-22
- 2 minute(s) read
Entering Values for each Case Structure Subdiagram
You can enter a single value or lists and ranges of values in the selector label of a Case structure, as shown in the following table.
Type of Values | Description of Type of Values |
---|---|
Numeric ranges |
Note When the selector
terminal is wired to an error cluster, LabVIEW converts numeric values in the
selector label to error codes by appending Error to the numeric values or
ranges.
|
String ranges | A range of a..c includes all strings beginning with a or b, but not c. String ranges are case sensitive. For example, a range of A..c behaves differently than a..c because LabVIEW uses ASCII values to determine a string range. |
Enumerated values | The values display in quotation marks, for example "red", "green", and "blue". However, you do not need to type the quotation marks when you enter the values unless the string or enumerated value contains a comma or range symbol ("," or ".."). In a string value, use special backslash codes for non-alphanumeric characters, such as \r for a carriage return, \n for a line feed, and \t for a tab. |
If you change the data type of the wire connected to the case selector of a Case structure, the Case structure automatically converts the selector label values to the new data type when possible. If you convert a numeric value, for example 19, to a string, the string value is “19”. If you convert a string to a numeric value, LabVIEW converts only those string values that represent a number. The other values remain strings. If you convert a number to a Boolean value, LabVIEW converts 0 to False and 1 to True, and all other numeric values become strings.
If you enter a selector label value that is not the same type as the object wired to the case selector, the value appears red. This indicates that the VI will not run until you delete or edit the value.