CM 1242-5 Profibus Slave Configuration with an ABB Master Controller in TIA Portal
1. Application Overview
This reference covers commissioning a Siemens S7-1200 station as a Profibus DP I-slave that exchanges cyclic I/O with a third-party Profibus DP master (in this case an ABB PLC family). The slave side is implemented on a CM 1242-5 communication module (article number6GK7242-5DX30-0XE0) installed to the left of an S7-1214C CPU (for example 6ES7214-1AG40-0XB0 or 6ES7214-1HG40-0XB0). The CM 1242-5 is a Profibus DP slave only; it cannot become a DP master. The master side, typically an ABB AC500 with CM592-DP, AC31, or AC800M series controller, must hold the Profibus configuration of the network and load the GSD of every slave it polls.
The configuration flow is split between two engineering tools:
- Siemens side - TIA Portal V16 (or later V16/V17/V18 project compatible): defines the I-slave slot layout, the I/O consistency areas, and exports the station GSD that the master imports.
- ABB side - Automation Builder / Control Builder / PS501 Control Builder Plus: imports the GSD, places the Siemens station on the Profibus line, sets the slave address, and assigns the master-side process image addresses.
2. Hardware and Software Prerequisites
2.1 Hardware
| Item | Article / Spec | Notes |
|---|---|---|
| S7-1214C CPU | 6ES7214-1xG40-0XB0 | Firmware V4.4 or higher recommended for TIA V16 |
| CM 1242-5 Profibus slave module | 6GK7242-5DX30-0XE0 | DP-V0 slave, max 12 Mbps, up to 244 bytes input / 244 bytes output per slot group |
| Profibus cable | 6XV1830-0EH10 (violet) | RS-485 shielded twisted pair, characteristic impedance 150 ohm |
| Profibus connector (slave) | 6GK1500-0FC10 or 6ES7972-0BB70-0XA0 | With PG socket and terminating resistor switch |
| Profibus connector (master) | ABB-specific (e.g. 1SBP260000R1001) | Check ABB Master CM connector type |
| Terminating resistors | On first and last node only | Both end nodes must have resistor ON, middle nodes OFF |
2.2 Software
-
STEP 7 / TIA Portal V16 Update 5 or higher (article
6ES7822-1AA06-0YA5). The CM 1242-5 HSP (Hardware Support Package) for V16 isHSP0300or higher - available from the Siemens Industry Online Support (SIOS) portal. Without the correct HSP the CM 1242-5 will not appear in the device catalog. - GSD file for the S7-1200 I-slave - generated from the TIA Portal project or downloaded from the SIOS entry SIOS entry 113652 "GSD files for S7 CPUs, IMs and Profibus CPs".
- ABB configuration tool - typically Automation Builder 2.x for AC500 series, Control Builder A for AC800M, or PS501 for AC31. Confirm the GSD importer supports the GSD revision (GSD Rev. 5 is recommended for full diagnostic compatibility).
3. Profibus I-Slave Concept
The CM 1242-5 operates in DP-V0 I-slave mode. Conceptually the S7-1200 user program writes process data into transfer areas; the CM transmits those areas to the master and delivers received data back into transfer areas that the user program reads.3.1 Slot model
A Profibus DP slave is described by a fixed number of slots. The CM 1242-5 exposes one physical slot (slot 0) that is the DP interface itself, plus logical slots that correspond to configured DP sub-modules. Each sub-module can be:| Slot | Module type | Meaning |
|---|---|---|
| 0 | DP interface (always present) | Diagnostic interface of the CM 1242-5 |
| 1 | Empty / placeholder | Optional - reserved for future modules |
| 2 to 16 | I-slave transfer area | Each slot defines an Input area, Output area, or both |
3.2 Consistency
Consistency determines whether the slave guarantees a contiguous byte block is updated atomically. For the CM 1242-5 the available consistency modes are:- Total Length - the entire transfer area is consistent.
- Byte - inconsistent, byte-wise (used only for legacy purposes).
DPRD_DAT and DPWR_DAT instead of direct I/O access (PQE / PEW).
4. Step-by-Step Configuration in TIA Portal V16
Step 1 - Add the CM 1242-5 to the device configuration
- Open the TIA Portal project containing the S7-1214C station.
- In the Project Tree, expand
Devices & Networksand double-clickDevice viewon the S7-1200 station. - From the Hardware catalog, navigate to
Communication modules > PROFIBUS > CM 1242-5and drag the module into a free slot to the left of the CPU. - Confirm the order number
6GK7242-5DX30-0XE0is shown in the inspector.
Step 2 - Activate I-slave mode and set the Profibus address
- Select the CM 1242-5 in the device view.
- In the Inspector window switch to
Properties > PROFIBUS interface. - Set Operating mode =
DP slave. - Set PROFIBUS address = a unique number on the bus, e.g.
3(address 0, 1 and 126 are reserved for masters and service in many tools - choose 2-125). - Optionally set the baud rate - leave as
Autofor the CM 1242-5 to detect the master's speed.
Step 3 - Configure transfer areas (slots)
- In the Properties of the CM 1242-5 open
Operating mode > DP slave > I-slave configuration. - Click
Add newfor each transfer area. Typical structure:
| Slot | Type | Length (bytes) | Consistency | DB / Address |
|---|---|---|---|---|
| 1 | Input | 8 | Total length | DB100.DBX0 (length 8) |
| 2 | Output | 8 | Total length | DB101.DBX0 (length 8) |
| 3 | Input + Output | 16 in / 16 out | Total length | DB102 / DB103 |
- For each slot specify the start address in the CPU process image or in a data block. Using a DB (e.g.
DB100) is preferred for S7-1200 because theDPRD_DAT/DPWR_DATinstructions require a byte-granular pointer and the area must not overlap with any other I/O usage. - Record the exact slot order, lengths and direction. The master-side configuration must mirror this layout exactly.
Step 4 - Export the GSD file
- Right-click the CM 1242-5 in the project tree and choose
Export > Station GSD. - Specify a target file name, e.g.
S7_1200_CM1242_5_slave3.GSD. - TIA generates a project-specific GSD that matches the slot layout. The file is provided to the ABB engineer, who installs it in the ABB configuration tool.
Step 5 - Compile and download to the S7-1200
- Right-click the S7-1200 device and select
Compile > Hardware (rebuild all). - Download the hardware configuration to the CPU via Online > Download to device.
- After restart the CM 1242-5 enters
WAIT-PRMuntil the master sends parameterisation. The SF LED on the CM is lit while waiting.
5. Configuration on the ABB Master Side
The steps vary by ABB platform, but the conceptual flow is identical.5.1 Install the GSD
- Open the ABB configuration tool (Automation Builder for AC500, Control Builder for AC800M, PS501 for AC31).
- Choose
Tools > Install Device DescriptionorImport GSDdepending on tool version. - Browse to the exported file
S7_1200_CM1242_5_slave3.GSD. - Restart the tool if required so the device appears in the catalog.
5.2 Place the slave on the Profibus line
- Open the Profibus configuration view (e.g.
Profibus_DPsubnet in Automation Builder). - Drag the new Siemens entry (the GSD identifier
S7-1200 CM1242-5) onto the Profibus line. - Assign the same Profibus address as in step 4.2, e.g.
3.
5.3 Mirror the slot layout
- Open the slave's slot table.
- For each TIA-defined slot, insert the matching module type (1 word input, 1 word output, etc.) with the identical length and consistency. Out of sequence or mismatched length will trigger parameterisation faults on the master.
- Map each slot's data to a variable in the ABB controller's process image or a data block. Typical mapping table:
| Slot | Direction | Length | ABB address example |
|---|---|---|---|
| 1 | Input | 8 bytes | %IW100 |
| 2 | Output | 8 bytes | %QW200 |
| 3 | Input | 16 bytes | %IW300 |
| 3 | Output | 16 bytes | %QW400 |
5.4 Download and start cyclic data exchange
- Compile and download the ABB project.
- After the master is in RUN, it parameterises the slave (CHK_PRM exchange) and starts cyclic data exchange (DX). The CM 1242-5 BF (bus fault) LED will extinguish and the SF LED will extinguish once parameterisation is accepted.
6. S7-1200 User Program: Reading and Writing Transfer Areas
6.1 Read inputs from master
The standard instruction for total-length consistency on S7-1200 is DPRD_DAT. Wire as follows:
// Read 8 bytes from output area of slot 1 into DB101
// LADDR points to the start of the output area on the slave
// (TIA reports this address in the slot configuration inspector)
"DPRD_DAT_DB"(
REQ := TRUE,
LADDR := 100, // I-slave input area, slot 1 base address
RET_VAL := "DB_Status".Error,
RECORD := DB101 // Destination DB
);
6.2 Send outputs to master
// Write 8 bytes from DB100 to slot 2 (ABB sees as input)
"DPWR_DAT_DB"(
REQ := TRUE,
LADDR := 110, // I-slave output area, slot 2 base address
RECORD := DB100, // Source DB
RET_VAL := "DB_Status".WriteError
);
6.3 Diagnostic instructions
For Profibus diagnostics from the user program use:-
DPNRM_DG- read slave diagnostic buffer (6 bytes standard diagnostic). -
DP_TOPOL- enumerate bus nodes (CM 1242-5 supports this from FW V1.0 onwards).
7. Verification and Acceptance Test
- Monitor the CM 1242-5 LEDs. Healthy state: BF off, SF off, ON green. Cyclic traffic indicator on supported revisions shows activity on TXD/RXD.
- From TIA Portal:
Online & Diagnostics > PROFIBUS > Diagnostic. Look for the Data exchange entered event. - On the ABB side, open the Profibus diagnostic view (e.g.
Online > Profibus Diagnosticsin Automation Builder). Confirm slave 3 shows Cyclic data exchange OK. - Toggle a bit in the S7-1200 output DB and verify the corresponding input updates on the ABB controller. Repeat in reverse.
- Use a Profibus analyser (e.g. Softing PBprofinet, Inat TCP-Profinet-Trace) to capture the parameterisation telegram. Validate: slave address matches, user parameter
iPar_EN= 0, slot configurationSlotDefinition= expected.
8. Topology Diagram
9. Troubleshooting Matrix
| Symptom | LED / indicator | Likely cause | Corrective action |
|---|---|---|---|
| CM BF steady on, SF on | Master not found or address conflict | Different baud rate, cable break, duplicate slave address | Verify cable, check terminating resistor, confirm unique address |
| BF off, SF steady on, no data exchange | Parameterisation rejected | Slot count or lengths on master do not match GSD | Re-export GSD, re-import, mirror slot list exactly |
| BF off, SF off briefly then on again | Configuration mismatch | Consistency setting mismatch (total length vs byte) | Set both sides to Total length; recompile master config |
| Data exchange but values garbled | Byte swap / wrong endianness | Word swap needed between Siemens big-endian and ABB little-endian | Swap bytes in ABB logic or use ABB conversion block |
| Master diagnostic 0x0D/0x31 | Parameterisation error | User parameter byte mismatch | Check iPar_EN, fail_safe, and additional user parameter bytes |
| Master diagnostic 0x0D/0x32 | Configuration error | Slot configuration mismatch | Re-check slot order, lengths, module identifiers |
| Communication drops after a few minutes | Intermittent | EMI, missing shield bond, loose connector | Verify shield clamp on both connectors; check baud rate auto-negotiation |
10. Common Field-Proven Pitfalls
- TIA Portal only configures Siemens DP masters. If the project is opened and the user tries to add a non-Siemens DP master in the network view, TIA will not provide a slot for it. The CM must be configured as I-slave without a master in the TIA project.
- Address 1 is often the default PROFIBUS service address. Many ABB tools reserve it; choose 2-125 for application slaves.
- Total-length consistency is mandatory for multi-byte telegrams. Reading with normal I/O access (PEW / PAW) reads one byte at a time and may tear under high bus load, producing intermittent wrong values.
- CM 1242-5 firmware V1.x has a 32-byte limit per direction per slot. For larger areas split into multiple slots. V2.0 and higher support 244 bytes per slot.
- The CM is hot-swappable only when the CPU supports it. On S7-1214C FW V4.x the CM is part of the configuration and requires CPU stop or hot-swap enablement in the device configuration.
- Always regenerate the GSD after changing slot lengths. TIA caches the GSD; verify timestamp before importing on the ABB side.
- Watchdog on master side. Default ABB watchdog for a Profibus slave is 10 s. If the S7-1200 STOPs for longer, the master will flag the slave as failed. Match the watchdog to the application's worst-case STOP time.
11. Extending to Safety-Related I-Slave Communication
If the application requires safety, the CM 1242-5 cannot be used. Replace it with the F-variantCM 1242-5 in F-CPU configurations using the safety module CM 1243-5 for master and F-CPUs on both sides. Configure the safety transfer areas as described in the TIA Safety documentation - Configuring safety-related master-I-slave communication. The GSD in this case is generated from the F-CPU and includes F-related parameter bytes (iPar_EN, SIL, PROFIsafe address). The ABB master must support PROFIsafe; standard CM592-DP variants do not - upgrade to the safety variant or use an alternative Profinet/Profinet-safe path.
12. Cross-Reference: GSD Acquisition for Older Siemens Devices
For non-S7-1200 slaves the GSD may be obtained from SIOS. The reference list entry 113652 bundles GSD files for legacy S7-300, S7-400, ET200S, ET200M and older CP modules and is maintained by Siemens Product Support. Always download the latest revision matching the firmware of the target module; older GSDs may not advertise newer module identifiers and will fail parameterisation on a DP-V2 master.13. Quick-Start Checklist
- [ ] CM 1242-5 HSP installed in TIA V16
- [ ] Slave Profibus address set (2-125)
- [ ] Slots defined with total-length consistency
- [ ] GSD exported and delivered to ABB engineer
- [ ] GSD installed on ABB configuration tool
- [ ] Slot layout mirrored exactly on ABB side
- [ ] Watchdog configured on ABB master
- [ ] BF / SF LEDs off on CM 1242-5 after master start
- [ ] Bidirectional bit test passed
Do I need a GSD file from the ABB master on the Siemens side?
No. A Profibus DP master does not require the slave to know about it. The master must hold the slave's GSD; the slave only needs to be configured as I-slave in TIA with its own slot layout. Then export the GSD for the master to import.
Can the CM 1242-5 work as Profibus master?
No. The CM 1242-5 (article 6GK7242-5DX30-0XE0) is a DP-V0 slave only. For master capability use the CM 1243-5 (article 6GK7243-5DX30-0XE0). TIA Portal only configures Siemens DP masters; third-party masters must be configured with their own engineering tool.
What baud rate should I use between the S7-1200 and the ABB master?
The CM 1242-5 supports auto-detection from 9.6 kbit/s to 12 Mbit/s. For short cables (<20 m) and good shielding 1.5 Mbit/s or 12 Mbit/s is typical. Set both master and slave to the same rate or leave auto-detect on both ends; do not mix fixed and auto.
How many bytes can the CM 1242-5 transfer per slot?
Up to 32 bytes per direction per slot on firmware V1.x and up to 244 bytes per direction per slot on firmware V2.x. The total of all slots in one direction cannot exceed 244 bytes input and 244 bytes output.
What happens if I change slot lengths in TIA after exporting the GSD?
The previously exported GSD no longer matches the project. The master will reject the parameterisation and the slave remains in WAIT-PRM with SF LED on. Re-export the GSD, re-import on the ABB side, re-download the ABB project and cycle power on the bus.
Why are my received values byte-swapped between Siemens and ABB?
Siemens stores words in big-endian (Motorola) byte order while ABB typically uses little-endian. With consistency = Total length and word-sized data you must perform a byte swap in the ABB application. Configure the transfer area with two-byte slots to make the swap explicit, or use ABB's word-swap conversion block on each transfer area.
Is the CM 1242-5 hot-swappable on a running S7-1214C?
Only if "Remove/insert module in RUN" is enabled in the device configuration of the CPU and the firmware revision supports it. Standard practice during commissioning is to STOP the CPU, install the CM, download the new hardware configuration, then RUN.