Using Ladder Logic Rung with Multiple Serial-Connected Coils

Programmable Logic Controller (PLC) ladder logic programs were traditionally limited to a single coil for a given rung. Most environments allowed branching so that multiple coils could be simultaneously driven. A few programming environments, such as Siemens TIA Portal, allow series-connected coils.

This reflects the relay-based origin of ladder logic where series-connected coils are undesirable. In the physical world it is desirable to specify a single relay voltage with control continuity across each rung. Series-connected coils would require careful attention to match coil and rung voltages. For example, assuming a 24 volt rail, we would see a mix of 24, 12, 8, and 6 volt coils depending on the total number of coils connected in series. The result is problematic for maintenance and logistics. Ask anyone who has installed the wrong relay into an ice cube socket.

At the same time, we must recognize that ladder logic is not relay logic. Instead, it is an analogy. A full exploration reveals that ladder logic is composed of functions that operate on individual memory locations.

TL;DR: Some programming environments allow series-connected coils in ladder logic. This programming practice should be used sparingly with program clarity as the overriding design criterion.

Can we series connect coils in ladder logic?

This is a function of the development environment. Some, but not all, manufacturers allow this practice. An example using the Siemens TIA Portal is shown in Figure 1. Here we see a network for a state machine describing the logic for the closing state.

The upper part of the network presents the state next operations while the lower presents the output logic. In this case, the coils xCoilDrive, xValid, xBusy, and xFault are all connected in series. Set and reset coils are used because this state machine contains many similar networks, with each network determining the value for the coils. In the common language, this prevents the “last rung wins” problem associated with Output Energize (OTE) instruction. Recall that the OTE (normal coil) will always write to the target memory. By contrast, a set or reset coil will only write to memory when the left-hand conditions evaluate as true.

Figure 1: A Siemens TIA Portal ladder logic example with multiple series-conneted coils on a single rung.

Tech Tip: There are strongly held opinions on the use of set and reset coils. Some programmers will tell you to avoid them at all costs as they are very difficult to troubleshoot. Perhaps a better answer is to ensure that the set and reset coils are closely coupled to each other with UDFB encapsulation or at a minimum, place them on adjacent rungs.

Under no circumstances allow the pair to be split across multiple Program Organizational Units (POUs). I’ve seen people burn hours trying to understand the program and identify the subtle bug.

Tech Tip: Hungarian notation is useful to remind the programmer what data types are being used in a program. In Figure 1 we see the x prefix for Boolean variables, ui for unsigned integers, and the tim prefix for the time data type.

Should we series connect coils in ladder logic?

Yes, if the tool allows the technique, then yes, we can place ladder logic in series. However, just because a thing can be done, does not imply that is should be done.
The decision to series connect ladder logic coils ultimately depends on the application and the people who will interact with your program:

  • Clarity: Program clarity is one of the most important considerations. If series-connected coils improve program readability, then they should be used. Personally, I like the style shown in Figure 1 as it makes the network more compact allowing it to be seen in its entirety on a single screen.

  • Expectation: Technicians, installers, and future programmers expect a certain style for all programs. Most, but not all, expect to see a single coil per rung.

Education exception for series-connected coils

I recommend against using series-connected coils in an education setting. In my opinion, the student’s attention is already fractured by too many competing considerations. There is something to be said for program simplicity especially when it comes to troubleshooting. While there is value in troubleshooting, class time is precious, and it may be better to minimize the variety of problems. This same sentiment is applicable to the set and reset coils as described in the tech tip.

Tech Tip: Provide your students with a style guide that outlines your class expectations. This guide serves as a common focal point for all students. It will frame conversation for team projects. Tell them if series-connected coils are allowed in your class. Define the maximum rung distance between set and reset coils. Also provide examples of when things go wrong and how much time it takes to locate the little bugs.

Parting thoughts

Program clarity is one of the most important aspects of PLC programming. This is especially true when we consider the decades-long life cycle of the machinery. The decision to series connect coils is a small design consideration, but it may be used to frame a larger conversation to define quality code.

Please share your thoughts on this fun topic in the comments section.

Best wishes,

APDahlen

Related information

Please follow these links to related and useful information:

About this author

Aaron Dahlen, LCDR USCG (Ret.), serves as an application engineer at DigiKey. He has a unique electronics and automation foundation built over a 27-year military career as a technician and engineer which was further enhanced by 12 years of teaching (interwoven). With an MSEE degree from Minnesota State University, Mankato, Dahlen has taught in an ABET-accredited EE program, served as the program coordinator for an EET program, and taught component-level repair to military electronics technicians. Dahlen has returned to his Northern Minnesota home and thoroughly enjoys researching and writing articles such as this.

1 Like

Interestingly, I cannot think of a good reason to use series connected coils outside of purely cosmetic purposes. In almost all instances, it would be more useful to see plainly the variables the coil’s operation is dependent on. If there are multiple coils operating off of the same redundant logic, it would still be more useful to still see the individual variables to better narrow down the culprits when troubleshooting. If saving space or abstracting layers is the goal, function blocks already do well to fill this role.

I agree it is a cool concept in theory; however it seems to be a solution to a problem that already had more effective and adopted solutions. Unfortunately introducing out-of-standard features like this tend to cause more issue than they do solutions. Students may not understand why something isn’t working without having the proper understanding of how the cycle of ladder logic works (as you mention already), and a field technician might immediately identify it as a problem when trying to troubleshoot. (After all, Occam’s razor demands that such an abnormality should be first investigated.)

1 Like