Resolving Logic Matrix NullReferenceException Crash When Adding Causes or Effects
The error 'System.NullReferenceException: Object reference not set to an instance of an object' in Siemens.LogicMatrix.MatrixEditor.FormMatrix when attempting to add a Cause or Effect line in SIMATIC PCS 7 Logic Matrix V9.0 SP1 indicates a known software defect in the early matrix grid rendering engine. When expanding the matrix beyond default dimensions, the UI editor attempts to merge uninstantiated intersection cells. To resolve this, install SIMATIC Logic Matrix V9.0 SP1 Update 1 or Update 2 (SIOS Entry ID 109756832). Alternatively, expand matrix dimensions upfront via the Matrix Properties dialog or use the Excel/XML export/import engineering feature.
Table of Contents
- SIMATIC Logic Matrix Architecture and Cause-Effect Automation
- Root Cause Analysis - Null Reference Exception in Grid Merger
- Version Compatibility and Update Matrix for Logic Matrix
- Step-by-Step Remediation: Software Updates and Workaround Workflows
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
SIMATIC Logic Matrix Architecture and Cause-Effect Automation
SIMATIC PCS 7 Logic Matrix provides an automated Cause & Effect engineering workbench for process control systems. Serving as the non-safety equivalent to Safety Matrix, Logic Matrix allows process engineers to define complex plant interlocking rules within a structured grid: Causes (digital alarms, analog limit exceedances) trigger Effects (motor trips, valve closures, heater shutdowns).
Once parameterized, Logic Matrix automatically compiles the tabular rules into native Continuous Function Charts (CFC) and generates WinCC OS faceplates (@pg_lm_*.pdl) for live operational visualization. Editing the grid requires a specialized .NET Windows Forms application (Siemens.LogicMatrix.MatrixEditor.dll).
Root Cause Analysis - Null Reference Exception in Grid Merger
In baseline release SIMATIC Logic Matrix V9.0 SP1, a critical programming flaw in the Windows Forms grid control triggers an unhandled exception when expanding rows:
System.NullReferenceException: Object reference not set to an instance of an object.
at Siemens.LogicMatrix.MatrixEditor.FormMatrix.ConfigureIntersectionCellsSync(IEnumerable`1 settings)
at Siemens.LogicMatrix.MatrixEditor.FormMatrix.MergeIntersectionCells(Int32 firstRowIndex, ...)
at Siemens.LogicMatrix.MatrixEditor.FormMatrix.AddCause(Boolean afterCurrentCause)
When an engineer right-clicks the grid to select Add Cause -> before/after current cause or Add Effect, the UI thread invokes MergeIntersectionCells to calculate intersection coordinates between causes and effects. Because the underlying data structures for the newly inserted row were not yet allocated in memory, dereferencing the cell array throws a null-pointer crash, immediately shutting down the editor.
Version Compatibility and Update Matrix for Logic Matrix
The table below details Logic Matrix software versions, stability status, and resolution updates:
109756832FormMatrix null referenceStep-by-Step Remediation: Software Updates and Workaround Workflows
- Install Official Siemens Software Update (Permanent Fix):
- Download SIMATIC Logic Matrix V9.0 SP1 Update 1 (or latest Update Collection) from Siemens Industry Online Support (SIOS Entry ID109756832).
- Close SIMATIC Manager and all engineering tools.
- RunSetup.exewith administrative privileges to replaceSiemens.LogicMatrix.MatrixEditor.dll. - Workaround Method 1: Sizing Matrix Dimensions Upfront:
- If updates cannot be applied immediately on site, open the Logic Matrix.
- Select menuMatrix -> Properties -> Matrix Dimensions.
- Specify the total number of Causes (e.g., $50$) and Effects (e.g., $30$) in advance rather than adding them individually.
- Click Apply: the editor allocates the full grid memory buffer cleanly, avoiding dynamic cell merge crashes. - Workaround Method 2: Bulk Engineering via Excel Export/Import:
- In Logic Matrix, selectFile -> Export...to export the matrix to Microsoft Excel (.xlsx) or CAEx XML format.
- Open the spreadsheet in Excel: insert new Cause and Effect rows, assign tag interconnections, and define intersection logic.
- Save the workbook, return to Logic Matrix, and selectFile -> Import.... The matrix populates without triggering GUI errors. - Recompile and Generate Logic: Select
Matrix -> Generateto compile the interlocking logic into CFC charts.
Verification
Verify editor stability through the following checks:
1. In Logic Matrix Editor, right-click an existing Cause row: select Add Cause -> after current cause: confirm that a new row inserts smoothly without throwing .NET exception dialogs.
2. Configure an analog limit Cause and link it to an Effect: select Matrix -> Generate: confirm that CFC charts are created and compiled with 0 Errors.
3. Verify that the Logic Matrix version displayed in Help -> About reflects V9.0 SP1 Upd1 or higher.
Limitations and Operational Precautions
Always close CFC and SIMATIC Manager before updating Logic Matrix components to prevent locked file replacement errors. Furthermore, after applying Logic Matrix updates, re-generate all matrix instances in the project and execute an AS-OS compilation to ensure that WinCC faceplates (@pg_lm_*.pdl) and OS block icons match the updated block type interfaces.
Engineer FAQ
Technical References
- SIMATIC PCS 7 Logic Matrix V9.0 SP1 Operating Manual (A5E42498263-AA)
- SIMATIC Logic Matrix V9.0 SP1 Update 1 Readme and Download (SIOS Entry ID 109756832)
- Siemens Technical Support: Managing Cause and Effect Interlocks in PCS 7 (SIOS Entry ID 109748968)
Related Articles
- SIMATIC PCS 7 Advanced Engineering System (AdvES) Installation, Architecture, and Licensing
- Troubleshooting CEMAT C_GROUP Block Start and Interlock Failures
- Synchronizing Master Data Library Block Types to Enable CFC Delta Downloads in PCS 7
Related Tags
- Logic Matrix
- Cause & Effect
- NullReferenceException
- Bug Fix
- PCS 7 V9.0 SP1
- Interlocking