Vijay_Wiki
/ Computing and IT for engineers / Modbus, RS-485, CAN

Industrial Communication: Modbus RTU/TCP, RS-485, CAN and OPC UA

K Vijay Anand · Vijay_Wiki quick-reference article · 24 November 2026
ModbusRS-485CANOPC UA

Test rigs connect dynamometer controllers, drives, power meters and PLCs over a handful of standard links. Most problems are simple once you know the conventions: which register numbering the manual uses, which word order a 32-bit float has, and whether the RS-485 line is terminated and biased. This article collects those conventions in one place.

Key takeaways

  • Modbus holding register 40001 is address 0 in the protocol (function 03); manuals mix 0- and 1-based numbering.
  • A 32-bit float spans two 16-bit registers; word order varies (ABCD, CDAB, BADC, DCBA): try swaps if values look absurd.
  • RS-485: daisy-chain topology, 120 Ω termination at both ends, failsafe biasing, common ground reference, up to 32 unit loads and about 1,200 m at low baud rates.
  • Modbus RTU frames are separated by 3.5 character times of silence; at 19,200 baud reading 20 registers takes about 30 ms.
  • CAN trades speed for distance (1 Mbit/s to about 40 m, 125 kbit/s to about 500 m); OPC UA provides secure, modelled data over Ethernet.

1. Modbus

Function codeActionData
01Read coilsBits (outputs)
02Read discrete inputsBits (inputs)
03Read holding registers16-bit words (read/write)
04Read input registers16-bit words (read only)
05 / 06Write single coil / register
15 / 16Write multiple coils / registers
Reference (manual)TableProtocol address
00001–09999Coils0–9998
10001–19999Discrete inputs0–9998
30001–39999Input registers0–9998
40001–49999Holding registers0–9998
Float32 = registers R(n), R(n+1) → bytes A B C D Orders: ABCD (big-endian), CDAB (word swap), BADC (byte swap), DCBA (little-endian) RTU character = 11 bits (start + 8 data + parity/stop + stop); frame gap ≥ 3.5 characters

Example timing at 19,200 baud reading 20 registers: request 4.6 ms, response 25.8 ms, gaps 4.0 ms → about 34 ms per poll before device response delay.

2. RS-485 wiring

MasterPC / PLCDevice 1short stubDevice 2…Device nlast on line120 Ωterminator
Figure 1. RS-485 daisy chain: one line, terminations at both physical ends, no star wiring.

3. CAN and OPC UA

CAN bit rateApprox. max bus length
1 Mbit/s40 m
500 kbit/s100 m
250 kbit/s250 m
125 kbit/s500 m
50 kbit/s1,000 m

OPC UA runs over Ethernet with encryption, user authentication and an information model (variables with units, ranges and structure). It suits connecting PLCs, data acquisition and higher-level systems without vendor-specific drivers.

4. Calculators

Modbus float decoder and poll time

5. Self-test: check your understanding

Pick an answer to see the explanation. Numerical answers are accepted within the stated tolerance (±3 % unless noted).

Score

6. References and further reading

  1. Modbus Organization, Modbus Application Protocol Specification V1.1b3 and Modbus over Serial Line V1.02.
  2. TIA/EIA-485-A, Electrical Characteristics of Generators and Receivers for Balanced Digital Multipoint Systems.
  3. ISO 11898-1/-2, Road vehicles — Controller area network (CAN).
  4. IEC 62541, OPC Unified Architecture.

Web pages

Disclaimer

This article is for education and quick reference. Formulas are simplified first estimates and examples use typical data. For design, safety and maintenance decisions use manufacturers' data and the applicable standards.

Related Vijay_Wiki articles