Restoring SIMATIC Safety Matrix Viewer in WinCC Runtime: Missing .cem Files, Internal Tags, and Transfer Workflow
When migrating a SIMATIC PCS 7 project with Safety Matrix to V8.1, clicking a matrix block icon that opens an empty faceplate displaying 'Waiting for matrix file...' indicates that the Safety Matrix transfer step was omitted prior to OS compilation. The Safety Matrix Viewer relies on binary configuration files (.cem) and internal WinCC tags (*#MatrixFile, *#ServerPath, Cause/Effect raw tags) generated strictly during the Matrix Transfer workflow. Running a Full OS Compile without transferring the matrix purges unreferenced tags. To resolve this, open each matrix in the Safety Matrix Engineering Tool, execute 'Matrix -> Transfer' with OS generation enabled, compile CFC, and execute an OS Compilation.
Table of Contents
- Safety Matrix Engineering and Runtime Architecture Pipeline
- Why the OS Compiler Purges Safety Matrix Internal Tags and .cem Files
- The Three-Phase Safety Matrix Workflow (Engineering, Transfer, OS Compile)
- Re-establishing Internal Tags and WinCC SafetyMatrix Subfolders
- Diagnostic Matrix: Safety Matrix Viewer Runtime Faults
- Step-by-Step Restoration Procedure in PCS 7 V8.1
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Safety Matrix Engineering and Runtime Architecture Pipeline
SIMATIC Safety Matrix is the certified Cause and Effect methodology used in SIMATIC PCS 7 for safety-instrumented systems (SIS / ESD). The engineering lifecycle spans two distinct software domains: the safety controller (F-CPU execution) and the operator station (Safety Matrix Viewer in WinCC Runtime).
The Safety Matrix Viewer faceplate (@PG_F_MATCTL.pdl) is an active ActiveX/OCX control. Rather than querying thousands of individual discrete tags across the network, the Viewer reads a compiled matrix description file (<MatrixName>.cem) stored locally in the WinCC project directory, while reading real-time cause/effect states via high-speed raw data tags (*#CauseRaw, *#EffectRaw).
Why the OS Compiler Purges Safety Matrix Internal Tags and .cem Files
During a major PCS 7 version upgrade (e.g. from V7.1 SP1 to V8.1), engineers frequently perform an OS Compilation with the option 'Entire OS' and 'With tags and create server data'. If the project was migrated without first re-running the Safety Matrix transfer tool:
- Missing Transfer Descriptors: The OS Compiler relies on temporary interchange files generated by the Safety Matrix tool. If no transfer was executed on the new ES, the compiler assumes the matrix associations are obsolete.
- Internal Tag Cleanup: The OS Compiler automatically deletes unreferenced internal tags. Tags such as
<Matrix>#MatrixFile,<Matrix>#ServerPath, and raw communication channels are stripped from WinCC Tag Management. - Missing File Repository: The compiler fails to create or populate the
<OS_Project_Dir>\SafetyMatrix\directory, leaving the.cemfile missing. When an operator clicks the block icon, the Viewer opens, searches for the missing.cemfile, and stalls indefinitely displaying 'Waiting for matrix file...'.
The Three-Phase Safety Matrix Workflow (Engineering, Transfer, OS Compile)
Restoring full functionality requires executing the complete three-phase pipeline in strict order:
- Phase 1: Engineering & Consistency Check: In the Safety Matrix Tool, open the matrix, verify causes, effects, and intersections, and run
Matrix -> Checkto validate safety logic consistency. - Phase 2: Matrix Transfer: Execute
Matrix -> Transfer. This critical step generates the F-CFC safety charts (F_SC_C,F_SC_E,F_MATCTL), assigns safety signatures, and exports the binary.cemruntime layout into the WinCC project hierarchy. - Phase 3: CFC and OS Compilation: Compile CFC charts (safety program generation), followed by an OS Compilation. The OS compiler detects the exported
.cemfile and generates the complete WinCC internal tag structure.
Re-establishing Internal Tags and WinCC SafetyMatrix Subfolders
When the Transfer and OS Compile complete successfully, verify that the WinCC environment reflects the required assets:
- File System: Inside
<Project_OS_Path>\SafetyMatrix\, the file<MatrixName>.cemmust be present with an updated timestamp. - Tag Management: Under
Internal Tags -> Safety Matrix, the following tag structures must exist: <MatrixName>#MatrixFile(Text tag 8-bit containing filename)<MatrixName>#ServerPath(Text tag 8-bit containing server directory path)<MatrixName>#CauseRaw(Raw data tag for dynamic cause states)<MatrixName>#EffectRaw(Raw data tag for dynamic effect states)- Server Packages: If operating a distributed OS architecture, update and load server data packages onto all OS Clients.
Diagnostic Matrix: Safety Matrix Viewer Runtime Faults
The following table summarizes common Safety Matrix Viewer faults and their engineering remedies:
.cem file missing; internal tags purged by OS compileMatrix -> Transfer in Safety Matrix Tool; recompile OSregsvr32 on SafetyMatrixViewer.ocx on OS station*#CauseRaw tag in WinCCStep-by-Step Restoration Procedure in PCS 7 V8.1
Follow this exact sequence to restore the Safety Matrix Viewer in PCS 7 V8.1:
- In SIMATIC Manager, open the Safety Matrix folder in Component View.
- Double-click the target Safety Matrix to open the Safety Matrix Engineering Tool V6.2 SP1.
- Select
Matrix -> Checkto verify error-free logic. - Select
Matrix -> Transfer. In the transfer dialog, ensure the checkboxes for Generate F-Blocks and Transfer OS Data are checked. Click OK. - Open SIMATIC Manager and compile CFC charts (
Charts -> Compile -> Changes Only). - Compile the OS project (
Right-click OS -> Compile -> Entire OS / With Tags). - In WinCC Explorer, verify that
<OS_Dir>\SafetyMatrix\<MatrixName>.cemexists. - Launch WinCC Runtime, click the matrix block icon, and confirm instant faceplate rendering.
Verification
Confirm that the Safety Matrix Viewer operates correctly in runtime:
- In WinCC Runtime, click the Safety Matrix block icon (
@F_MATCTL/1). - Verify that the faceplate opens within 1 second, displaying the full cause-and-effect grid with live colored status tiles.
- In the Safety Matrix Engineering Tool, turn on Online Mode; confirm that online cell states in engineering match WinCC Runtime identically.
- Verify that operator bypass, maintenance override, and reset functions operate according to configured user authorizations.
Limitations and Operational Precautions
Adhere to the following safety precautions:
- Safety Program Re-Compilation: Executing
Matrix -> Transferregenerates F-CFC charts and may alter the safety program collective signature (F-Signature). Verify safety signatures in the Safety Program dialog prior to downloading to redundant F-CPUs. - Client Licensing: Dedicated OS Clients viewing Safety Matrix faceplates require the SIMATIC Safety Matrix Viewer runtime license.
- Version Alignment: Ensure that the installed Safety Matrix Engineering Tool and Safety Matrix Viewer versions match identically across Engineering Stations and OS Servers.
Engineer FAQ
Does executing 'Matrix -> Transfer' modify the safety program signature?
Yes. If causes, effects, or intersection logic were modified, transferring the matrix regenerates the underlying F-blocks in CFC, which updates the collective safety signature.
Can I copy the .cem file manually into the WinCC project folder?
Copying the .cem file manually restores the visual grid layout, but without running the transfer and OS compile, dynamic raw data tags will be missing and live states will not update.
What license is required to view Safety Matrix faceplates on OS Clients?
Each OS Client displaying the matrix faceplate requires the 'SIMATIC Safety Matrix Viewer' license in Automation License Manager.
Technical References
- SIMATIC Process Control System PCS 7 Safety Matrix Manual (Entry ID: 100675874)
- SIMATIC Industrial Software S7 F/FH Systems Configuring and Programming (Entry ID: 109746516)
- Siemens Industry Online Support (SIOS) FAQ: Migrating Safety Matrix Projects (Entry ID: 109740190)
- WinCC V7.3 / V7.4 System Manual: Operator Station Safety Integration
Related Articles
- Upgrading S7-400H CPU 417-4H to CPU 410-5H with F-Safety
- Configuring Pre-Start Warning Alarms on SIMOCODE pro V with APL MotL
- Full OS Download to Redundant OS Servers in SIMATIC PCS 7
Related Tags
- Safety Matrix
- Waiting for Matrix File
- Matrix Transfer
- Safety Matrix Viewer
- F-Systems
- WinCC Runtime Faceplate