Файл: Programmable logic controllers. Methods and Applications (Hackworth J., Prentice Hall).pdf

ВУЗ: Не указан

Категория: Не указан

Дисциплина: Не указана

Добавлен: 15.06.2025

Просмотров: 2111

Скачиваний: 0

ВНИМАНИЕ! Если данный файл нарушает Ваши авторские права, то обязательно сообщите нам.

Chapter 1 - Ladder Diagram Fundamentals

There are a few important details that have been added along with the switches and lamp. Note that the added wires have been assigned the wire numbers 3 and 4 and the added components have been assigned the reference designators PB1, PB2, and L1. Also note that the switches are on the left and the lamp is on the right. This is a standard convention when designing and drawing machine circuits. The controlling devices (in this case the switches) are always positioned on the left side of the rung, and the controlled devices (in this case the lamp) are always positioned on the right side of the rung. This wiring scheme is also done for safety reasons. Assume for example that we put the lamp on the left side and the switches on the right. Should there develop a short to ground in the wire from the lamp to the switches, the lamp would light without either of the switches being pressed. For a lamp to inadvertently light is not a serious problem, but assume that instead of a lamp, we had the coil of a relay that started the machine. This would mean that a short circuit would start the machine without any warning. By properly wiring the controlled device (called the load) on the right side, a short in the circuit will cause the fuse to blow when the rung is activated, thus de-energizing the machine controls and shutting down the machine.

OR

SWITCH1

The same approach may be taken for the OR

LAMP2

function. The circuit shown in Figure 1-23 illustrates two

SWITCH2

switches wired as an OR function controlling a lamp,

LAMP2. As can be seen from the circuit, the lamp will

illuminate if SWITCH 1 OR SWITCH 2 is closed; that is,

depressing either of the switches will cause the lamp

LAMP2 to illuminate. The Boolean expression for this

circuit is

Figure 1-23 - OR Lamp Circuit

Lamp2 = (Switch1) + (Switch2)

(1-2)

For those more familiar with logic diagramming, the OR gate representation of the OR circuit in Figure 1-23 and Equation 1-2 is shown in Figure 1-24. Again, when drawing machine controls diagrams, we do not use this schematic representation.

SWITCH1

LAMP2

SWITCH2

Figure 1-24 - OR Circuit

1-16

Chapter 1 - Ladder Diagram Fundamentals

We can now add this circuit to our ladder diagram as another rung as shown in

Figure 1-25. Note that since the switches SWITCH1 and SWITCH2 are the same ones used in the top rung, they will have the same names and the same reference designators when drawn in rung 2. This means that each of these two switches have two N/O contacts on the switch assembly. Some designers prefer to place dashed lines between the two PB1 switches and another between the two PB2 switches to clarify that they are operated by the same switch actuator (in this case the actuator is a pushbutton)

When we have two or more components in parallel in a rung, each parallel path is called a branch. In our diagram in Figure 1-25, rung two has two branches, one with PB1 and the other with PB2. It is possible to have branches on the load side of the rung also. For example, we could place another lamp in parallel with LAMP2 thereby creating a branch on the load side.

H1

H3

H2

H4

F1

T1

2

X1

X2

1

SWITCH1

SWITCH2

LAMP1

3

4

PB1

PB2

L1

SWITCH1

LAMP2

5

PB1

SWITCH2

L2

PB2

Figure 1-25 - Add Rung 2

It is important to note that in our ladder diagram, it is possible to exchange rungs 1 and 2 without changing the way the lamps operate. This is one advantage of using ladder diagramming. The rungs can be arranged in any order without changing the way the machine operates. It allows the designer to compartmentalize and organize the control circuitry so that it is easier to understand and troubleshoot. However, keep in mind that, later in this text, when we begin PLC ladder programming, the rearranging of rungs is not

1-17


Chapter 1 - Ladder Diagram Fundamentals

recommended. In a PLC, the ordering of the rungs is critical and rearranging the order could change the way the PLC program executes.

AND OR and OR AND

Let us now complicate the circuitry somewhat. Suppose that we add two more switches to the previous circuits and configure the original switch, battery and light circuit as in Figure 1-26.

SWITCH1

SWITCH2

PB1

PB2

LAMP3

SWITCH3

SWITCH4

PB3

PB4

L3

Figure 1-26 - AND-OR Lamp Circuit

Notice that two switches have been added, SWITCH 3 and SWITCH 4. For this system to operate properly, the LAMP needs to light if SWITCH 1 AND SWITCH 2 are both on, OR if SWITCH 3 AND SWITCH 4 are both on. This circuit is called an AND-OR circuit. The

Boolean expression for this is illustrated in Equation 1-3.

Lamp3 = (Switch1• Switch2) + (Switch3• Switch4)

(1-3)

The opposite of this circuit, called the OR-AND circuit is shown in Figure 1-27. For this circuit, LAMP4 will be on whenever SWITCH1 OR SWITCH2, AND SWITCH3 OR

SWITCH4 are on. For circuits that are logically complicated, it sometimes helps to list all the possible combinations of inputs (switches) that will energize a rung. For this OR-AND circuit, LAMP4 will be lit when the following combinations of switches are on:

SWITCH1 and SWITCH3

SWITCH1 and SWITCH4

SWITCH2 and SWITCH3

SWITCH2 and SWITCH4

1-18

Chapter 1 - Ladder Diagram Fundamentals

SWITCH1 and SWITCH2 and SWITCH3

SWITCH1 and SWITCH2 and SWITCH4

SWITCH1 and SWITCH3 and SWITCH4

SWITCH2 and SWITCH3 and SWITCH4

SWITCH1 and SWITCH2 and SWITCH3 and SWITCH4

SWITCH1

SWITCH3

PB1

PB3

LAMP4

SWITCH2

SWITCH4

PB2

PB4

L4

Figure 1-27 - OR-AND Lamp Circuit

The Boolean expression for the OR-AND circuit is shown in Equation 1-4

Lamp3 = (Switch1+ Switch2) • (Switch3 + Switch4)

(1-4)

These two rungs will now be added to our ladder diagram and are shown in Figure 1-28. Look closely at the circuit and follow the possible power paths to energize LAMP3 and LAMP4. You should see two possible paths for LAMP3:

SWITCH1 AND SWITCH2

SWITCH3 AND SWITCH4

Either of these paths will allow LAMP3 to energize. For LAMP4, you should see four possible paths:

SWITCH1 AND SWITCH3

SWITCH1 AND SWITCH4

SWITCH2 AND SWITCH3

SWITCH2 AND SWITCH4.

Any one of these four paths will energize LAMP4.

1-19


Chapter 1 - Ladder Diagram Fundamentals

H1

H3

H2

H4

F1

T1

2

X1

X2

1

SWITCH1

SWITCH2

LAMP1

3

4

PB1

PB2

L1

SWITCH1

LAMP2

5

PB1

SWITCH2

L2

PB2

SWITCH1

SWITCH2

LAMP3

6

8

PB1

PB2

SWITCH3

SWITCH4

L3

7

PB3

PB4

SWITCH1

SWITCH3

LAMP4

9

10

PB1

PB3

SWITCH2

SWITCH4

L4

PB2

PB4

Figure 1-28 - Add Rungs 3 & 4

Now that we have completed a fundamental study of ladder diagram, we should begin investigating some standard ladder logic circuits that are commonly used on electric machinery. Keep in mind that these circuits are also used in programming programmable logic controllers.

1-20


Chapter 1 - Ladder Diagram Fundamentals

Ground Test

Earlier, we drew a ladder diagram of some switch circuits which included the control transformer. We connected the right side of the transformer to ground (the frame of the machine). For safety reasons, it is necessary to occasionally test this ground to be sure that is it still connected because loss of the ground circuit will not affect the performance of the machine and will therefore go unnoticed. This test is done using a ground test circuit, and is shown in Figure 1-29.

H1

H3

H2

H4

F1

T1

2

X1

X2

1

GROUND

GROUND TEST

TEST

PASS

S1

L1

Figure 1-29 - Ground Test Circuit

Notice that this rung is unusual in that it does not connect to the right rail. In this case, the right side fo the lamp L1 has a wire with a lug that is fastened to the frame of the machine under a screw. When the pushbutton S1 is pressed, the lamp L1 lights if there is a path for current to flow through the frame of the machine back to the X2 side of the control transformer. If the lamp fails to light, it is likely that the transformer is no longer grounded. The machine should not be operated until an electrician checks and repairs the problem. In some cases, the lamp L1 is located inside the pushbutton switch S1 (this is called an illuminated switch).

The Latch (with Sealing/Latching Contacts)

Occasionally, it is necessary to have a relay “latch” on so that if the device that activated the relay is switched off, the relay remains on. This is particularly useful for making a momentary pushbutton switch perform as if it were a maintained switch. Consider, for example, the pushbuttons that switch a machine on and off. This can be done with momentary pushbuttons if we include a relay in the circuit that is wired as a latch

1-21


Chapter 1 - Ladder Diagram Fundamentals

as shown in the ladder diagram segment Figure 1-30 (the transformer and fuse are not shown for clarity). Follow in the diagram as we discuss how this circuit operates.

First, when power is applied to the rails, CR1 is initially de-energized and the N/O

CR1 contact in parallel with switch S1 is open also. Since we are assuming S1 has not yet been pressed, there is no path for current to flow through the rung and it will be off. Next, we press the START switch S1. This provides a path for current flow through S1, S2 and the coil of CR1, which energizes CR1. As soon as CR1 energizes, the N/O CR1 contact in parallel with S1 closes (since the CR1 contact is operated by the CR1 coil). When the relay contact closes, we no longer need switch S1 to maintain a path for current flow through the rung. It is provided by the N/O CR1 contact and N/C pushbutton S2. At this point, we can release S1 and the relay CR1 will remain energized. The N/O CR1 contact “seals” or “latches” the circuit on, and the contact is therefore called a sealing contact or latching contact.

The circuit is de-energized by pressing the STOP switch S2. This breaks the flow of current through the rung, de-energizes the CR1 coil, and opens the CR1 contact in parallel with S1. When S2 is released, there will still be no current flow through the rung because both S1 and the CR1 N/O contact are open.

START

STOP

RUN

CR1

S1

S2

RUN

CR1

Figure 1-30 - Latch Circuit

The latch circuit has one other feature that cannot be obtained by using a maintained switch. Should power fail while the machine is on, the latch rung will, of course, deenergize. However, when power is restored, the machine will not automatically restart. It must be manually restarted by pressing S1. This is a safety feature that is required on all heavy machines.

2-Handed Anti-Tie Down, Anti-Repeat

Many machines used in manufacturing are designed to go through a repeated fixed cycle. An example of this is a metal cutter that slices sheets of metal when actuated by an operator. By code, all cyclic machines must have 2-handed RUN actuation, and antirepeat and anti-tie down features. Each of these is explained below.

1-22

Chapter 1 - Ladder Diagram Fundamentals

2-Handed RUN Actuation

This means that the machine can only be cycled by an operator pressing two switches simultaneously that are separated by a distance such that both switches cannot be pressed by one hand. This assures that both of the operator’s hands will be on the switches and not in the machine when it is cycling. This is simply two palm switches in series operating a RUN relay CR1, as shown in Figure 1-31.

LEFT

RIGHT

RUN

START

START

CR1

S1

S2

Figure 1-31 - 2-Handed Operation

Anti-Tie Down and Anti-Repeat

The machine must not have the capability to be cycled by tying or taping down one of the two RUN switches and using the second to operate the machine. In some cases, machine operators have done this so that they have one hand available to guide raw material into the machine while it is cycling, an extremely hazardous practice. Anti-tie down and anti-repeat go hand-in-hand by forcing both RUN switches to be cycled off and then on each time to make the machine perform one cycle. This means that both RUN switches must be pressed at the same time within a small time window, usually ½ second. If one switch is pressed and then the other is pressed after the time window has expired, the machine will not cycle.

Since both switches must be pressed within a time window, we will need a time delay relay for this feature, specifically a delay-on, or TON, relay. Consider the circuit shown in Figure 1-32. Notice that we have taken the 2-handed circuit that we constructed in Figure 1-31 and added additional circuitry to perform the anti-tie down. Follow along in the circuit as we analyze how it operates.

The two palm switches S1 and S2 now each have two N/O contacts. In the first rung they are connected in series and in the second rung, they are connected in parallel. This means that in order to energize CR1, both S1 and S2 must be pressed, and in order to energize TDR1, either S1 or S2 must be pressed. When power is applied to the rails, assuming neither S1 nor S2 are pressed, both relays CR1 and TDR1 will be de-energized.

Now we press either of the two palm switches. Since we did not yet press both switches, relay CR1 will not energize. However, in the second rung, since one of the two switches

1-23