System design: Agile programming streamlines software development

Agile programming helps identify and prioritize programming tasks in need of attention and address them one at a time. This involves some research, coding, and especially testing, and aims to streamline the code development lifecycle to enhance future machine designs.

07/11/2013


Figure 1: TwinCAT Simulation Manager: With the recent release of TwinCAT 3, Matlab/Simulink can be used as a simulation system that’s integrated into the main automation software platform. Courtesy: Beckhoff AutomationIn the lifecycle of a machine from inception through implementation, code can be effectively developed and tested through simulation. The right programming tools are essential to simplify design, especially as functionalities are integrated. Virtual reality machine design and modeling environment described below may be available in the future.

Future of machine design

After arriving at work, you position your chair and put on your virtual reality glasses and gloves. You start designing by asking for material such as “A10,” then stretching it to the desired size, continuing with other virtual parts until the whole machine is designed. The machine looks good as it rotates in front of you, but now comes the fun part. By selecting machine pieces and describing how they move, you can simulate how the machine will operate on the plant floor. Once satisfied, a verbal command will yield assembly/detail drawings and code for the machine controller. The end product is also a model, not just a machine design. It can be used to predict operations when using different product elasticity or weight, for instance.

Figure 2: Matlab/Simulink simulation of a temperature controller viewed from TwinCAT 3: The following figure shows a simulation of a pallet transfer system developed in TwinCAT. Pallets are grouped as they travel through the process. Simulation resolves the challenge of how to move an incoming pallet, have it catch up with the other pallets before the process starts positioning, and avoid bumping the other pallets. Courtesy: Beckhoff Automation

When virtual reality machine design and modeling is possible, you might feel like you’re in an aerobics class rather than an engineering office, but for now, we still use software products that are a little less sci-fi to accomplish our design goals. Development, simulation, and modeling software tools are generally implemented in separate packages. The package count increases because the engineering disciplines, such as mechanical, electrical, and control, frequently have their own dedicated software.

Goal: Easier programming

As a programmer, my primary goal is to make innovative machines that offer outstanding performance, and for this I use every trick in the book. One trick is to start with a framework that already has time-saving features such as error handling and recipe management. This frees up my time to concentrate on the machine-specific issues, and for those I use agile programming. The term “agile programming” means identifying and prioritizing programming tasks that are in need of attention and addressing them one at a time. This involves some research, coding, and especially testing.

Figure 3: Simulation of a pallet transfer system, a rotating wheel with a tool. Products enter at random intervals so the tool must re-synchronize for each product and the position of the re-synchronization must be shifted down with the incoming product.

Users can simplify research, coding, and testing with Beckhoff’s TwinCAT software, to develop automation system code and test it by simulating how it will work on production machinery. This results in proven code that’s ready to automate the machine as soon as it’s assembled.

After all, machine start-up should be a commissioning effort by adjusting sensors and timers, rather than a software debug effort with major code rewrites. The software also can assist in “rapid control prototyping,” which consists of several steps:

  • Creation of a model of the system to be automated
  • Design of the controller
  • Simulation of the entire system
  • Implementation of the controller design on the target platform
  • Test of the implementation by coupling the target platform to the system model, “software in the loop” (SIL) 
  • Test of the real system with the real controller.

Figure 4: Simulation of a rotating wheel with a tool illustrates how code can be effectively developed and tested through simulation. Courtesy: Beckhoff AutomationTools can assist in simulation. The TwinCAT Simulation Manager simplifies configuration of a simulation environment, which integrates into the TwinCAT system environment. This tool supports the creation of a “virtual machine,” which corresponds to a real one in its runtime performance. In the lifecycle of a machine from inception through implementation, the right programming tools are essential.

- Gary Kirckof is application engineer manager at Beckhoff Automation. Edited by Mark T. Hoske, content manager, CFE Media, Control Engineering, mhoske(at)cfemedia.com.

ONLINE

www.beckhoffautomation.com/TwinCAT3 



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.