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
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.
- WinCC writes all staging parameters.
- WinCC sets
RecipeApply_Request. - PLC validates all values and machine state.
- PLC copies the complete recipe or rejects it.
- PLC sets Ack or Reject with an optional reason code.
- 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 item | Reason |
|---|---|
| ActiveRecipeID | Identify recipe used by the process |
| ProductCode | Relate history to production order/product |
| Critical setpoints | Verify actual approved recipe values |
| Apply timestamp | Sequence reconstruction |
| Operator/User | Change 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
- Create a valid recipe and transfer it while the machine is in a permitted state.
- Verify every staging value in PLC online monitoring.
- Verify the PLC validation result and active DB copy.
- Read back active recipe identity to WinCC.
- Attempt an out-of-range parameter and confirm rejection.
- Attempt recipe change in a prohibited machine state.
- Verify archive/history records after an accepted change.
- Restart Runtime/PLC as allowed in the test environment and confirm required persistence behavior.
10. Troubleshooting Recipe Problems
| Symptom | Likely cause | Check |
|---|---|---|
| Some values update, others do not | Type/tag mapping mismatch | Staging DB vs WinCC parameter mapping |
| Recipe button works but process unchanged | No apply handshake / PLC rejected | Request, Ack, Reject and reason code |
| Wrong recipe appears active | No read-back confirmation | Active recipe ID from PLC |
| Recipe applies during running state | Missing machine-state permissive | PLC validation and mode/state logic |
| No historical trace | Archive tags not configured | Active 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- 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.
Create recipe model
Define staging and active recipe DBs with explicit units.
Engineer validation
Add parameter bounds and machine-state permissive.
Configure WinCC records
Create three recipe data records and transfer controls.
Prove traceability
Apply one recipe and archive active ID/setpoints/time.
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.
