IMDHMIControls LibraryShop main store

Troubleshooting

Wiring an S7-200 CPU 226 port to a CP341 for Modbus RTU

Industrial networks Published 9 min read By IMDHMI controls team

Short answer

Wire CP341 pins 4 and 11 to CPU 226 pins 3 and 8, pin 8 to pin 5 for signal ground, shield to the shells, and fit each end's documented termination once — 330 ohm at the CP341 end, 220 ohm at the S7-200 end. Then give the CP341 its loadable Modbus master driver and run the Modbus slave library, MBUS_INIT and MBUS_SLAVE, on the CPU 226 port that carries the cable.

On this page
  1. Map the pins by signal name before you trust the numbers
  2. Terminate once at each end, and know what once includes
  3. What the meter should read with a 220 ohm S7-200 end and a 330 ohm CP341 end
  4. Give each controller its half of the protocol
  5. Read the bus while the CP341 polls
  6. The checks, in order
  7. If the supplier ever approves a redesign
  8. Questions asked

The wiring that makes a CPU 226 port exchange Modbus RTU frames with a CP341 is fixed: CP341 pins 4 and 11 to CPU 226 pins 3 and 8, CP341 pin 8 to CPU 226 pin 5 for signal ground, shield onto the connector shells, and one termination network per end — 330 ohm across the pair as the CP341 documentation gives it, 220 ohm as the S7-200 manual gives its end. Fit that and you have a cable. You do not yet have Modbus RTU: neither controller speaks it natively, so the CP341 must run its loadable Modbus master driver and the CPU 226 must run the Modbus slave library on the port that carries the cable, while the operator panel keeps its own port untouched. The checks below separate the wire's failures from the protocol's.

Map the pins by signal name before you trust the numbers #

The numbers quoted for this link are consistent: the two data conductors leave the CP341 on pins 4 and 11 and arrive at the CPU 226 on pins 3 and 8, and the signal reference leaves the CP341 on pin 8 and lands on CPU 226 pin 5. The numbers alone are not the check. Look at what a printed 8 means on each end: on the CPU 226 it is a data line, on the CP341 it is ground, so number-to-number wiring shorts ground onto a data conductor. Each manual's pin table pairs the pin number with a signal name, and the conductor that leaves the P pin must arrive at the P pin. A polarity swap passes every continuity test and rejects every frame.

Read the signal column of the CP341 manual for the fitted interface module — the pins you are quoting belong to the RS-485 variant, not to the RS-232C or current-loop variants the module family also takes — and land P on P, N on N, ground on ground:

Function CPU 226 port pin CP341 pin The check that matters
Data pair, P and N lines 3 and 8 4 and 11 P-to-P and N-to-N by the signal-name column, never number-to-number
Signal ground 5 8 Continuity between these two pins, and no continuity from ground to either data conductor
Shield Connector shell Connector shell Lands on the shells, controls interference, never carries data

The shield and the signal ground do different jobs: the ground connection keeps the receiver inside its permitted common-mode voltage range, the shield controls electromagnetic interference, and neither substitutes for the other. Pull power and lock out both controllers before you open a connector or clip a meter across the pair — every electrical check below is a dead-circuit check. The S7-200 side of this cable is the port wiring covered in detail in S7-200 Port 0 Modbus RTU wiring: pins 3, 8, termination.

Terminate once at each end, and know what once includes #

Termination is a resistance across the pair that damps reflections at the physical ends of the line; bias is a light network that holds a defined idle state when no station transmits. Connectors for this wiring build both into one housing, which is why a resistance value quoted without its circuit position is half an answer. The Modbus serial line specification, V1.02, requires termination at both physical ends of an RS-485 segment and defines the line as one master serving addressed slaves; the resistance value itself is left to the interface design, and the two ends of this link document different circuits.

At the CP341 end the interface documentation gives 330 ohm across the pair, and the vendor's Modbus RTU application note for S7-300 and ET 200S serial communication processors installs approx. 330 ohm on the receiving side for line lengths above 50 m. At the S7-200 end the manual quotes 220 ohm. Each value belongs to its own complete circuit, so take each end's value from that end's own documentation, and never stack an external resistor on a connector that already terminates — where the CP341 end terminates through a connector with a built-in network, its switch position decides whether it is in circuit. Dissipation is trivial either way: at a 5 V transceiver rail the bias and termination currents waste on the order of a tenth of a watt, which is why a 1/2 W resistor is the rating commonly fitted.

What the meter should read with a 220 ohm S7-200 end and a 330 ohm CP341 end #

The inputs: 220 ohm across the pair at the S7-200 end, the value its manual quotes; 330 ohm at the CP341 end, the value its documentation quotes; both resistors wired across the same two conductors per the table above; both controllers locked out and the cable in place.

The rule, in words: two resistors connected across the same pair present their parallel equivalent to an ohmmeter.

The arithmetic: R = (220 × 330) / (220 + 330) = 72,600 / 550 = 132 ohm.

The result: expect roughly 130 ohm across the data pair, measured from one connector with the other end connected — the documented pair in parallel, nudged by whatever bias networks and transceiver inputs hang on the line, which is why the diagnosis works by ballpark and not by the third digit.

The decision it leads to: near 130 ohm, both documented networks are in circuit and the physical layer is cleared, so any remaining fault lives in the protocol roles. Near 220 ohm, the CP341 end's network is not in circuit. Near 330 ohm, the S7-200 end's is not. An open circuit means neither is fitted or a conductor is broken. A reading below 100 ohm cannot come from these two values in parallel: an external resistor is stacked on a built-in network or two conductors touch, so open the housings and count the networks before you touch software.

Give each controller its half of the protocol #

Modbus RTU is a single-master line: the serial line specification defines one station that initiates every transaction and slaves that only answer requests addressed to them. Two masters on one pair contend and corrupt each other's frames; two slaves produce a bus where every station waits and none speaks. Decide the roles before anything else, because they decide which program you inspect next.

Here the roles are fixed by the supplier's interface definition: the CP341 side initiates, the CPU 226 answers. Neither happens by default. Modbus is not built into the CP341; its master capability is a loadable, licensed driver fitted to the module and parameterized in the S7 program — serial format, slave address and the request list — sourced through the manufacturer's normal distribution channels.

The CPU 226 side needs no extra hardware: the Modbus slave library in the programming software's instruction library provides two calls. Call MBUS_INIT once at startup — the documented pattern runs it from SM0.1, the first-scan bit — and set the port number, baud, parity, slave address and holding-register range for the instance. The port argument must select the port wired to the CP341, port 1 here, because port 0 belongs to the operator panel. Call MBUS_SLAVE every scan on SM0.0, the always-on bit; it services each request as it arrives.

That port argument is where an installation like this usually fails. The supplier reported the port configuration good and correct — and a working operator panel proves only that its own port works. Port ownership is per protocol role: one RS-485 port runs one role at a time, the same reason an S7-200 cannot share one RS-485 port with a PC and Modbus. With no access to that program, put one question to the supplier: does MBUS_INIT initialize the port facing the CP341, with the baud, parity and slave address the master's parameterization expects? Everything else on the CPU 226 can be perfect and the bus stays silent if that call binds the panel port.

Read the bus while the CP341 polls #

With the wiring measured and the roles assigned, a two-channel oscilloscope across the pair, referenced to the signal ground, settles what remains. During polling you should see the CP341's request bursts at the configured character rate and the CPU 226's reply inside the response window the driver parameterizes. Three pictures tell you where the fault sits:

  • Request frames present, no reply: the physical layer works and the master transmits, but the slave never answers. The cause is on the slave side — the library not running, MBUS_INIT bound to the wrong port, or an address, baud or parity that disagrees with the master's.
  • Nothing on the line at all: the CP341 driver is not loaded or not parameterized, or the pair is inverted so the receiver sees both conductors as common. Check the driver's own diagnostics, then re-verify P-to-P and N-to-N at both connectors.
  • Frames that begin cleanly and then collapse or jitter: termination. Re-measure the pair and compare against the worked example above; a healthy parallel reading and clean edges go together.

Requests without replies also end the supplier conversation cleanly: the fix sits inside their program, on the port your cable lands on.

The checks, in order #

  1. Confirm which interface module is fitted on the CP341 and read the pin table for its RS-485 variant; the pins quoted for this link belong to that variant.
  2. Pull power and lock out both controllers, then open both connectors.
  3. Trace each conductor: CP341 pins 4 and 11 to CPU 226 pins 3 and 8, matched P-to-P and N-to-N by signal name; signal ground from CP341 pin 8 to CPU 226 pin 5; shield to the shells only.
  4. Count the termination networks: one per end, each taken from that end's own documentation, with no external resistor where a connector already terminates.
  5. Lock out again and measure resistance across the data pair from one connector; the reading should sit near the parallel value of the two fitted networks, and the thresholds in the worked example name the end that is wrong.
  6. Confirm the CP341 runs its loadable Modbus master driver, parameterized with the serial format and slave address the slave side expects.
  7. Ask the supplier to confirm MBUS_INIT initializes the port facing the CP341 and MBUS_SLAVE runs every scan, with matching address, baud and parity.
  8. Scope the pair during polling: request bursts from the master, replies inside the response window.

If the supplier ever approves a redesign #

Modbus RTU on this link exists because the machine supplier standardized on it and defined the exchange list; keep it while that interface is the agreement. If they ever approve a redesign, both native paths are simpler to live with than two stacked protocol libraries. MPI with S7 basic communication exchanges data between an S7-400 and an S7-200 with no Modbus driver on either side; the mechanism is the one shown in exchanging data between an S7-300 and an S7-200 over MPI. PROFIBUS DP through an EM277 on the S7-200 is cyclic and faster still; its setup is laid out in configuring the S7-200 EM277 as a PROFIBUS DP slave. The EM277 is a DP slave only, so the S7-400 stays the DP master and owns the exchange.

Path What each side needs What changes on site
Modbus RTU via CP341 CP341 master driver; S7-200 slave library on the wired port Nothing; the installed register list stays
MPI, S7 basic communication An agreed data-block exchange between the CPUs The supplier rewrites the exchange definition
PROFIBUS DP via EM277 An EM277 on the S7-200; the S7-400 as DP master A new module and a new DP configuration

Either redesign begins with data ownership and the exchange definition, not with a cable; the cable change is the smallest part of the job.

Questions asked

Why did the cable check out but the bus still stays silent?

A cable only carries frames, it never creates them. The CP341 transmits only when its loadable Modbus master driver is loaded and parameterized, and the CPU 226 answers only when its program runs the Modbus slave library on the port the cable lands on. A scope splits the failure: requests without replies point at the slave side, and nothing on the line at all points at the master side or an inverted pair.

Can the operator panel port also run the Modbus slave library?

No. One RS-485 port on an S7-200 runs one protocol role at a time, and the slave library binds the whole port when MBUS_INIT executes. The operator panel keeps its port, and the slave instance goes on the second port, the one wired to the CP341. Sharing one port between a panel and Modbus produces conflicts, not communication.

We have no access to the S7-200 program. What do we ask the supplier?

Ask three things: which port MBUS_INIT initializes, whether MBUS_SLAVE runs every scan, and which slave address, baud and parity that call sets. A statement that the port configuration is correct usually means the operator panel's port works, and it says nothing about the port facing the CP341. Their answers either clear the slave side or end the search.

Which end must be the Modbus master on this link?

Exactly one. The serial line specification defines RTU as a single-master line: the master initiates every request and the slaves only answer addressed requests. On this link the CP341 side initiates, because the supplier built the exchange list that way, and the CPU 226 answers. Two masters on one pair corrupt each other's transactions, and two slaves leave the bus permanently silent.

Is there a simpler way to link an S7-400 and an S7-200 than Modbus RTU?

Yes, if the machine supplier agrees to a redesign. Neither controller speaks Modbus RTU natively; both sides need libraries, and the CP341 master driver is a licensed loadable extra. The native paths are MPI with S7 basic communication, or PROFIBUS DP through an EM277 on the S7-200, which is also the faster line. Both rewrite the data exchange, so they suit a new agreement rather than a repair of the installed register list.

Keep reading

  • How-to

    Configure Modbus RTU on an S7-400H master over serial CPs

    An S7-400H cannot run Modbus RTU from the CPU, so fit one serial CP in each of the two subsystems, license the Modbus_Red redundant library, and poll the S7-1500's CM PtP as a separate slave link. Keep the existing PUT/GET path for the bulk PLC-to-PLC data and reserve RTU for the registers the client actually requires.

    Industrial networks

  • How-to

    S7-200 Port 0 Modbus RTU wiring: pins 3, 8, termination

    Connect each counter's two-wire RS-485 pair to S7-200 Port 0 DB9 pins 3 and 8. Matching terminal letters is unreliable, so confirm polarity with a poll-and-reverse test. Fit one 120 ohm termination resistor at each of the two physical ends of the trunk and none at intermediate devices.

    Industrial networks

  • Troubleshooting

    Why a CP 341 Modbus master returns status W#16#1E0D

    W#16#1E0D on a CP 341 Modbus master call means the serial transaction did not complete; on a link that once passed commissioning the fault sits on the Siemens side, in the cable path, or at the Schneider partner. Match the port variant from the order number, capture the line while real requests run, then use three laptop tests - passive monitor, slave simulator at the CP, master simulator at the Schneider PLC - to decide which side failed.

    Industrial networks

S7-1500 MQTT TLS error 8089: check CPU clock and certificate trust