Resistance between the lines
Diagnosing a Silent Bus
On this page
The gateway shows “timeout” on every meter, the production manager wants the energy report, and the technician has already changed the baud rate twice, swapped the two wires at one meter and restarted the gateway. Each change was a guess, and nobody wrote down what the bus was like before it, so after three hours there may be three faults where there was one. A silent bus has few possible causes, and each leaves a mark that a multimeter or a capture of the bytes can show. This lesson puts the checks in the order that finds the fault fastest, using the results of the whole course. #Modbus #RS485 #Troubleshooting
Learning Objectives
By the end of this lesson, you will be able to:
- Apply a fixed order of checks: power, physical layer, serial settings, protocol, timing
- Interpret the resistance between the lines and the idle voltage of an RS-485 bus
- Distinguish a silence, a damaged frame, an exception response and a wrong value, and name the layer each one points to
- Diagnose five common faults from a measurement or a captured frame
- Write a commissioning record that makes the next fault quick to find
Real-World System Problem: The cold store bus stops answering
The bus of this course is one RS-485 line of 180 m with the gateway at one end. Four energy meters (addresses 5, 6, 7 and 8) and a variable speed drive (address 10) are connected along it. It has a 120 Ω termination at each end and bias resistors of 390 Ω at the gateway, and it runs Modbus RTU at 9600 baud with 8 data bits, even parity and 1 stop bit.
Each part of that description is a place where a fault can be: a wire can come loose, a termination switch can be moved, a meter can be replaced by one with factory settings, a poll list can be edited. All of these produce the same word on the screen: timeout.
So a method is worth more than experience with any one fault. The checks start at the bottom, where they are quick and certain, and move up only when the layer below is proved good.
Fundamental Theory: Five layers, from the bottom up
Why the order matters
Communication rests on layers. A request cannot have the right address if its bits do not arrive, and the bits cannot arrive if the line is open. A fault in a lower layer hides everything above it, so a check of an upper layer proves nothing until the lower ones are good, as a plumber checks the main valve before taking a tap apart.
5 Timing timeout, turnaround, silent interval 4 Protocol function code, register address, word order 3 Serial baud rate, parity, server address 2 Physical lines, termination, bias, common, shield 1 Power supply and indicators ▲ start at the bottom and move upTwo rules hold through all five layers. Change one thing at a time and write it down. And only read: every test in this lesson uses a multimeter, a listen-only capture or a read request, and nothing in the method writes to a drive or a meter.
Layer 1: power and indicators
Look before you measure: is every device powered? Most RS-485 devices have receive and transmit indicators. A receive indicator that blinks with each poll shows that the request reaches the device; a transmit indicator that never blinks shows that the device does not answer. One device with no light at all is a supply fault, not a bus fault.
Layer 2: the physical layer
Two measurements with a multimeter cover most wiring faults.
Resistance between the lines, with the bus power off. Each termination is a 120 Ω resistor between A and B, and terminations are in parallel.
| Reading | Meaning |
|---|---|
| About 60 Ω | Two terminations: correct |
| About 120 Ω | One termination is missing, or the line is open between the two |
| About 40 Ω | Three terminations: one device in the middle has its switch on |
| Near 0 Ω | A and B are shorted |
| Far above 120 Ω | No termination is connected |
Voltage between the lines, with power on and the bus idle. Stop the polling, then measure B minus A at the gateway. The reading should be the calculated idle voltage. A multimeter read while polling continues shows an average of the traffic, not the idle state. A pause of a minute leaves a gap in the record, so note its time.
| Reading of B minus A | Meaning |
|---|---|
| About 357 mV | Correct for 390 Ω bias and two terminations |
| About 211 mV | The 680 Ω bias as first built: too close to the 200 mV threshold |
| Near 0 V | No bias network is connected |
| About 667 mV | Only one termination is connected |
| About 244 mV | Three terminations are connected |
| Negative at one device | A and B are swapped at that device |
Three more faults belong to this layer. They cause errors that come and go, often when the drive runs.
| Fault | What shows it |
|---|---|
| A long stub | The drawing or the cable route: a branch longer than the stub rule allows |
| No common wire | Errors that follow the running of the drive; two conductors only at the terminals |
| Shield earthed at both ends | With the shield lifted from the earth bar at the gateway, it still measures a low resistance to earth |
Layer 3: serial settings
The client and every server must agree on the baud rate, the parity and the stop bits, and each server must have its own address. A device with a different setting sees the traffic and its receive indicator blinks, but every character fails its check and the device stays silent.
Sent, 8E1 (11 bits): start data, low bit first parity stop 0 0 1 1 0 0 0 0 0 0 1
Read by a device set to 8N1 (10 bits): start data stop? 0 0 1 1 0 0 0 0 0 0 framing errorThe device set to no parity expects a stop bit, which is 1, where the parity bit arrives. For 0x06 the parity bit is 0, so the device reports a framing error and discards the frame.
A fast test separates the settings of the client from those of one server. If any server on the bus answers, the client’s baud rate and parity are right, and the fault is in the silent device.
Layer 4: the protocol
When bytes come back, read them. To capture them, connect a USB to RS-485 adapter to the gateway terminals and run a program that only receives, at the bus’s baud rate and parity, and that records each byte with its time. Switch off the adapter’s own termination and bias first: many adapters have them, and an adapter that adds a third termination changes the bus you are trying to diagnose.
A request has four possible results, and each points to a different place.
| Result | What it proves | Where to look |
|---|---|---|
| Silence until the timeout | No server accepted the request | Layers 1 to 3, then the server address |
| A response with a bad CRC | A server answered and the bytes were damaged | Layer 2: termination, bias, common, shield |
| An exception response | Wiring, settings and address are all good | The request: function code, register address, quantity |
| A good response with a wrong value | Everything below the value is good | The register map: off-by-one, type, word order, scaling |
Layer 5: timing
Timing faults appear as errors on some polls and not on others. The usual causes are a timeout shorter than the slowest valid response, a client that sends the next request before the silent interval has passed, and a second client on the same gateway.
A nine-register read of a meter at 9600 baud takes 59.53 ms with a 20 ms turnaround, and the response ends 50.36 ms after the request. A timeout of about three times that, 151 ms, never cuts off a healthy server.
The decision flow
The limit of the method: it finds one steady fault at a time. Two faults together, or a fault that appears once a day, need the statistics described at the end of this lesson.
Application 1: Five symptoms on the cold store bus
Step 1: No reply at all, 120 Ω between the lines
Click to reveal the diagnosis
-
Evidence.
: one termination is seen from the gateway, and one from the last meter. Both terminations exist, but they are not connected to each other. The idle voltage agrees: with one termination, . ✅ -
Cause. A missing termination alone would not silence a 180 m bus at 9600 baud. A line that is open would. No device answers, so the break is between the gateway and the first device. ✅
-
Correction. The electrician finds the open conductor, usually a loose terminal at the gateway or at the first device, and makes the connection again with the power off. ✅
-
Confirm. About 60 Ω between the lines with power off, about 357 mV at idle with power on, and a response to
05 03 00 00 00 09 84 48. ✅
Step 2: Damaged frames after a new device, 40 Ω
Click to reveal the diagnosis
-
Evidence from the meter. Three resistors of 120 Ω in parallel:
Three terminations are connected. ✅
-
Evidence from the capture. The CRC of the first 21 bytes is 0x91E1, which would be sent as
E1 91. The frame ends with41 64. The frame is damaged: compared with the true response, the fifth byte is61where the meter sent63, and the twelfth is1Fwhere it sent0F. A server answered, so the address and the serial settings are good. ✅ -
Cause. The new meter was delivered with its termination switch on. The load on a driver falls from 54.8 Ω to 37.6 Ω, below the 54 Ω at which a driver is specified, and the idle voltage falls from 357 mV to 244 mV (221 mV in the worst case). The signal is too small and the idle state is too weak. ✅
-
Correction. Switch off the termination in the new meter, because it is not at an end of the line. ✅
-
Confirm. About 60 Ω with power off, about 357 mV at idle, and a CRC error count that stops rising. ✅
Step 3: The response05 83 02 81 30
Click to reveal the diagnosis
-
Evidence. The CRC of
05 83 02is 0x3081, sent as81 30, so the frame is good. Function code 0x83 is 0x03 with its highest bit set: an exception response. Exception code 02 is illegal data address. ✅ -
What it rules out. The meter at address 5 heard the request and answered. The cable, the termination, the baud rate, the parity and the address are all proved good by these five bytes. ✅
-
Cause. The request asks address 5 for start address 0x0064, which is register 40101. The meter’s map ends at 0x000D. Registers 40101 and 40102 belong to the drive at address 10: the poll item has the wrong server address. ✅
-
Correction. Change the server address of the poll item to 10 in the gateway configuration. The request becomes
0A 03 00 64 00 02 84 AF. It is a read. ✅ -
Confirm. The item returns a normal response of 9 bytes that begins
0A 03 04, and the exception count for address 5 stops rising. ✅
Step 4: An energy of 16,325,019.48 kWh
Click to reveal the diagnosis
-
Evidence. Low word first:
counts, which is 16,325,019.48 kWh. High word first: counts, which is 123,456.78 kWh. ✅ -
Test against the load. Seven months is about 5,100 hours, so a load of about 24 kW has used about
. The value 123,456.78 kWh fits. Sixteen million does not. ✅ -
Cause. The gateway joins the two registers with the low word first. The meter sends the high word first. Nothing is wrong on the bus. ✅
-
Correction. Set the word order of this point to high word first in the gateway configuration. ✅
-
Confirm. The value agrees with the meter’s own display, and it rises by about 0.40 kWh in one minute of running at 24.15 kW. ✅
Step 5: One meter of four never answers
Click to reveal the diagnosis
-
Evidence. The other servers answer, so the client’s settings and the line are good. The receive indicator blinks, so the request reaches this meter. The request on the bus begins with
06, and the meter’s display shows address 16. ✅ -
Cause. A server answers only to its own address. A meter set to 16 accepts only frames that begin with 0x10, so it treats
06 03 00 00 00 09 84 7Bas a request for another device and stays silent. ✅ -
Correction. Set the address to 6 in the meter’s own menu. This is a setting at the device, not a write over the bus. ✅
-
Confirm.
06 03 00 00 00 09 84 7Bnow returns a 23-byte response that begins06 03 12and passes the CRC. ✅ -
If the address had been right. The next suspects are the baud rate and the parity of that meter. A meter set to 8N1 on an 8E1 bus shows the same symptom, with the framing error drawn in the theory section. ✅
Step 6: Check every result with the script
Click to reveal the check
-
Resistances and voltages. The script prints 120, 60 and 40 Ω for one, two and three terminations, and idle voltages of 667, 357 and 244 mV. ✅
-
Frames. It finds the CRC of the captured response bad (
41 64received,E1 91calculated) and the CRC of05 83 02 81 30good. ✅ -
Values. It prints 123,456.78 kWh and 16,325,019.48 kWh for the two word orders. ✅
Application 2: A commissioning record for the cold store bus
Step 1: The expected values
Click to reveal the expected values
-
Resistance between the lines.
. With the bias network and six receivers in parallel the reading can be as low as 54.9 Ω. The cable pushes it the other way: the far termination is seen through both conductors, and 180 m of a 24 AWG pair adds about 30 Ω, so 120 Ω in parallel with 150 Ω reads 66.7 Ω. Accept 55 to 67 Ω, and write the cable size in the record. ✅ -
Idle voltage.
, and 324 mV in the worst case. Accept 324 mV or more. ✅ -
Poll cycle. A meter read takes 59.53 ms and the drive read 48.07 ms.
The calculated cycle is 286.2 ms. ✅
-
Timeout. Three times the longest valid response:
. ✅
Step 2: The record
The entries in the “Measured” column are examples of what a healthy bus gives. On site they are the electrician’s readings.
| Item | Expected | Measured | Result |
|---|---|---|---|
| Resistance between the lines, power off | 55 to 67 Ω | 58 Ω | Pass |
| Idle voltage, B minus A, at the gateway | 357 mV, at least 324 mV | 352 mV | Pass |
| Shield to earth with the shield lifted at the gateway | Very high | Above 1 MΩ | Pass |
| Terminations switched on | Gateway and meter 8 only | Gateway and meter 8 | Pass |
| Poll cycle time | 286.2 ms | 291 ms | Pass |
| Timeout and retries | 151 ms or more, 1 retry | 200 ms, 1 retry | Pass |
| Address | Device | Baud rate | Format | Termination |
|---|---|---|---|---|
| 5 | Meter A, compressor feeder | 9600 | 8E1 | Off |
| 10 | Drive, compressor | 9600 | 8E1 | Off |
| 6 | Meter, feeder 2 | 9600 | 8E1 | Off |
| 7 | Meter, feeder 3 | 9600 | 8E1 | Off |
| 8 | Meter, feeder 4 (end of line) | 9600 | 8E1 | On |
5 req 05 03 00 00 00 09 84 48 rsp 05 03 12 09 63 09 5E 09 6B 0F AC 0F 93 0F BF 09 6F 03 48 13 8A 41 64 6 req 06 03 00 00 00 09 84 7B rsp 06 03 12 09 61 09 5B 09 68 04 D8 04 BF 04 EE 02 DC 03 34 13 8A 30 F6 7 req 07 03 00 00 00 09 85 AA rsp 07 03 12 09 5F 09 5C 09 67 02 AD 02 BE 02 B3 01 DA 03 B6 13 8A 79 38 8 req 08 03 00 00 00 09 85 55 rsp 08 03 12 09 62 09 5D 09 69 07 1C 07 0D 07 29 04 B6 03 98 13 8A B4 A3 10 req 0A 03 00 C8 00 04 C4 8C rsp 0A 03 08 0D AC 00 A2 00 01 00 00 B5 79| Sign-off | Entry |
|---|---|
| Measurements made by (licensed electrician) | |
| Frames recorded by | |
| Date and time (UTC) | |
| Signature |
Step 3: Check the record
Click to reveal the check
-
Every CRC. The script builds each response from readings and confirms that all five pass the CRC. ✅
-
Every value. For each meter, the power in the frame agrees with volts times amperes times power factor: 24.15 kW against 24.29 kW for meter A, and 7.32, 4.74 and 12.06 kW exactly for the others. The drive frame decodes to 35.00 Hz, 16.2 A, running, no fault. ✅
-
The measured values. 58 Ω is inside 55 to 67 Ω. 352 mV is above 324 mV. 291 ms is within 2 percent of 286.2 ms. A timeout of 200 ms is above 151 ms. ✅
Verify It in Python
The script calculates the resistance and the idle voltage for one, two and three terminations, tests the evidence of the five symptoms, calculates the timing, and builds the frames of the commissioning record. It saves a plot of the two physical-layer measurements against the number of terminations.
"""Bus C: the measurements and captures that separate five faults, and the record."""import structimport numpy as npimport matplotlib.pyplot as plt
def crc16(data): """CRC-16/MODBUS: polynomial 0xA001, initial value 0xFFFF, low byte first.""" crc = 0xFFFF for byte in data: crc ^= byte for _ in range(8): crc = (crc >> 1) ^ 0xA001 if crc & 1 else crc >> 1 return struct.pack("<H", crc)
def hexs(data): return " ".join(f"{b:02X}" for b in data)
def frame(*body): body = bytes(body) return body + crc16(body)
def crc_ok(data): return crc16(data[:-2]) == data[-2:]
def parallel(*resistors): return 1.0 / sum(1.0 / r for r in resistors)
assert hexs(frame(0x01, 0x03, 0x00, 0x00, 0x00, 0x0A)).endswith("C5 CD")
VCC, R_TERM, R_BIAS = 5.0, 120.0, 390.0R_NODE, N_NODES = 24e3, 6
# ---------- Part 1: what the meter shows for 1, 2 and 3 terminations ----------print("Physical layer of bus C")r_values, v_values = [], []for n in (1, 2, 3): r_t = R_TERM / n r_low = parallel(r_t, 2 * R_BIAS, R_NODE / N_NODES) v_idle = VCC * r_t / (2 * R_BIAS + r_t) r_values.append(r_t) v_values.append(1e3 * v_idle) print(f" {n} termination(s): {r_t:5.1f} ohm (down to {r_low:5.1f} ohm with the " f"bias and receivers in parallel), idle {1e3 * v_idle:.0f} mV")print(f" as first built, 680 ohm bias, 2 terminations: " f"{1e3 * VCC * 60 / (2 * 680 + 60):.1f} mV")print(f" no bias, 2 terminations: {0.0:.0f} mV")print(f" worst case with 3 terminations (4.75 V, bias 5 % high): " f"{1e3 * 4.75 * 40 / (2 * R_BIAS * 1.05 + 40):.0f} mV")print(f" driver load, 7 nodes: 2 terminations {parallel(60, 780, R_NODE / 7):.1f} ohm, " f"3 terminations {parallel(40, 780, R_NODE / 7):.1f} ohm")
# ---------- Part 2: the five symptoms ----------good = bytes.fromhex("0503120963095E096B0FAC0F930FBF096F0348138A4164")assert crc_ok(good)
def terminations(r_measured): return round(R_TERM / r_measured)
print("Symptom 1: no reply, 120 ohm at the gateway and 120 ohm at the last meter")print(f" terminations seen from each end: {terminations(120)} and {terminations(120)}" " -> both fitted, not joined: open line")print(f" idle voltage at the gateway with one termination: " f"{1e3 * VCC * 120 / (2 * R_BIAS + 120):.0f} mV")
print("Symptom 2: CRC errors, 40 ohm")print(f" terminations seen: {terminations(40)}")captured = bytearray(good)captured[4] ^= 0x02captured[11] ^= 0x10print(f" captured: {hexs(captured)}")print(f" CRC received {hexs(captured[-2:])}, calculated {hexs(crc16(captured[:-2]))}: " f"{'good' if crc_ok(bytes(captured)) else 'bad'}")
print("Symptom 3: an exception response")request, reply = frame(5, 3, 0x00, 0x64, 0x00, 0x02), frame(5, 0x83, 0x02)print(f" request {hexs(request)}, response {hexs(reply)}, " f"CRC {'good' if crc_ok(reply) else 'bad'}")print(f" function 0x{reply[1] & 0x7F:02X} refused, exception code {reply[2]:02d}; " f"address 0x{request[2] << 8 | request[3]:04X} is register " f"{40001 + (request[2] << 8 | request[3])}")print(f" corrected: {hexs(frame(10, 3, 0x00, 0x64, 0x00, 0x02))}")
print("Symptom 4: the energy value")w0, w1 = 0x00BC, 0x614Eprint(f" high word first: {((w0 << 16) | w1) * 0.01:,.2f} kWh")print(f" low word first : {((w1 << 16) | w0) * 0.01:,.2f} kWh")
print("Symptom 5: one meter of four is silent")print(f" request on the bus: {hexs(frame(6, 3, 0, 0, 0, 9))}, then no response")print(f" a device set to 16 accepts only frames that begin with 0x{16:02X}")bits = [(0x06 >> i) & 1 for i in range(8)]char = [0] + bits + [sum(bits) % 2] + [1]print(f" 0x06 at 8E1: {''.join(map(str, char))} (bit 10 is the parity bit, " f"{char[9]}; a device at 8N1 expects a stop bit of 1 there)")
# ---------- Part 3: timing ----------T_CHAR = 1e3 * 11 / 9600t_meter = (8 + 3.5 + 23) * T_CHAR + 20.0t_drive = (8 + 3.5 + 13) * T_CHAR + 20.0t_valid = 3.5 * T_CHAR + 20.0 + 23 * T_CHARprint("Timing at 9600 baud, turnaround 20 ms")print(f" meter read {t_meter:.2f} ms, drive read {t_drive:.2f} ms, " f"cycle {4 * t_meter + t_drive:.1f} ms")print(f" longest valid response ends {t_valid:.2f} ms after the request; " f"timeout of three times that: {3 * t_valid:.0f} ms")
# ---------- Part 4: the frames of the commissioning record ----------SCALE = [0.1, 0.1, 0.1, 0.01, 0.01, 0.01, 0.01, 0.001, 0.01]meters = { 5: [240.3, 239.8, 241.1, 40.12, 39.87, 40.31, 24.15, 0.840, 50.02], 6: [240.1, 239.5, 240.8, 12.40, 12.15, 12.62, 7.32, 0.820, 50.02], 7: [239.9, 239.6, 240.7, 6.85, 7.02, 6.91, 4.74, 0.950, 50.02], 8: [240.2, 239.7, 240.9, 18.20, 18.05, 18.33, 12.06, 0.920, 50.02],}print("Commissioning record: one good exchange for each device")for address, readings in meters.items(): counts = [round(r / s) for r, s in zip(readings, SCALE)] response = frame(address, 3, 18, *struct.pack(">9H", *counts)) p_check = sum(v * i for v, i in zip(readings[0:3], readings[3:6])) * readings[7] / 1e3 print(f" {address:>2} request {hexs(frame(address, 3, 0, 0, 0, 9))}") print(f" response {hexs(response)}") print(f" CRC {'good' if crc_ok(response) else 'bad'}, {readings[6]:.2f} kW " f"(volts x amps x power factor: {p_check:.2f} kW)")drive = frame(10, 3, 8, *struct.pack(">4H", 3500, 162, 0x0001, 0))print(f" 10 request {hexs(frame(10, 3, 0x00, 0xC8, 0x00, 0x04))}")print(f" response {hexs(drive)}")print(f" CRC {'good' if crc_ok(drive) else 'bad'}, 35.00 Hz, 16.2 A, running, no fault")
# ---------- Plot ----------fig, ax = plt.subplots(1, 2, figsize=(9, 3.8))labels = ["1 (one missing)", "2 (correct)", "3 (one extra)"]ax[0].bar(labels, r_values, color=["tab:orange", "tab:green", "tab:orange"])ax[0].set_ylabel("resistance between the lines, power off (ohm)")ax[1].bar(labels, v_values, color=["tab:orange", "tab:green", "tab:orange"])ax[1].axhline(200, color="gray", linewidth=0.8)ax[1].axhline(300, color="gray", linewidth=0.8, linestyle=":")ax[1].set_ylabel("idle voltage, 390 ohm bias (mV)")for a in ax: a.set_xlabel("terminations fitted")fig.suptitle("Bus C: two measurements that count the terminations")fig.tight_layout()fig.savefig("silent_bus_diagnosis.png", dpi=120)print("Saved silent_bus_diagnosis.png")Expected output
Physical layer of bus C 1 termination(s): 120.0 ohm (down to 101.4 ohm with the bias and receivers in parallel), idle 667 mV 2 termination(s): 60.0 ohm (down to 54.9 ohm with the bias and receivers in parallel), idle 357 mV 3 termination(s): 40.0 ohm (down to 37.7 ohm with the bias and receivers in parallel), idle 244 mV as first built, 680 ohm bias, 2 terminations: 211.3 mV no bias, 2 terminations: 0 mV worst case with 3 terminations (4.75 V, bias 5 % high): 221 mV driver load, 7 nodes: 2 terminations 54.8 ohm, 3 terminations 37.6 ohmSymptom 1: no reply, 120 ohm at the gateway and 120 ohm at the last meter terminations seen from each end: 1 and 1 -> both fitted, not joined: open line idle voltage at the gateway with one termination: 667 mVSymptom 2: CRC errors, 40 ohm terminations seen: 3 captured: 05 03 12 09 61 09 5E 09 6B 0F AC 1F 93 0F BF 09 6F 03 48 13 8A 41 64 CRC received 41 64, calculated E1 91: badSymptom 3: an exception response request 05 03 00 64 00 02 84 50, response 05 83 02 81 30, CRC good function 0x03 refused, exception code 02; address 0x0064 is register 40101 corrected: 0A 03 00 64 00 02 84 AFSymptom 4: the energy value high word first: 123,456.78 kWh low word first : 16,325,019.48 kWhSymptom 5: one meter of four is silent request on the bus: 06 03 00 00 00 09 84 7B, then no response a device set to 16 accepts only frames that begin with 0x10 0x06 at 8E1: 00110000001 (bit 10 is the parity bit, 0; a device at 8N1 expects a stop bit of 1 there)Timing at 9600 baud, turnaround 20 ms meter read 59.53 ms, drive read 48.07 ms, cycle 286.2 ms longest valid response ends 50.36 ms after the request; timeout of three times that: 151 msCommissioning record: one good exchange for each device 5 request 05 03 00 00 00 09 84 48 response 05 03 12 09 63 09 5E 09 6B 0F AC 0F 93 0F BF 09 6F 03 48 13 8A 41 64 CRC good, 24.15 kW (volts x amps x power factor: 24.29 kW) 6 request 06 03 00 00 00 09 84 7B response 06 03 12 09 61 09 5B 09 68 04 D8 04 BF 04 EE 02 DC 03 34 13 8A 30 F6 CRC good, 7.32 kW (volts x amps x power factor: 7.32 kW) 7 request 07 03 00 00 00 09 85 AA response 07 03 12 09 5F 09 5C 09 67 02 AD 02 BE 02 B3 01 DA 03 B6 13 8A 79 38 CRC good, 4.74 kW (volts x amps x power factor: 4.74 kW) 8 request 08 03 00 00 00 09 85 55 response 08 03 12 09 62 09 5D 09 69 07 1C 07 0D 07 29 04 B6 03 98 13 8A B4 A3 CRC good, 12.06 kW (volts x amps x power factor: 12.06 kW) 10 request 0A 03 00 C8 00 04 C4 8C response 0A 03 08 0D AC 00 A2 00 01 00 00 B5 79 CRC good, 35.00 Hz, 16.2 A, running, no faultSaved silent_bus_diagnosis.pngCommon Mistakes
- Changing the baud rate, the wires and the configuration together. Change one thing, test, and write it down.
- Starting at the protocol when nothing answers at all. Measure the resistance and the idle voltage first.
- Measuring the resistance between the lines with the bus powered. The bias current and any active driver make the reading meaningless.
- Reading an exception response as a wiring fault. An exception proves the wiring.
- Swapping A and B at every device to “try it”. Find the one device whose idle polarity is reversed.
- Leaving without a record. The next fault then starts from nothing.
Summary
- Check a silent bus from the bottom up: power and indicators, the physical layer, the serial settings, the protocol, the timing.
- With power off, about 60 Ω between the lines means two terminations, about 120 Ω means one is missing or the line is open, and about 40 Ω means three.
- With power on and the bus idle, the cold store bus shows about 357 mV from B to A. Near 0 V means no bias.
- A silence points to the lower layers or the address. A bad CRC points to the physical layer. An exception response points to the request. A wrong value points to the register map.
- A commissioning record with the measured resistance, the idle voltage, the device settings, one good exchange for each device and the cycle time is the reference for every later fault.
Exercises
1. A technician switches on the termination in four devices of the cold store bus. Find the resistance between the lines with power off, and the idle voltage with the 390 Ω bias on 5.0 V. Is the idle state valid?
Answer
2. With the bus idle, the voltage from terminal B to terminal A is +357 mV at the gateway and at meters 5, 6 and 8, and it is −357 mV by the printed letters at meter 7. Meter 7 never answers. What is the fault?
Answer
The two lines are swapped at meter 7, or its maker prints the letters the other way round. The meter sees every bit inverted. The pair is exchanged at that meter only, by the electrician, and the reading at its terminals is then +357 mV.
3. A capture shows the request 08 03 00 09 00 04 94 92 and the response 08 83 02 10 F3. The meter at address 8 has the same map as meter A, in which register 40010 is not defined. What is wrong, and what is the corrected request?
Answer
The CRC of 08 83 02 is 0xF310, so the response is a good exception frame with code 02, illegal data address. Start address 0x0009 is register 40010, which the meter does not define. The energy block starts at register 40011, address 0x000A: the start address is wrong by one. The corrected request is 08 03 00 0A 00 04 64 92.
4. A gateway has a timeout of 40 ms. Every server has a turnaround of 20 ms, and one character is 11 bits. Show that a nine-register read (23-byte response) always times out at 9600 baud and succeeds at 19200 baud.
Answer
After the request, the response ends after the silent interval, the turnaround and 23 characters. At 9600 baud:
5. A meter is polled every 10 s. In the first week of a month the gateway counts 3 CRC errors per day on its address, and in the fourth week 60 per day. Find the error rate in each week. With one retry, and errors that are independent, about how many readings per day are lost in the fourth week?
Answer
There are 8,640 polls per day. The rates are
References
- Modbus Organization, MODBUS over Serial Line Specification and Implementation Guide V1.02, 2006.
- Modbus Organization, MODBUS Application Protocol Specification V1.1b3, 2012.
- Telecommunications Industry Association, TIA/EIA-485-A: Electrical Characteristics of Generators and Receivers for Use in Balanced Digital Multipoint Systems, 1998.
On a healthy RS-485 bus you expect about 60 Ω between A and B with the power off. Today the meter reads about 40 Ω. What does that tell you?
The bus of the lesson: 120 Ω terminations, bias of 390 Ω on 5.0 V at the gateway, both readings taken at the gateway terminals. The first ohm figure is 120 Ω divided by the number of terminations the gateway can see; the second adds the bias network and the six receivers in parallel, as in the lesson's script. A break hides every termination beyond it. Switch a third termination on, or open the line, and compare the readings with the two tables of this part.
Check yourself
Three questions. Each wrong choice is a mistake people really make, so read the note after you answer.
1. On the cold store bus (120 Ω terminations, 390 Ω bias on 5.0 V) you read about 24 Ω between the lines with the power off. What is connected, and can the bus idle correctly?
2. Meters 5, 6 and 7 and the drive answer. Meter 8, at the far end with the second termination, never answers. With the power off you read about 120 Ω at the gateway terminals, and about 120 Ω at meter 8's terminals too. What is the fault?
3. A gateway has a timeout of 45 ms. The drive (four registers) answers every poll, and the four meters (nine registers each) never do. The bus reads 58 Ω and 352 mV. Every server has a turnaround of 20 ms at 9600 baud. What is the fault?
- The client sends at 9600 baud, 8E1. One meter is set to 8N1. Both see the same line.
- The byte 0x06 at 8E1: start 0, data 0 1 1 0 0 0 0 0 (low bit first), parity 0, stop 1.
- The 8N1 meter expects a stop bit (1) where the parity bit arrives. It reads 0: framing error.
- If any other server answers, the client's settings are right. The fault is in the silent meter.
Discussion
No comments yet. Questions, results from your own build, a better way to explain it: all welcome.
My notes on this page
Kept on this device only. Nothing is sent anywhere.
Tip: select words in the lesson, or tap a figure or an equation, to put a note right there.
Notes on earlier wording
The lesson has changed and these words are no longer in it. Your notes are kept, with the words you chose.