Problem Overview
A Siemens CP 341-1CH01-0AE0 configured as a Modbus RTU master is communicating physically with a PC-based Modbus simulator acting as a slave over an RS-485 link, but every read request returns the CP 341 status code 0E62H. The CP 341 LEDs TxD and RxD blink continuously, the simulator reports incoming requests, and the RS indicator on the slave window flashes on every transaction. The hardware and link layer are therefore alive, but the application layer is failing.
The relevant field configuration is:
- Module: 6ES7 341-1CH01-0AE0 (CP 341 RS-485 half-duplex)
- Driver: Loadable Modbus Master RTU parameter set
- Baud: 19 200 bit/s
- Frame: 8 data bits, 1 stop bit, no parity (8N1)
- Slave address: 1
- Function code: 03 (Read Holding Registers)
- Data start address: 520
- Register count: 4
- Converter: RS-485 ↔ RS-232 at the PC COM1
The send-done bit of the master block never sets, and the ERROR bit latches the value 0E62H. According to the CP 341 Modbus Master manual, this status is the wrapper around Modbus exception code 02 (Illegal Data Address) returned by the slave.
Decoding 0E62H
The CP 341 Modbus master block (typically FB 8 P_SND_RK from the SIMATIC Modbus Master library) packages the slave's exception response into a 16-bit status word. The low byte reflects the Modbus protocol layer; the high byte reflects the Modbus exception code returned by the slave.
| CP 341 Status | Modbus Exception | Meaning |
|---|---|---|
| 0E60H | — | Generic slave error / timeout on receive |
| 0E61H | 01 | Illegal Function Code (slave does not support FC) |
| 0E62H | 02 | Illegal Data Address |
| 0E63H | 03 | Illegal Data Value (out of range) |
| 0E64H | 04 | Slave Device Failure |
| 0E65H | 05 / 06 | Acknowledge / Slave Device Busy |
| 0E66H | 08 / 0A | Memory Parity / Gateway Path Unavailable |
| 0E67H | 0B | Gateway Target No Response |
Reference: Siemens documentation of the Modbus master error codes is also published for the SIMATIC AX (S7-1500) Modbus-RTU blocks at Error codes of the ModbusMaster - SIMATIC AX. The exception-classification convention is the same.
Modbus Holding-Register Addressing Rules
The most common source of 0E62H is the legacy Modicon addressing convention embedded in modern Modbus tools. Holding registers are referenced as 4xxxx, where the offset is 1-based:
Modicon register 4xxxx = xxxx − 40001 = zero-based address
The master block on the CP 341 always works in zero-based register addressing. A request with start address 520, quantity 4 therefore maps to:
- Modicon 40521 through 40524
- Zero-based holding registers 520 through 523
- PDU start address byte = high byte 0x02, low byte 0x08 (decimal 520)
If the PC-based simulator is configured for Modicon (4xxxx) view, the user must declare that registers 40521..40524 exist; otherwise the simulator responds with exception 02. Conversely, if the simulator is purely zero-based, the user must declare registers 520..523. Either way, the slave simulator must have the address range pre-allocated in its data table before it will answer.
Diagnostic Workflow
Use the following sequence to isolate the failure layer before touching application code:
- Confirm the green status LED on the CP 341 shows RUN with no SF/BAF fault.
- Open the Modbus driver's online diagnostics in STEP 7 → CP 341 → Diagnostics; verify the driver's protocol state is Operating.
- Capture a frame on the RS-485 bus with a serial analyser (or use the simulator's frame window) to confirm the request on the wire is exactly
01 03 0208 0004 xx xx(no extra bytes, correct CRC). - Capture the slave's reply. The reply must be either a normal PDU or an exception PDU beginning with
01 83 02 xx xx(function-code high bit set, exception code 02, exception CRC). - If the reply is an exception PDU, the link is fine and the problem is data-model. If no reply is captured, the link is broken and no amount of addressing change will help.
Loopback Test with Function Code 08
Before changing any data address, run the Modbus diagnostic loopback (function code 08, sub-function 0000). This is the canonical "is the wire alive?" test and does not touch the slave's data table at all.
Send the following request from the master:
| Field | Hex | Meaning |
|---|---|---|
| Slave address | 01H | Target slave 1 |
| Function code | 08H | Diagnostics |
| Sub-function high | 00H | Return Query Data |
| Sub-function low | 00H | — |
| Test value high | A5H | Echo data |
| Test value low | C3H | Echo data |
| CRC low | — | Auto-calculated |
| CRC high | — | Auto-calculated |
A healthy slave will echo 01 08 00 00 A5 C3 <CRC> unchanged. The CP 341 status will be 0000H on success. If FC08 fails, the problem is in the physical layer, the RS-485/RS-232 converter, or the simulator's port settings — not the data model. Reference: this loopback is the same procedure recommended in the CP 341 Modbus master manual and matches the diagnostic pattern documented in the AutomationDirect Modbus error code reference.
Step-by-Step Resolution
- Verify serial parameters match on both ends. Open the simulator's COM port setup and confirm 19 200 / 8N1 / no flow control. RS-485 is half-duplex — disable hardware handshaking entirely on the COM port.
-
Run the FC08 loopback test. If the loopback fails, fix the wiring, the converter (A/B polarity, ground), and the COM port first. Do not proceed until FC08 returns
0000H. - Open the simulator's holding-register table. Most PC simulators (e.g. Modbus Poll, Modbus Slave by WinTech, CAS Modbus Scanner) keep a separate Map or Setup dialog where the user must pre-allocate the 4xxxx range they want to expose. Add registers 40521..40524 (or 0..523 in zero-based view) and assign them test values.
- Send a one-register read from the CP 341 at address 0, quantity 1. If this returns 0E62H, the simulator's holding-register area is still empty — go back to step 3.
- Once address 0 returns OK, sweep upward. Request address 520, quantity 1 (not 4). If that fails but address 519 succeeds, the simulator's table ends just before 520 — extend the table by at least 5 registers.
- Restore the original request (address 520, quantity 4) and confirm the send-done bit sets with no error.
-
Force values in the simulator at the target addresses and verify them via Monitor/Modify on the CP 341 input area (DB or PIW, depending on the FB's
DATA_PTRconfiguration).
CP 341 Hardware and Driver Reference
The CP 341 family has three electrically distinct variants sharing the same Modbus loadable driver:
| Order Number | Physical Layer | Typical Use |
|---|---|---|
| 6ES7 341-1AH02-0AE0 | RS-232C (V.24) | Point-to-point to a single slave |
| 6ES7 341-1BH02-0AE0 | 20 mA TTY (current loop) | Legacy instrumentation |
| 6ES7 341-1CH02-0AE0 | RS-485 (half-duplex, 2-wire) | Multi-drop bus — the variant in this fault |
The Modbus master driver is loaded into the CP 341 from the PtP Param tool in STEP 7 / SIMATIC Manager, and the FB instance is created in the user program. The relevant FBs from the SIMATIC Modbus master library are:
-
FB 8 P_SND_RK— sends a Modbus request and waits for the reply -
FB 7 P_RCV_RK— receives an unsolicited Modbus request (slave mode) -
FB 9 P_PRT_RK— port-control / reset
The status output of P_SND_RK (typically STATUS / ERROR / STATUS word on the instance DB) carries the codes in the table above. Treat the high byte as the Modbus exception class and the low byte as the protocol-layer detail.
RS-485 Topology and Termination
RS-485 is differential and half-duplex. Termination and bias matter even on a bench test:
- Install a 120 Ω termination resistor at each end of the bus, between A and B. On a master–slave bench with only two nodes, terminate at both ends.
- Add fail-safe biasing (typically 680 Ω pull-up to +5 V on B and 680 Ω pull-down to GND on A) if the simulator's transceiver does not include it. Some RS-485/RS-232 converters (e.g. cheap USB dongles) omit the bias and the bus floats when idle, producing intermittent framing errors.
- Tie the signal-ground reference between the CP 341's terminal block and the converter's ground. RS-485 tolerates ground potential differences up to ±7 V common-mode; beyond that, frames corrupt silently.
- Keep the cable under 1 200 m at 19 200 bit/s. For bench work, a shielded twisted pair under 5 m is fine.
Related Modbus Exception Codes
The complete Modbus exception set, identical across the CP 341, the SIMATIC AX Modbus master (Siemens reference), the Eaton easyE4 Modbus TCP client (Eaton reference), and the C-more / CLICK Modbus master (AutomationDirect reference) is:
| Code | Name | Action |
|---|---|---|
| 01 | Illegal Function | Slave does not support FC. Verify FC in slave's manual. |
| 02 | Illegal Data Address | Address out of slave's data table. Extend slave map or fix offset. |
| 03 | Illegal Data Value | Value field contains out-of-range data (FC05/06/15/16). |
| 04 | Slave Device Failure | Slave internal error; check slave diagnostics. |
| 05 | Acknowledge | Long operation in progress; poll again. |
| 06 | Slave Device Busy | Retry after the indicated delay. |
| 08 | Memory Parity Error | Slave detected memory parity error. |
| 0A | Gateway Path Unavailable | Gateway misconfigured. |
| 0B | Gateway Target No Response | Downstream device offline. |
Verification Checklist
After the fix, confirm the following on every power-up:
- CP 341 SF LED is off; TxD and RxD flicker on every transaction.
- The master block's
DONEoutput pulses high for one cycle on every successful read. - The
ERRORoutput remains low (or pulses only on genuinely failed transactions). - The
STATUSword is0000Hon success. - Forced values in the simulator appear in the configured DB words within one scan of
DONErising. - Cycle time of the master call is at least 50 ms (slave turnaround) plus the link-frame time (8 bytes × 10 bit-time at 19 200 = ~4.2 ms). With quantity 4, plan for ~10 ms per transaction; do not poll faster than 50 ms.
Edge Cases and Field Notes
- Modicon offset confusion on the slave side: Some simulators treat the user's input as zero-based by default. If you ask for "520" in the master and "520" in the simulator, but the simulator's holding-register area is exposed only from 0 to 100, the slave will still respond with exception 02. The fix is on the slave side, not the master side.
- Function code 3 vs function code 4: FC03 reads holding registers; FC04 reads input registers. If the slave has only input registers, FC03 will always return 0E62H. Switch to FC04 if the data is read-only by the slave.
- Quantity limit: Modbus defines a PDU size limit of 253 bytes. For FC03/04 with 2 bytes per register, that is a maximum of 123 registers per request. The CP 341 master block typically limits the quantity to 125 by default; requesting 4 is well within the limit and not the cause here.
- Address-1 confusion in STEP 7: The Modbus master block in STEP 7 expects the address as it appears in the Modbus PDU (zero-based). The PLC programmer is responsible for any +1 conversion. This is the opposite of some SCADA drivers that take a 1-based address. Verify which convention your block uses before assuming an off-by-one.
- Slave ID = 0 (broadcast): On RTU, address 0 is broadcast for write-only operations. A read request with slave ID 0 will return exception 02 on most slaves.
-
Endianness of the response: A successful read will place register 40521 into the first word pointed to by
DATA_PTRand 40522 into the next. If the byte order looks reversed, the issue is not 0E62H but a Big-Endian/Little-Endian swap. The CP 341 default is Big-Endian (Modbus standard); some third-party slaves reverse the bytes.
Comparison: How Other Platforms Report the Same Fault
| Platform | Exception 02 surfaces as | Reference |
|---|---|---|
| Siemens CP 341 / CP 441 | FB 8 status 0E62H
|
SIMATIC AX ModbusMaster codes |
| Siemens SIMATIC AX (S7-1500) | ModbusMaster status byte = 0x02 | SIMATIC AX reference |
| Eaton easyE4 | Modbus TCP client error code referencing exception 02 | easyE4 Modbus error codes |
| AutomationDirect C-more / CLICK | Listed under the Modbus master error-code table | C-more Modbus error codes |
| Generic Modbus master | Reply PDU = <addr> 0x83 0x02 <CRC>
|
Modbus Application Protocol V1.1b3, section 6.13 |
The pattern is uniform across vendors: any master that follows Modicon-style exception framing will surface exception 02 as a data-model fault, not a link fault.
Frequently Asked Questions
What does Siemens CP 341 error 0E62H mean?
0E62H is the CP 341 Modbus master block's status code for Modbus exception 02 — Illegal Data Address. The slave received the request but is refusing to serve the requested address because it does not exist in the slave's data table or is outside its allowed range.
Is 0E62H a wiring or addressing problem?
It is an addressing problem. The TxD and RxD LEDs blinking prove the physical layer is alive and the slave is responding. Inspect the slave's holding-register map and ensure the address range is allocated; the request itself is well-formed.
How do I convert a Modicon 4xxxx register to the CP 341 master address?
Subtract 40001. Modicon 40521 is address 520 in the CP 341 master block (40521 − 40001 = 520). The block is zero-based; the +40001 offset is added back by the slave's PDU encoder, not by the master block.
What is the FC08 loopback test and why use it?
FC08 sub-function 0000 ("Return Query Data") asks the slave to echo a 16-bit test value (typically A5C3H). If the slave returns the same value, the physical layer, baud rate, parity, and slave ID are all proven correct. It is the standard first test before touching the data model and is recommended in the CP 341 Modbus master manual.
Why does my PC simulator return 0E62H even when the address looks correct?
Most PC simulators require the user to explicitly pre-allocate the 4xxxx range in a setup dialog before any read will succeed. The simulator's holding-register area is empty by default, so the first read returns exception 02 regardless of the address. Add the registers to the slave's map, force test values, then re-run the read.
Can I poll faster to clear 0E62H?
No. Polling faster increases bus traffic without changing the slave's data table. Slow the poll to a few hundred milliseconds, fix the slave's data map, and re-test. The CP 341 default turnaround plus the FC08 loopback is the correct way to validate the link before tuning timing.