LABELS

Statement - Destination of a Jump instruction.

Remarks

Labels are used as a destination of a jump instruction in FDB, FFLD, or ILClosed "Instruction list" This is a low-level language and resembles assembly language.

Labels and jumps cannot be used in structured STClosed "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 all languages, it is not mandatory that a label is a target of a jump instruction.
    • Use label for marking parts of the programs in order to increase its readability.
  • In the FBDClosed "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.
    • They are connected to nothing.
  • In the FFLD language:
    • A label must identify a rung.
    • It is shown on the left side of the rung.
  • In the 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.
    • They 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.

FBD Language

In this example, the DTAt block is not called if bEnable is TRUE.

Jump Fbd

FFLD Language

In this example Network #6 is skipped if IN1 is TRUE.

Jump FFLD

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

ST Language

Not available.

See Also