Problem Description
When commissioning a peer-to-peer link between two SIMATIC S7-300 CPU 313C-2DP controllers, the most common failure mode is a diagnostic event on the DP master reading:
Preset/Actual mismatch:
(inserted and configured module types are not the same)
Expected type: DP Slave (Order No. = ???)
Current type: Not available
The error is reported in the Module Information dialog (accessible via PLC → Module Information → Diagnostic Buffer) and is also exposed as diagnostic interrupt (OB 82) on the master. The CPU 313C-2DP, while advertising a fully integrated DP master/slave interface, only carries one PROFIBUS-capable port (X2, the combined MPI/DP socket). Therefore only one of the two CPUs can be a slave in any single PROFIBUS subnet - the second must be the master, or the two PLCs must be on different physical segments bridged by a repeater.
Because the message lists the expected slave's order number as "???", STEP 7 cannot resolve the GSD identity of the device it is polling. This almost always points to a configuration or wiring problem, not a defective CPU.
Hardware Overview: CPU 313C-2DP (6ES7313-6CF03-0AB0)
The CPU 313C-2DP is the compact controller with integrated digital and analog I/O plus a PROFIBUS-DP interface. The version relevant for current STEP 7 V5.x and TIA Portal V13+ projects is order number 6ES7313-6CF03-0AB0 (Firmware V3.3). Key parameters that matter for the link:
| Parameter | Value |
|---|---|
| Order number (MLFB) | 6ES7313-6CF03-0AB0 |
| Firmware | V3.3 (V3.0 minimum for DP slave mode) |
| Work memory | 64 KB (32 KB code / 32 KB data) |
| Bit memory | 2048 bytes |
| Integrated DI16/DO16 | 24 V DC, isolated |
| Integrated AI5/AO2 | 0–10 V / 4–20 mA, 11-bit + sign |
| DP interface (X2) | RS-485, 9.6 kbit/s to 12 Mbit/s |
| DP mode | DP master (DPM1/DPM2) or DP slave |
| DP slave max. I/O | 32 bytes input + 32 bytes output per slot, 32 slots max. |
| Routing | Yes (only with active interface) |
| S7 basic communication | No (no GET/PUT as server) |
The full data sheet is published in the Siemens Industry Online Support entry SIMATIC S7-300 CPU 31xC and CPU 31x – Technical specifications. The 313C-2DP cannot perform S7 basic communication (GET/PUT/BSEND/BRCV) on its PROFIBUS port - only DP, MPI, and routing. Data exchange between the two CPUs must therefore be implemented as DP master/slave I/O transfer, not as S7 connection.
PROFIBUS DP Master-Slave Architecture Used Here
The simplest topology that fits a single 313C-2DP port on each side is a bus segment with two stations:
- Station 1 (Master): CPU 313C-2DP, PROFIBUS address 1, polled by engineering station, runs the application logic.
- Station 2 (Slave): CPU 313C-2DP, PROFIBUS address 2, exposes a process image that the master reads/writes cyclically.
Cyclic data exchange is the only mechanism that does not require S7 basic communication. The master holds the configuration of the slave as a "virtual" rack - each row in the slave's slot table corresponds to a fixed-size I/O area the master polls in its DP cycle. The slave's user program reads its assigned input area (data coming from the master) and writes the output area (data the master will read).
Root Cause Analysis of the Preset/Actual Mismatch
The diagnostic text is unambiguous: the master is asking the slave for a module type that the slave does not report. The four most common root causes, ordered by frequency in field commissioning, are:
| # | Cause | What STEP 7 Reports | Indicator |
|---|---|---|---|
| 1 | Slave CPU not yet in DP slave mode (X2 still MPI) | Current type: Not available | BF LED on master blinks; SF LED on slave is off |
| 2 | Slave HWConfig not downloaded / DBs not regenerated | Preset != Actual | Slave does not appear in PG online view |
| 3 | Slot configuration on master does not match the slot configuration on slave (different I/O sizes or wrong slot order) | Order No. = ??? with mismatched module ID | Online → Accessible Nodes shows the slave but with "?" |
| 4 | PROFIBUS address on slave hardware does not match the address configured in HWConfig (DIP switch on the CPU front or default 2) | Station Failure then Preset/Actual mismatch | Diagnostic buffer entry "Station failure, address 2" |
A fifth, less frequent cause is the absence of the GSD file on the master side when the slave CPU is a different family (e.g. ET 200S), but for two 313C-2DP controllers the GSD is part of the STEP 7 installation - no manual import is required.
Prerequisites
- STEP 7 V5.5 + SP2 or later (V5.7 is the final V5 release, still supported for S7-300). The same steps work in TIA Portal V13+ but this article uses STEP 7 V5.5 notation.
- Two functional CPU 313C-2DP (6ES7313-6CF03-0AB0) with firmware ≥ V3.0. Older firmware ("ES" or V2.x) cannot enter DP slave mode on the X2 port.
- PROFIBUS DP cable 6XV1830-0EH10 (purple, standard type) or 6XV1830-0EH50 (highly flexible).
- Two PROFIBUS connectors 6ES7972-0BA12-0XA0 (with PG socket) for termination at the ends. Switch the terminating resistor ON on the two end connectors, OFF on any station in the middle.
- Two MPI/DP programming cables (USB or PC adapter) to download the hardware configuration to each CPU. The 313C-2DP shares its only port between MPI and DP, so the configuration download on the slave must occur via MPI - it cannot be done over the active DP cable while the CPU is set to DP slave mode.
Step-by-Step Configuration - Slave CPU First
Always configure and download the slave project before the master. If the master is brought online against a non-existent slave, STEP 7 caches the error in the master's diagnostic buffer and you will chase ghost faults for the rest of the day.
- Open SIMATIC Manager and create a new project, then insert a SIMATIC 300 Station - rename it to Slave_313C2DP.
- Open HWConfig. Insert a RACK 300, then drop a PS 307 in slot 1, the CPU 313C-2DP in slot 2, and any SM modules required. If you do not need additional I/O, leave the rest of the rack empty - the integrated DI/DO of the 313C-2DP are still usable in user program but do not consume DP I/O area.
- Double-click slot 2 (the CPU row) to open its properties, then switch to the DP tab. The Interface field shows MPI/DP - click Properties.
- In the new dialog select DP slave as the operating mode. Set the PROFIBUS address to 2. Confirm with OK.
- Back on the DP tab, click Configuration. This is the heart of the slave configuration. STEP 7 shows a table with up to 32 slots. Each slot will hold a "universal module" of a fixed I/O size that the master must match exactly.
- Click Row 1 in the configuration table. The catalog on the right shows Universal modules in sizes ranging from 1 byte to 32 bytes. As a starting point, select 1 byte input on slot 1 and 1 byte output on slot 2. This creates a 1-byte PI/1-byte PQ exchange on the slave. Click OK to close the configuration dialog.
- Compile and download to the slave CPU. Switch the CPU to STOP first - download HWConfig is only allowed in STOP.
- After the download, switch the slave CPU to RUN. The SF LED should be off. The DP interface LED (the one labelled "DP" next to X2) will be off because the slave is passive on the bus and only the master sends frames.
To confirm the configuration is correct before touching the master, open PLC → Module Information → Diagnostic Buffer on the slave. It should show the most recent entries as Download OK and Restart (cold). If the buffer shows Parameter assignment error, the slave rejected its own DP slave parameters - this happens when slot 0 (the "interface slot") is configured with non-zero data; reset slot 0 to "Empty slot".
Step-by-Step Configuration - Master CPU
- Add a second SIMATIC 300 Station to the same STEP 7 project - rename it to Master_313C2DP. Build the same rack (PS 307, CPU 313C-2DP, slot 2).
- Double-click slot 2 of the master, then the DP tab, click Properties next to MPI/DP. Select DP master (the default is "DP master (DPM1)"). Set the PROFIBUS address to 1.
- In HWConfig, the right-hand catalog tree now has a PROFIBUS DP branch. Open Configured Stations → S7-300/ET 200U → CPU 31x. Drag the CPU 313C-2DP onto the master's DP subnet. STEP 7 places a new icon on the bus representing the slave.
- Right-click the slave icon and choose Object Properties. Verify the PROFIBUS address is 2 (matching the slave CPU). Click the Configuration tab.
- Click Edit in the configuration tab. You will see a list of slots. Insert the same modules in the same order as the slave project: Slot 1 = 1 byte input, Slot 2 = 1 byte output. The order and size of every slot must match the slave exactly - this is the "preset" the master sends to the slave during parameter assignment. Any mismatch produces the diagnostic event described at the top of this article.
- Compile and download the master HWConfig to the master CPU.
Program Structure for Master and Slave
With the slot configuration above, the exchange uses the following I/O areas:
| Direction | Master addresses (I/O view) | Slave addresses (I/O view) | Size |
|---|---|---|---|
| Master → Slave (output from master view) | QB 0 (output slot 2 of slave) | PIB 0 (input slot 2 of slave) | 1 byte |
| Slave → Master (input from master view) | IB 0 (input slot 1 of slave) | PQB 0 (output slot 1 of slave) | 1 byte |
Note the reversal: from the master perspective, the slave's input area is its own input area. STEP 7 maps the slave's slot 1 (1 byte output from the slave) to the master's peripheral input IB 0, because what the master reads is what the slave writes. The full mapping is visible in HWConfig → Master DP → slave icon → Configuration → I/O Addresses.
Sample S7 program in the master (OB 1, STL):
// Master: read 1 byte from slave, increment, write back
L IB 0 // read slave input (slave output slot 1)
+ 1
T QB 0 // write to slave output (slave input slot 2)
SET
= M 10.0 // heartbeat flag, also useful for loopback test
Sample S7 program in the slave (OB 1, STL):
// Slave: copy the byte the master wrote to a flag word
L PIB 0 // read master output (slave input slot 2)
T MB 20
L MB 30 // application data produced by slave
T PQB 0 // expose to master (slave output slot 1)
To watch the exchange live, open Monitor/Modify on the master, enter IB 0 and force QB 0. The value you force on the master appears in the slave at PIB 0 on the next DP cycle. With 12 Mbit/s bus, the cycle is sub-millisecond; with 1.5 Mbit/s (typical default), budget 1–5 ms.
Diagnostic Buffer and Online Diagnostics
When the link is healthy, the master's diagnostic buffer contains these entries in chronological order after power-up:
- Restart (cold) - master CPU start-up
- DP: parameter assignment OK, address 2 - master has accepted the slave
- DP slave: status OK, address 2 - cyclic polling began
If the link fails, the master reports the following event codes (visible in the diagnostic buffer as hex IDs):
| Event ID (hex) | Meaning | Action |
|---|---|---|
| 0x3942 | Parameter assignment error, address 2 | Slot configuration mismatch - see step 5 of master config |
| 0x3921 | Station failure, address 2 | Cable, terminating resistor, slave RUN mode, or address DIP switch |
| 0x3E0A | DP slave configuration error, no valid module | Order number "???" - master cannot read slave GSD |
| 0x3947 | Preset != Actual configuration | Slot table on master or slave has extra/missing module |
Use PLC → Accessible Nodes (or Target system → Accessible Nodes in TIA Portal) to see the slave's PROFIBUS address. If the slave does not appear at all, the bus is physically broken or the slave CPU is in STOP with its DP interface still configured as MPI.
Verification and Commissioning
- Power both stations. The slave's SF LED must be off. The master's BF LED must be off and the DP LED on each CPU must be on solid (not flashing).
- Open the master project, go online, and check the diagnostic buffer. Confirm the three healthy events listed above.
- Open Monitor/Modify on the master. Force
QB 0 = 16#55and confirm the value appears in the slave atPIB 0in its own online view. - Write a value from the slave side (e.g. set
MB 30 = 16#AAin the slave's VAT) and verifyIB 0 = 16#AAon the master. - Disconnect the PROFIBUS cable on the master end. The BF LED must come on within the configured watchdog time (default 10 s). The master diagnostic buffer logs Station failure. Reconnect and confirm the link auto-restores within 1 cycle.
Troubleshooting Matrix
| Symptom | Likely Cause | Action |
|---|---|---|
| Order No. = ???, "Not available" | Slave not online or wrong address | Verify address DIP switch, run mode, terminating resistors, cable polarity |
| Order No. shown correctly, but Preset/Actual mismatch | Slot table mismatch | Compare every row of master's slave configuration to slave's own DP configuration; sizes and order must match |
| BF LED flashing on master, no SF on slave | Slave in MPI mode | Re-download HWConfig to slave with DP slave mode active |
| BF LED solid on master, SF on slave | Slave parameter rejected | Reset slot 0 to empty, recompile, re-download |
| Bus terminator voltage missing | Resistor off or no 24 V on connector | Check both end connectors, switches set to ON, 5 V present between pins 5/6 |
| Intermittent failures, longer cable runs | EMC / baud rate / shielding | Lower baud rate to 1.5 Mbit/s, ground shield at both ends through equipotential bonding, max 1000 m at 187.5 kbit/s |
Field-Proven Caveats
- STEP 7 V5.5 SP2 and later auto-rebuild the slot table when you change the slave's project. If you switch from a 1-byte to 4-byte universal module on the slave, you must open the master HWConfig and update the master's matching row - the program does not propagate the change.
- The CPU 313C-2DP's integrated DI16/DO16 do not appear in the DP I/O area. They are accessible only via the standard I (PII) and Q (PIQ) image and via the process I/O. The DP exchange always uses the virtual slots you configured in step 6 of the slave setup.
- If the same project must connect a 313C-2DP (slave) to a third-party master (e.g. a Beckhoff CX or Allen-Bradley ControlLogix), the slot configuration is exported as a GSD file from STEP 7: HWConfig → Options → Create GSD File for Slave. Import this GSD into the third-party engineering tool and the slot table travels with it.
- Watchdog behaviour: when the master fails to poll the slave, the slave switches its outputs to a safe state after the configured DP watchdog (default 10 s). For fail-safe operation, wire the watchdog to 0 = "keep last value" or 1 = "output 0" depending on your process safety requirements.
FAQ
Why does STEP 7 show "Order No. = ???" for the slave on a 313C-2DP link?
The order number resolves only when the master receives a valid identification telegram from the slave. A question mark means the master cannot read the slave's GSD identity - either the slave is offline, the PROFIBUS address is wrong, or the cable is broken. Verify cable, terminating resistors, slave RUN state, and address DIP switch before touching the configuration.
What is the maximum number of bytes I can exchange between two CPU 313C-2DPs?
Each universal module slot accepts 1 to 32 bytes. The CPU 313C-2DP supports 32 slots in DP slave mode, so the theoretical maximum is 32 × 32 = 1024 bytes in each direction, but the practical limit is set by the cycle time and the 64 KB work memory of the CPU. Most field projects use 32 to 128 bytes total per direction.
Do I need a GSD file import when both stations are 313C-2DP in the same STEP 7 project?
No. When the slave is a SIMATIC CPU on the same STEP 7 installation, you can drag the slave from the catalog tree under PROFIBUS DP → Configured Stations → S7-300/ET 200U → CPU 31x. STEP 7 then uses the internal station description and the slot table travels with the master project. GSD import is only required for third-party slaves or different STEP 7 versions.
Can the 313C-2DP be DP master and slave on the same bus?
No. The CPU has a single PROFIBUS-capable port (X2) which can be configured as either DP master or DP slave, but not both simultaneously. To integrate the CPU into a higher-level DP line as a slave and still communicate with a local master, you need a second PROFIBUS port - which the 313C-2DP does not provide. Use a CPU 314C-2DP with CP 342-5 or move to an S7-400 with two integrated DP ports.
What baud rate should I use for a two-station link on the bench?
For short cables (under 10 m) the bus auto-detects 12 Mbit/s reliably. For cabinets and field wiring drop to 1.5 Mbit/s to get the full 200 m segment length per the PROFIBUS DP cable specification 6XV1830-0EH10. Use the BT 200 bus tester or the diagnostic buffer entry "baud rate found" to confirm the negotiated rate after first power-up.