Home
>
Products
>
PLC Programmable Logic Controller
>
The Siemens 6ES7312-5BF04-0AB0 is the SIMATIC S7-300 CPU 312C — Siemens's compact PLC solution that packs a PLC processor, integrated digital I/O, high-speed counter inputs, and a power supply input into a single 80mm-wide module.
For machine designers building cost-effective control panels where panel space is limited and the I/O count is modest, the 312C changes the calculus of system architecture. Instead of a CPU module plus a separate digital input module plus a separate digital output module, three modules shrink to one.
The wiring effort shrinks, the mounting rail space shrinks, and the system cost shrinks.
The "C" in CPU 312C is the key — it stands for Compact, differentiating this series from the standard (non-integrated) S7-300 CPUs that have no built-in I/O. All the C-series S7-300 CPUs follow the same approach: processor capability matched to the application scale, with just enough integrated I/O to handle the most common direct connections without requiring additional modules.
The 312C's 10+6 I/O complement covers the needs of small machines with a handful of sensors, pushbuttons, limit switches, and digital actuators — all connected directly to the CPU module itself — while the MPI interface and the ability to expand with additional signal modules handles anything more complex.
The two high-speed counter inputs extend the 312C's practical range into applications that regular digital inputs cannot serve.
Pulse outputs from encoders, proximity switches counting machine cycles, flow meters generating pulse trains — all generate signals that switch too rapidly for the CPU's normal 100ms input filter and scan cycle to capture accurately.
The 312C's HSC inputs operate independently of the scan cycle at up to 10kHz, counting pulses accurately regardless of the PLC's program execution time.
| Parameter | Value |
|---|---|
| Digital Inputs | 10 × 24VDC |
| Digital Outputs | 6 × 24VDC transistor |
| High-Speed Counters | 2 × (10kHz) |
| Work Memory | 64 KB |
| Supply Voltage | 24VDC (19.2–28.8V) |
| MPI Interface | 1 × (187.5kbps – 12Mbps) |
| Binary Execution | 0.1ms per 1K instructions |
| Dimensions (W×H×D) | 80×125×130mm |
| Required Accessories | 40-pole front connector + MMC |
| Status | Phase-out |
The CPU 312C requires a Micro Memory Card (MMC) for program storage, and this requirement is not optional. Unlike older S7-300 CPUs that had an integrated EPROM or battery-backed RAM for program retention, the CPU 312C and all later-generation S7-300 CPUs store their programs on the Micro Memory Card — a small Flash-based card that slots into the CPU's front panel.
The MMC serves two functions: it stores the user program (the STEP 7 OB/FC/FB/DB structure) persistently without requiring battery backup, and it carries the CPU's firmware (the operating system).
When power is applied to a CPU 312C that contains an MMC with a valid program, the CPU copies the program from the MMC into work memory and begins execution — no battery, no loading from a programming device needed after the initial program download.
The operational implications are significant.
An MMC with a complete program can be moved from a running CPU to an identical replacement CPU, and the replacement takes over the program without any additional programming steps. For machine builders who ship many identical machines, this means one MMC copy serves as the backup for an entire fleet — if a CPU fails in the field, the replacement is pre-loaded from the backup MMC in minutes.
The MMC is not included with the CPU 312C and must be ordered separately. Common capacities are 64KB, 128KB, 512KB, 2MB, and 4MB — the 64KB card covers small programs, while larger cards allow storage of additional data such as recipes, historical trends, and documentation.
The CPU 312C's two integrated high-speed counter inputs use dedicated hardware counters that operate asynchronously to the PLC scan cycle. This hardware counting ensures that no pulses are missed regardless of how busy the CPU's program execution is at any moment — a critical requirement for encoder-based length measurement, batch counting, and flow measurement.
At 10kHz maximum frequency, the HSC inputs can count pulses that arrive every 100 microseconds.
This corresponds, for example, to an encoder producing 10,000 pulses per revolution on a shaft running at 60 RPM — a reasonable specification for a measuring wheel or position encoder on a slow-moving conveyor.
For faster shafts or higher-resolution encoders, the 10kHz limit becomes a constraint and a faster counter (available in function modules like the FM 350) would be needed.
The counters can operate in several modes configurable through STEP 7: simple up-counting (accumulates pulses from an event), up/down counting (direction-controlled by a second input), frequency measurement (counts pulses over a defined gate time and reports frequency), and period measurement. Each mode serves different measurement applications.
The MPI (Multi-Point Interface) on the CPU 312C is a cost-effective but capable communication interface that handles the CPU's essential networking needs:
Programming access: A STEP 7 programming terminal connects to the CPU's MPI port through a PC adapter (USB or RS232) for program download, upload, online monitoring, and diagnostics. This is the most basic and universally required use of the MPI port.
HMI connection: Siemens OP (Operator Panel) and TP (Touch Panel) HMI devices connect to the CPU 312C via MPI to display process data and accept operator inputs. The MPI connection is simpler and lower-cost than PROFIBUS for single HMI-to-CPU connections.
PLC-to-PLC communication: Multiple S7-300 or S7-400 PLCs can share an MPI network, exchanging data through S7 communication (PUT/GET services).
This is an alternative to PROFIBUS for small networks where PROFIBUS's higher speed and larger node count are not needed.
The MPI interface does not support PROFIBUS DP master or slave operation — for PROFIBUS connectivity, the CPU 312C would require an additional CP 342-5 communication processor module.
This is a meaningful distinction when specifying the system: if PROFIBUS DP slave connection to a higher-level controller is required, the CPU 312C's MPI-only interface must be supplemented.
Q1: The CPU 312C has 10 digital inputs and 6 digital outputs built in. Can more I/O be added, and how?
Yes. The integrated I/O is supplemented by installing S7-300 signal modules (SM series) on the same mounting rail as the CPU.
Standard S7-300 digital and analog signal modules — SM 321 digital inputs, SM 322 digital outputs, SM 323 combined DI/DQ, SM 331/332 analog I/O — all connect to the CPU through the S7-300 backplane bus. The CPU 312C supports one expansion rack via an IM 365 interface module pair if additional mounting rail space is needed.
The total I/O capacity of the system is constrained by the number of module slots available and the CPU's I/O addressing range.
Q2: What is the difference between the CPU 312C and the (non-compact) CPU 312, and when should each be selected?
The CPU 312 (non-compact) has no integrated I/O — it is a pure CPU module that only provides the MPI interface and the connection to signal modules on the backplane. Its advantage is flexibility: every slot can be freely assigned to the required module type, with no fixed I/O.
The CPU 312C includes 10 DI and 6 DQ and the two HSCs, which are always present.
If a machine needs exactly or approximately 10 DI and 6 DQ plus high-speed counters, the 312C delivers those without needing additional modules.
If a machine needs primarily analog I/O or a very different DI/DQ ratio, the fixed I/O of the 312C provides less flexibility, and the non-compact CPU with freely selected signal modules may be the better configuration.
Q3: Can the CPU 312C's digital outputs directly drive 24VDC coil contactors and solenoid valves?
The CPU 312C's integrated digital outputs are 24VDC transistor type, rated for 24VDC loads. Each output can source the current required to drive standard 24VDC relay coils (typically 50–200mA) and 24VDC solenoid valve pilots (100–300mA) directly, provided the load current per output is within the specified rating.
For larger loads (main motor contactors with 24V coils, larger solenoids) or AC loads (coils operated at 230VAC), interposing relays must be used.
The CPU's output current per channel and the total module current should be verified against the connected loads during the design phase.
Q4: Does the CPU 312C support PROFIBUS DP, and if so, in what role?
The CPU 312C's MPI interface does not support PROFIBUS DP. If PROFIBUS DP connectivity is required — either for the CPU to act as a DP master controlling remote I/O, or for the CPU to act as a DP slave connected to a higher-level controller — an external communication processor module (CP 342-5 for DP master, or CP 342-5 FO for fibre-optic PROFIBUS) must be installed on the mounting rail alongside the CPU.
For new designs where PROFIBUS connectivity is a requirement, a CPU with an integrated PROFIBUS DP interface (such as the CPU 314C-2 DP) avoids the need for an additional CP module.
Q5: What is the recommended migration path from the CPU 312C to a current Siemens platform?
Siemens recommends the SIMATIC S7-1500 series as the successor platform for the S7-300, including the compact CPU variants. The CPU 1511C-1 PN or CPU 1512C-1 PN (from the S7-1500 compact series) provide comparable integrated I/O functionality with significantly improved performance, native PROFINET IO, extended work memory, and TIA Portal engineering.
The migration requires rewriting the STEP 7 program in TIA Portal — no automated direct conversion exists — but Siemens provides migration support tools in TIA Portal that can assist in restructuring and adapting legacy programs.
For machines that must remain on S7-300 for legacy compatibility reasons, Siemens spare parts support continues for ten years after the product phase-out date.
![]()
Contact Us at Any Time