99
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
5-6-5 AND LOAD and OR LOAD
for
more details and
4-4-1 Logic Block Instructions
for further examples of diagrams
requiring AND LOAD and OR LOAD.
Diagram A
Diagram B
Address Instruction
00000 LD 000000
00001 LD 000001
00002 AND 000207
00003 OR LD ---
00004 OUT 000207
Address Instruction
00000 LD 000001
00001 AND 000207
00002 OR 000000
00003 OUT 000207
Operands
Operands
0000
01
0002
07
0000
00
0000
01
0002
07
0000
00
0002
07
0002
07
4-11 Program Execution
When execution or a ladder diagram is started, the CPU scans the program from
top to bottom, checking all conditions and executing all instructions accordingly
as it moves down the bus bar. It is important that instructions be placed in the
proper order so that, for example, the desired data is moved to a word before that
word is used as the operand for an instruction. Remember that an instruction line
is completed to the terminal instruction at the right before executing instruction
lines branching from the first instruction line to other terminal instructions at the
right.
Program execution is only one of the tasks carried out by the CPU as part of the
scan time. Refer to
Section 6 Program Execution Timing
for details.
4-12 Using Version-2 CVM1 CPUs
The most significant improvement that the version-2 CVM1 CPUs offers in com-
parison with version-1 CPUs is a greatly enhanced instruction set. This section
explains the basics that the user should be familiar with before attempting to use
the new instructions. All of these instructions can be used when the SYSMAC
Support Software and the CVM1-PRS21-EV1 Programming Console are used.
They are not supported by the CVSS or other Programming Devices.
4-12-1 Input Comparison Instructions
The version-2 CVM1 CPUs provide 24 new comparison instructions. The func-
tions of these instructions are shown as symbols, making them easy to under-
stand at a glance.
Using Version-2 CVM1 CPUs Section 4-12