In SIMATIC PCS 7 V8.0, performing an "Entire OS Compile" or making changes to a Safety Matrix can cause internal WinCC tags (such as .MReference or .M_Reference and .ServerPath) to disappear from the WinCC tag management system. When these tags are missing, the Safety Matrix Viewer control in WinCC Runtime fails to load matrix data, halts at "Waiting for matrix file," or throws AP_DIAG errors indicating that .M_Reference tags cannot be found.
To resolve missing Safety Matrix tags and prevent them from being deleted during an OS compilation in PCS 7 V8.0, you must configure the Safety OS Server as the alphabetically first OS target in the ES multiproject and perform an Entire OS Compile with Memory Reset. This forces the OS compilation process to correctly map @FMatrices, @FShutdn, and F_Proxy blocks, properly generating and retaining the required .M_Reference internal tags and .CEM matrix files in the target WinCC project.
Table of Contents
- Technical Cause: Why Safety Matrix Tags Are Deleted During OS Compilation
- Prerequisites
- Method 1: Rename the Safety OS Server Application to Enforce Correct Compilation Order
- Method 2: Execute an Entire OS Compile with Memory Reset
- Method 3: Update and Protect Safety Matrix Faceplate PDL Files
- Verification
- Limitations and Operational Cautions
- Engineer FAQ
- Related Articles
- Related Tags
Technical Cause: Why Safety Matrix Tags Are Deleted During OS Compilation
During a full OS compilation in PCS 7 V8.0 SP1/SP2 (with Safety Matrix V6.2 SP1), the OS Compile wizard resets and rebuilds the WinCC tag management database. The process compiles standard plant hierarchy (PH) blocks—such as F_MA_AL—to their assigned OS servers. However, internal system charts like @FMatrices and @FShutdn (which contain F_Proxy blocks) may be mapped to an incorrect OS server if multiple server pairs exist in the multiproject.
When @FMatrices charts map to the wrong server, the compilation wizard maps the internal text tags (.M_Reference, .ServerPath) and exports the Cause and Effect Matrix (.CEM) files to a secondary OS rather than the designated Safety OS Server. On subsequent "Changes Only" or standard entire compilations, the primary Safety OS Server loses these tags because the compilation task fails to reconcile their true Plant Hierarchy assignment. Upgrading to PCS 7 V8.1 with Safety Matrix V6.2 SP2.1 resolves this underlying compiler logic error natively.
Prerequisites
Before attempting to recover or recompile Safety Matrix tags, ensure the following requirements are met:
- Engineering Station Access: SIMATIC PCS 7 V8.0 SP1 or SP2 installed with Safety Matrix V6.2 SP1.
- Administrative Project Access: Full access to the ES Multiproject, including the ability to rename WinCC OS applications and download to the target controllers and OS servers.
- Maintenance Window: An approved plant change window allowing an AS change download and OS server downloads.
- Backup: A complete backup of the PCS 7 Multiproject prior to performing memory resets or faceplate conversions.
Method 1: Rename the Safety OS Server Application to Enforce Correct Compilation Order
Best used when: Working in a multi-server environment where Safety Matrix internal tags (.M_Reference, .ServerPath) and @FMatrices system charts compile into the wrong OS server pair.
Procedure
- Open the PCS 7 Component View or Plant View on the Engineering Station.
- Locate the individual OS project assigned as the Safety OS Server within the multiproject hierarchy.
- Right-click the WinCC Application / OS object and select Properties.
- Rename the OS application object so that its name appears alphabetically first among all OS Server names in the multiproject list (for example, prefix the name with
A_or01_).
Note: Do not modify the target computer name or the Symbolic Computer Name. Only change the WinCC OS Application object name in the SIMATIC Manager hierarchy.
5. Open the Plant Hierarchy options within each Safety Matrix Editor and confirm that non-@blocks (such asF_MA_AL) are explicitly assigned to the designated Safety OS Server hierarchy area.
6. Compile the OS to verify that@FMatrices,@FShutdn, andF_Proxytags now correctly build under the Safety OS Server project.
Expected result: The OS compiler evaluates the Safety OS Server first, mapping all @FMatrices and @FShutdn internal tags (.ServerPath, .M_Reference) and .CEM files directly to the correct WinCC project directory.
Verification: Open WinCC Tag Management on the Safety OS Server after compilation and confirm that internal tags ending in .M_Reference exist.
Limitation: This method addresses server target mapping issues in multi-server architectures; it must be combined with a full OS compile with memory reset to generate missing tags initially.
Method 2: Execute an Entire OS Compile with Memory Reset
Best used when: Safety Matrix logic or parameters have been edited, and a standard "Changes Only" OS compile fails to generate or retain .M_Reference tags.
Procedure
- In the Safety Matrix Tool, make any required matrix logic or parameter updates.
- Perform a complete transfer of the matrix (Charts + Parameters) to the target AS, even if only minor changes were made.
- Perform a block change compile and change download to the target S7-400F/FH Automation System (AS).
- Right-click the OS project in SIMATIC Manager and select Compile.
- In the OS Compile wizard, select the option Entire OS and check the With Memory Reset checkbox.
Plaintext
OS Compile Options:
[X] Entire OS
[X] With Memory Reset
- Complete the compilation wizard and download the resulting project to the target OS Server.
- Verify that
.CEMfiles are updated in the OS project directory path:
...\<OS_Project_Name>\GraCS\SafetyMatrix\*.CEM
Expected result: The OS compilation clears old internal tag mapping caches and successfully recreates all .M_Reference and .ServerPath tags in WinCC Tag Management.
Verification: Open WinCC Runtime on the OS Server or Client, open the Safety Matrix faceplate, and confirm that the matrix Cause and Effect grid renders without AP_DIAG missing tag errors.
Caution: Executing an Entire OS Compile with Memory Reset forces a full download to the OS Server. Ensure the redundant OS server partner is online and handling runtime tasks before initiating the download.
Method 3: Update and Protect Safety Matrix Faceplate PDL Files
Best used when: The Safety Matrix Viewer connects to the .CEM file and finds .M_Reference tags, but the Cause and Effect (C&E) text lines fail to display in the main runtime window (showing text only in the event log).
Procedure
-
Locate the Safety Matrix faceplate and icon Picture Description Language (
.pdl) files in the project library or source directory:@PG_F_*@PCS7Typicals_S7SFMTX.pdl
2. Copy these files into a temporary isolated folder outside of the main project GraCS directory.
3. Open WinCC Graphics Designer.
4. Run the Graphics Designer Conversion Tool on the isolated.pdlfiles to convert them to PCS 7 V8.0 format.
5. Copy the converted@PG_F_*and@PCS7Typicals_S7SFMTX.pdlfiles into theGraCSfolder of each OS Server and OS Client project in the multiproject.
6. Open the OS Project Editor in WinCC Explorer for each OS Server and Client.
7. Navigate to the Basic Data tab.
8. Uncheck (deselect) the converted Safety Matrix faceplates and typicals files (@PG_F_*and@PCS7Typicals_S7SFMTX.pdl) in the overwrite protection list.
9. Click OK to save the OS Project Editor configuration.
Expected result: The OS Project Editor will no longer overwrite the converted V8.0 Safety Matrix faceplates with older default versions during subsequent project editor runs.
Verification: Open the Safety Matrix faceplate in WinCC Runtime and confirm that all Cause and Effect intersection text, status icons, and matrix lines display correctly.
Comparison of Recovery Approaches
MethodPrimary PurposeWhat It RestoresMain LimitationAlphabetical OS RenamingDirects @FMatrices and @FShutdn charts to the correct OS serverServer path mapping, .M_Reference, .ServerPath tagsRequires adjusting OS Application object names in ESEntire OS Compile + Memory ResetClears cached compile databases and regenerates missing tagsComplete WinCC tag suite, .M_Reference tags, .CEM filesRequires full OS compile and transfer of Matrix chartsFaceplate Conversion & ProtectionFixes rendering issues in Safety Matrix Viewer controlC&E text grid, faceplate display, line itemsMust be repeated if new base library typicals are deployed
Verification
The tag regeneration and Safety Matrix resolution procedure is successful when:
- Tag Management Check: In WinCC Explorer under Tag Management, internal tags with the
.M_Referenceand.ServerPathsuffixes exist for all configured Safety Matrices under the Safety OS Server tag suite. - File System Check: The target OS project directory contains current
.CEMfiles located in the path:
...\WincProj\<OS_Name>\SafetyMatrix\ - Runtime Display Check: Clicking the
F_MA_ALicon in WinCC Runtime opens the Safety Matrix Viewer without generatingAP_DIAGerrors. The window connects immediately without hanging at "Waiting for matrix file." - Data Verification: All Cause and Effect (C&E) text descriptions, logic status colors, and trip counters populate correctly in the viewer grid.
Limitations and Operational Cautions
- AS Transfer Requirements: Making changes in the Safety Matrix editor requires transferring complete charts and parameters to the AS before compiling the OS; transferring parameters alone will not update OS tag structures.
- Full OS Download Downtime: Performing an "Entire OS Compile with Memory Reset" requires a full download to the OS Server. On single (non-redundant) OS installations, this will interrupt OS Runtime monitoring.
- OS Client Package Assignments: After renaming OS Servers, OS Client user administration area assignments for safety plant hierarchy areas may temporarily unassign. Allow client package data to synchronize automatically in runtime before manually editing client package assignments.
- PCS 7 Version Specifics: This issue specifically affects PCS 7 V8.0 SP1 and SP2 running Safety Matrix V6.2 SP1. Upgrading the system environment to PCS 7 V8.1 with Safety Matrix V6.2 SP2.1 permanently resolves the compiler tag-deletion bug.
Engineer FAQ
Why does a "Changes Only" OS compile fail to restore missing .M_Reference tags?
A "Changes Only" compile inspects delta flags between the ES and OS databases. When .M_Reference tags are deleted due to a mapping error, the OS compiler database misinterprets the delta state and omits internal tag generation. An "Entire OS Compile with Memory Reset" is required to purge the compiled tag cache and force full regeneration.
Can I manually add missing .M_Reference tags into WinCC Tag Management?
No. Manually created tags in the WinCC internal tag management database will be wiped out during the next OS compilation. The PCS 7 OS compiler manages the tag suite automatically based on the Plant Hierarchy and Safety Matrix block instances (F_MA_AL, F_Proxy).
How do I stop OS Project Editor from overwriting updated Safety Matrix faceplates?
In WinCC Explorer, open the OS Project Editor and go to the Basic Data tab. Deselect the modified Safety Matrix picture files (@PG_F_* and @PCS7Typicals_S7SFMTX.pdl) from the update list. This prevents the OS Project Editor from replacing converted V8.0 faceplates with default project template files during future runs.
Does renaming the WinCC OS Application interrupt server-client communication?
Renaming the OS Application object in SIMATIC Manager changes its display and compilation hierarchy order. As long as you do not alter the Target Computer Name or Symbolic Computer Name, network routing and client-server package downloads remain functional.
Related Articles
- How to Troubleshoot OS Compile Errors in SIMATIC PCS 7
- Configuring Redundant OS Server Pairs in PCS 7
- Upgrading SIMATIC Safety Matrix in PCS 7 Environments
- Managing WinCC Project Editor Basic Data Files
Related Tags
Code: C135