Troubleshooting
CB1241 reads zero on Modbus RTU while the transmitter works
Short answer
A CB1241 that reads zero while a USB-to-RS-485 converter reads the same transmitter is failing on the PLC side, and TIA Portal hides the cause: MB_MASTER completes with an error and the next scan's retry clears STATUS. Latch STATUS into a memory word when ERROR goes true, then fix the parity code, the unit ID, the 40001-based register number and the RS-485 bus, and keep the converter off the bus.
On this page
A transmitter that answers a USB-to-RS-485 converter has already proven its serial frame, 115200 baud and one stop bit among them, and that the weight really sits in its register map. What is failing is the CB1241 path, and TIA Portal hides the reason: MB_MASTER finishes with an error, the retry fires on the next scan, and STATUS drops back to zero before you can read it, so the online view shows only BUSY. Latch STATUS into a memory word the moment ERROR goes true, then work four suspects in a fixed order: the PARITY code in MB_COMM_LOAD, the unit ID in MB_ADDR, the 40001-based register number, and the RS-485 bus the converter was masking. One of those four is the fault in this shape; the board itself is the last hypothesis, not the first.
Capture the status before the retry erases it #
A trend in which the master's ERROR output rises together with BUSY is the signature of a block that fails on every request. MB_MASTER completes with an error, the program retriggered the request on the next scan, and the fresh request resets STATUS, so the online view never shows the code. The CPU diagnostic list stays empty for the same reason: a Modbus timeout is a protocol result, not a module fault the CPU reports.
Copy STATUS into a memory word, for example LastStatus, a Word at %MW10, whenever ERROR is true. In LAD that is one network after the MB_MASTER call: a contact on the instance's ERROR output feeding a MOVE of STATUS into LastStatus. In SCL:
IF "mb_master_db".ERROR THEN
"LastStatus" := "mb_master_db".STATUS; // Word, for example at %MW10
END_IF;
"mb_master_db" and "LastStatus" are example tags; wire the tags you actually have on the ERROR and STATUS outputs. Download, trigger one request, and open a watch table on LastStatus: it holds the code that ERROR carried and stops chasing zero.
Branch on what you captured:
- A response-timeout code: the transmitter never answered. Go to the parity, unit ID and bus checks below.
- A parameter-class code naming an invalid address, length or pointer: rebuild the call arguments as the next sections describe.
- A module-access code: check the PORT input.
- ERROR never rises and BUSY toggles cleanly: the exchange works, and the zero you see is a data-mapping problem.
Decode the status you captured #
These are the codes that decide this fault:
- 16#0000: no error. A clean status with a zero value points at destination mapping, not communication.
- 16#80C8: slave timeout, meaning the transmitter did not reply within the response timeout. The walkthrough Why an S7-1200 MB master gets status 80C8 with no reply covers the wiring-and-parameter path end to end.
- 16#8280 or 16#8281: negative acknowledgment when reading or writing the module. PORT does not name the CB1241; set it to the board's own hardware identifier from the device configuration, not the CPU's built-in interface.
- Parameter-class codes: an invalid MB_DATA_ADDR, DATA_LEN or pointer. For a worked case of a wrong address argument, see Why MB_MASTER on an S7-1200 reports Modbus error 16#8188.
After you fix the underlying cause, retrigger MB_COMM_LOAD once: an error state held inside the instruction clears on a fresh configuration pass, and polling resumes from Done.
Match MB_COMM_LOAD to the transmitter's serial frame #
MB_COMM_LOAD configures the port for Modbus RTU and must complete, with Done set, before the first MB_MASTER request runs. Call it once at startup and hold polling off until Done. If Done never arrives, the port identifier or the board configuration is wrong; Why modbus_comm_Load Done stays false on an S7-1200 G2 walks that branch.
Check each item against the transmitter's own menu, not against the settings you recorded from the previous unit:
- PORT: the CB1241's hardware identifier from the device configuration.
- BAUD: 115200, matching the transmitter.
- PARITY: in MB_COMM_LOAD the code 0 means no parity, 1 means odd, 2 means even. A transmitter menu that reads "parity 0" is declaring none. A mismatched parity corrupts every frame, the slave discards it silently, and the bus looks dead from the master's side, which is the same silent failure described on why Modbus RTU fails on a parity mismatch.
- Stop bits: one, per the transmitter menu.
Decision: if the latched code is a timeout and the PARITY code disagrees with the transmitter menu, correct it and re-poll. A parity mismatch alone reproduces every symptom of a dead bus, including the LED cadence.
Settle the unit ID, then the register number #
Two numbers can be wrong at once here, and the converter test hides both.
Unit ID. MB_ADDR must equal the slave address configured in the transmitter. A replacement unit commonly leaves the factory with a different slave address than the unit it replaced, even at the same model, and many PC tools poll successfully regardless of the ID they are set to, so the converter test proves nothing about the ID. Read the address in the transmitter menu, set MB_ADDR and the PC tool to that same number, and re-poll. A timeout that turns into a valid response closes this branch.
Register number. MB_MASTER takes holding-register numbers on the 40001 base: register number = 40001 + protocol offset. The converter tool showed the weight changing at register 40009, so the weight's offset is 40009 - 40001 = 8 and MB_DATA_ADDR must read 40009. A 32-bit weight spans 32 bits / 16 bits per register = 2 registers, so DATA_LEN is 2 and the value occupies the register at that offset plus the next one. The previous transmitter answered at 40008, offset 7; if the replacement's register map shifted by one, the 40009 request returns the weight once the bus answers at all, which is why an address change proves nothing while every request still times out. Settle parity and unit ID first, then poll candidate registers and keep the one that tracks the weight.
When a value returns but decodes as nonsense, check the data type (16-bit integer, 32-bit integer or 32-bit float) and the word order before touching anything else.
Test the bus the converter was masking #
RS-485 receivers read the voltage difference between the two conductors, and most USB converters that read a bus cleanly carry their own bias and termination on board. A bus that behaves through the converter can therefore still be marginal at the CB1241. Enable the termination the CB1241 documentation specifies for the end of the segment, and keep the drop stub to the transmitter short.
Disconnect the converter before any PLC test. Modbus RTU allows one master per bus; a converter left polled alongside the PLC acts as a second master, corrupts both exchanges, and makes both sides look faulty.
Swap the two conductors exactly once. Polarity labels such as A/B and +/- are not consistent between manufacturers, so a reversal is a genuine suspect even when the labels look right. Power the PLC and the transmitter down before moving the wires, swap once, re-power, and read the latched status again; repeated swapping without a status reading yields nothing.
Drop the rate on both ends as a separator: run master and transmitter at 19200 and re-poll. Reads that work at 19200 and fail at 115200 are a signal-quality fault, meaning termination, bias or cable, not a protocol fault. Fix the bus, then restore the original rate at both ends.
The LED cadence is evidence on its own. A transmit LED pulsing once every few seconds instead of once per poll is what a timeout cycle looks like: every failed request waits out the response timeout, so the request rate collapses to one pulse per timeout period. Both LEDs blinking steadily with a latched status of 16#0000 and a still-zero value moves the fault off the bus and into data mapping.
The decision for each result #
Read the table against your latched status and LED behavior; every row ends in an action.
| Latched status or observation | Fault location | Decision |
|---|---|---|
| 16#80C8, transmit LED pulses, no receive activity | Transmitter silent or wiring reversed | Match PARITY to the transmitter menu, then MB_ADDR to its slave address; swap the pair once with the power off. The weight returns. |
| 16#80C8 with receive activity present | Frames corrupted on the wire | Enable the documented termination, shorten the stub, or lower the rate at both ends; restore the original rate once the bus reads clean. |
| 16#8280 or 16#8281 | PORT does not name the CB1241 | Correct the hardware identifier in the device configuration and in both instruction calls, then rerun MB_COMM_LOAD. |
| Parameter-class code | Invalid MB_DATA_ADDR, DATA_LEN or pointer | Rebuild on the 40001 rule: register number = 40001 + offset, and DATA_LEN = 2 for a 32-bit weight. |
| 16#0000, both LEDs blink per poll, value still zero | Destination mapping | Check the destination pointer and its memory area, whether that DB's access setting allows pointer addressing, then the weight's data type and word order. |
| Every check above passes and a known-good CB1241 in this slot behaves the same | Board hardware | Replace the board. Until a spare fails where this board fails, the board is not the fault. |
In this fault shape the order is fixed: latch the status, match the parity code, match the unit ID, rebuild the register number, then clean the bus. The transmitter needs no further attention because the converter already proved it, and the latched status tells you which of the four PLC-side causes you are in.
Questions asked
Does MB_COMM_LOAD have to run before MB_MASTER?
Yes. Each PtP port needs one MB_COMM_LOAD pass before the first MB_MASTER request, and polling must stay off until Done comes on. Trigger it once at startup, not every scan. If Done never arrives, the problem is the port identifier or the board's hardware configuration, not the Modbus data.
Why does the transmitter answer the PC tool but not the PLC?
Because the two tests do not prove the same things. The PC tool may poll any unit ID, uses its own serial settings, and carries its own termination and bias on the converter. The PLC must match the transmitter's configured unit ID and parity exactly, over a bus the converter was electrically propping up. The mismatch shows up as timeouts on the PLC side only.
Can the USB-to-RS-485 converter stay connected while the PLC polls?
No. Modbus RTU defines one master per bus, so a polled converter is a second master and both sides report timeouts. Remove it before every PLC test, and check the conductors at the transmitter terminals afterward, because converters often provide the screw terminals that hold the A and B wires and the bus can come apart with them.
The read finally succeeds but the weight decodes as nonsense. What now?
The exchange is healthy; the interpretation is not. A 32-bit weight spans two registers, so DATA_LEN must be 2. If the value is absurd rather than zero, the word order likely differs: some transmitters put the high word first, some the low word. Swap the two words in the PLC before conversion and compare against what the PC tool showed.
How do I prove the CB1241 board itself is bad?
Only by substitution. Run the same program, parameters and wiring on a known-good CB1241 against the same transmitter. If the spare reads and this board still reports the same latched status, replace the board. A board that fails while every bus cause is still unresolved is not proven bad, and most zero-value cases end in configuration, not hardware.