Omron C20K Video Game Controller User Manual


 
36
The following diagram must be broken down into two blocks and each of
these then broken into two blocks before it can be coded. As shown below,
blocks a and b require an AND LD. Before AND LD can be used, however,
OR LD must be used to combine the top and bottom blocks on both sides,
i.e., to combine a1 and a2; b1 and b2.
0000 0001 0004 0005
0103
Block
a
Block
b
0006 0007
Block
b2
Block
b1
0002 0003
Block
a2
Block
a1
Blocks a1 and a2
Blocks b1 and b2
Blocks a and b
Address Instruction Operands
0000 LD 0000
0001 AND NOT 0001
0002 LD NOT 0002
0003 AND 0003
0004 OR LD ---
0005 LD 0004
0006 AND 0005
0007 LD 0006
0008 AND 0007
0009 OR LD ---
0010 AND LD ---
0011 OUT 0103
This type of diagram can be coded easily if each block is worked with in or-
der first top to bottom and then left to right. In the following diagram, blocks a
and b would be combined with AND LD as shown above, and then block c
would be coded and a second AND LD would be used to combine it with the
execution condition from the first AND LD, and so on through to block n.
Block
a
Block
b
00
Block
n
Block
c
The Ladder Diagram Section 4-3