Programming Precautions
Diagram A: Not Programmable for Most Instructions
25313
Diagram B: Correct Version
00000
00001 20007
00001
20007
00000
The number of times any particular bit can be assigned to conditions is not lim-
ited, so use them as many times as required to simplify your program. Often,
complicated programs are the result of attempts to reduce the number of times a
bit is used.
Except for instructions for which conditions are not allowed (e.g., INTERLOCK
CLEAR and JUMP END, see below), every instruction line must also have at
least one condition on it to determine the execution condition for the instruction
at the right. Again, diagram A , below, must be drawn as diagram B. If an instruc-
tion must be continuously executed (e.g., if an output must always be kept ON
while the program is being executed), the Always ON Flag (SR 25313) in the SR
area can be used.
There are a few exceptions to this rule, including the INTERLOCK CLEAR,
JUMP END, and step instructions. Each of these instructions is used as the se-
cond of a pair of instructions and is controlled by the execution condition of the
first of the pair. Conditions should not be placed on the instruction lines leading to
these instructions. Refer to Section 7 Instruction Set for details.
When drawing ladder diagrams, it is important to keep in mind the number of
instructions that will be required to input it. In diagram A, below, an OR LOAD
instruction will be required to combine the top and bottom instruction lines. This
can be avoided by redrawing as shown in diagram B so that no AND LOAD or OR
LOAD instructions are required. Refer to 7-7-2 AND LOAD and OR LOAD for
more details.
Diagram A
Diagram B
Instruction
Address Instruction
Instruction
00000
LD
00001
Instruction
Address Instruction
20007
00000
00001
00002
00003
00004
Address Instruction
00000
20007
00001
00002
00003
Section
Operands
25313
Operands
LD
00000
LD
00001
AND
20007
OR LD
OUT
20007
Operands
LD
00001
AND
20007
OR
00000
OUT
20007
6-6
---
359
Need help?
Do you have a question about the CPM1 - PROGRAMING MANUAL 02-2001 and is the answer not in the manual?