Skip to main content

End Conditional Main 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 under the following conditions:

  • When the CEND or CENDP instruction is the only termination instruction of the program.
Instruction Behavior

The CEND and CENDP instructions behave as follows:

  • The CEND and CENDP instructions terminate a scan program when the execution condition is met.
  • The CEND and CENDP instructions can be located anywhere, including instructions which should make a pair.
  • When the CEND or CENDP instruction is executed, instructions located after the CEND or CENDP instruction are NOT executed.
  • The difference between the CEND/CENDP and the END instruction is the existence of an execution condition.
  • Even though the CEND or CENDP instruction exist, the END must be located at the end of every scan program.
    • A program containing the CEND or CENDP instruction must include the END instruction.

Examples