Code Output
Use the Code Output blocks to provide text or numeric output in a Digits.
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
-
In the Code Output tab, select the Create text output button.
-
Enter a name for the output and select OK.
-
Close the Code tool.
- Select New Page , select a template, and select Digits Display .
-
Click Select Measurement, select the User-entered tab, and click the name of the text output.
You can also output values from a Code Output block into a column of a table display using the same steps described above but selecting Table for the display option.
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.