1. Problem Overview
A Siemens S7-300 station configured as a Modbus RTU master using a CP 341 (RS422/485) on a CPU 315-2DP fails to exchange any data with a Modbus RTU slave. All physical-layer indicators on the CP remain dark: SF, TXD, and RXD LEDs are off, the CP does not generate a single character on the bus, and the FB8 P_SND_RK "send" block rejects the request the instant REQ is set. The status word returned by FB8 reports event class 0E44, which the Siemens Modbus master manual documents as: "The value of the transferred parameter 'Amount of bits' is out of range (1-2040)".
This symptom set — no transmission, immediate REQ reject, error counter increments at the same scan that REQ rises — is the classic signature of an invalid LEN / source-DB combination being handed to the Modbus master dongle firmware, not a hardware fault.
2. Affected Hardware and Software
| Component | Specification | Notes |
|---|---|---|
| CPU | S7-300 CPU 315-2DP (6ES7315-2AG10 or later) | Master station; DP interface unused in this scenario |
| Point-to-point CP | CP 341 RS422/485 (6ES7341-1CH02-0AE0) | RS485 half-duplex, 2- or 4-wire |
| Modbus master dongle | Order number 6ES7870-1AA01-0YA0 | Must be physically inserted in the CP sub-D backshell socket |
| Modbus driver (CP firmware) | Loadable driver for point-to-point CPs, "Modbus Protocol RTU Format, S7 is Master" | Loaded into CP flash via SIMATIC Manager / Parameter Assignment tool |
| Function block | FB8 P_SND_RK (S7-300/400 Modbus master library) | Send data block to Modbus slave |
| Companion FBs | FB7 P_RCV_RK, OB100, FB100 INIT_DONE pattern | Initialization sequence per Modma example |
| STEP 7 / SIMATIC Manager | V5.5 + SP4 or later | Required for Modma example project |
| Modbus slave | Any third-party RTU slave (e.g., VFD, sensor, energy meter) | Verify slave address and 8N1 framing |
Reference documentation: CP 341 Point-to-Point Communication, Installation and Parameter Assignment Manual and the Loadable Driver for Point-to-Point CPs, Modbus Protocol RTU Master manual (entry ID 25362836).
3. Symptoms and LED Diagnostic Matrix
Before assuming a parameter fault, map the observed LED pattern to a fault class. The CP 341 front panel has four relevant indicators for the RS422/485 variant: SF, TXD, RXD, and the green "CP active" LED on the right of the connector.
| SF | TXD | RXD | STATUS / FB8 error | Likely Fault Class |
|---|---|---|---|---|
| Off | Off | Off | 0E44 | Invalid LEN / amount of bits — driver rejects request before bus access |
| Off | Off | Off | 0E1E / 0E1F | CP not parameterized in HW Config, or wrong protocol slot |
| On red | Off | Off | — | CP diagnostic fault: dongle missing, firmware mismatch, or module fault |
| Off | Pulses | No reply | 0E22 (timeout) | Wiring, A/B polarity, or termination fault |
| Off | Pulses | Pulses, CRC error | — | Baud rate / parity / slave address mismatch |
| Off | Pulses | Pulses, OK | — | Healthy bus — investigate application / coil map |
The user's reported pattern — SF off, TXD off, RXD off, 0E44, error counter increments the same scan that REQ rises — pins the fault to Section 4.
4. Root Cause: Event 0E44
Event 0E44 is documented in the Modbus master manual as a parameter validation error raised when the value passed in LEN to FB8 P_SND_RK lies outside the legal range of 1 to 2040 bits, or — more commonly — when the implied amount of bits derived from LEN and the function code's data footprint is inconsistent.
The CP 341 Modbus master does not transmit the request when the LEN does not match the function-code-specific expected request length. This is intentional: the dongle firmware validates the job against a fixed table (Chapter 6.1 of the Modbus master manual) before granting bus access. If the LEN is wrong, the request is rejected internally, the bus is never driven, and TXD never pulses.
Event 0E44 is one of a family of 0E4x parameter errors emitted by the Modbus master dongle:
| Event ID (hex) | Meaning | Common Cause |
|---|---|---|
| 0E40 | Illegal function code | Function code not 01/02/03/04/05/06/0F/10 |
| 0E41 | Slave address out of range | Address > 247 or broadcast misuse |
| 0E42 | Illegal data address | Register/coil address out of slave map |
| 0E43 | Illegal data quantity | Quantity outside slave limits |
| 0E44 | Amount of bits out of range (1-2040) | Wrong LEN for selected function code |
| 0E45 | Source DB number invalid | DB_NO outside process image, or DB too short |
| 0E46 | DBB_NO + LEN exceeds DB size | Source DB range overflow |
Reference: Chapter 7 of the Modbus master manual (Siemens entry 25362836) — "Diagnostics and error messages".
5. Pre-Flight Diagnostic Checklist
Walk this list in order before modifying the FB8 call. Each item eliminates a class of fault and takes seconds to verify in STEP 7 / TIA Portal (legacy STEP 7 for S7-300).
-
Dongle presence. Open the sub-D backshell of the CP 341 and confirm the small EEPROM dongle (Siemens order number
6ES7870-1AA01-0YA0) is seated in its socket, label side up. -
Dongle firmware load. In HW Config, right-click the CP 341 → Object Properties → Parameter Assignment. The Modbus master protocol must be selected in the protocol slot. The driver is downloaded to the CP on the next CPU-to-CP parameter assignment; verify with PLC → Module Information → Diagnostic Buffer — no event
1E0DH("Request canceled due to complete restart, restart, or reset") should appear after the first download. - LED state on cold start. Power-cycle the CPU. SF must be OFF. If SF stays RED, the dongle or driver is rejected at startup — the Modbus master driver must be reloaded.
- CP interface diagnostic. In STEP 7 PLC → CP 341 Diagnostics → Status, verify the CP reports Protocol = Modbus Master, the configured baud rate (e.g., 9600), parity (typically Even), and character framing (8E1 for Modbus RTU).
- Cabling. For RS485 2-wire: T/R+ (pin 3) → A, T/R− (pin 8) → B, shield bonded at one end only, 120 Ω termination at each end of the bus segment, no star topology.
- Slave address and framing match. Confirm the Modbus slave's address, baud rate, parity, and stop bits match the CP 341 parameter assignment exactly.
- FB7 / FB8 instance DBs. The Modma example project ships instance DBs for FB7 and FB8; do not regenerate them by hand or the LEN-derived offsets will be lost.
6. FB8 P_SND_RK — Required LEN per Function Code
FB8 P_SND_RK receives a Modbus request frame from the user DB and hands it to the CP. The CP does not build the frame; you do. The frame is stored in the source data area starting at DB_NO.DBB_NO, and the user provides only the Modbus PDU payload — slave address is prepended by the CP for RTU transmissions in master mode (verify against the manual revision you use; some versions require the slave address as byte 0 of the source area).
| Function Code | Function Name | User-Provided Data Area (bytes) | Expected LEN (bytes) |
|---|---|---|---|
| 01 | Read Coils | Hi addr, Lo addr, Hi qty, Lo qty | 4 |
| 02 | Read Discrete Inputs | Hi addr, Lo addr, Hi qty, Lo qty | 4 |
| 03 | Read Holding Registers | Hi addr, Lo addr, Hi qty, Lo qty | 4 |
| 04 | Read Input Registers | Hi addr, Lo addr, Hi qty, Lo qty | 4 |
| 05 | Write Single Coil | Hi addr, Lo addr, Hi value, Lo value | 4 |
| 06 | Write Single Register | Hi addr, Lo addr, Hi value, Lo value | 4 |
| 0F (15) | Write Multiple Coils | Hi addr, Lo addr, Hi qty, Lo qty, byte count, N data bytes | 5 + N (N = qty/8 rounded up) |
| 10 (16) | Write Multiple Registers | Hi addr, Lo addr, Hi qty, Lo qty, byte count, 2*N data bytes | 5 + 2*N |
The LEN parameter passed to FB8 must equal the number of user-data bytes listed above for the chosen function code. If LEN is set to a fixed value (a common error: hard-coding LEN := 5 for every function code), the dongle raises 0E44 on the first call that does not match.
6.1 Worked Example — Function Code 03 (Read Holding Registers)
To read registers 40001..40002 (qty = 2) from slave 1:
// DB100 — Send buffer (instance of FB8 source area)
DB100.DBB0 := B#16#00; // Hi address of 40001 = 0
DB100.DBB1 := B#16#00; // Lo address of 40001 = 0
DB100.DBB2 := B#16#00; // Hi quantity = 0
DB100.DBB3 := B#16#02; // Lo quantity = 2
// FB8 call
CALL FB8, DB108 (
REQ := M127.0,
R := FALSE,
LADDR := 256, // Logical base address of CP 341
DB_NO := 100, // Source data block
DBB_NO := 0, // Start byte in source DB
LEN := 4, // 4 bytes of user PDU (NOT 6 — slave addr excluded)
R_TYP := 'W', // Wait for response
TVAL := T#2S, // Response timeout
DONE := M150.0,
ERROR := M150.1,
STATUS := MW152
);
If the CP dongle revision expects the slave address as the first source byte, prepend a fifth byte and set LEN := 5. Always cross-check the example Modma project shipped with STEP 7 — its working LEN values are the canonical reference.
6.2 Worked Example — Function Code 16 (Write Multiple Registers)
To write registers 40010..40012 (qty = 3) on slave 1 with values 0x1122, 0x3344, 0x5566:
DB100.DBB0 := B#16#00; // Hi start address = 0
DB100.DBB1 := B#16#09; // Lo start address = 9 (0-based: register 40010)
DB100.DBB2 := B#16#00; // Hi quantity
DB100.DBB3 := B#16#03; // Lo quantity = 3
DB100.DBB4 := B#16#06; // Byte count = 6 (2 bytes * 3 registers)
DB100.DBB5 := B#16#11; // Reg 1 Hi
DB100.DBB6 := B#16#22; // Reg 1 Lo
DB100.DBB7 := B#16#33; // Reg 2 Hi
DB100.DBB8 := B#16#44; // Reg 2 Lo
DB100.DBB9 := B#16#55; // Reg 3 Hi
DB100.DBB10 := B#16#66; // Reg 3 Lo
CALL FB8, DB108 (
REQ := M127.0,
LADDR := 256,
DB_NO := 100,
DBB_NO := 0,
LEN := 11, // 5 header + 6 data
R_TYP := 'W',
TVAL := T#2S,
DONE := M150.0,
ERROR := M150.1,
STATUS := MW152
);
The most common 0E44 trigger on FC16 is LEN := 4 (the value used for FC03/06 read/write single) reused without recomputation for a write-multiple job.
7. Source DB Layout and the LEN ↔ DB_NO Coupling
The CP 341 Modbus master reads LEN bytes from DB_NO starting at byte DBB_NO. Three error classes arise from mis-sizing this region:
- LEN too small — the CP reads a truncated PDU, finds the implied amount of bits inconsistent, raises 0E44.
- LEN too large — the CP reads past the end of the DB, raises 0E45/0E46.
- LEN field left at default — STEP 7 default for FB8 LEN is 0; a 0-length request is always rejected.
Always declare the source DB with at least DBB_NO + LEN bytes initialized to known values. Use ARRAY[0..63] OF BYTE as a safe container and fill bytes explicitly before each REQ pulse.
8. Dongle, Driver, and CP Firmware
The CP 341 does not contain Modbus RTU master firmware in its base EPROM. The Modbus master functionality is delivered as:
- A physical dongle (EEPROM key) inserted in the CP 341 sub-D shell. Without it, the CP boots but rejects every Modbus request. SF will be on red if the dongle is detected but empty; SF stays off if the dongle is absent and the protocol is not selected, but the request still fails with 0E1E.
- A loadable driver ("Modbus Protocol RTU Format, S7 is Master") downloaded to the CP from STEP 7. The driver version must match the dongle and the CP hardware revision. The current driver at time of writing supports CP 341-1CH02 (6ES7341-1CH02-0AE0) and CP 341-1BH02 (RS232 variant).
Verify both are present and matched by opening SIMATIC Manager → Options → Set PG/PC Interface → CP341 (PROFIBUS) and using the CP Parameter Assignment tool to read the active protocol. If the tool shows "No protocol loaded", the driver download did not complete — repeat after a full power cycle.
9. RS485 Cabling and Termination
Once the parameter fault is resolved and TXD begins to pulse, RS485 physical-layer faults become the next likely failure source. Apply the following to a 2-wire RS485 bus:
| CP 341 pin (sub-D, female) | Signal | RS485 bus |
|---|---|---|
| 3 | T/R+ (transmit/receive +) | Wire A (Data+) |
| 8 | T/R− (transmit/receive −) | Wire B (Data−) |
| 5 | Ground / reference | Shield drain, bonded at CP end only for short runs |
| 2 / 7 | +5 V / +24 V (terminator supply) | For active fail-safe bias networks only |
- Use twisted-pair cable with characteristic impedance near 120 Ω (e.g., Belden 3106A).
- Install 120 Ω termination resistors at both ends of the bus segment, between A and B only. Remove terminations on stub devices.
- Maximum stub length: 0.3 m at 19.2 kbps, shorter at higher baud rates. For 115.2 kbps keep stubs below 0.1 m.
- For long cables or noisy environments, add a 680 Ω pull-up to +5 V on A and a 680 Ω pull-down to ground on B at the master end (fail-safe bias).
10. Step-by-Step Resolution
- Power down the S7-300 station. Open the CP 341 sub-D shell and confirm the Modbus master dongle is inserted.
- Power up. Observe SF — must be OFF. If SF is ON, re-download the Modbus master driver to the CP and repeat.
- Open the Modma example project in STEP 7. Compile the entire S7 program (CPU 315-2DP, FB7, FB8, instance DBs, OB1, OB100).
- Download hardware configuration (HW Config) including the CP 341 with the Modbus master protocol slot configured (baud rate, parity, character frame, response timeout).
- Download the S7 program. Go online. Force a cold restart (OB100 → FB100 INIT_DONE pattern runs, FB7/FB8 instance DBs are re-initialized).
- Open the FB8 instance DB (e.g., DB108) in online view. Confirm
DB_NO,DBB_NO,LEN,LADDR,TVALare populated correctly for the chosen function code. - Open the source DB (e.g., DB100) in online view. Pre-fill the PDU bytes for function code 03, slave 1, reading register 0, quantity 1:
00 00 00 01. SetLEN := 4. - Set
M127.0(=REQ) TRUE for one scan. Observe FB8 outputs:DONEshould pulse,ERRORstays FALSE,STATUS= 0000h on success. - Check the CP 341 front panel: TXD should pulse, then RXD should pulse on the slave's reply. If TXD still does not pulse, the LEN is still wrong — return to step 7.
- If TXD pulses and the slave does not respond, verify slave address, parity, and termination per Section 9.
11. Verification Procedure
After the link is operational, validate sustained operation:
- In OB1, watch
FB8.DONErising-edge — this indicates a successful send.FB7.NDRrising-edge indicates a successful receive. Both must toggle at the configured poll rate. - In PLC → CP 341 Diagnostics → Statistics, confirm the Frames sent counter is incrementing at the expected rate, Frame errors received is zero, and CRC errors is zero.
- For a 16-bit register read (FC03), inspect the receive buffer DB (assigned to
FB7byDB_NO/DBB_NO): slave address byte, function code echo, byte count, and the requested register data must be present and consistent with the slave's response. - Force a deliberate slave-side fault (e.g., request a non-existent register). FB8
ERRORshould rise, andSTATUSshould report the appropriate exception code per Modbus spec (e.g., 0x02 for "Illegal Data Address"). - Power-cycle the CPU and confirm the link comes back up without manual intervention — the OB100 initialization must hand a valid parameter set to the CP on every restart.
12. CP 341 Diagnostic Event Reference (CP 341 manual, Chapter 7)
| Event ID (hex) | Description | Remedy |
|---|---|---|
| 0E1E | Protocol not loaded / wrong protocol slot | Reload Modbus master driver in HW Config |
| 0E1F | Dongle missing or mismatched | Insert correct dongle (6ES7870-1AA01-0YA0) |
| 0E40–0E46 | Modbus PDU parameter errors (see Section 4 table) | Correct LEN, DB_NO, DBB_NO, or function code |
| 1E0DH | Request canceled due to complete restart, restart, or reset | Re-issue REQ after OB100 completes |
| 0E22 | Response timeout (TVAL exceeded) | Increase TVAL; check slave address and bus health |
| 0E0A | CRC error on received frame | Check baud rate, parity, cable length, termination |
Source: CP 341 manual, Appendix A — Diagnostic Events.
13. Modbus Function Code Quick Reference
| Code | Function | Request Payload (user DB) | LEN (bytes) | Typical Use |
|---|---|---|---|---|
| 01 | Read Coils | Start addr (2 B) + Qty (2 B) | 4 | Digital outputs from slave |
| 02 | Read Discrete Inputs | Start addr (2 B) + Qty (2 B) | 4 | Digital inputs from slave |
| 03 | Read Holding Registers | Start addr (2 B) + Qty (2 B) | 4 | 16-bit configuration / measurement read |
| 04 | Read Input Registers | Start addr (2 B) + Qty (2 B) | 4 | 16-bit process input from slave |
| 05 | Write Single Coil | Coil addr (2 B) + Value (2 B) | 4 | Digital command to slave |
| 06 | Write Single Register | Reg addr (2 B) + Value (2 B) | 4 | Single parameter set |
| 0F | Write Multiple Coils | Addr (2 B) + Qty (2 B) + Byte count (1 B) + N bytes | 5 + N | Batch digital command |
| 10 | Write Multiple Registers | Addr (2 B) + Qty (2 B) + Byte count (1 B) + 2N bytes | 5 + 2N | Batch parameter set |
14. Alternate Controllers and Migration Notes
For new installations on S7-1200 or S7-1500, the CP 341 is no longer used; instead:
-
S7-1200: Use the CM 1241 (RS232 or RS485) communication module with the MODBUS_PNP_MASTER instruction from the S7-1200 library. LEN semantics are replaced by direct input parameters
DATA_ADDR,DATA_LEN, andDATA_PTR. - S7-1500: Use PtP communication modules (CM PtP) with the MODBUS_PNP_MASTER instruction from the S7-1500 library.
- S7-300 with ET 200S / PTP: The Modbus/PN gateway or a CP 341-1CH02-0AE0 remains the standard hardware path. The driver and FB interface described in this article apply unchanged.
What does Siemens CP 341 event 0E44 mean?
Event 0E44 from the CP 341 Modbus master dongle indicates that the user-supplied "Amount of bits" (derived from the LEN parameter passed to FB8 P_SND_RK) is outside the legal range of 1-2040, or is inconsistent with the chosen Modbus function code. The CP rejects the request before driving the bus, which is why TXD never pulses and the error counter increments on the same scan that REQ rises.
Why does the TXD LED stay off on the CP 341 even though the SF LED is off?
The CP 341 performs a parameter validation pass on the FB8 request before granting bus access. If LEN, DB_NO, DBB_NO, or the function code are invalid, the dongle firmware raises a 0E4x event and never transitions the transmitter. A dark TXD LED combined with a non-zero FB8 STATUS is a parameter fault, not a physical-layer fault — verify the FB8 call before checking cables.
What is the correct LEN value for FB8 P_SND_RK for a Modbus function code 03 read?
For function code 03 (Read Holding Registers), the user-data area contains start address (2 bytes, hi+lo) and quantity (2 bytes, hi+lo), so LEN = 4. For function code 16 (Write Multiple Registers) writing N registers, LEN = 5 + 2N (header of 5 bytes plus 2 bytes per register). The Modbus slave address is prepended by the CP in master mode and is not included in LEN for current driver revisions — verify against the Modma example project shipped with your STEP 7 version.
Do I need the physical Modbus dongle on the CP 341?
Yes. The Modbus RTU master functionality is enabled by a hardware dongle (Siemens order number 6ES7870-1AA01-0YA0) that plugs into the sub-D backshell of the CP 341. Without the dongle, the CP will not load the Modbus master driver, the SF LED may indicate a configuration error, and FB8 requests will be rejected. The dongle is matched to the CP hardware revision — the 1CH02-0AE0 requires the -0AA01 revision dongle.
How do I check which Modbus function code and LEN my FB8 is sending?
Open the FB8 instance DB (e.g., DB108) in online view in STEP 7. Confirm DB_NO, DBB_NO, and LEN against the function-code table in Chapter 6.1 of the Modbus master manual. Then open the source data DB (e.g., DB100) in online view and verify that the bytes starting at DBB_NO match the expected PDU layout for the selected function code. If LEN does not match the function code's expected data length, the CP raises 0E44 and the bus is not driven.