CP341 Modbus RTU Update Cycle: Reducing 75s Polling on S7-400

David Krause17 min read
ModbusSiemensTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

1. Problem Definition: 75-Second Modbus Update Cycle on a CP341 Master

An S7-400 station communicates with a fleet of Schneider Electric SEPAM-40 protection relays through an ET200M distributed I/O rack on PROFIBUS. The point-to-point link between the S7-400 and the SEPAM slaves is handled by a Siemens CP 341 (order code 6ES7341-1CH02-0AE0) configured as a Modbus RTU master on RS-485. The CP reads process and metering data from the relays. The relays themselves refresh their values almost immediately when queried, but the data that ends up in the S7-400 input area only updates every 75 seconds. The functional link is up, the CP shows no fault LED, and the values are correct, but the polling interval is far too long for protection, metering, and SCADA mirroring applications where 1 to 5 seconds is the normal requirement.

This article walks through the timing model of Modbus RTU, the configuration surface of the CP341 Modbus master driver, and a step-by-step procedure to bring the cycle time down from 75 s to a value compatible with the application. It also covers the specific slave parameters of the SEPAM-40 that must match the master for the cycle to shrink without errors.

Symptom summary: Modbus values refresh immediately at the SEPAM-40. The S7-400 process image, however, updates every 75 s. No diagnostic LED or status error is raised. The bus is functional but the cycle is unacceptable.

2. System Architecture and Data Path

The hardware chain of the affected cell is as follows:

  • S7-400 CPU (for example CPU 414-3 or 416-3) on the central rack.
  • ET200M distributed I/O station on PROFIBUS-DP, containing the CP341 module.
  • CP 341 (6ES7341-1CH02-0AE0) as the Modbus RTU master, RS-422/RS-485 interface, 9-pin sub-D port.
  • RS-485 bus running to multiple Schneider Electric SEPAM-40 series protection relays (SEPAM 40, 40B) in daisy-chain on a shielded twisted pair.

Data flow: S7-400 OB1 calls the Modbus master function block that runs in the CP341 firmware background. The CP341 transmits Modbus RTU frames on RS-485. The SEPAM-40 slaves respond on the same two-wire bus. The CP341 places the responses in the parameter/data DB, which the S7-400 reads via the backplane or PROFIBUS and copies into the process image.

For configuration, refer to the official Siemens manual CP 341 Point-to-Point Communication, Installation and Parameter Assignment and the loadable driver manual MODBUS Master / MODBUS Slave for CP 341 / CP 441-2.

3. Modbus RTU Timing Fundamentals

The cycle time of a Modbus RTU master is governed by three physical laws: the time to transmit each byte, the inter-frame silence required by the Modbus RTU specification, and the time the master waits for a response. Tuning the cycle is impossible without sizing all three.

Character time on the wire. For 8 data bits, 1 start bit, 1 stop bit, 1 even parity bit, the frame per byte is 11 bits. Character time is therefore:

T_byte = 11 / baud_rate [seconds]

Common reference values:

Baud rate T_byte (ms) T_1.5 (1.5 char) (ms) T_3.5 (3.5 char) (ms)
1200 9.167 13.75 32.08
2400 4.583 6.88 16.04
4800 2.292 3.44 8.02
9600 1.146 1.72 4.01
19200 0.573 0.86 2.01
38400 0.286 0.43 1.00
57600 0.191 0.29 0.67
115200 0.0955 0.14 0.33

The Schneider Electric FAQ FA330292 - What is the Modbus cycle time for ATV and how is it calculated? uses the same convention: 11 bits per byte at 8-E-1.

Transaction time for one request/response. For a Modbus function 03 (Read Holding Registers) reading N 16-bit registers from one slave:

  • Request frame: slave(1) + 0x03(1) + addr(2) + qty(2) + CRC(2) = 8 bytes
  • Response frame: slave(1) + 0x03(1) + byte_count(1) + 2N + CRC(2) = 5 + 2N bytes
  • Per-transaction time on the wire: T_tx = (13 + 2N) × T_byte + 2 × T_3.5

Full master cycle. With K slaves and per-slave read of N_k registers, plus per-slave retries R_k on timeout, the cycle is:

T_cycle = Σk=1..K [(1 + R_k) × T_tx_k + R_k × T_timeout_k]

This is the formula that explains where 75 seconds comes from. If the response timeout T_timeout is left at 25 s (a documented CP341 default for some configurations) and three retries are configured on each of the slaves, the master can spend 75 s waiting for replies that never come. If the SEPAM-40 side is configured at a different baud rate than the CP341, every frame is lost, the master waits the full timeout, retries, and the cycle blows up to tens of seconds per slave.

4. CP341 Hardware and Modbus Master Driver Identification

The CP 341 in use is the RS-422/RS-485 variant, order code 6ES7341-1CH02-0AE0. The trailing hardware release 2 is the second hardware version and is fully compatible with the Modbus master loadable driver.

The Modbus protocol itself is not part of the CP341 firmware. The protocol runs in a loadable driver that must be ordered separately and installed on the CP341 or on the STEP 7 project. The standard order code for the Modbus Master driver on CP341 is:

  • 6ES7870-1AA01-0YA0 — Modbus Master RTU driver for CP 341 / CP 441-2 (single license).
  • 6ES7870-1AA01-0YA1 — Multi-license variant of the same driver.

The same module can also be ordered with the Modbus Slave driver (6ES7870-1AB01-0YA0) or ASCII/3964(R) drivers. The Modbus RTU protocol stack is provided by the loadable driver; the CP341 hardware only supplies the physical interface and the firmware loader. The order number of the driver must match the hardware release; refer to the release compatibility list in the Modbus master / slave driver manual.

License check: If the driver is missing or licensed to a different CP341, the CP drops into ASCII mode and the Modbus FBs will return error code 0900 on the first call. A 75-second update with no error usually means the driver is loaded correctly but the parameters are slow.

5. CP341 Modbus Master Parameter DB Structure

The Modbus master driver for the CP341 is configured through a parameter data block generated by the MODBUS Master parameter assignment tool in STEP 7 (or TIA Portal, depending on project). The parameter DB is the central control structure that defines slaves, frames, and timing. When the user opens the parameter DB they see the following blocks of parameters:

Section Typical address (DBX) Parameter Effect on cycle time
CP interface DBW 0 LADDR (logical base address of CP341) None (must match HW Config)
CP interface DBW 2 PROTOCOL (0 = RTU master, 1 = RTU slave, 2 = ASCII) None
Slave list DBW 100 + 32×k Slave address 1..247, enable flag Number of K in the cycle sum
Per slave DBW 110 + 32×k Function code (03, 04, 06, 16) Length of request/response frame
Per slave DBW 112 + 32×k Start register, quantity of registers Sets 2N in T_tx
Per slave DBW 116 + 32×k Scan rate / cycle multiplier Skips the slave for N-1 cycles
Per slave DBW 118 + 32×k Monitor time (response timeout), ms Direct multiplier on cycle
Per slave DBW 120 + 32×k Number of retries (0..10) Direct multiplier on cycle
Bus timing DBW 200 Baud rate, parity, data bits, stop bits Sets T_byte
Bus timing DBW 202 Inter-frame delay (ms) override Forces > T_3.5 silence
Global DBW 204 Master enable, diagnostic, error byte clear None

The exact byte offsets depend on the version of the parameter assignment tool. The principle is the same in every release: one slave definition occupies roughly 32 bytes in the DB, and the three numbers that control the cycle are monitor time, retries, and the scan rate multiplier.

6. Block Parameters That Directly Govern the Cycle

The CP341 Modbus master runs in the firmware background, not in OB1. The OB1 application calls one of the following blocks to enable the driver, to pass commands, and to read the diagnostic/status byte:

  • FB 80 MODB_341 (or FB 7 / FB 8 in raw mode) — the Modbus master interface block in the Modbus driver library.
  • FC/FB for status — reads STATUS (word), ERROR (byte), JOB_OK (bit) from the parameter DB.

Inside the parameter DB, the three parameters that dominate the cycle time are:

Parameter Default in driver Reasonable range What it does
Monitor time (per slave) 2000 ms (some releases 25000 ms) 50 ms – 5000 ms How long the master waits for a slave response before declaring the transaction failed.
Retries (per slave) 2 0 – 3 How many times the master repeats a transaction after a timeout. Each retry costs one full monitor time + a T_3.5 silence.
Scan rate (per slave) 1 (every cycle) 1 – 255 The slave is polled every Nth master cycle. Setting this to a higher value slows the apparent cycle for that slave.

With the default of 2 s monitor time, 2 retries, and one slave scanned every cycle, the worst-case time spent on a single dead slave is:

T_worst,slave = (1 + 2) × T_timeout = 3 × 2 s = 6 s

For 10 dead slaves scanned in one cycle, the master will spend 60 s waiting. Add the few ms of T_tx for the few that respond, and a 75-second update cycle is exactly what you get when retries are high and one or more slaves is dropping frames.

7. Root Cause Analysis for the 75-Second Cycle

The 75-second cycle observed in the field has, in the author's experience, only four realistic root causes on a CP341 / Modbus master cell. Each is testable in a few minutes with the diagnostics listed in section 10.

7.1. Response timeout configured too high (most common)

Earlier versions of the Modbus master driver shipped with a default monitor time of 25 000 ms. Combined with the default of 2 retries, every failed transaction blocks the master for 75 s. The first fix is always to drop monitor time to a value that covers one or two frame times plus a margin. For 9600-8E1 and 50 registers the answer is 200 ms to 500 ms, not 2 s and certainly not 25 s.

7.2. Baud rate or frame mismatch with the SEPAM-40

If the CP341 is set to 9600-8E1 and the SEPAM-40 is left at the factory default of 4800-8E1 (some SEPAM 40 firmware releases ship at 4800), every byte is corrupted. The master waits the full monitor time, retries, and the cycle blows up. Always set both ends to the same baud, parity, data bits, stop bits. SEPAM-40 supports 1200 / 2400 / 4800 / 9600 / 19200 / 38400 baud with 8E1 by default.

7.3. RS-485 termination and bias missing

The CP341 RS-485 port requires 330 Ω termination at both ends of the bus and a fail-safe bias on one node. Without termination, the rising edges at 9600 baud ring and the SEPAM-40 occasionally drops the start bit, which the master reports as a CRC error, which it retries. The cycle grows linearly with retry count.

7.4. Too many slaves or too many registers per slave

Reading 100 registers from each of 10 slaves at 1200 baud with 8E1 is:

T_tx = (13 + 200) × (11/1200) + 2 × 3.5 × (11/1200) = 1.95 s + 64 ms = 2.01 s per slave
T_cycle ≈ 20.1 s

At 1200 baud the floor of the cycle is high, regardless of monitoring settings. A speed-up of 8× is available by switching to 9600 baud, and 32× by switching to 38400 baud. The bus must support that speed; SEPAM-40 supports up to 38400 baud.

8. Step-by-Step Procedure to Reduce the Update Cycle

The following procedure reduces the update cycle from 75 s to a value appropriate for the application. It is the order the author follows in the field; do not skip the diagnostic step at the end of each phase.

  1. Open the CP341 parameter DB in STEP 7 (or the equivalent TIA Portal view) and locate the slave list. Confirm the driver release shown in the DB header; the recommended minimum for the 1CH02 CP341 is the Modbus master driver V3.x or higher.
  2. Reduce monitor time for every slave to 200 ms – 500 ms. Do not leave it at the driver default of 2 000 ms or higher. The monitor time should be larger than 2 × T_tx for the largest frame on the bus, but no more than 5× that figure.
  3. Reduce retries to 1. Two retries are only justified on long, noisy bus segments. With correct termination one retry is enough; with no termination, no number of retries will save the cycle.
  4. Confirm the scan rate for every slave is 1. A scan rate of N means the slave is polled every Nth cycle. If you need every value every cycle, leave the multiplier at 1.
  5. Set the baud rate on both ends to 9600 8E1 as a starting point. SEPAM-40 supports 9600 8E1 by default on most firmware releases. Higher baud (19200, 38400) is fine if the wiring allows it.
  6. Verify RS-485 wiring: shielded twisted pair, shield grounded at one end only, 330 Ω termination at each end, fail-safe bias on the master or on one node. Without this, a faster cycle will only generate more CRC errors.
  7. Recompile and download the parameter DB to the S7-400. Cold-restart the CP341 (power cycle or stop/run of the ET200M station) so the driver reloads from the new DB.
  8. Run a Modbus trace (see section 10) to confirm one full poll completes in well under a second and no retries are triggered.
  9. Monitor the S7-400 input area and measure the update interval by toggling a discrete value in the SEPAM-40 and watching when the bit flips on the S7 side.
Verification target: On a 5-slave cell with 20 registers per slave at 9600 8E1, monitor time 300 ms, retries 1, the cycle should be 5 × ~30 ms + a small overhead = roughly 200 ms – 400 ms. If it is still above 1 s, return to step 1 and recheck monitor time, retries, and the trace.

9. SEPAM-40 Modbus Slave Communication Parameters

The Schneider Electric SEPAM-40 series (40, 40B) is a digital protection relay with a Modbus RTU slave on its RS-485 communication port. The communication parameters are set from the SEPAM front panel or via the SFT2841 setting software. The factory default depends on the firmware release, but the conventional values for a CP341 master are:

Parameter Factory default Recommended for CP341 cell Location in SEPAM
Modbus address 1 1, 2, 3, … (unique per device) COMMUNICATION menu, Addr
Baud rate 9600 (some releases 4800) 9600 or 19200 COMMUNICATION menu, Bd
Parity Even Even COMMUNICATION menu, Par
Frame format 8E1 8E1 Implicit with parity + stop bits
Stop bits 1 1 Implicit
Response delay 0 ms 0 ms – 20 ms if CPU on SEPAM is loaded COMMUNICATION menu, tR

The SEPAM-40 exposes the standard Modbus function codes 03 (Read Holding Registers), 04 (Read Input Registers), 06 (Write Single Register) and 16 (Write Multiple Registers). The data that the CP341 should read for a typical application is in the measurements and protection register maps, starting at addresses documented in the SEPAM-40 communication manual. Refer to the official Schneider Modbus cycle time FAQ and the SEPAM-40 user manual for the exact register list.

10. Verification, Diagnostics, and Trace Tools

To prove the cycle is now correct, instrument the bus. The CP341 does not have a built-in oscilloscope, but the following methods work on any site:

  • Modbus RTU trace on a PC. Connect a USB-to-RS-485 converter on a tap of the bus and run any Modbus RTU master trace tool. Compare the timestamps of consecutive master requests to confirm the inter-frame gap is > T_3.5 (3.5 × T_byte) and that the slaves answer within monitor time.
  • Siemens CP341 diagnostics buffer. The CP341 keeps a small diagnostic buffer readable from STEP 7. The buffer reports per-slave error counts (CRC, timeout, framing). If the diagnostic buffer reports CRC errors, the issue is wiring, not parameter settings.
  • FB STATUS / ERROR words. The Modbus master FB returns a STATUS word and an ERROR byte. Documented error codes include 0900 (driver missing), 0901 (slave not in list), 0902 (timeout), 0903 (CRC), 0904 (parameter DB length). A stream of 0902 errors confirms a timeout, which is the cycle-time symptom in disguise.
  • S7-400 timestamp. In OB1, latch the system clock the first time a known register changes value. The interval between two latches is the user-visible cycle.

A clean Modbus trace at 9600 8E1 with monitor time 300 ms, retries 1, and four SEPAM-40 slaves each contributing 20 registers looks like the diagram below. Each slave poll costs about 30 ms, and the inter-frame silence is just over 4 ms.

master poll cycle at 9600 8E1, monitor 300 ms, retries 1, 4 slaves × 20 registers req1 rsp1 req2 rsp2 req3 rsp3 req4 rsp4 ~30 ms per slave total cycle ≈ 130 ms bus utilisation 4 – 5 % spare capacity for more slaves or higher baud case at 1200 8E1 with default 2 s monitor and 2 retries on a noisy bus req timeout 2 s + retry 1 req timeout 2 s + retry 2 req ~6 s wasted per dead slave, multiplied by slave count = tens of seconds, not sub-second

11. Common Pitfalls and Field Notes

The following notes come from repeated cell commissioning on S7-400 + CP341 + SEPAM-40 topologies. Apply them during the first cold start of a new cell to avoid the 75-second trap.

  • Driver license vs. CP341 hardware release. Driver V2.x is for CP341 hardware release 1; driver V3.x and V4.x are for release 2 and later. The 1CH02-0AE0 module is release 2; do not load a V2.x driver on it. Mismatched releases produce slow polls and intermittent errors.
  • CP341 in ET200M. When the CP341 sits in an ET200M station, the S7-400 reads its data through PROFIBUS-DP. The PROFIBUS cycle is independent of the Modbus cycle. A long PROFIBUS cycle cannot stretch the Modbus cycle; the symptom of 75 s is on the Modbus side, not on PROFIBUS.
  • Diagnostic buffer on the CP341 is not cyclic. The buffer is overwritten on every new event. Read it via STEP 7 immediately after a fault, or set a trigger in the parameter DB to latch errors in a flag byte.
  • Don't disable inter-frame delay. The Modbus RTU spec requires a 3.5-character silence. Some drivers expose a "0 ms" option; never select it on RS-485, only on RS-232 point-to-point, and even then only if the connected device is documented to ignore the spec.
  • Watch the receive window on the S7-400. The Modbus master driver writes into the parameter DB. If OB1 reads the data through a long DB and copies it, the cycle the user sees in the HMI can be OB1-cycle + Modbus-cycle. Cut OB1 to < 100 ms in the cycle-time OB (OB35) settings if you need sub-second end-to-end response.
  • SEPAM-40 local HMI does not pause Modbus. Local front-panel activity on the SEPAM does not block the Modbus port. If the value updates locally but not on the S7-400, the master is the bottleneck, not the slave.

12. Frequently Asked Questions

Why does my CP341 Modbus master update every 75 seconds even though the SEPAM-40 replies immediately on a service tool?

The default monitor time in some releases of the Modbus master driver for CP341 is 2 000 ms or 25 000 ms, and the default number of retries is 2. With one or more slaves dropping frames, the master waits the full monitor time and retries twice per transaction, accumulating tens of seconds of dead time per cycle. Open the parameter DB, reduce monitor time to 200 – 500 ms, and reduce retries to 1.

Can the CP341 in ET200M act as a Modbus RTU master without a separate loadable driver?

No. The CP341 hardware ships with only the ASCII/3964(R) protocol. Modbus RTU master requires the loadable driver 6ES7870-1AA01-0YA0 (Modbus master V3.x or higher for hardware release 2). Without the driver, the FB returns error code 0900 and the bus is silent.

What is the minimum cycle time I can achieve on a CP341 Modbus master with four SEPAM-40 slaves?

At 9600 8E1 with 20 registers per slave, monitor time 300 ms, retries 1, the cycle is approximately 4 × 30 ms = 120 ms on the wire plus a small driver overhead, giving roughly 200 ms end-to-end. Increasing the baud to 19200 cuts the per-transaction time roughly in half, and to 38400 by four. The final floor is set by the slave response time, not by the CP341.

How do I distinguish a CP341 timeout from a CRC error in the diagnostic buffer?

A timeout is reported as error 0902 (slave did not respond within monitor time); a CRC error is reported as 0903. Timeouts are cured by checking the slave address, baud rate, and wiring. CRC errors are cured by adding 330 Ω termination at both ends of the RS-485 bus and enabling fail-safe bias. Both are visible in the diagnostic buffer read from STEP 7 or via the FB STATUS word.

Is the Modbus cycle time tied to the OB1 cycle of the S7-400 CPU?

No. The Modbus master driver runs in the CP341 firmware background, decoupled from OB1. OB1 only calls the FB to read the result DB and to clear status bits. A slow OB1 will not produce a 75-second update; a wrongly configured monitor time, retries, or baud rate will.

Back to blog