The gap between a hobby motion controller and industrial firmware is not features. It is what happens when something goes wrong — and whether the timing behaviour has been measured rather than assumed.

The control loop, and what makes it industrial

Every servo controller does roughly the same thing each cycle: read feedback, compute error, apply a control law, write output. What separates industrial implementations is everything around that.

AspectHobby-gradeIndustrial-grade
Timing"Fast enough"Measured worst-case jitter
Control lawPIDPID plus feedforward
Following errorNot monitoredMonitored; faults on excess
Fault responseStop, or undefinedDefined safe state per fault class
WatchdogOften absentDrives disabled if loop stalls
DiagnosticsMinimalLogged, trendable, exportable
RecoveryPower cycleDefined resume paths

Feedforward: the largest single improvement

Pure feedback control is inherently reactive — it can only respond after an error exists. During acceleration, that lag produces substantial following error.

Feedforward supplies what the trajectory already knows. The planner knows the commanded velocity and acceleration at every instant, so command them directly rather than waiting for error to develop.

Practically: velocity feedforward typically removes most of the following error during constant-velocity motion, and acceleration feedforward addresses the remainder during acceleration. On contouring work this shows directly as improved accuracy at corners and on curves, without touching the mechanics.

Following error as the primary safety mechanism

In motion control, following error is the most informative single quantity you can monitor. It tells you the axis is not doing what it was told.

  • A collision shows as following error spiking immediately.
  • A stalled or faulted drive shows as error growing steadily.
  • Mechanical binding shows as error rising in one region of travel.
  • Encoder failure shows as error behaving nonsensically.

This is why a following-error limit is not optional. It is frequently the only thing standing between an unnoticed problem and mechanical damage. Set it tight enough to catch faults early and loose enough not to nuisance-trip during normal acceleration — which requires measuring normal behaviour first, not guessing.

Fault handling is most of the engineering

The happy path is straightforward. Industrial firmware is defined by its fault paths:

  1. Classify faults by severity — recoverable warning, controlled stop, immediate power removal.
  2. Define the safe state for each class. Uncontrolled coasting is rarely the right answer on a machine with a spindle engaged.
  3. Coordinate multi-axis stops. Stopping one axis instantly while others continue can be worse than a coordinated deceleration.
  4. Preserve state for diagnosis — capture the conditions at fault time so the cause is findable.
  5. Define recovery explicitly — what must be re-homed, what can resume, what requires operator confirmation.

The quality of motion firmware is visible only when something breaks. Everything else is arithmetic.

Where the loop should live

PlatformTypical jitterSuits
PREEMPT_RT LinuxLow, boundedPC-based control with rich HMI
Xenomai / dual-kernelVery lowTighter requirements on a PC
Dedicated MCUVery low, deterministicEmbedded controllers, machine builders
FPGAEffectively deterministicVery high loop rates
Stock desktop OSUnboundedNot suitable for the control loop

A common and sensible architecture puts the hard real-time loop on a dedicated MCU or real-time kernel, with a normal OS handling interface, files and networking — communicating through a buffer so the non-real-time side can never stall motion.

Fieldbus considerations

  • EtherCAT — the common choice for coordinated multi-axis; cycle times align well with control loops.
  • CANopen — widely supported, lower bandwidth, adequate for many machines.
  • Step/direction — simple and open-loop unless you add feedback separately.
  • Analogue velocity — legacy but still encountered in retrofits.

Whichever you use, the bus cycle must be synchronised with your control loop. Asynchronous sampling introduces jitter into the loop regardless of how deterministic your software is.

Prove the timing, do not assume it

  • Instrument the loop and record execution time distribution.
  • Report worst-case jitter under sustained load, not average under idle.
  • Run for hours — rare latency spikes are exactly the ones that matter.
  • Count overruns; the acceptable number is zero.
  • Verify at full axis count with the bus running, not on a bench with one axis.

Building motion control firmware or specifying it for a machine? Tell us the drives, axes and timing requirement. See our CNC controller service, real-time fundamentals, and trajectory planning.

Frequently asked questions

The difference between where an axis was commanded to be and where it actually is at that instant. Some following error is normal and predictable. A sudden increase means something is wrong — a collision, a stalled drive, or a mechanical problem — which is why monitoring it is the primary safety mechanism in motion software.
PID alone leaves significant following error during acceleration. Adding velocity and acceleration feedforward — commanding what the trajectory says the axis should be doing, rather than only reacting to error — typically reduces following error by an order of magnitude.
You often should; modern drives close position loops well. The controller's job is then coordinating axes, planning trajectory, and supervising. Closing the position loop in the controller makes sense when you need coordinated multi-axis behaviour the drives cannot provide independently.