Advanced Function Instruction
7 -4 7
END PROGRAM
END END
No operand
z
When end control "EN" = 1, this instruction is activated. Upon executing the END instruction and "EN" = 1, the
program flow will immediately returns to the starting point (0000M) to restart the next scan – i.e. all the
programs after the END instruction will not be executed. When "EN" = 0, this instruction is ignored, and
programs after the END instruction will continue to be executed as the END instruction is not exist.
z
This instruction may be placed more than one point within a program, and its input (end control "EN") controls
the end point of program execution. It is especially useful for debugging and for testing.
z
It’s not necessary to put any END instructions in the main program, CPU will automatic restart to start point
when reach the end of main program.
Program 1
X0
Program 2
Program 3
X1
X0=X1=0
Program 1
Program 2
END
0000M
X0=1
X0=0
X1=1
X0
X1
END
Program 3
EN
EN
P
rogr
am
exe
cuti
on
ORG
END
ORG
END