Ladder Diagram

Download as pdf or txt
Download as pdf or txt
You are on page 1of 46

CHAPTER

ELECTRIC LADDER DIAGRAMS

Three dierent methods for designing relay control circuits are described in this chapter. These methods are important becauseapart from their application to hard-wired relay systemsthey provide the basis for programming programmable controllers, to be described in Chapter 11.

9.1

Ladder Diagrams
ladder diagrams

Relay control circuits are generally drawn up using the so called ladder diagrams. Ladder diagrams dier from conventional wiring diagrams in an important way. Wiring diagrams show the physical arrangement of the various components (i.e., switches, relays, solenoids, motors, etc.) and their interconnections, and are used by electricians to do the actual wiring of a control panel. Ladder diagrams, on the other hand, are more schematic, and show each branch of the control circuit on a separate horizontal row. They are meant to emphasize the function of each branch and the resulting sequence of operations. As shown in Figure 9.1, the ladder diagram has two vertical lines, the left one is connected to a voltage source and the right one is grounded. Between them, a set of horizontal rows (the rungs of the ladder) represent the dierent branches of the control circuit. Thus, each rungwhich may or may not have several parallel branch linesrepresents a separate electrical circuit, providing a current path from the voltage source to ground. Ladder diagrams use special symbols for the various circuit elements, some of which are shown in Figure 9.2. A coil is generally labeled with capital letter Y followed by a subscript number, whereas the contacts belonging to the same relay are labeled with lowercase y followed by the same subscript. Each ladder diagram rung must contain at least one output element, other-

rung

274

ELECTRIC LADDER DIAGRAMS

Figure 9.1: Framework of a ladder diagram.

Figure 9.2: Some ladder diagram symbols.

Hossein M. Oloomi

Purdue University at Fort Wayne

9.1 Ladder Diagrams

275

Figure 9.3: RS ip op implemented by a relay. wise we get a short circuit. The output elements are commonly drawn at the right edge of the ladder diagram, adjoining the right vertical line. Figure 9.3 shows a simple ladder diagram, describing how a relay is used to implement an RS ip op. This circuit operates as follows. When a SET signal is given, current reaches relay coil Y1 . Energizing the relay coil closes the NO relay contact y1 in line 2. The SET push button can now be released, the current continues to ow to coil Y1 through this contact y1 , that is, the ip op remains SET. Thus, this contact provides the memory of the ip op, or, using industrial terminology, turns the relay into a self-holding or latched relay. The moment the RESET push button is pressed, the memory is broken, and the ip op reverts to its former RESET state. If both SET and RESET signals are given simultaneously (which is against the rules), current ow is broken, which makes the ip op reset dominating. Its Boolean equation can be written as Y = (S + y)R

latched relay

which means that coil Y is energized provided (SET is pressed OR contact y is closed) AND RESET is NOT pressed. The ip op outputs, or state variables y and y , are provided by NO and NC relay contacts, respectively, in lines 3 and 4. For the purpose of this example, these connect to a red and green lamp, respectively, giving visual indication of the ip op status. In general, these ip op outputs are used to actuate other elements, according to need. Note that the NC contact in line 4 is labeled y1 and not y1 . This is a matter of convention, and the idea behind it is that the designation written next to any contact is only meant to identify the relay or switch to which this contact belongs, but does not represent the binary variable at that location. Since the symbol in line 4 stands for an NC contact, the reader knows that the binary variable appearing to the right of the contact is really y . To stress the dierence between ladder and writing diagrams, Figure 9.4 shows a wiring diagram for the same circuit. It shows the actual location of the relay with respect to all other elements. All wires connected to the relay converge at this location, and such a diagram is sometimes called attached diagram (since Purdue University at Fort Wayne

state variables

wiring duagram attached duagram Hossein M. Oloomi

276

ELECTRIC LADDER DIAGRAMS

Figure 9.4: Wiring diagram for circuit of Figure 9.3. it shows all input and output lines of a given component attached directly to the symbol). To understand this diagram, we need to know that the relay is of the DPDT type, and that the various pin numbers signify the following: Pins 2 and 7: relay coil Pins 1 and 8: contact poles Pins 3 and 6: NO contacts Pins 4 and 5: NC contacts In the ladder diagram, by comparison, the relay coil and it various contacts are dispersed in dierent circuits, with each circuit shown on a separate rug. detached diagram Such a diagram is termed a detached diagram (because the relay contacts are shown detached from the coil), and its function is to facilitate understanding circuit operation, rather than giving wiring instructions. The dierence between these two types of diagrams is even more pronounced for complex circuits.

9.2

Sequence Charts

sequence charts Sequence charts (also called time motion diagrams, state diagrams, or bar charts) are useful for visualizing the operation of switching circuits. They can be used to describe the step by step operation of relay systems, pneumatic systems, or any other type of switching system. To illustrate how sequence charts are constructed, consider the ladder diagram of Figure 9.5. The relay system shown actuates the two cylinders A and B in Figure 9.6. Each cylinder is actuated by a 5/2 directional control valve with solenoid and a return spring. The solenoids are labeled A+ and B+, respectively, signifying that the cylinder moves in the + direction (i.e., extended) whenever the solenoid is energized. Two limit switches a2 and b2 are mounted so as to be actuated when the respective cylinder reaches the extreme + position. Hossein M. Oloomi Purdue University at Fort Wayne

9.2 Sequence Charts

277

Figure 9.5: Relay circuit for actuating two cylinders.

Figure 9.6: Pneumatic cylinder circuit controlled by the ladder diagram of Figure 9.5.

Purdue University at Fort Wayne

Hossein M. Oloomi

278

ELECTRIC LADDER DIAGRAMS

Figure 9.7: Sequence chart for Figures 9.5 and 9.6.

The sequence chart corresponding to this system is shown in Figure 9.7. To construct this chart, we draw horizontal lines for each of the elements taking part in the action, and vertical lines (how many are needed is not known at the beginning) representing the dierent stages, or steps, in the systems sequence. Note that although the horizontal axis represents time, there is no xed time scale. Whenever a new event takes place, a new vertical line is allocated. Thus, the time between two adjacent lines depends on when the events occur. Note also that each cylinder is allocated two horizontal lines, to make it possible to represent cylinder motion between its two extreme positions. All other elements are preferably allocated only a single line. The time period during which a given element is actuated is indicated by a thick line atop its horizontal line, with the beginning and end of actuation shown by short vertical lines. To shorten the sequence chart, no lines are allocated for the individual relay contacts y. It is sucient to see wether or not coil Y is energized in order to know the status of contact y. After the required horizontal and vertical lines are drawn, the sequence chart can be lled in. At stage I, the system is assumed to be in its initial position before the START button has been pressed. We assume both cylinders at their positions (retracted), and none of the relays or solenoids actuated. This assumption seems reasonable, but must nevertheless be veried, which can only be done after the diagram has been completed. At stage II, the START button is assumed to be pressed briey. This energizes relay coil Y1 , which, in turn, closes NO contact y1 in line 2. Even though the START button is released right away, relay coil Y1 remains energized because of this memory contact y1 , as was explained in connection with Figure 9.3, and this is shown on the sequence chart by means of a thick line on the Y1 line. Hossein M. Oloomi Purdue University at Fort Wayne

9.2 Sequence Charts Since contact y1 in line 5 actuates solenoid A+, cylinder A begins to extend, which is shown on the diagram by means of a diagonal line between stages II and III. At stage III, cylinder A is fully extended, and actuates limit switch a2 . This permits current ow to relay coil Y2 (line 3). Actuation of relay Y2 does three actions: 1. Closes contact y2 in line 6 and thus actuates solenoid B+, so that cylinder B begins to extend. 2. Opens the NC contact y2 in line 1. This breaks the memory of relay Y1 (i.e., resets the ip op). As a result, contact y1 in line 5 opens again and releases solenoid A+, so that cylinder A begins to retract. 3. Closes contact y2 in line 4. This provides memory to relay Y2, so that Y2 remains actuated even after retraction of cylinder A has opened the contact of limit switch a2 in line 3. Cylinder B, when fully extended, actuates limit switch b2 . This breaks the memory of relay Y2 in line 3, so that solenoid B+ (line 6) is released, causing cylinder B to retract. With that, the sequence is completed, and the system remains at rest until the next START signal. Since the status of all elements is identical at stage IV and I, the assumptions made at the beginning are veried. As a safety feature, a REVERSE push button switch, with an NC contact, is added in line 1. If anything should go wrong during the sequence, the operator can push this button, which breaks the memory of any relay actuated at the time, causing all cylinders to retract. It should be pointed out that lines 5 and 6 in Figure 9.5 could be eliminated by placing solenoids A+ and B+ into lines 2 and 4, in parallel with the relay coils. This is shown in Figure 9.8. The resulting sequence chart is identical to the previous one, that is, this new circuit produces the identical sequence, even though two relay contacts have been eliminated. In both Figures 9.5 and 9.8, solenoids A+ or B+ are actuated if, and only if, relay Y1 or Y2 , respectively, is actuated. However, the circuit of Figure 9.8 has one drawback: solenoids usually draw fairly large currents (much larger than those drawn by relay coils), and these currents must pass through the various switch contacts in lines 1 and 3. Frequently, these switch contacts have small current ratings, and the currents drawn by the solenoids can severely reduce the switch service life. In Figure 9.5, this problem is avoided by supplying the solenoid currents through relay contacts, which generally have much higher current ratings. We now present a second example. The pneumatic circuit and ladder diagram are shown in Figure 9.9, and the resulting sequence chart is to be constructed. Before doing so, two points should be mentioned: 1. While this problem involves only a single cylinder, there are two limit switches (instead of only one per cylinder, as in Figure 9.6). Limit switch a1 is actuated when the cylinder is retracted, and a2 when extended. Purdue University at Fort Wayne

279

Hossein M. Oloomi

280

ELECTRIC LADDER DIAGRAMS

Figure 9.8: Relay circuit replacing Figure 9.5 and saving two relay contacts. 2. It is customary to draw every switch contact as it appears at the beginning of the sequence, that is, nonactuated or actuatedas the case may beno matter whether it is an NO or NC contact. Thus, contact a1 in ladder diagram line 1, which is NC, is shown open, since limit switch a1 is actuated at the beginning of the sequence, as can be seen from the pneumatic diagram. For the same reason, the NO contact of a1 in line 10 is shown closed. On the other hand, limit switch a2 is not actuated at the beginning, hence, all contacts of a2 are shown in the ladder diagram in their normal positions. By using this convention, cylinder actuating valve V A in Figure 9.9 is shown in its left position, since that is its state at the beginning of the sequence. The sequence chart for this problem is shown in Figure 9.10. Note that the cylinder actuating valve V A in Figure 9.9 has two solenoids and no return spring. Thus, brief solenoid actuation is sucient for shifting the valve (as against the valve with a return spring, where sustained solenoid actuation is required). Therefore, valve V A must be included in the sequence chart and is allocated two lines for positions + and , respectively, so that the current valve position can be shown if neither solenoid is actuated. To ll the sequence chart of Figure 9.10, we again assume that the cylinder is retracted () and all relays are nonactuated at the beginning of the sequence. At stage II, START is pressed. This actuates relay coil Y1, and, in turn, solenoid A+ in line 10. Valve V A thus shifts into its + position, and cylinder A extends. As a result, limit switch a1 is released, and its NO contact in line 3 opens. However, actuation of relay Y1 is maintained by current ow through line 2 and memory contact y1 . It is left as an exercise for the reader to continue tracing this sequence chart.

9.3

Ladder Diagram Design: Sequence Chart Method

This method is illustrated by means of a relatively simple example, namely, actuating two cylinders according to the sequence START, A+, A, B+, 10(sec) delay, B. The pneumatic diagram for this problem is not shown, since it is Hossein M. Oloomi Purdue University at Fort Wayne

9.3 Ladder Diagram Design: Sequence Chart Method

281

Figure 9.9: Pneumatic circuit and ladder diagram for the sequence START, A+, A, A+, A, A+, A.

Purdue University at Fort Wayne

Hossein M. Oloomi

282

ELECTRIC LADDER DIAGRAMS

Figure 9.10: Sequence chart for the circuit of Figure 9.9. identical to that of Figure 9.9, except that two cylinders are used instead of one. In other words, each cylinder is driven by its 5/2 valve with double solenoids, and actuates two limit switches. The rst step is to draw the required lines for the sequence chart, as shown in Figure 9.11. At this stage, we do not know yet how many relays will be needed. We assume that one relay Y1 is sucient, and, if this assumption should prove false, we can always add more lines later. The next step is to ll in that part of the sequence chart dened by the specied sequence. Thus, we enter the sequence on the four cylinder lines, and the corresponding limit switch actuation on the next four lines. Likewise, we show a brief actuation of the START button at stage II, and mark the required changes of valves V A and V B on the four button lines. We now begin to build the ladder diagram stage by stage. We add whatever elements are needed to produce the next step, but must always check that any element added does not interfere with previous steps. All of the resulting activity is entered on the sequence chart, which helps keep track of what is going on. To illustrate: Step A+: Step A+ should only take place provided the START button is pressed at the beginning of the sequence. Since the previous sequence ended with step B, which actuated limit switch b1, we draw the rst ladder diagram line, intended to actuate solenoid A+, as shown in Figure 9.12. Step A: At stage III, limit switch a2 is actuated, and this must trigger o the next step A. This can be achieved by line 2 in Figure 9.13, which shows that a2 energizes solenoid A. There is, however, a problem: suppose the operator has not yet released the START button. In that case, solenoid A+ would still be actuated, and valve V A would have two opposing control Hossein M. Oloomi Purdue University at Fort Wayne

9.3 Ladder Diagram Design: Sequence Chart Method

283

Figure 9.11: Sequence chart for the sequence START, A+, A, B+, 10(sec) delay, B.

Purdue University at Fort Wayne

Hossein M. Oloomi

284

ELECTRIC LADDER DIAGRAMS

Figure 9.12: Ladder diagram line for the steps START, A+ (stages I to III).

Figure 9.13: Ladder diagram lines for the steps START, A+, A (stages I to IV). signals. As explained in the previous chapter, this is strictly forbidden, since it might cause the solenoids to overheat and burn out. To avoid opposing control signals, we add relay coil Y1 in line 3 with a NC contact y1 in line 1. This contact opens and breaks the current ow to solenoid A+. An additional problem now arises: when cylinder A begins to retract, limit switch a2 is released, so that its NO contact in line 2 opens. This cuts o current to relay coil Y1, which, in turn, releases solenoid A and re-actuates solenoid A+ if the START button should still be pressed. To prevent this undesired turn of events, we add memory contact y1 in line 3, so that relay Y1 remains actuated even after contact a2 has opened. Step B+: Since step B+ is to commence only after cylinder A has fully retracted, we connect limit switch a1 to solenoid B+. This however, energizes this solenoid at the very beginning of the sequence, when limit switch a1 is still actuated. To prevent this, we connect a second NO contact y1 in series with a1 , as shown in Figure 9.14. As seen from the sequence chart, relay Y1 is not actuated at the beginning of the sequence, so that actuation of a1 does not energizes B+ until stage IV. Step 10(sec) delay, B: When cylinder B has fully extended, it actuates limit switch b2 . We now wish to initiate a 10(sec) time delay, after which cylinder B should retract. For this relay, we use a timing relay which is similar to an ordinary relay, except that its contacts yT M R (NO or NC) switch only when a certain time has elapsed after the timer coil yT M R was energized. Figure 9.15 shows the nal circuit. The NO contact of limit switch b2 in line 5 actuates timer coil YT M R and initiates the delay period. After 10(sec) have passed (stage VI), contact yT M R in line 6 closes, energizing solenoid B. However, to avoid opposing control signals, solenoid B+ must rst be de-energized. Hossein M. Oloomi Purdue University at Fort Wayne

9.3 Ladder Diagram Design: Sequence Chart Method

285

Figure 9.14: Ladder diagram lines for the steps START, A+, A, B+ (stages I to V).

Figure 9.15: Ladder diagram lines for the steps START, A+, A, B+, 10(sec) delay, B. This is done by placing the NC contact of limit switch b2 into line 3. When cylinder B has extended, this contacts open, which breaks the memory of relay Y1 , and thus de-actuates both solenoids A and B+. Cylinder B thus retracts the moment solenoid B is energized at stage VI. As a result, contact b2 in line 5 opens, de-energizing the timer, and thus also solenoid B in line 6. When cylinder B has retracted, the sequence is completed. The should realize that this circuit is not the only possible solution. For example, an NC timer contact yT M R could be used in line 3 instead of the NC contact b2 . In that case, relay Y1 and solenoid A and B+ would remain actuated until stage VI, but the nal result would be the same. In connection with Figure 9.8, it was explained that sometimes we prefer a circuit in which the large solenoid currents do not ow through the switch contacts. In that case, Figure 9.15 would have to be modied, as shown in Figure 9.16. However, as seen there, this requires two additional relays, which serve no logic function but are used strictly as power relays. It might be instructive to repeat the above problem, but using cylinder actuating valves with return spring (see Figure 9.8). These are often preferred, because they cost considerably less than identical valves with double solenoids, since only half the number of solenoids are required. However, their solenoids require sustained actuating signals, instead of the brief signals sucient when no return spring are used. As a result, additional relays are usually needed Purdue University at Fort Wayne Hossein M. Oloomi

286

ELECTRIC LADDER DIAGRAMS

Figure 9.16: Ladder diagram of Figure 9.15 modied so that solenoid actuation currents do not ow through the switch contacts.

Figure 9.17: Ladder diagram for the sequence START, A+, A, B+, 10(sec) delay, B, using cylinder actuating valves with a return spring. in the relay circuit, which somewhat osets the lower valve cost. The ladder diagram for this case is shown in Figure 9.17, and the corresponding sequence chart in Figure 9.18. (Valves V A and V B are not included, since they switch together with their respective solenoids.) It is left as an exercise for the reader to go over these two gures and trace the operation of the circuit. By comparing Figure 9.17 with Figure 9.15, it is seen that one additional relay is required. Apart from the cost dierence, there is a basic dierence between circuits using cylinder actuating valves with and without return springs. When return springs are used, all cylinders automatically retract during power failure. On the other hand, actuating valves without return springs have mechanical memory, so that all cylinders remain at their last position during power failure. Which method is preferable depends on system requirements, but it is obvious that important safety considerations are involved. To summarize, the design method based on the sequence chart is probably the one most commonly used in industry, and possibly the most ecient method Hossein M. Oloomi Purdue University at Fort Wayne

9.4 Ladder Diagram Design: Cascade Method

287

Figure 9.18: Sequence chart for the ladder diagram of Figure 9.17.

for relatively simple problems. However, for more complex problems, the results depend to a large extent on the skill and experience of the circuit designer. We, therefore, present two additional methods in this chapter, which are more systematic than the one described in this section.

9.4

Ladder Diagram Design: Cascade Method

The method to be presented here does not pretend to minimize the number of required delays. It does, however, provide a convenient way of obtaining a solution for even the most complex problems, without investing a great deal of time and eort. Furthermore, the resulting circuit is so easy to understand that there is no need to draw a sequence chart for this purpose. Also, the method is systematic and completely routine, and does not depend on the designers skill or experience. It is the recommended method when using programmable controllers.

9.4.1

Single Path Sequencing Systems without Sustained Outputs

In this new method, the various steps of the sequence are divided into groups according to the following rule: A new group must be started the moment it becomes necessary to shut o any output signal actuated during the presently active group. Purdue University at Fort Wayne Hossein M. Oloomi

288

ELECTRIC LADDER DIAGRAMS In other words, any output signal is permitted to remain actuated as long as the group it belongs to remains active. This rule is best illustrated by a simple example. Suppose we wish to actuate four cylinders, A, B, C, and D, according to the following sequence ST ART, A+, B+, C+, C, A, D+, A+, D, B, A
I II III IV

Assume each cylinder X is actuated, as in Figure 9.9, by a pneumatic 5/2 valve with two solenoids labeled X+ and X, respectively. It is clear that solenoid X+ must be shut o the moment X is actuated, because otherwise we have opposing control signals. Using the previous rule, we divide the sequence into four groups, as indicated before, so that no letter is repeated within any group. The resulting ladder diagram is shown in Figure 9.19. Each group in the sequence is allocated one relay, connected as an RS ip op, as shown in Figure 9.3. At any given moment, only the ip op corresponding to the currently active group is set, while all others are reset. Therefore, a circuit of this type one-hot code operates according to the one-hot code. As we pass from one group to the next, the next ip op is set, and its rst task is to reset the previous ip op, which automatically shuts o all output signals that were on during the previous cascade method group. The method is called the cascade method because each ip op actuates the next one. We now trace the operation of this circuit. Pressing the START button (line 1) at the beginning of the sequence provides the SET signal for relay Y1 . The y1 contact connected in line 2 parallel to START provides the memory that converts relay Y1 into a ip op. Once Y1 is set, solenoid A+ (line 2) is actuated, and the sequence begins. Upon completion of the A+ stroke, limit switch a2 (line 3) is closed, actuating solenoid B+. Upon the completion of the B+ stroke, limit switch b2 (line 4) is closed, actuating solenoid C+. Upon completion of the C+ stroke, we must deactivate Group I and activate Group II. The moment limit switch c2 (line 5) is closed, relay coil Y2 is set, activating Group II and initiating the rst step of Group II, namely stroke C. At the same time, NC contact y2 in line 1 is now open, breaking the memory of relay Y1 (i.e., giving the RESET signal for the ip op). Since circuit operation continues in a similar manner, further detailed elaboration is dispensed with. However, it is useful to point out certain features. Note that each relay is reset by means of an NC contact of the next relay (see lines 1, 5, and 9). The only exception is the last relay (Y4 in this case). This is reset by the NC contact of limit switch a1 (line 13), which opens the moment the last program step A is completed. With that, all relays are reset, and the system is ready for the next cycle. It is also noted that SET signal c2 for relay Y2 (line 5) has a y1 contact connected ahead of it. Likewise, SET signal d2 for relay Y3 (line 9) has a y2 contact connected ahead of it; etc. The purpose of these contacts is to assure that the SET signal for a given relay only takes eect provided the previous Hossein M. Oloomi Purdue University at Fort Wayne

9.4 Ladder Diagram Design: Cascade Method

289

Figure 9.19: Ladder diagram for the sequence START, A+, B+, C+, C, A, D+, A+, D, B, A.

Purdue University at Fort Wayne

Hossein M. Oloomi

290

ELECTRIC LADDER DIAGRAMS relay is active at the moment. Thus, each SET signal is series-connected with a contact of the previous relay. This is necessary to prevent false SET signals in cases where a given limit switch is falsely actuated out of turn. The third noteworthy feature of the circuit concerns those solenoids that must be actuated more than once during the program cycle, in our example, solenoids A+ and A. Since solenoid A+ is actuated in both Group I and Group III, we connect an NO contact y1 ahead of solenoid A+ in line 2, and a y3 contact in line 10. These contacts prevent the voltages from penetrating into the other group while A+ is actuated in Group II and IV, and we therefore connect a y2 contact ahead of A in line 7, and a y4 contact in line 14.

9.4.2

Single Path Sequencing Systems with Sustained Outputs

In many industrial automation systems, sustained actuating signals are required. This is best visualized from Figure 9.6, where the cylinder actuating valve has only one solenoid and a return spring. To shift such a valve into its + position requires a sustained solenoid voltage. The systems of this type requiring sustained output signals, the previously described method must be modied somewhat. We shall demonstrate this using the same sequence as before ST ART, A+, B+, C+, C, A, D+, A+, D, B, A
I II III IV

The sequence is now divided into groups so that no letter is repeated within any group. As is seen, the resulting division is identical to that of the previous example. Since there are no A, B, C, or D solenoids, these motions are obtained simply by cutting o the respective + solenoids. Contrary to the previous case, this can happen in the middle of a group. As before, the moment a new group is activated, all output of the previous group are automatically cut o. If it is required to maintain a certain output into the next group, that output has to be reactivated in that group. To show this and help design the ladder diagram, one can draw horizontal arrows underneath the listed sequence, showing up to what point a given output must be maintained. For example, solenoid signal B+ must be maintained through part of Group I, all of Group II, and also through Group III tp to completion of stroke D. At that point, B+ must be cut o, which automatically produces stroke B. However, these arrows are not shown here. The resulting ladder diagram is shown in Figure 9.20, which has been drawn using the pattern of Figure 9.5, with the ip op lines at the top and the output lines concentrated at the bottom of the ladder. By comparison, Figure 9.19 has been drawn according to the pattern of Figure 9.8, with the output lines drawn directly below the respective relay coils. However, this pattern should not be used for systems with sustained output signals that are maintained from one Hossein M. Oloomi Purdue University at Fort Wayne

9.4 Ladder Diagram Design: Cascade Method

291

Figure 9.20: Ladder diagram for the sequence START, A+, B+, C+, C, A, D+, A+, D, B, A using cylinder actuating valves with a return spring.

group to the next, since sneak paths are liable to prevent proper resetting of the previous group. The rst six lines of Figure 9.20, representing the three ip ops, are almost identical to the corresponding lines in Figure 9.19. The main dierence is in the output lines. Since signal A+ must be maintained all through Group I, and also through Group II until completion of the C stroke, we connect solenoid A+ to an NO relay contact y1 in line 7, and to y2 in series with an NC contact of limit switch c1 in line 8. When stroke C is completed, this contact opens and cuts o solenoid A+, thus producing stroke A. Since solenoid A+ must again be actuated all through Group III, A+ is also connected to relay contact y3 in line 9. Similarly, line 10, 11, and 12 assure actuation of B+, starting with closure of the NO contact a2 in Group I, through all of Group II, and through Group III until completion of stroke D. At that moment, the NC contact of d1 opens, cutting o B+, which produces stroke B. Line 13 causes actuation of solenoid C+ only during the last part of Group I, starting with completion of stroke B+. Finally, line 14 and 15 actuate D+ during the last part of Group II and during the beginning of Group III, until completion of stroke A+. Purdue University at Fort Wayne Hossein M. Oloomi

292

ELECTRIC LADDER DIAGRAMS After completion of the B stroke and Group III, solenoid A+ must be cut o. Since there are no required output signals in Group IV, this group can be dispensed within this particular example, saving one relay. We therefore use the NC contact of limit switch b1 in line 5 to reset ip op Y3 . With that, all groups are inactive, all solenoids are cut o and, once stroke A is completed, the sequence has ended. We now provide a third example, dealing with an automatic mixing system. A START signal must open solenoid valve F (having a return spring) and thereby ll a tank with liquid. When liquid reaches level H, a level switch H is actuated. As a result, valve F must close, and mixer motor M is to operate for a specied time, as measured by timing relay YT M R . After this time has elapsed, mixer motor M is to stop, and solenoid valve D (also with a return spring) located at the bottom of the tank must open and drain the tank. When the liquid level has declined below a level L, a second level switch L mounted near the tank bottom is released, which must close valve D. The required sequence can be written as follows, where the signals in parantheses indicate the requirements for producing the output signal pointed to by the arrow: ST ART L
I

F,

(H) F , M YT M R
II

(yT M R ) M , D
III

(L ) D ,

IV

The resulting solution is shown in Figure 9.21. The ladder diagram is simple to understand, and the reader should have no diculty tracing the various steps. Here, too, as in Figure 9.20, Group IV can be eliminated, since shutting o Group III after level swich L has opened automatically cuts o signal D and thus closes the drain valve. (As is shown in Section 9.5.10, a much simpler solution to this problem is possible.) The cascade method of designing ladder diagram is simple, and the resulting diagrams are easy to understand. This is a great advantage, which somewhat osets the fact that more relays are generally required with this method. The method is, therefore, especially suitable for one-of-kind circuits, where the time and eort saved in the design process is more important than the cost of an extra relay or two. On the other hand, if the circuit were to be manufactured in quantity, minimizing relays would become important, and we might prefer to design the circuit using sequence charts or the Hauman method, even though the design eort is much greater. Finally, if the circuit is to be implemented with programmable controllers, minimizing relays is of no importance, so that the cascade method would be the method of choice. A concluding comment concerning the reliability of the cascade method. races Many relay circuits suer from so called races. Thus, even though two relay coils are energized simultaneously, their contacts may not switch at exactly the same moment. Similarly, two contacts of a given relay do not always switch Hossein M. Oloomi Purdue University at Fort Wayne

9.5 Ladder Diagram Design: Human Method

293

Figure 9.21: Ladder diagram for an automatic mixing system.

together. If the wrong contact switches rst, a malfunction might result in certain circuits, and this possibly must be taken into account in circuit design. A good circuit is not sensitive to such races. Circuits designed by the cascade method are inherently reliable, since a given ip op only resets after the succeeding ip op is completely set. Even so, a malfunction caused by a race is theoretically possible if a relay is defective, and such case can be demonstrated. Referring to Figure 9.19, suppose relay Y3 in line 9 is set. This opens the NC contact y3 in line 5, resetting Y2, and nally opening the NO contact y2 in line 9. If relay contact y3 in line 10 is defective and does not close completely before y2 in line 9 has opened, memory is not completely established, and the relay Y3 may return to its reset condition. Such a situation is extremely unlikely, and the matter is only discussed here to point out the problem of races.

9.5

Ladder Diagram Design: Human Method

The method to be described is the classic method for designing sequential systems. Although the method is not easy to master, it produces a circuit with a minimum number of relays.

9.5.1

Sequential Systems
combinational systems sequential systems Hossein M. Oloomi

Switching systems are divided into combinational and sequential systems. In combinational systems, each binary output is a function only the pre sent inputs. In sequential systems, on the other hand, some or all outputs also depend on Purdue University at Fort Wayne

294

ELECTRIC LADDER DIAGRAMS

Figure 9.22: Schematic representation of a sequential system. previous inputs, that is, on the past history of the system. Thus, sequential systems require memory elements, which usually means ip-ops. Sequential systems, in turn, are subdivided into asynchronous and synchronous systems. Asynchronous systems are event-based, which means that a step occurs only after the previous step is successfully completed. Synchronous systems, on the other hand, are time-based, that is the system is driven by a clock producing pulses at xed intervals, and each pulse triggers a new step. Computers driven by internal clocks are synchronous systems. We will mainly be concerned with the design of asynchronous systems with sustained input signals (rather than pulse inputs). Figure 9.22 shows a schematic representation of a sequential system, with a number of inputs xi and outputs zj . Depending on memory requirements (discussed later), a number of ip-ops are needed, and each requires a SET and RESET signal. The functions dening these are called excitaion functions. Each ip-op provides a state variable y and its logic complement y . The combinational system, which is part of the overall system, receives the various x and y variables as inputs, and then outputs the output functions zj and the excitation functions Sk and Rk . Thus, the design of a sequential system involves, rst of all, determining how many ip ops are required, and then deriving various excitation and output functions.

asynchronous systems synchronous systems

sustained input signals

excitation functions state variable combinational system output functions

9.5.2

Stable and Unstable States

Before describing the design procedure, it is important to understand the difference between stable and unstable states. Suppose that at a certain moment t0 , we need a SET signal to a ip op implemented by a relay, as shown in Figure 9.3. The resulting response is plotted in Figure 9.23. Because of the relay coil inductance, a certain time must pass until the coil current builds up to a value sucient to pull in the coil armature, so that the coil is fully actuated only at moment t1. Since the armature, mechanical linkage, and contacts all have inertia, we cannot expect instantaneous motion, so that contact y becomes fully closed only at moment operate time t2 . We thus have a total time lag of t2 t0 (called the operate time), consisting of an electrical and a mechanical lag, which, in a typical relay, might be of the order of 10-20(msec). Hossein M. Oloomi Purdue University at Fort Wayne

9.5 Ladder Diagram Design: Human Method

295

Figure 9.23: Response of an RS ip op illustrating unstable states.

Figure 9.24: Sequence START, A+, A, A+, A. A similar time lag occurs if a RESET signal is given at moment t3 . The coil current is fully interrupted only at t4 , and the contact fully open only at t5 , giving a total time lag of t5 t3. These time intervals, t0 to t2 and t3 to t5 , represent unstable states, during which ip op output is not consistent with the input signal. If S = 1 and R = 0, then y is supposed to be 1, and not 0 as during the t0 to t2 period. This unstable state lasts only for a short period of time, and automatically turns into stable state, in which input and output signals are consistent with each other. The phenomenon of unstable states has an important bearing on the discussion to follow.

unstable states

stable state

9.5.3

Primitive Flow Table

In the following, we use a simple example in order to illustrate the method. Assume a single cylinder A actuated by a 5/2 valve with solenoid A+ and a return spring, as shown in Figure 9.24. The required cycle is very simple: START, A+, A, A+, A. The gure also includes a partial sequence chart, showing these four cylinder motions as triggered by a short START signal. We now number each state in the sequence. The input combinations a1 a2 existing at each state are listed below the diagram. Each time an input signal Purdue University at Fort Wayne Hossein M. Oloomi

296

ELECTRIC LADDER DIAGRAMS

Figure 9.25: Primitive ow table for the example of Figure 9.24. changes, we assign a new state number. Thus, the above sequence involves eight dierent states, with the last state at the end of the sequence labeled 1, since it is equivalent to the rst state. primitive flow table The next step is to ll in so called primitive ow table, as shown in Figure 9.25. This table has a row for each of the eight states, and a column for each possible input combinations. Since there are two inputs a1 and a2, there are 22 = 4 possible combinations, and thus four columns. In addition, at the right side of the table, we add an output column for each output signal. Since our example involves only a single output A+, there is only one output column. The table is now lled in as follows. Each of the eight states is entered in its row (according to its number) and its proper column (according to its input combination), and is encircled, which signies a stable state. For each stable state, we enter the required output signal in the A+ column. For example, in the rst row, we want A+ to be 1 in order to have the cylinder extend. In the second row, we also enter a 1 in the A+ column, since the solenoid requires a continuous signal because we want the cylinder to retract. The remainder of the A+ column is lled in similarly. We now enter the unstable states, using numbers that are not encircled. For example, at stable state 1, the cylinder begins to extend. As a result, limit switch a1 is released, so that the input combination changes from a1 a2=10 to 00. At that moment, we get a brief unstable state 2, which means that an input to the logic system has changed, but the system has not yet responded to this change, so that there is an inconsistency between the systems input and output signals. This unstable state 2, of course, does not last long. After a very brief period (depending on the speed of response of the switching element used), the system reaches the next stable state, state 2 in this case. The remaining unstable states are lled in similarly. Thus, each time an Hossein M. Oloomi Purdue University at Fort Wayne

9.5 Ladder Diagram Design: Human Method input change occurs, we go from a stable state k to the succeeding unstable state k + 1 in the same row, and from there to the succeeding stable state k + 1 in the same column but in the new row. The reader may be mystied as to why we bother with these unstable states to begin with, especially since they only last for such a brief period of time. The answer to this becomes evident in the next section, which deals with row merging. The remaining squares in the ow table are never reached, and they, therefore, get the dont care symbol . The reasoning behind this as follows. The a1 a2 = 11 combination is physically impossible, since the cylinder cannot retract and extend at the same time. Therefore, the entire fourth column has no physical signicance. The other empty squares are theoretically possible, but are not utilized in the particular program sequence under discussion. For example, we cannot go from stable state 1 directly to the a1a2 = 01 square in the same row, since the system must rst pass through a1 a2 = 00, unstable state 2, which immediately brings it into the second row. Since none of these empty squares are ever reached, we dont care what might happen there, and therefore enter .

297

row merging

9.5.4

Row Merging and Merges Flow Table

We could, in theory, use the primitive ow table to design our control circuit. However, the circuit must keep track or remember where it is at any moment, and this requires memory, that is, ip ops. Each ip op has two possible states, y = 0 or y = 1. Therefore, n ip ops can dierentiate between 2n dierent states. Since the previous primitive ow table has eight states, three ip ops would be required to dierentiate between them. In order to reduce the number of rows in the ow table, and thus hopefully also the number of the required ip ops or relays, we use a technique called row merging. The idea behind row merging is as follows: instead of relying solely on ip ops to dierentiate between the dierent states, we can also utilize the information supplied by the input signals. We therefore combine, or merge, two (or more) rows, provided there is no contradiction between them; which means that there are no diering numbers in the same column. To illustrate, we could merge rows 1 and 2 in the previous primitive ow table, and the result of this merger is shown in Figure 9.26. The merging is carried out according to the following rules: 1. If there is an unstable state and a stable state in the same column, the merged row gets a stable state. 2. If there is a number and a entry in the same column, the merged row gets the number (with or without circle, as the case may be). 3. If there are only entries in a column, the merged row gets a . Purdue University at Fort Wayne

row merging merge

Hossein M. Oloomi

298

ELECTRIC LADDER DIAGRAMS

Figure 9.26: Merging rows 1 and 2 of Figure 9.25.

Figure 9.27: Merged ow table with state assignment.

The principle behind this merging process is that if the control circuit decides that the system is, at this moment, in the merged row 1, 2, it can then identify the exact state it is at by referring to the input signals. Considering, for example, rows 4 and 5, we see immediately that these cannot be merged, because there are diering numbers, rows 4 and 6, in the a1a2 = 00 column. If we try to merge these rows, we get a contradiction: in row (unstable ) 4, the a1 a2 = 00 combination means that we are at the stable state 4, so that the system is expected to remain there for the time being, and provide output signal A+ = 0. In row 5, however, the same a1 a2 = 00 combination means that the system is at unstable state 6, and is thus expected to move on immediately to stable state 6 in the next row, where A+ = 1 is called for. It is obvious, therefore, that rows 4 and 5 cannot be merged. It should now be clear why we entered the unstable states in the primitive ow table: they provide information necessary to decide which rows may be merged. Checking the remaining rows in Figure 9.24, we conclude that the following rows can be merged: 1 and 2, 3 and 4, 5 and 6, and 7 and 8. The result of these merging is the merged ow table of Figure 9.27. The reader is asked to disregard the two right-hand columns labeled y1 and y2 for now. These are discussed in output columns the next section. Note, however, that output columns (A+ in this case) are not included in the merged ow table. In fact, rows can be merged even though they have dierent output signals. It so happens that this statement cannot be illustrated in the present example. Hossein M. Oloomi Purdue University at Fort Wayne

9.5 Ladder Diagram Design: Human Method

299

9.5.5

State Assignment

Using the technique of row merging, we succeeded in reducing the eight rows of the primitive ow table to four rows in the merged ow table. Therefore, only two ip ops, instead of three, are needed to dierentiate between the rows. This is done using a process called state assignment. If the merged ow table has only two rows, the problem of state assignment becomes trivial: a single ip op is sucient, and we assign state y = 0 to one row and y = 1 to the other. By checking the state of y, the system always knows which row it is at. If there are four rows, we need two ip ops, and these provide four dierent state variable combinations: y1 y2 =00, 01, 10, and 11. The process of deciding which of these to assign to each row is termed the state assignment. We can place any one of these four combinations into the rst row, which leaves any of the remaining three combinations for the second row, and any of the remaining two for the third, and the last remaining combination for the fourth row. Thus, there are 4! = 24 dierent possibilities. It can be shown, however, that most of these 24 possibilities are equivalent. For example, the state assignments y1 y2 = 00, 01, 11, 10 and y2 y1 = 00, 10, 11, 01

state assignment

are equivalent, since we can get one from the other simply by exchanging the indices, that is, exchanging y1 and y2 . Similarly, the state assignments y1 y2 = 00, 01, 11, 10 and y1 y2 = 11, 10, 00, 01

are equivalent, since we can get one from the other by exchanging SET and RESET, that is, exchanging y and y for both ip ops. Likewise, if we only exchange S2 and R2 , we nd the following state assignments to be equivalent: y1 y2 = 00, 01, 11, 10 Finally, the state assignments y1 y2 = 00, 01, 11, 10 and y1 y2 = 10, 11, 01, 00. and y1 y2 = 01, 00, 10, 11.

are equivalent since we can exchange S1 and R1. In this manner, the 24 state assignments possible with two ip ops can be reduced to only three distinctly dierent ones: (a) y1 y2 =00, 01, 11, 10 (b) y1 y2 =00, 11, 01, 10 (c) y1 y2 =00, 01, 10, 11 each of these represents a group of eight other equivalent state assignments, which can be derived from the original one by means of the manipulations previously described. Depending on which of these three state assignments is used, Purdue University at Fort Wayne Hossein M. Oloomi

300

ELECTRIC LADDER DIAGRAMS we obtain three completely dierent nal solutions. On the other hand, the eight solutions from the eight state assignments belonging to the same group are basically identical, and dier only in how the variables and hardware components are labeled. If we use three ip ops instead of two, we can cover 23 = 8 dierent rows of a merged ow table, and this results in 8! = 40320 possible state assignments. Here, too, most of these are actually equivalent, and the above number can be reduced to only 840 distinctly dierent state assignments, each of which produces a dierent solution. The question of selecting the state assignment out of the 840 possible onesin order to get the best (i.e., simplest) solution is complex. One important role in selecting a state assignment is that only one state variable should switch as we go from one row to the next. This automatically excludes groups (b) and (c) from the specied list, leaving only group (a). In group (b), the transition from the rst to the second row calls for a change of y1 y2 from 00 to 11, which is against this rule. Similarly, during transition from the third to the fourth row, the state variables change from 01 to 10. In group (c), we also have two transitions with double changes: from row 2 to 3, and from row 4 back to row 1. The reason behind this rule is that double changes in state variables can races cause so called races. For example, suppose we used a state assignment according to group (b). In order to go from the rst row (where y1 y2 = 00) to the second row (where y1 y2 = 11), we must give the S1 and S2 signals simultaneously, so that both ip ops become set. However, two ip ops are never completely identical (no matter whether implemented with relays, electronically or pneumatically), so that one of the two is certain to have a slightly faster response and become set rst. Of course, we have no way of knowing which ip op is faster. The transition from row 1 to row 2 can, therefore, take place along any one of the following two paths: y1 y2 y1 y2 = = 00 ; 01 ; 11 00 ; 10 ; 11.

If ip op 2 is faster, then the rst path is followed, and the system suddenly nds itself in row 3 (where y1 y2 = 01). If, on the other hand, the second path is followed, then the system nds itself in row 4. Depending on other circumstances, the system might nd itself trapped in row 3 or row 4, which could result in a serious malfunction. critical races Not all races lead to a malfunction. Those that do are called critical races, because the end result depends on which ip op wins the race. But there noncritical races are also noncritical races, in which the winner has no eect on the end result. However, to avoid the whole problem, it is best to select a state assignment that avoids races to begin with by following the previous rule. The merged ow table in Figure 9.27 shows the state assignment that was selected, listed in the two right-hand columns. It is one of the eight belonging to group (a) (namely, y1 y2 ) and, as is noted there, there are no races. Hossein M. Oloomi Purdue University at Fort Wayne

9.5 Ladder Diagram Design: Human Method

301

Figure 9.28: Flip op actuation table.

Figure 9.29: Karnaugh maps for excitation functions corresponding to Figure 9.27.

9.5.6

Derivation of Excitation Functions


excitation functions

For each ip op, we must derive the SET and the RESET functions. These are often called the excitation functions of the ip op. Since two ip ops are used in our example, we must drive four excitation functions, and this is best done using Karnaugh maps. To ll these maps, we refer to the merged ow table of Figure 9.27, and the ip op actuation table of described in Chapter 7. Since it is useful to have this table in front of us, it is shown again in Figure 9.28. The Karnaugh maps for the four excitation functions are shown in Figure 9.29. Note that their row and column designations match those of the merged ow table. This facilitates the process of lling in the maps, since a given square in any map corresponds to the square at the identical location in the merged ow table. Unfortunately, for more complicated problems, this usually becomes impossible, in which case a special path map can be used. This be discussed in Section 9.5.10. The Karnaugh maps are now lled in according to the following three rules: 1. In squares representing stable states, each ip op must maintain its present state. Example 9.1 The left square in the rst row represents stable state 1, both in the merged ow table and in the Karnaugh maps. To maintain this state, we must keep y1 = 1 and y2 = 0 (this being the state assignment for the rst row). Purdue University at Fort Wayne

Hossein M. Oloomi

302

ELECTRIC LADDER DIAGRAMS We now refer to the ip op actuation table in Figure 9.28, and see from the last row that for initial y1 = 1 and nal y1 = 1 (i.e., y1 maintained 1), we dont care about S1 , but must keep R1 = 0. We, therefore, enter the dont care symbol in this particular square of the S1 map, and a 0 in the R1 map. The state variable y2 , on the other hand, must be kept 0. This is accomplished by following instructions in the rst row of the ip op actuation table (initial y2 = 0 and nal y2 = 0), and we enter a 0 in the S2 map, and a in the R2 map. The reader should check the remaining seven stable states in Figure 9.27, and trace the corresponding entries in the four maps. 2. In squares representing unstable states, the ip op must go to the succeeding stable state. Example 9.2 The third square in the rst row represents unstable state 3. To get from there to stable state 3 in the new row, y1 must be maintained 1, but y2 must switch from 0 to 1, since the state assignment for the second row is y1 y2 = 11. Again, we refer to the ip op actuation table for instructions. The last row indicates that we need S1 is dont care and R1 = 0, and these are the entries in the third square of the rst row in the excitation maps. Again, the reader should check the entries for the remaining unstable states. 3. Squares having dont care entries in the merged ow table get dont care entries in the excitation maps. This is logical, since these squares can never be reached anyway, so that dont care what is entered there in the maps. After the four maps have been lled in, the functions are derived using the Karnaugh map technique described in Chapter 7. The resulting excitation functions are written in Figure 9.29 under each map. They are S1 R1 S2 R2 = = = = a1 y2 ST ART, a1 y2 , a2 y1 , a2 y1 .

The START term included in the S1 function is explained in Section 9.5.7.

9.5.7

Derivation of Output Functions

output function For each output signal, the corresponding output function must be derived, and here, too, this is best done using Karnaugh maps. In our example, there is only one output signal A+, and the corresponding Karnaugh map is shown in Figure 9.30. The output maps are lled in by referring to both primitive and merged ow tables, and using the following four rules: 1. A square representing a stable state gets the output value shown for that state in the primitive ow table. Hossein M. Oloomi Purdue University at Fort Wayne

9.5 Ladder Diagram Design: Human Method Example 9.3 The primitive ow table, Figure 9.25, shows that, for stable states 1 and 2, A+ = 1, whereas, for stable states 3 and 4, A+ = 0. We therefore place 1 entries in the rst two squares of the rst row, and 0 entries in the two middle squares of the second row (which, according to Figure 9.27, represents stable states 3 and 4. 2. If the output remains at the same value (0 or 1) for stable states k and k + 1, we enter this value in the square representing the unstable state k + 1. Unfortunately, there is no example of this situation in the present problem. However, it makes sense that if we wish a certain output to remain 0 (or 1) for stable states 16 and 17, then that same output should also be retained for the intermediate unstable state 17. 3. If the output changes between the stable states k and k + 1, we place dont care entry in the square representing the unstable state k + 1. Example 9.4 As seen from the primitive ow table, A+ = 1 at stable state 2, but 0 at stable state 3. We therefore enter at unstable state 3 (third square of rst row). Similarly, A+ = 0 at stable state 4, but 1 at the stable state 5. We therefore enter at unstable state 5. The reasoning behind this rule is that it does not really matter whether the output switches to its new value a few milliseconds earlier or later, since the delays in the switching circuit are negligible compared to the mechanical delays of the controlled system. 4. Squares having dont care entries in the merged in the merged ow table get dont care entries in the output map. Again, since these squares are never reached anyway, we dont care what is entered there. After the output maps have been lled in, the output functions are derived. The result for A+ is listed in Figure 9.30, i.e., A+ = y1 y2 + y1 y2 .

303

Note that an arrow is pointing at the 0 entered in the square corresponding to the unstable state 1. According to previous rule, we should have entered in that square, since A+ = 1 at stable state 8 and 0 at stable state 1. The reason for this 0 entry is explained in the next section.

9.5.8

How to Add the START Signal

The solution is now almost complete, except that we have not yet taken care of the START signal. As things stand, the sequence repeats indenitely, which can be seen by referring to the excitation and output maps. At completion of the sequence, the system reaches unstable state 1 (left square in button row), where S1 = 1 and S2 = 0. Thus, ip op 1 becomes set, producing y1 y2 = 10, that is, Purdue University at Fort Wayne Hossein M. Oloomi

304

ELECTRIC LADDER DIAGRAMS

Figure 9.30: Karnaugh map for output function A+. the system automatically goes to the stable state 1 (left square in the top row). Since A+ = 1 at that square, the sequence begins anew without waiting for the START command. The straightforward way of incorporating START in the solution is to consider it as a third input signal, in addition to a1 and a2. But this means additional columns in the ow tables, and the various Karnaugh maps would have to accommodate ve variables instead of four, thus doubling their size and making the solution much more time consuming. To avoid having ve variables, we use the trick of completely disregarding START at the beginning, as has been done here. START is now incorporated in the solution obtained so far, using the following reasoning: In order to get only one cycle at a time, the system must be stopped at the end of the sequence, that is, either at unstable state 1 or at stable state 1. This provides two options, each involving dierent considerations. To stop the system at unstable state 1, we refer to the excitation maps, and check which signal produces the transition from unstable state 1 to stable state 1. As already mentioned, this transition is caused by the S1 = a1 y2 signal. We must, therefore, inhibit this signal by multiplying it with START. As a result, when unstable state 1 is reached, S1 remains 0 as long as START=0. Only when START=1 do we get S1 = 1, causing the system to pass to stable state 1. However, all this is useless unless we made A+ = 0 at unstable state. If A+ = 1 at that state, it is pointless to inhibit the S1 signal, since the cylinder would begin to move at unstable state 1 before START is given. This explains why 0 instead of was entered in the respective square of the A+ map. (A dont care entry in that square might be utilized as 1.) The second option involves stopping the system at stable state 1. Since states 1 and 2 have the identical state assignment, this cannot be done by inhibiting excitation functions. Instead, we must now inhibit the A+ output function with START, so that the system cannot pass from stable state 1 to stable state 2 unless START=1. This however, brings up another problem. If we followed the above option, we would write the output function as Hossein M. Oloomi Purdue University at Fort Wayne

9.5 Ladder Diagram Design: Human Method

305

Figure 9.31: Modied Karnaugh map for the output function A+.

A+

y1 y2 ST ART + y1y2

which means that the entire upper 4-square cell y1 y2 is independent on the START signal. Thus, unless the operator keeps pressing the START button all during the forward stroke (until unstable state 3 is reached), we would get A+ = 0 at stable state 2, so that the cylinder retracts. To prevent this malfunction, we must split the two 1 entries in the upper 4-square cell into two separate cells, and attach the START signal only to stable state 1 (but including other states with entries, if possible). The resulting output map is shown in Figure 9.31. The resulting A+ function A+ = a1y1 ST ART + y1 y2 + a1 y1 y2

is much longer than that obtained before. The conclusion is that, for this particular example, the rst option is preferable, that is, START should be attached to the S1 function. In many cases, however, there is no choice. For example, unstable state 1 sometimes does not appear in the merged ow table, having been eliminated in the merging process. In such cases, we have no choice but to use the second option, that is, attach START to the appropriate output function. In connection with START, a feature of state assignment in Figure 9.27 is discussed briey. The reader may have wondered why y1 y2 = 00 was assigned to the last, rather than the rst row. This has to do with power breaks (e.g., power failure or the end of the work day). When power returns, we want the system to be at unstable state 1, where it waits for the START signal. Flip ops implemented by relays are always reset during a power break, so that the system is automatically at unstable state 1, provided that assignment 00 is used there. It must be stressed that this consideration applies only to relays. If electronic ip ops are used, the initial ip op state is normally completely random, so that special provision must be made to initialize the system properly when power returns. When pneumatic valves are used as ip ops, this problem does Purdue University at Fort Wayne Hossein M. Oloomi

306

ELECTRIC LADDER DIAGRAMS

Figure 9.32: Ladder diagram solution for the sequence START, A+, A, A+, A. not exist. Valves have mechanical memory, and therefore automatically retain their last position when air pressure is interrupted.

9.5.9

The Ladder Diagram Solution

We have now derived the solution functions, and are ready to draw the resulting ladder diagram. In Figure 9.3, the ip op SET signal was provided by a NO switch contact. In the case of a circuit operated automatically rather than by a manual push button, this SET contact must be replaced by a contact circuit implementing the S function derived in Section 9.5.5. Since the RESET button in Figure 9.3 actuates an NC contact, it must be inverted reset function replaced by a circuit giving the complemented or inverted reset function R . In other words, this circuit must conduct current as long as the RESET button is not pressed. This means that the derived RESET, or R functions, must rst be inverted using the DeMorgan theorems. We thus get R1 R2 = (a1 y2 ) = a1 + y2 , = (a2 y1 ) = a2 + y1 .

The resulting ladder diagram solution is shown in Figure 9.32. If the reader is not convinced, the sequence chart should be drawn for this ladder diagram to verify the circuit operation.

9.5.10

Solution of Cylinder Actuating Valve without a Return Spring

We now modify the solution, assuming a cylinder valve with double solenoids A+ and A, but with no return spring, as shown in Figure 9.9. The resulting primitive ow table is identical to that of Figure 9.25, except that the single output column A+ must be replaced by the two output columns shown in Figure 30. Since the remainder of the primitive ow table is not changed, it is not Hossein M. Oloomi Purdue University at Fort Wayne

9.5 Ladder Diagram Design: Human Method

307

Figure 9.33: Output columns for the primitive ow table of Figure 22 using valves without return springs.

Figure 9.34: Output maps corresponding to Figure 9.33.

repeated here. Note that both output columns contain dont care entries. This is because these valves have mechanical memory, and retain their previous position even without an explicit solenoid signal. Since output signals have no eect on row merging or on state assignment, the merged ow table is identical to that of Figure 9.27. The only dierence is that the two output maps of Figure 31 replace the one of Figure 9.30. Note that in the new A+ map, the second square in the top row now has a entry rather than 1. As a result, a simplied solution A+ = a1 (y1 + y2 )

becomes possible. If we decide to attach the START signal to A+ (rather than to S1 ), we get A+ = a1(y1 ST ART + y2 ).

Thus, using the second option is practical in this case. Purdue University at Fort Wayne Hossein M. Oloomi

308

ELECTRIC LADDER DIAGRAMS

Figure 9.35: (a) Primitive ow table, and (b) a merged ow table for an automatic mixing system.

9.5.11

Use of a Path Map

Example 9.5 Automatic Mixing. We now apply the Human method to the automatic mixing system, which was solved in Section 9.4.2 using the cascade method. Since the program sequence was dened there, it is not repeated here. The primitive ow table is shown in Figure 9.35(a), and has four output columns. Since there are three input variables (L, H, andyT M R ), there could be eight dierent input combinations. However, only those of relevance to the problem are listed in the table, in order in which they appear in the sequence. For instance, combinations 010 and 011 are impossible, since the level cannot possibly be below L and above H at the same time; hence, these columns are not listed. The merged ow table is shown in Figure 9.35(b). Since there are only two rows, a single ip-op is sucient. In Section 9.4.2, it was explained that the excitation and output maps should, if possible, have the same conguration as the merged ow table to make it eassier to ll in the maps. Looking at Figure 9.35(b), we see immediately that this is impossible here. To facilitate lling in the maps, it is highly recommended path map to invest a couple of minutes in rst constructing a path map, as shown in Figure 9.36. This has the row and column designations of a standard Karnaugh map, but instead of 1 and 0 enteries, we enter the various states appearing in the merged ow table. For example, since the merged ow table shows stable state 1 to be at LHyT M R = 000 and in the row y = 1, we enter the state state 1 in that square of the path map corresponding to the same combination of variables. The remainder of the path map is lled in similarly. We are now ready to ll in the two excitation and the four output maps, which are shown in Figure 9.37, using the rules listed in Section 9.5.5 and 9.5.6. Since these maps have identical row and column designations as the path map, we can tell immediately which square corresponds to which state. In other words, instead of guring out the location of each state separetely for each of Hossein M. Oloomi Purdue University at Fort Wayne

9.5 Ladder Diagram Design: Human Method

309

Figure 9.36: Path map for Figure 9.35. the six maps, we perform this chore only once, when lling in the path map. As in the previous example, we incorporate the START signal at the end, adding it to the S signal, and, for this reason, place a 0 into the square corresponding to unstable state 1 of the F output map. The same square int the D map also has a 0, but for a dierent reason. If it should get a entry, the D function would become D = y , whcih means that solenoid D would be energized unnecessarily for long periods of time while the system is at unstable state 1 waiting for the next START signal. The nal solution is shown in Figure 9.21. Only one relay is required, as compared to three in the cascade method solution of Figure 9.21. This illustrates the statement made in Section 9.4.2: the cascade method is much easier than the Human method, but does not result in a minimum number of relays.

9.5.12

Pseduo-Karnaugh Maps

While the description of the Human method is basically complete, some enhancements can be added. The single-cylinder problem treated previously involved two input and two state variables. Every additional cylinder adds two more input variables (assuming two limit switches per cylinder), and possibly also more state variables, depending on the length and nature of the sequence. It is obvious that, very soon, we will exceed the number of variables that can be handled by Karnaugh maps. To overcome this diculty, we can utilize pseudo-Karnaugh maps, so called because they do not include all theoretically possible combinations of input variables. As an example, we again consider the single-cylinder problem of Figure 9.24. If we now replace the valve return spring by a second solenoid A (as in Figure 9.9), then we can disregard intermediate states 2, 4, 6, and 8 in Figure 9.24 (at which a1a2 = 00), since no solenoid actuation is required at these four states, so that nothing happens there. The resulting modied sequence chart is shown in Figure 9.39. Instead of eight, there are now only four states. The resulting ow table is shown in Figure 9.40. Note that there are only two input-signal columns, a1 and a2. The a1 a2 = 00 states have been eliminated, and the a1 a2 = 11 states are impossible so that we are left only with a1 a2 = 10 and 01. These designations can be shortened to a1 = 1 and a2 = 1. (The dropped Purdue University at Fort Wayne

pseudo-Karnaugh maps

Hossein M. Oloomi

310

ELECTRIC LADDER DIAGRAMS

Figure 9.37: Excitation and output maps for an automatic mixing system.

Figure 9.38: Ladder diagram for an automatic mixing system.

Figure 9.39: Sequence chart for the sequence ST ART , A+, A, A+, A. Hossein M. Oloomi Purdue University at Fort Wayne

9.5 Ladder Diagram Design: Human Method

311

Figure 9.40: Primitive and merged ow table for Figure 9.39.

Figure 9.41: Pseudo-Karnaugh excitation and output maps for Figure 9.40.

0 need not be explicitly stated, but it is implied). This considerably shrinks the ow tables, and also the resulting Karnaugh maps. Since row merging is not possible in this particular case, Figure 9.40 represents both primitive and merged ow tables. We therefore add the two columns for the state assignments. (We purposely use the same state assignment as in Figure 9.27 to obtain a valid comparison between the respective results.) The excitation and output maps, see Figure 9.41, have the same conguration as the merged ow table, that is, they contain only two columns rather than four. The resulting excitation and output functions are identical to those obtained previously, as shown in Figures 9.29 and 9.34. The conclusion of this exercise is that by using pseudo-Karnaugh maps, only half the work is required to arrive at the same nal solution. We now illustrate how a pseudo-Karnaugh map for six variables is constructed (four input variables, a1, a2, b1, and b2 and two state variables, y1 and y2 ). The left part of Figure 9.42 shows a regular Karnaugh map for these six variables. We rst eliminate all squares representing the combinations a1 a2 = 00 or b1 b2 = 00 by cross-hatching the respective areas on the Karnaugh map. Since the combinations a1a2 = 11, and b1 b2 = 11 are impossible (assuming we are dealing with limit switches for cylinders), we eliminate these areas also, using cross-hatching in the opposite direction. By now, only four columns are left, representing a2 b2, a1b2 , a2 b1, and a1b1 . These columns are now arranged as shown in the right section of Figure 9.42, and the result is a six-variable pseudo-Karnaugh map. Purdue University at Fort Wayne Hossein M. Oloomi

312

ELECTRIC LADDER DIAGRAMS

Figure 9.42: Pseudo-Karnaugh map for six variables.

Figure 9.43: Pseudo-Karnaugh map for twelve variables. Figure 9.43 extends this idea to a 12-variable pseudo-Karnaugh map, covering eight input and four state variables. This map consists of 16 submaps, each of which covers the four input variables, a1 , a2 , b1, and b2 , and the two state variables, y1 and y2 , as in Figure 9.42. These submaps themselves are arranged in a similar conguration, but covering the four input variables, c1, c2, d1, and d2 , and the two state variables, y3 and y4 . Note that all possible combinations of the state variables appear on this pseudo-Karnaugh map, including y1 y2 or y3 y4 = 00 or = 11, whereas these combinations have been eliminated for pairs of input variables. We summarize all the conditions that must be fullled before pseudo-Karnaugh maps can be used: 1. The input variables come in pairs, x1 and x2, such that the combination x1 x2 = 11 is impossible. (This condition is fullled, for example, when the pair of input variables represents two limit switches that cannot be actuated simultaneously.) 2. Combination x1x2 = 00 is possible, but can be disregarded, since no output signal is required while x1x2 = 00. (This condition is fullled if no sustained output signals are required, for example, with cylinder-actuating valves without a return spring.) 3. The memory elements are RS ip-ops (and not relays requiring sustained excitation functions). Hossein M. Oloomi Purdue University at Fort Wayne

9.6 Conclusions 4. Pseudo-Karnaugh maps must be used with special caution when there are parallel output signals (e.g., two dierent cylinder motions occurring simultaneously). This is illustrated in the following example.

313

9.6

Conclusions

We now summarize the methods for designing ladder diagrams: 1. Sequence Chart. This method is not systematic, and is only recommended for relatively simple problems. The results achieved depend, to a great extend, on the skill and experience of the designer. 2. Cascade Method. This method is very simple and systematic, but does not minimize the number of relays. It is useful for both simple and large scale problems, and the resulting ladder diagram is easy to understand. 3. Human Method. This method always minimizes the number of relays, but is rather dicult, and requires considerable practice to master fully. It is suitable for small and medium size problems. It can also be applied to large scale problems, but at the cost of obtaining a nonoptimal solution.

9.7

Problems

9.1 Draw the sequence chart corresponding to the ladder diagram of Figure 9.32. 9.2 Two cylinders A and B are actuated by 5/2 valves with double solenoids, and controlled by the ladder diagram shown in Figure 9.44. Draw a detailed sequence chart showing the action of each element (i.e., each cylinder, switch, valve, solenoid, relay) following a brief actuation of the START button. Using this sequence chart, determine what happens if the START button is pressed continuously. 9.3 Repeat Problem 9.2, but for the ladder diagram shown in Figure 9.45. 9.4 Repeat Problem 9.2, but for the system having three cylinders A, B, and C, and for the ladder diagram shown in Figure 9.46. 9.5 Repeat Problem 9.2, but for the system shown in Figure 9.47. [Hint: Allocate three horizontal lines on the sequence chart for the three-position valve V A.] 9.6 Draw a detailed sequence chart showing the action of each element in the ladder diagram shown in Figure 9.48, assuming that push-button switch T is pressed and released four times in a row (i.e., T =0, 1, 0, 1, 0, 1, 0, 1,0). 9.7 A single cylinder A is actuated by a 5/2 valve with solenoid A+ and a return spring (as in Figure 9.6). Design a ladder diagram to produce the sequence ST ART , A+, A. Check your result by means of a sequence Purdue University at Fort Wayne Hossein M. Oloomi

314

ELECTRIC LADDER DIAGRAMS

Figure 9.44: Cylinders and ladder diagram for Problem 9.2

Figure 9.45: Ladder diagram for Problem 9.3

Hossein M. Oloomi

Purdue University at Fort Wayne

9.7 Problems

315

Figure 9.46: Ladder diagram for Problem 9.4

Figure 9.47: Cylinders and ladder diagram for Problem 9.5

Purdue University at Fort Wayne

Hossein M. Oloomi

316

ELECTRIC LADDER DIAGRAMS

Figure 9.48: Ladder diagram for Problem 9.6 chart. Repeat the problem, but with a cylinder actuated by a 5/2 valve with double solenoids. 9.8 By means of a sequence chart, design a ladder diagram for the sequence ST ART , A+, B+, B, A, assuming the use of 5/2 cylinder actuating valves with double solenoids. [Note: This sequence represents a common application, with cylinder A clamping a workpiece, while cylinder B lowers and raises a drill spindle to drill a hole.] 9.9 Repeat Problem 9.8, but with cylinder A actuated by a 5/2 valve with a single solenoid and a return spring. 9.10 Repeat Problem 9.8, but with cylinder B actuated by a 5/2 valve with a single solenoid and a return spring. 9.11 Repeat Problem 9.8, but with both cylinders actuated by a 5/2 valve with a single solenoid and a return spring. 9.12 Repeat Problem 9.8, but including a time delay, giving the sequence ST ART , A+, B+, time delay, B, A. 9.13 Use the cascade method to solve Problem 9.8. 9.14 Use the cascade method to solve Problem 9.9. 9.15 Use the cascade method to solve Problem 9.10. 9.16 Use the cascade method to solve Problem 9.11. 9.17 Use the cascade method to solve Problem 9.12. 9.18 Use the cascade method to design a ladder diagram for the sequence ST ART , A+, B+, B, B+, B, A, assuming cylinder-actuating valves with double solenoids. Hossein M. Oloomi Purdue University at Fort Wayne

9.7 Problems 9.19 Repeat Problem 9.18 but with cylinder-actuating valves with a single solenoid and a return spring. 9.20 Use the Hauman method to solve Problem 9.8. 9.21 Use the Hauman method to solve Problem 9.9. 9.22 Use the Hauman method to solve Problem 9.10. 9.23 Use the Hauman method to solve Problem 9.11. 9.24 Use the Hauman method to solve Problem 9.12. 9.25 Use the Hauman method to solve Problem 9.18. 9.26 Use the Hauman method to design a ladder diagram for the sequence ST ART , A+, A, B+, C+, B, C, assuming cylinder-actuating valves with double solenoids. 9.27 Repeat Problem 9.27, but for the sequence ST ART , A+, A, B+, A+, A, B. 9.28 Repeat Problem 9.27, but for the sequence ST ART , A+, B+, B, C+, B+, A, A+, A, B, C. 9.29 Repeat Problem 9.27, but for the sequence ST ART , A+, A, A+, A, B+, B. 9.30 Two equally deep holes are to be drilled in blocks of wood. Cylinder A clamps the block, cylinder B lowers the drill, and cylinder C shifts the block to the location of the second hole. Hence, the required sequence is ST ART , A+, B+, B, C+, B+, B, C, A. Design a ladder diagram for this sequence using the Hauman method. 9.31 Using the Hauman method, design a ladder digram for a push-to-start/pushto-stop circuit, that is, the rst press on push-button switch T actuates output z, which must remain on even after T is released, whereas the second press turns z o.

317

Purdue University at Fort Wayne

Hossein M. Oloomi

318

ELECTRIC LADDER DIAGRAMS

Hossein M. Oloomi

Purdue University at Fort Wayne

You might also like