8.2.1
Assignment Statement
The assignment statement replaces the value of a variable with the result of evaluating an
expression (of the same data type).
Notes:
Assignment statements can affect transition bits.
▪
Assignment statements take override bits into account.
▪
Format
Variable := Expression;
Where:
Variable is a simple variable, array element, etc.
Expression is a single value, expression, or complex expression.
Examples
Boolean assignment statements:
VarBool1 := 1;
VarBool2 := (val <= 75);
Array element assignment:
Array_1[13] := (RealA /RealB)* PI;
GFK-2950C
Chapter 8. Structured Text (ST) Programming
February 2018
369