Home
>
Products
>
PLC Programmable Logic Controller
>
The Siemens 6ES7312-1AE14-0AB0 is the CPU 312 — the entry-level standard (non-compact) CPU of the SIMATIC S7-300 family.
At its narrowest, 40mm and 270g, it is among the most physically compact S7-300 CPUs while delivering the full S7-300 instruction set, the standard MPI communication interface, and enough processing performance for the overwhelming majority of small to medium machine control and process automation tasks.
Understanding where the CPU 312 fits requires understanding the S7-300 CPU range's structure.
The family spans from compact CPUs (like the CPU 312C, which has integrated digital I/O) to standard CPUs (like this CPU 312, with no integrated I/O but full modular flexibility), to more powerful CPUs (CPU 314, 315, 317) with larger memories and integrated PROFIBUS DP interfaces.
The CPU 312 is the starting point of the standard CPU range — the choice when the task requires the modularity and engineering flexibility of the standard CPU architecture but does not require the larger memory, multi-rack capability, or additional interfaces of higher-model CPUs.
The 32KB work memory is the CPU 312's primary constraint, and it defines the applications it is suited for.
At 32KB, the CPU 312 accommodates small to medium STEP 7 programmes — those with up to several hundred programme blocks, standard PLC control logic, basic data handling, and moderate communication requirements.
It is not suited for programmes that manage large recipe tables, extensive historian buffers, or complex mathematical algorithms that generate large object code. For those applications, the CPU 314 (64KB), CPU 315-2 DP (256KB), or CPU 317-2 DP (1MB) are the appropriate choices.
| Parameter | Value |
|---|---|
| Work Memory | 32 KB |
| Interface | 1 × MPI |
| Integrated Supply | 24VDC |
| Bit Processing | 0.1 µs |
| Block Count | 1,024 max |
| Counters | 256 |
| Process Image | 128 bytes I/O |
| Expansion Racks | 1 max |
| Connections | 6 total |
| Dimensions (W×H×D) | 40×125×130mm |
| Weight | 270g |
| Status | Discontinued spare |
The CPU 312's 0.1 µs per binary instruction is the processor's fundamental execution speed metric. In practice, a typical S7-300 programme mixes binary (contact/coil) instructions, word operations, arithmetic, and communication overhead.
A programme with 1,000 binary instructions has a raw instruction execution time of 0.1ms — but the total cycle time is longer because the S7-300 operating system adds a process image update (reading all inputs, writing all outputs), communication processing, and self-test overhead to each cycle.
For a CPU 312 running a moderately sized programme in a single-rack station with standard S7-300 digital and analog modules, typical cycle times fall in the 5–15ms range depending on programme size, number of active modules, and communication traffic on the MPI interface. For the machine control applications the CPU 312 targets — conveyor sequencing, machine interlocking, simple batch processes — a 5–15ms cycle time is entirely adequate.
Process temperature loops, pressure regulation, and other slow-dynamic process variables change on a timescale of seconds to minutes, making the PLC scan cycle time irrelevant to loop performance (which is dominated by transmitter response time and valve dynamics).
Only fast mechanical processes (high-speed sorting, press control, rapid pick-and-place operations) require PLC cycle times below 5ms, and those applications are served by high-performance CPUs with significantly larger memories and dedicated interrupt processing capabilities, not the CPU 312.
The CPU 312 requires a Micro Memory Card (MMC) for programme storage — the flash-based card that serves simultaneously as load memory (storing the complete programme that is downloaded from STEP 7) and as the persistent storage mechanism that eliminates the need for a backup battery. Every time the CPU 312 powers up, it reads the programme from the MMC into work RAM and begins execution. The programme on the MMC is non-volatile — it persists through power cycles indefinitely, with Siemens specifying a minimum 10-year data retention on the MMC.
This battery-free operation is a genuine maintenance advantage over older CPU generations that required regular battery replacement to preserve the programme through power failures. A discharged or failed backup battery in an older S7-300 or S5 CPU resulted in complete programme loss at the next power interruption — a service event that could require hours of programme reload and system restart in a production environment.
The MMC architecture eliminates this failure mode entirely. The MMC is the backup — removing the MMC from a running CPU preserves the programme intact on the card, which can be carried to a programming terminal for backup or to a replacement CPU for pre-loading.
The 6-character service socket on the front of the CPU 312 accepts standard S7-300 MMCs (SIMATIC Micro Memory Cards, 6ES7953-8LXXX-0AA0 family) in capacities from 64KB to 8MB.
The CPU 312 provides a single MPI interface — no PROFIBUS DP, no PROFINET, no integrated Ethernet.
This interface limitation is the most important selection criterion: if the application requires the CPU to act as a PROFIBUS DP master (controlling remote I/O stations, drives, or instruments on a PROFIBUS network), the CPU 312 is not the right choice. A CPU with an integrated PROFIBUS DP interface (CPU 315-2 DP, CPU 317-2 DP) or the addition of a CP 342-5 communication processor would be required.
What the MPI interface does provide is:
Programming terminal access: A STEP 7 workstation connects to the CPU through a PC adapter (6ES7972-0CB20-0XA0 or USB equivalent) via the MPI port for programme download, online monitoring, and diagnostics.
HMI connection: Siemens OP and TP operator panels connect via MPI to display process data and accept operator inputs. For single-panel MES, the MPI connection is cost-effective and simple.
PLC-to-PLC communication: Multiple S7-300 CPUs can share an MPI network and exchange data through S7 basic communication (SFC 65/66 for global data) or S7 communication (SFB 8/9 BSEND/BRCV or SFB 12/13 BSEND/BRCV), enabling simple multi-controller coordination without PROFIBUS.
Global data: Up to 4 global data circles can be defined for cyclic data exchange between S7 controllers on the same MPI network — a simple mechanism for sharing status variables between PLCs without explicit communication programming.
The CPU 312's 6-connection limit (total of PG, OP, and S7 connections) constrains the number of simultaneously active MPI network participants.
In a station with one programming terminal, one HMI panel, and one S7 communication link, the connection limit is already nearly reached.
The CPU 312 supports the full STEP 7 block-based programme structure within its 1,024 block total limit.
The block types are:
OBs (Organisation Blocks): The interface between the operating system and the user programme. OB1 is the main cyclic programme. OB35 is a cyclic interrupt (100ms default). OB40 is a hardware interrupt from modules. OB82 is a diagnostic interrupt.
OB100 is the startup OB. OBs are the defined entry points through which the S7-300 operating system calls user code in response to events.
FBs (Function Blocks) and FCs (Functions): User-created reusable programme modules. FBs have associated instance data blocks that store the FB's static variables; FCs are stateless functions.
Both can be called from OBs or from other FBs/FCs to create a structured programme hierarchy.
DBs (Data Blocks): Data storage areas — shared data blocks for plant-wide variables, instance data blocks for FBs, and retentive data storage.
In a 32KB work memory, all OBs + FBs + FCs + DBs combined must fit within 32KB.
Experienced S7-300 engineers are familiar with memory budget management — the STEP 7 Online menu provides real-time work memory utilisation, and programme size targets should be established early in the project to avoid discovering the 32KB limit late in development.
Q1: The CPU 312 has no PROFIBUS DP interface. How can it communicate with PROFIBUS field devices if the application requires it?
The standard approach for adding PROFIBUS DP master capability to a CPU 312 system is to install a CP 342-5 communications processor module (6GK7342-5DA02-0XE0) in the S7-300 rack.
The CP 342-5 provides a full PROFIBUS DP master interface and operates independently of the CPU 312's MPI port. From the CPU 312's programme perspective, the CP 342-5 exchanges data with the CPU through the S7-300 backplane, and the programmer uses function calls (FC1 DP_SEND and FC2 DP_RECV from the CP 342-5 function library) to transfer data between the CPU 312's data blocks and the CP 342-5's PROFIBUS I/O image.
This approach consumes one of the CPU 312's precious 8 module slots, and the additional cost of the CP 342-5 (which exceeds the CPU 312 itself in list price) often makes it more economical to upgrade to a CPU 315-2 DP (which has PROFIBUS DP integrated) rather than adding the CP to a CPU 312 system. The CP 342-5 approach is appropriate for existing CPU 312 installations where adding PROFIBUS capability is needed but full CPU replacement is not justified.
Q2: What is the maximum number of analog and digital I/O points the CPU 312 can process in a single station, and is this limited by work memory or by the hardware?
The hardware limit is more restrictive than the memory limit for the CPU 312.
The process image size — 128 bytes for inputs and 128 bytes for outputs — determines the maximum addressable I/O: 128 bytes × 8 bits = 1,024 digital inputs (I 0.0 through I 127.7) and 1,024 digital outputs (Q 0.0 through Q 127.7), or an equivalent mix of analog and digital addressing within the same byte range.
The hardware limit is the module slot count: 8 slots in the central rack + 8 slots in the single permitted expansion rack = 16 total module positions. With 16-channel digital modules at 2 bytes each, 16 modules provide 32 bytes of digital I/O — well within the process image limit.
With 8-channel analog modules at 16 bytes each (8 channels × 2 bytes per analog word), 16 analog modules would consume 256 bytes — exceeding the process image limit. In practice, a mixed installation of digital and analog modules in a 16-slot station has no difficulty fitting within the 128-byte process image limit.
The 32KB work memory constrains programme complexity but rarely I/O addressing for the scale of installations that the CPU 312 targets.
Q3: What happens to data block retentive data when the CPU 312 loses power, and what is the role of the Micro Memory Card in data retention?
In the CPU 312's memory architecture, work RAM (32KB) is the active execution memory — it holds the running programme and all current variable values. Work RAM is volatile: it loses its contents when power is removed.
The Micro Memory Card is non-volatile Flash memory and holds only the load memory copy of the programme. Critically, data block contents — even if marked as retentive in STEP 7's data block properties — are not automatically saved to the MMC during operation.
Retentive data in the CPU 312 is preserved through brief power interruptions by a capacitor-backed circuit in the CPU (the same internal capacitor that maintains the CPU clock during power loss), but this capacitor holds data only for a limited time (typically hours at room temperature).
If the CPU is powered down long enough for the capacitor to discharge, retentive data is lost. For applications where data must survive extended power outages — production counters, batch ID numbers, accumulated totals — the programme should periodically write these values to a non-retentive data block and copy the entire data block to the MMC using SFC 84 (WRIT_DBL, Write Data Block to Load Memory).
On startup, OB100 reads the data block from the MMC using SFC 82 (CREA_DBL or similar). This explicit MMC write/read procedure provides true non-volatile storage at the cost of slightly longer startup/shutdown routines.
Q4: Can the CPU 312 be programmed with TIA Portal, or is STEP 7 V5.x required?
Primarily STEP 7 V5.5 SP1 or later (classic STEP 7, not TIA Portal) is the native programming environment for the CPU 312.
TIA Portal does not include native support for the S7-300 CPU 312 in its standard product configuration — TIA Portal's S7-300 support covers specific CPU models that Siemens has explicitly included in the TIA Portal S7-300 library, and the older CPU 312 (especially the 1AE14 hardware version) may not be fully supported.
Some engineers have used TIA Portal with the S7-300 legacy device support through HSP (Hardware Support Package) files available from Siemens Industry Online Support, but this approach should be verified against the specific TIA Portal version and the CPU 312 firmware version before committing to it for a production project.
For new projects where TIA Portal is the required engineering environment, Siemens recommends selecting an S7-300 CPU from the range explicitly supported in TIA Portal (such as CPU 315-2 PN/DP or CPU 317-2 DP in later firmware versions) or migrating to the S7-1500 platform, which is TIA Portal's primary target.
Q5: What is the recommended migration path from the CPU 312 to a current Siemens platform, and how complex is the migration?
Siemens's official recommendation for migrating from S7-300 is to the SIMATIC S7-1500 platform. For the CPU 312's typical application profile — small standalone machines, simple process control, single-rack installations — the S7-1500 CPU 1511-1 PN is the approximate functional replacement: it provides significantly more work memory (150KB), integrated PROFINET IO, faster processing (48ns binary), and TIA Portal engineering.
The migration effort is non-trivial: the STEP 7 programme must be restructured and rewritten for TIA Portal (no automated code conversion exists — STEP 7 Classic and TIA Portal use different programming paradigms and block structures, though the instruction set is largely compatible at the language level).
Hardware I/O must be redesigned (S7-300 modules are not compatible with S7-1500), and any MPI-connected HMIs must be replaced or updated to PROFINET or Ethernet connectivity.
For sites that cannot afford the engineering investment of full migration, maintaining the existing CPU 312 on STEP 7 V5.x with spare parts is a viable long-term strategy — Siemens commits to 10 years of spare parts availability post-discontinuation (to approximately 2033), and the installed base of S7-300 systems is large enough to sustain a secondary market for hardware and support expertise well beyond that timeframe.
![]()
Contact Us at Any Time