Design World

  • Home
  • Technologies
    • 3D CAD
    • Electronics • electrical
    • Fastening & Joining
    • Factory automation
    • Linear Motion
    • Motion Control
    • Test & Measurement
    • Sensors
    • Fluid power
  • Learn
    • Ebooks / Tech Tips
    • Engineering Week
    • Future of Design Engineering
    • MC² Motion Control Classrooms
    • Podcasts
    • Videos
    • Webinars
  • LEAP AWARDS
  • Leadership
    • 2022 Voting
    • 2021 Winners
  • Design Guide Library
  • Resources
    • 3D Cad Models
      • PARTsolutions
      • TraceParts
    • Digital Issues
      • Design World
      • EE World
    • Women in Engineering
  • Supplier Listings

Coming soon: IEC 61131-3 on groov EPIC

By Sponsored Content | November 30, 2018

Share

As the “P” in EPIC implies, we are adding more Programming options to groov EPIC in the near future.  Our goal is for this Controller to be truly EPIC, and give developers and engineers multiple programming options on an Edge device, in addition to PAC Control, C/C++, Python, and more that’s already available.  So, it’s time to get excited about the future of EPIC, and discuss how developers will soon be able to get creative by using an IEC-61131-3 tool set for their applications.

Many automation engineers are familiar with the IEC 61131-3 standard, though you might not know it by that name. If you use ladder logic, you may be using one of the languages the standard defines.

Developed by the International Electrotechnical Commission (IEC), the standard defines the five accepted basic software architecture and programming languages of PLC control programming.

Of these five, one (Instruction List) has already been deprecated in the 3rd edition (61131-3). That leaves us with four languages, three graphical and one textual:

  • Function Block Diagram (FBD)
  • Structured Text (ST)
  • Sequential Function Charts (SFC)
  • Ladder Diagram (LD)

Each language has its basic functions, its strengths and weaknesses, and its detractors and evangelists.

Let’s run down a short history of each language and its intended use, and then I’ll attempt to compare their strengths and weaknesses. I say attempt, as these strengths and weaknesses are based not only on obvious characteristics to anyone using them, but also on my opinions after using them for last 13 years.

And I’ll give you some example code for each language, based on the great programmer William Shakespeare and his most famous line of code, “To be or not to be: that is the question.” I’ve modified the line to fit the context of our discussion, which is implementing the IEC61131-3 languages using the Codesys platform on Opto 22’s new groov EPIC (edge programmable industrial controller).

Ready?

Function Block Diagram

Function Block Diagram (FBD) is the graphical connection of Boolean and function elements.  This language feels a little like Ladder, but looks and feels more like something you would make using computer hardware gates (AND, NAND, OR, NOR, XOR…).

FBD is meant to simplify what would normally be a long sequence of code and commands, and block them so that it is easy to see the program flow and understand its functionality. This can be a powerful tool for creating large control structures. On the other hand, it can be complicated to troubleshoot, as the blocks can hide code, or there may be numerous custom blocks that complicate matters.

Here’s how our famous line of code looks in FBD:

Structured Text

Structured Text (ST) is a high-level language typically formatted to resemble Pascal. It is different from all the other languages because it isn’t graphical; it’s text-based.

ST can be more difficult to write and more difficult to troubleshoot, unless you’re familiar with software programming. Documentation (//code comments) are key in understanding it, whereas the graphical languages tend to be more obvious in use.

That said, ST is one of the more powerful languages, as it performs complex mathematics, iteration loops, and conditional statements with ease.

The question in ST:

Sequential Function Charts

Sequential function charts (SFC) are like the Opto 22 flowcharting language, PAC Control. SFC is a language that’s easy to read from a high level and performs very well while doing continuous batch processing tasks.

SFC can be deceiving in its use, as it usually relies on some form of structured text buried within script blocks to handle the actual legwork of the program. As with the other graphical languages, it is relatively easy to troubleshoot, as long as the syntax is documented and correct.

Here’s how SFC looks:

Ladder Diagramming

Last, but not least in the eyes of most controls engineers, is Ladder Diagramming (LD). The most basic of all the languages, it was designed to perform Boolean logic in a format that is easily readable to anyone who has seen a typical electrical diagram.

LD mimics the original relay logic control panels that were the physical precursor to the modern PLC. It has significant popularity in the US, but it is often overused, and people will try to perform complex loops, mathematics, and batching using various tricks, which negate all the simplistic advantage of using it.

And finally, our question in LD:

Opto 22 will be utilizing the Codesys package for its 61131-3 implementation on the groov EPIC to give programmers all the tools they need to complete projects. As you can see from the above diagrams, you can accomplish the same goal using any one of the tools available in the controls environment.

But as the proverb goes, use the right tool for the job. Or as the American psychologist Abraham Maslow said, “If all you have is a hammer, everything looks like a nail.”  Of course you can use any tool, but it may lead to an inelegant solution. It’s better to weigh the pros and cons of each tool prior to using them.

So think before you program, and use the appropriate tool for each application, or the appropriate set of tools if you have many different functions to perform. Using each language in concert for the appropriate function shows that a project is efficient and optimized.

And programmers will have access to a Swiss Army knife of languages for use with EPIC in the near future.


Filed Under: Opto 22 Sponsored Content
Tagged With: Opto 22
 

Related Articles Read More >

Monitor machine health with precise power data
Introduction to JSON for Node-RED
How to use context storage in Node-RED
Flexible, low-cost water monitoring with edge I/O

DESIGN GUIDE LIBRARY

“motion

Enews Sign Up

Motion Control Classroom

Design World Digital Edition

cover

Browse the most current issue of Design World and back issues in an easy to use high quality format. Clip, share and download with the leading design engineering magazine today.

EDABoard the Forum for Electronics

Top global problem solving EE forum covering Microcontrollers, DSP, Networking, Analog and Digital Design, RF, Power Electronics, PCB Routing and much more

EDABoard: Forum for electronics

Sponsored Content

  • Renishaw next-generation FORTiS™ enclosed linear encoders offer enhanced metrology and reliability for machine tools
  • WAGO’s smartDESIGNER Online Provides Seamless Progression for Projects
  • Epoxy Certified for UL 1203 Standard
  • The Importance of Industrial Cable Resistance to Chemicals and Oils
  • Optimize, streamline and increase production capacity with pallet-handling conveyor systems
  • Global supply needs drive increased manufacturing footprint development

Design World Podcasts

June 12, 2022
How to avoid over engineering a part
See More >
Engineering Exchange

The Engineering Exchange is a global educational networking community for engineers.

Connect, share, and learn today »

Design World
  • Advertising
  • About us
  • Contact
  • Manage your Design World Subscription
  • Subscribe
  • Design World Digital Network
  • Engineering White Papers
  • LEAP AWARDS

Copyright © 2022 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Design World

  • Home
  • Technologies
    • 3D CAD
    • Electronics • electrical
    • Fastening & Joining
    • Factory automation
    • Linear Motion
    • Motion Control
    • Test & Measurement
    • Sensors
    • Fluid power
  • Learn
    • Ebooks / Tech Tips
    • Engineering Week
    • Future of Design Engineering
    • MC² Motion Control Classrooms
    • Podcasts
    • Videos
    • Webinars
  • LEAP AWARDS
  • Leadership
    • 2022 Voting
    • 2021 Winners
  • Design Guide Library
  • Resources
    • 3D Cad Models
      • PARTsolutions
      • TraceParts
    • Digital Issues
      • Design World
      • EE World
    • Women in Engineering
  • Supplier Listings