AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

Troubleshooting

Why a 32-bit servo parameter overflows over Modbus

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

Short answer

When a 32-bit servo parameter reads -32763 after you write 5, nothing overflowed in the drive: the value spans two 16-bit Modbus registers, and the master, the screen element or the drive handles that pair with the wrong word order, byte order or signedness. Confirm the base hex address, match the format at both ends and prove it with a raw two-register poll. Reversing motor direction is one parameter write plus a power cycle, and the EEPROM protection write is a separate startup task.

On this page
  1. What the -32763 reading tells you
  2. Two registers, four arrangements
  3. The checks, cheapest fault first
  4. The poll that names your arrangement
  5. Reversing the default motor direction
  6. The startup EEPROM protection write
  7. The decision
  8. Questions asked

You wrote 5 to a 32-bit servo parameter over Modbus and the screen, or the drive, shows -32763. Nothing has overflowed and the drive is not failing: a 32-bit value lives in two consecutive 16-bit registers, and somewhere between the master, the screen element and the drive's register map, that pair is being addressed, ordered or formatted wrongly. The repair is a mapping repair. Confirm the base hex address, match word order, byte order and signedness at both ends, and prove the result with a raw two-register poll. This article gives those checks cheapest first, the arithmetic that names your exact fault, and the separate one-line answers on reversing motor direction and on the EEPROM protection write at startup.

What the -32763 reading tells you #

Decode the number before touching a setting. As a 16-bit two's-complement value, -32763 is the hex word 0x8005: bit 15 is set and the low fifteen bits are 5, the exact value you wrote. The word is 32768 + 5 = 32773 unsigned, and 32773 − 65536 gives the negative signed reading, so your value reached the register and something is interpreting a single register of the pair as a signed 16-bit integer. That explains the two-sided symptom in the reported case: change the value at the drive and the screen shows the overflow; enter it at the screen and the drive shows it. Both ends are mishandling the same two registers, which is a mapping fault, not a hardware fault.

Two registers, four arrangements #

A Modbus holding register is 16 bits wide, so a 32-bit parameter always occupies two consecutive registers. Two independent choices apply to that pair. Word order: the high word (the upper 16 bits) sits in the first register or the second. Byte order: within each register, the drive expects the high byte first or the low byte first. Two choices with two options each gives four possible arrangements, and the drive's manual fixes exactly one. The master must reproduce it, and the screen element and PLC tag must carry the same width and signedness as the map, because 32-bit signed and 32-bit unsigned are different formats. The reported case narrowed this usefully: a 16-bit write of 100 arrived in the parameter unchanged, which proves the base address was right and confines the fault to the 32-bit handling.

The checks, cheapest fault first #

Work down this list; every item names the check that confirms or clears it.

  • Base address and width. Poll the drive and read two holding registers from the documented base. In the drive family used as the example here, the absolute position setpoint PE04 is a 32-bit value at hex H0706, so the pair is H0706 and H0707, decimal 1798 and 1799 in tools that take decimal addresses. If the pair reads back as a neighbouring parameter, your tool counts addresses from one where the map counts from zero. Confirm your parameter's address and width in the installed drive's manual before writing anything; parameter numbers differ across drive families.
  • Element width and signedness. Set the screen element and the PLC tag to exactly the map's format. A 16-bit signed element reading a 32-bit parameter produces the negative-number signature decoded above. Confirming check: write 40000; a 16-bit signed element displays −25536, because 40000 − 65536 = −25536.
  • Word order. Write a value whose two words differ, 65541 for example: hex 0x00010005, high word 1, low word 5. Read both registers raw. A drive that expects the high word first must show 1 in the base register and 5 in the next; if they are reversed, or the parameter reads 327681 (0x00050001, which is 5 × 65536 + 1), flip the master's word-order setting, often labelled word swap or low word first.
  • Byte order. Write 256, hex 0x0100. If the register reads 1 (0x0001), the two bytes inside each register are reversed; set the master's byte order to match the drive. The Modbus convention sends the high byte of each register first, so a swapped master is the usual culprit.
  • Both directions. After each change, test screen-to-drive and drive-to-screen with the same setting. The mapping is correct only when both pass; one-sided success means one end still assembles the pair differently.

The poll that names your arrangement #

The example below is a calculated illustration for one written value, not a measurement; a real drive may reject an out-of-range result with a parameter alarm instead of displaying it. With the map confirmed (PE04, 32-bit, base hex H0706), write 65541 from the master and read registers 1798 and 1799:

What the master sends Register 1798 Register 1799 Value the pair encodes
High word first, bytes correct (the map's arrangement) 0x0001 0x0005 65541
Low word first 0x0005 0x0001 0x00050001 = 327681
High word first, bytes reversed 0x0100 0x0500 0x01000500 = 16778496
Low word first, bytes reversed 0x0500 0x0100 0x05000100 = 83886336

Each row produces a distinct number, so one poll identifies exactly which arrangement the master is producing and which single setting to change. Arithmetic for the last row: 0x0500 is 1280 and 0x0100 is 256, so 1280 × 65536 + 256 = 83886336. Width, order and format questions are not Modbus-only: the same register-identification discipline settles arguments such as which drive value is the live DC bus voltage over EtherNet/IP.

Reversing the default motor direction #

This is one parameter write plus a power cycle, and it is independent of everything above. In the drive family of the reported case, the default direction is parameter PA35: write 0001, switch servo power OFF and then ON, and the change applies. That family's documentation names no alternative parameter for the reversal. Confirm the number in the installed drive's manual, since direction parameters sit at different addresses across families, and verify with a controlled low-speed move before the machine returns to service.

The startup EEPROM protection write #

EEPROM protection has no connection to motor direction and none to the pin configuration; the drive keeps its pin configuration through power cycles regardless. In the reported family it is parameter PA23, a DWord at hex 32C, and the controller must send 1 at every power-up. The documented reason is EEPROM write-life: without that write, repeated parameter storing wears the EEPROM and the drive raises an error after a time. The risk is EEPROM exhaustion, not lost configuration.

Implement it in the controller's power-on task so it executes at every startup. In the PLC environment of the reported case that is the Power-On tasks list under Tasks, with the tag's value marked as an initial value when the project downloads. After the download, cycle power and verify online that the write executes. For the broader question of which written value persists and which only activates under conditions, see what persists and what activates when you write a drive parameter.

The decision #

  • A 32-bit parameter shows -32763, or any small write read back as a large negative, after a Modbus write: mapping fault. Do not replace the drive and do not widen the parameter range. Poll the pair, identify the arrangement from the table, correct the one setting, and re-test both directions.
  • 16-bit writes land correctly but 32-bit writes scramble: the base address is proven; the fault is word order, byte order or element width and signedness. Fix it at the master and the element, not in the drive.
  • Reverse the default direction: one write, PA35 = 0001 in the reported family, then power OFF and ON, then a low-speed verification move; confirm the parameter number in the installed manual first.
  • EEPROM protection: a startup write of 1 to PA23 (hex 32C, DWord in the reported family) from the controller's power-on task, verified online after a power cycle. It protects EEPROM life; pin configuration does not depend on it.

Questions asked

Can I correct a word swap in the PLC program instead of the master's settings?

Yes. Leave the communications settings alone and reorder the two words in logic: before a write, put the value's high word in the second register and the low word in the first; after a read, reassemble them the opposite way. Do this when several devices share one master and only this drive needs the swapped order. Document the workaround at the tag, or the next engineer will fix it a second time.

The parameter is a floating-point value, not an integer. Does the same method apply?

Yes. A 32-bit float also spans two registers with the same four arrangements, so poll the pair raw and match word and byte order to the drive's map. Pick test values with recognisable words: 1.0 encodes as hex 3F800000, high word 3F80 (16256) and low word 0, so a swapped pair is obvious in the poll. Set the screen element to the float format the map names; interpreting a float as an integer produces large nonsense values, not a clean swap.

The poll cannot connect to the drive at all. What do I check?

That is a communication fault, not a mapping one. Match baud rate, parity, stop bits and slave address at both ends, then check the pair's wiring and termination. For the drive family in the reported case the port parameters were PC23 = 60 and PC37 = 20000; treat those as that family's values and confirm them in the installed drive's manual before changing anything. A mapping fault gives wrong numbers; no connection gives timeouts, and the two have different fixes.

After reversing the motor direction, what else must be rechecked?

Everything that assumes positive means one physical way. Re-verify the homing routine and home switch direction, the hard and soft limit logic, and any commanded moves in existing programs, because they now drive the axis the opposite way. Run a low-speed move first with the machine clear. The gain settings themselves do not change with a direction flag, so a full retune is not part of this procedure.

Keep reading

  • Troubleshooting

    Servo Drive Over-Speed Alarm: Causes and Checks

    An over-speed alarm means the drive measured motor speed above the limit configured in its speed-limit parameter, not that the motor is broken. Confirm whether the limit, the command, the ramps, false encoder feedback, unstable tuning or a load that back-drives the motor put it there, cheapest first, and never raise the limit to silence a trip whose cause you have not confirmed.

    Servo and stepper motion

  • Explainer

    Servo drive positioning over Modbus: what the network can do

    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.

    Servo and stepper motion

  • Troubleshooting

    Servo error counter overflow alarm: check torque saturation first

    An error counter overflow alarm — alarm 29 on the drive family that numbers it that way — means the position error counter passed 134217728 counts, so the motor stopped following the command. Check the torque monitor first: output torque saturated at the limit points at the torque limit set-up, Pr5E on that family, or at a load the motor cannot move; torque below the limit points at the command pulses, the encoder wiring or the gains.

    Servo and stepper motion