Skip to main content

End Main Routine Program

Instruction Parameters

Supported PLC Series

XPnA/1RXPnBXPnEXPnFCP3A/B/P/U
CP4A~D/U
CPnECPnFBPPLC-S

Supported Data Registers

MXYKLFTCSZRQD@DConstant
---------------

Supported Flags

FlagBitSupport
ErrorF11.0-
ZeroF11.1-
CarryF11.2-

Number of Steps

Steps
1

Notice

Notice

Compile errors occur when there is no END instruction in the following programs:

Instruction Behavior

The END instruction behaves as follows:

  • The END instruction terminates a scan program where the END instruction is located.
  • Instructions located after the END instruction are not executed except for the SBRT ~ RET instructions.
  • The END instruction must be used at least once in a scan program.
  • The END instruction can be located anywhere except the location between instructions which should make a pair.
  • When the END instruction is executed, the PLC CPU stops the scan program.
    • If there are other scan programs that have not been executed yet, the PLC CPU starts the next scan program.
      • The execution order for the scan programs is decided by the program ID (PID) number.
        • Lower PID Number → Higher PID Number

Examples