97
Work bits can be used to simplify programming when a certain combination of
conditions is repeatedly used in combination with other conditions. In the follow-
ing example, CIO 000000, CIO 000001, CIO 000002, and CIO 000003 are com-
bined in a logic block that stores the resulting execution condition as the status of
CIO 024600. CIO 024600 is then combined with various other conditions to de-
termine output conditions for CIO 000100, CIO 000101, and CIO 000102, i.e., to
turn the outputs allocated to these bits ON or OFF.
Address Instruction
00000 LD 000000
00001 AND NOT 000001
00002 OR 000002
00003 OR NOT 000003
00004 OUT 024600
00005 LD 024600
00006 AND 000004
00007 AND NOT 000005
00008 OUT 000100
00009 LD 024600
00010 OR NOT 000004
00011 AND 000005
00012 OUT 000101
00013 LD NOT 024600
00014 OR 000006
00015 OR 000007
00016 OUT 000102
Operands
0000
00
0000
03
0000
02
0000
01
0246
00
0000
04
0000
05
0246
00
0000
05
0000
04
0246
00
0000
06
0000
07
0246
00
0001
00
0001
01
0001
02
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, CIO 000100 must be left ON continuously as long as CIO 000001 is ON
and both CIO 000002 and CIO 000003 are OFF, or as long as CIO 000004 is
ON and CIO 000005 is OFF. It must be turned ON for only one scan each
time CIO 000000 turns ON (unless one of the preceding conditions is keep-
ing it ON continuously).
This action is easily programmed by using CIO 022500 as a work bit as the oper-
and of the DIFFERENTIATE UP instruction (DIFU(013)). When CIO 000000
turns ON, CIO 022500 will be turned ON for one scan and then be turned OFF
the next scan by DIFU(013). Assuming the other conditions controlling CIO
000100 are not keeping it ON, the work bit CIO 022500 will turn CIO 000100 ON
for one scan only.
Address Instruction Operands
00000 LD 000000
00001 DIFU(013) 022500
00002 LD 022500
00003 LD 000001
00004 AND NOT 000002
00005 AND NOT 000003
00006 OR LD ---
00007 LD 000004
00008 AND NOT 000005
00009 OR LD ---
00010 OUT 000100
0225
00
0000
01
0000
04
0000
02
0000
03
0001
00
0000
05
0000
00
(013)
DIFU 022500
Reducing Complex
Conditions
Work Bits (Internal Relays) Section 4-9