Software-Based Motion Delivers Performance, Flexibility
by Kristin Lewotsky, Contributing Editor
Motion Control & Motor Association
In manufacturing today, everyone wants more throughput, more speed, more flexibility, and more performance. For every application that can be served effectively with a garden-variety programmable-logic controller (PLC) or motion controller, there exist others that need functionality not available from these solutions. That has led to an increasing focus on software-based motion. Once considered an answer for only the most specialized applications, software-based motion is rapidly becoming a go-to solution for many high-performance applications.
For many years, PLCs dominated the control space. PLCs excel at tasks like counting, timing, managing I/O, and other general machine-control tasks. Initially, they could handle a few axes of motion but nothing too complex or highly synchronized. More demanding applications required the addition of a dedicated motion controller. Over the past several years, the lines have been blurring and specialized PLCs can now manage highly synchronized motion while some motion controllers can handle dozens of I/O points, eliminating the need for a separate machine controller.
Dedicated motion controllers and motion-enabled PLCs are purpose built and very efficient at specific tasks. Those very features limit their flexibility however. Customization is not impossible, but it can be both challenging and time-consuming. These devices also have limited bandwidth and because they often use application-specific integrated circuits (ASICs) or digital signal processors (DSPs), they tend to have slow product upgrade cycles. Software-based motion control provides an alternative. Leveraging processor advances for the general computing market, software-based motion delivers high degrees of performance, customization, and flexibility.
“Software-based motion control is more economical and it is higher performing than traditional solutions,” says Jason Goerges, general manager of ACS Motion Control (Bloomington, Minnesota). “A PC leverages an Intel designed and produced processor, which is much more powerful and much more efficient than any processor that was designed by a motion-control company.”
In software-based motion, the programming determines functionality. In general, software-based motion uses motion algorithms written in some version of motion scripting language, typically C/C++ or Visual Basic. This is what enables the technology to operate on any digital computing platform. Control commands are created and sent via software, not hardware. As a result, the approach can be used to solve complex motion problems that would be both time-consuming and challenging to implement with conventional means.
Consider a system that needs to update its trajectory based on an input variable. The I/O needs to be filtered at high speed, then on the results, the controller will make a decision and update the next point in the motion profile accordingly. “This type of project was very hard before because you would have to do the logic on your PLC, make a decision and send a trigger, making sure you didn’t have too much latency in the control loop or the communication method between PLC and motion system,” says Nate Holmes, R&D group manager for motion control at National Instruments (Austin, Texas). Problems arose when the standard function set of the motion controller couldn’t handle the timing or type of input signal. “You had to use specialized techniques and trickery to get the various components on the PLC side and the motion controller side synchronized and working correctly,” he adds. “With soft motion, it’s much easier because all those tasks are customizable and running in the same application software on your controller.”
Smart Drives and Connectivity
Several developments created the conditions for software-based motion control. The first was the emergence of digital bus interfaces. Digital networking replaces point-to-point analog wiring with a single digital fieldbus that enables large numbers of components to communicate at high speeds. Common protocols include EtherCAT, Ethernet/IP, and ProfiNET.
The second factor responsible for the move toward software-based motion was the emergence of the smart drive. In traditional systems, the motion controller sends an analog signal to the drive, which is responsible for closing the torque loop. The supervisory control and velocity control loops are closed by the motion controller. This architecture requires cabling for each axis to connect motor to drive to controller. Especially for large machines and high axis counts, such cabling ads substantially to cost, complexity, and points of failure. The smart drive provides a solution.
Smart drives incorporate microprocessors and onboard memory to significantly increase capabilities. The result is a drive that can close the torque, position, and velocity loops as well as offer safety functionality. In addition, some smart drives now provide sets of configurable digital I/O to communicate with other devices in the system.
Smart drives and connectivity opened the way to distributed control architectures. Instead of residing in the control cabinet next to the controller, smart drives can be hung out on the machine near the motor and daisy chained together in master-slave architectures for more sophisticated multi-axis motion. Point-to-point wiring between drives and motors can now be replaced by a single Ethernet cable. This is particularly meaningful in the case of power and I/O cables, which can be very expensive. Although smart drives are more expensive than traditional drives, the price bump is modest, and offset by the reduction in cabling costs.
Jerry Leitz, director of field engineering at Interval Zero (Waltham, Massachusetts) credits one more factor with paving the way for software-based motion: processor speed. “I think what happened is that PCs got much faster,” he says. “Suddenly, multiplying two fractions was as fast or faster than multiplying two integers. That was a game changer. Suddenly your software was able to do the job.”
The Many Faces of Soft Motion
Various implementations have evolved to serve different needs. Probably the simplest version is a PLC running a soft-motion algorithm. That doesn’t seem to fit with a progression toward PC-based controls, but PLCs are essentially just ruggedized digital computers, many of them based on x86 processors. They are just as capable of running the soft motion algorithm as a commodity PC is; they just have limited speed and compute power. In these areas, PCs offer greater scalability.
Although PC-based motion is a commonly used term, some industry experts, including Holmes, dislike it because of its association with personal computing and Windows machines. In reality, Windows is a poor choice of operating system for soft-motion applications. Software-based motion needs a platform that delivers reliable, deterministic performance. That requires a real-time operating system (RTOS). The hardware has to be robust and high performance, as well. Although the price points for commodity PCs may be appealing, successful industrial controls require ruggedized machines equipped to survive harsh environments.
“You can’t just grab a Windows PC, write an application, deploy it, and expect to have a system that will reliably perform standard automation tasks or coordinated motion,” says Holmes. “Those tasks require components such as supervisory control and drive communication, for example, that have to run deterministically somewhere.”
A common solution for software-based motion is to start with a multi-core processor, scrubbing Windows off of one of the cores and installing an RTOS. That core handles the motion while the core running Windows can manage tasks like running the HMI (see figure 1). The two can communicate over TCP/IP and shared memory. If the Windows core crashes, it will not affect motion-control operations.
This type of soft controller can be used in conjunction with a traditional PLC for machine control. Alternatively, a second computer or different core can be used to implement a software PLC. Now, all control aspects are executed in software.
Software-based motion implementations using PCs vary. In addition to the types described above, an x86 motherboard can be installed in a standalone product and configured to run a soft-motion algorithm. The housing and form factor differ but the performance is the same. Conversely, a PC can execute software-based motion using various types of accelerators such as DSPs or graphics processor units (GPUs), although this brings us back toward hardware and fixed-function territory. Finally, for the most demanding applications, field-programmable gate arrays (FPGAs) provide a software-programmable embedded computing solution (see figure 2).
With PC-based systems, a good security strategy is essential. With the rise of the visible factory, equipment needs to be connected to the Internet. That’s a risk for any networked component but PCs are uniquely vulnerable to malware. The core with the RTOS may be safe, but what about the Windows-based core? If the two communicate, as they frequently do, provisions need to be put in place for secure communications.
Software-Based Motion in Action
Software-based motion can do the job across many applications but really shines in applications with complex requirements, tight tolerances, and highly synchronized motion. They are good fits for precision XYZ stages used in test for semiconductor fabrication, for example.
The technology can be used for precision testing of large physical systems, such as strain testing of aircraft parts. This application requires positioning very large parts and applying precise amounts of force while simultaneously gathering data. “We are able to synchronize that information closely together and we have advanced analog capabilities which a lot of PLC manufacturers don’t have in order to take high accuracy, high precision analog measurements,” says Chris Johnson, motion product manager for National Instruments.
Software-defined motion is a good fit for systems with very high axis counts. Dedicated motion controllers designed for a set number of axes may only be able to store configuration data for that access count, or may have insufficient memory and processing power to support more than the specified number. Software-based motion solutions combining smart drives, industrial Ethernet, and soft-motion algorithms can scale to high axis counts with minimal cost increase.
This type of architecture supports sophisticated control schemes. Leitz describes an electronics assembly line with a conveyor belt that runs past 20 stations, each of which needs to add parts at specific intervals. Basically, 20 axes need to be synchronized with a single master axis. “The only way you can do that in hardware is to take the encoder of the so-called master and hardwire it to whatever board one of the followers has to be on,” says Leitz. “That’s a nightmare.” Contrast that with a software-based motion system implemented using EtherCAT. Data gets passed sequentially to all 21 axes over the full-duplex bus, with cycle times of 500 µs or less. “Now, the software knows the exact position of all 21 servos. So if axis five needs to know where axis 17 is for some sort of gearing reason, he just asks him and gets the answer. Axis five can make a decision. That is a huge factor.”
It is possible to synchronize large numbers of axes by establishing a so-called phantom axis. A phantom axis is a virtual axis that runs at a constant speed. All of the other axes in the system are electronically geared to the phantom axis. “All you have to do is tell the phantom to start and stop and your whole machine runs in this great synchronized motion,” says Leitz. “You wouldn’t do that with a DSP-based controller because you’d be wasting a whole axis. But in software, it’s free.”
For a final example, we turn to a developing trend in industry: consolidating multiple machines or modules on a single controller. Consider a piece of semiconductor equipment that produces finished circuit boards. They pass to a separate conveyor with a vertical stacker that accepts magazines. With traditional technology, each machine or module would have its individual controls that would need to be integrated to synchronize motion. Software-based motion control can do more than simply synchronize operations of the two machines. The controls themselves can be collapsed together.
The primary machine would have a PC running a soft-motion algorithm and communicating with smart drives via an Ethernet cable. As long as the stacker is equipped with smart drives, integrating it with the primary machine is simple and quick-connect the two pieces of equipment by Ethernet cable and load a separate soft-motion program into the computer of the primary machine to run the stacker. “That’s it. In some ways they are two machines just because there are two pieces of software but that software is located on the same computer and both programs are talking to the same soft motion library,” says Leitz. “If you can take another machine and simply populate it with motors and amplifiers but no PC, no DSP, no monitor, you can save a tremendous amount of money.”
Is it right for you?
As always in engineering, there is no perfect solution. Software-based motion control is not a good fit if the required control loop rate is faster than the achievable communication loop rate on the deterministic digital bus used for communication between drives and controller. In this case, the application would require a custom solution. At the other end of the spectrum, a very common application probably already has a low-cost standard solution. Application-specific controllers tailored to robotics and CNC machines, for example, are designed to simplify programming and use of the equipment. It’s not that software-based soft motion can’t be used to accomplish the same thing but it would not be an efficient or cost-effective solution; unless the application requires functionality not available from a standard robotics or CNC controller. In the latter case, software-based motion might be a very good fit.
“If it doesn’t fit or they need to extend it in ways the vendor doesn’t support, soft motion becomes really appealing because you can start customizing and extending without starting from scratch,” says Holmes. “Soft motion gives you this kind of middle ground starting point. A lot of the infrastructure and architecture of the machines and control loops and interfaces are taken care of for you, but it leaves the application side wide open. You have a sandbox to play in to define your own functionality while still taking advantage of existing architecture.”
As far as the future of the technology goes, everyone interviewed for this article predicts continuing growth in this area. “Business demands are becoming so overwhelming that organizations need something to change and the best or only way to make that happen is by software-defined motion and software-defined tools,” Holmes adds. “A lot of the people we see using soft motion are trying to innovate on a process or innovate on an application. They either can’t buy an off-the-shelf solution for whatever process they’re trying to improve, or they’re trying to provide value by packaging up their own off-the-shelf application solution to sell to other folks.”
“I think software-based motion control will continue to take market share from hardware,” says Goerges. “Any company considering a motion control project should at least evaluate the viability of software-based motion control because in many cases it gives you higher performance at a lower price.”