📄️ Expression
Expression statements are most commonly either assignment or call expressions, but are defined as any expression followed by a semicolon.
📄️ If
The if statement evaluates an expression that results in a boolean value. If the result is true, any statements that follow the THEN keyword are executed. All if statements begin with the IF keyword and end with the END_IF keyword followed by a ;.
📄️ Case
The case statement is another form of selector statement similar to the If statement.
📄️ For
The for statement is the most common of the loop statements. It executes the body of the loop a number of times based on the lower bound, upper bound, and increment. The loop exits when the iterator variable has exceeded the bound.
📄️ While
The while statement is a loop statement which test a condition at the beginning of each loop. If the condition is true, the body of the while loop is executed. If the condition is false, the body is not executed and the evaluator continues on to the next statement.
📄️ Repeat
The repeat loop statement executes the body of the statement first and then tests a condition. If the condition is true, the loop is completed. If the condition is false, the body is executed again.
📄️ Exit
The exit statement is used to conditionally exit a looping statement (For, While, Repeat).
📄️ Return
A RETURN statement immediately exits the scope of a call expression (Function, Function Block, Method, or Property).
📄️ Jump
A JMP statement will unconditionally move the execution to the defined label.
📄️ No Operation
The no operation statement does...nothing. Think of this as a placeholder. There are not many practical uses for this statement but it is supported due to the IEC 61131-3 standard. This statement is simply a ;.