Skip to main content
Version: 24.2 (stable)

String

About

A string is a data type that represents a sequence of characters. It can be used to store text, symbols, and even numbers in a format that can be easily manipulated. In HMI programming, strings are often used to store data such as user input, machine status, and error messages.

String variables can be manipulated and concatenated with other strings to form more complex data structures. For example, we can concatenate two strings using the "+" operator as follows:

String greeting = "Hello, " + username;

Define a Variable Using the Context Menu

  1. Change to the Data View.

  2. Right-click the Data or any other folder in your HMI Data View.

  3. Choose Add Variable.

  4. Choose the type String.


Augment a Variable With Additional Metadata