Diagnosing Logic Matrix Generation Aborts and Plant Hierarchy Mapping Errors in PCS 7

Diagnosing Logic Matrix Generation Aborts and Plant Hierarchy Mapping Errors in PCS 7

In SIMATIC PCS 7, generation failures in the Logic Matrix engineering tool—where generating CFC cause-and-effect charts aborts with generic error dialogs and deleting/recreating the matrix fails to resolve the issue—are primarily caused by plant hierarchy database inconsistencies, special characters in Cause/Effect tag names, or corrupted COM registrations. The Logic Matrix compiler parses matrix definitions and directly injects function blocks (LM_CAUSE, LM_EFFECT) into target CFC charts. If Cause/Effect descriptions contain invalid characters (such as periods, colons, quotes, or exceeding 24 characters), or if the assigned Plant Hierarchy folder has a corrupted database link, generation halts. To fix this, perform 'Save As... With Reorganization (slow)' on the multiproject, verify all tag names adhere to strict alphanumeric syntax, ensure the Logic Matrix library matches the installed PCS 7 version, and re-execute generation.

Table of Contents

Executive Summary

The SIMATIC PCS 7 Logic Matrix provides an intuitive, matrix-based cause-and-effect engineering environment for designing complex interlocking, inter-unit tripping logic, and automated sequencing without manual line-by-line CFC wiring. However, during the compilation and generation phase (Logic Matrix > Generate), the generation tool can fail abruptly, leaving orphaned blocks or incomplete charts in the plant hierarchy. Re-creating the matrix from scratch often reproduces the identical failure because the underlying obstacle typically resides in the STEP 7 technological database, plant hierarchy path length limitations, or naming syntax violations. Following structured validation and project database reorganization steps restores clean matrix generation.

Architecture and Fundamental Mechanics

The SIMATIC PCS 7 Logic Matrix operates as an automated code generation wrapper around the CFC and Plant Hierarchy database engines:

  1. The Logic Matrix Architecture:
    * The Logic Matrix editor stores cause-and-effect relationships (inputs, logical intersections, time delays, and output effect actions) in a dedicated relational database table (*.lmx).
    * When an engineer clicks Generate, the Logic Matrix compiler translates the rows and columns into standard CFC logic:
    • Causes are mapped to LM_CAUSE blocks.
    • Intersections are mapped to matrix routing logic.
    • Effects are mapped to LM_EFFECT blocks.
    • The generator instantiates these blocks, automatically wires interconnections, and places the resulting charts into the plant hierarchy folder designated in the matrix properties.
  2. Common Triggers for Generation Abort:
    * Syntax and Special Characters: The names assigned to Causes and Effects become block names and symbolic tags in STEP 7. Characters such as /, \, ., :, ", ', or leading numbers violate STEP 7 symbolic naming conventions, causing the CFC block creation API to throw an unhandled exception.
    * Tag Name Length Restrictions: In PCS 7, technological block names within a chart cannot exceed 24 characters, and hierarchy path lengths must not exceed 260 characters. Oversized names cause generation buffer overflows.
    * Plant Hierarchy Database Desynchronization: If the target hierarchy folder selected in the Logic Matrix has lost its database link to the S7 Program (a common result of moving folders or improper dearchiving), the generator cannot resolve the target chart folder and aborts.
    * Library Mismatch: If the Logic Matrix Engineering tool version (e.g., V9.0 SP3) is compiling charts using an older or newer Logic Matrix block library (LM_Lib), parameter mismatches halt the compiler.

Step-by-Step Implementation Procedure

Follow these procedures to diagnose and resolve Logic Matrix generation failures:

  1. Audit Cause and Effect Naming Syntax:
    * Open the affected matrix in the Logic Matrix Editor.
    * Inspect the names of all Causes (rows) and Effects (columns).
    * Ensure all names strictly use alphanumeric characters and underscores (A-Z, a-z, 0-9, _).
    * Remove any periods (.), hyphens (-), slashes (/), spaces, or special punctuation.
    * Verify that no Cause or Effect name exceeds 24 characters in length.
  2. Verify Target Plant Hierarchy and AS-OS Assignment:
    * In the Logic Matrix Editor, select Matrix > Properties.
    * Navigate to the General or Plant Hierarchy tab.
    * Inspect the assigned target hierarchy folder.
    * In SIMATIC Manager Plant View, navigate to that folder, right-click, and select Object Properties > AS-OS Assignment.
    * Confirm that a valid AS controller and chart folder are assigned.
  3. Rebuild the Multiproject Technological Database:
    * Close the Logic Matrix editor and CFC charts.
    * In SIMATIC Manager, select File > 'Save As...'.
    * Specify a new project destination path.
    * Check the radio button With reorganization (slow).
    * Click OK and wait for the database reorganization to complete.
  4. Verify Logic Matrix Library in Master Data Library:
    * Open the multiproject's Master Data Library.
    * Check the Blocks folder. Ensure the Logic Matrix blocks (LM_CAUSE, LM_EFFECT, LM_IS_C, LM_IS_E) match the installed Logic Matrix software version.
    * If uncertain, re-import the blocks from File > Open > Libraries > LogicMatrix_Lib.
    * Perform Options > Charts > Update Block Types across all projects.
  5. Re-execute Matrix Generation:
    * Open the Logic Matrix in the editor.
    * Select Matrix > Generate.
    * In the generation dialog, select Scope: Entire matrix.
    * Select 'Create new charts' and click OK.
    * Confirm that generation finishes with a clean confirmation dialog reporting zero errors.

Verification

After generation completes, open the target Plant Hierarchy folder in SIMATIC Manager. Confirm that the generated CFC charts appear with their corresponding LM_CAUSE and LM_EFFECT blocks fully populated and interconnected. Open CFC; verify that Chart > Check Consistency reports zero errors. Finally, compile the S7 Program with 'Generate module drivers' to verify complete integration.

Limitations and Operational Precautions

Do not manually edit or delete block interconnections inside the generated Logic Matrix CFC charts. Any manual modifications inside the generated charts will be overwritten during the next matrix generation pass. Always implement logic changes directly within the Logic Matrix editor.

Engineer FAQ

What is the difference between Logic Matrix and Safety Matrix?

Safety Matrix is designed for fail-safe safety programs (S7 F Systems) compliant with IEC 61508/61511. Logic Matrix provides identical cause-and-effect matrix engineering for standard process automation logic.

Can a Logic Matrix span across multiple AS controllers?

No. A single Logic Matrix instance must execute within a single AS controller; cross-controller interlocking requires standard AS-to-AS communication links.

Why did 'Save As... With Reorganization (slow)' fix the generation error?

It purges corrupted technological database pointers in amdbase.db, allowing the Logic Matrix compiler to properly resolve hierarchy folder targets.

Does Logic Matrix require an engineering and runtime license?

Yes. Logic Matrix requires an engineering license on the ES and a runtime license per AS controller executing the matrix logic.

Technical References

Related Articles

Related Tags

  • Logic Matrix
  • Cause and Effect
  • Generation Error
  • Plant Hierarchy
  • LM_CAUSE
  • LM_EFFECT
20 respuestas