Troubleshooting
Why Modbus_Master stays busy on an S7-1200 CB1241
Short answer
A busy output that never clears on Modbus_Master means one Modbus RTU transaction never reached done or error — the port is waiting, not broken. Record which slave and register the frozen request targets, keep every call to the instance executing each scan with a single owner, size any stuck-sequence timer above the worst-case transaction time, and check baud, parity, framing and termination on the CB1241 link. Reload the port only after the transaction ends; Stop-to-Run discards the evidence.

On this page
A busy output on Modbus_Master that never falls is not a broken port waiting for a reset; it is one Modbus RTU transaction that never reached done or error, and the sequence stalls because the instance is still inside that wait. Work the fault in this order: record which slave, function and register the frozen request targets; keep every call to the instance executing every scan with a single owner; size any stuck-sequence timer above the worst-case transaction time; then check baud, parity, framing and termination on the CB1241 link. Re-run Modbus_Comm_Load only after the outstanding transaction reports done or error, and treat a Stop-to-Run cycle as a symptom clear, not a fix. If your project runs the same stack — an S7-1200 CPU at firmware V4.2 with a CB1241 at V1.0, Modbus_Comm_Load V3.0 and Modbus_Master V2.4 in TIA Portal V14 — read the instruction help for exactly those versions before you act.
What busy means on a Modbus RTU master #
The MODBUS over Serial Line specification defines a single-master bus: the master sends one request frame — slave address, function code, data, and a CRC-16 — to one slave, and the slave either answers or the master declares a response timeout. Frames sit on the wire separated by 3.5 character times of idle line, which is how every receiver finds the start of the next frame. Busy true on Modbus_Master means the instruction is inside exactly one such transaction: it has launched the request and is waiting for a frame or for the timeout to expire.
With Modbus_Comm_Load V3.0 and Modbus_Master V2.4, that wait is meant to end one of two ways — the done output with data, or the error output with a status value that names the failure. Busy held true past one worst-case transaction, with neither output set, is not bus traffic. It is a dead transaction on the wire or a sequencing fault in the program, and the checks below separate them.
Record the transaction that froze #
A Stop-to-Run cycle throws away the only evidence that separates a device fault from a sequencing fault, so capture the state first:
- The sequence identifier (
#iin this failure) and what that step does. - The slave address, operation, data address and data length the outstanding request carries.
- The busy, done and error outputs and the status value.
- The CPU diagnostic buffer entries whose timestamps bracket the freeze.
- The last transaction that completed cleanly, for comparison.
If the same slave or the same register block precedes every freeze, the fault follows that device, not the port. When a transaction does end with an error, the status value names the cause — we trace one common value in the article on why an MB_MASTER on an S7-1200 reports Modbus error 16#8188.
Keep the call executing with one owner #
The instruction help for these Modbus RTU versions requires the call to execute in every program cycle; gate the request edge, not the call. If the Modbus_Master call sits inside a step that goes false while a request is in flight, the busy state is left hanging with nothing to finish it, and that alone reproduces the frozen sequence. The write-up on fixing the S7-1500 TRCV_C busy signal that never clears works this same diagnostic from the receive side of a Siemens communication instruction.
Then confirm ownership. A serial port runs one transaction at a time, so one code path must own each Modbus_Master instance and launch the next request only after done or error. A second routine that fires the same instance mid-wait creates overlapping requests the sequence cannot recover from; if two schedulers share the port, serialize them — the cycle-time arithmetic for a shared serial port is in the article on why Modbus RTU drive polling on one serial port is slow. Hold the request inputs stable for the whole wait, because changing the slave address or data pointer mid-transaction makes the answer ambiguous, and capture done and error in the same execution path that advances the sequence.
Size the watchdog against the worst-case transaction #
The instinct to auto-recover on a stuck step is right, but a five-second test on the sequence identifier will fire during legitimate traffic. Read the response timeout the help documents for your installed Modbus_Master version and the number of attempts your configuration allows, then do the arithmetic. Worked example, illustrative values: suppose the response timeout is 1000 ms per attempt and the port is set for up to four attempts. Worst case per transaction is 4 × 1000 ms = 4000 ms of legitimate waiting with busy true the whole time, before the error output finally names the failure. A five-second threshold leaves only 1000 ms of margin, so one slow-but-legal transaction trips the watchdog and launches a reload into a live wait.
The decision: set the inactivity threshold to at least twice the documented worst case — 10 s with the example values — and reset it only from the branch that handles a completed transaction, done or error, never on motion of the sequence identifier. A sequence oscillating between two steps would otherwise keep feeding the watchdog while the bus is actually dead.
Check the serial link while the freeze is live #
Isolate the CPU and the slaves before touching any wiring. Then work this list:
- Baud rate and parity identical at the master and at every slave on the segment; a mismatch produces framing errors from that device only.
- The requested address and register range valid for the target slave's own register documentation.
- RS-485 wiring with the conductors unswapped, shield and reference arranged per the interface documentation, and termination fitted at both cable ends (typically 120 Ω to match the bus cable).
- The inter-frame idle gap from the standard present on a scope or line analyzer.
- Traffic during the freeze: a request on the wire with no answer points at that slave or the link between you; no request at all points back at the call structure or the port initialization; garbled frames point at wiring, termination or ground.
- Modbus_Comm_Load completed before the first request at startup, as a precondition for everything downstream.
The send and receive indicators on the communication board narrow it further: indicator activity with no valid answer keeps the suspicion on the link or the slave, while no activity at all keeps it in the program.
Reload the port only after the transaction ends #
Modbus_Comm_Load writes the port configuration — rate, parity, timing — and the documented call pattern is one completed load before master traffic begins. A program-side recovery branch keeps that pattern: inhibit new requests, wait for the outstanding transaction to report done or error — the watchdog you sized bounds that wait — record the status value, re-execute Modbus_Comm_Load, confirm its done, then restart the sequence at its first step. Never launch a reload while the master reports busy; reconfiguring a port with a transaction in flight sits outside the documented pattern.
Stop-to-Run looks like the same recovery because it drops the scan and the outstanding transaction with it, but it discards the diagnostic record and leaves the initiating event in place. Use it only after the record exists, and do not wire it into the program as the automatic response.
The decision for each case #
- Busy ends with an error inside the worst-case time: the port works. Read the status value and fix the named cause — address, register range or the slave's response.
- Busy past the worst case with the call executing every scan and one owner: a dead transaction. Work the link list, instrument the bus at the recorded slave, and reload through Modbus_Comm_Load only if the wire shows no request at all.
- Busy caused by a skipped call or two routines fighting over the instance: fix the call structure; no reload is needed.
- Sequence frozen while busy is false: the program lost its step, not the bus; repair the sequence logic.
- Automatic recovery: the last branch only — threshold at twice the documented worst case, reset on completion handling, gated on busy still true with no error, then one load re-execution confirmed before the next request. Stop-to-Run stays manual and only after the record is captured.
Questions asked
Can I re-run Modbus_Comm_Load while Modbus_Master is busy?
No. The load instruction writes the port configuration the same way it does at startup, and the documented pattern is one completed load before master traffic begins. Reconfiguring while a transaction is in flight is outside that pattern. The recovery branch inhibits new requests, waits for done or error, records the status value, reloads once, and confirms the new completion before the first request goes out.
Why does a Stop-to-Run cycle bring the sequence back every time?
Stopping the CPU ends the scan and drops the outstanding transaction, so nothing is busy when the program restarts and the startup load initializes the port again. The sequence continues because the failed transaction was discarded, not resolved. Whatever removed the slave's answer — an intermittent link event, a mis-sequenced call, a device that occasionally misses a request — is still present and will stall the sequence again.
Where do I read the response timeout that applies to my version?
From the instruction help in your own TIA Portal installation: put the cursor on the Modbus_Master call in your version and open its help entry, which lists the response timeout that ends the wait and how the error and status outputs report it. Use that number, not a figure quoted for a different release or another vendor's stack, when you size the stuck-sequence timer.
Is a freeze that repeats about once a day a failing CB1241?
Unlikely as a first suspicion. A board fault normally appears in the CPU diagnostics as a hardware event and would not recover cleanly after every restart. A recurring stall on exactly one transaction matches an intermittent event on the bus — noise, a slave that occasionally misses a request, or a call-structure race — and the slave address recorded at the freeze tells you which end of the link to instrument.

