Resolving CM 1241 RS422/485 Modbus 16#8281 Negative Acknowledge

David Krause16 min read
S7-1200SiemensTroubleshooting
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

Resolving CM 1241 RS422/485 Modbus 16#8281 Negative Acknowledge Error

The Modbus RTU error code 16#8281 on an S7-1200 station equipped with a CM 1241 RS422/485 (6ES7241-1CH32-0XB0) almost always points to a configuration or wiring defect rather than a slave-side fault. The error word 16#8281 is generated by the MB_MASTER or MB_COMM_LOAD instance when the module cannot successfully complete a transaction and the slave returns a non-acknowledgement response or the master itself times out before any response is received.

This article consolidates the field-proven remediation steps for the most common 16#8281 scenarios: incorrect DB9 pinout, missing or wrong hardware identifier in the MB_COMM_LOAD block, wrong MODE value for half-duplex 2-wire RS485, mismatched data block array length, and the MB_COMM_LOAD placement (OB1 vs. startup OB). Every recommendation is anchored to the official SIMATIC S7-1200 manual collection.

1. Problem Definition: Decoding 16#8281

The Modbus communication blocks in TIA Portal use standardized status words in the DONE, BUSY, and ERROR outputs. The error word 16#8281 maps as follows when read from the STATUS output of MB_MASTER:

STATUS Word Meaning Typical Trigger
16#8281 Negative Acknowledge – slave device did not acknowledge the request or no response was received Wiring polarity reversed, slave address mismatch, missing termination, or hardware identifier not assigned in MB_COMM_LOAD
16#8381 Invalid Modbus response Echo/echo-suppressor issue, line-per polarity incorrect, baud/parity mismatch
16#8182 Slave returns exception code 02 (illegal data address) Address or quantity not supported by the slave
16#8184 Slave returns exception code 04 (slave device failure) Slave internal fault; verify slave diagnostics
16#8000 Watchdog / module timeout Hardware fault or module not initialised

Because 16#8281 can be produced by either a physical layer defect or a project-side configuration error, the troubleshooting procedure starts at the connector and walks up through TIA Portal configuration.

2. Hardware Identification and Module Variants

The module discussed in the source is the CM 1241 RS422/485 with order number 6ES7241-1CH32-0XB0. This is the current production variant (firmware V2.x) supported by TIA Portal V15 and later. The article also covers the older legacy variant 6ES7241-1CH30-0XB0 where relevant. Key parameters from the S7-1200 manual collection:

Parameter Value (6ES7241-1CH32-0XB0)
Order number (MLFB) 6ES7241-1CH32-0XB0
Supported protocols RS232, RS422 (4-wire full duplex), RS485 (2-wire half duplex)
Connector DB9 male, sub-miniature
Baud rate range 300 to 115 200 bit/s
Parity None, Even, Odd, Mark, Space
Max cable length RS485 1 000 m at <= 19 200 bit/s
Terminating resistors on module None integrated – external network required
Galvanic isolation 500 V DC to backplane
Internal 5 V current consumption 220 mA
Number of slaves supported per port 32 (expandable with repeaters)

For the official spec sheet, refer to the CM 1241 RS422/485 specification page in the SIMATIC S7-1200 manual collection.

3. Root Cause Analysis: Six Failure Pathways to 16#8281

Six independent root causes have been documented for the 16#8281 error on a CM 1241 RS422/485 in 2-wire RS485 mode. All six must be ruled out in sequence during commissioning.

  1. Incorrect DB9 wiring polarity – pins 3 and 8 reversed on the master, or A/B labelling mismatch between vendor conventions and Siemens convention.
  2. Missing hardware identifierHW_ID input on MB_COMM_LOAD left at default zero or pointing at the wrong module instance.
  3. Wrong MODE parameter – Mode 0 (full duplex RS422) used when the physical network is 2-wire RS485.
  4. Wrong LINE_PER (line polarity) – must be set to 2 for RS485 2-wire to invert the transmit/receive path on pin 8.
  5. Data block array under-sized – slave quantity exceeds the declared DATA_PTR length on MB_MASTER.
  6. MB_COMM_LOAD execution context – block placed in a startup OB or called cyclically with a clock pulse instead of a single-shot on first scan.

4. CM 1241 DB9 Pinout and 2-Wire RS485 Wiring

The DB9 male connector on the CM 1241 module uses the Siemens-specific pinout shown below. Only two signal pins are required for 2-wire RS485, plus a 5 V reference for the bias network.

Pin Signal (RS485 2-wire) Function
1 Shield Cable shield bond
2 M (0 V reference) Logic ground return
3 T/R+ (D+, Data A on Siemens) Differential positive
4 RT (RTS+) Request-to-send, normally tied to pin 3 in 2-wire mode
5 M5V (0 V of internal 5 V) Bias return
6 P5V (+5 V internal) Bias supply
7 T/R+ (parallel to pin 3 in 2-wire mode) Reserved for RS422 transmit pair
8 T/R- (D-, Data B on Siemens) Differential negative
9 Not connected Reserved
Polarity note: Siemens labels the positive differential line as B (Data+) on pin 3 and the negative differential line as A (Data-) on pin 8. Many third-party slave vendors use the opposite convention. If A-to-A and B-to-B connection yields no response, try A-to-B and B-to-A on the slave side. Documented field experience shows multiple vendors ship slaves marked opposite to the Siemens convention.

The recommended Siemens termination and bias network for the master end of the RS485 bus is illustrated in the official Siemens knowledge article 109736665. Components are wired between the DB9 pins as follows:

Connection Resistor Value Purpose
Pin 3 (D+) to Pin 6 (P5V) 390 Ω Pull-up bias
Pin 3 (D+) to Pin 5 (M5V) 220 Ω Pull-down bias / termination
Pin 8 (D-) to Pin 5 (M5V) 390 Ω Pull-down bias
Pin 8 (D-) to Pin 6 (P5V) 220 Ω Pull-up bias / termination

The Thevenin equivalent gives an idle-state bias of approximately 200 mV differential between pins 3 and 8, holding the bus in a stable MARK state and preventing noise-induced false-start bits. A 120 Ω termination resistor across pins 3 and 8 should be installed only at the two physical ends of the trunk – never on stub drops. If the CM 1241 is the only device or the master is the bus end, install the full Siemens network at the DB9. If the master is in the middle of the trunk, omit the 120 Ω termination and keep only the bias network, or omit the bias as well and let the bus ends terminate.

5. TIA Portal Device Configuration

Before any Modbus block can communicate, the CM 1241 module must be correctly added to the device configuration and its system clock tag must be enabled.

  1. In the project tree, open Devices & Networks and drag the CM 1241 RS422/485 from the catalog onto the S7-1200 rack next to the CPU. Confirm the order number matches the installed module: 6ES7241-1CH32-0XB0.
  2. Right-click the module, open Properties > System and clock memory. Tick Enable the use of system clock memory byte and set the system memory byte (default byte 1000) and clock memory byte (default byte 1001). This exposes the FirstScan edge bit required to call MB_COMM_LOAD exactly once.
  3. Open Properties > Port configuration and select RS485 (2-wire). Half-duplex is implicit. Note the Hardware identifier shown in the properties – this is the value that must be entered in MB_COMM_LOAD.HW_ID. By convention the first CM 1241 receives HW identifier 271 (decimal), the second 272, and so on. The exact value can also be read from the system constants (PLC tags > Show all tags > System constants).
  4. Note that the port parameters (baud rate, parity, stop bits) are not set here for Modbus RTU – they are set at runtime by the MB_COMM_LOAD block. The hardware port only needs the electrical mode set correctly (RS485, not RS232).
Firmware note: Modules ordered as 6ES7241-1CH32-0XB0 ship with firmware V2.x. Older firmware V1.x modules (legacy variant) require TIA Portal V13 SP1 or earlier. If TIA Portal V15 reports a configuration mismatch, verify the firmware version in Online & Diagnostics > Module Information.

6. MB_COMM_LOAD Block Configuration

The MB_COMM_LOAD instruction (FB 1080 in the Modbus_Comm_Load library, supplied with every TIA Portal installation) initialises the port and must execute exactly once after each CPU restart or module re-plug.

Input Pin Parameter Required Value (RS485 2-wire) Notes
REQ Trigger FirstScan system memory bit Do not use a clock pulse. The block must be called once.
PORT HW identifier Decimal value of the CM 1241 system constant (typically 271) If left at 0, STATUS = 16#8181 is reported and 16#8281 follows on every transaction.
BAUD Baud rate 9600 / 19200 / 38400 / 115200 Must match slave setting.
PARITY Parity 0 = None, 1 = Odd, 2 = Even Default 2 (Even) for Modbus RTU 8E1.
FLOW_CTRL Flow control 0 = None RS485 half-duplex does not use RTS handshaking.
RTS_ON_DLY RTS on delay 0 Not used in RS485 mode.
RTS_OFF_DLY RTS off delay 0 Not used in RS485 mode.
RESP_TO Response timeout 1000 ms default Increase to 2000 ms for slow slaves.
MODE Port mode 4 for RS485 2-wire half-duplex Other values: 0 = RS232, 1 = RS422 4-wire, 2 = RS485 4-wire, 3 = reserved, 4 = RS485 2-wire.
LINE_PER Line polarity 2 for non-inverted, 3 for inverted Default 0 is invalid for 2-wire mode.
DONE Status Read-only output TRUE for one cycle on success.
ERROR / STATUS Status Read-only output Non-zero STATUS = port initialisation fault.

Placement of MB_COMM_LOAD: Place the call in OB1 (Main), not in OB100 (Startup). Several field reports of 16#8281 have been traced to MB_COMM_LOAD being placed in a startup OB, where the module is not yet fully initialised by the system. The trigger REQ must be tied to the FirstScan system memory bit (%M1000.0 by default), not to a clock pulse or a button. A clock pulse re-initialises the port every cycle and prevents the first Modbus transaction from ever completing.

7. MB_MASTER Block Configuration

Once MB_COMM_LOAD has been successfully called, the MB_MASTER block (FB 1081) issues each Modbus request. The slave-side MB_SLAVE block (FB 1082) is required only if the S7-1200 is acting as a slave – it is not used in the master scenario described here.

Input Pin Parameter Description
REQ Trigger Rising edge starts one transaction. Use a clock memory bit or a cyclic trigger.
MB_ADDR Slave address 1 to 247. Must match the slave.
MODE Function code 0 = Read Coils (01), 1 = Read Holding Regs (03), 2 = Read Input Regs (04), 3 = Read Input Discrete (02), 4 = Write Single Coil (05), 5 = Write Single Reg (06), 6 = Write Multiple Coils (15), 7 = Write Multiple Regs (16), 8 = Diagnostics (08 sub 00), 9 = Read FIFO (24)
DATA_ADDR Starting address 0-based Modbus address (PLC software subtracts 1 from the protocol address when MODE uses Holding/Input Registers).
DATA_LEN Quantity Number of coils or registers (1 to 125 for registers, 1 to 2000 for coils).
DATA_PTR Data pointer Pointer to a standard-access data block. Must be a WORD array for register functions and a BOOL array for coil functions.
DONE Status TRUE for one cycle on success.
BUSY Status TRUE while a transaction is in progress.
ERROR / STATUS Status Non-zero STATUS = error. 16#8281 = Negative Acknowledge.

The error STATUS 16#8281 from MB_MASTER indicates that the master did not receive an acknowledgement from the slave. The slave either did not decode the request (wiring/baud/address mismatch) or it is wired in a way that suppresses its transmit driver (terminator/bias issue).

8. Data Block Array Sizing Rule

One of the most often missed requirements: the DATA_PTR array must be at least as long as DATA_LEN. If the function code is 16 (write multiple holding registers) and DATA_LEN = 10, the target array must be declared ARRAY[0..9] OF WORD (10 elements). If the array is smaller, the Modbus master will issue the request but the slave firmware may reject the response with a framing error or simply not respond – either of which the master reports as 16#8281.

Rule of thumb:

  • DATA_LEN = number of registers = ARRAY_HIGH - ARRAY_LOW + 1
  • The array may be larger than required, but never smaller.
  • The array must be a standard-access (non-optimised) data block. Optimised data blocks are not supported by the Modbus library.

9. Step-by-Step Commissioning Procedure

  1. Power down the S7-1200 and verify the CM 1241 module is firmly seated on the rack. Record the order number from the module label.
  2. Wire the DB9 connector per Section 4. Use the Siemens 390/220 Ω bias network at the master end. Confirm pin 3 = D+ and pin 8 = D- with a continuity tester.
  3. Connect the slave A-to-A and B-to-B first. If the master returns 16#8281 within 5 seconds, swap A/B at the slave end only and retry.
  4. Add the CM 1241 in TIA Portal device configuration. Verify the hardware identifier under Properties > System constants. Note the decimal value (typically 271).
  5. Enable system clock memory byte in the CPU properties. Record the system memory byte number and bit for FirstScan.
  6. Create a global data block for the Modbus holding register buffer. Declare, for example, mb_data : ARRAY[0..9] OF WORD;. Ensure Optimised block access is unchecked.
  7. Insert MB_COMM_LOAD in OB1. Wire REQ to the FirstScan system memory bit, PORT to the CM 1241 HW identifier, MODE = 4, LINE_PER = 2, BAUD = 9600, PARITY = 2, RESP_TO = 1000.
  8. Insert MB_MASTER in OB1. Wire REQ to a 100 ms clock memory bit, MB_ADDR to the slave address, MODE = 1 (read holding registers), DATA_ADDR = 0, DATA_LEN = 10, DATA_PTR to the global DB array.
  9. Compile and download the project. Switch the CPU to RUN.
  10. Monitor MB_COMM_LOAD.DONE in a watch table. It should pulse TRUE once on the first scan and stay FALSE thereafter. If DONE never goes TRUE or STATUS = 16#8181, the HW identifier is wrong.
  11. Monitor MB_MASTER.STATUS. A value of 0000 while BUSY is FALSE indicates a healthy idle state. A persistent 16#8281 points to wiring or slave address.

10. Verification and Diagnostics

Once communication is established, validate the link with the following checks:

  • Oscilloscope check: Probe between CM 1241 pin 3 and pin 8 with a differential probe. With no traffic you should see a positive bias of approximately 200 mV. During a transaction you should see a clean differential signal of at least ±1.5 V with rise times under 1 µs.
  • Loopback test: Temporarily short pins 3 and 8 to pins 7 and 9 of the same DB9 to create an internal loopback. If MB_MASTER now reports DONE = TRUE and STATUS = 0, the CM 1241 and the TIA Portal configuration are sound; the fault lies in the physical wiring or the slave.
  • Slave echo test: Use a Modbus master tool (such as Modbus Poll or the TIA Portal Modbus RTU library simulator) on a laptop to verify that the slave responds correctly to a known query. This isolates whether the slave itself is functional.
  • Online diagnostics: In TIA Portal, open Online & Diagnostics > Diagnostic buffer on the CPU. Look for module-insert/remove events or communication-error entries that may indicate intermittent contact issues on the CM 1241 backplane connector.

11. Troubleshooting Matrix

Symptom Likely Root Cause Remediation
MB_COMM_LOAD.STATUS = 16#8181 persistently Hardware identifier mismatch or module not initialised Verify PORT input matches CM 1241 system constant; place block in OB1, not OB100
MB_MASTER.STATUS = 16#8281 on every request Polarity reversed or no termination/bias Install Siemens 390/220 Ω network; swap A/B at slave if needed
16#8281 on first request after power-up, then healthy MB_COMM_LOAD clocked or called repeatedly before port ready Use FirstScan on REQ; ensure MB_COMM_LOAD is not in a fast OB
16#8281 intermittent, more frequent at higher baud Cable reflections, missing terminator, long stubs Add 120 Ω termination only at bus ends; check cable length <= 1 000 m at <= 19.2 kbps
16#8182 (illegal data address) Slave address or quantity not supported Cross-check DATA_ADDR and DATA_LEN against slave map
16#8381 (invalid response) Echo from non-disabled line drivers; LINE_PER wrong Set LINE_PER = 2; disable echo on RS485 repeaters
MB_MASTER returns DONE never TRUE, BUSY permanently TRUE Multiple MB_MASTER instances on same port or no slave addressing the request Confirm only one active MB_MASTER per port; verify slave address
Communication works with RS232 but fails with RS422/485 card Mode/port setting or wiring mismatch Set port mode in device config to RS485; check MODE = 4 and LINE_PER = 2
No 16#8281 but data is always zero Slave responds with old data due to write/read index mix-up; or array length wrong Verify array length = DATA_LEN + 1 (0-indexed)

12. Field-Proven Caveats

RS232 fallback path: If the same logic works correctly against an RS232 CM 1241 but not the RS422/485 card, the project-side configuration is almost certainly correct. The fault is at the physical layer – wiring, termination, or pin assignment. Use the oscilloscope check before touching the TIA Portal project.
Optimised data blocks: The Modbus library ships only with support for standard-access DBs. Using an optimised (symbolic-only) data block results in either a compile error or a runtime 16#8281 because the block address is resolved only at runtime and cannot be referenced by the library.
Multiple Modbus masters: A single CM 1241 port supports only one active MB_MASTER at a time. Use a sequencer (for example a state machine in SCL) to dispatch requests when more than one slave register group must be polled. Overlapping REQ triggers lead to 16#8281 on the second request.
Firmware compatibility: TIA Portal V15 Update 2 supports CM 1241 RS422/485 firmware V2.x. If a V1.x module is detected, TIA Portal may offer a configuration downgrade or refuse the download. Verify the firmware level with Online & Diagnostics > Module Information > Firmware and update if necessary using the Siemens automation tool.

13. Frequently Asked Questions

What does Modbus status 16#8281 actually mean on an S7-1200?

The status word 16#8281 indicates a negative acknowledgement: the MB_MASTER issued a valid request but received no usable response from the slave. Typical causes are wiring polarity reversal, missing termination/bias, wrong slave address, baud/parity mismatch, or a hardware identifier mismatch in MB_COMM_LOAD.

Which DB9 pins on the CM 1241 carry the RS485 2-wire signal?

Only pin 3 (T/R+, Siemens data B) and pin 8 (T/R-, Siemens data A) are used for 2-wire RS485. Pins 5 and 6 supply the 5 V reference (M5V and P5V) for the Siemens 390 Ω / 220 Ω bias network. Pin 1 is the shield bond.

What value should MODE and LINE_PER have for 2-wire RS485 Modbus?

Set MODE = 4 (RS485 2-wire half-duplex) and LINE_PER = 2 (non-inverted line polarity). MODE 0 or 1 selects RS232 or RS422 and produces 16#8281 on every transaction because the physical port configuration does not match the requested mode.

Where should MB_COMM_LOAD be placed in the TIA Portal project?

Place MB_COMM_LOAD in OB1 (Main) and tie its REQ input to the FirstScan system memory bit (for example %M1000.0). Do not place it in OB100 (Startup) and do not trigger REQ with a clock pulse. Calling it once on first scan initialises the port and then idles, allowing MB_MASTER to use the port.

Do I need termination resistors on the CM 1241 RS422/485 module?

The CM 1241 has no on-board termination. The master end of an RS485 bus must provide a bias and termination network built from 390 Ω pull-up to P5V on pin 3, 390 Ω pull-down to M5V on pin 8, and 220 Ω resistors for the line-termination function. Place a 120 Ω termination resistor across the differential pair only at the two physical ends of the trunk, never on stubs.

Why does my data block need to be larger than DATA_LEN?

The DATA_PTR on MB_MASTER points to a standard-access WORD array for register functions or BOOL array for coil functions. The array length must be at least DATA_LEN elements (for example 10 elements for DATA_LEN = 10, declared as ARRAY[0..9] OF WORD). A shorter array causes the library to read past the end of the block, leading to corrupted frames reported as 16#8281.

Can I connect the CM 1241 directly to a USB-to-RS485 converter on my laptop?

Yes, but the laptop-side converter must also provide the bias/termination. Disable the laptop-side bias if the master is the bus end with the Siemens network, or disable the Siemens bias and rely on the laptop-side terminator. Verify the A/B convention: many USB converters use B for positive while Siemens uses B for negative.

Back to blog