PLCopen motion control

A free, open fieldbook on PLCopen motion control. It starts with one axis and a single move, and finishes with cams, coordinated paths and getting a machine back after a fault. Every chapter has something you can run.

PLCopen state diagram and axis wiring

What you will learn to do

Move an axis to a target

Choose an absolute or relative move, then use Busy and Done to decide when the machine sequence can continue.

Choose speed and acceleration

Compare motion profiles to see how your settings change travel time and the way an axis starts and stops.

Make position match the machine

Work out how encoder counts, a gearbox and screw pitch become millimetres of carriage travel.

Understand coordinated motion

Explore gearing, cams and two-axis paths with mathematical models before working with a controller library.

Why a standard for motion?

Before PLCopen, every drive vendor had its own way to say "go to 200 mm". Moving a program from one controller to another meant rewriting the motion layer, and often the whole sequence around it.

PLCopen Motion Control Part 1 fixed the vocabulary: one state machine per axis, and blocks like MC_Power, MC_MoveAbsolute and MC_Stop with the same Execute, Done, Busy and Error handshake everywhere. Beckhoff, CODESYS, Siemens, Omron and others follow it, each with their own extras.

The standard does not make vendors identical. Error codes, buffering details and timing differ. What it gives you is a shared way of thinking, and that is what this book teaches.

Simulators

  • Live axis. Real MC_Power, MC_MoveAbsolute, MC_Halt and MC_Stop running on the TryPLC motion engine.
  • Profile shaper. Drag velocity and acceleration and watch the trapezoid stretch or turn into a triangle.
  • Scaling bench. Encoder counts to millimetres through gearbox and screw pitch.
  • Gear and cam. A slave axis following a master, ratio by ratio, point by point.
  • Path planner. Two axes moving together along a line, with the completion shown live.
  • Load sizing. Force, screw efficiency and pitch turned into required motor torque.

Learning path

  1. First axis. Power, home and move one axis. Read the handshake.
  2. Profiles. Velocity, acceleration and jerk, and what they cost in time.
  3. Units. Counts, millimetres, screw pitch and gearboxes.
  4. Stop and recover. Stop, Halt, ErrorStop, Reset and safe restarts.
  5. Synchronize. Electronic gearing and cams following a master.
  6. Capstone. A full machine sequence with faults to handle.

Course contents

  1. What an axis actually controls

    Trace a command from PLC to carriage, and decide what encoder feedback can prove.

  2. Units, encoders and screw pitch

    Convert counts to millimetres, check direction and understand the reference offset.

  3. Axis states and drive enable

    Read the state machine before issuing commands or attempting fault recovery.

  4. Execute, Busy, Active and Done

    Follow one command across scans and separate completion, interruption and refusal.

  5. Positioning and continuous travel

    Choose absolute, relative, additive or velocity commands for a machine requirement.

  6. Acceleration, braking and jerk

    Calculate short-move profiles and see how jerk changes the time needed for travel.

  7. Stopping, pausing and restarting

    Release the Stop lock deliberately and understand why Halt can be interrupted.

  8. Queues and blended moves

    Choose BufferMode, inspect ownership and avoid late commands at a segment boundary.

  9. Homing and coordinate validity

    Design a bounded reference search and distinguish calibration from changing a number.

  10. Registration and position capture

    Relate sensor delay to position error and keep every capture attached to its product.

  11. Master axes and electronic gearing

    Calculate signed ratios and plan coupling, synchronization and decoupling.

  12. Electronic cams and phase

    Design rise, dwell and return while checking slope, acceleration and periodic joins.

  13. Groups and coordinated paths

    Separate path speed from axis speed and choose the correct coordinate system.

  14. Sizing, following error and tuning

    Calculate load torque, inspect cycle duty and separate mechanics from control-loop symptoms.

  15. Diagnostics and recovery sequences

    Give each axis one owner and recover from failed, aborted and incomplete operations.

  16. Build a transfer-cell sequence

    Specify a complete machine cycle, its acceptance tests and its safety boundaries.

Start with a carriage and a destination

A PLC can turn on an output in one scan. Moving a carriage to a fixture takes many scans, a defined coordinate and a drive that can follow the requested dynamics. PLCopen motion blocks give that operation a lifecycle: the request is accepted, runs, finishes or reports why it did not finish.

The chapters begin with the command path and the evidence supplied by an encoder. From there, work through scaling, axis states and the difference between asking for motion and owning a motion command. Those basics explain a surprising number of commissioning problems: an axis that is stationary but locked, a target changed after acceptance, or a successful move that never transferred its product.

The machine examples use a horizontal screw-driven carriage, a strip feeder, a packaging jaw and an XY gantry. Their requirements differ. A fixture needs an absolute coordinate. A feeder may need an increment tied to a registration mark. A jaw follows a cam, and a dispenser needs a path rather than two unrelated axis endpoints. Choosing a block starts with that requirement.

From single-axis commands to a machine sequence

The middle chapters cover velocity, acceleration, braking, jerk, Halt, Stop and queued operations. Calculate the requested profile before expecting a short stroke to reach full speed. Follow command outcomes before allowing the machine to advance. Homing and registration then establish how a coordinate becomes connected to a physical datum or a product event.

Later chapters examine gearing, electronic cams and coordinated groups. A ratio or cam table produces a demand, but the motor still has torque, speed and thermal limits. The sizing and diagnostics chapters connect those demands to mechanics, following error and a recoverable machine sequence.

What each bench can establish

The single-axis bench uses TryPLC's existing motion runtime. Its commands are real runtime operations with target latching, axis ownership, Aborting behavior and a Stop lock. Step one scan to inspect an event or run scans to watch travel. Its model has no physical drive faults, end stops or sensor-based homing sequence, and its outputs do not reproduce every vendor timing detail.

The scaling, profile, gear/cam, path and sizing benches are analytic teaching models. They make calculations inspectable without claiming to execute unsupported PLCopen blocks. Buffering, gear engagement, cam selection, group ownership and hardware capture need lifecycle tests in the chosen vendor runtime.

Every chapter includes machine reasoning exercises and two checked questions. Local progress records reading and passed checks separately. Completing a quiz is evidence that you answered those questions; it is not a commissioning qualification.

Ordinary motion logic is not a safety function. Before working on physical equipment, use the machine's risk-assessed safety arrangement, current manufacturer documentation and approved validation procedures. The final chapter asks you to document those boundaries alongside the transfer-cell sequence.