LABELS
Remarks
Labels are used as a destination of a jump instruction in FDB, FFLD or IL"Instruction list" This is a low-level language and resembles assembly language. Labels and jumps cannot be used in structured ST"Structured text" A high-level language that is block structured and syntactically resembles Pascal language. A label must be represented by a unique name, followed by a colon (":"). In FBD"Function block diagram" A function block diagram describes a function between input variables and output variables. A function is described as a set of elementary blocks language, labels can be inserted anywhere in the diagram, and are connected to nothing. In FFLD language, a label must identify a rung, and is shown on the left side of the rung. In IL language, labels are destination for JMP, JMPC, JMPCN and JMPNC instructions. They must be written before the instruction at the beginning of the line, and must index the beginning of a valid IL statement: FFLD (load) instruction, or unconditional instructions such as CAL, JMP or RET. The label can also be written alone on a line before the indexed instruction. In all languages, it is not mandatory that a label be a target of a jump instruction. You can also use label for marking parts of the programs in order to increase its readability.
ST Language
Not available
FBD Language
(* In this example the DTat block will not be called if bEnable is TRUE *)
FFLD Language
In this example the network #6 is skipped if IN1 is TRUE.
IL Language
Start: FFLD IN1 (* unused label - just for readability *)
JMPC TheRest (* Jump to "TheRest" if IN1 is TRUE *)
FFLD IN2 (* these two instructions are not executed *)
ST Q2 (* if IN1 is TRUE *)
TheRest: FFLD IN3 (* label used as the jump destination *)
ST Q3
See also