Jump and return

In LD and FBD, jumps and labels can be used to process several loops. Returns interrupt the processed POU and avoid executing the subsequent networks.

Jump to label

  1. Double-click network 1 to insert a label, e.g. "CountLoop"
  2. Insert your program code that should be repeated, e.g. increase iCount by 1.
  3. Insert a jump to label "CountLoop"

    In this example, if the value of iCount is lower than 1000, the jump to the label "CountLoop" is executed. If iCount is equal to 1000 (or greater than 1000), the output of the LT instruction sets the jump to FALSE and the loop stops. The program continues processing subsequent networks.

Return

  1. Insert a return, e.g. after a Boolean contact

    If bStopLoop is set to TRUE, the program interrupts the processed POU and goes to the end of the current POU. All subsequent networks after the return command are omitted.

Tip

Jumps and returns can also be negated or set to rising or falling edge.

Related topics:

Modified on: 2019-12-10Feedback on this pagePanasonic hotline