Configuring S7-1200 as PROFIBUS DP Slave with CM 1242-5

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

1. Overview and Module Evolution

The SIMATIC S7-1200 PLC was originally released with a single integrated PROFINET interface on the CPU, and early firmware revisions (V1.0 through V3.0) restricted that interface to S7 communication, PUT/GET, ISO-on-TCP, TCP, UDP, and HMI panels. PROFIBUS DP master or slave functionality was not present on the CPU itself, which forced integrators using S7-200 with an EM-277 PROFIBUS DP slave module to retain the older controller for any non-Siemens PROFIBUS DP networks.

With STEP 7 / TIA Portal V11 and matching firmware updates on the S7-1200 CPU, Siemens opened the door to PROFIBUS by introducing the CM 1242-5 (DP slave) and CM 1243-5 (DP master) communication modules. The CM plugs onto the left side of the CPU or behind another CM/CP/SM, just like any other S7-1200 plug-in module, and the PROFIBUS segment is brought out to a 9-pin sub-D female connector on the front of the CM.

Up to three communications modules (CMs/CPs) can be stacked behind a single S7-1200 CPU. The CM 1242-5 must be counted toward that total. Power budget and slot length restrictions of the host CPU (CPU 1211C through CPU 1217C, and the DC/DC/DC, AC/DC/Relay, and DC/DC/Relay variants) apply unchanged.

Today, if the requirement is to integrate the S7-1200 into an existing PROFIBUS DP network as a slave—for example behind a third-party DP master, an S7-300/400, an S7-1500, or a non-Siemens controller—the CM 1242-5 is the dedicated hardware. If the goal is to operate the S7-1200 as a master on PROFIBUS while exposing a PROFINET interface upward, the CM 1243-5 is the correct choice and is also used in the S7-1200 PN/DP Gateway (I-device / I-slave) configuration.

2. CM 1242-5 PROFIBUS DP Slave Module

The CM 1242-5 is the PROFIBUS DP slave communications module for the S7-1200 system.

Parameter Value
Article number (MLFB) 6GK7242-5DX30-0XE0
Function PROFIBUS DP slave (DP-V0 / DP-V1)
Form factor S7-1200 plug-in module, 30 mm wide
PROFIBUS connector 9-pin sub-D female, isolated
Baud rate 9.6 kbit/s to 12 Mbit/s (auto-detect)
Supported profiles DP-V0 cyclic I/O; DP-V1 acyclic (read/write via DPV1 services from the master, subject to GSD)
Maximum slave I/O per CM Up to 240 bytes input + 240 bytes output total (slot-configurable)
Diagnostic LEDs BF (bus fault), SF (system fault), ON (power), TXD/RXD activity
Power consumption (from backplane bus) 1.1 W typical, 1.5 W max
Current consumption from 24 V 0 mA (powered exclusively from CPU backplane)
Operating temperature -20 °C to +60 °C horizontal mounting; -20 °C to +50 °C vertical
Required TIA Portal V11 SP2 or higher (V13, V14, V15, V15.1, V16, V17, V18 supported)
Required S7-1200 CPU FW V3.0 or higher for full TIA Portal V13+ features; V2.2 minimum for TIA V11 SP2

Place the CM in any free slot on the left bank of the CPU. TIA Portal recognizes the module from the hardware catalog under Communications modules → PROFIBUS → CM 1242-5. After inserting the module, the purple PROFIBUS subnet port appears in the device view; drag it to the project tree's PROFIBUS subnet to bind the CM to a network.

3. CM 1243-5 PROFIBUS DP Master Module

The CM 1243-5 (article number 6GK7243-5DX30-0XE0) is the symmetric counterpart of the CM 1242-5. It implements the DP-V0/DP-V1 master, supports up to 32 DP slaves per segment (subject to repeater topology), and is required when the S7-1200 must poll PROFIBUS slaves (such as ET200S, ET200MP, SINAMICS, or third-party DP slaves).

Both CMs share the same mechanical form factor and backplane connector. The 9-pin sub-D connector carries the same pin-out as a standard PROFIBUS DP connector (pin 3 = B line, pin 8 = A line, pin 6 = VP, pin 5 = DGND, pin 4 = RTS, pin 1 & 9 = shield). Use a Siemens PROFIBUS bus connector (e.g. 6ES7972-0BA12-0XA0 with PG socket, or 6ES7972-0BB12-0XA0 without) and PROFIBUS FC cable (violet, 6XV1830-0EH10) for the trunk; terminate both ends of the segment with the switchable terminating resistor in the bus connector.

Termination power is taken from pin 6 (VP) of the CM, not from the host CPU. The bus connector's terminating resistor therefore activates only when the CM is powered and the CPU is in RUN or STOP with backplane bus active. Do not mix termination across multiple powered nodes on the same segment.

4. TIA Portal Configuration: S7-1200 as DP Slave with CM 1242-5

The configuration flow below assumes TIA Portal V16/V17/V18 and a CPU 1214C DC/DC/DC with firmware V4.4. Earlier portal versions follow the same logical steps, but the inspector window layout differs.

  1. Add the CM 1242-5. Open the device configuration of the S7-1200 station. In the hardware catalog, navigate to Communications modules → CM 1242-5. Drag the module to an empty slot to the left of the CPU. TIA Portal assigns the module to slot 101 (or the next free slot).
  2. Create or open a PROFIBUS subnet. Click the purple PROFIBUS port on the CM 1242-5. In the inspector window Properties → General → PROFIBUS interface, click Add new subnet to create a PROFIBUS (1.5 Mbit/s default) subnet, or assign an existing subnet from the project tree.
  3. Assign the PROFIBUS address. In Properties → PROFIBUS address, enter the desired slave address (1–125). Valid range is 1 to 125; 0 is reserved for the master class 2 (PG) and 126 is the default for newly shipped units. The address set in TIA Portal must match the address selected by hardware switches (if present) on the CM or set in the software (no DIP switch on CM 1242-5; address is purely a configuration value).
  4. Configure slot mapping. In Properties → Operating mode, leave the CM in DP slave mode. Under Module parameters → I/O configuration, define up to 32 slots of input/output data. Each slot accepts 1 to 32 bytes; the total across all slots must not exceed 240 bytes input + 240 bytes output. Typical mapping uses one or two slots matching the data width exchanged with the partner master (e.g., slot 0 = 4 bytes input / 4 bytes output, slot 1 = 8 bytes input /amp; 8 bytes output).
  5. Address the I/O in the S7-1200 program. In the PLC tags, the CM 1242-5 I/O areas map to process image or direct I/O addresses beginning at %I and %Q addresses derived from slot index. TIA Portal displays the assigned input address (e.g., I100..I107) and output address (e.g., Q100..Q107) in the device view. Reference these directly in the user program; no PUT/GET or BSEND/BRCV calls are required for DP-V0 cyclic exchange.
  6. Compile and download. Right-click the device → Compile → Hardware (rebuild all), then download the hardware configuration to the CPU. The CM 1242-5 receives its configuration automatically at CPU startup.
  7. Configure the partner master. On the DP master station (S7-1500 with CM 1542-5 or any third-party DP master), install the GSD file of the CM 1242-5 (filename SIEM812B.gsd for DP-V0, or SIEM812D.gsd for DP-V1; both ship with TIA Portal and are also available from the Siemens Industry Online Support under entry ID 49855653). Place the CM 1242-5 on the master's PROFIBUS subnet at the address assigned in step 3 and configure the master's I/O slots to match the slot layout from step 4.

For step 6 the official Siemens TIA Portal Online Help describes the procedure in the chapter PROFIBUS → Configuring a DP master and slave device → Assigning PROFIBUS addresses to the CM 1243-5 module and DP slave (the same inspector workflow applies symmetrically to CM 1242-5). Reference: SIMATIC S7-1200 Manual Collection – PROFIBUS address assignment.

5. I-Slave Mode and PN/DP Gateway

The S7-1200 supports a PROFINET IO device / PROFIBUS DP slave gateway—referred to by Siemens as the S7-1200 PN/DP Gateway—in which the controller acts simultaneously as:

  • A PROFINET IO device (I-device) on the upper-level PROFINET controller, and
  • A PROFIBUS DP slave (I-slave) on the lower-level PROFIBUS master.

This is the configuration described in the official Siemens application document S7-1200 as a PN/DP Gateway, available from the Siemens Industry Online Support: S7-1200 as PN/DP Gateway (PDF). The use case covered by that document places an S7-1500 as the PROFINET controller, an S7-300 as the PROFIBUS DP master, and an S7-1200 in between. The I-slave functionality on the PROFIBUS side uses the CM 1242-5; the I-device side uses the integrated PROFINET port of the S7-1200 CPU.

To configure I-slave mode:

  1. Add the CM 1242-5 to the S7-1200 device configuration as described in section 4. Set the operating mode to DP slave.
  2. In the device view, switch to Properties → I-slave / I-device configuration. Define the transfer areas: each area is a contiguous I/O block (input, output, or input/output) that is exposed both to the upper PROFINET controller (as I-device slots) and to the lower PROFIBUS DP master (as DP slave slots). Configure a name (e.g., TA_1_IN), direction, length in bytes, and the start address in the S7-1200 process image.
  3. On the PROFINET side, export the I-device GSD file (right-click the S7-1200 → Export → PROFINET GSD) and import it into the PROFINET controller's project (S7-1500). Place the I-device on the PROFINET subnet and configure the controller's I/O slots to mirror the transfer area lengths.
  4. On the PROFIBUS side, install the CM 1242-5 GSD (SIEM812D.gsd) on the DP master (S7-300 in the reference application) and configure the slave slots to match the transfer area lengths.
  5. Compile, download, and verify the data path. A successful configuration lights the BF LED on the CM 1242-5 as off and the SF LED as off; the PROFINET port shows link and activity on its integrated switch.
The maximum number of transfer areas is 32, the maximum aggregate size is 240 bytes per direction (same limit as the DP slave I/O budget). Transfer areas must not overlap in the S7-1200 process image. If the PROFINET controller requests more bytes than the PROFIBUS master provides, the slave enters data-length mismatch and the SF LED illuminates.

6. PROFIBUS Address Assignment on the CM

The CM 1242-5 has no hardware address switches; the PROFIBUS address is part of the device configuration and is downloaded with the project. To assign or change it after commissioning, follow the official Siemens procedure:

  1. Open the project in TIA Portal and connect to the target CPU via PROFINET (online → accessible devices).
  2. Click the purple PROFIBUS box on the CM 1242-5 in the device view. Switch the inspector window to Properties → General → PROFIBUS interface → PROFIBUS address.
  3. Edit the Address field (1–125). Avoid addresses already used by the master class 2 (PG), other slaves on the same segment, or master addresses (the master is typically address 1 or 2).
  4. Right-click the CM and select Download to device → Hardware configuration. The CM does not require a STOP of the CPU to accept the new address; it simply re-enters the data exchange cycle after a brief reconfiguration.
  5. Verify the new address by reading the diagnostics buffer of the CM (online → diagnostics → diagnostic buffer) and by browsing the master station: the slave should appear under the new address with status Data exchange within a few seconds.

7. Migrating from S7-200 EM-277 to S7-1200 CM 1242-5

The S7-200 EM-277 (article number 6ES7277-0AA22-0YA0 for the 22.5 kbit/s version, or 6ES7277-0AA21-0YA0 for the 12 Mbit/s variant) provides a PROFIBUS DP slave interface for the S7-200 family. When replacing the S7-200 with an S7-1200, the CM 1242-5 takes over the DP slave role with the following differences:

Aspect EM-277 (S7-200) CM 1242-5 (S7-1200)
DP version DP-V0 only DP-V0 / DP-V1
Max baud rate 12 Mbit/s (variant-dependent) 12 Mbit/s (auto-detect)
Max I/O 128 bytes in / 128 bytes out 240 bytes in / 240 bytes out
Address range 1–126 (DIP switch, 1–99 only on some variants) 1–125 (software configured)
Slot count Up to 16 slots Up to 32 slots
Configuration Stored on EM-277 EEPROM, set via master Stored on S7-1200 CPU project, downloaded with hardware config
GSD file SIEM081B.gsd (DP-V0) SIEM812B.gsd (DP-V0) / SIEM812D.gsd (DP-V1)
I/O addressing in controller S7-200 uses V-memory mapped to VW/VD addresses S7-1200 uses process image I/Q tags directly

The master does not need to be re-cabled, but its slave definition must be re-imported with the new GSD (SIEM812B.gsd or SIEM812D.gsd) and the slot sizes must be re-entered. Plan a brief downtime for the master reconfiguration. After downloading, validate by reading the master's diagnostics: the new slave must transition from Wait Prm (parameterization) to Wait Cfg (configuration) to Data Exchange.

8. Diagnostics, LEDs, and Buffer Entries

The CM 1242-5 has four LEDs on the front:

LED Color State Meaning
ON Green On Backplane power OK, CM ready
Off No or insufficient backplane power from CPU
SF (system fault) Red On Configuration error, parameterization error, or DP-V1 fault
Red Flashing Group diagnostics pending from CM
Off No fault
BF (bus fault) Red On No PROFIBUS connection; cable broken or master not active
Red Flashing Configuration mismatch with master (length or slot count differ)
Off PROFIBUS link OK, data exchange active
TXD/RXD Yellow Flashing Bus activity (transmit/receive)

From TIA Portal, additional detail is available in Online → Diagnostics → Diagnostic buffer for the CM and in the web server of the CPU (if enabled). Typical diagnostic buffer entries include:

  • "Configuration error: length of input/output inconsistent" – The slot layout in the master does not match the CM 1242-5. Recheck the master project.
  • "Address conflict on PROFIBUS" – Another node on the segment uses the same address. Scan with the master to identify the duplicate.
  • "Watchdog timeout" – The master stopped polling. Check the master's CPU state and its bus parameters.
  • "Parameter assignment fault: PNO identifier 0xXY" – DP-V1 service mismatch; the master is sending parameter data that the CM does not accept (e.g., DPV1 enabled when not configured).

9. Specifications and Limits Summary

Parameter CM 1242-5 (DP slave) CM 1243-5 (DP master)
Article number 6GK7242-5DX30-0XE0 6GK7243-5DX30-0XE0
Function DP slave DP master
Baud rate 9.6 kbit/s to 12 Mbit/s 9.6 kbit/s to 12 Mbit/s
DP-V0 / V1 Both Both
Max slaves (own segment) N/A (it is a slave) 32 per segment (repeater extends to 127)
Max I/O data 240 bytes in / 240 bytes out 244 bytes per slave (input + output)
Power from backplane 1.1 W 1.1 W
Slot count 32 Depends on slave GSD
Connector 9-pin sub-D female 9-pin sub-D female
Dimensions (W × H × D) 30 × 100 × 75 mm 30 × 100 × 75 mm
Required CPU FW V2.2 minimum V2.2 minimum
Required TIA Portal V11 SP2 or higher V11 SP2 or higher

10. Troubleshooting Matrix

Symptom Likely cause Diagnostic step Corrective action
BF LED solid red, SF LED off No PROFIBUS link; cable/termination Measure 5 V between pin 5 (DGND) and pin 6 (VP) at CM; expect 4.75–5.25 V Check bus termination at both ends; replace cable if open circuit
BF flashing red Configuration mismatch Compare master's slot table with CM I/O configuration in TIA Portal Re-align master I/O slots with CM slot layout
SF solid red, BF off DP-V1 parameter error Open diagnostic buffer; read PNO identifier in fault entry Disable DP-V1 services on master or enable DPV1 in CM project
Master reports "Slave not found" Address conflict or wrong subnet Run PROFIBUS bus scan from master or use Amprolyzer / BT200 Change address in TIA Portal and re-download; ensure master is in same subnet
Cyclic data exchange OK but data values stuck Overlap of process image areas in S7-1200 Cross-check I/Q addresses in S7-1200 program vs. CM transfer area Split overlapping areas; recompute starting addresses
Intermittent timeout after a few hours EMI / improper shielding Inspect shield clamps at every node; verify grounding Use PROFIBUS FC cable with double shield; ensure shield is clamped 360° at every connector
CM not detected in TIA Portal Outdated GSD / wrong firmware Check CPU firmware and TIA Portal version compatibility Upgrade CPU firmware; install latest HSP for TIA Portal
Slot count error after migration from EM-277 EM-277 GSD still loaded on master Inspect master station for SIEM081B vs. SIEM812B Replace EM-277 entry with CM 1242-5 entry using SIEM812B.gsd or SIEM812D.gsd

11. Field-Proven Commissioning Checklist

  1. Verify mechanical: CM seated and locked into the S7-1200 left bank. CPU recognizes it in Online → Accessible devices.
  2. Verify electrical: 24 VDC at CPU power terminals; backplane LEDs steady green on CPU and CM.
  3. Verify network: 5 V between pin 5 and pin 6 of the CM sub-D connector with master powered and termination enabled at both ends.
  4. Verify configuration: PROFIBUS address in TIA Portal matches the address set on the master side; I/O lengths in master slot table match CM I/O configuration; GSD file version matches between master and TIA Portal catalog.
  5. Verify data exchange: All four LEDs on CM show ON green, SF off, BF off, TXD/RXD flashing; master's slave list shows status Data Exchange; read/write a known test word from the user program and observe it at the master.
  6. Verify diagnostics: Diagnostic buffer is empty on both CPU and CM after 15 minutes of continuous operation. Configure SF and BF LEDs to trigger a CPU diagnostic interrupt (optional) so user program can react.

12. Notes on Coexistence with PROFINET

Adding the CM 1242-5 does not consume the S7-1200 PROFINET port. The CPU's integrated PROFINET interface continues to support S7 communication, HMI panels, web server, and—on firmware V4.0 or higher—PROFINET IO controller/IO device with up to 16 IO devices. When the CM 1242-5 is installed and configured as a DP slave, the PROFINET port is fully independent. Use the same PN/DP Gateway pattern (PROFINET IO controller on top, PROFIBUS DP master below) when the S7-1200 must bridge between two non-Siemens networks; this is the architecture validated in the Siemens application document referenced in section 5.

Which module enables S7-1200 to act as a PROFIBUS DP slave?

The CM 1242-5 (article number 6GK7242-5DX30-0XE0) is the dedicated PROFIBUS DP slave communications module for the S7-1200. It supports DP-V0 and DP-V1, baud rates from 9.6 kbit/s to 12 Mbit/s, and up to 240 bytes of input plus 240 bytes of output.

What TIA Portal version and CPU firmware are required for the CM 1242-5?

TIA Portal V11 SP2 or higher is required (V13, V14, V15, V15.1, V16, V17, V18 are supported). The S7-1200 CPU must run firmware V2.2 or higher; firmware V3.0 or higher is recommended for full TIA Portal V13+ feature support.

How do I replace an S7-200 EM-277 with an S7-1200 + CM 1242-5?

Replace the EM-277 entry on the PROFIBUS master with the CM 1242-5 entry using the GSD file SIEM812B.gsd (DP-V0) or SIEM812D.gsd (DP-V1). Re-enter the slot layout in the master, because the CM 1242-5 supports up to 32 slots and 240/240 bytes versus the EM-277's 16 slots and 128/128 bytes. Download the new hardware configuration to the S7-1200 CPU.

Can the S7-1200 be a gateway between PROFINET and PROFIBUS?

Yes. Configure the S7-1200 as a PROFINET I-device on the upper PROFINET controller and as a PROFIBUS DP slave (I-slave) on the lower PROFIBUS master. Define transfer areas in TIA Portal so the same data is exposed on both sides. The maximum aggregate transfer size is 240 bytes per direction. See the Siemens application document "S7-1200 as PN/DP Gateway" (entry 101495058) for a worked example.

What does the BF LED flashing red on the CM 1242-5 indicate?

BF flashing red means the CM is on the PROFIBUS segment but the configuration received from the DP master does not match the CM's I/O layout (slot count, slot size, or module identifier). Open the master's project and verify the slot table exactly matches the I/O configuration defined in the S7-1200 device view for the CM 1242-5.

What is the maximum number of PROFIBUS DP slaves that the CM 1243-5 can poll?

The CM 1243-5 supports up to 32 DP slaves per PROFIBUS segment. Using RS 485 repeaters (e.g., 6ES7972-0AA02-0XA0) extends the maximum to 127 slaves across all segments, subject to bus parameter timing (Tslot, Tset, Tqui) re-calculation in TIA Portal.

Back to blog