Replacing Siemens S7-300 CPU317: Migrate 2AJ10 to 2AK14

David Krause15 min read
S7-300SiemensTroubleshooting
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

Problem Overview

A machine tool with a SIMODRIVE 611U/FD drive fleet and several ET 200S/ET 200M PROFIBUS DP stations fails to communicate with its drives after a CPU replacement. The old controller was a Siemens SIMATIC S7-300 CPU 317-2 DP with order number 6ES7317-2AJ10-0AB0 (Firmware V2.1.x). The new controller is the successor module 6ES7317-2AK14-0AB0 (Firmware V3.3.x). After downloading the hardware configuration and the user program from the programming device (PG), the PLC goes RUN, OB1 cycles, but specific function blocks (FBs) that handle the SIMODRIVE data exchange (e.g. FB405/FC405 of the SIMODRIVE 611U universal library, or FB282/FB283 from the Starter/Commissioning toolbox) either return a parameter error, never complete their handshake, or stop calling the drive's PKW/PZD channels.

The reported symptoms include:

  • SIMODRIVE status word shows 0x0000 (drive is parked, no cyclic comms)
  • OB82 / OB86 diagnostic interrupts trigger on the new CPU that were not present on the old CPU
  • Some drive FBs report STATUS = W#16#8090 or STATUS = W#16#80A0 through STATUS = W#16#80B0 after the exchange
  • SFC14 (DPRD_DAT) reads return RET_VAL = W#16#8080 (data length error) or RET_VAL = W#16#8090 (DP slave failure)
  • SFC15 (DPWR_DAT) writes return RET_VAL = W#16#80C0 (peer/master conflict) intermittently

The fault is reproducible and tied to the migration path 2AJ102AK14, not to drive hardware or PROFIBUS cabling.

Important: The MLFB stem 6ES7317-2AJ10-0AB0 is a CPU 317-2 DP (one PROFIBUS DP interface, no PROFINET). It must not be confused with the CPU 317-2 PN/DP stem 6ES7317-2EJ10-0AB0, which carries a second PROFINET interface and has a different replacement part. Always confirm the family (DP-only vs PN/DP) before ordering a replacement.

CPU 317-2 MLFB Variant Comparison

The two MLFBs in question belong to the same functional family but to different hardware generations. Comparing the catalog data:

Property 6ES7317-2AJ10-0AB0 (old) 6ES7317-2AK14-0AB0 (new)
CPU class CPU 317-2 DP CPU 317-2 DP
Firmware range V2.1.x V3.3.x
Work memory (code) 512 KB 1 MB
Work memory (data) 512 KB 1 MB
Load memory MMC up to 8 MB MMC up to 8 MB
Bit memory / S7 timers / S7 counters 4 KB / 512 / 512 4 KB / 512 / 512
PROFIBUS DP interface (MPI/DP, X1) MPI / DP master or slave MPI / DP master or slave
PROFIBUS DP interface (DP, X2) DP master or slave DP master or slave
Number of DP slaves (X2) max. 32 (up to 125 with repeater) max. 32 (up to 125 with repeater)
Min. STEP 7 version STEP 7 V5.3 + SP3 STEP 7 V5.5 + SP2 or STEP 7 V5.6
Supported MMC type 5V FEPROM, 64 KB – 8 MB 5V FEPROM, 64 KB – 8 MB (not all old MMCs supported)
Programming language set STEP 7 V5 base STEP 7 V5 base + SCL/KOP/FUP optional

The 0-th position letter of the MLFB (position 11 of the part number) identifies the generation. J = generation 2 (Firmware 2.x), K = generation 3 (Firmware 3.x). The two generations are not bit-compatible at the firmware boundary: the FW 3.x CPU rejects any block downloaded from a STEP 7 project that was last compiled against the FW 2.x hardware catalog unless the project is upgraded.

Root Cause Analysis: Why SIMODRIVE FBs Fail After CPU Exchange

There is rarely a single fault; in most cases two or three of the following conditions are present simultaneously after an MLFB change.

1. STEP 7 project still references the old MLFB

If HW Config still shows 6ES7317-2AJ10-0AB0 in slot 2 of rack 0, the project is compiled for the FW 2.1 catalog. When you download to a FW 3.3 CPU, the CPU coerces the configuration and reports a CPU diagnostic buffer entry such as:

Module parameter assignment: Parameter error in object 1 / object 2 / object 33 (DP master system)

The OB82 / OB86 starters will then fire, and any FB that calls SFC14/SFC15 with the wrong slot base address will receive a parameter error. Solution: open HW Config, delete the old CPU object, drag the new MLFB into the same slot from the catalog (path: SIMATIC 300 > CPU 300 > CPU 317-2 DP > 6ES7 317-2AK14-0AB0), then Save and Recompile (Station > Save and Compile, keyboard Ctrl+S).

2. Firmware 3.x changed OB1 / OB40 / OB82 / OB86 / OB87 startup behaviour

Firmware 3.x CPUs perform a stricter parameter validation pass during startup (OB100). If the HW Config is not regenerated, OB100 may report SF in the diagnostic buffer. The SIMODRIVE FBs are designed to be called from OB1, but if OB1 is interrupted by OB82 (peripheral access error) or OB86 (rack failure), the FB handshake times out and the drive stays in parked state.

Diagnostic buffer check: in STEP 7 choose PLC > Diagnostic/Setting > Diagnostic Buffer. Filter for the time window of the first RUN attempt and look for events with Event ID 0x3942, 0x3842 or 0x35CE — these are the standard CPU exchange "module parameter" events.

3. PROFIBUS DP bus parameters were re-calculated for the new CPU

When the new CPU is placed in HW Config, the DP master bus profile (Ttr, Tslot, min Tslot, max Tslot, Tid1, Tid2, watchdogs) is recomputed by the catalog. SIMODRIVE 611U universal drives are sensitive to slot time (Tslot) and target rotation time (TR). A change from the previous bus profile can push individual drives over their watchdog tolerance, which the drive then signals with status word bit 3 (communication fault) and the FBs will report STATUS = W#16#80B0 (DP slave fault).

After loading the new HW Config into the CPU, check HW Config > DP master system properties > Bus Parameters and compare against the printout of the previous project. If Tslot or TR differ, set the bus profile to Standard (the historical SIMODRIVE-friendly profile) rather than DPV0 or DPV1.

4. MMC (Micro Memory Card) handling

Two scenarios are common in the field:

  1. The user transferred the program from PG and the old MMC remained inserted — the new CPU may then boot from MMC, find an SD-style boot header from FW 2.1, and produce STOP with SF + diagnostic event 0x0151 ("Firmware update not possible") or 0x0251 (MMC write-protected in this context).
  2. The user inserted a brand-new MMC of the correct type (5 V FEPROM) but the program was only written by SIMATIC Manager > PLC > Download User Program to Memory Card, not by Card > Delete/Format first. The new CPU reads the existing FEPROM signature, keeps the old firmware loader stub, and may reject the online update.

Recommended workflow: always delete/format the MMC with the new CPU online (or with the Field PG SIMATIC Manager > S7 Memory Card > Delete) before writing the program. If the old MMC must be re-used, perform a Card-to-PG read first, then a PG-to-Card write to the same MMC after selecting the new CPU as the target. This forces a clean FEPROM image and clears the FW 2.1 boot record.

5. SIMODRIVE library version mismatch

The drive FBs (e.g. FB405 "Receive/setpoint data to SIMODRIVE 611U" / FC405) live in the SIMODRIVE 611U universal library. Library V01.05.x or V01.06.x is required on FW 3.3 CPUs. Library V01.04.x (typical for FW 2.1 projects) will compile, but the parameter set has one additional DWORD for FW 3.3 slave diagnostics; without it, the FB computes the wrong PKW index and the drive answers with ERR 0x0001 (invalid parameter number).

Check via SIMATIC Manager > Options > Manage STL/SCL Source Files > Libraries and inspect the version header of the FB source.

Diagnostic Sequence: Step-by-Step Investigation

  1. Establish an online connection to the new CPU with STEP 7 V5.5 SP2 (or V5.6) using MPI/DP at 187.5 kbit/s or PROFIBUS at 1.5 Mbit/s.
  2. Read the diagnostic buffer (PLC > Diagnostic/Setting > Diagnostic Buffer) and capture the last 50 events. Look for OB82, OB86, OB87 with module address = drive slot, and for parameter assignment errors.
  3. Open HW Config online. Compare the offline and online view. If the slot 2 object differs between the two, the project is out of sync and the new CPU has rejected the download.
  4. Open Monitor/Modify > Peripheral I/O and look at the input words of the SIMODRIVE. The status word should be 0x4331 (run enable, no fault, communication OK) within 3 – 5 OB1 cycles after a drive reset.
  5. Check the user-defined status byte of each FB call: most SIMODRIVE 611U libraries expose an RET_VAL or STATUS output. Capture the value and decode it using the library's STATUS table.
  6. Open PC/PG interface > PROFIBUS diagnostic and run a passive bus scan. All DP slaves should appear with the configured addresses and the bus profile should match the offline calculation.
  7. Verify the OB1 call tree. SIMODRIVE FBs must be called in OB1, OB82 and OB86 must be present in the project, and OB121/OB122 should be present to prevent STOP on programming errors.

Solution: Restoring SIMODRIVE Communication

Phase A — Project upgrade

  1. Back up the project: File > Archive.
  2. Open HW Config. Right-click the rack-0 slot-2 CPU. Select Replace Object > 6ES7317-2AK14-0AB0.
  3. Press F5 to refresh. STEP 7 will warn that the object is from a different catalog. Accept the upgrade and click Save and Compile.
  4. Open the SIMATIC Manager. Select Options > Module Information > Diagnostic Buffer of CPU (offline) — this forces a re-resolve of the system data (SDB).
  5. Update the SIMODRIVE library to V01.06.x or the version delivered with Siemens Technical Support for FW 3.3. Replace the FB/FC containers in the program blocks.

Phase B — Download and verify

  1. Insert a freshly formatted MMC into the new CPU.
  2. Download HW Config (Station > Download to Target Station). The CPU will perform a complete restart.
  3. Download the user program (PLC > Download).
  4. Open the diagnostic buffer again — it should now show clean OB100, OB1 cycle starts, and no parameter errors.

Phase C — Drive commissioning

  1. Open SIMODRIVE 611U Commissioning (Combi) or Starter and run a Online > Drive Configuration > Read Back for each axis. Confirm the PROFIBUS address and the PZD/PKW slot mapping.
  2. Execute the FB405/FC405 receive setpoint handshake manually once. The drive should exit parked state within 1 – 2 OB1 cycles.
  3. Save the project to the MMC: PLC > Copy RAM to ROM or Download User Program to Memory Card (with the Include system data checkbox enabled).

MMC (Micro Memory Card) Handling

Scenario Action Why
Old MMC, same size Format with new CPU, then PG-to-Card write Clears the FW 2.1 boot record and any SDB signatures
New MMC, same size Insert before CPU goes RUN, then download Prevents the CPU from booting with no card and reporting 0x0151
MMC of larger size (e.g. 4 MB → 8 MB) Allowed; format before use FW 3.3 supports up to 8 MB; no configuration change required
MMC from a CPU 31xC/31x Replace with a CPU 317-compatible FEPROM Old 3.3 V MMCs are not supported; only 5 V FEPROMs work in CPU 317

If the user kept the old MMC and inserted it into the new CPU, the most common diagnostic buffer entry is:

Event ID 0x0251: "Error in MMC access" or "MMC data inconsistent"

Resolution: power off, remove MMC, power on, let the CPU boot to STOP, insert a freshly formatted MMC, download the project again.

PROFIBUS DP Network Parameter Tuning

The FW 3.3 CPU, when placed into HW Config, recalculates the bus profile using its own catalog math. If the previous project had manually entered custom Ttr, Tslot or TR values (typical for a large SIMODRIVE fleet of 20+ drives on one DP strand), those values are lost on the upgrade.

Parameter Default (DPV1) SIMODRIVE-friendly value Comment
Baud rate 1.5 Mbit/s 1.5 Mbit/s or 12 Mbit/s Depends on cable length and repeaters
Slot time (Tslot) auto 300 – 400 bit times Drive must be polled within 50 ms
Min. slot time auto 200 bit times For 611U/FD the absolute minimum is 200
Max. retry limit 3 5 – 8 SIMODRIVE drives are more tolerant of retries than I/O blocks
Watchdog multiplier 10 20 – 30 Important when a drive is in torque limit / ramp-down
Target rotation time (TR) 5 ms 10 – 20 ms Larger TR = lower master load, longer worst-case latency

To force the bus profile back to the SIMODRIVE-friendly value, open DP master system properties > Bus Parameters > Custom and uncheck Optimize. Enter the values from the table and press Recalculate. Then run Station > Save and Compile and download.

Hardware Configuration Re-Compilation

After the CPU swap, the SDB (System Data Block) set is no longer valid. Re-compile HW Config and pay particular attention to:

  • Slot 4 — IM 360/361 (if present) for ET 200M expansion racks
  • Slot 4 — CP 342-5 (if PROFIBUS is run through a CP rather than the integrated DP port)
  • Slot 4 — FM 357 (if used as a motion control co-processor)
  • Slot 4 — SIMODRIVE 611U positioning/loop-control FM module, if any

For each module, verify in the object properties that the diagnostic address and process input/output addresses are the same as in the old project. If they are not, the FBs that use absolute addresses (e.g. P#DB20.DBX 0.0 BYTE 16) will point to the wrong I/O range. The standard fix is to manually re-enter the same addresses in the slot properties — STEP 7 will not reflow them automatically when only the CPU object is replaced.

Verification and Commissioning Checklist

Item Pass criterion
CPU diagnostic buffer clean No OB82/OB86/OB87 events; OB100 reports "Restart completed"
Drive status word 0x4331 (run enable, no fault, comm OK)
SFC14 reads RET_VAL = 0 for all drive slots
SFC15 writes RET_VAL = 0 for all drive slots
FB405/FC405 STATUS 0x0000 (no error) for all axes
PROFIBUS passive scan All expected slave addresses visible, no diagnostic repeater flags
OB1 scan time Within 30 % of the pre-swap value; no OB80 (time error) entries
MMC persistence Power off + power on: drive comms re-established within 2 s
ES protection CPU does not report 0x0270 (ES password) on cold restart

S7-300 Migration Best Practices

  1. Match the family: a CPU 317-2 DP (2Ax) can only be replaced with another CPU 317-2 DP (2Ax/2Bx), not with a CPU 317-2 PN/DP (2Ex/2Fx). The PN/DP CPU has a different rack footprint and HW Config will not let you place it in a 2-Ax slot without re-wiring.
  2. Match the firmware generation for STEP 7: FW 3.x requires STEP 7 V5.5 SP2 (or newer). Running STEP 7 V5.3 against a FW 3.3 CPU is technically possible for monitoring, but a download will fail with the message Target module not found in catalog.
  3. Recompile HW Config before download: never bypass this step. The SDBs are not auto-regenerated when you only replace a slot object.
  4. Document the bus profile: before the swap, print DP master system > Bus Parameters (PDF or screenshot) and keep the file with the project backup. After the swap, compare.
  5. Document the library versions: capture the version of SIMODRIVE 611U library, the FM 357 library, the CP 342-5 library, and any motion-control library, then re-import the matching version.
  6. Always use a freshly formatted MMC for the new CPU. The risk of an undocumented FW 2.1 boot record in an old MMC is the single most common reason that "the program runs from PG but does not survive a power cycle".
  7. Reserve a maintenance window: the swap can take 30 – 90 minutes including drive re-commissioning. Schedule it outside production.

CPU 317 Replacement Reference Table

The following mapping is the official Siemens answer to the question "What should you watch out for when changing from one S7-300 CPU to another?" for the 2Ax / 2Ex generation. It applies to FW 2.x and FW 3.x projects and is independent of the drive hardware.

Designation Previous order number New order number
CPU 312 6ES7312-1AD10-0AB0 6ES7312-1AE13-0AB0
CPU 312C 6ES7312-5BD01-0AB0 6ES7312-5BE03-0AB0
CPU 313C 6ES7313-5BE01-0AB0 6ES7313-5BF03-0AB0
CPU 313C-2 PtP 6ES7313-6BE01-0AB0 6ES7313-6BF03-0AB0
CPU 313C-2 DP 6ES7313-6CE01-0AB0 6ES7313-6CF03-0AB0
CPU 314 6ES7314-1AF11-0AB0 6ES7314-1AG13-0AB0
CPU 314C-2 PtP 6ES7314-6BF02-0AB0 6ES7314-6BG03-0AB0
CPU 314C-2 DP 6ES7314-6CF02-0AB0 6ES7314-6CG03-0AB0
CPU 315-2 PN/DP 6ES7315-2EG10-0AB0 6ES7315-2EH13-0AB0
CPU 317-2 PN/DP 6ES7317-2EJ10-0AB0 6ES7317-2EK13-0AB0

For full cross-references, including replacement of spare parts in plants that mix FW 2.1 and FW 3.3 CPUs, refer to the Siemens S7-300 spare-parts list (the CPU Data chapter of the SIMATIC S7-300 Automation System manual, edition 2014 or later). The most up-to-date table is published on the Siemens Industry Online Support portal under the entry "Which CPU 31x can be replaced by which successor CPU?".

FAQ

Do I need a new MMC for the new CPU 6ES7317-2AK14-0AB0, or can I keep the old one?

You can keep the old 5 V FEPROM MMC (64 KB – 8 MB), but it must be reformatted in the new CPU before the project is downloaded. A PG-to-Card write with a fresh Delete/Format step clears the FW 2.1 boot record and prevents diagnostic event 0x0251 after a power cycle.

Why do my SIMODRIVE FBs return STATUS = W#16#8090 after the CPU exchange?

0x8090 typically means a DP slave failure or a slot/length mismatch. The most likely cause is that HW Config still references the old MLFB; the SDBs have not been recompiled. Open HW Config, replace slot 2 with 6ES7317-2AK14-0AB0, Save and Compile, and re-download.

Is the CPU 317-2 DP 6ES7317-2AJ10-0AB0 a drop-in replacement for the 6ES7317-2EJ10-0AB0 (PN/DP)?

No. The 2AJ10 is a DP-only CPU and the 2EJ10 is a PN/DP CPU with a different rack footprint and different firmware family. They cannot be substituted without a hardware re-wiring and a project re-design.

Which STEP 7 version do I need to configure the FW 3.3 CPU 2AK14?

STEP 7 V5.5 Service Pack 2 or STEP 7 V5.6 is required. STEP 7 V5.3 + SP3 can be used to read/write FBs but cannot be used to compile a project that targets the 2AK14 in HW Config.

How do I decode the SIMODRIVE 611U FB STATUS word?

STATUS is a DWORD with the following layout: bits 0 – 7 = error number (1 = invalid parameter, 2 = axis not present, 3 = PKW error, 4 = PZD error, 5 = firmware version mismatch, 6 = DP slave fault); bits 8 – 15 = error class (0 = OK, 1 = warning, 2 = error, 3 = system error); bits 16 – 31 = axis number (1 – 31). Compare against the library's STATUS table for the exact value.

Back to blog