WinCC · Recipes · PLC Data Blocks · Traceability

Recipe Management in WinCC: PLC Logic, Archive Tags & Recipe Control

Create a robust recipe workflow from operator selection in WinCC to validated parameter transfer in the PLC, with versioning, permissions and archive traceability.

PLC recipe DB Validate-before-apply WinCC data records Archive & audit trail

Learning Overview

Part 1: Recipe data modelPart 2: PLC/WinCC handshakePart 3: Traceability & commissioningEstimated time: 150 minutes

Prerequisites / What You’ll Need

  • A process with defined product/batch parameter sets
  • Siemens PLC project with a dedicated recipe/staging DB
  • WinCC project with operator login and process connection
  • Approved parameter limits for every writable recipe value
Safety principle

A recipe should never bypass PLC validation. WinCC can select and transfer parameters, but the controller should decide whether the values are valid and whether the machine is in a state where the recipe may be applied.

  • Use a staging recipe area so partial writes cannot immediately change the running process.
  • Validate every parameter range and machine state in the PLC before copying to active setpoints.
  • Use an explicit Request/Ack/Reject handshake for deterministic recipe application.
  • Archive important recipe changes for batch traceability, but do not confuse archive tags with the recipe storage itself.

Practical WinCC Engineering Guide

This technical guide focuses on WinCC recipe management, PLC recipe data block and hands-on Siemens PLC / SCADA commissioning practices.

1. WinCC Recipe Architecture

A robust recipe path is WinCC Recipe/Data Record → PLC Staging DB → Validation → Apply Request → Active Process DB → Acknowledgement → Archive/Audit. This prevents an operator from changing five parameters one by one while the machine uses a half-old, half-new recipe.

2. Design the PLC Recipe Data Block

Group the parameters that belong to one product or process setup. Example members may include temperature setpoint, soak time, conveyor speed, gas/air ratio and cooling time.

// Conceptual recipe structure
RecipeID          : DINT;
ProductCode       : STRING[30];
Temp_SP_C         : REAL;
SoakTime_s        : DINT;
ConveyorSpeed_Pct : REAL;
CoolingTime_s     : DINT;

Keep parameter names and units explicit. The same logical structure should be understood by PLC, WinCC, reports and commissioning documents.

3. Separate Staging and Active Parameters

Use a staging area that receives values from WinCC and an active area that drives the process. The PLC copies staging to active only after validation and a permitted apply request.

DB_Recipe_Staging   // HMI writes here
DB_Recipe_Active    // Process logic reads here
RecipeApply_Request : BOOL
RecipeApply_Ack     : BOOL
RecipeApply_Reject  : BOOL
Avoid direct writes to running setpoints for complex recipes unless the process design specifically allows independent parameter edits.

4. Validate Recipe Values in the PLC

Validation should check parameter ranges, recipe ID, machine state and interlocks. Example SCL logic:

#RecipeValid :=
    (DB_Recipe_Staging.Temp_SP_C >= 100.0) AND
    (DB_Recipe_Staging.Temp_SP_C <= 950.0) AND
    (DB_Recipe_Staging.SoakTime_s >= 0) AND
    (DB_Recipe_Staging.SoakTime_s <= 14400) AND
    (DB_Recipe_Staging.ConveyorSpeed_Pct >= 0.0) AND
    (DB_Recipe_Staging.ConveyorSpeed_Pct <= 100.0);

IF RecipeApply_Request AND Machine_RecipeChangePermitted THEN
    IF #RecipeValid THEN
        DB_Recipe_Active := DB_Recipe_Staging;
        RecipeApply_Ack := TRUE;
        RecipeApply_Reject := FALSE;
    ELSE
        RecipeApply_Ack := FALSE;
        RecipeApply_Reject := TRUE;
    END_IF;
END_IF;

Implement pulse/reset behavior according to your program standard. The key requirement is that WinCC receives an unambiguous result.

5. Configure Recipe Data Records in WinCC

Use the recipe/data-record functionality provided by your WinCC generation to define the parameter set, operator controls and stored records. Typical operator functions are Load, Save, Save As, Delete, Transfer to PLC and Read Back from PLC.

  • Use the same parameter order and type as the PLC interface.
  • Display units and valid ranges.
  • Show recipe ID/product name prominently.
  • Separate “selected record” from “active PLC recipe”.
  • After transfer, read back the active recipe ID/status so the screen confirms what the PLC accepted.

6. Use an Apply / Acknowledge Handshake

A deterministic handshake is more reliable than assuming a multi-tag write succeeded because the HMI button was pressed.

  1. WinCC writes all staging parameters.
  2. WinCC sets RecipeApply_Request.
  3. PLC validates all values and machine state.
  4. PLC copies the complete recipe or rejects it.
  5. PLC sets Ack or Reject with an optional reason code.
  6. WinCC displays the result and clears/finishes the request sequence.

7. Archive Tags for Recipe Traceability

Archive tags are useful for answering “which recipe was active during this batch?” but the historical archive is not necessarily the recipe database itself. Archive values such as active recipe ID, product code, critical setpoints, operator ID and apply timestamp according to traceability requirements.

Archive itemReason
ActiveRecipeIDIdentify recipe used by the process
ProductCodeRelate history to production order/product
Critical setpointsVerify actual approved recipe values
Apply timestampSequence reconstruction
Operator/UserChange accountability where required

8. Permissions and Change Control

Recipe editing is a privileged operation. Operators may be allowed to select approved recipes while supervisors or engineers can create/modify data records. Use WinCC user permissions to enforce this separation and consider approval/audit requirements for regulated or quality-critical processes.

9. Recipe Commissioning Sequence

  1. Create a valid recipe and transfer it while the machine is in a permitted state.
  2. Verify every staging value in PLC online monitoring.
  3. Verify the PLC validation result and active DB copy.
  4. Read back active recipe identity to WinCC.
  5. Attempt an out-of-range parameter and confirm rejection.
  6. Attempt recipe change in a prohibited machine state.
  7. Verify archive/history records after an accepted change.
  8. Restart Runtime/PLC as allowed in the test environment and confirm required persistence behavior.

10. Troubleshooting Recipe Problems

SymptomLikely causeCheck
Some values update, others do notType/tag mapping mismatchStaging DB vs WinCC parameter mapping
Recipe button works but process unchangedNo apply handshake / PLC rejectedRequest, Ack, Reject and reason code
Wrong recipe appears activeNo read-back confirmationActive recipe ID from PLC
Recipe applies during running stateMissing machine-state permissivePLC validation and mode/state logic
No historical traceArchive tags not configuredActive ID/setpoints/user/time logging

11. Hands-On Recipe Lab

Create three product recipes with different temperature, soak time and speed values. Transfer each to a staging DB, validate in the PLC, apply only in a permitted machine state, and archive the active recipe ID and critical parameters.

WinCC Recipe + PLC Handshake Lab

Hands-on lab
Before you start
  • Use a training or test system, not a live production plant.
  • Document the starting PLC/WinCC state and expected result.
  • Verify communication and backups before applying engineering changes.
1

Create recipe model

Define staging and active recipe DBs with explicit units.

PLC and HMI use the same parameter contract.
2

Engineer validation

Add parameter bounds and machine-state permissive.

Invalid recipe is rejected deterministically.
3

Configure WinCC records

Create three recipe data records and transfer controls.

Selected record writes all staging parameters.
4

Prove traceability

Apply one recipe and archive active ID/setpoints/time.

History shows which recipe actually became active.

Frequently Asked Questions

What is recipe management in WinCC?

Recipe management stores and transfers coordinated parameter sets for products or process modes, such as temperatures, times and speeds.

Why use a PLC staging data block?

A staging DB lets WinCC transfer the complete candidate recipe before the PLC validates and copies it to the active process parameters.

Should WinCC write recipe values directly to active setpoints?

For multi-parameter recipes, a validated staging-and-apply method is safer and more deterministic than partial direct writes.

Are archive tags the same as recipe records?

No. Recipe records store parameter sets; archive tags record historical values/events for traceability and analysis.

Who should be allowed to edit recipes?

Use role-based permissions. Operators may select approved recipes while supervisors or engineers receive controlled edit/create rights as required.

Verified learning pathway

Discuss SQL Fundamentals and Automation Training

Explore practical SQL Server, PLC/SCADA integration and industrial data training options.

Content reviewed: 4 August 2026

☎ Call WhatsApp ✉ Email Enquire Now