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 Engineers' Choice Awards highlight some of the best new control, instrumentation and automation products as chosen by...
The System Integrator Giants program lists the top 100 system integrators among companies listed in CFE Media's Global System Integrator Database.
The Engineering Leaders Under 40 program identifies and gives recognition to young engineers who...
This eGuide illustrates solutions, applications and benefits of machine vision systems.
Learn how to increase device reliability in harsh environments and decrease unplanned system downtime.
This eGuide contains a series of articles and videos that considers theoretical and practical; immediate needs and a look into the future.
Additive manufacturing advancements; Machine vision enhances robotics; Fieldbus evolution; Process safety; Advice from System Integrators of the Year; Road to IANA
Salary and career survey: Benchmarks and advice; Designing controls; Remote data collection, historians; Control valve advances; Hannover Messe; Control Engineering International
System integration: Best practices and technologies to help; Virtualization virtues; Cyber security advice; Motor system efficiency, savings; Product exclusives; Road to Hannover
This article collection contains several articles on the Industrial Internet of Things (IIoT) and how it is transforming manufacturing.
PLCs, robots, and the quest for a single controller; how OEE is key to automation solutions.

Find and connect with the most suitable service provider for your unique application. Start searching the Global System Integrator Database Now!

The digital oilfield: Utilizing Big Data can yield big savings; Virtualization a real solution; Tracking SIS performance
Getting to the bottom of subsea repairs: Older pipelines need more attention, and operators need a repair strategy; OTC preview; Offshore production difficult - and crucial
Digital oilfields: Integrated HMI/SCADA systems enable smarter data acquisition; Real-world impact of simulation; Electric actuator technology prospers in production fields
click me