Back to Blog
Education

Programming PLCs with Ladder versus other IEC 61131 Languages

Admin | December 28th, 2022

A Control Design reader recently submitted a question to the Endeavor Business Media publication asking for advice, “What’s the best programming language and infrastructure for control?”

Six industrial automation providers responded to the reader’s question. These companies include KEB America, Schneider Electric, Beckhoff USA, Omron Automation, Phoenix Contact USA, and SEW Eurodrive.

The consensus from the responders is that ladder plays an important role, but the adoption of IEC 61131-3 is future-proof. This coding style reduces development time, provides greater flexibility, and scales much more efficiently as machine complexity grows. Above all, companies will have an easier time hiring control engineers with low-code and no-code technology experience.

Below is Scott Cunningham’s, product and application manager at KEB America, response to the question. To read all responses, visit Control Design’s Real Answers page.

 

Programming PLCs_Ladder to Alternatives

 

Q.) We’ve been programming our PLCs with ladder as far back as I can remember. But we’re having trouble finding new blood. We’re also considering a control-system overhaul, so perhaps now is the time to shift to a PC-based control architecture.

If we stick with programmable controllers, are resources available for training new employees on ladder or other IEC 61131 languages?

We’ve heard that younger programmers are more comfortable with these languages. And I keep hearing about low-code/no-code. Is that even worth looking into? If we stick with programmable controllers, are resources available for training new employees on ladder or other IEC 61131 languages?

When PLCs were first introduced, machines were controlled by relays wired together, resulting in the term “relay logic.” PLCs offered an electronic version of relay logic, so providing a programming environment that mimicked relay wiring made sense. I remember a time or two running to inventory, grabbing a relay or two to latch a signal. Thankfully the days of fixing an incompatible signal with a relay are gone. Relays haven’t controlled machines in a very long time. Why program like they are?

While there are a few tech schools around that teach ladder to satisfy some local production facilities, most “programmers” coming out of colleges and technical schools are taught structured programming languages like C/C++/C#, Java/JavaScript, Python, and others. Each is slightly different in syntax (call it dialect), but they all have structured logic flow: decision queries (if/then/else), loops (for/next or while/wend), and assignments (let/set). Some also offer object-oriented programming (OOP), which breaks code into objects or things. Someone who can program in Python can also program in C or Java – only how you type the if/then/else changes. But to go from a structured language to ladder logic (relay logic) takes a lot of work and trial and error. Ask a graduate to write code for a start and stop button in Python (about 5 seconds) and then ask for a ladder solution (about 5 hours)!

Not all programming languages are suited for industrial machines. Some are more prone to code errors than others. Some are easier to debug than others. Additionally, some programming styles or techniques are easier to debug than others. If your machine has a bug, it needs to be solved immediately and not necessarily by the original developer. I often ask our new hires, “It’s Friday night at midnight, and the machine you helped program just stopped working and won’t restart. You are on vacation. Can your coworker figure out what is wrong looking at your code in 10 minutes?” KEB, along with many other manufacturers, has standardized on IEC61131-3 as the best choice for industrial controls.

IEC61131-3 defines several industrial programming languages: Structured Text, function block, instruction list, flow chart (continuous or sequential), and yes, even ladder. It even supports OOP. If you want to move away from ladder slowly, you can do that. If your management insists on having the main machine loop in ladder because that’s how it has been, you can do that. You can do that if you need part of the machine to counters/loops and complicated logic. If your new hire can program faster in Structured Text, they can do that.

IEC61131-3 does not define the hardware; you can find it on iPCs, PACs, and PLCs. You can still choose the hardware based on your actual machine performance need. Hardware and brand portability are huge benefits for machine builders that standardize on IEC61131-3 languages in this day and age of supply chain issues. Take your code (even ladder) from brand A to brand B without rewriting everything. Move from a PLC to a PAC or IPC; update the device.

If you want machine programmers that can bring your company forward quickly, use controllers that support IEC61131-3. They will contribute faster with less training.

Contact Us

Let's Work Together

Connect with us today to learn more about our industrial automation solutions—and how to commission them for your application.

  • This field is for validation purposes and should be left unchanged.