Resolving 'Shared Declarations Not Available (Anymore)' in SIMATIC PCS 7 Multiprojects

Resolving 'Shared Declarations Not Available (Anymore)' in SIMATIC PCS 7 Multiprojects

In SIMATIC PCS 7 V8.0/V8.1, the error 'Shared Declarations not available (anymore)' during block type cleanup or library block import occurs when the project internal database loses cross-reference links to the Shared Declarations folder (Gemeinsame Deklarationen). To resolve this, verify that the Master Data Library contains a valid Shared Declarations folder, execute 'Shared Declarations -> Synchronize with Multiproject', and perform a 'Save As... With Reorganization (Slow)' on both the single project and the Multiproject container.

Table of Contents

The Role of Shared Declarations in SIMATIC PCS 7 Projects

In SIMATIC PCS 7, Shared Declarations (Gemeinsame Deklarationen) form the central structural repository for project-wide semantic definitions. Located at the root of a Multiproject or single project, the Shared Declarations container maintains:
* Units: Physical engineering units (e.g. bar, °C, kg/h, m³/h, rpm) referenced by block parameter attributes (S7_unit).
* Enumerations: Named integer states (e.g. Stop, Run, Fault, Manual, Auto) assigned to block inputs/outputs via attribute S7_enum.
* Equipment Properties: Technological equipment attributes used by Advanced Process Functions (APF) and SIMATIC BATCH.

When an engineer imports an Advanced Process Library (APL) block into a CFC chart or selects Options -> Block Types -> Clean Up, the CFC compiler scans the block's interface attributes. If an attribute references an enumeration or unit, the system queries the local project's Shared Declarations folder to validate and link the data types. If this lookup fails, block import and compilation are blocked.

Root Causes for 'Shared Declarations Not Available (Anymore)'

This error typically arises from one of four architectural or database faults:
1. Desynchronized Master Data Library:
In a PCS 7 Multiproject, all single AS/OS projects must derive their shared declarations from the Master Data Library (MDL). If a single project was moved, detached, or created outside the Multiproject, its pointer to the central shared declarations is severed.
2. Accidental Deletion of the Shared Declarations Folder:
An engineer may inadvertently delete the Shared Declarations object in SIMATIC Manager Plant View or Component View.
3. Database Index Corruption (.s7p / hrs tables):
Abrupt engineering station shutdowns, blue screens, network dropouts while opening projects over LAN shares, or antivirus file locking can corrupt the Sybase relational database tables that manage object cross-references.
4. Symbol Table Inconsistency:
Corrupted symbol table pointers can prevent the STEP 7 database engine from resolving block type definitions during block cleanup operations.

Database Corruption vs. Missing Master Data Library Link

Before applying corrective actions, determine whether the failure is a logical synchronization issue or binary database corruption:
* Logical Desynchronization: The Shared Declarations folder exists in the project tree, but synchronizing with the Master Data Library produces warning messages or fails to update newly added enumeration types.
* Database Corruption: Right-clicking the project and selecting Insert New Object -> Shared Declarations fails with an internal database error, or the message 'Shared Declarations not available (anymore)' appears even when dragging standard blocks from the pristine PCS 7 system library.

Multiproject Synchronization and Recovery Matrix

The following matrix outlines recovery methods according to failure severity:

Diagnostic ScenarioPrimary SymptomRemediation ActionSuccess RateOut-of-Sync ProjectError on block import; MDL is intactExecute Shared Declarations -> Synchronize with MultiprojectVery HighMissing Declarations FolderFolder deleted in single projectInsert new Shared Declarations folder, then sync from MDLHighIndex Lock / Fragmented DBClean Up block types hangs or errorsExecute File -> Save As... With Reorganization (Slow)HighCorrupted Symbol Table LinkSymbol list export/import failsExport symbols, delete symbol table, recreate and re-importModerateSevere Binary DB CorruptionSybase table access violationRestore project from backup or extract charts to fresh projectComplete Recovery

Step-by-Step Procedure to Restore Shared Declarations

Follow this sequential procedure to repair the project database:
1. Verify Master Data Library Structure:
- In SIMATIC Manager, open the Multiproject.
- Locate the Master Data Library folder. Ensure it contains a child object named Shared Declarations.
- If missing in the library, right-click the library container and select Insert New Object -> Shared Declarations.
2. Execute Multiproject Synchronization:
- Right-click the Shared Declarations folder in the Master Data Library.
- Select Shared Declarations -> Synchronize with Multiproject.
- A dialog will show all single projects in the multiproject. Select All and click OK.
- Confirm that the system reports successful synchronization across all AS projects.
3. Perform Database Reorganization (Slow):
- Close all open CFC charts, HW Config windows, and NetPro sessions.
- In SIMATIC Manager, select File -> Save As....
- Check the box With Reorganization (Slow).
- Choose a target directory on a local drive (C:\ or D:\, never a network mapped drive).
- Click OK. This forces STEP 7 to rebuild all Sybase database tables, re-index pointers, and purge orphaned records.
4. Clean Up Block Types:
- Open a CFC chart in the reorganized project.
- Select Options -> Block Types.
- Select the target AS program and click Clean Up.
- Confirm that the operation completes without reporting shared declaration errors.

Verification

Confirm complete restoration of project integrity:
1. Open any CFC chart within the repaired project.
2. Drag a standard APL block (such as MonAnL or MotL) from the Master Data Library into the chart. The block must drop cleanly without error prompts.
3. Open the block properties: Verify that engineering units (e.g. bar) and mode enumerations display correctly.
4. Open the Process Object View (Ctrl + 4), navigate to the Parameters tab, and confirm that the Unit dropdown populates with all global shared declaration units.
5. Execute a complete AS program compilation (Changes only). Verify compilation completes with zero database errors.

Limitations and Operational Precautions

  • Never store active STEP 7 / PCS 7 multiprojects directly on network shared drives or cloud storage folders (e.g. OneDrive, Dropbox); concurrent locking mechanisms corrupt Sybase database files.
  • 'Save As With Reorganization (Slow)' can take from 15 minutes to over an hour on massive multiprojects (>20,000 tags); do not interrupt the process or terminate s7tgtopx.exe.
  • Always create an uncompressed archive (File -> Archive) of the entire multiproject before initiating database repair procedures.

Engineer FAQ

Why did deleting and recreating the Symbol Table only work temporarily for the user?

Deleting the symbol table resets the S7 symbol cache, temporarily bypassing cross-check errors during the next single operation. However, because the underlying relational database pointer in the project's .s7p file remained damaged, the error returned immediately during the subsequent block import.

Can I copy a Shared Declarations folder from another project?

Yes. You can copy the Shared Declarations folder from a healthy project or backup and paste it into the Master Data Library, followed by running 'Synchronize with Multiproject'.

What happens to existing CFC charts if an enumeration is deleted from Shared Declarations?

If an enumeration used by active blocks is deleted, the blocks revert to displaying raw integer numbers instead of friendly text labels on OS faceplates, and CFC compile warnings are logged.

Technical References

Related Articles

Related Tags

  • SIMATIC PCS 7 V8.0
  • Shared Declarations
  • Master Data Library
  • Multiproject
  • Database Repair
6 respuestas