Servo Motor Control: How It Works and How a PLC Drives a Servo (2026)
How servo motor control works — closed-loop feedback, the servo drive, position/velocity/torque modes — and how a PLC commands a servo drive in industrial automation.
What Is Servo Motor Control?
Servo motor control is a closed-loop method of precisely commanding the position, velocity, or torque of a motor. A feedback device — most commonly a rotary encoder — continuously measures the motor's actual state and reports it back to a controller that calculates the difference between commanded and actual values, then corrects in real time. The result is motion that follows a commanded profile with far greater accuracy than an open-loop system can deliver.
In plain terms: you tell the system where to go (or how fast, or with how much force), a sensor watches where the motor actually is, and the controller keeps adjusting the drive output until the error is zero. That loop closes thousands of times per second.
This article covers the full picture — from the fundamental closed-loop mechanism through the hardware components, control modes, and PID tuning basics — and then digs into the part that general-electronics pages skip: how an industrial PLC commands a servo drive over a real-time fieldbus using PLCopen motion function blocks.
What Is a Servo Motor?
A servo motor is a rotary (or linear) actuator designed specifically for use within a closed-loop control system. It differs from a general-purpose AC induction motor in three key ways:
- Integrated or external feedback: most servo motors carry a high-resolution encoder (optical or magnetic) on the rear shaft or inside the end cap. Encoder resolutions of 17–23 bits per revolution are common in modern industrial units.
- Low inertia rotor: the rotor is designed to accelerate and decelerate rapidly. A low inertia-to-torque ratio is essential for positioning and profiling applications.
- Full torque at low speed: servo motors maintain rated torque across the full speed range, including zero RPM. This is in contrast to AC induction motors, which lose torque dramatically at low speeds without specialized vector control.
Most industrial servo motors are permanent magnet synchronous motors (PMSM) or brushless DC (BLDC) designs, because both allow precise torque control through current regulation. Brush-type DC servos still appear in legacy equipment but are rare in new designs.
Hobby servos vs industrial servos — A small hobby servo (the kind connected to an Arduino) bundles the motor, gearbox, potentiometer feedback, and a simple PWM-driven control circuit into one sealed unit. Industrial servos are separate motors paired with a standalone servo drive. The principle is identical; the scale, precision, and communication method are not. The rest of this article focuses on the industrial variant.
How Servo Motor Control Works: The Closed-Loop Feedback Loop
Understanding servo motor control requires understanding the feedback loop. Five elements participate in every cycle:
- Controller (PLC or motion controller) — generates the motion command (target position, speed profile, or torque setpoint).
- Servo drive (amplifier) — receives the command, runs inner control loops, and converts it into three-phase current to the motor windings.
- Servo motor — converts electrical current into mechanical torque and rotation.
- Feedback device (encoder/resolver) — measures the actual shaft position or velocity and sends that data back.
- Error calculation — the difference between commanded and actual values. The controller uses this error to compute a corrective output.
┌─────────────────────────────────────────────────────────┐
│ COMMAND SIGNAL │
│ (position / velocity / torque setpoint) │
└───────────────────────┬─────────────────────────────────┘
│
▼
┌──────────────────┐
│ Servo Drive │◄─────────────────────┐
│ (amplifier + │ │
│ inner loops) │ │
└────────┬─────────┘ │
│ 3-phase current │
▼ │
┌──────────────────┐ ┌───────────────────┐
│ Servo Motor │──shaft────►│ Encoder/Resolver │
│ (PMSM / BLDC) │ │ (position/speed) │
└──────────────────┘ └─────────┬─────────┘
│
Actual position
fed back to drive
(and to PLC)
The drive's inner current loop runs at switching frequency (typically 4–16 kHz). The velocity loop closes around that at 1–4 kHz. The position loop, which the PLC or motion controller typically closes, runs at 250 Hz to 1 kHz. Each nested loop corrects a different aspect of behavior. This cascade control architecture is what makes servo systems so stiff and precise.
The Role of the Error Signal
At every control cycle the drive computes: Error = Setpoint − Actual feedback. A PID controller (proportional-integral-derivative) converts that error into a corrective output. For a deep dive on PID tuning in PLC environments, see the PLC PID tuning complete guide. In servo drives, three separate PID loops — current, velocity, position — each have their own gain parameters, which is why servo commissioning involves tuning multiple sets of gains rather than one.
Components of a Servo System
| Component | Function | Typical Technology |
|---|---|---|
| Servo motor | Converts current to torque and rotation | PMSM, BLDC |
| Encoder / feedback device | Measures shaft position, speed | Incremental encoder, absolute encoder, resolver |
| Servo drive (amplifier) | Closes inner loops, powers motor | IGBT inverter, DSP-based controller |
| PLC / motion controller | Generates motion profiles, closes position loop | IEC 61131-3 PLC, dedicated motion controller |
| Fieldbus / network | Real-time command and feedback link | EtherCAT, PROFINET, EtherNet/IP |
| Mechanical load | Actuated machine element | Ball screw, rack and pinion, conveyor, robot joint |
Encoder vs Resolver: Choosing a Feedback Device
Incremental encoders generate a pulse train proportional to shaft movement. They are low-cost and high-resolution but lose absolute position on power loss, requiring a homing sequence at startup.
Absolute encoders report a unique position value for every shaft angle, even after power cycling. Multi-turn absolute encoders extend this across many rotations, eliminating homing in most applications. Modern absolute encoders communicate over serial protocols (EnDat, HIPERFACE, BiSS-C) rather than parallel wires.
Resolvers are transformer-based analog devices with no electronics in the motor body. They tolerate high vibration, shock, and temperature extremes where optical encoders would fail. For a detailed technical comparison see the encoder vs resolver reference.
Servo Motor vs Servo Drive: Clearing Up the Confusion
One of the most common search questions around this topic is "servo motor vs servo drive" — and the confusion is understandable because marketing copy often treats them as interchangeable.
They are not the same thing. Here is the distinction:
| Term | What it is | What it does |
|---|---|---|
| Servo motor | The electromechanical actuator (motor + encoder) | Produces mechanical torque and rotation; feeds back position/speed |
| Servo drive | The power electronics + control computer | Accepts motion commands from the PLC, closes current and velocity loops, and supplies regulated current to the motor |
Think of the servo drive as the brains-and-muscle between the PLC and the motor. The PLC decides where the motor should go; the servo drive makes that happen by rapidly switching current through the motor windings.
When vendors sell a "servo system" they typically mean the matched drive-motor pair. The motor and drive are usually specified together because the drive firmware is parameterized for the specific motor's electrical and mechanical characteristics (inductance, resistance, inertia, encoder resolution). Mismatching drive and motor is a common commissioning pitfall.
Servo Control Modes: Position, Velocity, and Torque
Every servo drive operates in one of three fundamental control modes. The PLC or motion controller selects the appropriate mode for the application.
1. Position Control Mode
The drive accepts a target position command (in encoder counts or engineering units) and moves the motor to that exact location. The position loop closes either inside the drive (drive-based positioning) or in the PLC (PLC-based positioning with cyclic position commands over fieldbus).
Applications: CNC machine axes, pick-and-place robots, indexing tables, press positioning, semiconductor wafer handling.
Key parameter: Following error — the allowable deviation between commanded and actual position during a move. Exceeding the following error limit triggers a fault.
2. Velocity Control Mode
The drive accepts a speed setpoint and regulates motor speed regardless of load variations. This is analogous to VFD speed control, but with much tighter dynamic response and the added precision of encoder feedback. For a direct comparison to VFD-based motor control, see the VFD programming and PLC control guide.
Applications: Winding and unwinding machines, conveyor synchronization, spindle drives, test benches.
Key parameters: Speed regulation bandwidth, acceleration/deceleration ramp rates.
3. Torque Control Mode
The drive accepts a torque setpoint and regulates motor current to deliver that torque regardless of resulting speed. The position and velocity loops are open in this mode.
Applications: Tension control, torque-limiting presses, friction weld heads, load simulation, robot joint torque control.
Key consideration: Torque mode requires an external constraint on speed or position (either mechanical or from the PLC) to prevent runaway.
Dual-Loop and Multi-Mode Operation
Real industrial axes often switch modes mid-cycle. A winder axis, for example, might run in velocity mode during acceleration and then switch to torque mode to maintain web tension at constant line speed. The PLC's motion program manages these transitions.
PID Gains and Servo Tuning Basics
Servo drives expose multiple sets of PID gains — typically separate gains for the current loop, velocity loop, and position loop. The current loop gains are usually set by the drive's auto-tuning routine (which injects test signals and measures motor electrical parameters). The velocity and position loops require manual or assisted tuning.
Key gain parameters to understand:
- Position loop proportional gain (Kp): Stiffness. Higher Kp pulls the axis toward the setpoint faster, but too high causes oscillation or instability.
- Velocity loop proportional gain (Kv): How aggressively the drive responds to speed error. Must be balanced with the mechanical resonance of the load.
- Velocity loop integral gain (Ki): Eliminates steady-state speed error. Too high causes instability.
- Velocity feedforward: Reduces following error during motion by commanding a proportional drive output without waiting for error to build. Most industrial drives support both velocity and acceleration feedforward.
Inertia mismatch is the single biggest tuning challenge. When the load inertia is much greater than the motor rotor inertia (ratio above ~10:1), the system becomes difficult to tune and the achievable bandwidth drops. In these cases a gearbox or a larger motor is the engineering solution, not higher gains.
PLC Servo Control: The Industrial Reality
The sections above cover servo fundamentals that apply from hobby RC systems to machining centers. Now for the angle that most web pages on this topic skip entirely: how a PLC actually commands a servo drive in an industrial plant.
The Architecture: PLC → Fieldbus → Servo Drive → Motor
In industrial automation, the PLC does not send raw PWM signals to a servo motor. That is the hobby-electronics model. Instead:
- The PLC runs a motion program written in IEC 61131-3 (typically Structured Text or Function Block Diagram) and sends cyclic position or velocity commands over a real-time industrial fieldbus.
- The servo drive receives those commands every fieldbus cycle (typically 1–4 ms for EtherCAT, 2–8 ms for PROFINET IRT) and closes the inner control loops at much higher rates.
- The drive returns actual position, actual velocity, status word, and fault codes back to the PLC every cycle.
The fieldbus protocols used for servo motion control are discussed in detail in the EtherCAT protocol tutorial. EtherCAT is the dominant choice for high-axis-count or high-bandwidth motion systems due to its distributed clock synchronization (jitter < 1 µs across all drives on the network). PROFINET IRT and EtherNet/IP with CIP Motion are common alternatives in Siemens and Rockwell ecosystems respectively.
PLCopen Motion Control Function Blocks
PLCopen is the international standard (IEC 61131-3 extension) that defines a vendor-neutral library of motion function blocks. Using PLCopen function blocks means motion code written for a Beckhoff TwinCAT servo system is conceptually identical to code written for Siemens S7 or B&R. The most important function blocks are:
| Function Block | Purpose |
|---|---|
MC_Power |
Enable/disable the drive axis |
MC_Home |
Execute a homing sequence |
MC_MoveAbsolute |
Move to an absolute position at specified velocity |
MC_MoveRelative |
Move a specified distance from current position |
MC_MoveVelocity |
Run at constant velocity (velocity mode) |
MC_Stop |
Controlled deceleration stop |
MC_Halt |
Halt with deceleration; axis remains enabled |
MC_ReadActualPosition |
Read current actual position |
MC_ReadStatus |
Read current axis state |
MC_SetPosition |
Overwrite the position register (use with care) |
Each function block has an Execute input that triggers on a rising edge, a Done output that pulses when the command completes, and a Busy output that is high while the block is active. Error handling uses the Error and ErrorID outputs.
Worked Conceptual Example: Moving a Servo Axis to a Pick Position
The following Structured Text example illustrates a simple pick-position move. Vendor-specific details (axis name, units configuration) vary by platform, but the PLCopen structure is universal.
(* Axis declaration — configured in the hardware tree *)
VAR
PickAxis : AXIS_REF;
fbPower : MC_Power;
fbHome : MC_Home;
fbMoveAbs : MC_MoveAbsolute;
bEnable : BOOL := FALSE;
bStartHome : BOOL := FALSE;
bStartMove : BOOL := FALSE;
rPickPosition : LREAL := 150.0; (* mm *)
rMoveVelocity : LREAL := 200.0; (* mm/s *)
rAcceleration : LREAL := 500.0; (* mm/s² *)
rDeceleration : LREAL := 500.0; (* mm/s² *)
END_VAR
(* Enable the axis drive *)
fbPower(
Axis := PickAxis,
Enable := bEnable,
EnablePositive := TRUE,
EnableNegative := TRUE
);
(* Homing sequence — runs once after power-up *)
fbHome(
Axis := PickAxis,
Execute := bStartHome,
HomingMode := MC_HomingMode.MC_Direct (* or limit-switch mode *)
);
(* Absolute move to pick position *)
fbMoveAbs(
Axis := PickAxis,
Execute := bStartMove,
Position := rPickPosition,
Velocity := rMoveVelocity,
Acceleration := rAcceleration,
Deceleration := rDeceleration,
BufferMode := MC_Aborting
);
(* Status feedback *)
(* fbMoveAbs.Done => move complete, at position *)
(* fbMoveAbs.Error => check fbMoveAbs.ErrorID *)
In practice, a state machine (CASE statement) sequences these function blocks: wait for power-on acknowledgment, trigger homing, wait for home complete, then accept move commands from the process logic. For the motor start/stop sequencing fundamentals that underpin this state machine approach, see the motor start/stop ladder logic tutorial.
Homing: Why It Matters
An incremental encoder does not know absolute position at power-up. The drive knows only that the encoder is at "position zero" relative to wherever the motor happened to be when the drive was enabled. A homing sequence drives the axis to a known reference — usually a limit switch or dedicated home switch — and then sets that location as the coordinate origin.
Common homing methods in PLCopen (HomingMode):
| Mode | Method |
|---|---|
MC_Direct |
Declare current position as home (use only with absolute encoders or after mechanical hard stop) |
MC_Limit |
Drive to limit switch, back off, declare position |
MC_Home |
Drive to dedicated home sensor, index pulse, back off |
MC_AbsSwitch |
Use absolute encoder position directly |
Skipping or incorrectly implementing homing is a major source of servo crashes during commissioning. The axis state machine must enforce that a successful home is recorded before any absolute moves are permitted.
Cyclic Synchronous Position Mode (CSP)
For high-performance multi-axis coordination — gantry systems, robot kinematics, electronic gearing — the PLC typically operates the drive in Cyclic Synchronous Position (CSP) mode rather than issuing single-move commands. In CSP mode:
- The PLC's motion kernel generates a new position setpoint for every drive every fieldbus cycle (e.g., every 1 ms with EtherCAT).
- The interpolation and profile generation happen entirely in the PLC; the drive simply tracks the setpoint stream.
- Multi-axis synchronization is inherent because all setpoints are computed from the same trajectory planner in the same PLC cycle.
CSP mode requires a deterministic, low-jitter fieldbus — EtherCAT's distributed clock mechanism is designed specifically for this. For the motion control basics foundation that explains trajectory planning and interpolation, see that reference guide.
Servo Motor Control in Practice: Key Commissioning Checklist
Before running production moves, work through the following on any new servo axis:
- Verify motor-drive match — confirm the drive parameter set matches the motor model (inductance, resistance, encoder resolution, rated current).
- Check wiring polarity — encoder A/B phase polarity and motor phase sequence must match. A reversed encoder phase causes immediate runaway.
- Configure axis units — define the relationship between encoder counts and engineering units (mm, degrees). Errors here produce moves that are off by a factor of 2π or a gear ratio.
- Set software travel limits — configure positive and negative software over-travel limits before enabling moves.
- Run auto-tune — most drives offer a current-loop and velocity-loop auto-tune routine that identifies motor electrical parameters.
- Verify homing — confirm the homing sequence reaches the correct reference and that the resulting position offset is repeatable across power cycles.
- Test at low speed first — run initial test moves at 10–20% of rated velocity before full-speed profiling.
- Check following error — monitor following error during motion; high values indicate insufficient drive output, mechanical binding, or aggressive profiling.
For systematic fault-finding on commissioned axes, the PLC troubleshooting complete guide covers the diagnostic methodology applicable to servo motion faults.
Servo Motor Control vs VFD Motor Control
A common architectural question is whether to use a servo drive or a VFD for a given axis. The table below captures the key trade-offs:
| Characteristic | Servo Drive + Servo Motor | VFD + AC Induction Motor |
|---|---|---|
| Positioning accuracy | High (encoder-based, sub-mm typical) | Low (requires encoder add-on for positioning) |
| Speed range | Full torque from 0 RPM | Limited torque below ~5 Hz without derating |
| Dynamic response | High bandwidth (100–1000 Hz position loop) | Lower bandwidth |
| Cost | Higher (motor + drive + encoder) | Lower for equivalent continuous power |
| Best fit | Positioning, profiling, synchronization | Variable-speed process loads (pumps, fans, conveyors) |
| Typical fieldbus | EtherCAT, PROFINET IRT, CIP Motion | Modbus RTU/TCP, PROFINET, EtherNet/IP |
Both technologies sit within the broader motion control basics framework. Choosing between them is fundamentally a question of what the process demands: high-cycle positioning favors servos; variable-speed continuous loads favor VFDs.
Frequently Asked Questions
How does servo motor control work?
Servo motor control works through a closed-loop feedback system. A controller (PLC or motion controller) sends a position, velocity, or torque command to a servo drive. The drive powers the motor and simultaneously reads the encoder's real-time position or speed data. It continuously computes the error between commanded and actual values and adjusts the motor current to reduce that error to zero. This loop closes thousands of times per second, producing highly accurate, repeatable motion.
What is the difference between a servo motor and a servo drive?
A servo motor is the electromechanical actuator — the physical motor plus its integrated or mounted encoder. It produces torque and rotation and sends position/speed feedback to the drive. A servo drive (also called a servo amplifier) is the power electronics and control computer that receives motion commands from the PLC, closes the current and velocity control loops, and delivers regulated three-phase current to the motor. You cannot operate an industrial servo motor without a matching servo drive; they are two separate components that work together as a system.
How do you control a servo motor with a PLC?
In industrial automation, a PLC controls a servo motor through a servo drive over a real-time fieldbus such as EtherCAT, PROFINET, or EtherNet/IP. The PLC runs PLCopen motion function blocks — for example, MC_MoveAbsolute for positioning moves — and sends cyclic setpoint commands to the drive every 1–4 ms over the network. The drive closes the inner control loops (current, velocity) and returns actual position, speed, and status back to the PLC. The PLC never directly drives the motor windings; that is entirely the servo drive's responsibility.
What are the three control modes of a servo?
The three fundamental servo control modes are: (1) Position control — the drive moves the motor to a commanded target position and holds it; (2) Velocity control — the drive regulates motor speed to a commanded setpoint regardless of load; (3) Torque control — the drive regulates motor current (and therefore output torque) to a commanded value regardless of resulting speed. Industrial servo drives can typically switch between modes under PLC command during operation.


