Copyright Goodheart-Willcox Co., Inc. 92 Programmable Logic Controllers: Hardware and Programming 6.1 Creating PLC Ladder Logic Diagrams from Relay Logic Diagrams Figure 6-1 shows a simple relay logic diagram. In relay logic diagrams, input and output device symbols are used to create the diagram. In Chapter 5—Creating Relay Logic Diagrams, you learned the nine rules accepted as standard for creating relay logic diagrams. Figure 6-2 shows the PLC ladder logic diagram for the relay logic diagram displayed in Figure 6-1. Notice that input and output port addresses have been assigned to each input and output device. In Figure 6-2, SW1 and SW2 switches and limit switch LS1 are connected to input terminals I0, I1, and I2 of the input module zero (slot zero). They are therefore labeled I:0/0, I:0/1, and I:0/2 in the ladder diagram. When all three switches are closed, the control relay coil is energized. The control relay coil is connected to output port zero of the output module zero (O:0/0). To convert a relay logic diagram to a ladder logic diagram, programmers follow six standard rules: Rule 1. Place a contact in the upper-left corner of the ladder logic diagram. (See Figure 6-2.) Rule 2. Place the coil at the right end of the rung. Compare the correct diagram in Figure 6-2 with the incorrect diagram in Figure 6-3. I:0/0 I:0/1 I:0/2 L1 L2 O:0/0 Figure 6-2. The PLC ladder diagram. I:0/0 I:0/1 I:0/2 L1 L2 O:0/0 /0 Goodheart-Willcox Publisher Figure 6-3. Incorrect ladder diagram. Coils must appear at the end of the rung. Rule 3. All contacts must be placed horizontally. No vertical contacts are allowed. Compare the incorrect diagram in Figure 6-4 with the correct diagram in Figure 6-5. Rule 4. Outputs cannot be connected in series with other outputs. They can only be connected in parallel. See the incorrect ladder diagram in Figure 6-6. Rule 5. Program execution flow must be from left to right and from top to bottom. (See Figure 6-7.) SW1 SW2 LS1 M1 L1 L2 Goodheart-Willcox Publisher Figure 6-1. A simple relay logic diagram.
Previous Page Next Page