Assignment definition

This section is about the assignment syntax and examples of structured text (ST) language. The expression can be a call to a function.
Properties of assignment statements
Item
Description
Name
:=
Meaning
Assigns a variable to an expression.
Syntax
<variable> := <any_expression> ;
Operands
The variable must be an internal or output variable and the expression must have the same type.

ST examples

(* ST program with assignments *) (* variable <<= variable *) bo23 := bo10; (* Variable <<= expression *) bo56 := bx34 OR alrm100 & (level >= over_value); result := (100 * input_value) / scale; (* assignment with function call *) limited_value := min (16, max (0, input_value) );
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal