AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

Explainer

Stepper Motor Control From a PLC Over Modbus

Servo and stepper motion Published 7 min read By AutomateDirectUSA engineering team

Short answer

A PLC commands a self-contained stepper driver over Modbus RTU on RS485 or Modbus TCP; it never switches the motor windings itself. The selection decision is whether the controller documents the registers you need with data types and scaling. Confirm what the motor current figure means before sizing anything.

On this page
  1. Can a PLC switch stepper windings directly?
  2. How does Modbus control of a stepper controller work?
  3. What registers must a controller expose before you buy it?
  4. RTU over RS485 or Modbus TCP: which one for a machine?
  5. What wiring and serial settings does the RS485 bus need?
  6. How do you size the driver current from the motor figure?
  7. How do you bring the first axis online and prove the path?
  8. When is Modbus the wrong choice for a stepper axis?
  9. Questions asked

A PLC never switches stepper motor windings directly: the windings need sequenced, current-regulated switching that only a stepper driver provides, and the PLC's job is to tell that driver what to do. Over Modbus, the practical path is a self-contained stepper controller that exposes documented registers — a speed setpoint, enable, start/stop and fault status — over RS485 or Ethernet. The selection decision is not whether Modbus can carry the commands; it is whether the specific controller's register map is documented well enough that you can map it in your PLC without guesswork.

Can a PLC switch stepper windings directly? #

No, and no output card changes that. A bipolar stepper motor needs its two windings energized in a timed sequence with a regulated phase current, which is what a driver chip or driver stage exists to do. Relay outputs, transistor outputs and 0-10 V analog outputs cannot produce that sequence: a relay switches too slowly and cannot regulate current, and an analog voltage does not step anything. What a PLC can do directly is generate step and direction pulses, which is the path covered in how to run a stepper conveyor from a PLC pulse output. Modbus is the other path: the PLC writes setpoints over the network and the controller does the stepping locally.

How does Modbus control of a stepper controller work? #

The PLC is a Modbus client and each stepper controller is a Modbus server with its own slave address; the PLC writes a speed value and command bits to holding registers and reads status back from them. The controller runs its own motion firmware: it takes the setpoint, accelerates the motor to that speed using its configured current limit, and keeps doing that even if the next bus message is late. That local autonomy is the whole point — the bus carries commands, not step pulses, so the bus speed does not limit the motor's step rate.

For serial line devices, the MODBUS over Serial Line specification (modbus.org, the 2006 specification) requires a new serial implementation to use an electrical interface in accordance with EIA/TIA-485, the standard known as RS485. That is why serial stepper controllers almost universally offer RS485 terminals and why a plain RS-232 port is not an equivalent substitute.

What registers must a controller expose before you buy it? #

At minimum: a speed or velocity setpoint, an enable bit, a start/stop or run bit, a fault or status word, and an actual-value or position register you can read to confirm motion. Insist on a published register map that states, for each register: the function code it uses (read holding registers, write single register, write multiple registers), the data type (16-bit integer, 32-bit as two registers, signed or unsigned), the scaling and unit (for example 1 count = 0.01 revolutions per minute, or steps per second), and whether a command takes effect on write or needs a separate trigger bit. A controller whose register map you cannot see before purchase, or one configured only through vendor software with no documented Modbus surface, is the wrong controller for this job — no amount of PLC-side cleverness fixes a hidden interface.

RTU over RS485 or Modbus TCP: which one for a machine? #

For a machine cabinet with a handful of axes, RS485 RTU is the default: two twisted wires daisy-chain every controller, slave addresses 1 through 247 are set on each device, and one serial port on the PLC serves the whole bus. Choose Modbus TCP when the controllers are Ethernet devices, when the distance or existing plant network makes copper RS485 awkward, or when you need more devices than one serial segment comfortably carries. Electrically they carry the same register model; the difference is wiring, addressing (an IP address instead of a slave number) and the polling burden on the PLC. For a greenhouse-style panel of five dosing pumps, RTU on one RS485 segment is the simpler and cheaper commitment.

What wiring and serial settings does the RS485 bus need? #

Daisy-chain the bus through each controller's RS485 terminals, twist the pair, and terminate both physical ends of the segment with the resistance the controller manual specifies (commonly 120 ohms across the pair, matched to the cable's characteristic impedance). Set every device to the same serial parameters — the same baud rate, parity and stop bits — and give each one a unique slave address; two devices at address 1 will silence the bus. Star wiring and long untwisted stubs cause the intermittent CRC errors that make people blame the PLC.

How do you size the driver current from the motor figure? #

Size the driver from the motor's rated phase current on its datasheet, not from a supply-current figure. This is where most selection mistakes happen: a nameplate that says 1.8 A may mean rated winding current per phase, or it may be a supply-side figure for the whole assembly, and these are not interchangeable. Read the motor datasheet for the rated phase current, the number of leads and the series/parallel winding options, then pick a driver whose adjustable current range brackets that value. Set the driver's current limit to the motor's rated phase current (or lower for a cooler, quieter axis) — never above, because exceeding the winding rating overheats the motor and demagnetizes it over time.

Worked example, illustrative numbers for a large peristaltic pump motor whose datasheet states a rated phase current of 1.8 A in series (unipolar-equivalent) connection:

  • Motor rated phase current: 1.8 A (from the motor datasheet, series connection)
  • Driver adjustable range must include 1.8 A — a driver topping out at 1.2 A is undersized for this winding; one reaching 2.5 A is set to 1.8 A
  • Four small pumps whose datasheets state 0.75 A rated phase current each take drivers set to 0.75 A
  • Motor supply voltage and driver supply-voltage range must agree: a 12 V motor version and a 24 V motor version are different selections, and the DC supply feeding the driver must match the driver's documented input range

If the only figure you have is 1.8 A and you cannot tell whether it is a phase current or a supply current, that driver selection is untested — get the motor datasheet before ordering. A value pulled from a pump brochure is not a winding rating.

How do you bring the first axis online and prove the path? #

Commission one motor end to end before touching the sequence. Wire that motor to its driver, set the driver current limit from the datasheet, connect the controller to the bus with the serial settings from its manual, and confirm basic communication first — a successful read of the status register proves addressing, wiring and serial settings together. Then map registers in this order: read-only status and fault words first, then a low-risk speed write, then a controlled stop. Verify direction of rotation, actual stopping behavior and response to a changed setpoint on the physical shaft, and decide in your logic what a communication loss means for that axis; a dosing pump that keeps its last speed after a cable fault is a process decision, not a default. Keep the confirmed register addresses, data types and scaling in the project documentation, because wrong scaling turns a plausible value into the wrong speed silently. Repeat the mapping per axis, or confirm the controller's multi-axis addressing scheme before commissioning all five.

When is Modbus the wrong choice for a stepper axis? #

Modbus carries commands, so it suits independent speed or position axes: dosing pumps, feed rollers, conveyors, a door or a diverters. It is the wrong tool when axes must move in tight coordination — electronic gearing, camming, interpolation — because the polling cycle adds tens of milliseconds of uncertainty between setpoint updates, and no polling trick removes it. For coordinated motion, use a motion controller generating step and direction pulses directly, as described in what a stepper driver control connector needs from a PC for the wiring side. If your application is five pumps each following its own weekly schedule and dose, Modbus setpoint control is not just adequate — it is the cleaner architecture, because the scheduling and dosing logic lives entirely in the PLC and the bus failures degrade gracefully instead of dropping steps.

One safety note: keep guards, e-stops and lockout on the motor power path independent of the network. An enable bit you can write over Modbus is a control function, not a safety function, and no register write should ever be the thing standing between a technician and a moving shaft.

Questions asked

Do I need one Modbus stepper controller per motor?

It depends on the controller, not on the motor count. Some Modbus stepper controllers hold a slave address per axis and sit on one RS485 bus, so five pumps share two wires. Others are single-axis and need one device each. Check the manual for multi-axis addressing and for whether each axis has its own speed and command registers.

Can a 0-10 V output or a relay drive a stepper motor?

No. A stepper motor needs its phases switched in sequence with current-regulated pulses, which only a stepper driver does. A relay or analog output can at most enable or trim a driver that already exists. The PLC's real job over Modbus is to write a speed value and read back status and faults.

What happens on the bus if the PLC drops offline mid-dose?

Nothing automatic, unless you design it. Most Modbus stepper controllers keep running their last commanded speed when communication stops, because holding position or speed locally is a feature. Decide in your logic what a communication timeout means for your process: many designs use a watchdog or a controller-side stop-on-timeout so a dosing pump does not run unattended.

Is Modbus fast enough for coordinated multi-axis motion?

Not for tightly coordinated motion. Modbus setpoint traffic runs comfortably in the tens-of-milliseconds range, which suits dosing, conveying and speed control where each axis follows its own setpoint. For electronic gearing, camming or axes that must hold a phase relationship to each other, use a motion controller with step and direction or a real-time network instead.

Keep reading

  • Explainer

    What a servo motor is: closed-loop control, not one construction

    A servo motor is any motor built to run inside a closed loop: a sensor measures position, speed or torque, and the drive keeps correcting the gap between your command and the measurement. Brushed DC, brushless DC and AC permanent-magnet constructions all qualify; the feedback, the low rotor inertia and rated torque at zero speed are what define it. Choose it over a stepper when the axis must detect and correct error under changing load.

    Servo and stepper motion

  • Explainer

    Why a robot needs a servo controller between it and the motor

    A robot cannot drive a servo motor through its network port; the motor needs a drive and positioning controller in between. For indexed work — four preset positions, each complete before the robot cuts — the controller stores the positions, takes a trigger over a documented protocol such as Modbus/TCP, and reports confirmed position and completion. A successful connection proves transport, not motion.

    Servo and stepper motion

  • Selection guide

    Choosing Servo or Stepper for a 1% Speed Regulation Pinch Wheel

    Pick the servo: behind a 45:1 planetary reducer, a velocity-mode servo meets a 1% wheel-speed tolerance with margin, because 200-300 lb-in at 80 rpm needs only 4.9-7.4 lb-in at the motor and the loop corrects load-induced error. A stepper qualifies only when its torque-speed curve clears the load with margin at the required motor speed and a measured ripple test holds the wheel inside 0.8 rpm.

    Servo and stepper motion