Choose the right programming language

Which language should you choose for use with your programmable controller? Among the five languages defined in IEC 61131-3, generally ladder diagrams or ladder logic is most widely applied in North America. Other languages have practical applications and should not be overlooked. Choice depends on programmer's skill, the programming task, the level and structure of the problem and control syst...

07/01/2003


Which language should you choose for use with your programmable controller? Among the five languages defined in IEC 61131-3, generally ladder diagrams or ladder logic is most widely applied in North America. Other languages have practical applications and should not be overlooked. Choice depends on programmer's skill, the programming task, the level and structure of the problem and control system, who needs to interact with the program, and, perhaps, how often it's modified.

Since inception in 1992, PLCopen has helped promote and support programming standards, which allows, the association says, for less training, more logical organization, modularization, and use of modern software techniques. "Each program is structured, increasing its reusability, reducing errors, and increasing programming and user efficiency," according to the group.


Four languages describe the same piece of code.

"Also, the standard allows two ways of developing your program: top down and bottom up. Either you specify your whole application and divide it into subparts, declare your variables, and so on. Or you start programming your application at the bottom, for instance via derived functions and function blocks. Whichever you choose, the development environment will help you through the whole process," PLCopen says.

The five elements of IEC 61131-3 are:

  • Sequential function charts (SFC)—Rather than a language, SFC is more of a graphical method of organizing control programs.

  • Ladder diagram (LD)—most used in North America, it graphically represents rungs of contacts, coils, and special instruction blocks. Its origin is relay-ladder logic.

  • Instruction list (IL)—a text-based language similar to assembler. This is the European counterpart to LD.

  • Structured text (ST)—a text-based language similar to Pascal.

  • Function block diagram (FBD)—a graphical language corresponding to a circuit diagram. FBD is widely used in process industries.

Other resources

Several IEC standards provide more information about function blocks: IEC 61499 and IEC 61804, which focuses on the process industry. Function blocks encapsulate algorithms so they can be more easily understood and applied by those who aren't software specialists.

For more on function blocks, see www.controleng.com/issues , 2002, September, "Component Automation Enables Modeling and Control." Also, in the August 2003 issue, look for an article on multiple-platform programming software. See related items at www.controleng.com/tutorials.

IEC, at www.iec.org , publishes "Programmable controllers - Part 3: Programming languages." IEC 61131-3 "specifies syntax and semantics of programming languages for programmable controllers as defined in part 1 of IEC 61131." Price is about $205. A related IEC publication is "Programmable controllers - Part 8: Guidelines for the application and implementation of programming languages."

PLCopen, at www.PLCopen.org focuses on control programming and participates on technical committees to evolve programming standards.

Comments email MHoske@cfemedia.com



Pros and cons of IEC 61131-3

Benefits and drawbacks of IEC 61131-3 include the following, according to Wolfgang Langer, Schneider Electric software product manager:

Benefits are:

Less retraining costs—IEC looks and feel similar among vendors;

Greater focus on problem solving and software reusability;

Fewer misunderstandings and errors in programming when switching between languages; all IEC languages work the same; and

Greater community—many tools from independent suppliers can be used. PLCopen drives IEC standard with vendors to comply with interoperability standard.

Drawbacks include:

Too many optional features;

Does not define implementation limitations for the size of a page value to define a program;

Doesn't define the minimum of subsets needed to implement;

Doesn't define minimum limitations while implementing, such as how many rungs must be supported in one section; and

Doesn't define conversion among languages.

David Greenfield dgreenfield@reedbusiness.com



No comments
The Top Plant program honors outstanding manufacturing facilities in North America. View the 2013 Top Plant.
The Product of the Year program recognizes products newly released in the manufacturing industries.
The Leaders Under 40 program features outstanding young people who are making a difference in manufacturing. View the 2013 Leaders here.
The new control room: It's got all the bells and whistles - and alarms, too; Remote maintenance; Specifying VFDs
2014 forecast issue: To serve and to manufacture - Veterans will bring skill and discipline to the plant floor if we can find a way to get them there.
2013 Top Plant: Lincoln Electric Company, Cleveland, Ohio
Case Study Database

Case Study Database

Get more exposure for your case study by uploading it to the Plant Engineering case study database, where end-users can identify relevant solutions and explore what the experts are doing to effectively implement a variety of technology and productivity related projects.

These case studies provide examples of how knowledgeable solution providers have used technology, processes and people to create effective and successful implementations in real-world situations. Case studies can be completed by filling out a simple online form where you can outline the project title, abstract, and full story in 1500 words or less; upload photos, videos and a logo.

Click here to visit the Case Study Database and upload your case study.

Bring focus to PLC programming: 5 things to avoid in putting your system together; Managing the DCS upgrade; PLM upgrade: a step-by-step approach
Balancing the bagging triangle; PID tuning improves process efficiency; Standardizing control room HMIs
Commissioning electrical systems in mission critical facilities; Anticipating the Smart Grid; Mitigating arc flash hazards in medium-voltage switchgear; Comparing generator sizing software

Annual Salary Survey

Participate in the 2013 Salary Survey

In a year when manufacturing continued to lead the economic rebound, it makes sense that plant manager bonuses rebounded. Plant Engineering’s annual Salary Survey shows both wages and bonuses rose in 2012 after a retreat the year before.

Average salary across all job titles for plant floor management rose 3.5% to $95,446, and bonus compensation jumped to $15,162, a 4.2% increase from the 2010 level and double the 2011 total, which showed a sharp drop in bonus.

2012 Salary Survey Analysis

2012 Salary Survey Results

Maintenance and reliability tips and best practices from the maintenance and reliability coaches at Allied Reliability Group.
The One Voice for Manufacturing blog reports on federal public policy issues impacting the manufacturing sector. One Voice is a joint effort by the National Tooling and Machining...
The Society for Maintenance and Reliability Professionals an organization devoted...
Join this ongoing discussion of machine guarding topics, including solutions assessments, regulatory compliance, gap analysis...
IMS Research, recently acquired by IHS Inc., is a leading independent supplier of market research and consultancy to the global electronics industry.
Maintenance is not optional in manufacturing. It’s a profit center, driving productivity and uptime while reducing overall repair costs.
The Lachance on CMMS blog is about current maintenance topics. Blogger Paul Lachance is president and chief technology officer for Smartware Group.