Download as pdf or txt
Download as pdf or txt
You are on page 1of 40

MOTION DESIGN GUIDE ON

MOTION
CONTROLLERS

Sponsored by: brought to you by:

www.aerotech.com www.motioncontroltips.com
MOTION CONTROLLERS MOTION DESIGN GUIDE

Aerotech’s Automation1 motion control platform helps users quickly


solve their most challenging precision motion applications. Powerful
yet simple to use, Automation1 can reduce setup time for complex
motion systems from days to minutes.

No matter their exact design, motion controllers in the context of industrial automation are the
electronics that command electric-motor-moved axes (and to a lesser extent, pneumatically
moved axes) to precise speed, force, and position values. In this Design Guide, we detail
motion controllers that take the form of standalone controllers that mount on machines as well
as in control panels and on DIN rail; controller+HMI hybrid components; PC-based motion
controllers; and motion controls taking the form of embeddable microcontrollers.

Refer to designworldonline.com/design-guide-library for other Design Guides on the LISA EITEL


Executive editor
components that complement motion controllers.

TABLE OF CONTENTS
Introduction............................................................................................... 2

Background on motion controls with PLCs............................................. 12 Miles Budimir


Senior editor
Embeddable motion electronics: ICs, motion ....................................... 14
boards, and microcontrollers

The special case of networking motion systems .................................... 21

Industrial PCs (IPCs) for motion control ................................................. 24

Motion controls with HMI functionality .................................................. 28

Programmable automation controllers (PACs) for motion ..................... 31

Tuning motion-control loops: One servosystem example ..................... 34

Programming motion-control systems ................................................... 36 Sponsored by:

© Copyright 2023 WTWH Media


www.wtwhmedia.com I marketing.wtwhmedia.com I www.designworldonline.com I www.motioncontroltips.com www.aerotech.com
@designworld /DesignWorldNetwork @motion_control
Introduction

Automated shield-braiding machines


employing motion controllers have
advanced the cable-making industry.

I
f we use a zoological analogy to describe automated motion systems with various levels of feedback. The latter process input
systems, motion controllers serve as the system’s brains to commands, compare those with motor feedback signals, and
monitor, command, and integrate: execute corrective computations to make the axis positions or
• Appendages and axis muscles — moved by electric motors motions track the controller commands … with reasonably fast
and drives, actuators, and attached mechanical components communications (with 1 msec to 200 μsec being typical) and
• Senses — in the form of industrial sensors and other encoder little to no error.
and even machine-vision feedback Supreme are motion profiles — the mathematically defined
• Informational input from the external environment to trajectories that motion controllers command axis drive-and-
inform adjustments — from machine operators as well as motor systems to follow. Many motion profiles define sequences
IIoT networks communicating enterprise-level order and of position commands over time to tell the axis how and where
throughput requirements to position attached load. Here, motion-controller electronics
also convert created trajectories to generate torque commands
Just like the nervous systems of animals, motion controllers can to be used by the drive powering the motor.
work to command systems arranged for:
• Centralized control (like the human body) with most all We’ll cover these motion profiles and how they dictate the
components networking back to the main controller motion-controller hardware and software that’s most suitable. In
• Distributed control systems using (like the diffuse this Design Guide we’ll also cover the function and applicability
neurological structures in an octopus) engineered cabling of standalone controllers that mount on or in machines;
and electronics integrated into axis components to execute controllers that tightly integrate into primary host controls (on
logic at the periphery machines or in control panels on DIN rails); hybrid components
combining controls and human-machine interfaces; the broad
This Design Guide covers both control architectures as well category of PC-based motion controllers; and the various
as their advanced motion controllers — especially those electronics and networks involved in motion controls.
operating in precision stepper-motor systems and servomotor

2 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Introduction

VARIOUS TYPES OF MOTION CONTROLLERS

MOTION CONTROL CHIPS


INTEGRATED CIRUITS (ICs)
THESE INTEGRATE INTO
MOTION BOARDS

SMART MOTOR WITH


CONTROL ELECTRONICS

DRIVES WITH CONTROLS PROGRAMMABLE LOGIC


(SERVO CONTROLLERS) CONTROLLERS (PLCs)
MOTION CONTROL
BOARDS
DIN RAIL INSIDE A
CONTROL CABINET

CONTROL BOARD FITTED WITH


DIGITAL AMPLIFIERS

INDUSTRIAL PCs
(IPCs)

INDUSTRIAL
CONTROLLER
HMIs
(PANEL PCs)
EMBEDDED IPCs

PLCs remain more appropriate than other motion


controllers in standalone applications such as
machine axes that run preset sequences.

AUTONOMOUS
AGRICULTURAL
INDUSTRIAL-GRADE VEHICLE
OFFICE PRINTER

There are various types of motion


controllers — including PC-based
controllers and microcontrollers.
The application dictates which is
most suitable.
LASER-CUTTING
MACHINE

OFF-HIGHWAY EQUIPMENT WITH


MOTOR-BASED FUNCTIONS

PICK-AND-PLACE
ROBOTIC WORK CELL

3 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Introduction
Origins of motion controls in the
machine-tool industry
Electronic controls were first designed about 70 years
ago for computer numerically controlled (CNC) machine
tools. By the early 1950s, such controls were standard
for manufacturing. Then with the advent of transistor
logic, solid-state memory, and the ability to program with
cathode-ray tube or CRT workstations (which allowed
visualization of live system programming for the first time),
all elements needed to create programmable controllers
were suddenly available. In 1968, the Third Industrial
Revolution — automation — began.

At about the same time came distributed control systems


or DCSs — plant-customized systems of computers
for data acquisition and storage; sensors and primitive
actuator feedback; and controllers for both discrete and
process operations. Such DCSs presented unique control
requirements for their many individual analog controllers
employing PID algorithms and sequential control.

In fact, the first DCSs and SCADA systems ran chemical


processes, nuclear power plants, and steel mills. With an
array of minicomputers and engineered communications
networks, the Texaco Port Arthur petrochemical refinery
installed the first modern DCS in 1959. Honeywell launched
its DCS product for process automation in the early 1960s.

These CNC, PLC, and DCS designs were separate


technologies with distinct modes of application modeling. So
during this period of control development, their fundamental
difference necessitated creation of unique hardware and
software … and one controls’ subsystems were inapplicable
to the others. Nowadays, industrial-control manufacturers
benefit from computer processor power, memory, and
communications offering boundless capabilities and
application cross pollination of control approaches.

Multi-axis motion control traces its origins


to computer numerical control (CNC) of
the 1950s for the machine-tool industry.
These CNCs had computer hardware
running programs for automating
metal-parts manufacture. The advent
of the transistor and integrated circuit
(IC) drastically reduced the size and cost
of CNC hardware, but its command
language and architecture persist to today.

4 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Introduction

While the hardware running motion control has


dramatically evolved over the decades, the physics
of motion remain unchanged.

It’s true that engineers too young to have had personal


experience with historical control technologies may be
confused by today’s disparate range of motion programming
and hardware options. After all, most any modern processor
(especially those in industrial PCs or IPCs) can perform CNC,
motion, PLC, and DCS functions. The real design challenge is
choosing the hardware and software that makes the most sense
for a given motion design — even though various controls serve
what are essentially the same functions.
The Aerotech Automation1 Studio application is powerful enough
In short, motion controllers are differentiated by their for nanometer-level control and flexible enough to deploy general
programming and the way in which they integrate into and PLC functionality. Its modern IDE is the preferred programming
environment for AeroScript, the language used to create real-time
function for specific applications.
application code for your Automation1 control scheme.

Two converging tracks in motion-system history exactly equivalent products. European suppliers do follow IEC
guidelines but not strictly so, as a servomotor (to continue with
Except perhaps for the well-defined standards of the National that example) might have IEC-standard mounting but shaft with
Electrical Manufacturers Association (NEMA) for step motors, supplier-specific dimensions.
there are few consistent naming conventions for product types
in motion-control and discrete-automation industries. So Such terminology inconsistency applies to motion controllers
instead of a standard, engineers will often refer to the maker as well. Here it’s helpful to remember that decades ago, motion
of a given component to describe an arrangement — as in a design involved two separate (but slowly converging) disciplines
Kollmorgen servomotor or Parker servomotor or a Siemens — one discipline called motor control and another discipline
servomotor, for example — though it’s rare that they’re called motion control.

Motor control informs motion control


Historically (and to this day) companies first focused on motor
control primarily concentrated their engineering on hardware
and techniques to convert 110, 230, or 24-V input into formats
for smoothly, accurately, and efficiently powering (driving)
electric motors.

Their main concern was the shaping of current and voltage into
motors as with pulse-width modulation (PWM) or field oriented
control (FOC) to spur a specific kind of mechanical output.
This involves the design of drive bipolar transistors, MOSFETs,
or (leading today) IGBTs along with other switching amplifier
circuits, pre-drivers, current sensing, and overcurrent and short-
circuit protection to make that mechanical motor output happen.
The Automation1 iSMC controller can be deployed to either a PC-
or drive-based controller. Modern embedded controllers enable
many applications to simply run on a motion system’s required
servo drive hardware, while highly complex applications leverage
the power of industrial PCs.

5 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Introduction

To this day, these motor controllers (also called amplifiers, motor-driven axes and steering them through 3D position
drivers, and drives) are sold as integrated “box” (housed and trajectories in space. These suppliers too ultimately came to
connectorized) packages that mount into control panels ... or eliminate problems OEMs and other customers had with making
card and board (chip-level and module-level) products that OEMs drives and controls work together — by offering fully compatible
must integrate into their own machine or designed circuit board. components or pre-integrating drives right into their controls.

As digital signal processors (DSPs) and microcontrollers became Today, integrated drive-controller options abound … as do
more powerful, motor-control companies began upgrading the interfaces to support various architectures; the offerings of
their offered products and making them more sophisticated. motion-control companies have also converged with those from
Motor controllers (drives) became digital and even began motor-control companies as well as motion-supplier newcomers
assuming motion-control tasks associated with computations underscoring holistic “motor+motion” design approaches.
related to achieving set accelerations, velocities, and positions Today design engineers can find “drive+controller” products
— essentially servo functions. These evolved into offerings that sold as standalone motion controllers (capable of accepting and
accept various voltage inputs and accommodate various motors storing motion programming) for simple applications — or as
at their outputs. hardware options to support what’s called distributed motion
control — covered in more detail at motioncontroltips.com/faq-
what-is-distributed-architecture-for-servo-drives.
Motion control takes on motor control
When used for the latter (as distributed drives) these connect
Companies tracing their origins to motion control (just as those into networks to support synchronization. Such drives accept
with origins in motor control) have also leveraged ever-more more basic position and move commands on the network from a
capable electronics on the market. These suppliers (such as primary host motion controller (whether PC or motion controller
Galil, G&L, Kollmorgen, and Siemens) historically focused their board) but execute some to most all other amplifier and motion-
engineering on improving electronics and software for motion profile-generating tasks.
control — such as coordinating (through motor drives) multiple

The Automation1 XL2e enhanced,


compact linear amplifier-based drive
is the preferred device for positioning
Aerotech’s ABRX, an air bearing rotary
stage with nanometer-level error
motion performance. The XL2e’s 20 kHz
position command, high-end encoder
multiplication circuitry, and high-
resolution current output and current
sensing make the ABRX’s exceptional
performance possible.

6 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Introduction

The Automation1
controller, deployed to
the Automation1-iXR3
six-axis drive rack, easily
programs complex kinematic
arrangements like the six
(6) struts of Aerotech’s new
HEX150 hexapod.

Drive-based distributed motion control connecting via for the design at hand. General-purpose control hardware
CANopen, TCP/IP over Ethernet, or RS-485 allows partially leveraging modular designs, standardized physical connections,
coordinated distributed motion control with drives remaining and software compatible with open-source or universal code
autonomous, using local sensor inputs. In contrast, distributed should be chosen where practical. Where a machine is expected
motion control connecting via deterministic CC-Link, EtherCAT, to support IIoT functions, the motion controller should work with
EtherNet/IP, PROFINET, or SERCOS III (covered later in this running machine logic as well as data collection.
Design Guide) allows fully coordinated high-speed motion of
multiple axes — all under the command of a primary motion Sometimes least conducive to expanding a machine’s functions
controller … whether in an electronics board or predesigned and (as requirements become more sophisticated over time) are
housed component-type (box) format. controls based on motion-controller boards designed for a finite
number of axes and (ironically) traditional PLCs emphasizing
I/O. As with all design engineering, it’s prudent to prioritize
Choosing a motion controller from today’s options the scalability of a motion-control system over any immediate
short-term profitability objective or impulse to specify the most
Various design objectives and requirements dictate which
familiar or least expensive controller solution. That’s especially
motion controllers and control architecture are most suitable
true for integrators and OEMs having decades-long relationships
for an application. To fully specify a control system, engineers
with end users expecting operations evolve over time.
must decide on control hardware, how controls will integrate
with motors and drives, and whether industrial-network Yet another design parameter to consider when specifying a
connectivity will be required. motion controller is the intended installation location — whether
in a control panel, on a machine frame, or in a motor. Here,
Letting the application dictate the motion-controller choice
space constraints can preclude certain choices and architectures
avoids problems associated with choosing controllers that are
— especially where cabling and connectivity restrictions
simply most familiar to the engineering team or OEM. It also
necessitate the tight grouping of motion components.
avoids excessively costly motion controllers that may be overkill

7 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Introduction ERP
PARTNER FACILITY
TELESERVICE REMOTE EXPERT

SUPPLY CHAIN SECURE WLAN

MES REMOTE SERVICES


ROUTER
WLAN INTERNET

NFC SWITCH

AUTOMATION
NETWORK

INTRALOGISTICS

LOGISTICS
AND DISTRIBUTION
RFID
OR SHIPPING
BARCODES AND DELIVERY END USERS

FIELDBUS

INTRALOGISTICS

LOCAL FACILITY

MACHINES’
MOTORS AND DRIVES

BOARD OR CABLE CONNECTIONS


Motion system connectivity in automated facilities
MOTION
CONTROLLER
depends on each machines’ primary functions, hardware,
enterprise-level IIoT roles, and machine-monitoring
HOST CONTROLLER sophistication. It’s increasingly common for motion
(PRESENT IN ADVANCED SYSTEMS) controllers (especially embedded variations) to offer
communications over Ethernet-based local area networks
(LANs — including wireless versions) and connectivity to
cloud-based information and control systems.

Perhaps the most important design parameters though are Component-type (box) variations include either buttons or (more
the design’s power requirements and required level of motion advanced) communication ports for programing and connecting
sophistication. Following are descriptions for three complexity encoders and feedback; capabilities are set, and configuration
classes — simple, moderate, and fully-coordinated motion is often through the supplier’s own software. Offering a bit
control. Though there’s overlap between these artificially drawn more flexibility are board-format controllers boards (without or
classes (as well as their motion requirements and technologies) more often with motor drives onboard) in standard commercial
it’s still helpful to consider their distinctions. off the shelf (CotS) and custom versions. The latter are most
commonly designed by large OEMs imparting some simple
Simple motion-control applications: The simplest motion-control build with simple motion — and aiming to keep cost and weight
systems run axes through indexing and point-to-point positioning down. After all customized boards avoid inclusion of extraneous
routines. Indexing involves velocity or position control sans capabilities or connections. They also allow for small and rugged
acceleration control — so only allows some speeds and motion formats to directly mount into products or machines sans any
profiles. Unsurprisingly, controllers for these designs are cost- tether to a control panel.
effective variations with modest and focused capabilities.

8 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Introduction

supporting basic forms distributed control. These include smart


Standalone machines motors having onboard drive+controller electronics for partially
such as this BEL 5150E coordinated machine axes. If such a motor integrates into a
semi-automatic case
forming packing sealing PLC-controlled design, its electronics can operate with digital
machine from Wexxar Bel handshakes to the PLC. Runs, stop inputs, and busy signals from
typically employ motion the motor control electronics can often suffice.
controls mounted to the
machine itself. Image Applications that need more coordination or speedier
courtesy Wexxar Bel
movements don’t run well off such PLC-based systems … as
system performance can be limited.

Advanced (fully coordinated) motion-control applications:


These include demanding motion designs involving material
Moderate motion-control applications: These midrange slicing, trimming, shaping, machining, welding, and assembling,
designs include single-axis motor-driven products needing and anything else needing interpolated multi-axis motion. Other
somewhat more sophisticated motion as well as multi-axis applications in this class include those involving imaging (especially
machines that need no or little inter-axis coordination. Stages medical imaging) and precision high-speed conveyance and
and gantries for material-transfer operations are a couple positioning of delicate workpieces into workstations.
examples; others include those in discrete part-handling
Machine designs running such operations necessitate
operations; large-scale automated warehousing; and smaller
specialized software to coordinate all axes with position and
machinery in packaging and general automation.
speed commands doled out at rates to dozens of kHz. They
Systems based solely on PLCs excel at commanding such motion also necessitate motion controllers having sufficient processing
— especially when an installation involves independent single power and connectivity to command adjustable motor speeds
axes. OEM-designed or CotS motion-controller circuit boards and travel limits; homing routines; multi-axis interpolated moves;
are also common, especially on mobile designs. Still other coordinated high-speed multi-axis actions; and even actions for
common technologies for moderate motion-control applications emergency stops.
— such laboratory-automation equipment — are those

Precision multi-axis motion demanding high throughput


is the ultimate motion-controller challenge.

9 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Introduction

Here common hardware includes networkable


The powerful Automation1 controller commands Aerotech’s AGV-XPO two-axis laser drive+controller boards as well as IPCs or PACs with
scan head and AGV5D laser micromachining precession scanner. The Automation1 high bandwidth on parallel electrical connections
controller generates a 100 kHz position command, and the Automation1-GL4 closes called backplanes for motion-data sharing between
the loop at a 200 kHz rate. modules and systems. High-bandwidth backplanes
allow full use of processor cores for complex
axis-to-axis coordination — even in demanding
machine tool and robotic installations. Automated
machinery for pharmaceutical manufacture also
tends to employ such hardware for centralized
and deterministic motion controls. In contrast,
distributed architectures for fully coordinated multi-
axis control rely more heavily on computationally
powerful drive+controller boards as just described
in our brief motion-controller history.

Illustrating the need for speed


in coordinated motion control
Consider the task of tracing a circle with two
linear axes. As we’ll explore in a moment, such
coordination necessitates fast axis-position updates
and comparisons to predicted position — along
with error correction to the speed command of
each axis-driving motor. This is a very demanding
realtime task. The speed of the processor’s
Precision manufacturing, testing and inspection processes often require
exceptional planar (2D) motion. Paired with an Automation1-iXC2e drive-based execution must be many times faster than the
controller, the ANT series XY stages provide excellent contouring accuracy, speed of the motor feedback.
move-and-settle and in-position jitter (stability). The iXC2e can connect to and
command up to 11 additional axes of motion. The computing capabilities of today’s processors
meant that PACs, IPCs, and other motion
controllers are primed to handle such multi-axis
motion control. It’s true that each platform does this
in its own way — and it’s common to have myriad
separate motion axes in a machine with each
independently operating off a start-signal input. But
full multi-axis motion usually works to coordinate
multiple axes through mathematical definitions.

Let’s consider how to quantify the necessary IPC


speeds for given motion design using a basic
mechanical (analog) load under digital control as an
example.

10 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Introduction

Underspecified motion controllers lack the computing power to maintain


reliable machine performance and throughput. Over-specified motion
controllers can be excessively costly and complicated.

Assume we are controlling a 5:1 ballscrew on a motion axis Reconsider a two-axis machine that must slice large and curved
run off a 500-step-per-revolution stepper motor. Assume one shapes out of an expensive substrate. Here, the two axes’
motor step prompts 0.001 in. of linear motion … and one inch positions must be updated every processor clock cycle … or
of travel is equal to 2,500 steps. Moving one inch in one second every time a feedback device or position sensor detects a
from standing start to stop means the output pulse rate to the variation — whichever time period is shorter. As speed increases,
stepping motor drive can peak at 5 kHz or higher, depending on control-system performance must be orders of magnitude
the trajectory. Evaluating the commanded versus actual position faster to correct for overshoot in the axes, or circularity error.
on every step (and executing realtime control algorithms to hold No wonder that to this day, a standard test of motion-controller
following error at ±0.001 in.) requires processor speeds of 100 performance is to draw a circle at speed.
kHz or higher.

Of course, managing multiple axes is far more complicated


than managing this kind of single-axis design. It’s possible
(and sometime acceptable) to create machines with two linear
actuators needing no coordination. That’s quite common in
automated storage and retrieval (AS/RS) systems … in which
axes operate sequentially sans coordination. But such control is
insufficient for other applications.

Designed to run on an industrial PC (such as the Automation1-iPC) or one of several Automation1 single or multi-axis motor drives,
Aerotech’s Automation1 motion control platform offers flexible deployment. The Automation1 iPC, iXC4e and iXR3 are pictured here.

11 I www.motioncontroltips.com
www.aerotech.com
Background on motion
controls with PLCs

Aerotech’s Automation1-XR3 drive racks are easy to integrate, allowing for simple control
of complex motion. Machine integrators slide the XR3 drive racks into position and connect
motor power and feedback cables to the unit with safe and secure d-sub connectors.

P
rogrammable logic controllers (PLCs) are still a dominant For the motion-control industry, there may be less love lost,
form of motion control. In their traditional format, their as PLC ladder logic — originally focused on performing tasks
physical hardware includes a microprocessor, solid-state associated with timers, relays, and I/O — limits its applicability
memory, various peripherals, some sort of user interface, in cutting-edge motion-control requiring visualization and easily
and a housing that’s ruggedized for installation in industrial editable programming.
settings. PLC I/O modules handle inputs to the processor and
outputs to controlled devices … so in motion designs, I/O brings
input signals to the PLC’s CPU — and outputs control signals to Review of PLC history and evolution
devices such as electric motors, sensors, and fluid-power valves PLCs were originally introduced to the market many decades
and actuators. ago (in the late 1960s) to replace relay-based controls in
applications needing reconfigurability — and the first control
Today’s PLC user interfaces range from simple keypads to
standard as electricity became the dominant power source for
touchscreens to Ethernet-connected PC-based programming.
manufacturing. That’s because increasingly complex control
No matter its form, engineers and machine personnel program
requirements rendered hard-wired relay control impractical
the PLC via this interface.
— especially where manufacturing needed more reliable and
Of course, PLCs are traditionally associated with ladder logic … reconfigurable (programmable) systems.
though many PLCs today employ other IEC 61131-3 languages. These first PLCs used available electronics that replicated
Ladder logic maintains an enduring relevance to developers relay and timer behavior but were programmable instead of
and machine operators with experience programming and hardwired. This necessitated proof of repeatability and reliability
debugging in this language. That said, the automation industry on the plant floor.
continues to evolve as older generations continually retire and
new engineers and plant personnel enter the workforce — and
have less proclivity to use ladder logic.

12 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Background on motion controls with PLCs

PLCs remain more appropriate than other controllers in


standalone applications — especially where machine
axes run preset sequences. The rule of thumb is that
anywhere most IPC or PAC functions would go unused, it
still makes sense to use a more economical PLC.

Ultimately it was custom memory boards, logic-controller designs that still need PLC functions with multiple interfaces —
boards, backplane interfaces to I/O modules, and heavy-duty including Ethernet communications and digital I/O, for example.
circuitry that helped these PLCs run machines in industrial Because such motor drives can also incorporate motion controls
environments. It was a new concept to let users write application delivering S-curve, camming, and freeform motion profiles, OEMs
code using the symbols and logic of relays. are more likely to pick them than other motion-controller options
for otherwise-simple designs eliminating standalone PLCs.
By today’s standards, early PLCs (with their primitive hardware
and rigid task execution) were themselves still difficult to setup One key metric of PLC performance is scan time — the time a
and network. Today’s standalone PLCs are much easier to PLC takes to run through its program and collect data and update
implement … and continue to excel in traditional applications outputs. Scan time is usually only a few milliseconds but can be
and for machine axes running preset sequences. It’s generally much longer if the processor is slow or the program is complicated.
accepted that PLCs are a top choice anywhere sophisticated Faster scan times (while unnecessary for basic applications) help
control functions would go unused; plant personnel preferences accommodate processes with more realtime demands.
and the enduring value of ladder logic also make PLCs the first
choice in many applications. Other factors can limit PLC performance even for single-axis
motion … especially where the PLC is managed by a main
Where PLCs run isolated motion-control systems, they’re processor or primitive sub-processor in a motion module via
often found mounted inside panels or control cabinets on the PLC backplane. Any PLCs for single-axis motion control
DIN rails to command one or more simple axes. Many rely on with low encoder-frequency rates can limit performance. PLCs
components closer to machine axes for more advanced motion can also limit how fast the motion-control position register can
— whether dedicated motion controllers or motor drives having update, which in turn limits machine throughput. Yet another
electronics for both motor and motion control. The challenge challenge is that systems incorporating traditional PLCs are often
with such architecture is the involvement of disparate pieces of incredibly challenging to update or service (and necessitating
programming and software — often in proprietary languages. multimeter tracing of all connections) if the original designer
didn’t document how the PLC and connected motion controller
Of course, PLCs also take the form of controller electronics
divide control tasks.
(as those within controller HMIs) and even so-called soft PLC
designs. The latter are increasingly common in motor drives
sporting controller functions. Such drives excel in machine

13 I www.motioncontroltips.com
www.aerotech.com
EMBEDDABLE
The microcontroller
and complementary ICs
inside a consumer-grade

MOTION
Neato D7 robot vacuum
command its various
electric-motor-based

ELECTRONICS: functions.

ICs, motion
boards, and
microcontrollers

E
arlier in this Design Guide, we covered how motion controllers (and
drive+controller products including servodrives) are sold as predesigned,
housed, and connectorized (box) components ... as well as chip-level, electronics
card, and motion-board products that OEMs integrate into their designs themselves.
Both hardware types have at their core various electronic devices that we’ll now
explore. Details about these devices are most pertinent when there are embedded-
systems engineers involved in a project … or OEMs are designing their own motion
controllers for mass-produced products using discrete electronic devices that they
mount into their own and custom-printed circuit boards or PCBs. That said, it’s always
helpful to understand control electronics when specifying standard box and board
motion controllers — especially when they work as embedded controls.

Recall from basic computer engineering that embedded computer systems are any OEM-BUILT FROM-SCRATCH
electronics assembly having a processor, memory, and I/O to integrate into and MOTION CONTROL
complement a larger design. Most embedded computers — including embedded
forms of motion controllers and other controls interfacing with motion — go into OEM engineering teams designing
designs having moving electromechanical components supporting physical operations some large-volume product having
… whether for discrete motion or process-type operations. simple motion may sometimes be
justified in building their own motion-
Here’s where the terminology gets particularly messy. In the context of industrial PCs, control ICs for in-house integration.
the term embedded IPC generally indicates a fanless housed box-type component
After all, general-purpose processors
are usually less costly than predesigned
motion ICs. With this tack, the
team typically programs a DSP or
microprocessor (such as a reduced
instruction set computer or RISC
processor) starting with prewritten
THREE-PHASE PWM FOR
MOTOR code from device-supplier libraries …
and then customizes it for the design’s
3Φ GATE
motion profiles as well as servo tuning
DRIVER

and updating requirements.


DIFFERENTIAL
AMPLIFIERS

PERMANENT-MAGNET
MOTOR

Exceptionally compact motor microcontrollers have been


available for some time. Many leverage software to relieve
externally connected (or increasingly pre-integrated) MCUs of
realtime motion-control tasks.

14 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Embeddable motion electronics: ICs,
motion boards, and microcontrollers

for complementing some larger machine design — in contrast


with the “standalone” nature of PCs used for most office or
home-computing applications, for example. But embedded
motion controllers in the context of industrial automation (and
even many consumer-grade designs) indicates a variety of
different electronic components under bus-based primary (host)
control and incapable of independently commanding a motion
axis. That’s because the term bus can indicate three different
connection types — those within and between electronics chips,
those board-level connections internal to a primary machine
controller (and through its backplane), and those joining
separate motion and other automation components.
• Such motion-controller hardware can take the form of
embeddable motion controller cards that must plug into a
primary controller’s backplane to connect via its computer bus.
These are often contrasted with controllers labeled standalone
(in this context) that connect to a wider system via some
industrial-automation network.
Embedded motion control is driving innovation in battery-
• Such motion-controller hardware can also take the form of powered medical devices, e-bikes (as the one shown here),
compact box-type controller components (such as some electric scooters, and consumer-grade wearables. These
designs leverage smart electronics and electric-motor-driven
industrial PCs) that embed into systems on DIN rail or
features for unprecedented functionalities. Though beyond
elsewhere — and indeed, nearly always connect to the rest the focus of this Design Guide, the controls and drives
of a system via an industrial-automation network. Again, of such designs must command the motors with and for
these control components are designated embedded to efficiency — to get the most out of each battery charge.
differentiate them from computers used for standalone
functions … such as PCs for personal computing.

Reconsider how the term bus can indicate one of three different 2. Backplane buses: These board-level computer buses and
connection categories — those within and between chips, those complementary hardware are data-transfer systems into
within a controller (centered around its backplane), and those which embedded motion-controller cards directly connect.
joining separate motion and other automation components. For example, in PC-based machine controls, this bus includes
all the boards plugged into the PC’s active (as opposed
1. Inter-chip integrated circuit (IC) buses: These buses to passive) backplane — a printed circuit board (PCB) with
make standard connections within chips — and interface connection slots to accept expansion boards … and serve
with microprocessor peripheral chips (as well as system as a main bus connection point. Here, bus types include
microcontrollers) sans cables or backplane connections. the peripheral component interconnect (PCI) standard and
Examples include the inter-integrated circuit or I2C standard (increasingly common) PC/104 derivatives with PCI Express
and its derivative system management bus (SMBus), the (PCIe) — along with the less common system host board and
configurable system interconnect bus (CSI Bus), and versions of SHB Express; embedded platform for industrial computing or
the serial peripheral interface or SPI. Sometimes complementing EPIC; embedded single board computer (SBC) connections to
controller IC buses (especially in microcontrollers we’ll cover let modules plug into host or “carrier” boards; and (now largely
in a moment) are ICs called universal asynchronous receiver- superseded by PCIe) accelerated graphics port or AGP buses.
transmitters or UARTs — to support the communication of
serial data. Other complementary chip-level standards include 3. Industrial automation buses: These machine and automation-
motion-specific connections for speed-direction (S/D), PWM, level buses are industrial networks to which box-type motion-
and SPI-based drive interfaces … as well as the (encoder) controller components connect. They include serial, two-wire
synchronous serial interface or SSI, SPI, and standard analog and (such as Controller Area Network flexible data-rate or CAN
Hall connections.

15 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Embeddable motion electronics: ICs,
motion boards, and microcontrollers

FD), and Ethernet-based options — which in fact come in other Digital signal processors (DSPs) quite common
non-bus network topologies as well. Refer to this Design Guide’s for motion
section on networking motion systems for a more detailed
review of these connection options … and the other sections One specialized microprocessor type that’s distinct from general-
of this Design Guide on PLCs, PCs, and PACs for details on the purpose microprocessors and particularly common in motion
motion-controller components connected via these industrial controllers is the digital signal processor or DSP. That’s because
automation networks. DSPs can readily accept real-world signals that have been
digitized — and then quickly execute the immense motion-
related mathematical operations and algorithmic processing
Processors and digital signal processors (DSPs) required to spur the proper motion responses.
in motion control
More specifically, DSPs are dedicated ICs that can be
Microprocessors are integrated chips or ICs serving as computer programmed to execute specific types of calculations or
central processing units or CPUs and using external memory algorithms. They differ from standard microprocessors in
chips and I/O peripheral interface circuits. Microprocessors that they aren’t designed to do many if any supervisory tasks
have advanced according to Moore’s Law since the 1970s and that microprocessors typically handle. Therefore, they can
are currently the format upon which many embedded computer execute motion algorithms much faster than general-purpose
systems are based — including advanced motion-controller microprocessors. In fact, a DSP for motion control is just one
products. These processors can be general-purpose ICs, that’s specifically designed for and dedicated to the motion-
specialized ICs from semiconductor vendors, or even OEM- control tasks listed above.
customized ICs mentioned earlier.

DIGITAL SIGNAL PROCESSOR (DSP) SOFTWARE FOR MOTOR CONTROL

MOTOR CONTROL
PERIPHERALS
SPACE VECTOR
+ MODULATION
- (SVM)
PID LOOP
VOLTAGE WM
DECOUPLING PARK GENERATOR

CORRECTION PWM
OUTPUT
+
- ADC
PID LOOP SYSTEM
3⇒2
TRANSFORM
PARK
MOTOR
CURRENT
FEEDBACK

ENCODER
INTERFACE
d ROTOR POSTION
dt

ENCODER
FEEDBACK
Drive+controllers and smart motors (housing all drive and
motion controller electronics onboard) include DSPs to
execute control tasks for distributed control arrangements.
Shown here is such an arrangement for a DSP-based
design for controlling a three-phase ac servomotor.

16 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Embeddable motion electronics: ICs,
motion boards, and microcontrollers

DSPs were first incorporated into motion controllers in the they have multiple processor cores that can be programmed
early 1990s. They offered the ability to handle complex motion for motion control tasks as well as supervisory tasks typically
profiles with dedicated processing power. More recently, DSPs associated with microprocessor units or MPUs. Because the
have gotten better with faster processing speeds and more application algorithms are essentially encoded into the ASIC
functionality in the space of a small IC. This in turn has made semiconductor structure (sans additional software save for that
motion controllers (as well as drives) smaller and more capable. run on a processor core) these ICs are less hackable and faster at
executing tasks than programmable chip options.
Some DSP-based motion controllers today even use a multi-
processor architecture (with one or more CPUs and DSPs) for CotS motion control ICs integrate into machine boards to run
servo-update rates from kHz to MHz. In drive+controller products, one or more axes by:
DSPs let a primary (host) controller supply motion profiles as well • Generating motion profiles and trajectories
as motion and position commands; then the drive+controller
DSP accepts those values and executes calculations to determine • Closing control loops, tracking performance, and executing
required current into the motor windings — for example, shaped autotuning tasks
and delivered via pulse width modulation or PWM. • Running current control — and sending control signals to the
(commutating) motor drives
Having DSPs on control hardware close to the axis actions
bypasses any issues associated with constantly involving the • Monitoring safety routines
primary controller, especially for axes needing realtime control.
ASIC caveats are that they can limit future design expansions
(especially any addition of axes) and still require setup by
Motion-control ICs and FPGAs skilled programmers. On the other hand, most all motion-
control ASICs come with firmware as well as software containing
Motion control and the command of various motor types example schematics for connecting drives and encoders
(including brushless motors) can also run off application-specific through interfaces just mentioned — plus software to simplify
integrated circuits or ASICs. These are relatively costly but final testing and tuning. That means OEMs can go to market
proven high-efficiency electronic chips fringed on all edges faster than they would if basing motion on general-purpose
with pins (for example, 48 or 100 pins) for connectivity and CPUs, microprocessors, or FPGAs necessitating more in-house
customized to run one specific task — whether digital (most electronic engineering.
common), analog, or mixed signal. CotS motion-control
ASICs integrate (solder) into OEM-built machine control Note: Systems on a chip or SoCs in motion control (just
boards and are classified as system on chip (SoC) devices if mentioned in passing) serve much the same functions as
microcontrollers (which we’ll cover shortly) but
FUPx
FDWx
MVCx
GROUND
DIRx
are typically based on application-specific ICs
BSYx OUTx
ERCx
VDD5
P0x
P1x
VDD5
EZx
EBx
EAx
(ASICs) that are more highly customized (with
diverse and advanced hardware) to specific
P2x PBx
P3x PAx
P4x GROUND
P5x PEx
P6x -DRx
GROUND
P7x
+ELy
-ELy
+DRx
VDD3
PCSx
STAx
end uses. SoCs can encapsulate various
SDy

CPUs, DSPs, and microcontrollers on a chip


GROUND
ORGy LTCx
ALMy CLRx
INPy INPx
CLRy ALMx

for demanding applications … so in motion


LTCy ORGx
STAy
PCSy ENCODER SIGNALS IN SDx
-BLx
VDD3 +BLx
+DRy VDD5
-DRy
GROUND
PEy
PAy
controls, SoCs have multiple processor cores
programmed for motion tasks as well as
PBy
EAy CEMG
EBy CSTP
EZy 8-bit and 16-bit DATA TO AND CSTA
VDD5 FROM THE CPU GROUND
OUTy
DIRy
COMMAND PULSES to MOTOR via DRIVE OUT
D15
D14
D13
D12
supervisory tasks typical of a microprocessor.
D11
GROUND
MECHANICAL ± SLOW IN D10
D9

Field-programmable gate arrays (FPGAs)


FUPy D8
FDWy
MVCy MECHANICAL ± ORIGIN IN VDD5
D7
BSYy
ERCy REFERENCE CLOCK PULSES IN D6
D5
VDD5 D4
P0y
P1y
P2y
P3y
MECHANICAL ± LIMIT IN D3
D2
D1
D0
are another single-chip option that can be
programmed (even late in the design process
P4y GROUND
P5y IFB
P7y VDD3
GROUND WRQ
CLOCK INT

during final installation) to run motion designs.


VDD5 GROUND
GROUND A3
GROUND A2
GROUND A1
GROUND A0
GROUND
VDD3
ELLx
WR
RD
CS
IF1
Though they differ from ASICs classified
ELLy
IF0
RST
VDD5

ASICs commanding motors efficiently generate motion profiles,


coordinate axes, and even support safety functions.

17 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Embeddable motion electronics: ICs,
motion boards, and microcontrollers

THREE-PHASE PWM FOR


MOTOR

3Φ GATE
DRIVER

Microcontroller units or MCUs abound in DIFFERENTIAL


AMPLIFIERS
embedded motion systems needing motor
PERMANENT-MAGNET
controls over one or more motor-driven axis. MOTOR

Here, the electronics usually include MCU and


MCU software for dedicated motor driving as
well as system control.

as SoCs, FPGAs increasingly run SoC-type functions. Unlike motion-control microcontrollers typically include a processor
semiconductor devices locking functions into their very silicon running its own programming and leveraging its own memory to
layout, many FPGA devices contain a programmable DSP, command electromechanical components as well as various dc
adder, multiplier, and other blocks connected by configurable or ac motors.
interconnects and transceiver blocks. These blocks can be set
to run various digital functions — and in parallel if the motion Such motion microcontrollers were traditionally for single-axis
system requires particularly fast data processing. designs, but now versions abound for commanding multiple
axes. Designers get chip-level access to their systems with this
Of course, such FPGAs don’t default to motor control but can hardware type.
be setup for it — and some suppliers offer prewritten code for
the simplest motion (such as indexing). Beyond that, OEMs Tighter integration in recent years has made for simpler and
may need to author their own motion-profile algorithms and more capable motion microcontrollers … even in the form of
servotuning functions. On the other hand, these chips can also single-chip microcontroller units (MCUs) for modest consumer
be programmed to support motion-adjacent machine functions and industrial applications. MCUs excel in small motion designs
related to machine sensors and HMIs. Plus FPGAs serve markets needing IoT connectivity and the ability to run off one MCU
that are constantly demanding increased computing power, and a drive. However, MCUs can also be added to embedded
so ever-better device performance can be expected — which motion controllers to complement a motion-control-capable
is useful where products are expected to have relatively short processor and connectivity via Ethernet or other standard.
design lifecycles and continual upgrades.
One potential drawback of motion microcontrollers is that some
can necessitate programming for optimized configuration and
Microcontrollers in implementation. That’s why (just like the other electronic devices
(consumer and industrial) motion control detailed here) suppliers increasingly include support in the
form of application programming interfaces (APIs) and firmware
Microcontrollers (sometimes abbreviated μCs) are ICs with libraries with invokable functions including various motion-profile
microprocessors (usually based on CPUs) that are decked out algorithms with common position, speed, and torque (even
with memory as well as I/O for peripheral interfaces. Embedded FOC) motor controls.

18 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Embeddable motion electronics: ICs,
motion boards, and microcontrollers

Note: Slightly more sophisticated than these microcontrollers are most cases, control programs can be uploaded to the cards or
single-board computers or SBCs — printed circuit boards (PCBs) boards via a USB link or flash drive. The cards either install in
that are also called embedded computers in some contexts. box-type components (as for on-machine mounting associated
These have more computing power than microcontrollers with distributed control arrangements) or in some centralized
— and have (besides the processor and memory) a graphics control — whether rack mounted or DIN-rail mounted. More
card and additional RAM, data storage, I/O, and the ability specifically, motion-control board connections are through one
to run operating system (OS) software. One familiar SBC of the backplane buses (such as PCIe) mentioned earlier … or
example from the hobby-grade motion market is the Raspberry through one of the industrial automation buses detailed in this
Pi. That’s in contrast with the Arduino, which is an (albeit Design Guide’s next section.
advanced) microcontroller complemented by highly accessible
development software. The fact that these hobby-grade Such motion-control boards are often compatible with a range
electronics have been proven for experimental and prototyping of drive and motor types. Some motion-control cards even
work with industrial-grade smart motors is a testament to how far include a way of commanding motor drives via ±10-V analog
controls, connectivity, and electronics in general have come. or Ethernet (or other network bus) digital signal. Such cards
typically complement machines with a PC or other primary
host controller running programs dictating machine and HMI
Motion-control cards and boards actions as well as axes (drives and motors) via motion-control
Predesigned motion-control cards and boards are fully pre- boards. Where motion-control boards complement distributed
designed and assembled PCBs sold as ready-built CotS arrangements, their proximity to the motors and actuators
electronics that have all the processors, firmware, and they command speeds responsiveness and boosts machine-
connections needed for a set subtype of motion design. In monitoring capabilities.

Motion controls commanding the coordinated axes of 3D


printers often leverage the computing power of motor drives on
each axis. These increasingly assume the execution of current-
shaping algorithms designed to get quieter operation that’s also
faster and more accurate.

19 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Embeddable motion electronics: ICs,
motion boards, and microcontrollers

In contrast with motion-control boards built by the OEM, CotS motion-control cards For some mechanical
work for quick prototyping and high volume production. There are some caveats engineering students, working
with these electronics though: Drawbacks are a slightly higher cost (especially with an Arduino is often their
compared to OEM-customized designs for more modest motion designs) and
first exposure to embedded
potentially complex wiring and troubleshooting.
motion controls.
More on hobby-grade microcontrollers
The open-source hardware and software system called Arduino from the organization with the same name is a great
example of how low-cost (under $100) programmable circuit boards complemented by robust software (often written in a
C-based IDE) can be capable enough for the challenge of modest motion control (or at least the testing of motion designs)
in protected settings. In fact, that’s also true of Linux-based Raspberry Pi (programmable in C++ and C, Python, and Java)
as well as some other low-cost minicomputers and microcontroller platforms. Many engineering teams have demonstrated
and documented how motor-based motion system designs can successfully run off these open-source microcontroller
platforms. The combination lets machine builders and OEMs do cost-effective prototyping and (even testing that replicates
that done with digital signal generators) of modest to moderate-performance motion systems.

Other benefits to employing Arduinos in first-round proof-of-concept work are that there’s a very active open-source
community for support … and the systems are familiar to younger engineers. After all, most undergraduate and
graduate engineering students today leave school with at least some experience designing robotics or motion systems
on low-cost microcontrollers. In addition, there’s wide availability of board options and shields — with the latter being a
modular circuit board that extends the Arduino motherboard’s functionality.

Some suppliers have begun selling and promoting these microcontroller systems for true industrial-grade use in small-
scale operations. There are a couple caveats to keep in mind with this:
• Large industrial-automation operations are almost always serviced and supported by an integrator or OEM. Arduino-
type microcontrollers usually have no such service coverage.
• Traditional industrial-grade controllers (as well as microcontrollers and mini-computers) are highly ruggedized at
the board level — and their enclosures sealed and reinforced. Oftentimes, they’re physically built to satisfy specific
ratings standards. Until recently, Raspberry Pi-type microcontrollers weren’t offered in hardened variations.

Pairing an Arduino with smart motors (integrating digital servo drive, encoder, controller and digital I/O) is done through
Arduino I/Os set as PWM outputs and analog inputs … while a basic USB connection allows connection to a laptop for
HMI-type visualization.

The rugged Portenta industrial MCU board from


Arduino uses a dual (cortex) core microcontroller
to support industrial application development —
letting developers program motor and motion
functions (and other related functions) with C (or
equivalent) or higher-level options such as Javascript
or microPython.

Application programming interfaces (APIs) abound


for motor controls. Image courtesy arduino.cc

20 I www.motioncontroltips.com
www.aerotech.com
The special case of
networking motion systems
R
ecall from basic computer engineering that industrial traditional device and fieldbus networks can have multiple
communication protocols — including traditional physical layers (including RS-232, RS-485, and CAN) but Ethernet
fieldbuses and permutations based on Industrial Ethernet networks run on one physical layer adherent to IEEE standard
— are systems of rules for messaging between automation 802.3. What’s more, even though older variations such as 802.3c
components. Variations abound, and there’s no dominant setup is slower than 802.3ab (at 1 Gbit/sec — the version called
with which all devices work. What is clear is that communications GbE) all use Cat. 5e cable. That makes all permutations of
offering more connectivity than current-loop (4-to-20-mA) analog Industrial Ethernet implementation easier. In fact, many fieldbus
communications continue proliferation into even once-simple components can connect to blocks that support Ethernet
motion applications. connectivity. Once on Ethernet, they connect via Ethernet RJ45
connectors and Cat. 5E cable.
Serial-networking hardware and proprietary protocols endure,
and fieldbus networks (especially PROFIBUS) persist and grow. Ethernet standardization also facilitates IIoT functions, as there’s
IEC 61158-defined fieldbuses work in setups for which they commonality between systems for networking to enterprise-
were developed and beyond … employed by thousands of level systems, connected machines, I/O, and device-level
components sold and in use today. But while some fieldbuses functions and components. These unified IIoT architectures
can still be more reliable than nondeterministic Ethernet setups, even encompass wireless variations and Internet connectivity
Ethernet speeds have come to lead. to systems on the Cloud. That makes for communications that
combine myriad data streams related to:
No wonder then that Industrial Ethernet-based networks • Motion control and communications with controls and I/O
continue to spread faster than other options — so that they’re
• Dedicated safety functions to protect personnel and
now part of nearly 40% of all industrial communication networks.
equipment
Other reasons include Ethernet’s ubiquitous and standardized
design; widespread support; economies of scale from the • Plant energy management and machine health monitoring
worlds of IT, consumer electronics, and commercial off-the-shelf and diagnostics
(CotS) Ethernet; ease of use and familiarity; allowance of multiple • Production output functions such as product tracing
protocols on a network; and (as it’s often built-in) elimination of • Tracking of plant-wide statistics and the transmission of
traditional network-interface cards. manufacturing data to plant managers

As a reminder on USB, RS-232, RS-485, and Ethernet hardware:


Connections complete communication buses but aren’t
protocols … and don’t constitute complete setups. To illustrate,
Ethernet is merely the basis for the protocol of POWERLINK. Aerotech’s motion controllers combine the best of both worlds
- industry-standard industrial Ethernet protocols and Aerotech’s
own high-performance, motion-specific communication buses.
Controller hardware often dictates the fieldbus communication
The HyperWire network, displayed here, is purpose-built to
a design will use. One benefit here is that offerings using ensure tight synchronization of the process tool and motion.

21 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
networking motion systems

Five leading realtime protocols that provide deterministic


networking include CC-Link, EtherCAT, EtherNet/IP,
PROFINET, and SERCOS III. Though beyond the scope
of this Design Guide, it’s also worth noting that Ethernet-
based systems excel at transmitting data and even power
over long cable runs — in stark contrast with traditional
digital and analog motion-control communications that may
be more limited. In fact, the most advanced IPCs and PACs
usually allow various communication types — for example,
pairing with both EtherCAT (for realtime motion control
and I/O) and PROFINET as needed to support machine-to-
machine or M2M communications.

Ethernet-based connectivity is now part of more Refer to the section in this Design Guide on embedded
than 40% of all industrial networks. devices (such as microcontrollers) for more information
on chip-level communication technologies — including
the serial peripheral interface (SPI) standard and universal
asynchronous receiver-transmitter (UART) chips.

Motion controllers capable of realtime operation are key


to semiconductor applications — including this surface-
mount device (SMD) pick-and-place operation. Of course,
it’s key that the controller electronics (and housings) be
ruggedized to maintain reliability for machines like this
that might operate 24-7 … and involving motion that
subjects components to vibration.

22 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
networking motion systems

POINT-TO-POINT MOTION PROFILES ...


With point-to-point motion, simple control code

INTERPOLATION FOR MOTION PROFILES ...


feeds commands (such as those for moving to
target position or setting constant motor speed)
into the motor drives to trigger the response.
Spline engine functions are algorithms that
interpolate estimation points for the motion axis to
follow — by making estimation points between
CONSTANT SPEED
FREQUENCY

known data points.

SPLINE INTERPOLATOR

TRUE REALTIME CONTROL


TIME
TRAPEZOIDAL MOTION PROFILE TRAJECTORY
Real-time multiaxis control involves a host controller that monitors and
GENERATION HOST
LOOP RATE (msec) cyclically updates axes’ positions, velocities, and torque setpoints —
closing feedback loops and ...
• Homing axes via specific paths and speeds
VELOCITY

• S1 duty-cycle tracking and actions


• Running routines associated with limits and overrides
• Mechanical backlash, windup, and vibration correction

S CURVE MOTION PROFILE


TIME
TIME COMMANDS
SPLINE INTERPOLATION
TARGET LOOP RATE (msec)
DIAGNOSTICS
AND ACTIONS

MONITORED
CONDITIONS
TIME
Interpolation can execute over
ON-THE-FLY ADJUSTABLE MOTION multiple axes sans motion
ACTIVE VIBRATION DAMPING FOR
REDUCED TRANSIENTS AND
controller. Here, the drives HIGHER ACCURACY
might track vectors defined by
points and target speeds.

MECHANICAL
ANALYSIS AND QUICK
FREQUENCY RESPONSE FAILURE CHECKS
TIME ANALYSIS
DRIVE-BASED ANTI-JERK CORRECTIONS
ONLINE MONITORING OF
AMBIENT CONDITIONS

ENVELOPE CURVE MONITORING

TIME

Multi-axis interpolation might define X, Y,


and Z positions to which axes must
move. These data points are stored in a
buffer on the controller so that when
switching from one move to another, the
motors need no stop and restart,
but merely change speeds based on
specified vector speed. The controller will
linearly interpolate between each point to OPERATIONS
calculate the speeds needed for each MONITOING
axis. This gives a smooth and continuous
motion that can be used to optimize any
CONFIGURABLE MONITORING
multi-axis move.
OF OPERATING POINTS

Motion controllers command various kinds of motion


profiles — and increasingly communicate motion-related
machine information to enterprise-level systems.

23 I www.motioncontroltips.com
www.aerotech.com
Industrial
PCs (IPCs)
to support
motion Aerotech’s Automation1-

control
iPC intelligent industrial PC
comes factory direct with the
Automation1-iSMC loaded and
ready to go. Added configuration
services allow customers to
receive a motion controller and
motor drives that have been set
up for their specific needs.

PC
-based industrial controls involved in motion control 3. Add-on circuit boards to expand IPC functions: Accessory cir-
(also called industrial PCs or IPCs) came to market cuit boards that mount onto the motherboard are called add-on
in the 1980s — concurrent with the rise of PC use in controller cards, plug-in cards, and secondary cards (to comple-
office and consumer settings. IPCs leverage the ever-advancing ment the primary motherboard) as well as peripheral component
processing power of PC central processing units or CPUs on interconnects or PCIs. These connect the IPC motherboard to
their motherboards in dual-core, quad-core, and even higher- motion components, HMIs, and industrial networks used in the
count multi-core processor arrangements. Today, most of these system — and often expand the IPC I/O to those ends. PCIs
CPUs are either Intel Atom, Celeron, or Pentium processors or involved in motion tasks maintain realtime control capabilities
Acorn Business Computer (ARM) processors for cost-effective — and assume the processing of much of the programming
industry-leading performance. Then this DSP and CPU-laden associated with properly driving the involved motors.
motherboard is complemented by several subcomponents.
PCIs imparting industrial-network connectivity (as to EtherCAT,
1. Human accessibility hardware to IPC functions: PC-type DeviceNet, or CANopen, for example) can render the IPC a
peripheral devices or remote access (as via mobile devices such secondary to some other primary in the network. Usually, software
as smartphones) give engineers and machine operators a tool complementing these PCIs automatically categorizes them as
for visualization as well as access to the controller programming network secondary devices. Then (if appropriate) engineers can
and operation menus. Taking user accessibility one step further reconfigure the control software to independently access the card
are panel PCs. Controller+HMI IPC hybrids integrate a human- as the design requires. Adding complementary bridge terminals
machine interface (HMI) touchscreen to give machine operators and interfaces can allow bidirectional communications.
and maintenance technicians a way to (among other things)
adjust machine settings and modes. 4. I/O to ensure IPC connectivity: IPCs also include I/Os like
those in basic PCs … as well as I/Os to factory-floor devices such
2. Internal IPC communications between electronic as electric motors and drives, fluid-power actuators, discrete
subcomponents: A dedicated high-speed bus in the IPC (as sensors, signaling lights, pushbuttons, and mechanical switches
detailed earlier in this Design Guide) transmits information to for feedback. I/O ports and electronics can be on the IPC base
and from the various CPUs and other motherboard processors. unit or add-on accessory cards, PCI-connected subcomponents,
and complementary rail-mounted modules.

24 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Industrial PCs (IPCs) to support motion control

PC-based control is the cornerstone


of a high-performance Automation1
motion system, and it’s often used for
challenging applications like 5-axis
laser micromachining centers and
multi-axis laser stent cutters.

Several IPC hardware product formats Whether taking the form of housed mini PCs or non-housed
control boards, IPCs support various machine-level automation
Some of today’s fully integrated (standalone) IPCs still take and even enterprise-level functions — with many IPCs today
the form of the stereotypical tower consumer-grade PC with a even assuming industrial-network gateway and IIoT functions.
cooling fan and connections at the computer rear … although Most also connect to the web to support remote access through
small hand-sized embedded IPCs (fanless housed PCs and wifi or even cellular connectivity.
mini PCs) in finned housings are more common. The difference
between IPCs and the PCs they resemble is that IPCs are more
rugged and reliable — with built-in protection against dust, IPC software and common functions
debris, and even water as well as features to minimize the effects
So we’ve covered the various forms of IPC hardware. Now let’s
of shock and vibration on internal electronics. IPCs can also
cover their software and functionality.
handle wider temperature and humidity ranges than commercial
PCs — with IP ratings in some cases. In addition, there is often One main advantage of PC-based controllers is that they have
more inclusion of indicator LEDs and status displays on the IPC a readymade graphical user interface (GUI) that makes control
itself, so users can directly observe controller and connected programming and tuning easier than that of other controllers.
machine functions — without needing an external monitor PC-based controller software always includes some operating
or remotely connected device. There’s also inclusion of serial system (OS) to manage internal processing and resources …
ports on IPCs that are rare on the newest PCs — as that form of and stability issues are a thing of the distant past with today’s
connectivity has been largely superseded by other cost-effective realtime OSs, professional grades of Microsoft Windows
connector options for consumer-grade products. No wonder (including Windows IoT and Windows Embedded Compact),
IPCs often cost more than consumer-grade PCs. and the open-source option of GNU/Linux.

IPC hardware also takes non-housed formats, especially in Additional reading:


motion-control applications. These embeddable (embedded) Proprietary and open-source PC control software
IPCs are compact variations that mount onto and into PC-based controller condition monitoring
other components … potentially complemented by motion
processing boards tasked with generating and executing Application software and application programming interfaces
motion profiles. The latter include single-board computers (APIs) abound to connect to and trigger target behaviors in
(SBCs), ARM controller boards, and printed circuit boards (PCBs) machines and processes … and its exactly this flexibility that
sold as standard or customized to (in motion applications) ultimately leads some design engineers to specify IPCs for their
accommodate the addition of other subcomponents such as machine builds. As we’ll cover in more detail later in this Design
digital servodrive boards and encoders. Guide, APIs are pieces of software and communication drivers

25 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Industrial PCs (IPCs) to support motion control

Industrial PCs serve as universal control and visualization platforms or


(in some setups) as IoT edge devices.

allowing cross-program or cross-system communications. Motion Motion-control history summary for context
APIs are prewritten motion routines, sample motion programs
(including source code), help files, and diagnostics tools that By today’s standards, the industrial control systems of 50 years
work in various application development environments (ADEs). ago were painfully slow. They relied on complex architectures of
DSPs and dedicated microcontrollers; dedicated I/Os for end-
Tools in ADEs in turn support the creation of programming to of-travel switches and encoder signals were directly coupled to
integrate motion controls and feedback devices with electronics main. Code environments were totally custom, so unique to each
on motors and drives and even multi-axis stages. They can also control-system vendor. Users-created programs were compiled
accept component-supplier APIs to simplify the programming directly on the processor — with no OS between the user code
process for engineers. and real world.

Where an IPC supports real-time motion — something Then realtime operating systems or RTOSs emerged as
associated with multiple CPUs to run normal PC tasks in an alternative to dedicated processor architectures. Many
parallel with automation (and thus manage I/O and motion with customized RTOSs were created, marketed … and fell by the
improved speed and determinism) engineers will sometimes wayside as more powerful solutions such as Linux and industrial-
choose to program components in their native embedded grade forms of Windows came to dominate.
languages. Control programming languages include computer-
science offerings (such as C++ or Visual Basic often used to Today, these OSs complement all types of motion controllers
write custom controls) as well as more application-specific (including PC-based controllers) leveraging electronics spurred
languages — including IEC-61131-recognized Ladder Diagram, to ever-increasing performance by consumer and mobile-device
Function Block Diagram, Instruction List, Structured Text, and applications.
Sequential Function Chart languages. Refer to the section of
this Design Guide covering programming for more on this topic. Just consider the industrial PCs of today. These have virtually

Many of today’s motion-control IPCs have efficient electronics that are sufficiently cooled with passive elements (such
as the heat fins shown here) instead of needing cooling fans that can fail in industrial settings. That means these IPCs
26 I www.motioncontrol-
www.aerotech.com
can mount in control panels in a variety of orientations. More rugged versions that rely on solid-state memory (and
tips.com aren’t damaged by vibration during operation) can even mount into or onto machinery.
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Industrial PCs (IPCs) to support motion control

IPCs with dual, quad, and additional multi-core CPU arrangements let
designers assign specific control tasks to each core for sophisticated
capabilities and reduction in the time the controller runs at maximum
capacity. This in turn extends controller life and boosts efficiency, as the
processor runs more coolly thanks to a lower CPU burden.

unlimited processing power and can run the


most complex motion requirements with
standard OSs managing hardware resources.
Compared to dedicated-processor
approaches of the past, IPC-based motion
is an economical option. Of course, system
performance is a top objective for machine
builders commissioning the most demanding
designs — and specifying a new motion
controller is often a top way to address
machine bottlenecks and make performance
gains. Conventional PLCs were once the go-
to option for such hardened realtime control
... but as we’ve just detailed, they can involve
proprietary OSs and software, so incur steep
replacement costs during redesigns — and
limit flexibility and scalability.

Other benefits of PC-based control are


inherent scalability and flexible migration
paths. Should an operation outgrow the
performance level or scale of its current Robust Linux-based software abounds to run on cost-effective control
hardware. These even include software options for motion control, CNC, and
control system, migration to a larger
robot applications. These benefits and the shareware nature of Linux (along
system is simple. That’s especially true with massive working-group support) make it a top RTOS today.
for PC-based controllers using Windows
OSs and automation software to establish
realtime control. This lets the PC operate
deterministically and in realtime.

Finally: Processor end of life doesn’t render system architecture or software


obsolete. By incorporating more functionality into software and running
it on standard IPCs, engineers can simply upgrade aging equipment with
new IPCs as needed — while leaving most of the existing control hardware
and software in place.

27 I www.motioncontroltips.com
www.aerotech.com
Motion controls with
HMI functionality

HMIs assuming control functions mount directly machines.

A
common HMI variation now taken for granted are
those built around industrial PCs. In fact, it’s astound-
ing how most design engineers today would likely
define HMIs to be self-contained PCs or equivalent
fanless electronics based on a single circuitboard running Linux
or other operating system (OS). Such HMI+PC components are
more complicated and costlier than some alternatives due to
their inclusion of more electronics and software resources. Nev-
ertheless, they’ve become standard components over the last 20
or so years — executing (in traditional setups) the HMI and PC-
based machine controls on a common microprocessor. The last
few years have seen new HMI+PC iterations with dual and quad-
core processors (1 and 1.6-GHz) for the benefits of an integrated
system but segregation of HMI and control functions for realtime
handling of advanced motion and automation tasks.

Additional reading: Why do so many PC controls integrate


HMIs?

No matter the exact PC electronics, HMIs built into PC-based


systems are part of a multi-function design. In many cases, that
makes it possible to expand system functions as needed. Later
in this Design Guide we will detail how some such HMI systems
often deliver capabilities beyond machine control — including
digital and analog I/O-based integration into automated factory
and enterprise-level systems.
Some suppliers use the terms panel PC or touchpanel PC to refer
to their HMIs that also serve control functions.

28 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Motion controls with HMI functionality

The assumption of control functions is a natural progression of


HMI technology, as traditional PCs are all based on a central-
ized processor hosting an OS that manages attached resourc-
es — including memory, external communications, and (most
significantly to this topic) visual display. That means employing
a PC already in the system to manage an industrial screen incurs
no additional cost. When suppliers manufacture the PC com-
ponents to fit into a flat format, this imparts yet another benefit
Some controller HMIs with multiple
… namely, a streamlined and economical amalgam component processors can run a realtime OS
with a single housing and mount. Increasingly the latter takes the on one CPU core and general-
form of bracket hardware adhering to geometrical standards of purpose logic on another. Such
the Video Electronics Standards Association for VESA mounting arrangements leverage what’s called
asymmetric multi-processing (AMP)
of consumer as well as industrial flat-panel screens. architecture — an arrangement that
can outperform traditional symmetric
multiprocessing (SMP) architectures
SAFETY
COMMUNICATIONS running one OS across processors.

ALARM
CONFIGURATION MENU STATUS
RESET
AXIS
SENSORS
END EFFECTOR
MECHANICAL SYSTEMS
AUTO MANUAL STOP STATUS
MODE MODE MODE OK
SAFETY
LIGHT CURTAIN
OPERATOR CONSOLE
with
HUMAN-MACHINE INTERFACE
(HMI)

SERIAL OR
ETHERNET
CONNECTION

REALTIME OS
and
SAFETY
APPLICATIONS GUARDED ZONE
STANDARD OS (for
example, Linux)
and HMI with other
APPLICATIONS DIGITAL I/O
SoC • CONTROLLER
asymmetric multi-processing (AMP) architecture segregates
realtime control logic from HMI logic for batch processing,
data collection, and display tasks.

29 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Motion controls with HMI functionality

HMI+PC products also facilitate efficient fault and


diagnostic messaging, adjustments of machine
functions for maintenance and repair tasks, and
network communications. No wonder HMI+PC
products that combine a touchscreen with
control electronics have become so common in
automated applications.

Note there is one important caveat to using HMIs


capable of controls: Design engineers accustomed
to traditional design approaches might be inclined
to specify a control system and then a suitable HMI
later in the design process. Specifying HMI+PC
components or really any format of HMI that
assumes control functions necessitates a more ho-
listic design approach to leverage all components’
interoperabilities.

Refer to the Design Guides at designworldonline.


com/design-guide-library for more on PC-based
motion controls integrated into HMIs.

The Automation1 MachineApps HMI builder


develops and deploys custom HMIs for machines
and motionsystems controlled by the Automation1
iSMC controller. Use the Automation1 Studio
MachineAppsWorkspace to develop each custom
MachineApp, then save them on the appropriate
Automation1 iSMCcontroller. Access each controller’s
MachineApps via the MachineApps Launchpad.
Image courtesy of: Aerotech.

30 I www.motioncontroltips.com
www.aerotech.com
Programmable
automation controllers
(PACs) for motion SAFETY

PROCESS CONTROL

P
DCS
rogrammable automation controllers or PACs are MOTOR
CONTROLS
industrial controllers that combine the functionality CNC
DIGITAL I/O
of a programmable logic controller (PLC) with the ANALOG I/O
DRIVES
processing capability of a PC. PACs evolved as an
FEEDBACK
option for advanced industrial control when increasingly
powerful microprocessors became affordable and MOTION and SEQUENTIAL
CONTROL
commonly available.

The term programmable automation controller is generally


accepted as having been coined by the ARC Advisory Group,
which originally specified five characteristics that define a PAC:
• Multi-domain functionality HMIs COLLISION DETECTION
PROGRAMMABLE INTEGRATED VISION
• A single, multi-discipline development platform ENTERPRISE
LOGIC CONTROLLER
and IIoT CONNECTIVITY
(PAC) ROBOTICS
• Flexible software tools that maximize process flow across
machines or processes SCADA

• An open, modular architecture


• Compatibility with enterprise networks

But with no industry-standard definition of a PAC, the


distinctions between PACs and PLCs (and even PC-based PACs can operate in multiple domains
simultaneously — including motion
control) are blurry. Part of the traditional narrative is that PACs
and sequential control, process
perform as PLCs, but not vice versa. That’s because PACs serve control, logic, data management,
multiple channels of communication; high-data traffic; and and communications on a single
platform. PACs are often used in
Cartesian, SCARA, and six-axis
robot applications, which require
PROGRAMMABLE AUTOMATION CONTROLLERS (PACs) coordinated motion across multiple
axes as well as integration with other
INTEGRATE MULTIPLE COMPONENTS motion and data systems.

MAIN CONTROL UNIT


(PROCESSOR)
KEYPAD and
LED STATUS INDICATORS CONTROL
MODULES

Programmable automation
controllers (PACs) integrate multiple
subcomponents. All include a base
unit with CPU and power supply; this
base unit or complementary modules
POWER
SUPPLY can also include analog, pulse, and
(on main unit other I/O; positioning, high-speed
or a module) counter, motion, energy and power
functions; and safety communications,
controls, and relays.

COMMUNICATIONS I/O
(on main unit or a module) MODULES

31 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Programmable automation controllers (PACs) for motion
Two controls for motion automation — PLCs and PACs
Typical programmable automation controller Typical programmable logic controller
(PAC) (PLC)
Processor modules Multiple processors per rack One per rack
Processor chips per module Two or more high-performance chips allow One microprocessor (288)
multitasking
Communication Open networks • Multiple options • Ethernet/IP Typically one option (though more are
increasingly common)
Programming Structured text • Function block diagrams • Ladder logic — but with new PLCs supporting
Ladder logic • Most support for IEC 61131 IEC 61131
environment
Functionality Dual scan of logic • Motion control • Data Sequential scan of logic
acquisition • Process control
Memory Up to 32,000K Up to 64K
I/O 128,000 (with thousands of analog I/Os possible) 3,000

PACs are increasingly common for motion applications in machining and handling discrete product
thanks to the flexibility and interoperability they offer machine designs.

coordination with intelligent subsystems. However, higher-end Once PLC behavior was proven reliable on a computer,
PLCs now incorporate some of the characteristics described industrial adoption of IPCs and PACs began. The aerospace
above and are encroaching on what was once considered and medical industries led the move to adopt PACs. That’s
PAC territory. After all, many PLCs now allow use of standard because the Federal Aviation Administration (FAA) and the
programming languages, expansion of functionality through Food and Drug Administration (FDA) mandate that day, date,
add-on modules, and connectivity to various buses. and time-tagged data about manufacturing processes be stored
for extended periods of time … a function that’s particularly well
run on PACs. Today, even manufacturers of simple consumer
PACs can command complex automation setups with products are finding such information necessary for defending
PC-based and HMI functions as well as process control — designs in product-liability lawsuits. Many operations-
largely because of the way they handle I/O. monitoring and predictive-maintenance functions leverage PAC
data tracking as well.

To simplify things, it’s helpful to remember the hardware that PACs can assume the tasks associated with PLCs, DCSs,
creates a PAC. A PAC — usually a DIN-rail-mounted series of IPCs, and remote terminal units (RTUs) by running functions
modules — includes a base electronics unit with a CPU and as software. That avoids the complexity of using controls
power supply. This or complementary modules can also include engineered to serve specific markets … and helps previously
analog and pulse control along with other I/O; positioning, high- siloed industries cross-pollinate control innovations. The best
speed counter, motion, energy, and power functions; and safety software replicates traditional control schemes to make design
communications, controls, and relays. work feel more familiar to programmers.
Therefore, most PACs serving as motion controllers also manage
Of course, the hardware must also support concurrent execution
other automation functions. I/O connectivity (increasingly
of all these functions. The high-bandwidth internal architectures
through Ethernet) gives engineers significant design
of PACs allow multiple processors and multiple tasks to
independence to tailor the PAC to the installation at hand … or
simultaneously execute.
the existing installed base of products if applicable.

32 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Programmable automation controllers (PACs) for motion

Moore’s Law and ever-advancing computer-processor PAC vendors now produce general-purpose control hardware
capabilities have blurred distinctions between various controller that integrates into IT networks but is rugged enough for
types into which motion is integrated. Case in point: The PAC industrial settings — and modular like the PLC form factor. This
itself is an extension of PLC technology — originally introduced necessitates relatively advanced controller hardware so the PAC
to add data-processing and communications capabilities that can function in any control application. It also means that PACs
would’ve been incomprehensible when the PLC was invented. are equally capable of managing large data-gathering networks,
In the same way, IPCs with advanced processors go far beyond or running machine control logic, or doing both simultaneously.
their original (and modest) use as simple data-storage devices So today’s controller electronics is more than capable of running
and programming terminals. Complementing their electronics (and networking into IIoT systems) multi-axis motion control.
are OSs robust enough for industrial controls — especially widely
available IPC RTOSs such as Linux.
Applying a PAC — beyond the motion controls
There’s support of data-reporting schemes with built-in
The ability of PACs to gather, store, and track large amounts
communications as well as modems and wireless-network layers.
of data means they can handle predictive maintenance and
There are also protocols to facilitate interfaces with data systems
operations monitoring. Data is often stored and accesses
such as Oracle and SAP. In fact, video interfaces are more
through an Ethernet network or a USB storage device.
common (and growing) in discrete part manufacturing. More
PACs than ever work with smart videos to verify dimensional PACs use the IEC 61131-3 programming languages (ladder
accuracy — which in turn boosts product quality. Common video diagram, function block diagram, or structured text) as well
subsystems can interface directly to PACs. In the past, video-to- as sequential function chart and some include standard PC
PLC interfaces required a great deal of extra programming. programming languages such as C/C++ which means that
familiarity is retained and the learning curve for programming is
In contrast with discrete part-manufacturing operations that
low … regardless of prior experience or expertise.
often thrive on PLCs if the motion is mostly by independent
single axes, PACs use of high-density memory and solid-state Programming is done in an integrated development
memory to process much more data on the fly. Should there be environment (IDE) that uses a single, tag-name database. This
a machine problem, PACs can access documentation or serve means that all the defined variables (tags) are kept in one
it under software control to facilitate repairs. That improves database, which is used by all the software applications — such
machine availability and productivity. These features can even as HMIs, ERP systems, and vision applications. This greatly
integrate into HMIs when there is sufficient memory … though simplifies and reduces programming work and makes it easier to
PACs typically integrate such function directly into application scale to larger systems.
programming.

33 I www.motioncontroltips.com
www.aerotech.com
Tuning motion-control loops:
One servosystem example

A
primary function of motion controllers PARAMETER
Kp Ki Kd
is to calculate trajectories for machine INCREASED
axes’ motors to follow — to meet
Rise time Decreased Decreased Slight decrease
target velocity and position commands. These
trajectories form motion profiles, which are
sequences of position commands (expressed Overshoot Increased Increased Slight decrease
as functions of time) that tell motors where to
position attached loads and how fast to do Settling time Slight change Increase Slight decrease
that positioning. Common motion profiles are
Steady-state
trapezoidal, ramp, triangular, and complex Decrease Large decrease No effect
error
polynomial profiles. Each of them satisfies
certain motion conditions and tasks. For
Stability Degraded Degraded Improved (for small Kd)
instance, a trapezoidal profile (with a velocity-
versus-time profile in the shape of a trapezoid)
delivers constant acceleration, then velocity, Overshoot and
then deceleration. Noisy to High-frequency
Excessive value low-frequency
unstable oscillation
oscillation
To get the target motion profile out of the
physical machine, the motion controller must
track the profile and (in most cases) reject Fast • Stable
Sufficient value Stiff response Reduced Ki overshoot
disturbances. Controllers track commands by response
commanding motor drives to follow positions,
velocities, torques (or forces) and accelerations.
Motion-control position commands are inherently unstable due to the delay between
Called feedforward control, this compensation current into motor windings and its mechanical output. Stabilization of motion
relies on accurate machine and motor models. systems is essentially the reduction of the effects of this control-loop delay through
In contrast, disturbance-rejecting controls a filter — such as a PID. Each parameter of a PID loop affects the servo response
are more active, fixing output to correct for differently. However, they work together to minimize position error and overshoot.
problems with sudden or unexpected loads on
the machine or inaccurate feedforward models.
Servosystems typically use a combination of
The simplest of these is proportional P control three types of control loops — current, velocity,
for constant integer gain. After P is established, and position. The velocity control loop serves
programmers can add integral I gain … and two purposes: It enables the system to respond
in some cases, also add derivative D gain to changing velocity commands, and it lets the
or velocity V gain to make PID or PIV loops system resist high-frequency load disturbances.
to actively reject errors. The integral value But the velocity loop by itself can’t ensure that the
integrates error over time and helps push it to system maintains a given position over long time
zero. The derivative value helps to stabilize the spans. Therefore, velocity control loops are often
PI system. used in conjunction with position control loops in a
cascaded structure.
PID loops are particularly common and
powerful algorithms to help machines track Additional reading:
commanded trajectories. They work on What is disturbance rejection in motion control?
the error signal (the difference between a How to address overshoot in servo control
commanded value and actual value of an The difference between torque mode and velocity
output) and attempt to drive the error to zero mode in servocontrol
while maintaining machine stability. Hunting in the context of motion control
Can a servodriven machine be too stiff?

34 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Tuning motion-control loops: One servosystem example

COMMAND OUTPUT VOLTAGES COMPARED

The combination of proportional and integral and


2.0 derivative gains in PID control loops represents
COMMAND BASED ON
PROPORTIONAL GAIN ONLY one of the most common and powerful types of
COMMAND BASED ON motion-control algorithm.
1.0 PROPORTIONAL AND DERIVATIVE GAIN
VOLTAGE (V)

0.0
TARGET

-1.0

-2.0

25 50 100 125 150 175

TIME (msec)

The velocity controller is typically a PI controller, using the In cascaded control loops, the performance of the inner loop
proportional Kvp and integral Kvi gains, whereas the position affects the performance of the next outer loop. The inner loop
controller typically uses only the proportional gain Kp. (velocity) acts as a low-pass filter to the outer loop (position). Once
the velocity control loop is tuned, the controller should be set to
Current control is often set automatically and is manually operate in position mode, and the position loop can be tuned.
adjusted only in rare cases. But for the sake of understanding the Begin with a low value for the position gain Kp and raise it slowly
process, recall that proportional gain has a value that is directly to a point just before overshoot occurs. Now that the velocity and
proportional to the error and determines the voltage that is position gains have been set and stabilized, increase the target
applied to overcome the error. Proportional gain is related to velocity and test the gains again. Adjust them if needed to make
system stiffness. Integral gain accumulates error over time and the gains suitable across the full velocity range of the application.
provides a restoring force during move ends to push the system
to a point of zero error. In cascaded control loops, the bandwidth Note that the output of the position loop is a velocity command.
of the inner loop should be anywhere from five to 10 times the Here’s how it works: The position error detected by the position
bandwidth of the outer loop, or the inner loop will have little loop is scaled by the position gain Kp to generate a velocity
effect on the outer loop. Best practice is to tune the fastest loop command. That velocity command is sent to the velocity loop,
first, so in the cascaded position-velocity loops, we start with the which uses it to command more torque, which moves the motor
(inner) velocity loop. to correct the position error.

Feed-forward control is for when the following error must be


Because the velocity loop is a PI controller, there are only two
minimized, although it sacrifices system stiffness.
parameters to tune — Kvp and Kvi. For the move profile, it’s
wise to use a medium-value velocity target (not the lowest or If the application requires very low following error, it may be
the highest that the application will experience) and keep the necessary to add feed-forward control to the tuning parameters.
acceleration rate relatively high. This magnifies the effects of Velocity feed-forward control Vff takes a proactive approach,
system response, making system tuning easier. To begin the calculating the velocity needed to meet the desired position
tuning sequence, increase velocity proportional gain Kvp to and feeding this value directly to the velocity control loop, rather
a point just before overshoot occurs. It’s sometimes helpful than allowing the control loop to wait for the position error to
to increase Kvp until overshoot and then back it down until develop. However, the drawback of using velocity feed-forward
overshoot is eliminated. Now increase the velocity integral gain is that the position loop proportional gain Kp must be lowered
Kvi until a small amount of overshoot (5 to 15%) occurs. … which reduces system stiffness.

35 I www.motioncontroltips.com
www.aerotech.com
Programming motion-
Aerotech’s Automation1 controller has several
programming language options for developers.
Program in standard languages like .NET, C and

control systems
Python with standard controller APIs. Develop
programs with standard RS-274 G-Code support
that runs at the real-time level. LabVIEW VIs, EPICS
drivers and TANGO drivers are also available.

P
rogramming a motion controller is the act of giving that Other motion controllers accept programming through a
controller the instructions to complete a motion task. permanent or temporary network connection (such as Ethernet)
Motion tasks can be as simple as commanding a linear that’s written in PC-based motion software. Here, the motion
actuator to extend a short distance and then retract. software is often integrated into a larger holistic automation
Motion tasks can also be quite complicated — coordinating software package (or application development environment)
the movement of vast interconnected axes on assembly lines capable of facilitating automation design beyond the motion
and in manufacturing operations. No matter the complexity, systems.
motion designs always need instructions for motion controllers
to execute. This more sophisticated software often includes convenient
Motion controllers accept such programming in a few ways. and intuitive modes of program creation and editing in Visual
Often this access is via a graphical user interface or GUI. Basic and C++ and a vast array of standard and proprietary
languages. Almost all include navigation features, graphical
Many standalone motion controllers allow connection of a menu options, and drag-and-drop workboards now largely taken
keyboard to accept programming. Others accept programming for granted. Such software also allows the export and conversion
through simple smartkeys or a GUI screen (increasingly in the form of motion programming for further development. In fact, recent
of a touchscreen) built right into an accessible side of the controller years have seen a growing emphasis on open and reusable
housing. These GUIs for simpler setups often let engineers write programming to support future design changes, adaptations,
and edit controls and monitor connected motion builds in real time and troubleshooting.
— which is helpful during prototyping and initial setup.
To enhance compatibility, most motion-controller suppliers
include software called motion application programming
The simplest motion controllers run routines written interfaces or APIs (as well as API libraries) with their hardware.
for the system hardware and application in proprietary Recall from computer-engineering basics that APIs are
languages. The problem with proprietary motion pieces of software allowing cross-program or cross-system
programming is that reconfiguration and upgrades are communications. Motion APIs are custom or prewritten motion
difficult to impossible routines, sample motion programs (including source code),

36 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Programming motion-control systems

Motion control has overtaken mechanical solutions for paper-


web spool tensioning and acceleration management, as
electronic systems allow for faster and more precise operations.

help files, and diagnostics tools that work in various application to simplify design work for OEMs and other engineering
development environments (ADEs). One caveat here is that APIs teams, though. User libraries give engineers higher-level
aren’t standardized, so they can be difficult to reuse or migrate programming tools … though some are still vendor-specific and
should the machine design change or be reengineered later. complicated to use. IEC 61131 has encouraged a lot of software
standardization. It dictates the form of most ladder-logic
A major factor in what motion software gets used for a design programming today and (in recent versions) motion extensions
depends on the engineers and end users involved. In some for motion programming in ladder. Of course, ladder isn’t the
cases, there may be existing programming expertise that drives most suitable choice for multi-axis motion.
software decisions. Elsewhere, design teams may enlist the help
of integrators or third-party service providers to decide on the
software when they build and (in some cases) even maintain the More on IEC 61131-3 languages
automated designs.
In some instances, IEC 61131-3 and other standards have
Where motion controls run off PLCs (or other hardware with soft even blurred the lines between discrete control (including
PLC functionalities) it’s increasingly common that programming motion control) and process control … as some hardware
is via PLCopen of IEC 61131 to leverage existing programming today can often effectively command both a flexibly selected
methods with which many engineers are already familiar — mix of languages. As briefly mentioned earlier, the IEC
including ladder logic and function-block diagrams. That said, 61131-3 standard for programmable controllers defines four
the evolution of motion controllers over the last several years languages and a partitioning convention so multiple types of
has increased the fluidity of what programming languages are programming in different languages can be used together. That
used where. That’s because more controller hardware today can accommodates (among other things) the way every engineer has
handle a greater number of functions than in the past … and a different methodology for programming.
there’s been real effort to leverage harmonized programming.
Sequential function chart (SFC): This is the highest-level code
standard in IEC 61131. It’s not technically a language but rather
Why so many different motion-control a means of partitioning code and visual display of the machine
programming tools? state or the mode in which a machine is currently running. States
can be initialization states … or going from an initialization state
The way in which motion controllers since the 1950s have
to a standby state … or shifting from that state to an automatic
evolved as a unique class of electronics. Their development
or even manual mode … and so on.
has been complicated by how different suppliers sell
different processor platforms — each with its own proprietary
programming language. Increased standardization continues

37 I www.motioncontroltips.com
www.aerotech.com
MOTION DESIGN GUIDE I MOTION CONTROLLERS

(continued)
Programming motion-control systems

SFC basically consists of diagrams showing how a machine Such layering of code with IEC 61131-3 and forethought about
should operate — serving as an operator layer that lets anyone all the ways in which different personnel will interact with the
approach and investigate sequential function charts and design makes machine builds more robust. Asking who will
immediately understand how the machine is supposed to run — ultimately read the code (and which language would be most
as well as processes associated with a part or material entering helpful for them to interpret what the program is trying to do)
the machine … and what the result will be and look like. Having also makes the design more accessible. Frameworks such as
these separate modes means engineers and operators can easily Packaging Machine Language (PackML) and guidelines abound
go into each and drill down to a “maintenance” layer. to make such layered code easier to write.

Ladder logic: Many engineers fear that IEC 61131-3 aims to Additional reading on motion-control programming
abolish ladder logic — though that’s simply not true. Many U.S. What is a motion profile?
engineers and maintenance technicians have a long history with What is meant by the term general motion control?
it. It’s a familiar and visual language that clearly displays sets What is a flying shear application in motion control?
of inputs, response actions in particular modes, and expected The basics of nested vector interrupt control
output. That’s a perfect maintenance layer because it clearly Instruction list (IL) falling out of favor
shows causal relationships — to let personnel troubleshoot and Fundamentals of modulo positioning
write code for the right aspect of the machine within that node Electronic camming basics
causing problems.
Languages for motion control: As mentioned, one key strength
The problem is that ladder limits other kinds of machine of programming with IEC 61131-3 is that it allows layering of
programming. Traditional designers program ladder logic code in multiple languages. That addresses the varied needs
in software such as C# and C++ as well as Python — visual of all personnel types who will ultimately need to operate and
languages that vastly complicate (or are incapable of) access the machine and its code. It also lets engineers get
advanced mathematics, data processing, and cross-component away from using one language for everything. After all, some
communication drivers. For such operations, it would take a languages work better for process-oriented tasks than discrete
programmer an inordinate amount of time to click and drag motion control, for example. The IEC 61131-3 environment lets
and create coils. Resulting programming would also be quite engineers blend even such disparate programming together. For
unwieldy — with rungs and rungs of visual code incredibly example, there’s accommodation of PLCopen motion-control
difficult to debug. function blocks (with PLCopen being another industry standard
to level the playing field for motion-control manufacturers) and
motion functions such as MC_Power to power drives and MC_
Prompting more standardization is IEC61131, which Jog to move motors.
dictates the form of much of today’s ladder-logic • One common approach is to create motion-control code in
programming and (in versions 3 and 4) extensions for structured text (ST). Staunch adherents to structured text feel
motion programming in the ladder environment. Only if ST excels in nearly every situation. However, a drawback can
the motion design has a single axis or is very simple is be less accessibility for technicians.

ladder logic acceptable. • Another common approach is to create motion-control


function blocks at the ladder level — especially where
maintenance personnel may need to understand and track
A better choice for more involved processes is function blocks. machine functions) or sequential function charts for higher-
The code lets programmers set an action and output action level perspectives on whole processes.
wrapped in a function block, because maintenance personnel
don’t necessarily need to see developer back-end code.
Programmers can put their structured text in that function block
and that in turn can be locked down to into a library. Such code
can be compiled and even protected as part of the OEM’s
intellectual property or IP in back-end structured text that end
users can’t access.

38 I www.motioncontroltips.com
www.aerotech.com
Precision Motion.
Made Easy.

Aerotech’s Automation1 motion control platform powers


some of the most precise processes in operation all over
the world. Yet, it is very simple to use and easy to integrate.
Reduce your risk with the variety of software, controller, and
high-performance drive options available with Automation1.

Make your precision motion easier at


aerotech.com/automation1

You might also like