ABSTRACT

Program control macros (instructions) are used to enable or disable a block of PLC program or to move execution of a program from one place to another. These instructions allow the controller to efficiently perform special user-programmed routines that are executed only when required. The following program control macros are described in this chapter: “jump” (jump to label), “jumpN” (jump to label), “jmp_lst_2” (jump to one of two labels), “jmp_lst_4” (jump to one of four labels), “jmp_lst_8” (jump to one of eight labels), “call_SR” (call subroutine), “return_SR” (return from subroutine), “FOR” (beginning of FOR-NEXT loop), “NEXT” (end of FOR-NEXT loop), and “clear_WDT” (clear the watchdog timer). Eleven examples are considered to show the application of program control macros presented in this chapter.