Skip to content

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

  1. Click the Create text output button, enter a name for the output, and click OK.
  2. Close the Code tool.
  3. Double click Digits Display to add a Digits display to the screen.
  4. 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.