WinCC V7.0 Recipe Management: User Archives vs DB Approach

David Krause18 min read
SiemensTechnical ReferenceWinCC
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 Siemens WinCC V7.0 (including SP2, SP3 and SP4) is not delivered as a single configurable object the way that recipe elements are exposed in WinCC Flexible, TIA Portal, or WinCC RT Professional. Engineers building on a WinCC V7.0 runtime must assemble recipe capability from one of three patterns: the optional User Archives package, a controller-side STEP7 DB-based scheme that uses SFC20 BLKMOV to copy recipe data into an active data block, or a migration to a platform with a built-in recipe editor. Each approach has a different footprint in terms of licensing, programming effort, scalability, runtime user-friendliness, and migration risk.

This reference consolidates the engineering trade-offs of each option, documents the SFC20 block-copy pattern in detail, lists the licensing exposure for User Archives, and includes a known-issues matrix that addresses the User Archive Control crash and User Archive editor usability problems observed on WinCC V7.0 SP2 and later. Where a project is greenfield, the article also maps the migration path to WinCC RT Professional recipe functions for engineers who want a fully integrated recipe object.

Engineer field-note: WinCC V7.0 is end of life for mainstream support. For new projects, prefer WinCC Unified or TIA Portal-based WinCC RT Professional. The patterns in this article remain valid for brownfield support contracts and for migrating recipes out of a WinCC V7.0 system.

Recipe Management Options in WinCC V7.0

WinCC V7.0 is delivered with three primitives that can be combined into a recipe system, plus two alternative platforms that already include a recipe object.

WinCC User Archives (option package)

User Archives (UA) is a separately licensed WinCC option that exposes a table editor in the WinCC Explorer and a runtime control that can be dropped onto a process picture. Recipes are stored as rows in a SQL Server table; the data is held in the runtime database and read into the PLC on demand through tags or scripts. The UA control gives operators a tabular view with add, edit, delete, and import/export (CSV) capabilities. The package was designed for recipes but its UI was never re-engineered for large recipe sets, and it shows its age on V7.0.

STEP7 DB-based recipe scheme

All recipe data is stored in STEP7 data blocks on the S7 controller. Each recipe is its own DB; a dedicated "active recipe" DB holds the recipe currently being executed. A small piece of STEP7 logic uses SFC20 BLKMOV to copy the entire contents of a selected recipe DB into the active recipe DB. Editing is performed in a separate "edit" DB that the operator's recipe screen writes to, with a "Save to recipe N" action that copies the edit DB back into the chosen recipe DB using SFC20 in the reverse direction. This pattern uses no additional WinCC option and scales well for small to medium recipe counts (less than 50 in practice).

Migration to WinCC Flexible / WinCC RT Professional

WinCC Flexible (for Comfort Panels, TP/OP panels, and Mobile Panels) and WinCC RT Professional (the TIA Portal based PC runtime) include a built-in Recipe object with a configurable editor, transfer list, recipe view control, and tag binding. The runtime recipe element is part of the base engineering environment and does not require an additional option. Existing WinCC V7.0 systems cannot host the new recipe element; migration requires moving the project to TIA Portal and re-engineering the HMI portion.

Recipe capability matrix — WinCC V7.0 vs WinCC Flexible vs WinCC RT Professional
Capability WinCC V7.0 — User Archives WinCC V7.0 — STEP7 DB WinCC Flexible WinCC RT Professional
Built-in recipe object No (option package) No (engineering effort) Yes Yes
Additional license Yes (User Archives option) No No No
Storage location SQL Server (WinCC runtime DB) S7 data blocks Internal flash / CSV file SQLite / file / PLC tags
Operator edit UI UA Control grid Custom (HMI tags + screen) Recipe view control Recipe view control
Recommended recipe count 100+ Less than 50 Less than 200 (panel-dependent) 1000+
PLC coupling Tags / VBS scripts Direct via SFC20 Tag binding / area pointer Tag binding / VBS
CSV import/export Built into UA control Custom (WinCC script) Yes Yes
Audit trail / version control No native No native No native Yes (with logging)

WinCC User Archives: Architecture and Constraints

User Archives is implemented as a SQL Server database table inside the WinCC runtime database. The WinCC Explorer → User Archive editor lets the engineer define columns (one column per recipe parameter) and a row limit. At runtime, the User Archive Control (inserted from the WinCC Graphics Designer control palette) renders the table to the operator and provides inline editing, filtering, and CSV import/export.

From the PLC side, data exchange is performed through WinCC tags. Each column of the archive can be bound to one or more tags; the archive control calls uaArchiveRead and uaArchiveWrite internally as values change. For larger recipes, scripting with VBS in the Graphics Designer is usually required to orchestrate the read/write sequence and to handle acknowledgement back to the PLC.

Documented limitations

  • Editor usability: the column editor in WinCC Explorer is text-only and offers no group/folder structure. Recipes with more than 30 columns become hard to navigate.
  • Control ergonomics: the runtime UA control was not redesigned for high-resolution panels; the grid is small and not touch-optimized.
  • No native versioning: changes overwrite prior values; there is no built-in history of recipe edits.
  • Licensing: User Archives is a separately licensed WinCC option. The base WinCC RT license does not include the option. Each operator station that displays or edits the archive may require the option license on its RT key (refer to the WinCC V7.0 price list for the exact option designation).
  • Scale: because the UA table is held in the WinCC runtime database, the practical upper bound is determined by SQL Server Express limits, which on V7.0 SP2+ is 4 GB per database and a row count that depends on column count. In real installations, performance begins to degrade well before SQL Server limits when row count exceeds a few thousand.
Engineer field-note: The User Archive runtime control is one of the few WinCC V7.0 controls that has been involved in documented Graphics Designer crashes. Always apply the latest WinCC V7.0 hotfix from Siemens Support (search the Siemens Support knowledge base for "User Archive" + "Graphic Designer crash") before commissioning a recipe screen that uses UA control.

STEP7 DB-Based Recipe Management with SFC20

The DB-based pattern uses the PLC's data block memory as the recipe store. Recipes are data blocks of identical structure; an "active recipe" data block holds the recipe currently in use; an "edit" data block holds a copy the operator is currently modifying.

DB structure

Typical DB layout for an S7 recipe scheme with N recipes and P parameters
DB Symbolic name Length Purpose
DB100 REC_01 P × 4 bytes (REAL) or P × 2 bytes (INT) Recipe 1
DB101 REC_02 Same as DB100 Recipe 2
... ... ... ...
DB199 REC_99 Same as DB100 Recipe 99 (max)
DB200 REC_ACTIVE Same as DB100 Currently active recipe; consumed by the process
DB201 REC_EDIT Same as DB100 Working copy; operator edits this in WinCC

Each recipe data block has the same structure so that SFC20 can perform a full block copy. The parameter list and the order of parameters is the same across all recipe DBs, the active DB, and the edit DB.

SFC20 BLKMOV parameters

SFC20 (BLKMOV) is a system function call provided by the S7 CPU operating system. It copies a contiguous memory area to another contiguous memory area without requiring the engineer to write a loop.

SFC20 BLKMOV interface
Parameter Declaration Data type Description
SRCBLK INPUT ANY Source area (e.g. P#DB100.DBX0.0 BYTE 240)
RET_VAL OUTPUT INT Return value: 0 = no error; non-zero = error code
DSTBLK OUTPUT ANY Destination area (e.g. P#DB200.DBX0.0 BYTE 240)

Common SFC20 return values (refer to the STEP7 System Software / S7-300/400 System and Standard Functions manual for the complete list):

  • W#16#0000 — no error
  • W#16#8091 — source area exceeds the area limit
  • W#16#8092 — destination area exceeds the area limit
  • W#16#80B1 — source DB is not loaded
  • W#16#80B2 — destination DB is not loaded
  • W#16#80B4 — error in ANY pointer format

Sample STL call (copy recipe N to active DB)

// Assume recipe index is in MW 100 (1..99)
// Recipe N lives in DB (100 + N - 1) i.e. recipe 1 = DB100, recipe 99 = DB198
      L     MW 100
      +     99                  // recipe 1 -> DB 100
      T     #tempDB
      OPN   DB [#tempDB]
      CALL  SFC 20
       SRCBLK := P#DBX 0.0 BYTE 240
       RET_VAL := MW 102
       DSTBLK := P#DB200.DBX 0.0 BYTE 240

Sample SCL call

// SCL — copy recipe N to active DB
IF (recipeIndex >= 1) AND (recipeIndex <= 99) THEN
  SFC20(
    SRCBLK := P#DB[100 + recipeIndex - 1].DBX 0.0 BYTE 240,
    RET_VAL := retVal,
    DSTBLK := P#DB200.DBX 0.0 BYTE 240
  );
END_IF;

WinCC side: tag binding and operator screen

On the WinCC side, expose the active DB and the edit DB as WinCC tags by configuring the STEP7 connection in WinCC Explorer and creating tags that map to the offsets in DB200 and DB201. The operator screen typically has three areas: a recipe selector, a parameter grid that binds to the edit DB tags, and action buttons (Load, Save, Cancel).

For the recipe selector, use a WinCC combo box bound to a WinCC tag that the operator writes. The HMI script then computes the source DB number and triggers a bit that the STEP7 logic monitors (e.g., M 200.0 = "Copy recipe to active", M 200.1 = "Save edit DB to recipe"). The STEP7 logic checks the bit, performs the SFC20 call, and clears the bit when done.

Side-by-Side Comparison

User Archives vs STEP7 DB recipe scheme on WinCC V7.0
Criterion User Archives STEP7 DB with SFC20
License cost Additional option None
Storage size limit SQL Server Express 4 GB / 10 GB (SP3+) PLC work memory; CPU-dependent (typical 1–20 MB usable for recipes on S7-300/400)
Number of recipes 100+ practical less than 50 practical
Number of parameters per recipe Limited by UA control grid ergonomics (~30 usable) Limited by DB size (typical 100+ parameters trivial)
Operator UX UA control (tabular, dated) Custom screen (full control)
Performance on recipe load Slow (SQL round-trip + tag updates) Fast (one SFC20 call, deterministic)
CSV import/export Built-in Custom (WinCC VBScript)
Backup / version control SQL Server backup PLC project backup
Engineering effort Low (configuration) Medium (STEP7 logic + WinCC screen)
Migration to TIA Portal Moderate (UA data export / reimport) Easy (DBs are portable, recipe logic must be re-implemented)

Decision Criteria: When to Use Which Method

Use the matrix below as a quick field test.

Recipe method decision matrix
If your project ... Use
Has fewer than 50 recipes, each with more than 30 parameters, and must run on a panel that already has a STEP7 program STEP7 DB with SFC20
Has more than 100 recipes, with relatively few parameters per recipe, and the operator is expected to add or delete recipes from the HMI WinCC User Archives
Must avoid an additional WinCC option license STEP7 DB with SFC20
Must minimize PLC engineering effort and keep the recipe store in the HMI WinCC User Archives
Must support CSV import/export of recipes by operators WinCC User Archives (built-in)
Must run on an S7-1200 / S7-1500 in TIA Portal (new project) Migrate to WinCC RT Professional recipe
Must run on a Comfort / TP / OP panel Migrate to WinCC Flexible recipe view

Licensing Exposure

User Archives is licensed as a WinCC option. The exact designation is WinCC/User Archives (also called WinCC option: User Archives). It is delivered as a separate license key that is bound to the same WinCC authorization (the License Key Plug or the Automation License Manager) as the base WinCC RT license.

WinCC V7.0 recipe option licensing at a glance
Item License model Notes
WinCC RT base RT tag-based (power-pack to 8K, 64K, 256K, 512K, 4K, etc.) Required for the runtime to start
WinCC / User Archives (option) RT-locked (per RT server / per single-user station) One option per RT instance that displays/edits UA
STEP7 / STEP7 Professional Engineering license For the DB and SFC20 logic
WinCC Engineering Engineering license For the UA configuration in WinCC Explorer

Confirm the current option designation on the Siemens Industry Mall or the WinCC V7.0 price list. The "User Archives" option has historically been delivered as a single-station key for engineering and a runtime-bound option for each runtime instance that uses the archive.

Engineer field-note: The fact that User Archives requires an additional option is a recurring point of frustration in the field. If the customer is sensitive to license cost and the recipe count is small (under 50), the STEP7 DB + SFC20 pattern is usually the cheaper and faster-to-deliver answer. Document the cost difference in the project kickoff meeting so the choice is visible to the customer.

Implementing the STEP7 DB Method

The implementation is split between STEP7 and WinCC. The PLC stores and copies; the HMI tags read and write.

STEP7 side

  1. Define the recipe data type as a STRUCT in a global DB or as a UDT (user-defined data type) so that all recipe DBs share an identical layout. Example UDT name: UDT_RECIPE.
  2. Create N recipe DBs of type ARRAY[1..P] OF REAL (or a UDT) using the same name pattern (DB100, DB101, ..., DB100+N-1).
  3. Create the active DB (DB200) and the edit DB (DB201) with the same layout.
  4. Implement a function block (e.g., FB200 "RECIPE_MGMT") that monitors the operator commands from WinCC:
    • Input bits from WinCC: LoadRecipe, SaveRecipe, Cancel
    • Inputs: RecipeIndex (INT), ParamCount (INT), ParamSize (INT)
    • Internally use SFC20 BLKMOV in both directions
    • Outputs: Done, Error, ErrorCode
  5. On a successful copy, set the Done bit; on error, set Error and return the SFC20 return code in ErrorCode.

WinCC side

  1. In the WinCC Tag Management, configure the STEP7 connection to the CPU and add tags for each parameter of the edit DB (DB201) and the active DB (DB200).
  2. Add a recipe selector (WinCC combo box) that writes to a tag RecipeIndex.
  3. Add a parameter grid (WinCC input/output fields) bound to the edit DB tags. Disable the input fields when no recipe is being edited.
  4. Add action buttons that toggle the command bits on the PLC: "Load Recipe", "Save Recipe", "Cancel".
  5. Use a small VBScript in the Graphics Designer to write the RecipeIndex and the ParamSize values, and to monitor the Done and Error tags for operator feedback.
Engineer field-note: Always store the RecipeIndex and the recipe name as ASCII strings in the PLC (e.g., DB205 "RECIPE_NAMES" of type ARRAY[1..99] OF STRING[32]). Operators will forget which number is which recipe. The DB method has no built-in name table; you have to engineer it.

Implementing the User Archives Method

  1. Open the WinCC Explorer on the engineering station and navigate to User Archive.
  2. Create a new archive (e.g., "Recipes"). Define one column per recipe parameter; choose a SQL data type appropriate to the parameter (FLOAT, INT, BOOL stored as INT 0/1, or CHAR/VARCHAR for text).
  3. Add a primary key column ("RecipeID") and an optional "RecipeName" column. Mark "RecipeID" as the identifier.
  4. On the runtime station, insert the User Archive Control from the Graphics Designer control palette onto a process picture. Bind the control to the archive name ("Recipes").
  5. Configure the control's tag interface so the columns are connected to WinCC tags. For non-tag columns, leave the binding empty and use the control's VBScript API to read/write values.
  6. Implement the "Load" / "Save" buttons using VBScript. Example pattern using the WinCC UA OLE interface:
    ' VBScript — read row 1 of archive "Recipes" into PLC tags
    Dim conn, rs
    Set conn = CreateObject("ADODB.Connection")
    conn.Provider = "WinCCOLEDBProvider.1"
    conn.Properties("Data Source") = HMIRuntime.ActiveProject.Name & "\"
    conn.Open
    Set rs = CreateObject("ADODB.Recordset")
    rs.Open "SELECT * FROM Recipes WHERE RecipeID = 1", conn
    HMIRuntime.Tags("Setpoint1").Write rs.Fields("Setpoint1").Value
    HMIRuntime.Tags("Setpoint2").Write rs.Fields("Setpoint2").Value
    rs.Close
    conn.Close
    
Engineer field-note: The WinCC OLE DB provider string changed in V7.0 SP2 and again in V7.0 SP3. Always verify the exact provider string against the Siemens WinCC V7.0 documentation for the SP you are running. A common cause of "data source not found" runtime errors is using a SP3-only provider string on a SP2 system.

Migration to WinCC Flexible and WinCC RT Professional

For greenfield projects, the recipe object in WinCC Flexible and WinCC RT Professional removes most of the engineering effort described in the previous sections. The recipe element exposes a recipe view control that the engineer binds to a configurable list of tags, a CSV-based transfer mechanism, and a recipe editor that is part of the base engineering environment.

For TIA Portal projects, an official example of recipe functions in WinCC RT Professional is published in the Siemens documentation portal. The example covers read, write, and data-record transfer with the standard recipe scripting API and is a useful starting point when porting a WinCC V7.0 User Archives or DB-based recipe to TIA Portal.

Recipe API method names — WinCC RT Professional
Action Method / property Notes
Read a data record from PLC GetDataRecordFromPLC Triggers a read of a single record
Write a data record to PLC SetDataRecordToPLC Writes a record back to the PLC
Import a recipe from CSV ImportDataRecords Operator-side
Export a recipe to CSV ExportDataRecords Operator-side
Save a recipe to file Save on the recipe object Persist to local storage

For WinCC V7.0 → WinCC RT Professional migration, the typical path is to export the User Archives table (or the recipe DB contents) to CSV, then use the ImportDataRecords method to seed the new recipe element. The DB-based scheme requires manual recreation of the recipe data structure in TIA Portal because TIA does not import S7 classic DBs directly.

Known Issues and Workarounds

Documented WinCC V7.0 recipe-related issues and field-proven workarounds
Symptom Affected version Workaround
Graphics Designer stops responding when inserting the User Archive Control WinCC V7.0 SP2 Apply the latest WinCC V7.0 SP2 hotfix from Siemens Support; avoid inserting the UA control into screens that already contain a large number of objects
User Archives OLE DB provider returns "Data source not found" on RT station V7.0 SP2 / SP3 Verify the provider string against the SP-specific WinCC documentation; re-register the provider using regsvr32 on the WinCC OLE DB component
Recipe value updates to PLC are not visible to operator after SFC20 copy DB method, S7-300 Check that the active DB is not optimized-block-access disabled; on S7-300, ensure the destination DB is non-optimized (standard) for SFC20 to address it via DBX/DW
SFC20 returns 0x8091 (source area exceeds area limit) DB method, any S7 The ANY pointer source length is larger than the actual source DB; verify the BYTE count against the DB length declared in the DB properties
Operator can edit a recipe while it is being executed DB method, both Add an "Editing" interlock in the STEP7 logic: reject the SFC20 edit-DB-to-recipe-DB write while the recipe is in "Running" state
UA control column data is shown in scientific notation User Archives, V7.0 base Format the WinCC tag that the UA column binds to as Fixed-point with the required decimal places; the UA control does not reformat the displayed value

Performance and Scalability Considerations

For the DB method, the SFC20 call on an S7-300/400 executes in a deterministic time proportional to the number of bytes copied (approximately 1 ms per 100 bytes on a typical S7-315/317). For an S7-1500 the equivalent SFC (SFC20 is replaced by the MOVE_BLK instruction in TIA) executes faster. The recipe load is therefore a one-shot operation of typically 1–10 ms; it does not affect scan time in a meaningful way.

For the User Archives method, the limiting factor is the SQL Server round-trip. A typical read of 30 columns from a single row takes 50–200 ms over the WinCC OLE DB provider, depending on the SQL Server load and the network. For high-frequency recipe updates this is too slow; the DB method is preferred.

For a comparison of recipe counts:

  • DB method: limit is PLC work memory. An S7-317 with 1 MB of work memory can store thousands of recipes if each recipe is small (a few dozen REALs). Practical upper bound on STEP7 V5.x is about 1,000 recipes of 240 bytes each.
  • User Archives: limit is SQL Server database size. The WinCC runtime database on V7.0 SP2 and earlier is SQL Server 2005 Express (4 GB); on V7.0 SP3+ it can be SQL Server 2008 R2 Express (10 GB). Recipes with 30 columns of FLOAT occupy roughly 300 bytes per row plus indexing overhead; the practical limit is therefore around 1 million recipes before hitting the database ceiling.
Engineer field-note: The "User Archives supports thousands of recipes" headline is misleading. The constraint is usually the operator UI: with more than a few hundred recipes in a single archive, the UA control becomes sluggish to scroll and filter. The DB method with a custom screen can handle several hundred recipes with better UX.

FAQ

Does WinCC V7.0 include recipes out of the box?

No. WinCC V7.0 has no built-in recipe object. Recipe functionality must be assembled from the optional User Archives package, a STEP7 DB-based scheme using SFC20, or by migrating the project to WinCC Flexible or WinCC RT Professional.

Do I need a separate license for User Archives in WinCC V7.0?

Yes. User Archives is a separately licensed WinCC option. The base WinCC RT license does not include it. Each runtime instance that displays or edits the archive typically requires the option license on its authorization.

How do I copy a complete recipe from one DB to another in STEP7?

Use SFC20 BLKMOV with source and destination ANY pointers. Example: CALL SFC20(SRCBLK := P#DB100.DBX 0.0 BYTE 240, RET_VAL := MW102, DSTBLK := P#DB200.DBX 0.0 BYTE 240). Verify the byte count matches the actual DB length and check RET_VAL for error codes such as W#16#8091.

What is the recommended approach for fewer than 50 recipes on a WinCC V7.0 system?

Use the STEP7 DB-based method with SFC20 BLKMOV. It avoids the additional User Archives license, gives full control over the operator screen, and is faster than the User Archives round-trip through SQL Server.

Can a WinCC V7.0 User Archives database be migrated to WinCC RT Professional?

Yes, via CSV export from the WinCC V7.0 archive and CSV import on the RT Professional side using the ImportDataRecords method described in the WinCC RT Professional recipe example. Note that the RT Professional recipe element is part of TIA Portal and requires re-engineering the HMI portion of the project.

Back to blog