Programming Precautions
Differentiated Conditions
00000
22500
00001
00002
00003
00004
00005
6-6
Programming Precautions
00000
00002
00004
00001
00003
Diagram A: Not Programmable
00001
00004
00000
00000
00004
00001
Diagram B: Correct Version
358
Work bits can also be used if differential treatment is necessary for some, but not
all, of the conditions required for execution of an instruction. In this example,
IR 20000 must be left ON continuously as long as IR 001001 is ON and both
IR 00002 and IR 00003 are OFF, or as long as IR 00004 is ON and IR 00005 is
OFF. It must be turned ON for only one cycle each time IR 00000 turns ON (un-
less one of the preceding conditions is keeping it ON continuously).
This action is easily programmed by using IR 22500 as a work bit as the operand
of the DIFFERENTIATE UP instruction (DIFU(13)). When IR 00000 turns ON, IR
22500 will be turned ON for one cycle and then be turned OFF the next cycle by
DIFU(13). Assuming the other conditions controlling IR 20000 are not keeping it
ON, the work bit IR 22500 will turn IR 20000 ON for one cycle only.
DIFU(13) 22500
The number of conditions that can be used in series or parallel is unlimited as
long as the memory capacity of the PC is not exceeded. Therefore, use as many
conditions as required to draw a clear diagram. Although very complicated dia-
grams can be drawn with instruction lines, there must not be any conditions on
lines running vertically between two other instruction lines. Diagram A shown
below, for example, is not possible, and should be drawn as diagram B. Mne-
monic code is provided for diagram B only; coding diagram A would be impossi-
ble.
Instruction 1
Instruction 2
00002
Instruction 1
00003
Instruction 2
Address Instruction
00000
LD
00001
DIFU(13)
20000
00002
LD
00003
LD
00004
AND NOT
00005
AND NOT
00006
OR LD
00007
LD
00008
AND NOT
00009
OR LD
00010
OUT
Address
Instruction
00000
LD
00001
AND
00002
OR
00003
AND
00004
Instruction 1
00005
LD
00006
AND
00007
OR
00008
AND NOT
00009
Instruction 2
Section
6-6
Operands
00000
22500
22500
00001
00002
00003
---
00004
00005
---
20000
Operands
00001
00004
00000
00002
00000
00004
00001
00003
Need help?
Do you have a question about the CPM1 - PROGRAMING MANUAL 02-2001 and is the answer not in the manual?
Questions and answers