Overview
Migrating from a SIMATIC S7-300 CPU 312C to a CPU 314C-2PN/DP (MLFB 6ES7 314-6EH04-0AB0) is the typical compact-to-compact upgrade path when a plant needs additional technology channels (counting, frequency measurement, PWM), integrated analog I/O, and PROFINET connectivity without expanding the rack. The migration is more involved than a drop-in swap because the integrated digital I/O addresses move from the 124.x area to 136.x, the analog I/O defaults to the 752.x area, and the primary communication port changes from MPI/DP to PROFINET with a parallel PROFIBUS DP interface.
This reference walks through a STEP 7 V5.x migration that preserves your existing program logic, remaps every on-board I/O bit using the Rewire function, converts the HMI link from MPI to PROFINET, and verifies the new hardware end-to-end. The same procedure applies if you instead choose to bring the project into the TIA Portal using the official migration tool.
Prerequisites and Engineering Environment
Verify the following items before opening the project for editing:
| Item | Requirement | Notes |
|---|---|---|
| STEP 7 (SIMATIC Manager) | V5.5 SP2 or later | Required for HSP support of 6ES7 314-6EH04-0AB0 |
| Hardware Support Package (HSP) | HSP 0213 / 0225 or current | Adds the 314C-2PN/DP variants to HW Config |
| CPU firmware | V3.3.x or higher | Matches the latest STEP 7 V5.6 catalog |
| S7-PCT (PROFINET Commissioning Tool) | V3.x or later | Required for assigning PROFINET device names to the CPU port |
| HMI engineering tool | WinCC flexible 2008 SP5 or TIA Portal V13+ | Must match the HMI panel generation in service |
| Network access | TCP/IP to PROFINET subnet | Static IP recommended for the CPU |
| PG/PC interface | Industrial Ethernet TCP/IP or PROFIBUS DP | DP cable can still load the project as a fallback |
| Project backup | Two independent archives (.arc / .zip) | One local, one network share |
Refer to the SIMATIC S7-300 CPU 31xC and CPU 31x: Technical specifications manual on Siemens Industry Online Support (entry ID 12996906) for the authoritative list of firmware versions and HSP requirements: S7-300 CPU 31xC manual.
Source and Target CPU Comparison
The CPU 312C and the CPU 314C-2PN/DP share the S7-300 compact footprint and the technology function library, but differ significantly in integrated I/O count, address area, and interface mix.
| Parameter | CPU 312C (6ES7 312-5BF04-0AB0) | CPU 314C-2PN/DP (6ES7 314-6EH04-0AB0) |
|---|---|---|
| Work memory (code / data) | 32 KB / 32 KB | 192 KB / 192 KB |
| Bit memory | 256 bytes | 256 bytes |
| Integrated digital inputs | 10 (I 124.0 – I 125.1) | 24 (I 136.0 – I 137.7) |
| Integrated digital outputs | 6 (Q 124.0 – Q 124.5) | 16 (Q 136.0 – Q 137.7) |
| Integrated analog inputs | None | 5 channels (PIW 752 – PIW 765; ch4 reserved for RTD/NI1000) |
| Integrated analog outputs | None | 2 channels (PQW 752 – PQW 755) |
| Counting channels (24 V incremental) | 2 | 4 |
| Frequency measurement channels | 2 | 4 |
| PWM output channels | 2 | 4 |
| Pulse output / PTO channels | 2 | 4 (or stepper via technology object) |
| Communication interfaces | MPI / PROFIBUS DP master | PROFINET 2-port switch (X1) + PROFIBUS DP master/slave (X2) |
| PROFINET IO controller | No | Yes (IRT/IRTflex, MRP, port diagnostics) |
| Default IP address | None (MPI only) | 0.0.0.0 (must be assigned before PROFINET use) |
| Onboard Web server | No | Yes (read-only diagnostics) |
| OB 1 cycle time (typical, empty) | ~5 ms | ~3 ms |
| SFB 47 / 48 / 49 technology channels | 2 each | 4 each |
The two rows that drive the migration procedure are the integrated I/O address areas and the communication interfaces. The Rewire operation in HW Config exists precisely to redirect every symbolic and absolute reference to the new address space.
Integrated I/O Address Map (Why Rewire Is Mandatory)
The on-board I/O addresses are allocated by STEP 7 from a base area that depends on the CPU MLFB. If the old project used absolute addresses (I 124.0, Q 124.5) the compiled program still references them after the CPU swap. Without rewiring, the program runs, but every input reads 0 and every output stays off because the physical terminals are wired to a completely different byte.
| Channel | CPU 312C default address | CPU 314C-2PN/DP default address | Migration action |
|---|---|---|---|
| Digital inputs DI0..DI9 | I 124.0 – I 125.1 | I 136.0 – I 137.7 (only first 10 used) | Rewire 124.x → 136.x |
| Digital outputs DO0..DO5 | Q 124.0 – Q 124.5 | Q 136.0 – Q 136.5 | Rewire 124.x → 136.x |
| Spare digital inputs DI10..DI23 | n/a | I 136.6 – I 137.7 | No rewire needed; new channels available |
| Spare digital outputs DO6..DO15 | n/a | Q 136.6 – Q 137.7 | No rewire needed; new channels available |
| Analog inputs AI0..AI3 | n/a | PIW 752 – PIW 758 | No rewire (no source references) |
| Analog input AI4 (RTD) | n/a | PIW 760 | Configure as Pt100 / NI1000 / off |
| Analog outputs AO0..AO1 | n/a | PQW 752 – PQW 754 | No rewire (no source references) |
The Rewire function in STEP 7 V5.x is invoked from HW Config with the new CPU selected: Options → Rewire. The dialog accepts a From / To byte range; for this migration enter 124 → 136 with a length of 2 bytes for digital I/O. STEP 7 updates every reference inside the project, including DB initial values, FC/FB parameter defaults, and the symbol table comments.
Pre-Migration Safety and Backup Procedure
- Bring the machine to a safe state per lockout-tagout procedure before opening the cabinet.
- Document every wired terminal of the existing CPU 312C: DI 124.0..124.7, DO 124.0..124.3, MPI cable pinout, 24 V sensor supply, and ground.
- Connect the PG (programming device) to the existing MPI network and go online to the CPU 312C.
- Read the project back from the PLC (PLC → Upload to PG) and save as a separate file. This captures any online-only changes.
- Open the original STEP 7 project and immediately File → Archive. Repeat to a second location.
- Power down, label and remove the CPU 312C, install the 314C-2PN/DP in the same slot, and verify the backplane bus connector is fully seated.
- Power up and verify the CPU enters STOP with no SF LED. If the SF LED is on, the backplane connection is suspect; re-seat before proceeding.
Step-by-Step Migration in STEP 7 V5.x
Step 1 - Replace the CPU in HW Config
- Open the STEP 7 project and double-click HW Config in the project tree.
- Click the CPU 312C slot to select it, then right-click → Change Module (or Delete and drag from the catalog).
- In the catalog tree, browse to SIMATIC 300 → CPU-300 → CPU 314C-2PN/DP → 6ES7 314-6EH04-0AB0 and drag the new CPU into slot 2.
- When prompted, accept any Hardware Support Package (HSP) update.
- Save the hardware configuration (Station → Save).
Step 2 - First Compile to Identify Address Conflicts
- Choose Station → Save and Compile. Do not download.
- Open the compile log. Capture every warning to a text file for review.
- Expect warnings in two categories: (a) "Address area differs" warnings on integrated digital I/O, and (b) warnings on technology object assignments.
Step 3 - Rewire the On-Board Digital I/O
- With the CPU 314C-2PN/DP selected in HW Config, choose Options → Rewire.
- Build the substitution table:
- Old range 124 to 136, length 2 bytes (covers DI 124.x and DO 124.x of the 312C)
- Confirm the operation. STEP 7 prints a summary of every symbol and block reference changed.
- Save and re-compile HW Config.
Step 4 - Reconfigure the PROFINET Interface
- In HW Config, double-click the PROFINET interface X1 of the new CPU.
- Open Properties → Ethernet Address → IP Address and assign a static IP, for example 192.168.0.10 with subnet mask 255.255.255.0.
- Confirm that no PROFINET IO system has been assigned to the X1 port yet.
- If the CPU participates in an IO system, assign the PROFINET device name (for example
cpu314c-1) using S7-PCT.
Step 5 - Convert the HMI Connection from MPI to PROFINET
- Open NetPro from HW Config (button on the toolbar).
- Locate the S7 connection between the CPU and the HMI station.
- Right-click the connection → Connection Properties → Interface: PROFINET (Industrial Ethernet).
- Update the partner IP to the CPU's new IP address.
- Save and compile NetPro. The download-ready flag must turn green.
- Open the HMI project (WinCC flexible or TIA Portal), change the connection type from MPI/DP to Ethernet, and enter the new CPU IP.
- If the HMI project was created in WinCC flexible, transfer it to the panel before further work.
Step 6 - Reassign Technology Object Instance DBs
- Return to HW Config and double-click the CPU 314C-2PN/DP.
- Open the Technology tab. The 312C had 2 counters at channels 0 and 1; the 314C exposes 4.
- Re-enable the two original counters (Channels 0 and 1) with the same configuration (24 V, single-ended, no inversion).
- Enable channels 2 and 3 only if the program will reference them.
- For PWM or frequency measurement, repeat the same enable and verify the SFB 47 / SFB 48 / SFB 49 instance DBs match.
Step 7 - Configure Analog Inputs and Outputs
- In the CPU Properties dialog, switch to the Analog Inputs tab.
- For each of channels AI0..AI3, set the measurement type: 0..10 V, ±10 V, 0..20 mA, or 4..20 mA as wired.
- For AI4, set to RTD (Pt100 or NI1000) or to disabled if not used.
- Set the integration time (default 60 Hz / 50 Hz rejection).
- Open the Analog Outputs tab and configure AO0, AO1 as 0..10 V or 0/4..20 mA.
Step 8 - Compile, Download, and Go Online
- Save and compile HW Config one last time. Verify zero "Address area differs" warnings on the integrated channels.
- Select the CPU in HW Config and click Download. STEP 7 will first use the MPI/DP interface to load the project; switch the PG/PC interface to TCP/IP and re-download to verify the PROFINET path.
- Place the CPU in RUN. The SF, BF, and MAINT LEDs must be off. PROFINET port LEDs (Link and Activity) must be lit at the HMI end.
HMI and PROFINET Cutover Details
The HMI link is the most failure-prone part of the migration because the operator panel often retains its old project and the wrong connection type. Apply the following steps in order:
- Verify the HMI panel IP and subnet match the CPU. The default Comfort panel address is 192.168.0.10; the CPU must use a different address in the same /24 subnet.
- In the HMI project, set the connection to "SIMATIC S7 300/400 over Ethernet."
- Enter the CPU's PROFINET IP exactly; do not rely on name resolution.
- Compile the HMI project and transfer it to the panel.
- On the panel, open Control Panel → Network and verify the panel IP and subnet.
- Start the runtime. The connection icon must turn green.
If the icon stays red, ping the CPU from the PG: ping 192.168.0.10. A reply confirms Layer 3; if it fails, check the switch port VLAN, the cable, and whether the CPU's PROFINET interface has been enabled in HW Config.
Technology Function Migration
The 312C technology functions and the 314C-2PN/DP technology functions use the same SFBs (SFB 47 counting, SFB 48 frequency, SFB 49 PWM) but the channel numbering starts fresh. The migration procedure is:
| Function | 312C channel → instance DB | 314C channel → instance DB | Action |
|---|---|---|---|
| Counter 24 V | Ch0 → DB1000, Ch1 → DB1001 | Ch0 → DB1000, Ch1 → DB1001 (same name, new channel base) | Re-enable channels in CPU Properties; instance DBs auto-created |
| Frequency measurement | Ch0 → DB2000 | Ch0 → DB2000 | Verify SFB 48 call parameter LADDR |
| PWM output | Ch0 → DB3000 | Ch0 → DB3000 | Verify pulse width and period |
| PTO / pulse train | Not present on 312C | Ch0..Ch3 (new) | Add only if needed |
Open the technology DB and confirm the symbolic I/O field assigned to LADDR matches the new base address. The 314C-2PN/DP base addresses for the technology channels are visible under CPU Properties → Addresses.
Compile Warning Catalog and Resolution
| Warning text | Cause | Resolution |
|---|---|---|
| "Address area differs: I/O of the module differs" | Old on-board 124.x not rewired | Run Options → Rewire with range 124 → 136 |
| "No usable hardware interrupt assigned" | Old HW interrupt OBs reference 124.x hardware | Open OB 40 / OB 41 and reassign to 136.x event sources |
| "Technology object configuration not portable" | Channel count changed (2 → 4) | Re-enable channels in Technology tab; delete obsolete instance DBs |
| "Symbol table contains unresolved references" | Symbols point to old addresses | After Rewire, re-open symbol table and verify |
| "Network node cannot be reached" | PROFINET not configured | Assign IP in CPU Properties → Ethernet Address |
| "Connection to partner could not be established" | HMI still configured for MPI | Reconfigure HMI connection to Ethernet |
Verification Procedure
Once the project is downloaded and the CPU is in RUN, validate the migration with the following sequence:
- Online → Accessible Nodes: confirm the 314C-2PN/DP appears with its PROFINET IP.
- Open OB 1 in online / monitor mode and verify every formerly 124.x bit reflects the corresponding 136.x bit.
- In the VAT table
VAT_Inputs, force one input at a time at the field end and read it back at I 136.0..137.7. - For each output Q 136.0..Q 137.7, use Force to energise and verify the field load.
- Run a counter test: feed a 1 kHz pulse to the first counter and verify the technology DB value increments.
- For PWM: set a 50% duty cycle at 1 kHz on the first PWM channel and observe with an oscilloscope.
- Apply a known analog signal (e.g., 5 V from a calibrator) to AI0 and verify PIW 752 reports 50% of the configured range.
- Drive AO0 from the program to 50% and verify the field device responds.
- Confirm the HMI panel shows live values for at least 10 different tags.
Troubleshooting Matrix
| Symptom | Likely cause | Remedy |
|---|---|---|
| CPU in STOP, SF LED on | Hardware interrupt OB missing for new channel | Insert OB 82 (diagnostic interrupt), OB 122 (time-error) |
| HMI shows "Connection failed" | Wrong CPU IP, wrong subnet, or wrong connection type | Ping from PG; verify panel IP; change connection to Ethernet |
| Output does not energise | Old 124.x address still referenced in FB | Cross-reference search for byte 124 in the program editor |
| Counter stuck at zero | Encoder voltage (24 V vs 5 V) wrong | CPU Properties → Counting → Input voltage → 24 V incremental |
| Analog saturated at 32767 | Current loop wired, voltage range configured | Reconfigure channel to 4..20 mA in CPU Properties → Analog Inputs |
| Rewire does nothing | Compile done before Rewire | Save after Rewire, then re-compile HW Config |
| BF1 or BF2 LED flashing | PROFINET cable disconnected or wrong partner port | Check both patch cords; verify S7-PCT device name assignment |
| PROFINET IO device not reachable | Device name not assigned or not in topology | Open S7-PCT, assign the device name to the correct port |
| CPU goes to STOP during download | Firmware mismatch between HSP and physical CPU | Update firmware via SIMATIC Automation Tool |
| Rewire swapped DI and DO incorrectly | Rewire applied to a length that crosses the DI/DO boundary | Split Rewire into two passes: inputs only, then outputs only |
Migrating to TIA Portal as an Alternative Path
Many plants are in the process of moving projects from STEP 7 V5.x to the TIA Portal. The same Rewire principle applies, but the tooling is different. To bring a STEP 7 project into the TIA Portal:
- Open the TIA Portal and choose Migrate Project from the start screen.
- Select the STEP 7 archive (.zip) and enable the "Include HW and Network data during the migration" option. See the official guide at Creating a migration file.
- After migration, the project will appear in the TIA Portal with the 312C hardware. Replace the CPU with the 314C-2PN/DP and accept the address remap wizard.
- Use the TIA Portal "Rewire" function in the device view to migrate the integrated I/O addresses.
- Recompile and download.
The official Siemens migration guide is at Migration of projects with the TIA Portal. For background on the broader Siemens migration service offering, see Migration for Automation Systems.
Commissioning Checklist
| Check | Pass criteria |
|---|---|
| Compile log | Zero "Address area differs" warnings on integrated I/O |
| CPU status | RUN, no SF, no BF, no MAINT |
| On-board DI scan | Every input toggling in VAT table |
| On-board DO test | Forcing each output lights the field load |
| PROFINET link | Both ports link up; partner reachable by ping |
| HMI connection | Tag polling, status = connected |
| Counter/PWM | Frequency pulse visible on oscilloscope |
| Analog readback | Engineering units match field sensor with calibrated offset |
| PROFIBUS DP (if used) | Slaves in cyclic data exchange, no diagnostic interrupt |
| Backup of new project | Archived and stored in version control |
Long-Term Maintenance Notes
After the migration is in production, document the following for the maintenance crew:
- CPU MLFB and firmware version (6ES7 314-6EH04-0AB0, firmware V3.3.x or later).
- Updated I/O address map: digital at 136.x, analog at 752.x.
- Static IP address of the PROFINET interface.
- Device name of the CPU on the PROFINET IO system.
- Mapping table for every tag renamed by the Rewire (124.x → 136.x).
- Backup archive name and location of the migrated STEP 7 project.
- HMI project archive (if migrated).
FAQ
Do I have to rewrite my S7 program when migrating from CPU 312C to CPU 314C-2PN/DP?
No. The STL, LAD, FBD, or SCL source compiles unchanged as long as the integrated I/O addresses are rewired and the technology instance DBs are reassigned to match the new channel count (4 counters on the 314C vs 2 on the 312C).
Why does STEP 7 issue an "Address area differs" warning after I swap the CPU?
The CPU 312C places its on-board DI/DO in the default 124.x address area, while the CPU 314C-2PN/DP reserves 136.x for digital and 752.x for analog. STEP 7 warns because absolute addresses in your program no longer match the hardware. Resolve by running Options → Rewire in HW Config with range 124 → 136.
Can I keep the MPI cable to the HMI and only swap the CPU?
No. The CPU 314C-2EH04 has only one DP interface (PROFIBUS) and one PROFINET interface (X1, 2-port switch). MPI is not supported on this CPU. Reconfigure the HMI connection to PROFINET (Industrial Ethernet) and assign a static IP address to the CPU.
How many analog inputs and outputs does the 6ES7 314-6EH04-0AB0 provide?
The CPU 314C-2PN/DP with order number 6ES7 314-6EH04-0AB0 ships with 4 fast analog inputs + 1 RTD/NI1000 channel (PIW 752 – PIW 765) and 2 analog outputs (PQW 752 – PQW 755). Default measurement range is ±10 V; reconfigure each channel for current or RTD in the CPU Properties.
Where can I get the official address map for the integrated I/O of the 314C-2PN/DP?
The authoritative address map is in the SIMATIC S7-300 CPU 31xC and CPU 31x: Technical specifications manual on Siemens Industry Online Support (entry ID 12996906). Always verify the exact firmware version before committing addresses to wiring diagrams.