PLC Sim Lab
Field devices

Controlling a servo from a PLC

The servo amplifier does the fast control work; the PLC decides where the axis should go and when. There are two main ways to connect them, and one standard set of commands that most PLCs use.

2 min read · Updated 2026-10-02

1. Pulse train (pulse + direction)

The PLC's high-speed outputs send pulses to the amplifier: every pulse is one small step of movement, and a second output gives the direction. The pulse frequency sets the speed. With an electronic gear of, say, 10,000 pulses per motor revolution and a 10 mm ball screw, each pulse moves the axis 0.001 mm.

2. Motion network (fieldbus)

Most new machines use a real-time network: EtherCAT, PROFINET IRT, CC-Link IE TSN, SSCNET or EtherNet/IP CIP Motion. Every cycle (often 1 ms or faster) the PLC sends the target position and receives the actual position, torque, status and alarms. One cable, many axes, full diagnostics.

PLCopen motion function blocks

Most PLC software uses the same standard PLCopen blocks, so the program looks similar on Siemens, Omron, Beckhoff, CODESYS and others:

BlockPurpose
MC_Powerenable the amplifier (servo on)
MC_Homefind the reference position
MC_MoveAbsolutemove to a position (e.g. 250 mm) at a speed
MC_MoveRelativemove a distance from where it is
MC_MoveVelocityrun continuously at a speed
MC_Stop / MC_Haltstop with a deceleration ramp
MC_Resetclear an axis fault
MC_ReadActualPositionread where the axis is

Each block has an Execute input (start on a rising edge) and Done, Busy, Error outputs. See PLC programming languages.

A typical sequence

  1. Machine ready, no E-stop: MC_Power enables the axis.
  2. If not homed: MC_Home, wait for Done.
  3. Step 1: MC_MoveAbsolute to the pick position, wait for Done (in position).
  4. Close the gripper, wait for its sensor.
  5. Step 2: move to the place position, and so on. An SFC or step-bit ladder keeps the sequence readable.
  6. On any Error: stop, show the alarm on the HMI, wait for reset.

Safety

Like VFDs, servo amplifiers have STO (Safe Torque Off) and often SS1 / SLS safety functions. Emergency stops and guard doors act on these through a safety relay or safety PLC, never only through the PLC program.

Try it yourself. Wire sensors, contactors and a PLC, write ladder logic and press RUN in the free PLC Sim Lab Playground. Nothing to install.

Open the Playground →Guided lessons →