Programming in motion

Case study: Automated Industrial Machinery (AIM Inc.) moved from an analog interface to servo amplifiers to a digital motion control network to reduce wiring and simplify programming. It used IEC 61131-3 compliant software and industry-standard PLCOpen function blocks. See examples.


AIM’s programmable CNC steel wire bending machines increase productivity and are simple to operate. Advanced servo technology enables the machines to operate at very high speeds without sacrificing accuracy and repeatability. AIM uses Yaskawa servo motorsMachines now use less wiring and easier motion control programming with code that can be reused. What's not to like? Automated Industrial Machinery (AIM Inc.) of Addison, Ill., is a leading producer of automated CNC wire-bending machinery. For as long as the company has been making machinery, AIM motion control solutions have relied on traditional motion controllers with an analog interface to the servo amplifiers. To drive down costs, AIM decided to investigate using a motion control network to reduce wiring.

AIM's machine uses servos to pull wire through a straightening mechanism and into a bending head, which is also servo-powered. The bending head can also be rotated about the wire to provide bends in three dimensions. Other optional functionality is also servo-driven. The motion control requirements were handled by a stand-alone non-networked controller programmed in a text-based language. The user would create a part program using AIM's SmartEditor software, which then generates the text program required by the controller. The controller controlled the servo with an analog torque signal, relying on encoder feedback for speed and position data. 

IEC 61131-3 programming, standard function blocks

AIM has used the same servo motors and amplifiers for many years and is very satisfied with the performance and dependability of the products. AIM wanted a networked control system, and the servo motor supplier developed a solution using a multi-axis controller that is programmed with IEC 61131-3 compliant software from the servo motor supplier. Industry-standard PLCOpen function blocks are used for motion control functions, along with programming toolboxes to add functionality. 

Programming preservation

AIM’s machine uses servos to pull wire through a straightening mechanism and into a bending head, which is also servo-powered. The bending head can also be rotated about the wire to provide bends in three dimensions. Yaskawa engineers created a special seThe first challenge was figuring out how to get data from the AIM SmartEditor to the servo controller, which isn't programmed in the same way as in the previous controller. The part program, with instructions to make the part, had to be transferred. The AIM SmartEditor also needs to be able to command the controller directly. This is used to do things like jog an axis, turn on an output, or start the part program.

Servo motor supplier engineers created a special set of IEC function blocks to accomplish these tasks and bundled them into a custom software library toolbox. 

Programming steps

To make the part program (the list of instructions needed to make a part), a custom program language was created for AIM's needs. After the user enters the data to define the part, SmartEditor generates a program similar to before, but in the new customer language. It is based on two-letter commands, such as MV to make a move, CT to cut the wire, or SV to set a variable to a particular value. A series of operands specific to the command follows the command code, each separated by a comma as a delimiter to make the command parsing simple. These commands were streamed over an Ethernet socket from SmartEditor to the controller, which parsed each line and stored the command and operands in an array. This custom language allows for great flexibility as complex sequences in the controller can be launched with one command.

When the user commands the controller to make a part, the array of commands is executed line by line to make the part. To do this, the Sequential Function Chart (SFC) language of the IEC 61131-3 standard is used. To call SFC a language is a bit of a misnomer; it's a sequence of actions and transitions that looks and acts much like a flowchart. Each action and each transition can be programmed in a different "standard" language like LD (ladder diagram), FBD (function block diagram), or ST (structured text), mixing and matching as the circumstance dictates.

When the user commands the controller to make a part, the array of commands is executed line by line to make the part. To do this, the Sequential Function Chart (SFC) language of the IEC 61131-3 standard is used. SFC is a sequence of actions and transitio

To execute the part program, an idle action waits for the start signal and then reads the first command in the program. Simple commands such as toggling an output can be done immediately within the idle action, but complex tasks like moves require more in-depth programming. In these cases, an internal variable is set that executes the particular branch of the SFC that performs the function. After the command is executed, the step number is incremented and the next line is executed. This repeats until the end of the program.

Direct commands work in much the same way, but are sent over a different Ethernet socket. Using two sockets makes it easy for the controller to determine which commands are for the program and which should be executed immediately. Monitoring information is sent back over these same two sockets: One provides continuous monitoring of machine status and performance, while the other provides on-demand monitoring of variable values.

Reusable toolbox of code

Sequential Function Chart (SFC) language of the IEC 61131-3 standard is used for programming: See other graphic. SFC is a sequence of actions and transitions that looks and acts much like a flowchart. Each action and each transition can be programmed in aSince the creation of the custom software library toolbox, other customers have express needs for similar control requirements. This application-specific reusable code can address these needs by providing the ability to interface with a previously existing PC program to provide the controller with the data it needs to operate the machine more effectively.

The result for AIM has been positive: "The increased product reliability and simplified wiring that the... controller offers translates to cost reduction," said Constantine Graspas, president of AIM. "Product quality, performance, and dependability, along with the quality engineering support for product development, have helped AIM to be ranked for the third year in the INC 5000 list of the highest growth companies in the USA," said Graspas.

- Mark Wilder is regional motion engineer, Yaskawa America Inc., drives and motion division. Edited by Mark T. Hoske, content manager, CFE Media, Control Engineering,


In June archives this article has links to other relevant information.

Key concepts

  • Machine builders can reduce complexity by using digital networking.
  • Programming is easier, more modular and reusable by using standards such as IEC 61131-3 and PLCOpen function blocks.
  • Sequential Function Chart (SFC) language (part of IEC 61131-3) incorporates other languages as needed.

Consider this

How could standard programming and easier networking help your machine design or use? 

ONLINE extra

This online posting of this June article contains other relevant machine control information below. 

The Top Plant program honors outstanding manufacturing facilities in North America. View the 2015 Top Plant.
The Product of the Year program recognizes products newly released in the manufacturing industries.
Each year, a panel of Control Engineering and Plant Engineering editors and industry expert judges select the System Integrator of the Year Award winners in three categories.
Pipe fabrication and IIoT; 2017 Product of the Year finalists
The future of electrical safety; Four keys to RPM success; Picking the right weld fume option
A new approach to the Skills Gap; Community colleges may hold the key for manufacturing; 2017 Engineering Leaders Under 40
Control room technology innovation; Practical approaches to corrosion protection; Pipeline regulator revises quality programs
The cloud, mobility, and remote operations; SCADA and contextual mobility; Custom UPS empowering a secure pipeline
Infrastructure for natural gas expansion; Artificial lift methods; Disruptive technology and fugitive gas emissions
Power system design for high-performance buildings; mitigating arc flash hazards
VFDs improving motion control applications; Powering automation and IIoT wirelessly; Connecting the dots
Natural gas engines; New applications for fuel cells; Large engines become more efficient; Extending boiler life

Annual Salary Survey

Before the calendar turned, 2016 already had the makings of a pivotal year for manufacturing, and for the world.

There were the big events for the year, including the United States as Partner Country at Hannover Messe in April and the 2016 International Manufacturing Technology Show in Chicago in September. There's also the matter of the U.S. presidential elections in November, which promise to shape policy in manufacturing for years to come.

But the year started with global economic turmoil, as a slowdown in Chinese manufacturing triggered a worldwide stock hiccup that sent values plummeting. The continued plunge in world oil prices has resulted in a slowdown in exploration and, by extension, the manufacture of exploration equipment.

Read more: 2015 Salary Survey

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.
The maintenance journey has been a long, slow trek for most manufacturers and has gone from preventive maintenance to predictive maintenance.
This digital report explains how plant engineers and subject matter experts (SME) need support for time series data and its many challenges.
This digital report will explore several aspects of how IIoT will transform manufacturing in the coming years.
Maintenance Manager; California Oils Corp.
Associate, Electrical Engineering; Wood Harbinger
Control Systems Engineer; Robert Bosch Corp.
This course focuses on climate analysis, appropriateness of cooling system selection, and combining cooling systems.
This course will help identify and reveal electrical hazards and identify the solutions to implementing and maintaining a safe work environment.
This course explains how maintaining power and communication systems through emergency power-generation systems is critical.
click me