1. Overview
The Siemens S7-1200 CM 1241 communication module (order number 6ES7241-1CH32-0XB0 for RS-485, 6ES7241-1AH32-0XB0 for RS-232) exposes its serial interface on a female 9-pin Sub-D (DB9) connector. Engineers who are new to Modbus RTU frequently ask whether they may re-use a Siemens Profibus DP connector (for example 6ES7972-0BA12-0XA0 or 6ES7972-0BA42-0XA0) to land the RS-485 cable on the CM1241. The answer is: yes, with caveats. The Profibus connector is electrically compatible with 2-wire RS-485 / Modbus RTU at the signal level, but it brings Profibus-specific mechanical and shielding conventions that the installer must respect, particularly the role of pin 5.
This reference walks through the pinout mapping, the meaning of pin 5 (signal ground versus shield), termination choices, cable selection, and a wiring procedure that has been proven in working Modbus RTU installations on CM1241 modules. Common pitfalls, including common-mode voltage issues and loose shield contact with non-Profibus cable, are documented with practical remedies.
2. CM 1241 RS-485 Port Identification
The CM1241 RS-422/485 module is the variant relevant to Modbus RTU. Its front-panel DB9-S female carries the following pinout as defined in the S7-1200 Programmable Controller System Manual:
| Pin | Signal | Direction | Notes |
|---|---|---|---|
| 1 | — | — | Not connected (reserved) |
| 2 | — | — | Not connected (reserved) |
| 3 | RxD/TxD+ (B) | In/Out | RS-485 line B (inverted) |
| 4 | RTS (TTL) | Out | Direction control for RS-485 transceivers, optional |
| 5 | GND | Reference | Signal/common ground reference |
| 6 | +5 V (≤ 90 mA) | Out | Power for bus terminator on Profibus connector; rarely used in Modbus |
| 7 | — | — | Not connected (reserved) |
| 8 | RxD/TxD- (A) | In/Out | RS-485 line A (non-inverted) |
| 9 | — | — | Not connected (reserved) |
The shell of the DB9 connector is tied to the module's chassis/protective earth through the S7-1200 DIN-rail mounting system. This is a chassis ground, not the signal ground of pin 5. The two are isolated by design so that the EIA-485 driver can ride on its own reference (pin 5) while the cable shield drains high-frequency noise to chassis ground at one or both ends.
3. Standard Profibus DP Connector Pinout
The Siemens Profibus FastConnect connector family (6ES7972-0BA12, 6ES7972-0BA42, 6GK1500-0FC10, and equivalents from third parties such as Phoenix Contact, Harting, and Weidmüller) uses the same DB9 form factor with the conventional Profibus pinout from IEC 61784-1 / IEC 61158-2:
| Pin | Signal | Function |
|---|---|---|
| 1 | — | Shield (chassis bonding clamp, not a pin) |
| 2 | — | Not used |
| 3 | RxD/TxD-P (B) | RS-485 B line |
| 4 | RTS | Request To Send (direction control) |
| 5 | DGND | Data ground (signal reference) |
| 6 | VP | +5 V power supply (≤ 90 mA) for active terminators |
| 7 | +24 V | 24 V power (only on some variants) |
| 8 | RxD/TxD-N (A) | RS-485 A line |
| 9 | — | Not used |
Compare the two tables: pins 3, 5, 6, and 8 are wired identically for both Profibus DP and 2-wire Modbus RTU. Pins 4 (RTS) and 7 (+24 V) have no equivalent in a typical Modbus slave and are left disconnected at the slave end. This is the reason a Profibus connector electrically works as a Modbus RTU termination block on the CM1241.
4. The Pin 5 Question: Signal Ground vs. Shield
The single most common source of confusion is the role of pin 5. In a Profibus connector the pin 5 screw terminal is internally bonded to the cable shield through the metal coupling sleeve of the connector. The Siemens PROFIBUS Network Manual (entry ID 35222591), page 170, treats the contacting of pin 5 with the shield as optional, citing the PROFIBUS Interconnection Technology Guideline V1.4:
"Contacting the shield with pin 5 is not recommended. If shield contact using pin 5 is specified by the manufacturer of your device, follow the steps below..." — PROFIBUS Network Manual, p. 170
The reference goes on to describe a 2.5 cm pigtail of 0.75 mm² stranded wire fitted with a 0.75 mm² wire end ferrule, inserted into the pin 5 terminal of the socket/plug insert, and then trapped in one of four grooves on the insulator body. When the coupling sleeve is screwed down, its internal metal bar presses the pigtail into the cable shield braid, completing the bond. This is the only approved way to short pin 5 to the shield inside a Siemens FastConnect plug.
4.1 Why a multimeter shows no continuity
On a new, un-plugged Profibus connector the metal coupling sleeve that contacts the shield is mechanically separate from the pin 5 screw terminal. There is no soldered or stamped bridge between them. Therefore a continuity test between pin 5 and the connector body (or between pin 5 and the shield bonding ring) will read open-circuit until:
- A cable is inserted and the coupling sleeve is torqued down, OR
- An installer has added an explicit pigtail wire between pin 5 and the shield clamp.
This is not a defect; it is the designed state. The Profibus guideline intentionally separates signal ground (pin 5) and chassis ground (shield) so that single-point or low-impedance chassis bonding can be performed at the cabinet entry, while pin 5 carries only the RS-485 common-mode return.
4.2 EIA/TIA-485 reasoning
EIA-485 specifies a signal ground conductor (pin 5 of the DB9) for exactly this reason. A differential RS-485 receiver measures (V_A - V_B) referenced to the local ground. If only the cable shield (chassis) is bonded, common-mode voltage differences between two slaves sitting on different cabinet grounds can shift the differential pair outside the -7 V to +12 V common-mode range of the transceiver, producing bit errors, intermittent comms, or complete failure. By routing a dedicated signal-ground wire from pin 5 to every node, the receivers share a single reference and reject chassis-induced noise.
5. Termination: 120 Ω and Why Three Resistors
Every RS-485 bus must be terminated at both physical ends with a resistor equal to the characteristic impedance of the cable. For Profibus cable this is 150 Ω, and the Profibus guideline recommends a three-resistor network: 220 Ω from A to +5 V, 220 Ω from B to GND, and 330 Ω between A and B. The DC equivalent is approximately 154 Ω differential with biasing that holds the bus in a defined idle state (A high, B low) when no driver is active.
| Topology | R_A | R_B | R_pull-up (A→5V) | R_pull-down (B→GND) | Notes |
|---|---|---|---|---|---|
| Profibus standard (150 Ω) | 330 Ω | 330 Ω | 390 Ω | 390 Ω | Built into Siemens 6ES7972-0BA12 / 0BA42 with switch ON |
| Generic RS-485 (120 Ω) | 120 Ω | — | — | — | Plain termination, no bias; suitable when the master/slave provides internal fail-safe bias |
| CM1241 + Profibus connector | Use Profibus network's switch | Use Profibus network's switch | Built in | Built in | Set ON only at the two physical end nodes; OFF in the middle |
6. Cable Selection: Profibus vs. Generic STP
Siemens Profibus cable (part numbers 6XV1830-0EH10, 6XV1830-0EN10, 6XV1830-3EH10, 6XV1830-3EN10, 6XV1830-5FH10 violet) is a Type A cable with the following electrical characteristics mandated by IEC 61158-2:
| Parameter | Profibus Type A | Generic Cat 5e/6 STP |
|---|---|---|
| Impedance | 150 Ω ± 10 % at 3-20 MHz | 100 Ω ± 15 % at 1-100 MHz |
| Loop resistance | ≤ 110 Ω/km | ≤ 188 Ω/km (24 AWG) |
| Capacitance | ≤ 30 pF/m (core-to-core) | ≤ 56 pF/m |
| Conductor | 0.64 mm solid (22 AWG), 1-core red + 1-core green | 24 AWG stranded, 4-pair |
| Shield | Aluminium/polyester foil + tinned copper braid, ≥ 80 % coverage | Foil + braid, but optimized for 100 MHz Ethernet, not 1.5-12 MHz Profibus |
| Max segment length (1.5 Mbit/s) | 200 m | Often fails above 50-100 m on Modbus 9.6-115.2 kbit/s |
For Modbus RTU at 9 600 to 115 200 bit/s, the bit period is 8.7 µs to 104 µs. A 100 Ω cable driven by a 150 Ω termination produces a 1.5 standing-wave ratio; ringing and bit-edge jitter are the result. Profibus Type A cable at 150 Ω is the textbook match. Generic shielded twisted pair "works" at low baud rates and short runs, but field experience shows that vibration can loosen the shield bond inside non-Profibus Profibus connectors, causing transient link drops that are very difficult to diagnose.
7. Wiring Procedure (Step-by-Step)
- Power down the S7-1200 and all Modbus slave devices on the segment. Confirm zero voltage on the CM1241 DB9 shell with a multimeter referenced to cabinet earth.
- Strip approximately 50 mm of outer jacket from the Profibus cable at each end. Expose the red and green cores (A and B), the bare shield drain wire (if present), and the foil/braid shield.
- Insert the cable into the Profibus connector body so that the red core aligns with terminal A, the green core with terminal B, and the shield sits in the metal bonding ring. The FastConnect insulation-piercing contacts (on 6ES7972-0BA42 "axial" version) are pre-tensioned; on the 0BA12 "90°" version you strip 9 mm and screw down each core into its terminal block.
- Optionally bond pin 5 to the shield using the procedure from the PROFIBUS Network Manual page 170 (2.5 cm pigtail, 0.75 mm² ferrule, trapped in the insulator groove). For pure Modbus RTU on CM1241, this is generally not recommended; instead, run a dedicated signal-ground wire from the CM1241 pin 5 to each slave's pin 5.
- Set the termination switch on the Profibus connector to ON at the two physical end nodes (CM1241 end and the most distant slave end), and OFF on every node in between. For a 3-node segment the two end devices terminate; the middle node does not.
- Connect pin 5 from the CM1241 DB9 to a dedicated signal-ground wire that is daisy-chained to pin 5 of every slave's DB9. This wire is separate from the cable shield and separate from cabinet PE. Do not bond both ends of the shield to PE at every node; use the cabinet PE bar for shield termination at one end only (typically the cabinet entry point), with the other end of the shield isolated or bonded through a 1 MΩ / 4.7 nF parallel RC network to PE.
- Tighten the DB9 jack screws to 0.4 N·m (3.5 in-lb) to ensure the connector body seats against the panel cut-out and makes a 360° shield bond.
- Power up the S7-1200, configure the CM1241 in TIA Portal under Device Configuration → Properties → RS-485 interface: protocol = Modbus Master or Modbus Slave, baud = 9 600 / 19 200 / 38 400 / 115 200, parity = Even, data bits = 8, stop bits = 1. Enable "Line termination" only if a termination network is not provided by a Profibus connector at that node.
- Configure the MB_MASTER / MB_SLAVE blocks in the user program. Verify that MODE = 0 (full-duplex, N/A) is not used; for 2-wire RS-485 use MODE = 4 (half-duplex) on the CM1241 RS-485 variant. The MB_MASTER block from the Siemens Modbus library handles RTS direction control automatically on pin 4.
8. Common-Mode Voltage Pitfalls
Symptoms of a missing or broken pin 5 connection include:
- Modbus communication works on the bench (short cable, single cabinet) but fails in the field with long cable runs and multiple cabinets.
- CRC error count climbs linearly with cable length above ~30 m.
- Communications fail only when a particular VFD or motor contactor energizes, then recover when it is de-energized.
- Measuring pin 5 on the slave DB9 with respect to cabinet PE shows 2-7 V AC at 50/60 Hz (capacitively coupled from parallel power conductors).
Remedies, in order of preference:
- Run a dedicated 22 AWG (0.32 mm²) signal-ground wire from CM1241 pin 5 to every slave pin 5, daisy-chained, inside the same cable tray or conduit as the A/B pair. This equalizes the common-mode potential at every node.
- If pulling a third conductor is impossible, add a 100 Ω 1 W resistor between pin 5 and pin 6 (+5 V) on the CM1241 side only, to provide a weak bias. This is a field workaround, not a recommended practice.
- Install an RS-485 isolator (Phoenix Contact MINI-MCR-RS-485-IS, Weidmüller ACT20M, or Murr Elektronik 7000-14021) at the CM1241 end. The isolator breaks the galvanic path and presents a fresh, isolated ground to the bus. Ensure the isolator's signal-ground output is then tied to the slaves' pin 5.
- Verify cabinet PE bonding. A cabinet-to-cabinet PE loop of more than a few ohms (caused by paint, star washers missing, or aluminum-to-copper transitions) is a common cause of the entire problem being misdiagnosed as a CM1241 fault.
9. Verification and Diagnostics
After wiring, validate the segment in this order:
- Visual inspection: Confirm red wire on terminal A, green on terminal B, shield bonded at the connector, pin 5 daisy-chained. Confirm termination switches are ON only at the two physical ends.
-
DC resistance checks (powered off):
- A-to-B across the segment, with termination ON at both ends: should read approximately 60-75 Ω (two ~150 Ω Profibus terminations in parallel) for Profibus cable, or 60 Ω for a generic 120 Ω termination.
- Pin 5 continuity from CM1241 to every slave: < 5 Ω total loop.
- Shield to cabinet PE at one (and only one) end: < 1 Ω.
- Shield to cabinet PE at the far end: should read open-circuit or, if a 1 MΩ / 4.7 nF RC drain is used, ~1 MΩ DC and short-circuit at 50 Hz.
- Oscilloscope check (powered): Connect a two-channel scope across A and B (differential) at each end of the bus. Trigger a Modbus read. The differential eye should be clean, with both edges reaching ±1.5 V (for a 5 V transceiver) within the bit period. If the eye is round, the bus is over-terminated (too many resistors in parallel); if it has multiple crossings, the bus is under-terminated.
-
MB_MASTER return codes in TIA Portal online watch table:
- 0x0001 = No error, continue polling.
- 0x80C8 = Slave timeout, check addressing and physical layer.
- 0x80D0 to 0x80D5 = Modbus function-code errors, check slave configuration.
- 0x80E0 to 0x80E1 = Parity / framing errors, almost always wiring.
- Counter increments: Use a Modbus counter or a wire-tap tool (Elpro 1055M, Indu-Sol MyBrowser) to count framing errors per minute. After the bench test, the bus should log zero CRC errors over 10 minutes under normal scan load.
10. Troubleshooting Matrix
| Symptom | Likely Cause | Diagnostic | Fix |
|---|---|---|---|
| No comms at all, status LED on connector off | No +5 V or no terminator power | Measure pin 6 on CM1241: should be 5.0 V ± 0.25 V | Verify 24 V supply to CM1241; check Profibus connector is a powered model (6ES7972-0BA42-0XA0, not the passive 0BA12 with manual switch only) |
| Comms at 9 600 bit/s, fails at 115 200 | Cable too long or impedance mismatch | Measure cable length and impedance | Reduce baud, shorten trunk, or replace generic STP with 6XV1830-0EH10 |
| Random intermittent failures, no comms with motor running | Common-mode voltage / missing pin 5 | AC voltmeter pin 5 to PE | Run signal-ground wire from CM1241 pin 5 to all slaves |
| Comms OK cold, fails after 5-10 minutes | Thermal expansion loosening shield bond inside connector | Heat gun the connector, watch error counter | Re-tension FastConnect contacts; replace with 0BA42 axial connector |
| All slaves return exception 0x02 (illegal data address) | Polled wrong register, or A/B swapped at one node only | Swap A and B at one slave | Verify red = A = pin 8, green = B = pin 3 at every DB9 |
| Master sees ghost slaves at addresses 248-255 | Bus bias missing, noise interpreted as addresses | Measure idle voltage A to B | Enable termination network (Profibus three-resistor) at both ends |
| CRC error rate climbs with each slave added | Stub length too long, missing termination at end | Measure each stub < 0.3 m | Use daisy-chain, not star topology; place terminator at the very last node |
11. Configuration Reference: CM1241 in TIA Portal
Recommended parameter values for CM1241 RS-485 in TIA Portal V15 to V18, using the Modbus Master or Modbus Slave instruction from the S7-1200 Programmable Controller System Manual and the Modbus library (Modbus_Comm_Load / MB_MASTER / MB_SLAVE blocks):
| Parameter | Recommended Value | Notes |
|---|---|---|
| Baud | 19 200 (default), 9 600 / 38 400 / 115 200 | Start low for commissioning, raise after stable comms |
| Parity | Even (8E1) | Most Modbus RTU devices use 8E1; 8N1 only if explicitly stated |
| Data bits | 8 | Modbus RTU fixed at 8 |
| Stop bits | 1 | Use 2 only for 8N1 at very low baud on some legacy slaves |
| Flow control | None (RS-485 hardware direction) | CM1241 controls RTS on pin 4 automatically |
| Mode (CM1241 RS-485) | Half-duplex (2-wire) | Use MODE = 4 in MB_MASTER |
| Response timeout | 1 000 ms default, increase to 3 000 ms for slow slaves | Set in MB_MASTER input TIMEOUT |
| Inter-frame delay | 3.5 character times, minimum 1.75 ms at 19 200 | Modbus RTU spec, handled by the library |
12. When to Choose a Plain DB9 + 120 Ω Resistor
If you are wiring a single Modbus slave within 5 m of the CM1241, in the same cabinet, on a vibration-free mounting plate, then the simple approach is acceptable:
- Solder a 120 Ω 0.5 W resistor between pins 3 and 8 inside a hooded DB9 connector.
- Wire pin 5 of the CM1241 to pin 5 of the slave with a dedicated 22 AWG wire.
- Use a single shielded twisted pair (Belden 9841, 3105A, or equivalent 120 Ω RS-485 cable) for A and B.
- Bond the cable shield to the cabinet PE at the CM1241 end only.
For multi-drop, multi-cabinet, or vibration-exposed installations, the Profibus connector on Profibus cable is the field-proven choice. The component cost difference (a 6ES7972-0BA12 connector at roughly $35-45 USD vs. a $3 hooded DB9) is small relative to the time spent diagnosing intermittent comms later.
13. Summary of Field-Proven Rules
- Pin 5 of the CM1241 is signal ground. Do not assume the DB9 shell (chassis) is your ground reference.
- Use a Profibus connector if you want built-in three-resistor termination. Use a plain DB9 with a single 120 Ω resistor only if the master/slave provide fail-safe bias.
- Use Profibus Type A cable (6XV1830-0EH10 violet) for any segment longer than 5 m, and for any panel exposed to vibration.
- Daisy-chain pin 5 between every node on the segment, separately from the shield.
- Bond the cable shield to cabinet PE at one end only, with the other end isolated or RC-drained.
- Terminate only at the two physical ends of the bus. Leave all intermediate Profibus connectors in the OFF position.
- Commission at 9 600 bit/s first, watch the error counter for 5 minutes, then raise the baud.
14. FAQ
Can I use a Siemens Profibus connector for Modbus RTU on a CM1241?
Yes. The Profibus connector (6ES7972-0BA12 / 0BA42 / 6GK1500-0FC10) uses the same DB9 pinout for pins 3 (B), 5 (signal ground), 6 (+5 V), and 8 (A) as the CM1241 RS-485 port. Pins 4 (RTS) and 7 (+24 V) are unused on a Modbus slave. The connector's built-in three-resistor termination (220 Ω pull-up, 220 Ω pull-down, 330 Ω across A/B) is electrically compatible with 150 Ω Profibus cable and with a 120 Ω generic RS-485 bus as long as only the two end nodes have the termination switch ON.
Why does my multimeter show no continuity between pin 5 and the connector shell?
On a Siemens Profibus FastConnect plug, pin 5 (signal ground) is not bonded to the shell (chassis ground) by default. The shield is bonded through the metal coupling sleeve when the cable is inserted. To short pin 5 to the shield, follow the pigtail procedure on page 170 of the PROFIBUS Network Manual, or run a separate signal-ground wire to each slave's pin 5.
What cable should I use for a Modbus RTU segment on CM1241?
Siemens Profibus Type A cable, part number 6XV1830-0EH10 (violet) for fixed installation or 6XV1830-3EH10 for trailing cable, is the field-proven choice. It has 150 Ω characteristic impedance, 22 AWG solid conductors, and a double shield (foil + braid). For very short, in-cabinet runs (under 5 m, no vibration) a generic 120 Ω shielded twisted pair such as Belden 9841 is acceptable.
Do I need termination resistors at every Profibus connector on the bus?
No. Termination is required at the two physical ends of the segment only. Set the termination switch on the Profibus connector to ON at the end nodes (typically the CM1241 end and the most distant slave) and OFF on every node in between. Adding termination to middle nodes loads the bus, attenuates the signal, and causes bit errors. A correctly terminated Profibus bus measures approximately 60-75 Ω across A and B with the segment powered off.
The CM1241 communicates at 9 600 bit/s but fails at 115 200 — what is wrong?
Almost always a cable or termination problem. At higher baud rates the bit period shrinks and the bus is sensitive to reflections, ringing, and common-mode shift. Verify cable length is within the Modbus spec (1 200 m at 9 600, 100 m at 115 200 for 24 AWG), that the cable is 120 Ω (Belden 9841) or 150 Ω (Profibus Type A), that only the two end nodes are terminated, and that pin 5 is daisy-chained to every slave. Add an RS-485 isolator at the CM1241 end if common-mode voltage is the issue.
What is the correct TIA Portal configuration for Modbus RTU on CM1241 RS-485?
Set protocol to Modbus Master or Slave, baud 19 200 (start), parity Even, 8 data bits, 1 stop bit (8E1), half-duplex mode. In the user program call MB_COMM_LOAD first to initialize the port, then call MB_MASTER (or MB_SLAVE) cyclically. The MB_MASTER block uses MODE = 4 for half-duplex 2-wire RS-485. Default response timeout is 1 000 ms; raise to 3 000 ms for slow slaves. Return code 0x0001 indicates success; 0x80E0 / 0x80E1 indicate parity or framing errors, which are almost always wiring problems, not configuration problems.