S7-1200 MB_COMM_LOAD: Configuring Modbus RTU Master Communication

David Krause20 min read
S7-1200SiemensTutorial / How-to
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

S7-1200 MB_COMM_LOAD: Configuring Modbus RTU Master Communication

MB_COMM_LOAD on the SIMATIC S7-1200 configures a CM 1241 or CB 1241 communications module for Modbus RTU master or slave operation. Most first-time integration faults on these blocks are not programming errors; they trace to baud-rate, parity, and slave-address mismatches between the CPU's serial port and the field device. This field-proven reference walks through hardware selection, library version pinning, block parameters, the 40001→MW0 address map, RS-485 wiring, and the corrective steps that resolve the "no signals to/from the device" symptom reported in actual commissioning cases.

Overview

The legacy Modbus RTU master/slave instructions for the S7-1200 are distributed as a TIA Portal global library. The library version is dictated by the CPU firmware:

  • MODBUS_RTU_V2.1 – CPU firmware V2.1 and earlier.
  • MODBUS_RTU_V2.2 – CPU firmware V2.2 through V3.x.
  • MODBUS_RTU_V3.0 – CPU firmware V4.0 and newer (uses optimized blocks).

Mixing library revision with CPU firmware is the single most common root cause of "MB_COMM_LOAD does not work" complaints on legacy S7-1200 projects. If the library is too new for the firmware, MB_COMM_LOAD and MB_MASTER may be hidden, grayed out, or compile-clean but never raise the DONE bit on the first call. If the CPU firmware is older than V2.1, the legacy instructions cannot be used and the application must move to a different platform or upgrade the CPU.

According to the official SIMATIC S7-1200 Programmable Controller System Manual, MB_COMM_LOAD "configures a port for communication using the Modbus RTU protocol" and "must be called once to configure the port for the Modbus RTU protocol. On completion of the configuration, the port can be used by the MB_MASTER and MB_SLAVE instructions." Each call deletes the communications buffer, so it should only fire when parameters change.

Field note: Call MB_COMM_LOAD once, in OB100 (startup) or gated by the first-scan flag in OB1. Calling it every cycle re-initializes the port, drops any in-flight response, and starves MB_MASTER of request bandwidth. The same restriction applies to the S7-1200 System Manual's PtP/MODBUS chapter when commissioning the equivalent blocks.

Prerequisites

  • S7-1200 CPU with firmware ≥ V2.1 for the standard Modbus RTU library, or firmware V4.2+ for the V3 optimized variant.
  • TIA Portal V13 SP1 or newer; legacy instructions remain available back to TIA V11 SP2 + Update 4. TIA V11 (the version that originally shipped with very early S7-1200 work) is no longer recommended for new projects – upgrade before commissioning.
  • One CM 1241 (RS485 or RS232) or CB 1241 RS485 communication module mounted to the left of the CPU. Up to three CM 1241 modules can be plugged on a single S7-1200 CPU.
  • MODBUS_RTU_V2.x or MODBUS_RTU_V3.x library from the TIA Portal Libraries task card (right-side panel under Global Libraries → Modbus RTU).
  • Commissioning tooling: STEP 7 online monitor, a PC-side Modbus scanner (Modbus Poll, Modbus Doctor), or a serial-line analyzer to capture the bytes on the wire.
  • Reading access to the target device's serial-port specification sheet – most "the link is dead" cases come down to the slave side being set at a baud rate the master never matched.

Hardware Options

Modbus RTU on the S7-1200 requires the PtP-capable CM/CB modules. The CPU's PROFINET port does not run Modbus RTU; use MB_CLIENT/MB_SERVER over the PROFINET port for Modbus TCP instead.

Module Order Number Interface Notes
CM 1241 RS485 6ES7241-1CH30-0XB0 RS-485 half-duplex Standard PtP module, supports Modbus RTU master or slave.
CM 1241 RS232 6ES7241-1AH30-0XB0 RS-232 point-to-point Single-slave point-to-point RS-232 networks only.
CB 1241 RS485 6ES7241-1CH31-0XB0 RS-485 board-level Cost-optimized variant; electrically identical to the CM for Modbus purposes.

Maximum CM/CB count per CPU is three. Each module's "Hardware identifier" is what MB_COMM_LOAD sees as the PORT input. The hardware ID is assigned by STEP 7 during device configuration and appears under Properties → Port → System constants; in most projects it falls in the 271–285 range. Always select the port via the instruction editor's PORT drop-down rather than typing the integer.

MB_COMM_LOAD Block Parameters

Drop the block from the MODBUS_RTU library, instance it in a global DB (single instance per port), and assign the following input pins from the project data.

Parameter Type Required Description
REQ BOOL Yes Rising edge triggers port configuration. Drive TRUE once, then low.
PORT UINT Yes Hardware identifier of the CM/CB port from the device configuration.
BAUD UINT Yes Bits per second: 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 76800, 115200. Must match the slave exactly.
PARITY UINT Yes 0 = None, 1 = Odd, 2 = Even. Modbus RTU mandates a parity bit; "None" only works with 8 data bits, 2 stop bits and only if both ends agree.
FLOW_CTRL UINT Yes 0 = No flow control (typical for RS-485), 1 = RTS always on, 2 = RTS switched (recommended for RS-485 with echo suppression or optical converters).
RTS_ON_DLY UINT Yes Delay (ms) between RTS assert and first transmit byte. 0 ms for RS-485, 20–50 ms for slow RS-232 devices.
RTS_OFF_DLY UINT Yes Delay (ms) after the last byte before RTS drops. 0 ms for RS-485.
RESP_TO UINT Yes Slave response timeout in ms. Default 1000 ms; raise to 2000–5000 ms over cellular or radio modems.
MB_DB INSTANCE Yes Instance DB of the MB_MASTER (or MB_SLAVE) block that this port serves.

Output pins: DONE (BOOL), ERROR (BOOL), STATUS (WORD). Press F1 on the block inside TIA Portal to open the inline help, which shows the full STATUS code table per library version.

MB_MASTER Block Parameters

MB_MASTER executes a single Modbus transaction per call when REQ sees a rising edge. Place the block in a cyclic OB and trigger it on a process-driven edge or with a periodic timer.

Parameter Type Description
REQ BOOL Rising edge triggers the configured request. Hold TRUE for one cycle, then drop until the next transaction.
MB_DB INSTANCE Same instance DB passed to MB_COMM_LOAD.
MODE USINT Modbus function-code selector (see table below).
DATA_ADDR UINT Starting Modbus address. With MODE 1/2/3/4: 0–65535. With MODE 0/5: 1–65536 (1-based coil convention).
DATA_LEN UINT Word or coil count. 1–125 for words (function 3/4), 1–2000 for coils (function 1/2/15).
DATA_PTR VARIANT Pointer to an S7 data area. Word access reads or writes a block of words; bit access reads or writes an array of booleans or an integer bitfield.

Output pins: DONE, ERROR, STATUS. The DONE bit goes TRUE for one cycle after a successful transaction; ERROR goes TRUE if the slave returns an exception or the frame is malformed.

Modbus Function-Code Map (MB_MASTER MODE)

MODE Function Modbus Code Access Typical Use
0 Read Coils 0x01 Bit read Discrete outputs from a slave.
1 Read Discrete Inputs 0x02 Bit read Discrete inputs.
2 Read Holding Registers 0x03 Word read Most common – read 4xxxx parameters and setpoints.
3 Read Input Registers 0x04 Word read Process values (3xxxx).
4 Write Single Coil 0x05 Bit write Pulse a slave output.
5 Write Single Register 0x06 Word write Write to a 4xxxx parameter.
6 Write Multiple Coils 0x0F Bit write Write a bit array.
7 Write Multiple Registers 0x10 Word write Tuning a multi-register parameter block.

Modbus RTU Frame Format Reminder

A Modbus RTU frame consists of an idle line (≥ 3.5 character times), 1 byte address, 1 byte function code, N bytes payload, 2 bytes CRC-16 (little-endian), and a second silent interval of ≥ 3.5 character times. At 9600 baud, 3.5 character times is about 3.65 ms; the CM 1241 enforces this through the RESP_TO and the underlying UART FIFO. If a non-Modbus device is attached to the bus, it must respect this interval or it will appear as a corruption source to the CM.

Modbus Address Map to S7 Data

MB_MASTER preserves the legacy MODICON address-map layout. The 65 536 address space is divided into reference types:

Reference Type Modbus Range Mode (Function Codes) S7-200 Memory Address Example
0 — Coil (RW) 00001–09999 / 000001–065536 0x01, 0x05, 0x0F Q0.0–Qx.y / MW:bit 00001 = Q0.0, 00002 = Q0.1, 00010 = Q1.1
1 — Discrete Input 10001–19999 / 100001–165536 0x02 I0.0–Ix.y / MW:bit 10001 = I0.0
2 — Sequencer / S 20001–29999 (legacy) S bit / MW:bit 20001 = first S bit
3 — Input Register 30001–39999 / 300001–365536 0x04 AIW / MW / Input word 30001 = AIW0 (or MW0 if DATA_PTR routes there)
4 — Holding Register 40001–49999 / 400001–465536 0x03, 0x06, 0x10 MW / DBW 40001 = MW0, 40002 = MW1, 40003 = MW2
5 — Latch / L 50001–59999 (legacy) L bit / MW:bit 50001 = first L bit
6 — User Data File / V 60001–69999 (legacy) VW (S7-200 style) 60001 = VW0, 60002 = VW2
7 — File Register / F 70001–79999 (legacy) FW 70001 = FW0

The rule most often surfaced in field cases: address 40001 always maps to the first word of the area selected at the DATA_PTR pin of MB_MASTER. If DATA_PTR = P#MW0, then 40001 → MW0, 40002 → MW1, 40003 → MW2, 40004 → MW3, and so on. This is the cause of the most-common report that "MB_MASTER reads 40001 but MW0 isn't updating". Selecting the wrong reference type in the slave's address map (30001 vs 40001 for the same register) references different data on the slave, even if the byte offsets happen to coincide.

Wiring: RS-485 Bus for Modbus RTU

RS-485 is a 2-wire or 4-wire differential bus. Modbus RTU always uses 2-wire (half-duplex), driving the A+ and B− pair. The PLC is the only master on the segment and each A/D converter, drive, sensor, or I/O block counts as one slave node.

  • Twisted pair, characteristic impedance ≈ 120 Ω, shielded (e.g., Belden 9841 or equivalent).
  • Terminate both ends with 120 Ω between A+ and B−. Never terminate mid-bus.
  • Bias: pull-up / pull-down on A+ / B− on the master or first node if no slave provides bias. The CM 1241 RS485 does not provide bias; the slave must provide it or an external bias must be installed. Bias values typically 560 Ω–680 Ω to 5 V / GND.
  • Shield bonded to earth at one end only (master end preferred).
  • Common-mode reference: connect the cable shield drain or a third conductor (signal ground) to the 0V reference of every node only if the nodes share protective earth; otherwise leave the shield floating at the far end.
  • DB-9 converter: industrial-grade isolated RS-485 to DB-9 (Phoenix Contact SUBCON-PLUS-PROFIB / SUBCON-PLUS-MODBUS, Phoenix PSI-MODEM-RS485, or equivalent). Hobby-grade cables have been the root cause of CRC errors with no diagnostic beyond rising MB_MASTER error counts.
Polarity caution: A+ / B− can be mislabeled on different vendors' equipment. The D+ / D− convention (some adapters label them D+/D−) is also common. Always cross-check A+ of the master against A+ of the slave before powering up.

RS-485 Topology Diagram

A+ (top) / B− (bottom) — 120 Ω twist 120 Ω Term S7-1200 + CM 1241 MB_MASTER Address 1 (config) A/D Converter Slave #1 9600 8-E-1 VFD Slave #2 9600 8-E-1 Term GND

Configuration Procedure

Step 1 — Update TIA Portal and Library

  1. Open the S7-1200 project in TIA Portal.
  2. In Project tree → PLC → Device configuration, confirm the CPU part number and firmware version.
  3. In Options → Global Libraries → Modbus RTU, add the matching MODBUS_RTU revision.
  4. If the version dropdown only shows a single option (V2.1 in older portals), update TIA Portal to V13 SP1+ or apply the latest HSP for full V3.x coverage.

Step 2 — Wire the CM 1241 and Add to Device View

  1. Insert the CM 1241 RS485 (or RS232) module next to the CPU in the hardware catalog and drag it into the device configuration left of the CPU.
  2. Open the port properties and note the "Hardware identifier" (e.g., 271). This is the PORT input for MB_COMM_LOAD.
  3. Set baud rate and parity in the hardware view only as a default; MB_COMM_LOAD overrides these every time it runs.
  4. Download the device configuration and confirm the CM 1241 errors-free in the online diagnostics.

Step 3 — Call MB_COMM_LOAD Once on First Scan

In OB1 (or OB100 for warm restart), insert the following STL/ST-style logic. The instance DB names below are illustrative; substitute project-specific names.


"DB_MODBUS_CFG"(REQ := "FirstScan",
                PORT := 271,            // hardware ID of CM 1241 RS485
                BAUD := 9600,
                PARITY := 2,            // 2 = Even (mandatory for Modbus RTU 8-E-1)
                FLOW_CTRL := 0,         // 0 = No flow control
                RTS_ON_DLY := 0,
                RTS_OFF_DLY := 0,
                RESP_TO := 1000,        // ms
                MB_DB := "iDB_MBMaster",
                DONE => "mbCommLoadDone",
                ERROR => "mbCommLoadErr",
                STATUS => "mbCommLoadStatus");

Acceptable PARITY values for a Modbus RTU link are 1 (odd) or 2 (even). PARITY 0 (None) is permitted only when both ends agree to ignore the parity bit and 2 stop bits are used. Industrial instruments almost universally run 8-E-1.

Step 4 — Drive MB_MASTER in a Cyclic OB


"DB_MBMaster"(REQ := "reqReadHolding",       // rising edge fires one transaction
              MB_DB := "iDB_MBMaster",
              MODE := 2,                      // 2 = Read Holding Registers (0x03)
              DATA_ADDR := 40001,             // first address in the 4xxxx range
              DATA_LEN := 4,                  // read 4 registers: 40001..40004
              DATA_PTR := P#M 100.0 WORD 4,
              DONE => "mbMasterDone",
              ERROR => "mbMasterErr",
              STATUS => "mbMasterStatus");

For a write, change MODE to 5 (single register, 0x06) or 7 (multiple registers, 0x10). Pulse REQ with the DONE bit or a periodic timer (e.g., 250 ms).

Step 5 — Match the Slave's Serial Settings

Use the slave vendor's configuration tool or its keypad to confirm:

  • Slave address (1–247). Default is often 1; some A/D converters ship at 247.
  • Baud rate exactly equal to the PLC side.
  • Parity exactly equal (Even is the most common in instrument networks).
  • Data bits = 8, Stop bits = 1 for "8-E-1" or "8-O-1"; use "8-N-1" only if the slave supports it.
  • Register base offset: many industrial devices quote 4xxxx = "register 1"; if the device documentation says "register 40011", enter DATA_ADDR = 40011. Do not subtract 40001.
Field note: This is the exact root cause that closed an original integration case on record. The technician initially set the A/D converter at 19200 8-N-1 while the CM 1241 was configured as 9600 8-E-1. The CPU transmitted perfectly; the slave's UART discarded every byte. Recommissioning the converter at 9600 8-E-1 completed the link on the next test.

Status Code Reference

Both blocks expose a 16-bit STATUS word. The high byte carries protocol-level events; the low byte carries instruction-level errors. The inline help (F1 on the block in TIA Portal) shows human-readable text for the full WORD.

MB_COMM_LOAD — Common STATUS Codes

STATUS (hex) Meaning Remedy
0x0000 No error.
0x0001 Configuration request in progress. Normal; wait for DONE.
0x0080 MB_COMM_LOAD is busy. Do not call again until DONE.
0x7000 No active job. Normal idle state.
0x7080 / 0x7081 Buffer overrun during receive or transmit. Increase inter-character or response timeout; check cable length.
0x7002 MB_MASTER is active; configuration cannot be applied yet. Wait for current MB_MASTER transaction to complete.
0x07A0 Parameter error in MB_COMM_LOAD inputs. Check BAUD, PARITY, FLOW_CTRL against the table above.
0x07A1 Port is not available (wrong ID, HW missing, wrong firmware). Re-read the hardware ID; verify the CM is present and fault-free.
0x07A2 Port is being configured by another instance. Single instance per port. Remove duplicate MB_COMM_LOAD calls.
0x07AB / 0x07AC Library / firmware mismatch. Switch library to the version matching the CPU firmware.

MB_MASTER — Common STATUS Codes

STATUS (hex) Meaning
0x0000 No error.
0x0001 MB_MASTER busy with previous request.
0x0080 In progress; wait for DONE or ERROR.
0x1001–0x1106 Modbus exception code 01–06 (illegal function, illegal data address, illegal data value, slave device failure, acknowledge, slave device busy).
0x7000 / 0x7001 / 0x7002 Idle / waiting / wait for next call.
0x7080 No response from slave within RESP_TO.
0x8080 / 0x8081 CRC or character-frame error from slave.
0x80E1 / 0x80E2 Wrong number of bytes received / PDU overflow.
0x80D1 DATA_PTR variant invalid (length/offset out of range).

Always pair MB_MASTER's STATUS with a Modbus exception reference. Exception code 0x02 "Illegal Data Address" most often means the requested register is read-only or out of range on the slave.

Troubleshooting Matrix

Symptom Likely Cause Diagnostic Fix
MB_COMM_LOAD: DONE never high Library / firmware mismatch or wrong PORT Match library version to CPU firmware; re-read hardware ID Update library or firmware
MB_MASTER: STATUS 0x7080 (timeout) No bytes on the wire, or wrong slave address Loop-back test on DB-9 cable; oscilloscope tap at A+/B− Verify polarity, termination, baud rate, address
MB_MASTER: STATUS 0x8080 (CRC) Noise, missing termination, bias, wrong parity 120 Ω on both ends; verify bias; look for stray noise spikes Re-terminate, ground shield, swap parity to Even
MB_MASTER: STATUS 0x1001 / 0x1002 (exception 1/2) Slave received the request but refused Check slave vendor docs; try slave configuration tool Adjust DATA_ADDR or unlock register via slave config
MB_MASTER: STATUS 0x80D1 DATA_PTR length mismatched Cross-check DATA_LEN × element size vs. pointer Resize source data block
Values look correct but off by N words DATA_PTR set to wrong offset Trace to the actual word at the target Reset DATA_PTR to P#MW0 or required base
All slaves respond except one Slave address / termination near that node Walk the bus; keep stubs < 1 m Re-terminate, isolate stub length
Random partial responses Buffer overrun or radio / cellular link Check noise on the bus, increase RESP_TO Raise timeout, shorten cable, add bias

Loop-Back Test Procedure

When commissioning fails with 0x7080 or 0x8080, isolate the cable with a loop-back:

  1. Disconnect the A/D converter and place a screw terminal jump across A+ ↔ A+ and B− ↔ B− on the cable at the slave end.
  2. Force MB_MASTER with MODE = 0 (read coils, 0x01), DATA_ADDR = 1, DATA_LEN = 8, DATA_PTR = P#M 200.0 BOOL 8.
  3. Trigger REQ. The CM 1241 should echo back its own transmit frame; without bias, most hardware will flag the slave's apparent silence.
  4. Replace the loop-back with a passive RS-485 echo plug (bridging TX+/TX− together) to drive an artificial response if the cable is otherwise intact.
  5. Reconnect the real slave and run a parity / baud scan with a Modbus scanner.

Performance and Timing

On a CM 1241 RS485, a single Modbus RTU read of 4 holding registers at 9600 baud completes in approximately 25–35 ms (10-byte request + 13-byte response + 4 idle intervals at 3.5 character times each). For higher update rates, raise BAUD to 38 400 (≈ 8 ms per round-trip) or 115 200 (≈ 4 ms). At 115 200 the slave's serial port and the cable length are usually the bottleneck; RESP_TO should be set to 50–100 ms to avoid premature timeouts when the PLC scan time stretches.

Each MB_MASTER transaction occupies the CM port until DONE or ERROR rises. Holding REQ high in the same OB cycle does not queue another transaction; the block simply pulses through. To read multiple slaves in fast rotation, use a state machine in OB1 that toggles REQ per the previous DONE/ERROR edge.

Multi-Master and Multi-Slave Rules

  • Only one master per Modbus RTU segment. Two masters fighting for the bus produce CRC errors and exception 0x06 "Slave Device Busy" on the slave.
  • Up to 32 unit loads per RS-485 segment without repeaters. The CM 1241 is one unit load. Modern drivers exceed 32 nodes, but stay conservative.
  • Master and at least one slave must provide bias. If none does, install a 620 Ω pull-up to +5 V on A+ and 620 Ω pull-down to GND on B− at the master end.
  • Stub length to each slave < 1 m for 1 Mbit/s links; for 9600 baud, stubs can be longer but keep them short anyway to suppress reflections.

Migration Notes: S7-200 / MODBUS_PARA-Variants

Engineers upgrading from S7-200 PPI / Modbus RTU libraries should re-map the data. The S7-200 mapping is byte-arranged differently from the S7-1200: on the S7-200, 40001 = VW0 (a 16-bit word); on the S7-1200 the same DATA_ADDR with DATA_PTR = P#MW0 yields 16-bit word alignment. If the legacy code used bit-level addressing (e.g., 00001 = Q0.0), port the same address to MODE = 0 with a BOOL pointer. Verify each parameter against the slave's manual before re-running in production.

Verification

  1. Go online (TIA Portal → Online → Go online), open the project tree and the program editor.
  2. Force FirstScan = TRUE once by setting the FirstScan tag. MB_COMM_LOAD should pulse DONE TRUE for one cycle and STATUS = 0x0000.
  3. Open the Watch table for the master DB and force DATA_PTR or the holding-register word area to verify the destination.
  4. Force REQ TRUE on MB_MASTER. Observe DONE → TRUE within RESP_TO (default 1 s). Watch STATUS collapse from 0x0001 → 0x0000.
  5. Check the slave's LEDs: most converter modules flash "Rx" while answering and "Tx" when sending; if Tx of the master is on but Rx never lights, the slave sees a corrupt frame.
  6. Run a PC-side Modbus scanner (Modbus Poll, "Modbus Doctor", or the vendor's service tool) on the same RS-485 segment to confirm the slave's view of the bus.
  7. Trace 60 s of MODBUS traffic with a portable analyzer; look for the 3.5-character idle interval and CRC-16, both little-endian.
Safety: A/D converter outputs that drive plant actuators must be software-rate-limited and clamped in the S7-1200 program. A write-only MB_MASTER loop that exits with 0x7080 every cycle will freeze the last good value into the slave; some Modbus devices latch the fault and require a power cycle. Build the application code around DONE/ERROR signals, not around repeat REQ.

TIA Portal Hardware Support Package Reference

If MB_COMM_LOAD or MB_MASTER is not visible in the instruction tree, install the matching HSP for your CPU firmware revision (HSP 0093 for S7-1200 CPUs, HSP 0101 for newer firmware). The HSP unlocks the matching MODBUS_RTU revision and prevents the "library object missing" compile error. Re-check after any TIA Portal upgrade; a fresh service pack can roll library revisions silently.

Frequently Asked Questions

Why does MB_COMM_LOAD not appear in the Instructions list?

The legacy Modbus RTU blocks ship in the "MODBUS (RTU)" global library. If the block does not appear, either the project's TIA Portal version is older than the matching library, or the selected CPU firmware is newer than the library revision and the legacy block was removed. Open Options → Global Libraries and confirm "MODBUS_RTU_V2.1", "MODBUS_RTU_V2.2", or "MODBUS_RTU_V3.0" is added, matching the CPU firmware (V2.1, V2.2–3.x, or V4.0+ respectively) before re-opening the Instructions tree.

How do I translate a vendor's address like "register 40011" to MB_MASTER?

Use DATA_ADDR = 40011, MODE = 2 (0x03 Read Holding Registers), and set DATA_PTR to the destination word area. Do not subtract 1; the address space already covers 40001–49999 with each integer mapping to one Modbus holding register. See the address-map table for the 30001, 40001, and 10001 conventions; if the slave vendor quotes "register 30011", switch MODE to 3 (0x04 Read Input Registers) and use 30001 as the base.

What is the maximum Modbus RTU cable length on the S7-1200 CM 1241?

RS-485 supports up to 1200 m at 9600 baud or less with proper termination, twisted pair, and bias. Above 19 200 baud, reduce to ~600 m for industrial cable. Always start with one 120 Ω termination resistor at each physical end and add bias with 620 Ω pull-ups if the slave is not equipped with one. Stub length should stay under 1 m at high baud rates.

Can MB_COMM_LOAD and MB_SLAVE share the same instance DB?

No. MB_COMM_LOAD's MB_DB pin must be either an MB_MASTER instance DB or an MB_SLAVE instance DB, but only one block may share it on a given port. Decide master vs. slave first, then build the corresponding single instance DB. Two blocks fighting for the same buffer is also reported as STATUS 0x07A2 ("Port is being configured by another instance").

My MB_MASTER DONE bit pulses but the data never changes. Is the block broken?

No — the block read successfully, but the slave returned the same word. Verify that the slave register really does change (write-then-read test using MODE = 5 or 7 first). If the slave is read-only at that register, the data is the live value. If you are writing, MODE must be 4, 5, 6, or 7, and the MB_MASTER REQ must see a fresh edge after the previous DONE rose. STATUS 0x0000 with stable data is normal; STATUS 0x80D1 with a length mismatch is the most common slave-side address error.

Does the S7-1200 CPU PROFINET port run Modbus RTU?

No. Modbus RTU requires an RS-485 or RS-232 PtP-capable CM/CB 1241 module. The PROFINET port runs Modbus TCP via MB_CLIENT and MB_SERVER instead; the JSON/MODBUS instructions are different and use TCON/TSEND/TRECV infrastructure. Choose the MB variant that matches your physical layer — RTU on CM/CB, TCP on the PROFINET port.

Back to blog