63
Differentiated Conditions 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 exam-
ple, IR 0100 must be left on continuously as long as IR 0001 is ON and both
IR 0002 and IR 0003 are OFF, or as long as IR 0004 is ON and IR 0005 is
OFF. It must be turned ON for only one cycle each time IR 0000 turns ON
(unless one of the preceding conditions is keeping it ON continuously).
This action is easily programmed by using IR 0112 as a work bit as the oper-
and of the DIFFERENTIATE UP instruction (DIFU(13)). When IR 0000 turns
ON, IR 0112 will be turned ON for one cycle and then be turned OFF the next
cycle by DIFU(13). Assuming the other conditions controlling IR 0100 are not
keeping it ON, the work bit IR 0112 will turn IR 0100 ON for one cycle only.
0112
DIFU(13) 0112
0000
0001 0002 0003
0004 0005
0100
Address Instruction Operands
0000 LD 0000
0001 DIFU(13) 0112
0002 LD 0112
0003 LD 0001
0004 AND NOT 0002
0005 AND NOT 0003
0006 OR LD ---
0007 LD 0004
0008 AND NOT 0005
0009 OR LD ---
0010 OUT 0100
4-9 Programming Precautions
The number of conditions that can be used in series or parallel is unlimited.
Therefore, use as many conditions as required to draw a clear diagram. Al-
though very complicated diagrams can be drawn with instruction lines almost
forming mazes, there must not be any conditions on instruction lines running
vertically between two other instruction lines. Diagram A shown below, for
example, is not possible, and should be redrawn as diagram B.
Instruction 2
Instruction 1
0002
0003
0000
0001
0004
Diagram A
Instruction 1
0004
0003
0000
0001
Diagram B
0002
Instruction 2
00040000
0001
Address Instruction Operands
0000 LD 0001
0001 AND 0004
0002 OR 0000
0003 AND 0002
0004 Instruction 1
0005 LD 0000
0006 AND 0004
0007 OR 0001
0008 AND NOT 0003
0009 Instruction 2
The number of times any particular bit can be assigned to conditions is not
limited, so use them as many times as required to simplify your program.
Programming Precautions Section 4-9