ST Instruction ‘JMP’

The JMP instruction is used to execute an unconditional jump to a program line that is marked by a jump label.

Syntax:

<label>: <instructions>
JMP <label>;

The jump label <label> is any unique identifier that you place at the beginning of a program line. On reaching the JMP instruction, a return to the program line with the <label> takes place.

Example

iVar1 := 0;
_label1: iVar1 := iVar1+1;
(*instructions*)

IF (iVar1 < 10) THEN
JMP _label1;
END_IF;

Attention

You must ensure by programming means that no endless loops are caused. For example, you can make the jump conditional.