Why use ladder logic?

In today’s digital world there exists a plethora of different programming languages and representations of the logic behind them. From plaintext word structures on a black and white window to elaborate simplified code blocks in a beautiful program, if one needs to think about functions a certain way, there is a representation to fit those needs. So where does ladder logic fit as a representation? Simple - relay activation. In fact, many times where ladder diagrams exist you will see it referred to as RLL, or Relay Ladder Logic.

The structure gains this name from using contacts and functions on ‘rungs’, or lines of logic performed in sequence from left to right, to activate or inactivate coils. This then cascades into more logic functions, in which a single thing can drive multiple others, or vice versa. The left to right nature of the sequences on the rung, with the lower rungs being performed after the previous rungs (creating a ‘last rung wins’ hierarchy), allows it to be easily read and understood at glance. When used appropriately and done correctly, it proves near invaluable for a field technician attempting troubleshoot an issue.

Ladder logic programming is mostly seen in the industrial environment where safety relays are abundant, meaning anywhere there may be multiple voltage sources powering devices such as motors, pneumatic, and hydraulic, and other automated systems. Because Programmable Logic Controllers (PLC) are robust devices designed to work in this exact type of environment, ladder logic had become nearly synonymous with PLCs. However, over time automated systems have become much more complicated in line with the tasks they perform. This is where ladder logic’s flaw becomes quite apparent.

The programming language starts to fall apart when the ease of displaying the logic is negated by the complexity of the program itself. At a certain point, the scrolling through screens and bouncing between sections of the program required to follow the sequences of events introduces more time cost as well as allows for more error potential. Trying to simplify the program may end up sacrificing necessary precision, but sequencing everything out on rungs may make the program unreadable. Does this then mean that ladder logic is becoming obsolete as a language as processes become more complicated? Absolutely not!

Although programmers today encounter the weaknesses in ladder logic, the benefits it brings are hard to ignore. The compromise for this is utilizing multiple language representations at the appropriate levels. This is done by creating the complicated functions that are not necessarily driven by the inputs/output in a better language (for instance Structured Text) and instantiating it as a function block to be used in the ladder logic. This creates the best of both worlds - precise functionality designed specifically for system without compromise that can also be quickly and easily understood by a troubleshooting technician.


Wow!! Thank you!!