Skip to content

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

  1. In the Code Output tab, select the Create text output button.

  2. Enter a name for the output and select OK.

  3. Close the Code tool.

  4. Select New Page , select a template, and select Digits Display .
  5. 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.