AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

Explainer

Servo drive positioning over Modbus: what the network can do

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

Short answer

Over Modbus a servo drive accepts the position target, status reads and often a jog; the enable, stop and move trigger stay on wired inputs. Structure the PLC program as a state sequence — write the target, confirm it, trigger from the wired input, poll the documented in-position bit with a timeout — and configure the drive for target-based positioning, not the speed scheme the old vector drive ran.

On this page
  1. What the network can carry, and what stays wired
  2. Positioning mode is not speed mode
  3. Read the map before you write a rung
  4. Run the move as a state sequence, not a stream
  5. Timing one target write on a 9.6 kbit/s RS-485 link
  6. The decision for each case
  7. Questions asked

Over Modbus RS-485, a servo drive will accept the position target, report its status and actual position, and often jog; it will not accept the enable, the controlled stop or the move trigger — those stay on wired inputs. So the PLC program that positions over the network is not a rung streaming registers at the drive. It is a short state sequence: write the target for the current stock size, confirm the drive took it, pulse the wired go input, then poll the drive's in-position status with a timeout before the clamp closes. It also depends on the drive being configured for target-based positioning, because the speed-command scheme an open-loop vector drive ran under is a different control job and indexes poorly. This article sets out what the link can carry, what stays wired, and the link timing that decides how often you may write.

What the network can carry, and what stays wired #

A Modbus transaction does one thing: it reads or writes register values at an address on a slave device. What that address means is entirely the drive's register map — it defines the data type, the scaling, the word count, and whether the register is readable, writable or both. On a drive set up for positioning, the map typically gives you three things over the wire: the position target, the status word carrying the in-position and fault bits, and the actual position. Many maps also expose a jog command, handy during setup.

What the map will not take over the wire is the enable, the controlled stop, the go trigger or the safe torque off. Wire them to digital terminals and keep them there. Drive safety documentation treats the safe torque off connection as hardwired on purpose — the safety reference manual for the Kinetix 5700 servo drive family, for example, documents its drives as delivered in Hardwired STO mode, ready for wires to the safety connector — so torque drops out even when the network, the PLC or the program is down. The network prepares a move; the terminals start it.

Positioning mode is not speed mode #

An open-loop vector drive takes a speed command and nothing else. There is no target to reach and no completion to report, so index length comes out of run timers and mechanical guesswork — which is why a vector-drive layout indexes a bar poorly, and why reproducing that scheme on the replacement buys the same result. Target-based positioning is a different control job, and the replacement drive has to be configured for it: a position or target mode in the drive setup, a defined target format, a trigger and a completion bit.

Because the drive closes its own position loop on the motor's feedback — see where the position loop closes in a servo drive — the PLC never counts encoder pulses to know where the bar sits; completion is a status bit, read over the link.

A pulse-output axis is the middle case: the PLC generates every step and the move lives in the PLC program, as set out in configuring a PLC pulse-output servo axis before PLS2 moves. Network positioning moves only the target, and the drive runs the profile itself.

The variable-speed drive that shares the bus has a trap of its own: if its configuration takes the speed reference from the analog input on its terminal block, it will ignore a speed value written over the network — the pattern described in why a servo drive ignores Modbus speed commands while following an analog reference. And if the positioning drive runs a motor it did not ship with, run the pairing checks in what decides a third-party servo motor on a new drive before any of the rest.

Read the map before you write a rung #

The map for your exact drive model and configuration is the source for every address in the program; this article deliberately names none. A guessed address can return no response, draw a rejected write, or silently change an unrelated setting, and the symptom will not tell you which.

Take these from the map, and nothing less:

What you need What the map tells you Why it matters
Position target Register address, word count, word order, scaling, units The PLC's number and the drive's counts must agree before any move
Move trigger Whether the go command is a register bit or a wired input On most drives a target write starts nothing by itself
Enable and stop Terminal assignments in the control interface These are wired points, not network objects
In-position status Status register address and bit number The one defined condition the sequence advances on
Actual position Register address and scaling An optional readback, not needed to finish a move
Direction convention Signed target or separate direction bit Assumed wrong, the bar indexes the wrong way

One habit from Modbus master design itself: keep the setup that decodes each device's response — slave address, register span, data format — in one common place in the master configuration, not scattered through the ladder. The PLC's Modbus master read and write instructions (MRX and MWX in the ladder set used on controllers of this type) each carry exactly one transaction; they are the transport, and the state sequence lives around them.

Run the move as a state sequence, not a stream #

Separate the machine sequence from the communication transactions, and give each state one job:

  • Ready: machine interlocks made, drive enabled through its wired input, no transaction pending.
  • Write the target: one transaction carrying the documented register arrangement for the current stock size. Do not launch another write until this one reports done or error.
  • Confirm: read back the accepted target or the drive's ready status; if the write failed, stop in this state with its message.
  • Trigger: pulse the wired go input.
  • Wait: poll the in-position bit at a fixed cadence with a timeout running. A timeout, a drive fault bit and a communication error are three separate failure paths, each with its own message and its own halt.
  • Advance: close the clamp, release the tail clamp, and write the next target only after in-position is true.

Steady-state traffic is then one write when the stock size changes and one status poll while a move runs. If a second drive shares the RS-485 bus, it is just another slave with its own address, and the port still carries one transaction at a time; route both devices' exchanges through the same sequence rather than two competing rungs.

The inputs, and where each comes from: a Write Single Register transaction of 8 bytes out and 8 bytes back, from the Modbus RTU frame definition (slave address, function code, register address, register value, two-byte CRC); a serial format of 8 data bits, no parity and one stop bit — 10 bits to the byte — an example setting, since the application fixes none; a line speed of 9.6 kbit/s, likewise a common example default; and the 3.5-character silent interval before and after every frame that the Modbus over Serial Line specification defines for RTU.

The rule in words: link time for one transaction equals total bits divided by bit rate, and total bits equals the request plus the response, multiplied by the bits in a byte, plus both silence gaps.

The arithmetic:

  • Payload: (8 + 8) bytes × 10 bits/byte = 160 bits
  • Silence: 2 gaps × 3.5 characters × 10 bits/character = 70 bits
  • Total: 160 + 70 = 230 bits
  • Time: 230 bits ÷ 9600 bits/s = 0.024 s, about 24 ms

The result: at these settings, one target write and its reply occupy roughly 24 ms of the link. That is a calculated example for these inputs, not a measured result.

The decision: a target written on a timer or every scan cannot fit. At a 10 ms PLC scan, for example, each write consumes 24 ms of link time, so transactions queue faster than the port clears them. Write the target when the stock size changes and the link stays essentially idle between moves. The general threshold: when the gap between transactions is shorter than the time one transaction takes, the cadence is impossible, and either the cadence or the line speed has to change.

The decision for each case #

  • Distance values and target changes: write them over Modbus, on change, in the exact arrangement the map documents.
  • Enable, stop and go: wired digital inputs, always; the network prepares the move, the terminals start it.
  • Completion: the drive's in-position bit, polled with a timeout; never a timer alone.
  • Drive setup: target-based positioning mode, not speed mode — a drive commanded only in rpm will index no better than the vector drive it replaces.
  • Direction: whatever the map defines, signed target or direction bit, proven with a short move near the reference before the first full index.
  • A second drive on the bus: its own slave address, its own transactions, sequenced one at a time through the same PLC sequence.

Questions asked

Can the move trigger be a Modbus write instead of a wired input?

Plan on wired. Some drives document a network command bit that starts a move, but the enable and the stop stay on terminals regardless, and a sequence that mixes a networked trigger with wired interlocks is harder to make fail safe. Wire the go input to a PLC output, write the target over the link, and pulse the input once the write is confirmed. Check the drive manual before deciding otherwise.

How big is the position target — one register or two?

Take it from the map, not from habit. A target that fits 16 bits uses one register; larger travel or finer resolution usually needs two registers as a 32-bit value, and the map states the word order and the scaling. Write the documented arrangement exactly, then prove it with a small target a few counts away from the reference before the first full-length move.

How long should the completion timeout be?

Longer than the longest link transaction plus the longest move, then tested. The transaction time is calculable from the line speed and the frame sizes — about 24 ms for one register write at a 9.6 kbit/s example link. The move time comes from the travel distance and the drive's configured speed and acceleration. Set the timeout above that sum, start generous, and tighten only after the sequence has proven itself on the machine.

Does the PLC need an encoder input card to verify the move?

Not on a servo drive. The drive closes its position loop with the motor's own feedback and reports position and in-position status over the link, so counted pulses would duplicate what the drive already knows. Keep an encoder card for axes with no closed-loop drive of their own, and take completion for this axis from the drive status, not from an external count.

Can a second drive share the same RS-485 port?

Yes. Give each device its own Modbus slave address on the bus, match the serial format across all of them, and let the master finish one transaction before addressing the next. The two drives' exchanges become separate transactions in the same PLC sequence, each with its own completion and error handling, so a faulted variable-speed drive cannot stall the positioning axis's requests.

Keep reading

  • Selection guide

    Finding a Servo Drive That Accepts a 10V Analog Command

    The drive's manual must document a bipolar ±10 V command input used by an analog velocity or analog torque mode; a step and direction drive cannot take that signal. Which mode you pick is decided by where the position loop closes: feedback into the controller means velocity or torque mode in the drive. Set full scale so the maximum command equals rated speed or torque and verify the scaling by arithmetic before wiring.

    Servo and stepper motion

  • Troubleshooting

    Fixing Non-Circular Servo Cuts: Servo Lag Not Encoder Wiring

    No. Connect the motor encoder to the servo drive, not to Mach3: the drive closes the position loop, and Mach3's Encoder/MPG inputs can only read counts, not correct them. Distorted circles come from unequal X and Y servo lag during acceleration and reversal, so fix them with per-axis gain and damping in the drive, then by removing reversal lost motion in the mechanics.

    Servo and stepper motion

  • Explainer

    How Two Servo Axes Sync as One Gantry Axis Over EtherCAT

    Yes, two servos can move as one gantry axis over EtherCAT. The controller creates a virtual master axis, feeds both physical servo axes from it through a cross-coupled control function, and supervises the difference between the two actual positions so the bridge cannot rack unnoticed.

    Servo and stepper motion