Configuring Recipes in WinCC 7.0: User Archives and PM-Control

David Krause11 min read
SCADA ConfigurationSiemensTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Overview

Recipe management in WinCC V7.0 allows operators to store, recall, and download sets of process parameters (setpoints, ramp times, limits, batch identifiers) to a SIMATIC PLC with a single operator action. Unlike WinCC Professional / Runtime Professional inside TIA Portal, WinCC V7.0 (the classic HMI/SCADA line) does not ship a dedicated "Recipes" editor out of the box. Three production-grade paths exist for storing recipe data inside WinCC 7.0:

  1. User Archives option (SQL-backed, ships as an add-on for WinCC 7.0) — the recommended approach for structured, auditable, multi-user recipes.
  2. SIMATIC PM-CONTROL option — recipe and order management for production-line environments requiring electronic signatures, audit trails, and traceability.
  3. File-based recipes using Internal / External IO Fields (CSV, TXT, or XLS) — the low-cost fallback when no option license is available.
SIMATIC BATCH 7.0 was not released for WinCC 7.0 at the time of release. If you need batch-process ISA-88 control, evaluate SIMATIC BATCH for WinCC V6.2 (legacy line) or migrate to TIA Portal with WinCC Professional / Batch Runtime.

Recipe Architecture Options in WinCC 7.0

Approach Storage Backend License Typical Use Case Auditing
User Archives SQL Server Express (bundled) WinCC User Archives option Discrete recipe sets, machine parameters Change log via archive
PM-CONTROL SQL Server, file-based orders SIMATIC PM-CONTROL option Production orders, shift recipes, traceability Full audit trail, e-signature
File-based (IO Fields + CSV/TXT/XLS) Local/network file None (standard WinCC) Small lines, single-user stations None

All three approaches expose recipe data to the PLC through WinCC tags. The PLC side reads the active record's fields via DB/area pointers or raw tag reads.

Prerequisites

  • WinCC V7.0 SP3 or later installed on the engineering station and runtime station. The exact SP must match across both stations; mismatches cause the User Archives editor and runtime behavior to drift.
  • SQL Server 2005 Express or higher bundled with WinCC V7.0 (the "WinCC V7.0" instance).
  • For User Archives: the option license activated on both ES and RT through the Automation License Manager.
  • For PM-CONTROL: the PM-CONTROL option license, plus a configured PM-CONTROL database template.
  • STEP 7 V5.4 SP5 or higher for symbol import from the PLC project (s7tgtopx / OPC export).
  • Activated WinCC Information System (start menu entry, HTML-based local help). Two relevant chapters exist:
    1. Options > User Archive — covers the editor and runtime API.
    2. Options > User Archive > User Archive Script — covers C / VBS access for PLC handshake.
  • A compiled PLC program with the DB that will receive the recipe download (DB1, DB100, etc., as required by your machine).

Method 1: User Archives Add-On Configuration

Create the User Archive

  1. Open the WinCC Explorer on the engineering station.
  2. Right-click User Archive in the navigation tree and select New User Archive.
  3. Name the archive (for example RECIPE_MACHINE_01). The name becomes the SQL table name in the CC_UserArchives_<Project>_<ArchiveName> schema.
  4. Define the columns (recipe elements) — each column maps to one WinCC tag and one PLC variable:
    Column Name Type Length PLC Tag Comment
    RecipeName CHAR 32 — Record key
    SetTemp FLOAT — DB100.DBD0 °C
    RampTime FLOAT — DB100.DBD4 s
    FlowSP FLOAT — DB100.DBD8 L/min
    Operator CHAR 16 DB100.DBB12 Login name
  5. Mark RecipeName as the primary key (right-click column → Primary Key).
  6. Save and close the editor. WinCC generates the corresponding SQL table on next runtime start.

Create Recipe Records

  1. Open the new archive and switch to the Data Records tab.
  2. Click New Data Record and enter values for RecipeName, SetTemp, RampTime, FlowSP, Operator.
  3. Repeat for each recipe (e.g., PRODUCT_A, PRODUCT_B, CLEAN_IN_PLACE).
  4. Each record becomes one selectable recipe on the runtime faceplate.

Wire the User Archive to WinCC Tags

User Archive columns cannot be dragged onto a picture as an IO field directly. You must create WinCC tags that reference the archive columns:

  1. Open the Tag Management editor and add a new internal tag group RecipeIf.
  2. Add one tag per recipe column (e.g., RecipeSetTemp, RecipeRampTime, RecipeFlowSP, RecipeNameSel).
  3. In the User Archive column properties, set Tagname to the corresponding WinCC tag (e.g., RecipeSetTemp). This binds the column to the tag.
  4. At runtime, changing a tag value updates the currently selected record's column, and vice versa.

Build the Runtime Faceplate

  1. Open a WinCC picture (Graphics Designer).
  2. Insert an User Archive Table View control (Smart Library → Controls → "UA Table").
  3. Configure the control's properties:
    • Archive name: RECIPE_MACHINE_01
    • Allow row selection: yes
    • Show toolbar: yes (gives operator Load/Save/Delete buttons for free)
  4. Insert four IO Fields bound to RecipeSetTemp, RecipeRampTime, RecipeFlowSP, RecipeNameSel.
  5. Insert a Button named Download to PLC. Configure its mouse-click event (C / VBS) to read the four tags, pack them into a raw-data buffer, and write to the configured PLC DB area.

Download Recipe to PLC via VBS

Use the WinCC VBS action attached to the Download to PLC button. Example using the HMIRuntime object and the standard S7 raw-data area pointer:

' VBS on Button "Download to PLC" Dim sName, dSetTemp, dRamp, dFlow sName = HMIRuntime.Tags("RecipeNameSel").Read dSetTemp= HMIRuntime.Tags("RecipeSetTemp").Read dRamp = HMIRuntime.Tags("RecipeRampTime").Read dFlow = HMIRuntime.Tags("RecipeFlowSP").Read HMIRuntime.Tags("PLC_DB100_SetTemp").Write dSetTemp HMIRuntime.Tags("PLC_DB100_RampTime").Write dRamp HMIRuntime.Tags("PLC_DB100_FlowSP").Write dFlow HMIRuntime.Tags("PLC_DB100_Trigger").Write 1 ' handshake bit HMIRuntime.Trace "Recipe downloaded: " & sName & vbCrLf & _ " T=" & dSetTemp & _ " r=" & dRamp & _ " q=" & dFlow & vbCrLf

Optional: Read Recipe From PLC (Upload)

If operators can edit recipe values at the HMI and want to save the live PLC values back into the archive as a new record:

  1. Add a button Save current as new recipe.
  2. Read the four PLC tags into the four WinCC tags.
  3. Append a new row to the archive via the HMIRuntime.UserArchives object — see WinCC Information System → Options → User Archive → User Archive Script for the full method list (Insert, Update, Delete, Read).
  4. Prompt the operator for a RecipeName, write it to RecipeNameSel, then call Insert.

Method 2: PM-CONTROL Option

PM-CONTROL adds order-based recipe management on top of WinCC 7.0. It is the right choice when you need: production orders tied to recipes, electronic signatures at parameter changes, full change history per record, and integration with higher-level MES / ERP.

  1. Install PM-CONTROL from the WinCC V7.0 option DVD and activate the license in ALM.
  2. Open PM-CONTROL Configuration from the WinCC start menu.
  3. Define a Unit (the physical machine) and bind it to one or more WinCC pictures.
  4. Define Recipe classes and Recipes in the PM-CONTROL editor. Recipe elements are added as typed parameters (analog, binary, string) with engineering units and limits.
  5. Define Order types (e.g., "Production", "Cleaning") and create production orders against them.
  6. Wire the PM-CONTROL Faceplate into a WinCC picture. The faceplate ships with Load/Save/Start/Pause/Stop controls and the audit log.
  7. At runtime, the operator picks an order, PM-CONTROL loads the assigned recipe values into the configured WinCC tags, and the PLC handshake is identical to Method 1.
PM-CONTROL stores recipes in its own SQL database (PM_Control) and writes a tamper-evident audit log for every value change, including operator, timestamp, old value, and new value. The audit log is mandatory in pharma (21 CFR Part 11) and food (BRC) environments.

Method 3: File-Based Recipes with IO Fields

If the User Archives option cannot be licensed, the file-based fallback uses Internal IO Fields for the recipe data and a simple file (TXT, CSV, or XLS) on disk for storage. Operators Save the current setpoint set as a file and Load a file back into the IO fields.

  1. Create four internal tags in WinCC: Rcp_SetTemp, Rcp_RampTime, Rcp_FlowSP, Rcp_Name.
  2. Add four IO Fields on a picture bound to those tags.
  3. Add a Save Recipe button — uses the WinCC file API (HMIRuntime.FileSystem in VBS, or the legacy C WriteFile / ReadFile) to write a CSV line name;T;r;q into D:\Recipes\RecipeName.csv.
  4. Add a Load Recipe button that reads the file and writes the parsed values back into the four tags.
' VBS on Button "Save Recipe" — write CSV Dim sPath, sLine sPath = "D:\Recipes\" & HMIRuntime.Tags("Rcp_Name").Read & ".csv" sLine = HMIRuntime.Tags("Rcp_Name").Read & ";" & _ HMIRuntime.Tags("Rcp_SetTemp").Read & ";" & _ HMIRuntime.Tags("Rcp_RampTime").Read & ";" & _ HMIRuntime.Tags("Rcp_FlowSP").Read HMIRuntime.FileSystem.WriteFile sPath, sLine, False

For multi-line / multi-record files use a CSV with header and parse with Split(). The Siemens support FAQ ID 71078 demonstrates the full pattern for writing and reading delimited files from WinCC 7.0 runtime: Siemens Support Entry 71078 — WinCC file I/O examples.

PLC-Side Handshake

Whichever WinCC-side method you choose, the PLC must implement the same handshake. A robust pattern (S7-300 / S7-400 / S7-1200 / S7-1500 with STEP 7 V5.x or TIA Portal):

Byte / Bit Direction Symbol Meaning
DB100.DBX0.0 HMI → PLC HMI_RecipeReady HMI has loaded new setpoints into DB100.DBB 4..n
DB100.DBX0.1 PLC → HMI PLC_RecipeAck PLC has applied the new values, safe to release HMI trigger
DB100.DBX0.2 PLC → HMI PLC_RecipeError PLC rejected (range / consistency), value is invalid
DB100.DBW2 PLC → HMI PLC_ErrorCode 16-bit error code
DB100.DBD4 HMI → PLC HMI_SetTemp REAL, °C
DB100.DBD8 HMI → PLC HMI_RampTime REAL, s
DB100.DBD12 HMI → PLC HMI_FlowSP REAL, L/min

Sequence (single edge-triggered transfer):

  1. Operator selects a recipe record in the WinCC User Archive (or file) — its values populate the four WinCC tags.
  2. Operator presses Download to PLC — VBS writes the four tags to DB100.DBD 4/8/12, then sets HMI_RecipeReady.
  3. PLC FB "ApplyRecipe" detects HMI_RecipeReady, validates ranges, copies the data into the active setpoint DB, then sets PLC_RecipeAck or PLC_RecipeError.
  4. WinCC FB / script resets HMI_RecipeReady after seeing PLC_RecipeAck. Error path writes the 16-bit code to an alarm log.

Verification

  1. Compile the WinCC project (start OS, then activate runtime).
  2. Confirm the User Archives RT component is running — open the WinCC RT diagnostic file <Project>_RT.log and look for UserArchive runtime initialized. If missing, the option is not licensed on the RT station.
  3. Open the WinCC picture with the recipe faceplate, select the PRODUCT_A record, and verify the four IO fields populate.
  4. Click Download to PLC. In STEP 7 / TIA Portal, open the online DB view for DB100 and confirm DBD4/DBD8/DBD12 hold the expected REAL values.
  5. Set a known wrong value (e.g., SetTemp = 999) in the archive, download again, and confirm PLC raises PLC_RecipeError with a non-zero PLC_ErrorCode.
  6. Verify audit log: in PM-CONTROL, check Audit Trail Viewer; in User Archives, query the UA_ChangeLog table; in file-based mode, confirm the CSV file mtime updates.

Troubleshooting

Symptom Likely Cause Fix
"User Archives" node missing in Explorer Option not installed or license missing Install WinCC V7.0 User Archives option, activate license in ALM, restart WinCC Explorer
Columns show # in runtime, no values Tag binding to archive column lost or tag name typo Re-open the archive column and re-bind to the WinCC tag; redeploy the project
SQL error on first RT start SQL Server service not running, or instance name wrong Start SQL Server (MSSQL$WINCC) service, verify instance via SQL Server Configuration Manager
Download to PLC writes zero values IO fields read from wrong tag (mixing of internal / process tags) Confirm the IO fields bind to the archive-bound tags, not to live process tags
Operator can edit records but cannot save Runtime user lacks UA write permission User Administrator → assign "Recipes: write" authorization
Recipe values appear correctly on ES but are empty on RT Archive not copied to RT project Project Duplicator / Server-Client transfer: ensure User Archives are flagged for transfer
PLC keeps PLC_RecipeError set after a valid download HMI does not reset trigger after ack Add a watchdog in the HMI script: after PLC_RecipeAck, clear HMI_RecipeReady within 500 ms
PM-CONTROL faceplate shows "No License" PM-CONTROL license on ES only Move / activate the license on the RT station as well
CSV file write fails silently Path uses drive letter not mapped on RT account Use UNC path or assign the service account a persistent drive

Backup, Restore, and Migration

  • User Archives — back up the SQL database CC_UserArchives_<Project> via SQL Server Management Studio. Restore on the new server, then re-deploy the WinCC project.
  • PM-CONTROL — use the PM-CONTROL Export/Import tool (CSV/XML) for recipes; back up the PM_Control database for orders and audit log.
  • File-based — back up the recipe directory. Be aware there is no transactional integrity; a crash mid-write can corrupt a CSV.

When migrating from WinCC 7.0 to TIA Portal / WinCC Professional (Runtime Professional), the recipe concept changes: WinCC Professional has a built-in Recipes editor and a Recipe elements tab to define recipe data records, with a direct PLC tag binding per element. See the TIA Portal Help for the exact procedure: Creating Recipe Elements and Data Records (RT Professional, TIA Portal V20). Plan a migration path for archive data — direct SQL export from the WinCC 7.0 User Archives to a CSV that the RT Professional recipe editor can import.

FAQ

Does WinCC 7.0 ship with a built-in Recipe editor like WinCC Professional?

No. WinCC V7.0 (classic) does not have a native "Recipes" editor. You must use the User Archives add-on, the PM-CONTROL option, or a file-based method with Internal / External IO Fields.

Can I run SIMATIC BATCH 7.0 against WinCC 7.0?

No. SIMATIC BATCH 7.0 was not released for WinCC 7.0. SIMATIC BATCH 7.0 was the supported pair for WinCC V6.2; if you need ISA-88 batch control on WinCC 7.0, evaluate WinCC / Batch in TIA Portal instead.

Where in the WinCC Information System is the User Archive API documented?

Open WinCC Information System → Options → User Archive for the editor and runtime model, and WinCC Information System → Options → User Archive → User Archive Script for the VBS / C scripting object model (Insert, Update, Delete, Read, ReadData).

How do I move User Archives recipes from the engineering station to the runtime station?

Use the WinCC Project Duplicator (Server-Client transfer) or a full project download with the User Archives component selected in the transfer dialog. Stand-alone copies of the archive database alone are not enough; the runtime also needs the WinCC project that references the archive name and column tags.

What is the simplest way to write a WinCC 7.0 recipe to a CSV file from runtime?

Use the VBS HMIRuntime.FileSystem.WriteFile call with a fixed or operator-entered path, formatting each tag value as a delimited string. Siemens support entry 71078 includes a complete read / write example for WinCC 7.0.

Back to blog