Configuring PROFIBUS Between SINUMERIK 840D sl and S7-1200 with CM 1242-5
Overview
Integrating a legacy SINUMERIK 840D sl (solution line) NCU into a new auxiliary station built around a SIMATIC S7-1200 requires a PROFIBUS DP segment that is independent of the existing drive bus. The S7-1200 is extended with a CM 1242-5 communications module so it can appear as a DP slave on the 840D sl's PROFIBUS network. This guide covers the GSD file, port selection (X126 vs. X136), TIA Portal device configuration, SINUMERIK commissioning, PLC programming, verification, and field diagnostics.
The link supports DP-V0 cyclic I/O exchange and S7 communication over PROFIBUS when both sides are configured consistently. The 840D sl integrated PLC (a S7-300 compatible CPU inside the NCU) acts as DP master; the S7-1200 with CM 1242-5 acts as DP slave.
Hardware Prerequisites
Confirm the following before starting:
- SINUMERIK 840D sl NCU (NCU 710.3 PN, NCU 720.3 PN, or NCU 730.3 PN) with running PLC firmware and accessible PROFIBUS port (X126 or X136).
- SIMATIC S7-1200 CPU, firmware V4.2 or later (recommended V4.5+) so that CM 1242-5 is fully supported in the TIA Portal device catalog.
- CM 1242-5 communications module. Article number:
6GK7242-5DX30-0XE0(legacy) or the current release listed in the Siemens Industry Online Support catalog. - PROFIBUS cable (purple, twisted pair, shielded) terminated with 9-pin D-sub PROFIBUS connectors.
- Two PROFIBUS terminating resistors (typically integrated in the connectors, switched ON at the two physical ends of the segment).
- TIA Portal V15.1 or later installed on the engineering station.
- SINUMERIK commissioning access: SINUMERIK Operate, HMI Advanced, or the SINUMERIK PCU/NCU toolbox (CFGDEPRO / plcsim and the cross-commissioning tools).
CM 1242-5 Key Specifications
| Parameter | Value |
|---|---|
| Article number (legacy) | 6GK7242-5DX30-0XE0 |
| Function | PROFIBUS DP-V0/V1 slave |
| Max. baud rate | 12 Mbps |
| Supported DP versions | DP-V0, DP-V1 |
| Power supply | Via S7-1200 backplane bus (5 V DC) |
| Current consumption | approx. 150 mA (5 V) from backplane |
| Connector | 9-pin D-sub female (PROFIBUS standard) |
| Configuration | TIA Portal, GSD-based |
| Max. I/O data (DP-V0) | 244 bytes input / 244 bytes output per slave |
| Diagnostic LEDs | SF, BF, ON |
SINUMERIK 840D sl PROFIBUS Architecture
The 840D sl NCU integrates an S7-300 compatible PLC that communicates with drives, I/O, and HMI via two principal PROFIBUS interfaces located on the NCU housing:
- X126 (DP/MPI): the primary PROFIBUS DP interface. By default this is the drive bus plus distributed I/O. The pin assignment conforms to PROFIBUS standard RS-485.
- X136 (MPI/DP): a multipurpose port that defaults to MPI for programming/HMI connection but can be reconfigured as a second PROFIBUS DP master or DP slave segment using the SINUMERIK PLC and NCK configuration tools.
On NCU 730.3 PN variants, additional PROFIBUS-capable slots are populated by CP option modules (for example, CP 5603 / PROFIBUS option boards) that bring up further segments. For NCU 710.3 PN and NCU 720.3 PN, two PROFIBUS interfaces are available (X126 + X136), with X136 the only spare for a new auxiliary network.
PROFIBUS Port Selection on the NCU
Your choice of X126 versus X136 dictates the scope of the integration work:
| Port | Default Use | Reconfigure to DP? | Impact on existing bus |
|---|---|---|---|
| X126 | PROFIBUS DP (drives + I/O) | Already DP, no reconfigure needed | Sharing the drive bus — high risk of disturbing motion / drive communication |
| X136 | MPI (HMI / programming) | Yes, switchable to DP in PLC/NCK configuration | Isolated segment; existing HMI over MPI must be re-routed or replaced by PROFINET |
Recommended approach: configure X136 as a DP master and build a new isolated PROFIBUS segment that contains only the new S7-1200 station(s). This keeps the drive bus on X126 untouched and avoids interfering with safety-integrated drive communication.
Topology Diagram
GSD File Requirements
The CM 1242-5 is delivered with its GSD file integrated into the TIA Portal device catalog from V14 SP1 onward. If the engineering station cannot locate the device:
- Open TIA Portal.
- Menu Options → Manage general station description files (GSD).
- Browse to the GSD file shipped with the CM 1242-5 (the file is also downloadable from the Siemens Industry Online Support portal — search by article number 6GK7242-5DX30-0XE0).
- Install and verify the device appears under Other field devices → PROFIBUS DP → Siemens AG → CM 1242-5.
Selecting the Correct PROFIBUS Port on the 840D sl
Two questions drive the choice:
- Do you need an additional interface module? No hardware option module is required when X136 is configured as DP. The NCU's integrated PROFIBUS interface controller supports both X126 and X136 simultaneously. If both ports must operate as DP masters concurrently and the NCU is a 710.3 variant with limited resources, install a CP 5603 or PROFIBUS option board to gain a third DP segment — but for a single S7-1200 station this is unnecessary.
- Can X136 be configured as DP without disturbing the existing network? Yes. X136 is independent of X126 at the bus level. The only side effect is that any device currently using X136 in MPI mode (typically the programming PG and the SINUMERIK HMI over MPI) must be re-routed to PROFINET or to X126 before the change is committed.
Procedure on the 840D sl side
- In SINUMERIK Operate → Commissioning → Network → PROFIBUS, switch X136 from
MPItoDP Master. - Set the master's PROFIBUS address (commonly
3for the NCU PLC on the new segment — must differ from any address on X126). - Set the transmission rate (recommended
1.5 Mbpsfor cabinet-length segments with one slave, up to12 Mbpsfor short premium segments). - Compile and load to NCK.
- Verify in Menu Select → Diagnostics → Bus → PROFIBUS that the segment shows OK.
TIA Portal Device Configuration
On the S7-1200 side the CM 1242-5 is inserted as a slave to the master represented by the 840D sl NCU's integrated PLC. Use the TIA Portal project structure already present for the loading/unloading station.
Step 1 — Add the CM 1242-5 to the device
- Open the S7-1200 station in Device view.
- Drag the CM 1242-5 from the catalog onto the left of the CPU (slot 101 or matching slot for the S7-1200 system).
- Open the CM 1242-5 Properties.
-
PROFIBUS address: set to a free address on the new segment (e.g.
4). Must not collide with any 840D sl address. -
Transmission rate: set to match the 840D sl configuration (
1.5 Mbpsin this example). -
Highest PROFIBUS address: keep at
126unless you intentionally use HSA optimisation.
Step 2 — Configure the S7 connection (optional, for S7 communication)
If the goal is bi-directional S7 communication (PUT/GET) rather than pure DP I/O, configure an S7 connection from the S7-1200 side toward the NCU PLC.
- Open Devices & Networks.
- Select the CM 1242-5 and from the connection list choose S7 connection.
- Set the partner to the NCU PLC with the IP-style identifier of its PROFIBUS address (TIA Portal uses PROFIBUS addressing under the Partner field).
- Tick Establish an S7 connection; leave the local ID at default; the partner ID is assigned by the NCU project.
- For details follow the official Configuring a PROFIBUS S7 Connection procedure.
Step 3 — Map I/O areas (for DP-V0 cyclic exchange)
Open the Device view → CM 1242-5 → Module parameters → I/O addresses. Assign input and output ranges that fit your application; the S7-1200 limits the total to the DP-V0 max of 244 bytes in / 244 bytes out per slave.
| Slot | Direction | Length (example) | Address range | Purpose |
|---|---|---|---|---|
| 1 | Inputs | 16 bytes | IB 100 ... IB 115 | Status from NCU PLC |
| 1 | Outputs | 16 bytes | QB 100 ... QB 115 | Commands to NCU PLC |
| 2 | Inputs | 32 bytes | IB 116 ... IB 147 | Axis / handshakes |
| 2 | Outputs | 32 bytes | QB 116 ... QB 147 | Axis / handshakes |
840D sl Commissioning Steps (PLC side)
- Open the SINUMERIK PLC project in STEP 7 (matching the NCU PLC version, typically V5.x for the integrated S7-300).
- Configure X136 as the new DP master using HW Config: insert a DP master system and define its PROFIBUS parameters.
- Add the CM 1242-5 as a DP slave on this master system. Either import the GSD manually in STEP 7 (older toolchains) or browse the catalog.
- Match the I/O address layout byte-for-byte to the S7-1200 side so that PUT/GET or DP I/O areas align.
- If S7 communication is used, open NetPro → S7 Connection, select the S7-1200 partner, and confirm the partner slot is the CM 1242-5 with the configured PROFIBUS address.
- Compile, download to NCU PLC, and perform an NCK reset if required by the PLC program changes.
S7-1200 PLC Programming for DP Slave I/O
For pure DP-V0 cyclic I/O no special function block is required: the CPU writes the configured output addresses automatically and updates the input addresses once the slave is in data exchange. For S7 communication use the standard PUT/GET blocks.
Example: Reading 16 bytes from the NCU PLC
// Reading 16 bytes from NCU PLC into DB100
// Triggered by a 1 Hz clock bit from the S7-1200 cyclic OB
// "REQ" := clock_1Hz;
// "ID" := W#16#1; // connection ID from TIA connection configuration
// "ADDR_1":= P#DB100.DBX0 BYTE 16; // any pointer to a data area on the S7-1200
// "RD_1" := P#M100.0 BYTE 16; // source area on the partner (NCU PLC)
// "DONE" := done_flag;
// "BUSY" := busy_flag;
// "ERROR" := error_flag;
// "STATUS":= status_word;
CALL "GET" , DB106;
Example: Writing 16 bytes to the NCU PLC
// Writing 16 bytes to NCU PLC
CALL "PUT" , DB107;
// REQ := write_trigger;
// ID := W#16#1;
// ADDR_1:= P#M200.0 BYTE 16;
// SD_1 := P#DB101.DBX0 BYTE 16;
// DONE := done_flag;
// BUSY := busy_flag;
// ERROR := error_flag;
// STATUS:= status_word;
Verification and Diagnostics
Verification must be performed on both sides.
S7-1200 side (TIA Portal)
- Go online with the S7-1200 station.
- Open Online → Diagnostics → Device information on the CM 1242-5.
- Confirm: Status = OK, DP state = Data exchange.
- Watch the input addresses — values should change when the master toggles its output data.
CM 1242-5 LED indications
| LED | State | Meaning |
|---|---|---|
| ON | Green | Power OK |
| SF | Off | No module fault |
| SF | Red | Configuration error or diagnostic event pending |
| BF | Off | Bus OK, data exchange active |
| BF | Red flashing | No communication — check cable, address, baud rate |
| BF | Red steady | Physical bus error — termination or wiring |
840D sl side (SINUMERIK Operate)
- Commissioning → Bus → PROFIBUS → X136.
- Verify Bus state OK and Slaves connected = 1 (the CM 1242-5).
- Open Diagnostics → PLC → Status and confirm the connection state to the partner is established.
- Force a single bit on the S7-1200 and watch it appear in the NCU PLC input image to prove end-to-end data flow.
Troubleshooting Matrix
| Symptom | Likely cause | Action |
|---|---|---|
| BF LED steady red on CM 1242-5 | Cable break, no termination, short circuit | Check PROFIBUS connector pin-out (3 = B, 8 = A); verify terminator ON at both ends only |
| BF LED flashing red | Address or baud-rate mismatch | Compare CM 1242-5 PROFIBUS address vs. 840D sl X136 configuration; ensure both sides use identical baud rate |
| SF LED red, BF off | Configuration mismatch (slot count, I/O length) | Reconcile I/O mapping between STEP 7 NCU PLC project and TIA Portal CM 1242-5 configuration |
| S7 connection error STATUS = 0x0001 | Partner not reachable | Verify the NCU PLC project has loaded an S7 connection to the S7-1200; check rack/slot for the CM 1242-5 (slot 101 of S7-1200) |
| S7 connection error STATUS = 0x000A | Resource problem on partner | Reduce the number of simultaneously active S7 connections on the NCU PLC |
| Data exchange but values stuck | Byte order / endian mismatch | Use SWAP block on the S7-1200 side, or align Word/DWord boundaries in DBs |
| Intermittent dropouts | EMI, missing shield bonding, terminator at intermediate node | Verify shield bonded at both connector shells to cabinet ground; re-check termination positions |
| NCU PLC compile rejects the new DP master | X136 already used as MPI by HMI | Re-route the HMI to PROFINET (X130/X127) before reconfiguring X136 to DP |
Field-Proven Tips
- Set the NCU PLC PROFIBUS address on X136 to a value that does not conflict with any X126 node — keep a written record in the cabinet drawing.
- Document the baud rate on the cabinet label: it is the most common source of communication failure after physical wiring.
- Reserve at least 10 % spare CPU load on the NCU PLC for the new communication load; DP masters consume noticeable scan time when many slaves are attached.
- For long segments (above 100 m), use 12 Mbps only on short premium cable; otherwise default to 1.5 Mbps or 500 kbps for robustness.
- When migrating in stages, commission the new segment with the S7-1200 alone (no other slaves) to isolate faults to that station.
Do I need a GSD file from the 840D sl for the S7-1200 configuration?
No. The CM 1242-5 only requires its own Siemens GSD file (already present in TIA Portal V14 SP1 and later). The 840D sl integrated PLC is a S7-300 master and is configured natively in STEP 7 or TIA Portal — no GSD import from the NCU is needed.
Can I use X136 instead of X126 so I do not touch the existing drive bus?
Yes. X136 can be reconfigured from MPI to DP master in the SINUMERIK commissioning menus. The existing X126 drive bus remains untouched. Re-route any HMI currently on X136 to PROFINET (X130/X127) before switching X136 to DP.
What is the part number of the CM 1242-5 module?
The legacy article number is 6GK7242-5DX30-0XE0. Always confirm the current revision in the Siemens Industry Online Support catalog before ordering because mid-life updates change the suffix.
Can the S7-1200 act as a PROFIBUS master in this setup?
No — the CM 1242-5 is a DP slave only. To make the S7-1200 the master you must replace it with the CM 1243-5 (6GK7243-5DX30-0XE0). In the topology described here the 840D sl NCU remains the master.
Which baud rate should I use on the new segment?
1.5 Mbps is the safest default for cabinet and short field segments with one or two slaves. 12 Mbps is reserved for very short, well-terminated segments with premium cable. Always set the same baud rate on the CM 1242-5 in TIA Portal and on X136 in the SINUMERIK configuration.