The End Instruction; Logic Block Instructions - Omron CPM1 Programming Manual

Hide thumbs Also See for CPM1:
Table of Contents

Advertisement

6-3-5

The END Instruction

6-3-6

Logic Block Instructions

AND LOAD
The last instruction required to complete a simple program is the END instruc-
tion. When the CPU Unit scans the program, it executes all instructions up to the
first END instruction before returning to the beginning of the program and begin-
ning execution again. Although an END instruction can be placed at any point in
a program, which is sometimes done when debugging, no instructions past the
first END instruction will be executed until it is removed. The number following
the END instruction in the mnemonic code is its function code, which is used
when inputted most instruction into the PC. These are described later. The END
instruction requires no operands and no conditions can be placed on the same
instruction line with it.
00000
00001
Address Instruction
00500
LD
00501
AND NOT
00502
Instruction
00503
END(01)
If there is no END instruction anywhere in the program, the program will not be
executed at all.
Now you have all of the instructions required to write simple input-output pro-
grams. Before we finish with ladder diagram basic and go onto inputting the pro-
gram into the PC, let's look at logic block instruction (AND LOAD and OR LOAD),
which are sometimes necessary even with simple diagrams.
Logic block instructions do not correspond to specific conditions on the ladder
diagram; rather, they describe relationships between logic blocks. The AND
LOAD instruction logically ANDs the execution conditions produced by two logic
blocks. The OR LOAD instruction logically ORs the execution conditions pro-
duced by two logic blocks.
Although simple in appearance, the diagram below requires an AND LOAD
instruction.
00000
00001
Address Instruction
00000
LD
00001
OR
00002
LD
00003
OR NOT
00004
AND LD
Instruction
END(01)
Operands
00000
00001
---
00002
00003
Operands
00000
00001
00002
00003
---
Section
6-3
Program execution
ends here.
Instruction

Advertisement

Table of Contents
loading

This manual is also suitable for:

Srm-v2Cpm1aCpm2aSrm1Cpm2c

Table of Contents