Model-based design tools write control software for industrial equipment

Approached by a wind turbine manufacturer about a year ago, engineers at Rockwell Automation were asked, “Can you get ControlLogix to run C code?” Meanwhile, Matlab and Simulink software from The MathWorks Inc. was generating C, C++, VHDL and Verilog code from models, which would be run on PC-based control systems.

04/01/2010


Simulink PLC Coder from The  MathWorks lets users create model-based designs in Simulink (left) that  become IEC 61131-3 structured text at the touch of a button (center).  RSLogix takes that text and produces executables for machines controlled  by Rockwell Automation PLCs.

Simulink PLC Coder from The MathWorks lets users create model-based designs in Simulink (left) that become IEC 61131-3 structured text at the touch of a button (center). RSLogix takes that text and produces executables for machines controlled by Rockwell Automation PLCs.

Approached by a wind turbine manufacturer about a year ago, engineers at Rockwell Automation were asked, “Can you get ControlLogix to run C code?” Meanwhile, Matlab and Simulink software from The MathWorks Inc. was generating C, C++, VHDL and Verilog code from models, which would be run on PC-based control systems. Following a few months of integration and negotiation between the companies, The MathWorks developed a tool to transform its model-based designs into code for programmable logic controllers (PLCs) called Simulink PLC Coder.

 

 

The MathWorks software is used to design, simulate, test and validate complex mechatronic systems built on PC-based controls. Development involves creating models that capture electrical, mechanical, controls and process parameters in block diagrams and algorithms that show the interrelationships. As the models are run, the software creates plots and captures data that generates code for algorithms, and also generates code for test cases. This lets machine builders test and validate system design before generating executable code for a specific hardware platform, such as microcontrol units (MCUs) and field programmable gate arrays (FPGAs).

 

The MathWorks doesn’t handle the executable code portion of the process. “We don’t produce compilers,” said Tom Erkkinen, Simulink PLC Coder product manager for The MathWorks, “so we needed Rockwell to get us to the hardware. PLCs are a unique animal, but given our software architecture, it was fairly easy to leverage our coder for a new language. That means it’s not a version 1 coder. Its roots go back to 1992.”

 

The hardware, in this case, is ControlLogix PACs using RSLogix 5000 software. Simulink PLC Coder takes the Matlab or Simulink algorithms and generates IEC 61131 structured text (ST). RSLogix 5000 takes ST and produces an executable for the PLC. “It also produces 'hooks’ that link back to the algorithms, which show that the model matches the executable code generated, as well as [produces] code for test cases,” said Weber. “Once in RSLogix, I can compare test case results. Now I know that what I implemented matches my model.”

 

Benefits of such model-based design include:

 

  • Speeds design, testing, improvement, implementation, deployment, and upgrade of any PLC-based machine, cutting out many duplicative steps along the way.

  • Preserves engineering and intellectual assets as information flows from individuals or departments involved with design, simulation, testing, and engineering/operations;

  • Saves money by identifying and addressing design flaws or coding errors earlier in the process.

  • Builds in validation steps as design progresses, especially useful for high-speed machine applications;

  • Lets machine builders do design iterations in hours rather than days;

  • Eliminates documentation time, as the software automatically generates documentation;

  • Allows library creation for faster designs later, or improvements on current design more quickly and simply (matrix multiplication can be done in one or two lines of code in Matlab versus 100 or 200 lines of code in C or ST);

  • Can port model-based simulations to other targets in other languages (such as C and HDL) using related tools;

 

The Rockwell/MathWorks agreement is the latest in a series of Rockwell Automation software supplier partnerships. Other partnership companies include Dassault Systemes and ePlan.

 

www.rockwellautomation.com

 

www.mathworks.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.