Problem Overview
On a Siemens S7-1200 / S7-1500 controller combined with a Basic Panel (KTP400, KTP600, KTP700, KTP1000, KTP1200), Comfort Panel, or a WinCC RT Advanced station, operators frequently need to see which recipe data record is currently loaded into the PLC on process overview screens, header bars, alarms, or audit pages. The default Simple Recipe View object only displays the data record that is currently being browsed inside the recipe view object — it does not broadcast the name of the record that has actually been transferred to the controller with the Load button. Once the user navigates to any other screen, that visible name disappears.
This behavior is documented in the TIA Portal help for Managing recipe data records (Basic Panels, Panels, Comfort Panels, RT Advanced). The runtime object exposes a displayed data record tag, not an active-in-PLC data record tag, and the two are only synchronized inside the recipe view's own screen.
This guide consolidates four field-proven methods to surface the active recipe data record name on any HMI screen, including the dedicated PLC tag pass-through technique, HMI system tags, Power User recipe view, and script-based capture. A troubleshooting matrix covers the most common failure modes including Cyrillic / multi-byte encoding issues, tags not updating on load, and "Simple View" limitations on KTP600.
Prerequisites
- Engineering tool: TIA Portal V16 or later (V17 / V18 / V19 / V20 supported). Recipe behavior described here was validated against V17 and V20 documentation.
- Controller: SIMATIC S7-1200 (CPU 1211C / 1212C / 1214C / 1215C / 1217C) or S7-1500 with firmware ≥ V4.2. The S7-1200 STRING data type header occupies 2 bytes followed by up to 254 user bytes.
- HMI: KTP600 Basic, KTP700 Basic, KTP1000 Basic, KTP1200 Basic, TP700 Comfort, TP900 Comfort, TP1200 Comfort, TP1500 Comfort, TP1900 Comfort, or a WinCC Runtime Advanced PC station. KTP600 is the most restrictive case used as the working example throughout.
-
Recipe configuration: A recipe with at least one data record. Tag mapping must use PLC tags of type
String(S7-1200/1500),WString, or compatible Bool / Int / Real arrays. - Project access: Both the PLC and the HMI must be in the same TIA Portal project with HMI tag connections to the PLC's DB or absolute addresses.
- Runtime rights: The operator account on the HMI must have permission to load / save / delete recipe data records if interactive testing will be performed.
Recipe Architecture in TIA Portal
A recipe in WinCC (TIA Portal) is composed of recipe elements (mapped 1:1 to PLC tags) and data records. Data records are persisted either on the HMI's internal flash, on a removable storage card, or on a remote SMB share. The PLC is never the storage location — it is only the destination of Load operations and the source of Save operations.
| Object | Lives in | Function |
|---|---|---|
| Recipe definition | HMI project / TIA Portal | Lists elements (name, tag, default value, limits) |
| Data record | HMI storage | Holds one set of values for the recipe's elements |
| Recipe view object | HMI screen | User interface to load, save, rename, create, delete |
| Element tag | PLC (DB / M / I / Q) | Receives values on Load, supplies values on Save |
| Data record name / number tag | PLC (optional) | Tag that the recipe view uses to display the current record |
The Data record name and Data record number tags are configured under Recipe view > Properties > General > Tags. The number tag is an Int or DInt; the name tag is a String or WString. On Simple Recipe View (Basic Panels only) these tags reflect the browsed data record, not the last loaded one.
Method 1 — PLC String Tag Pass-Through (Recommended for KTP600)
This is the technique proven on a CPU 1214C + KTP600 combination. It works on every HMI flavor and does not rely on system area pointers, scripts, or Power User view licensing.
- Open the PLC project in TIA Portal and create a new global DB, for example
"HMI_Strings". - Add two
String[64]variables to the DB:-
RecipeName— input from the HMI recipe view -
ActiveRecipeName— pass-through mirror, readable from any HMI screen
-
- Open the HMI recipe's Properties > Tags dialog. Bind the Data record name tag to
"HMI_Strings".RecipeName. - Add a small ladder / SCL block in the PLC that continuously copies
RecipeNameintoActiveRecipeName. The trivial SCL implementation is:// OB1 - "Active recipe mirror" "HMI_Strings".ActiveRecipeName := "HMI_Strings".RecipeName; - On the target HMI screen (header bar, overview screen, alarm screen) place a Text / IO field bound to
"HMI_Strings".ActiveRecipeName. Set the display mode to Output or Input/Output.
Because both tags live in the same DB, the read from any screen returns the last value written by the recipe view. The mirror pattern survives screen changes, screen resets, and recipe view navigation.
Why a mirror instead of reading the recipe view tag directly?
On Basic Panels, the recipe view's Data record name tag is only updated when:
- The operator renames a data record, or
- The operator navigates to a different record inside the recipe view
It is not updated by the Load operation. The mirror variable decouples the HMI screen display from the recipe view's internal selection state and gives the PLC control over what "active" means.
Method 2 — HMI System Tags for Active Data Record
WinCC (TIA Portal) exposes several internal tags that report the state of the most recently executed recipe operation. They are accessible under HMI tags > System tags > Recipes or via the tag selector on a screen object.
| System tag | Type | Meaning |
|---|---|---|
| @RecipeName | WString | Name of the recipe currently in use |
| @DataRecordName | WString | Name of the data record last transferred to / from the PLC |
| @DataRecordNumber | Int | Number of the data record last transferred |
| @RecipeStatus | Int | 0=Idle, 1=Loading, 2=Saving, 3=Error |
Bind an Output IO field on the target screen directly to @DataRecordName. The system tag updates on every Load to PLC and Save from PLC operation, independent of which screen is active. This is the simplest approach on Comfort Panels and WinCC RT Advanced. On KTP Basic Panels, support for system tags is limited — verify availability under Connections > Tags > System tags in your TIA Portal version.
Method 3 — Power User Recipe View
The Power User recipe view object (available on WinCC Runtime Advanced and selected Comfort Panels with the appropriate option) exposes the active record's name as a configurable tag without scripting. Configuration steps:
- Replace the Simple Recipe View object with the Power User Recipe View (drag from the toolbox > Controls > Recipe view). Power User views require a license on Basic Panels only in some TIA Portal versions.
- Open Properties > Tags and bind Data record name to the PLC tag that you also want to display on the other screen.
- The Power User view correctly writes the bound tag on every Load / Save operation. The same tag can then be displayed on any screen as a standard IO field.
Reference documentation for the Power User view is published in the Siemens application example collection; the underlying mechanics are covered in the TIA Portal help under Working with recipes — Power User view.
Method 4 — Script-Based Capture (Comfort Panels / RT Advanced)
On Comfort Panels and WinCC RT Advanced, VBScripts attached to screen events can copy the active recipe name into a global HMI tag. This is useful when you need logic (e.g., concatenate recipe name + user name) that pure tag mirroring cannot deliver.
' VBScript attached to recipe view "Load" button click event
Sub OnClick(ByVal Item)
Dim sName
sName = SmartTags("@DataRecordName").Value
SmartTags("HMI_ActiveRecipeName").Value = sName
End Sub
Use this approach only when the limitation of "fires on event" is acceptable. Tag-mirror or system tag methods are preferred because they are event-independent.
Step-by-Step: Implementing the PLC Tag Mirror on KTP600 + CPU 1214C
- Open the TIA Portal project. Locate the PLC device (CPU 1214C) and the HMI device (KTP600).
- Create the HMI_Strings DB. Project tree > PLC > Program blocks > Add new block > Data block > Name "HMI_Strings" > OK.
-
Declare the strings. Open the DB and add:
VAR RecipeName : String[64]; // populated by HMI recipe view ActiveRecipeName : String[64]; // mirrored, displayed on every screen END_VAR - Compile the PLC program. Right-click the DB > Compile > Software (rebuild all blocks).
- Open the recipe. HMI device > Recipes > Select the recipe > Properties > Tags.
-
Bind the Data record name tag. Click the empty field next to Data record name > navigate to
HMI_Strings.RecipeName. -
Add the mirror logic. In OB1 (or any cyclic OB) of the PLC, drop an SCL network:
"HMI_Strings".ActiveRecipeName := "HMI_Strings".RecipeName; -
Display on every screen. Open the target screen > Toolbox > Elements > IO field > Mode: Output > Tag:
HMI_Strings.ActiveRecipeName. - Compile and download. Compile the HMI > Download to device (PLC first, HMI second) > Start runtime.
- Verification. On the HMI, open the recipe view > select a data record > press Load > navigate to the target screen > confirm the text field shows the loaded record's name.
Cyrillic and Multi-Byte Encoding Issue
Recipe names entered in languages using non-Latin scripts (Cyrillic, Greek, Chinese, Arabic) may appear as question marks (?????) when written from the HMI to the PLC string tag and read back. Root cause and remediation:
| Cause | Symptom | Fix |
|---|---|---|
| PLC STRING is byte-oriented (max 254 bytes) — only ASCII | Cyrillic chars replaced by '?' | Use WSTRING (2-byte / char, Unicode) on S7-1500, or change the DB field to WSTRING and re-bind the tag |
| Recipe view configured for String tag but runtime uses WString | Truncated / garbled text | Match the recipe view binding to the actual DB field type |
| HMI project language set to a non-supporting locale | Garbled on display only | Project tree > Languages > Add the required language > rebuild HMI |
| Operator typed the Cyrillic characters in a non-Unicode IO field | Replacement chars at input | Set IO field > Properties > Format > to WString |
On S7-1200, STRING holds raw bytes; on S7-1500, WSTRING is available and supports Unicode. When displaying Cyrillic recipe names, prefer WSTRING on both sides of the connection.
Troubleshooting Matrix
| Symptom | Likely cause | Diagnostic step | Fix |
|---|---|---|---|
| ActiveRecipeName stays empty after Load | Mirror instruction not placed in cyclic OB | Open OB1 online > monitor the assignment | Place the SCL line in OB1 or a cyclically executed OB |
| ActiveRecipeName updates only on rename, not on Load | Reading the recipe view's "Data record name" tag directly | Check tag binding in recipe properties | Use the mirror variable (this guide) |
| Text shows the name of the browsed record, not the loaded record | Simple Recipe View does not write the loaded name to its bound tag | Inspect HMI tag log of "Data record name" | Switch to Power User view or mirror via PLC |
| Cyrillic recipe name displays as '?????' | STRING type, single-byte, no Unicode | Watch table on PLC > inspect raw bytes | Switch tag to WSTRING on S7-1500 or a CPU 1214C FW ≥ V4.2 with extended STRING handling |
| Tag is shown as '#####' on the HMI | IO field length too short | Check Properties > Length | Increase to 32 / 64 / 254 characters |
| ActiveRecipeName is correct but stale after recipe view change | Mirror not triggered when operator only browses | Online monitor RecipeName vs ActiveRecipeName | This is expected behavior; mirror reflects PLC-bound value only after Load / Save |
| Compile error: tag type mismatch | Recipe view wants String, DB field is WString | Inspect HMI tag connection type | Match types exactly, or use ASCIItoWSTRING / WSTRINGtoASCII conversions |
| System tag @DataRecordName not visible in tag selector | KTP Basic Panel, system tags disabled | Check HMI device properties > System tags | Enable or fall back to Method 1 (PLC mirror) |
Verification Checklist
- Load test: From the HMI recipe view, select record "MODEL_A" > press Load > navigate to overview screen > confirm IO field shows "MODEL_A".
- Save test: Modify PLC tag values > select record "MODEL_B" in recipe view > press Save > confirm HMI stored the values.
- Rename test: Rename a data record to "MODEL_C" > reload > confirm "MODEL_C" appears on overview.
- Encoding test: Create a record named "Модель_01" (Cyrillic) > load > verify characters display correctly. If not, switch tag type to WSTRING.
- Restart test: Power-cycle the HMI > confirm the previously loaded record's name is still shown after restart (depends on whether the mirror tag is restored from PLC; S7 retains PLC values across HMI restart).
- Alarm test: Trigger an alarm that includes the recipe name in its text > verify the alarm line shows the correct name (use the mirror tag as the alarm tag source).
Advanced Notes
For installations that will eventually migrate to a batch / process historian (e.g., FactoryTalk Batch on a Rockwell line), the PLC string mirror pattern is the cleanest bridge — every recipe load produces a deterministic event in the controller that can be subscribed to by an OPC UA server or a higher-level MES. See the FactoryTalk Batch Recipe Editor User Manual for the conceptual equivalent on the PlantPAx side; the underlying principle — keeping the "active recipe" identity in the controller, not in the HMI — is identical.
On S7-1500 with the optional OPC UA server, expose HMI_Strings.ActiveRecipeName as an OPC UA node so SCADA / MES clients can read the currently loaded recipe without polling the HMI.
For very long recipe names (>32 characters), use WString[254] and set the HMI IO field length to match. KTP600 supports WString display from TIA Portal V15.1 onward.
If you operate a mixed fleet of KTP Basic Panels and Comfort Panels, keep the mirror DB in the PLC and let both HMI types read the same tag — there is no need to maintain two parallel implementations.
FAQ
Why does the recipe view's "Data record name" tag not update when I press Load on a KTP600?
The Simple Recipe View on Basic Panels only writes the bound Data record name tag when the operator renames a record or navigates between records inside the view. Load / Save operations do not update the bound tag. Use a PLC mirror tag (Method 1) or switch to the Power User recipe view (Method 3) to make the loaded record's name available on other screens.
Can I read the active recipe name from a Comfort Panel without any PLC logic?
Yes. On Comfort Panels and WinCC RT Advanced, bind an IO field directly to the HMI system tag @DataRecordName. The tag updates on every Load and Save operation, independent of the screen currently displayed.
Why does my Cyrillic recipe name show as ????? on the HMI after Load?
The S7-1200 STRING data type is byte-oriented and only supports ASCII by default. Change the DB field to WSTRING (available on S7-1500 and S7-1200 FW ≥ V4.2 with extended string handling), set the IO field on the HMI to WString display, and rebuild the project. Ensure the HMI project includes the required language under Project tree > Languages.
Do I need a license for the Power User recipe view on a KTP600?
The Power User recipe view is available without an additional license on Comfort Panels and on WinCC Runtime Advanced. On KTP Basic Panels the option may require a license upgrade depending on the TIA Portal version. If licensing is a constraint, the PLC mirror (Method 1) achieves the same result without any HMI-side licensing.
Can I expose the active recipe name via OPC UA to a higher-level system?
Yes. On an S7-1500 with the OPC UA server option enabled, mark HMI_Strings.ActiveRecipeName as accessible from OPC UA. SCADA, MES, or historian clients can then subscribe to the node and receive the current recipe name without polling the HMI runtime.