Overview: Multi-CPU Recipe Architectures on S7-1200
The SIMATIC S7-1200 does not have a single "recipe DB" primitive like some older controllers; recipes are constructed from Data Blocks (DB) whose structures define parameter sets (records) and recipe headers (lists). When the application involves more than one S7-1200 CPU, valves, analog I/O, and multiple HMI / PC clients, the architecture decision becomes the engineering problem, not the recipe function call.
Before writing any code, lock down four constraints:
- Authoritative copy location – where the canonical recipe dataset lives (one HMI, central PC, or PLC DB).
- Write arbitration – how concurrent edits from multiple operator stations are resolved.
- Distribution channel – how edited recipes are pushed back to all CPUs that need them.
- Degraded mode – whether the line can keep producing when the supervisor PC, HMI, or a peer CPU drops out.
The answers select between three families: HMI-centric, PLC-centric (recipe in DBs), or server-centric (WinCC Professional / OPC UA / custom .NET service). The choice of TIA Portal vs PCS 7 vs WinCC Runtime Professional follows from that decision rather than the other way around.
Recipe Data Model on S7-1200
Each recipe has two parts in every CPU that participates:
-
Recipe element DB – one DB containing the recipe header array and one or more record structures (e.g.,
"MyRecipe".Header[1..20],"MyRecipe".Element[1..50]). - Runtime DB – a working DB that mirrors the active record, written by the HMI's recipe view and read by the process code.
Typical declarations in the recipe element DB (TIA Portal, SCL):
TYPE UDT_RecipeElement :
STRUCT
name : String[32]; // e.g. "Setpoint_Temp"
unit : String[8]; // e.g. "°C"
value_min : Real; // low limit
value_max : Real; // high limit
value_def : Real; // default
value_act : Real; // active runtime value
END_STRUCT
END_TYPE
The recipe array uses an array of this UDT. Element count and naming are dictated by the largest recipe in the system. Keep the structure identical across all participating CPUs – mismatched UDTs are the single most common cause of recipe-transfer faults when commissioning.
Storage Options Compared
| Option | Location | Capacity | Multi-Client | Survives CPU Restart | Typical Use |
|---|---|---|---|---|---|
| Recipe DB in PLC | Load memory / work memory | Limited by DB size (max ~1 MB on S7-1214, larger on 1215/1217) | Read by all HMIs, write conflicts must be arbitrated | Yes if DB is non-retentive-copied to retain area; or use recipe view's retentive fields | Small line, single operator station acceptable |
| CSV in PLC file system | SIMATIC memory card (load memory) | Card size (4–32 GB); recipe CSV usually < 1 MB | Web server download/upload; one writer at a time | Yes – file is on the SD card | Mid-size, recipes backed up to plant historian |
| CSV on HMI / PC | WinCC Runtime archive or PC filesystem | Effectively unlimited | Native – all clients share the same path or central server folder | Yes | Multi-client, multi-line, recipes treated as engineering data |
| Central SQL / OPC UA | Plant server, MES | Unlimited | Native with proper rights management | Yes | Pharma, regulated environments, versioned recipes |
For the original poster's described need (multiple operator PCs and HMIs editing the same recipes, fed to multiple S7-1200 CPUs), the canonical copy almost always lives outside the PLC – on a PC or shared folder – so all HMIs read the same file and editing is centralized.
Architecture A – HMI-Centric Recipe Distribution
Recommended topology for two to five S7-1200 CPUs and two to six HMIs/PC clients on one line:
- Master operator station: one PC running WinCC Runtime Professional or a Comfort Panel designated as recipe owner. All recipe CSV files live in its project folder.
- Read-only clients: additional Comfort Panels or RT Advanced stations that only view recipes and start batches. They read CSV from the master via network share.
- S7-1200 CPUs: hold the active record in DBs and execute the process. They receive the active record from the master HMI on batch start.
Recipe flow:
- Operator edits recipe on master HMI; TIA Portal recipe view writes the change back to the master CSV.
- On batch start, master HMI downloads the active record to the target CPU's runtime DB using standard recipe view transfer (write tags from the recipe view).
- Slave CPUs receive setpoints from the master CPU over S7 communication (PUT/GET) or via shared HMI tags written to each connection.
- Master HMI logs batch results to its recipe data log.
Architecture B – PLC-Centric with Web Server Recipes
S7-1200 firmware V4.0 and later exposes recipes as CSV files via the integrated web server. The recipe CSV is uploaded or downloaded through the CPU's web page, allowing any PC on the network to act as the editor without TIA Portal being installed.
Steps to enable and use web-server recipes (per the Siemens S7-1200 manual collection):
- Activate the web server in the CPU properties ("Web server" → "Activate web server on this CPU").
- Configure users and access rights under "Web server" → "User management". The "recipes" right controls who can read/write.
- In the program, create or generate the recipe DB using
RecipeExport/RecipeImportextended instructions (libraries: "Recipes" under Extended Instructions). - Open
http://<cpu-ip>/recipesin a browser; the file browser page lists all recipe CSVs available on the load memory card. - Download a CSV, edit it offline, then upload the modified file back through the same page.
This topology suits installations where no PC is permanently online but engineers still need to update recipes remotely. It is not a true multi-client solution: only one user at a time should write a CSV, and concurrent uploads will overwrite.
Architecture C – Server-Centric (OPC UA or File Share)
For lines with regulatory audit requirements, version control, or more than ~10 concurrent recipe authors:
- Store recipes on a central SQL or file-share server.
- Use WinCC Professional's recipe system with a database backend (SQLite or MS SQL via OLE DB) so all RT clients read/write through the same dataset.
- Push the active record to each S7-1200 over S7 communication; the HMI's "Recipe view" widget can target multiple PLC connections.
- Optionally expose recipes via OPC UA: an S7-1200 firmware V4.4+ acts as OPC UA server, and a higher-level MES/ historian reads method calls or specific nodes. Reference the S7-1200 system manual for the OPC UA server configuration page.
Communication Setup: CPU-to-CPU with S7 Communication
When the master CPU must hand setpoints to slave CPUs (the "activate outputs to another CPU" requirement from the original poster), use the PUT / GET instructions or configured S7 connections:
- PUT: writes 1–212 bytes from local DB to a remote DB on partner CPU. Triggered by a one-shot on batch start.
- GET: reads the same to confirm and to fetch actual values for logging.
Connection setup in TIA Portal:
- In the master CPU's device configuration, add an "S7 connection" under "Properties → Communication → S7 connections".
- Enter the partner IP and the partner's rack/slot (always slot 1 for S7-1200).
- Place
PUTfrom "Communication → S7 Communication" with the partner connection ID, request DB, and remote target DB. - Configure PUT/GET access in the partner CPU under "Properties → Connection mechanisms → Permit access with PUT/GET from remote partner" – this must be enabled or the instruction returns error 0x80D2.
// Master CPU SCL snippet – send active recipe to slave CPU_2
#iState := PUT(
REQ := #bSendTrigger, // pulse TRUE for one cycle on batch start
ID := 1, // connection ID from S7 connection table
DONE => #bDone,
ERROR => #bErr,
STATUS => #wStatus,
ADDR_i := P#DB20.DBX0.0 BYTE 200, // local source: recipe runtime DB
ADDR_o := P#DB20.DBX0.0 BYTE 200); // remote target: same offset in partner
IF #bErr THEN
// 0x0001 = communication in progress, 0x80D2 = access denied, 0x80D4 = partner unreachable
#sFault := 'PUT fault status=' + WORD_TO_STRING(#wStatus);
END_IF;
For more than three CPUs or large datasets, configure the connections in the device view rather than relying on ad-hoc PUTs – the connection table is then checked at compile time and downloaded with the project.
Commissioning Procedure
-
Define the recipe UDT once. Lock the structure, element count, units, and limits. Document the version of the UDT (e.g.,
UDT_RecipeElement_v1.0); every CPU must be at the same version before connecting. - Create one shared TIA Portal master project containing all CPUs, all HMIs, and the recipe view. Or use a multi-project if team size demands it (TIA Portal V14+ multi-project editing).
- Configure connection rights. On every S7-1200, enable "Permit access with PUT/GET from remote partner" only if you intend to use that mechanism; otherwise keep it off and use only configured S7 connections.
-
Set the recipe storage path on the master HMI/PC. For a shared folder topology, use a UNC path, e.g.,
\\PLANT-SVR\Recipes\LineA\, and grant modify rights to the runtime service account. - Download all CPUs first, then the master HMI, then any read-only clients. Do not start recipe transfer until all are online – the recipe view will queue writes but errors during initial download are hard to interpret.
-
Verify by writing a known record to CPU_1 from the master HMI, then reading
DB20.DBD0directly via the online viewer. Repeat with a peer CPU using PUT.
Verification Checklist
| Check | Expected | How to verify |
|---|---|---|
| Recipe CSV present on master | File exists, schema matches UDT | Open CSV in Excel; column count = UDT field count |
| Runtime DB updated on batch start | Active record matches CSV row | Online & diagnostics → DB20 → monitor all |
| Peer CPU received PUT payload | Target DB equals source DB byte-for-byte | Compare DB20 on both CPUs in online view |
| Limits enforced | Recipe view rejects out-of-range entry | Enter value above value_max in HMI; expect rejection |
| Concurrent edit protection | Second editor sees lock or warning | Open recipe from two clients; only one obtains write token |
| Failure mode: PC offline | CPU continues last recipe | Pull network cable; CPU retains value_act fields and produces |
Common Faults and Fixes
| Symptom | Likely cause | Remedy |
|---|---|---|
PUT status 0x80D2
|
PUT/GET access disabled on partner | Enable "Permit access with PUT/GET" in partner CPU properties |
PUT status 0x80D4
|
Partner unreachable / wrong IP / wrong TSAP | Ping partner; verify TSAP 01.01 for S7-1200 slot 1 |
| Recipe view "element not found" | UDT version drift between CPUs | Recompile and download all PLC programs; reload HMI project |
| CSV import silently drops rows | Trailing delimiter or BOM mismatch | Export template, edit, re-import; remove UTF-8 BOM |
| Two HMIs show different recipe values | Each HMI holds its own CSV copy | Centralize storage on one master; make clients read-only |
| Web server recipe page returns 404 | Web server not activated or wrong URL path | Enable web server; browse to /recipes not /Recipe
|
| CPU goes STOP after PUT burst | PUT writing into non-existent DB on partner | Confirm DB number and length on partner; check that partner DB is non-optimized if PUT is used |
Best Practices and Field Notes
- One author per recipe at any moment. Use the HMI recipe view's "Data record is being edited" indicator (a global HMI tag) and gate write buttons on it. Without this, two operators can produce a torn write.
-
Avoid optimized DB access for PUT/GET targets. PUT and GET can only address absolute byte offsets; if the partner DB is "optimized", mark the relevant areas with the
ATview or disable optimization for that DB. - Retain the active record. Set the runtime DB fields to retentive so a CPU restart does not blank the last-known-good setpoints before the next recipe download.
- Tag names, not addresses. Configure the recipe view against symbolic tag names. This decouples the recipe from any future DB restructuring.
- Engineer the limits in the UDT. Validation belongs in the PLC where it cannot be bypassed by a thin client. The HMI should reflect limits, not enforce them.
- Version the recipes. Include a recipe version tag in the UDT header. Reject downloads on the slave CPU when version mismatches.
- Match firmware. Keep all CPUs at the same firmware major version when sharing recipes – certain OPC UA nodes and extended instruction behaviors changed between V4.2, V4.4, and V4.5 of the S7-1200.
Choosing the Right Siemens Suite
The original poster asked which Siemens suite to use. For S7-1200 + multi-PC recipe management, the practical answer is:
- TIA Portal (mandatory) for PLC and HMI engineering.
- WinCC Runtime Advanced if all clients are SIMATIC Comfort Panels or single-user PCs.
- WinCC Runtime Professional if multiple PC clients, central recipe archive, or SQL-backed logging is required.
- PCS 7 – skip for S7-1200. PCS 7 targets AS 410 / S7-400 redundant controllers. Choosing PCS 7 for an S7-1200 line is the most common wrong-direction mistake for this scenario.
References for the recipe web server workflow and integrated recipe instructions are documented in the Siemens S7-1200 system manual collection and in the support entry "Using recipes with S7-1200" (entry ID 94681612).
FAQ
Which Siemens suite should I use for S7-1200 multi-CPU recipe management?
Use TIA Portal for engineering, paired with WinCC Runtime Advanced for Comfort Panels or single PC clients, or WinCC Runtime Professional when multiple PCs need a shared, SQL-backed recipe archive. PCS 7 is intended for AS 410 / S7-400 and is not the right fit for S7-1200-based lines.
Where should recipe data be stored – in the PLC or on the PC?
For multi-client systems, store the canonical recipe on a master PC or central file share; the S7-1200 holds only the active runtime record in a DB. PLC-only storage is acceptable only for single-station machines with no concurrent editing.
How do I send an active recipe from one S7-1200 to another?
Use a configured S7 connection and the PUT instruction. Enable "Permit access with PUT/GET from remote partner" on the receiving CPU, use TSAP 01.01 for slot 1, and confirm the target DB is non-optimized because PUT works only with absolute byte offsets.
Can I edit recipes through the S7-1200 web server?
Yes. With firmware V4.0 or later, activate the web server, grant the "recipes" user right, and use the RecipeExport / RecipeImport instructions. Operators then download/upload recipe CSVs via http://<cpu-ip>/recipes, though concurrent edits from multiple browsers are not arbitrated.
Why does PUT return status 0x80D2?
Status 0x80D2 means the partner CPU is denying access. Enable "Permit access with PUT/GET from remote partner" in the partner's properties under Connection mechanisms, or use a configured S7 connection instead of ad-hoc PUT/GET.