· Module 02

02 | Wrong Modbus Values? Fix Addresses, Scaling and Byte Order

Dr. Redmond R. Shamshiri
Assistant Professor of Robotics · University of Southern Denmark (SDU)

Study 02 | Wrong Modbus Values? Fix Addresses, Scaling and Byte Order. Use the accompanying model, numerical example and practical task to connect the topic to a measurable engineering result. Notes are original supplemental material, not a transcript.

Lecture video: https://www.youtube.com/watch?v=aN6BLe7Hnfs

Learning Objectives

  • Explain the role of registers, transactions and byte order in the engineering system.
  • Calculate the worked quantity with consistent units.
  • Design a measurement that can reveal an implementation failure.

Study guide

Original companion notes. These notes support the topic of this lesson. They are not a transcript or a claim about the exact contents, hardware settings or examples in the video.

Lesson focus: 02 | Wrong Modbus Values? Fix Addresses, Scaling and Byte Order

Define the input, measured output, units and pass/fail condition before running the experiment.

Registers, transactions and byte order

Modbus transports coils and registers; the device manual defines their meanings, scaling and access rights. A displayed register label may be one-based while the protocol address is zero-based. A successful response does not prove that the engineering interpretation is correct.

Model, units and assumptions

\[y=s\cdot r+o,\qquad t_{poll}\geq t_{request}+t_{device}+t_{response}+t_{margin}\]

r is decoded register data, s is scale and o is offset. Polling time includes communication and device processing. For multiregister values, verify word order as well as byte order from the manufacturer.

Worked engineering example

A documented speed register uses 0.1 rpm per unit. Raw 1234 means 123.4 rpm. Reading the adjacent register by an address-offset mistake may still return a valid reply, so check a known physical value.

Practical task and evidence

Apply the following procedure to the topic of this lesson: 02 | Wrong Modbus Values? Fix Addresses, Scaling and Byte Order.

  • Create a register map with protocol address, datatype, units, scale and read/write permission.
  • Read a known constant before issuing any write command.
  • Test timeout, exception reply and reconnection with outputs inhibited.

Submit: a diagram or interface table, a short timestamped dataset, the calculation with units, and a paragraph explaining the largest observed limitation.

Check your understanding

Question. Raw signed register value is −250 with scale 0.01 A/unit. What current is displayed?

Show worked answer

−2.50 A, provided the two’s-complement interpretation and signed-current convention match the manual.

Extension. Change one assumption in the model and explain which measurement would reveal that it no longer holds.

Summary

Registers, transactions and byte order: keep units, assumptions and timing explicit. Check the numerical model against an independent observation before using it in a larger system.

Practical Industrial Automation with ESP32 · Dr. Redmond R. Shamshiri · University of Southern Denmark (SDU)