Fixing WinCC Flexible 2005 TP277 Recipe Data Record -1 Values

David Krause13 min read
SiemensTroubleshootingWinCC
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

Fixing WinCC Flexible 2005 TP277 Recipe Data Record -1 Values

Symptom reported in the field: an operator on a Siemens TP277 6-inch HMI panel running WinCC Flexible 2005 Advanced SP1 HF7 opens a recipe, edits the values for a data record, names the record (e.g. 2-Tank2), and presses Save. When the operator returns to the original record (1-Tank1), the value fields display -1 instead of the previously stored numbers. A second, related symptom appears after a project transfer: the panel reports no data records for the recipe, even though the engineering project defines ten records. Both behaviors are rooted in how WinCC Flexible persists recipes on the TP277 and in the way the transfer tool overwrites recipe data.

This guide reconstructs the failure mode, isolates the root causes, and provides a verified remediation sequence that you can apply without changing the panel firmware or migrating to a newer HMI tool.

1. Problem Details

Two distinct symptoms are usually conflated in a single support ticket. Treat them as independent failure modes that share an underlying cause (recipe storage on the panel's internal flash).

1.1 Symptom A — Tag Values Replaced by -1

  • A recipe is configured with one or more tags (e.g. High 1, High 2).
  • Data record 1-Tank1 is saved at runtime with values 100 and 200.
  • The operator creates a new data record 2-Tank2, enters 150 and 200, and saves.
  • On reopening 1-Tank1, both fields now display -1.

The -1 indicator is the runtime placeholder for an uninitialized / non-existent tag value in a recipe data record. It is the same value WinCC Flexible assigns when a recipe view is bound to a tag whose entry does not exist in the selected data record.

1.2 Symptom B — Data Records Vanish After Transfer

  • The WinCC Flexible ES (Engineering System) project defines ten data records under the recipe.
  • Transfer to the panel is performed with Overwrite recipe data records enabled.
  • After transfer, the panel recipe view lists zero data records.

This is not a data-record corruption event — it is the documented behavior of the transfer filter when the ES has no data records bound to the recipe structure that matches what the runtime expects.

2. Affected Products and Versions

Item Value Notes
HMI panel Siemens SIMATIC TP277 6" 6AV6 643-0BA01-1AX0 (and -0AA01-1AX0)
Firmware (TP277) V1.1.x image WinCC Flexible 2005 / 2007 target
Configuration tool WinCC Flexible 2005 Advanced SP1 HF7 HF7 = Hotfix 7
Recipe storage location Internal flash Path \Flash\Recipes\<RecipeName>\ on TP277
Storage area flag Tag has Persistent attribute set in ES Drives runtime persistence on flash

The same logic applies to TP270, OP277, MP277 and the rest of the 270/277 panel family that supports WinCC Flexible 2005 recipes. Differences between panels are limited to the maximum recipe size, number of data records, and the flash file system block size.

3. Recipe vs Data Record Architecture

WinCC Flexible uses a strict two-tier model. Misunderstanding the boundary between the two tiers is the single most common cause of both symptoms described above.

  • Recipe — the structure definition. A recipe names a list of tags (recipe elements), each with a data type, scaling, and a tag address pointing to a PLC or internal HMI variable. The recipe itself contains no runtime values.
  • Data Record — a saved snapshot of values for every tag in the recipe. A single recipe can hold N data records, each addressed by a unique data record name (string, typically 1–32 chars on TP277).

Storage on the TP277 follows this directory pattern:

/Flash/
  Recipes/
    High_drying_tube/
      1-Tank1.rdf
      2-Tank2.rdf
      default.rdf
    Cleaning_Recipe/
      ...

Each .rdf is a binary record file written through the WinCC Flexible recipe view activeX / native control. If the flash block containing an .rdf is corrupted, the runtime reports the value as -1 rather than zero, because -1 for an integer is an unambiguous sentinel for "no valid data".

4. Root Cause Analysis

4.1 Why New Records Reset Earlier Records to -1

The TP277 internal flash is split into a fixed-size recipe area declared in the project under Persistence > Storage Location. The size of that area is set at compile time and is rarely reviewed after commissioning. If the area is too small for the projected number of data records, the runtime silently fails to allocate the next record block and re-uses the slot pointer. The previous record header is overwritten in the file allocation table, which causes the recipe view to read garbage and surface it as -1.

Three concrete triggers force this state on TP277 / WinCC Flexible 2005:

  1. Storage area undersized — default 128 KB on TP277 out of the box, which is enough for a handful of records but not for a long-running process that accumulates data records over months.
  2. Tag count per record larger than expected — recipe elements with string tags or arrays count as multiple record fields and inflate the per-record size dramatically.
  3. Two runtime clients writing the same recipe — if a script and a recipe view both write to the same data record name, the second writer may corrupt the first writer's block.

4.2 Why the Panel Shows Zero Records After Transfer

When the project is re-transferred with Overwrite recipe data records ticked, ProSave / WinCC Flexible Transfer performs the following steps on the panel:

  1. Delete every .rdf in /Flash/Recipes/.
  2. Recreate the directory tree from the project image.
  3. Copy the data records that exist in the ES project file (not the runtime-created ones).

If the ES project has no data records saved to disk in the recipe (i.e. the engineer defined the structure but never created a data record inside the ES and pressed Save), step 3 copies nothing. The result is a recipe directory containing only the structural stub. WinCC Flexible's recipe view in the panel then displays an empty list. This is the documented behavior, not a bug.

A second sub-cause: the ES project may have been edited and recompiled after the engineer left the recipe view. WinCC Flexible does not persist data records defined in the ES unless the engineer explicitly opens the recipe view, adds a record, and saves it. The .rdf file is not generated at compile time.

5. Storage and Memory Constraints

Parameter TP277 default Hard ceiling Where set
Flash size for recipes 128 KB 2 MB (firmware-dependent) Project → Device → Storage Locations
Data records per recipe 100 (soft) 500 (firmware ceiling) Recipe properties → Records
Recipe elements per recipe 1000 2048 Recipe properties → Elements
Data record name length 32 32 chars Recipe view → Properties
String tag length per element n/a 128 chars Tag properties → Length

Approximate per-record footprint on flash for a typical High drying tube recipe with two integer elements:

Record overhead  :  128 B  (header + CRC + name)
Integer element  :    4 B  × 2  = 8 B
Subtotal         :  136 B / record

At 128 KB, the default recipe area holds roughly 960 such records. Once you add string tags or PLC tag arrays, the count drops fast: a 32-character string element adds 36 B, and a Word array of 50 elements adds 200 B. The "-1" symptom typically emerges only after the runtime has actually attempted to write the (N+1)th record and the flash allocator could not extend the area.

6. Diagnostic Procedure

Use this sequence to confirm the root cause before applying any fix.

  1. Read the recipe view counter. Open the recipe on the panel, press the Info button (if configured) and note the reported Number of records. If it is below the count seen in the ES, storage corruption is likely.
  2. Inspect flash contents via ProSave. Connect ProSave → File browser → navigate to \Flash\Recipes\<RecipeName>\. Compare the .rdf count with the runtime counter.
  3. Check the Storage Locations setting in the ES. In WinCC Flexible: Project → Device → Storage Locations → Recipe area. Note the size in KB. If it equals the default 128 KB and you have more than 200 records, raise it to at least 512 KB and recompile.
  4. Recompile the project without resaving recipes. In the ES, Recipe view → File → Save data record to file. If this option is greyed out, no ES-side data records were ever created.
  5. Check the Persistent attribute of every recipe element. Tags not marked Persistent will not be written to flash. Their value reverts to the tag's initial value, which WinCC Flexible displays as -1.
  6. Examine the alarm log. Filter for system alarm 140002 (recipe storage error) and 140003 (recipe write error). Their presence confirms a flash write failure rather than a logic error.
Field note: The TP277 HMI hides most file-system errors from operators. If the recipe view is the only diagnostic surface, the operator will see only the "-1" placeholder and not the underlying system alarm. Always include a hidden alarm view in the project.

7. Step-by-Step Solution

7.1 Fix the -1 Reset After Saving a New Record

  1. In WinCC Flexible ES, open Project → Device → Storage Locations.
  2. Increase the Recipes area to at least 512 KB (1 MB recommended for long-running installations).
  3. Recompile the project (Project → Compiler → All).
  4. Transfer the project to the panel.
  5. Re-enter the data records on the panel; the new flash block will accommodate the additional records without overwriting earlier ones.

If the symptom persists after the storage area is enlarged, two further actions are required:

  1. Verify that every recipe element has the Persistent flag set under Tag properties → Persistence in the ES. Tags without this flag are not written to flash and revert to the initial value (commonly 0 or -1 for integers).
  2. If a script writes the recipe (e.g. via SmartTags("RecipeName") in VBScript within WinCC Flexible), make sure the script uses the SaveDataRecord call, not a direct write to the HMI tag. Direct tag writes do not produce a flash commit.

7.2 Fix the "No Data Records After Transfer" Symptom

  1. In the ES, open the recipe view that defines the recipe (e.g. High drying tube).
  2. Click the New data record button on the toolbar.
  3. Enter the desired data record name (e.g. 1-Tank1) and the values for every element.
  4. Press Save data record to file. This step writes the .rdf to the project path \Recipes\<RecipeName>\.
  5. Repeat for every data record that should ship with the panel.
  6. Recompile and transfer with Overwrite recipe data records enabled.

The transfer tool now sees a non-empty .rdf set in the project image and copies each file into the panel's /Flash/Recipes/ tree.

7.3 Enable the Transfer Flag

  1. In WinCC Flexible ES, open Project → Transfer → Transfer Settings.
  2. Tick Overwrite recipe data records in the Recipes group.
  3. If your panel is reached over Ethernet, also tick Use TCP/IP and verify the panel's IP is reachable from the ES station.
  4. Click Transfer. The panel will reboot; do not interrupt power for at least 60 s after the progress bar completes.

8. Verification Procedure

After applying the fix, run the following checks to confirm the recipe subsystem is healthy.

  1. Counter check. On the panel, open the recipe and confirm that the displayed data record count matches the ES count.
  2. Round-trip check. Save a new data record, exit the recipe view, re-enter it, and confirm the new record and the older records are all present with the expected values (not -1).
  3. Power-cycle check. Power the panel off, wait 10 s, and power it back on. Re-open the recipe. Values that were -1 before the storage fix should now survive the reboot.
  4. System alarm check. Open the alarm view and verify that no 140002 or 140003 alarms are present after the recipe operations.
  5. ProSave file check. Connect with ProSave, browse to \Flash\Recipes\<RecipeName>\ and confirm that the file count matches the data record count.

9. Best Practices for Recipes on TP277

  • Reserve flash generously. Size the recipe area at 2× the expected worst case on day one. The flash is cheap; lost production data is not.
  • Name data records deterministically. Use names that encode line, batch, or product code so operators can find the right record without browsing.
  • Keep recipe elements as fixed-size types. Avoid variable-length strings; use fixed-length Char arrays when possible.
  • Persist every tag in the recipe. A tag without the Persistent attribute is the most common cause of intermittent -1 values after a power cycle.
  • Avoid two writers to the same record. Combine recipe view and script writers behind a single mutex if both paths are required.
  • Maintain an ES-side mirror. Periodically export data records to .csv via ProSave and store the file on the engineering server. This is the only reliable backup path on WinCC Flexible 2005.

10. Related Issues and Cross-References

Other TP277 recipe symptoms that share the same root cause and that the fix above also resolves:

  • Data record count drops to 1 after a download. Same mechanism as Symptom B: only the last .rdf is committed to the project image during a partial recompile.
  • "Recipe cannot be saved" alarm on the panel. Triggered by system alarm 140002; resolved by enlarging the recipe storage area.
  • Empty values after recipe import from a TP177 migration project. TP177 recipes do not have the same internal layout as TP277 recipes; the project must be re-mapped in the ES.
  • "-1" only on the first element of a record. Indicates a partial write, almost always a flash wear issue on panels that have been in service for more than 5 years.

For the canonical reference on WinCC Flexible 2005 recipe handling, consult the WinCC Flexible 2005 Communication / Recipes manual on Siemens Industry Online Support. The TP277 device manual is at TP277 Operating Instructions, 6AV6 643-0AA01-1AX0 / 6AV6 643-0BA01-1AX0. The system alarm reference for codes 140001–140005 is documented in the WinCC Flexible System Alarms entry. ProSave download and recipe backup are described in the ProSave Readme.

11. Quick Diagnostic Matrix

Symptom Likely cause First action Definitive fix
New record saves, old record becomes -1 Recipe flash area full / undersized Enlarge recipe area to 512 KB+ Recompile and re-transfer
No data records after transfer ES has no .rdf files Open ES recipe view and save records to file Recompile and re-transfer
Some records show -1, others normal Partial flash corruption Check for system alarm 140002 Back up, format flash, re-enter records
All records show -1 immediately on first open Recipe elements not marked Persistent Inspect tag persistence flag in ES Set Persistent and recompile
Data record count grows then resets to 0 Flash wear, panel > 5 years in service ProSave Backup to .psb Replace panel or migrate to TP700 Comfort

What does the value -1 mean in a TP277 recipe view?

It is the WinCC Flexible 2005 placeholder for an uninitialized or non-existent recipe element value. The runtime displays -1 when the recipe storage area cannot return valid data, when a tag is not marked Persistent, or when the underlying .rdf file is corrupted. The value is always 16#FFFF (signed 16-bit) for an integer and an empty string for a text element.

Why does a project transfer with Overwrite recipe data records enabled leave the panel with zero records?

Because the engineering project did not contain saved .rdf files. WinCC Flexible 2005 only transfers data records that the engineer has explicitly created in the ES recipe view and saved to file. Open the recipe view, click New data record, fill in the values, click Save data record to file, recompile, and re-transfer.

How large should I set the recipe storage area on the TP277?

Start with 512 KB for installations with up to 200 records and 1 MB for installations with up to 500 records. Each data record with two integer elements consumes roughly 136 B; string tags and array tags multiply this footprint quickly. Recalculate based on (number of records) × (sum of element sizes + 128 B overhead) and double the result to leave headroom for flash wear leveling.

Does the -1 symptom indicate hardware failure of the flash memory?

Not necessarily. The TP277 internal flash is rated for 100 000 write cycles per block. If the recipe has been in service for several years with frequent operator saves, block wear is a real possibility and the panel should be replaced. On a new or lightly used panel, the cause is almost always an undersized storage area or a missing Persistent flag on a tag.

Can I migrate the recipes from WinCC Flexible 2005 to TIA Portal without retyping them?

Yes. Use ProSave to back up the panel recipes to a .psb file, then use the TIA Portal HMI migration tool to convert the WinCC Flexible 2005 project. TIA Portal imports the recipe structure and the .rdf files. Verify the migration by exporting the recipes from the TIA Portal project and comparing the data record count with the source panel.

Back to blog