How to Resolve CFC and SFC Compilation Errors 'TMS_CACHE_ADDR_GET Invalid File Position' in PCS 7 V8.1

How to Resolve CFC and SFC Compilation Errors 'TMS_CACHE_ADDR_GET Invalid File Position' in PCS 7 V8.1

In SIMATIC PCS 7 V8.1 SP1, compiler errors during AS or OS compilation displaying '0xEE050053 TMS_CACHE_ADDR_GET = SYSTEM_ERROR Invalid file position' followed by forwarding errors 'TMS_ROOT_1ST_LEVEL_GET' and 'SRV_OD_2_OBJECT_ID' indicate low-level corruption in the Tag Management Server (TMS) cache or temporary compilation database index files. This corruption typically occurs following an aborted compilation or disk write latency. To resolve this error, close all SIMATIC applications, purge temporary compilation files from the project folder, execute 'File > Save As with Reorganization (Slow)' to rebuild internal database indexing, and perform an Entire Compilation of the chart folder.

Table of Contents

Architecture of the Tag Management Server (TMS) Compilation Cache

During AS and OS compilation in SIMATIC PCS 7:
* The Compilation Pipeline:
* The CFC compiler translates visual charts into S7 machine code (MC7) and extracts symbolic descriptors for WinCC.
* The Tag Management Server (TMS) creates temporary binary cache files (indexing symbols, block types, representative IDs, and hierarchical object pointers).
* The 'Invalid File Position' Breakdown:
* The compiler attempts to read an indexed cache record (TMS_CACHE_ADDR_GET) at a specific byte offset.
* If the cache index table points past the actual end of the physical file (EOF), the low-level operating system call returns: 0xEE050053 SYSTEM_ERROR Invalid file position.
* The failure cascades through root-level parsers: TMS_ROOT_1ST_LEVEL_GET, SRV_OD_2_OBJECT_ID, and ES_GET_OBJECT.

Root Causes of 'TMS_CACHE_ADDR_GET Invalid File Position' Errors

Forensic analysis reveals three common triggers in PCS 7 V8.1 SP1 projects:
1. Aborted Prior Compilation: An engineer canceled compilation mid-stream, or a Windows crash occurred while the compiler was updating TMS cache files.
2. Defective Chart or Block Header: A recently inserted block from an unverified library contained corrupt XML schema attributes or mismatched interface descriptors.
3. Storage Latency on Virtualized / Network Drives: Storing the multi-project on a virtualized VMDK or network share where delayed disk writes caused byte desynchronization between index headers and data blocks.

Purging Corrupted Compilation Indexes and Temporary Files

To clear stale compiler cache structures:

  1. Terminate All SIMATIC Processes:
    * Close SIMATIC Manager, CFC Editor, and WinCC Explorer.
    * In Windows Task Manager, terminate lingering processes: s7tgtopx.exe, s7oemax.exe, s7hcompx.exe, pdlrt.exe.
  2. Purge Temporary Files in Windows Explorer:
    * Browse to the project directory: [Project_Path]\.
    * Search for and delete temporary files matching:
    • *.tmp
    • *.lck
    • *.dbf__tmp
    • Navigate to the S7 Program container folder: delete any zero-byte files or corrupted compilation log files (*.log).

Rebuilding Project Databases via Reorganization and Entire Compile

To rebuild the project database indexing cleanly:

  1. Perform Save As with Reorganization:
    * Launch SIMATIC Manager. Open the multi-project.
    * Select File > Save As....
    * Check: With reorganization (slow).
    * Choose a new clean destination path on local drive C:\ or D:\.
    * Click OK. STEP 7 rebuilds all relational B-trees and flushes stale TMS cache pointers.
  2. Perform Entire AS Compilation:
    * Open any CFC chart in the reorganized project.
    * Select Chart > Compile > Entire Program.
    * Check: Generate Module Drivers.
    * The compiler regenerates all system data blocks, instance DBs, and TMS cache entries cleanly with 0 Errors.
  3. Compile OS:
    * Compile the OS: Compile OS > Entire OS. WinCC receives the fresh, authenticated tag mappings.

Comparison of Compilation System Error Signatures in PCS 7

The table below outlines common low-level compiler errors in SIMATIC PCS 7.

Error SignatureSubsystem InvolvedPrimary CauseResolution Action0xEE050053 TMS_CACHE_ADDR_GETTag Management ServerStale cache index / Truncated fileReorganize project & Entire Compile0xEE0503FF TMS_ROOT_1ST_LEVELObject Hierarchy ParserBroken chart cross-referenceDelete and re-instantiate block256:107 F-Tool Internal ErrorS7 F Systems CompilerLicense lock / Corrupted F-ToolRun reset_wincc.vbs; reinstall F-Tool1230:2000 Unable to createHW Config CatalogMissing Hardware Support PackageInstall CPU 410 HSP / Update catalog2772:103 Hardware creation errorHW Config EngineIncompatible/obsolete power supplyReplace obsolete module with successor

Verification

To confirm that the compilation system error is fully resolved:
1. In the CFC Editor, select Chart > Compile > Entire Program.
2. Confirm that the compilation advances through all phases (Generating blocks, assigning addresses, driver generation) without halting.
3. Open the compilation log: verify the final line states: 0 Error(s), 0 Warning(s).
4. In SIMATIC Manager, perform an OS compilation: confirm that Compile OS completes with 0 errors.
5. In the S7 Program block folder, verify that instance data blocks and system data blocks (SDBs) reflect the current timestamp.

Limitations and Operational Precautions

  • Never compile projects stored on external USB thumb drives or mapped network shares; high-speed database indexing requires fast local SSD storage.
  • If an individual CFC chart consistently triggers TMS errors even after reorganization, copy the logic into a freshly created chart and delete the corrupted chart container.
  • Always maintain timestamped compressed archives (.zip) before executing reorganization or deep compilation repairs.
  • Always validate final software licensing, service packs, and system documentation against the applicable Siemens catalog and authorized distributor quotation.

Engineer FAQ

What does 'TMS' stand for in PCS 7 compiler logs?

TMS stands for Tag Management Server, the internal compilation sub-engine responsible for mapping CFC block variables into symbolic descriptors for WinCC.

Can I just ignore TMS errors if the program downloads?

No. A TMS system error indicates database corruption. Downloading code compiled with TMS errors can cause controller memory access faults (OB121/OB122) or fatal CPU stops.

Why did 'Save As with Reorganization' fix the error?

Slow reorganization reads every record sequentially, discards orphaned cache tables, purges deleted blocks, and rebuilds binary indexing trees from scratch.

Technical References

Related Articles

Related Tags

  • TMS_CACHE
  • Compilation Error
  • System Error
  • CFC Compiler
  • Reorganization
6 respuestas