IMDHMIControls LibraryShop main store

Troubleshooting

Why an S7-1500 Modbus RTU master reports receive error 16#81E2

PLC programming Published 6 min read By IMDHMI controls team

Short answer

On a working S7-1500 Modbus RTU link, Modbus_Master status 16#81E2 points at the receive-side serial configuration. The fix that resolved the real case: change the Modbus_Comm_Load static tag LINE_PRE from 0 to 2, and give the DATA_PTR destination a standard, non-optimized data block when you address it as BlockName.RegisterName.

On this page
  1. What status 16#81E2 tells you
  2. Fixing the error on a 2 m RS485 link to a PC slave simulator
  3. Check the receive configuration before the wiring
  4. Why termination changed nothing
  5. Keep the DATA_PTR destination addressable
  6. When the error returns after the fix
  7. Questions asked

If your S7-1500 Modbus RTU master sends a request the slave answers correctly but Modbus_Master still reports status 16#81E2, the problem is on the receive side of the communication module, not in your slave, your converter or your termination. In the case this article works from, two changes cleared it: the static tag LINE_PRE in the Modbus_Comm_Load instance data was changed from 0 to 2, and the data block referenced by DATA_PTR was set to standard, non-optimized access so the reference BlockName.RegisterName could resolve. Work through the receive checks below in order; the configuration fix is the one that ends the fault.

What status 16#81E2 tells you #

Modbus RTU is a request-response protocol. The master transmits a request, the addressed slave returns a response, and the master validates the incoming characters before it moves register data into the destination block. Status 16#81E2 is a receive error tied to the serial character configuration: baud rate, parity, stop and start bits as the module sees the incoming line. A slave that decodes your request and answers proves the transmit path works; it proves nothing about the receive path. The same link can transmit cleanly and still reject every response.

That asymmetry is the diagnostic shortcut. When both a Modbus slave simulator from Modbustools and WinModbus decode the request and reply, and the PLC still reports 16#81E2 with the destination data block unchanged, three suspects remain: the module's receive configuration, the converter's return-path behavior, and the instruction's access to the destination block. In the resolved case, the first of those was the cause.

The setup, taken from the resolved installation: an S7-1500 with a CM PtP RS422/485 HF module as the Modbus RTU master, a PC running a slave simulator through an ADAM USB-to-RS485 converter, no RS232 stage in between, about 2 m of cable, reading holding register at slave address 1. The simulator decoded every request and replied; Modbus_Master returned 16#81E2 every time and the destination data block stayed empty.

The rule in words: the CM PtP port's receive behavior is set by the Modbus_Comm_Load call, not by the hardware configuration screens, so the fix lives in that call's instance data; and the Modbus instruction can only write register data into a data block that permits direct absolute addressing.

The steps, with the numbers:

  1. Open the instance data block of the active Modbus_Comm_Load call and read the static tag LINE_PRE online. Its initial value in the failing project was 0.
  2. Change LINE_PRE from 0 to 2 and reload the instance data, then re-run the initialization. Communication worked immediately after this change; the documentation's receive framing error 16#81E2 disappeared and the destination block received the register value. Read the parameter definition in the instruction help of your installed project version to confirm what each value selects for your module, because the meaning is installation-specific to the module and interface type in use.
  3. Check the data block referenced by DATA_PTR. Because the reference was written as BlockName.RegisterName, the block needed optimized block access turned off. With optimized access on, the CPU may relocate tags and the absolute reference cannot resolve, which also left the block unchanged.
  4. Re-run the transaction and verify the register value lands in the destination tag.

The decision: if your receive settings, converter and slave all check out and Modbus_Master still reports 16#81E2, change LINE_PRE in the Modbus_Comm_Load instance data from 0 to 2, and switch the DATA_PTR destination block to standard access when you reference it as BlockName.RegisterName. A 120 ohm resistor at the module end was also tried in this case and changed nothing, so do not spend your time there first at 2 m.

Check the receive configuration before the wiring #

Order the diagnosis so you fix configuration before you touch hardware:

  • Compare the serial character settings loaded by Modbus_Comm_Load against the simulator's port settings: baud rate, data bits, parity, stop bits, flow control. The resolved case used no flow control, which is the right choice when nothing drives the handshake lines.
  • Confirm the simulator has opened the USB serial port the converter actually presents, and that the converter runs in RS485 mode toward the CM module.
  • Read the frame-detection settings shown in the module's configuration, such as start-on-any-character with a character delay time of 288 bit-times in the failing project. These govern message boundary detection, not the number of start bits per character; adjusting them is not a way to change the character format.
  • Only then inspect the physical layer, and expect configuration to be the cause on a short bench link.

If Modbus_Comm_Load never completes its setup, the module cannot receive anything; a related page on this site covers why the Done output of Modbus_Comm_Load stays false on an S7-1200 G2, and the same logic of checking the initialization call first applies.

Why termination changed nothing #

Termination limits reflections at the ends of the bus. It does not correct a mismatched serial configuration, a wrong converter mode, or a receive setup the module rejects. At about 2 m with a single slave, reflections are not the mechanism behind a framing error, which is why adding the 120 ohm resistor across the A/B lines at the CM module end produced no change. Trace the A and B conductors against both devices' signal definitions rather than matching labels, because A/B naming differs between vendors, and keep termination on longer production buses. For framing errors, configuration comes first.

Keep the DATA_PTR destination addressable #

The Modbus_Master instruction documents that the data block addressed through DATA_PTR must support direct addressing: it must permit absolute access alongside symbolic access. With optimized block access enabled, the reference BlockName.RegisterName cannot guarantee a fixed location, and the register data has nowhere defined to land, which shows up as a receive that never completes into your application data even after the line works. Clear the optimized access attribute on that data block in its properties, download, and read the value again. If your slave-side mapping is the question instead, a page on why S7-1500 Modbus RTU input registers come from the IW area covers the slave side of register mapping.

When the error returns after the fix #

  • If 16#81E2 reappears after a download or a CPU memory reset, check whether the instance data block re-initialized LINE_PRE to its start value; set the static tag's start value to the working value so a re-initialization cannot revert it.
  • If the destination block still never changes while the status is clean, the line is fixed and the block access is not: clear optimized access as above.
  • If a different, longer bus starts showing the error, treat the physical layer as a suspect again: on long runs, termination and converter direction control matter in a way they do not at 2 m.

One safety note: this fault concerns a communication link only. Do not treat a receive error as a safe state for the process the link serves; the machine's safety functions must not depend on this Modbus exchange.

Questions asked

What does Modbus_Master status 16#81E2 on an S7-1500 actually mean?

It is a receive error: the serial response came back with a character framing or line configuration the communication module did not accept. The master sent a request the slave understood, so the transmit path is fine. Check the receive-side setup first: the Modbus_Comm_Load call, its instance data, and the serial character settings it loads into the CM PtP module.

Do I need terminating resistors to fix error 16#81E2?

In the documented case, no. The link was about 2 m long and adding a 120 ohm resistor across the A/B lines at the CM PtP end changed nothing; the LINE_PRE change did. Termination is still required on long or fast buses per the installation design, but a framing error at short distance is almost always configuration, not the physical layer.

Why does DATA_PTR fail when my data block has optimized access enabled?

The data block addressed through DATA_PTR must support direct absolute addressing. With optimized block access, the CPU may relocate tags, so a reference written as BlockName.RegisterName cannot resolve. Clear the optimized access attribute on that data block, or address the destination through an absolutely addressed area, and the register data will transfer.

Is LINE_PRE 2 correct for every CM PtP Modbus RTU installation?

LINE_PRE selects the receive behavior of the PtP port, and the value that works depends on the module and how the interface is wired. In the real case, the initial value 0 caused the receive error and 2 cleared it on an RS485 link through a USB converter. Set 2 for the same arrangement, and confirm each value's meaning in the instruction help of your installed project version.

Keep reading

  • Troubleshooting

    Why MB_MASTER on an S7-1200 reports Modbus error 16#8188

    Error 16#8188 on an S7-1200 MB_MASTER is an operating-mode fault, not a serial link failure. Set MODE 1, DATA_ADDR 30001, a length of 32 and MB_ADDR 1 to read the slave's D000 through D01F block as input registers 30001 through 30032, and hold EN TRUE through the REQ pulse.

    PLC programming

  • Troubleshooting

    Modbus_Comm_Load on an S7-1500 CM PtP stays idle at 16#7000

    STATUS 16#7000 on Modbus_Comm_Load means the block is idle: it has not processed any request, so DONE and ERROR stay false. Check that the instruction executes on an active path with one fresh REQ edge, that PORT matches the CM PtP RS422/485 HF hardware identifier, and that the Modbus_Master instance DB is linked at MB_DB before polling.

    PLC programming

  • Troubleshooting

    Why MB_MASTER on an S7-1200 returns an error status but no data

    If the slave answers your PC master but MB_MASTER returns an error STATUS with no data, the PLC never handed the port over or mis-sized the buffer. Run MB_COMM_LOAD once on a first-scan edge, wire its instance DB into every MB_MASTER call through MB_DB, tie both EN inputs to the rail, and size DATA_PTR in bytes while DATA_LEN counts registers.

    PLC programming