Hide thumbs Also See for CPM1:
Table of Contents

Advertisement

Basic Ladder Diagrams
4-3-9

Jumps

00000
00001
00002
Diagram B: Corrected with a Jump
176
status of IR 00001 would be loaded as the execution condition for instruction 1
and then the status of IR 00002 would be loaded to form the execution condi-
tion for the second INTERLOCK instruction. If IR 00002 is OFF, instructions 2
through 4 will be executed with OFF execution conditions. If IR 00002 is ON,
IR 00003, IR 00005, and IR 00006 will determine the first execution condition
in new instruction lines.
A specific section of a program can be skipped according to a designated exe-
cution condition. Although this is similar to what happens when the execution
condition for an INTERLOCK instruction is OFF, with jumps, the operands for
all instructions maintain status. Jumps can therefore be used to control
devices that require a sustained output, e.g., pneumatics and hydraulics,
whereas interlocks can be used to control devices that do not required a sus-
tained output, e.g., electronic instruments.
Jumps are created using the JUMP (JMP(04)) and JUMP END (JME(05))
instructions. If the execution condition for a JUMP instruction is ON, the pro-
gram is executed normally as if the jump did not exist. If the execution condi-
tion for the JUMP instruction is OFF, program execution moves immediately to
a JUMP END instruction without changing the status of anything between the
JUMP and JUMP END instruction.
All JUMP and JUMP END instructions are assigned jump numbers ranging
between 00 and 99. There are two types of jumps. The jump number used
determines the type of jump.
A jump can be defined using jump numbers 01 through 99 only once, i.e.,
each of these numbers can be used once in a JUMP instruction and once in a
JUMP END instruction. When a JUMP instruction assigned one of these num-
bers is executed, execution moves immediately to the JUMP END instruction
that has the same number as if all of the instruction between them did not
exist. Diagram B from the TR bit and interlock example could be redrawn as
shown below using a jump. Although 01 has been used as the jump number,
any number between 01 and 99 could be used as long as it has not already
been used in a different part of the program. JUMP and JUMP END require
no other operand and JUMP END never has conditions on the instruction line
leading to it.
JMP(04) 01
Instruction 1
Instruction 2
JME(05) 01
This version of diagram B would have a shorter execution time when IR 00000
was OFF than any of the other versions.
The other type of jump is created with a jump number of 00. As many jumps
as desired can be created using jump number 00 and JUMP instructions
using 00 can be used consecutively without a JUMP END using 00 between
them. It is even possible for all JUMP 00 instructions to move program execu-
tion to the same JUMP END 00, i.e., only one JUMP END 00 instruction is
required for all JUMP 00 instruction in the program. When 00 is used as the
jump number for a JUMP instruction, program execution moves to the instruc-
Section 4-3
Address Instruction
Operands
00000
LD
00001
JMP(04)
00002
LD
00003
Instruction 1
00004
LD
00005
Instruction 2
00006
JME(05)
00000
01
00001
00002
01

Advertisement

Table of Contents
loading

Table of Contents