learn · South Africa
Motion control basics: positioning, gearing, servo vs VFD
Motion control basics for SA controls engineers — relative-position move on a motion axis, MC_MoveRelative call, and servo vs VFD cost-accuracy trade.
Motion control basics are the part of the controls discipline where the price tag is decided by accuracy, not by horsepower, and where the engineer who reaches for a servo on every conveyor pays four times as much as the engineer who reaches for a VFD with encoder feedback on the same conveyor. The simulator's motion module drives a single axis through a relative-position move — 100 mm at 50 mm/s with deceleration over the last 20 mm — and stops within 50 micrometres of target. A VFD-driven conveyor doing the same nominal move stops within 5 mm of target. The 100x accuracy difference justifies the 4 to 5x cost on a packaging head; it does not justify it on a flighted conveyor. This tutorial walks the trajectory, the function-block call, and the decision rule.
Try the simulator →Why this matters on real plants
Motion is everywhere on a packaging or assembly line and the choice of drive — servo, stepper, VFD, hydraulic — drives a chunk of the bill of materials. A servo system for a 1 kW axis on a packaging line lands at roughly R45,000 to R60,000 for the drive plus motor plus cabling plus motion-card slot in the PLC; a VFD with an encoder option for the same axis lands at roughly R10,000 to R14,000. The price gap is 4 to 5x, and on a line with twelve axes the gap is the difference between a R150,000 motion bill and a R600,000 motion bill. The engineer who can specify each axis correctly — servo where positioning accuracy is needed, VFD where it is not — saves the project the price of a small car.
The cost of getting the choice wrong is two-sided. A line that uses VFDs where servos are needed runs in spec until the line speed climbs and the positioning error exceeds the product tolerance — the labels start landing 6 mm low, the cap-tightener misses the bottle, the print head smears across the corner. The line is slowed down, the OEE drops, and three years later somebody buys servos as a retrofit at twice the original installed cost. A line that uses servos where VFDs would do is over-specified, over-priced, and over-complicated — every servo axis carries a homing routine, a tuning ritual, and a cabling discipline that the maintenance team has to learn for no real benefit. Both errors are common; the first is more visible, the second is more expensive in the long run.
The third reason it matters more on SA brownfield plants than on greenfield textbook examples: the installed base is mixed and mismatched. A line commissioned in 2008 with mechanical cams and a single VFD on the main motor has been retrofitted in 2014 with a servo on the indexer, again in 2019 with a second servo on the labeller, and the current engineer is asked to add a third axis on the cap-tightener. The decision is no longer "servo or VFD" in isolation; it is "servo or VFD that will integrate with the existing cabinet, the existing safety chain, the existing PLC's available motion-card slots, and the existing maintenance team's vendor familiarity". Reading the actual installed base before specifying anything is the first move.
The mental model
A motion axis has four quantities that control it: position (where the load is, in millimetres or revolutions or some other unit), velocity (how fast the position is changing, in units per second), acceleration (how fast the velocity is changing, in units per second squared), and jerk (how fast the acceleration is changing — usually called acceleration ramp in the function-block parameters). A motion command tells the axis where to go and how fast to get there; the motion runtime computes a smooth trajectory through position, velocity, and acceleration, respecting the configured limits, and the drive closes the position loop on the encoder feedback to keep the load on the trajectory.
The mental separation is between commanded position (where the program asked for, before any limiting), target position (where the trajectory ends after the limits are applied), and actual position (where the encoder reads the load is). The difference between commanded and target is "the motion runtime is protecting you from a velocity-acceleration profile the drive cannot deliver". The difference between target and actual is "the position error", which the drive controls down toward zero through the position loop. A well-tuned axis at rest sits with position error in the range of 1 to 10 micrometres on a 25-bit absolute encoder; an axis at peak velocity might run 0.1 to 1 mm of dynamic position error which closes back to micrometres at the end of the move.
Servo versus VFD is a question about closed-loop versus open-loop on position. A servo system has an encoder on the load (or on the motor with a known mechanical ratio), the drive closes the position loop at typically 1 kHz or faster, and the achievable accuracy is set by the encoder resolution and the mechanical play in the drivetrain — typically 0.05 mm or better on a well-built axis. A VFD running open-loop drives the motor to a commanded speed but does not know where the load is; an encoder added to the VFD's feedback loop closes the speed loop more tightly and gives speed accuracy down to 0.1 percent, but the position is still not directly controlled — the load arrives at "approximately the right place" with an error set by the integration of the speed error over time, typically 1 to 5 mm on a packaging-line conveyor. The 100x position accuracy difference is real and is what you are paying for when you choose servo over VFD.
Gearing — the relationship between motor revolutions and load movement — is the other quantity that decides whether the chosen drive can deliver the move. A servo with a 100:1 gearbox driving a 5 mm pitch ballscrew gives 0.05 mm per motor revolution, and a 25-bit encoder on the motor gives 0.0000015 mm of resolution at the load — wildly more than needed, but the headroom matters because backlash in the gearbox can swallow the first 0.01 mm of every direction reversal. A VFD driving a belt conveyor with a 1:1 sprocket and a 200 mm pulley gives 200pi mm per motor revolution — about 628 mm per turn — and the position error per unit time scales accordingly. The mechanical ratio is what turns drive accuracy into load accuracy, and the calculation needs to be done before the drive is specified.
Worked example
Open the simulator. Drop a CompactLogix CPU on the rack with a DI16, a DO16, an AI8, and a motion-axis card (the motion card is the one called out in the architecture diagram — internally it implements the SERCOS or EtherNet/IP motion profile, externally it slots into the CompactLogix backplane like any other module). Configure the axis as a linear axis with a 5 mm pitch ballscrew and a 1:1 direct-coupled servo motor; the resolution at the load is 5 mm per revolution, and a 24-bit encoder gives about 0.0000003 mm per encoder count, which is more resolution than the mechanical play in the ballscrew can use.
Issue the move command — relative position 100 mm, velocity 50 mm/s, acceleration 200 mm/s², deceleration 200 mm/s². The trajectory the motion runtime computes runs in three phases: an acceleration phase from rest to 50 mm/s taking 0.25 seconds and covering 6.25 mm; a constant-velocity phase from 6.25 mm to 73.75 mm taking 1.35 seconds at 50 mm/s; a deceleration phase from 73.75 mm to 100 mm taking 0.5 seconds and covering 26.25 mm; and a final settling phase where the position loop pulls the actual position to within the in-position window (typically 50 micrometres) before the move-complete bit goes high. Total move time is roughly 2.1 seconds. The trajectory plot in the simulator shows velocity rising in a straight line, holding flat at 50 mm/s, falling in a straight line, and settling at zero velocity at the target.
The function-block call to issue the move, written as Structured Text against the IEC 61131-3 PLCopen motion library, looks like this:
(* Single-axis relative move — packaging head, 5 mm pitch screw *)
(* MC_MoveRelative is part of PLCopen Motion Function Blocks Pt 1 *)
VAR
AxisX : AXIS_REF;
moveDone : BOOL;
moveBusy : BOOL;
moveError : BOOL;
errorID : DWORD;
END_VAR
MC_MoveRelative_X(
Axis := AxisX,
Execute := MoveTrigger,
Distance := 100.0, (* mm *)
Velocity := 50.0, (* mm/s *)
Acceleration := 200.0, (* mm/s^2 *)
Deceleration := 200.0, (* mm/s^2 *)
Jerk := 1000.0, (* mm/s^3 *)
BufferMode := MC_Aborting, (* override any in-progress move *)
Done => moveDone,
Busy => moveBusy,
Error => moveError,
ErrorID => errorID
);
IF moveDone THEN
NextStep := TRUE;
END_IF;
IF moveError THEN
LogFault(errorID);
AxisFaulted := TRUE;
END_IF;
Now compare to a VFD-driven conveyor doing the nominal "move 100 mm" command. The VFD has a 0.1 percent speed accuracy and runs open-loop on position; the program issues a "run forward at 50 mm/s for 2 seconds" command and stops the motor at the end. The actual stop position depends on the load inertia, the deceleration ramp, the speed accuracy, and the encoder feedback if present — and lands somewhere in the range of plus or minus 5 mm of the nominal 100 mm target. For a flighted conveyor advancing bottles to the next station, where the next station's bottle gripper has a 20 mm capture window, plus or minus 5 mm is fine; for a packaging head landing a label on a bottle with a plus or minus 1 mm tolerance, plus or minus 5 mm is wildly out of spec and the line produces reject product.
The decision rule that drops out of the comparison: if the move tolerance is plus or minus 1 mm or tighter, specify a servo. If the move tolerance is plus or minus 5 mm or looser, specify a VFD with encoder feedback. The grey zone between 1 and 5 mm is where the engineer's judgement lives — on a low-cycle axis where stopping precisely matters, a servo earns its cost; on a high-cycle axis where stopping precisely is nice but not mandatory, a VFD earns its cost. The 4 to 5x price ratio between the two is roughly constant; the value the higher accuracy delivers is what changes from axis to axis. The full rand-and-accuracy breakdown behind that rule, axis type by axis type, is on the servo vs VFD with encoder comparison page.
Common mistakes
-
Using VFD where positioning accuracy is critical. The cost-saving on the drive comes back as scrap product when the labels miss the bottle by 6 mm. Always specify a servo when the move tolerance is tighter than plus or minus 2 mm; the cost premium pays back on the first month of avoided reject product. The temptation to "use what we already have" is real on brownfield retrofits — resist it on tolerance-driven axes.
-
Running servo without homing on power-up. A servo with an incremental encoder loses its absolute position on every power cycle; the program does not know where the load is until a homing routine has been run. Issuing a relative move with the homing not complete drives the load into the end stop, breaks the limit switch, and on a heavy axis bends the ballscrew. Always block all motion commands until the homing-complete bit is true, on every power-up, and route the homing-incomplete state to an HMI alarm so the operator knows why the axis is not moving.
-
Exceeding velocity-acceleration profile on the load — drive faults at runtime. A motion command that asks for 50 mm/s with 200 mm/s² acceleration on an axis whose drive can only deliver 100 mm/s² before the current limit hits will fault the drive at runtime, mid-move, with the load partway to target. Always verify the chosen profile against the drive's continuous and peak current ratings, the motor's torque curve, and the load's inertia — the vendor's motion sizing tools (Rockwell Motion Analyzer, Siemens TIA Selection Tool) compute this in seconds and prevent the surprise.
-
Forgetting cable shielding on servo encoder — intermittent position errors. The encoder cable on a servo carries sub-microsecond pulse trains at low voltage; an unshielded run alongside a 380 V VFD output cable for half a metre will couple enough noise into the encoder signal to produce intermittent position errors that look like mechanical play in the gearbox. Always specify shielded encoder cable, route it in a separate trunk from the power cabling (the segregation rule from the panel-layout tutorial applies), and ground the shield at the drive end only.
-
Ignoring backlash in the gearbox on bidirectional moves. A gearbox with 0.1 degree of backlash and a 100:1 ratio puts 0.001 degree of play at the load, which on a ballscrew with 5 mm pitch is 0.014 micrometres — fine for most applications. A gearbox with 1 degree of backlash puts 14 micrometres at the load, which starts to matter for tight-tolerance positioning. Always read the gearbox datasheet's backlash specification and add a backlash-compensation parameter in the motion configuration if the application requires it.
-
Treating motion as a free-standing subsystem — no integration with the safety chain. A servo axis that can move at 1 m/s is a hazard if a person can reach into its work envelope. Always integrate the axis enable into the safety chain — the run-permit from the safety PLC must be a hard precondition for motion enable — and configure the drive's safe-torque-off (STO) input to the safety output, so a safety event drops the axis to zero torque within the safety response time.
How to practise this in the simulator
The simulator's motion module ships with a single-axis demo, the trajectory plot, and a fault-injection panel that lets you exceed the velocity profile, disconnect the encoder, drop the homing complete bit, and inject the position errors that look like real-world problems. Issue the worked-example move, watch the trajectory unfold, then deliberately ask for an acceleration the drive cannot deliver and watch the runtime fault with a specific error code that maps to a Rockwell Motion error number. Switch the axis from servo to VFD-with-encoder mode and re-run the same nominal move; the simulator shows the position error growing during deceleration and the final stop landing 3 to 5 mm short or long of target. Twenty minutes of moves and faults teaches more about motion control basics than reading a motion-card datasheet.
Start the free tier →Vendor reference
The cross-vendor reference for the closed-loop position control concept is the Wikipedia: Servomechanism article, which sets out the classical position-loop, velocity-loop, and current-loop cascade that every modern servo drive implements. The Rockwell motion control product page lists the Kinetix servo drives, the motion-card slot options for CompactLogix and ControlLogix, and links to the Motion Analyzer sizing tool. The Siemens SINAMICS S210 and SIMOTION documentation cover the equivalent on the Siemens side. The PLCopen motion function block standard — referenced in the worked-example code above as MC_MoveRelative — is implemented across both vendors and across CODESYS-based platforms; reading the standard gives a vendor-portable understanding of what the function blocks actually do.
What we don't claim
This site is not SAQA-registered, not MerSETA-accredited, and not an NQF-registered qualification provider. Our completion certificates are course-level only — they describe what you covered, not an NQF Level X qualification. The CCST cert from ISA is the portable industry credential we recommend; we are not an ISA cert delivery partner either, but our cert packs are CCST-aligned. Motion control sizing for a real machine is a calculation that depends on the load inertia, the duty cycle, and the mechanical drivetrain — the simulator gives you the function-block patterns and the trajectory feedback, but the sizing for your real axis still needs the vendor's motion-sizing tool and the drivetrain mechanical specification.