Code Output
Use the Code Output blocks to provide text or numeric output in a Digits or Table display.
Text output
This block outputs a string of text.
Numeric output
This block outputs a numeric value, such as a sensor measurement.
Create a text output
- Click the Create text output button, enter a name for the output, and click OK.
- Close the Code tool.
- Double click to add a Digits display to the screen.
- Click Select Measurement, then select the name of the text output under Code Output Data.
Example 1: Displaying text versus numbers
This example contains two Digits displays, with one showing text output and the other shown numeric output.
Example 2: Displaying numbers in text output
It's possible to display numbers in text output. However, the code interprets numbers as a string of text instead of a quantity of measurement, which means that the code can't apply mathematical operations on the output. When showing a number, you can see the difference between a text and number display.