Resolving OS Compile Stalls After Plant Bus IP Address Changes and Purging asasrv.ini in PCS 7

Resolving OS Compile Stalls After Plant Bus IP Address Changes and Purging asasrv.ini in PCS 7

Operator Station (OS) compilation wizards stall or freeze in SIMATIC PCS 7 after modifying an Engineering Station's plant bus IP address because legacy communication endpoints remain cached within internal asasrv.ini configuration files. Even after updating NetPro and the PG/PC interface, the compilation subsystem references obsolete IP addresses recorded across project directories. To resolve compilation freezes, engineers must close SIMATIC Manager, search for all instances of asasrv.ini across project and system paths, update the cached IP references to the new address, and recompile network connections.

Table of Contents

Root Cause Analysis: Why OS Compilation Hangs After IP Modifications

When re-addressing an Engineering Station (ES) or plant bus communication processor (CP 1623 / CP 1613 / standard Intel NIC), engineers routinely update the Windows network adapter settings, modify the IP address in STEP 7 HW Config and NetPro, and re-download the station configuration. However, subsequent attempts to run the OS Compilation Wizard (Compile OS) result in an indefinite freeze:

  • Symptom: The OS compile dialog hangs indefinitely during initialization ("Compiling OS - please wait..."), or takes up to 20 minutes to open.
  • Underlying Mechanism: During OS compilation, the compilation engine resolves technological tag connections by querying the AS-OS communication service (asasrv). This subsystem caches communication parameters, including the local ES IP address, subnet masks, and MAC addresses, in hidden initialization files named asasrv.ini.
  • The Timeout Trap: If the old IP address is unreachable or bound to a disabled network adapter, the compilation wizard initiates sequential TCP/RPC connection attempts to the obsolete IP address, incurring lengthy Windows socket timeout penalties before failing or hanging. If a dummy adapter with the old IP is temporarily enabled, the wizard immediately unfreezes.

The Role and Function of asasrv.ini in PCS 7 Architecture

The initialization file asasrv.ini acts as a local routing cache for the AS-OS engineering server subsystem:

  • Location Across Storage: Instances of asasrv.ini reside both in the centralized Siemens installation directory (e.g., C:\Program Files (x86)\Siemens\...) and within individual project subdirectories inside the multiproject structure (specifically under the technological hierarchy and OS database folders).
  • Automatic Recreation Limitations: While official Siemens support guidelines occasionally state that deleting asasrv.ini will prompt SIMATIC Manager to regenerate a clean file upon restart, field experience across multiple PCS 7 versions demonstrates that deleting all instances can result in initialization failures where no new files are created, completely breaking project loading.
  • The Proven Solution: Rather than blanket deletion, systematically finding all asasrv.ini files and updating the obsolete IP string to the new plant bus IP immediately restores normal compilation performance.

Step-by-Step Procedure to Locate and Update asasrv.ini Files

Follow this structured procedure to eliminate cached IP hang-ups:

Step 1: Clean Application Shutdown

  1. Close WinCC Explorer and all engineering editors.
  2. Run reset_wincc.vbs from the Windows Run prompt (Win + R).
  3. Close SIMATIC Manager.
  4. Ensure no lingering Siemens processes remain active in Windows Task Manager.

Step 2: Search for All asasrv.ini Files

  1. Open Windows PowerShell or an administrative Command Prompt.
  2. Search the entire project drive and system drive:
    powershell Get-ChildItem -Path "D:\PCS7_Projects\" -Filter "asasrv.ini" -Recurse -Force Get-ChildItem -Path "C:\Program Files (x86)\Siemens\" -Filter "asasrv.ini" -Recurse -Force
  3. Record the total number of files found (often between 50 and 150 files across complex multiprojects).

Step 3: Update Cached IP Addresses

  1. Using a script or multi-file text editor (such as Notepad++), inspect the files for the old IP address string (e.g., 192.168.1.100).
  2. Replace all occurrences of the old IP address with the new plant bus IP address (e.g., 192.168.10.100).
  3. Save all updated asasrv.ini files.

Step 4: Recompile Network Connections in NetPro

  1. Launch SIMATIC Manager as administrator.
  2. Open NetPro.
  3. Select Network -> Save and Compile... with the option Compile and check everything.
  4. Verify that network routing compiles with zero errors.

NetPro and Station Configuration Alignment

Ensure the Station Configuration Editor and PG/PC settings align with the new IP address:

  1. Station Configuration Editor:
    * Open the Station Configuration Editor on the ES.
    * Verify that the network adapter (e.g., IE General or CP 1623) displays status OK (pencil icon).
  2. Set PG/PC Interface:
    * Open Set PG/PC Interface.
    * Confirm that S7ONLINE is bound to the new IP profile (e.g., <NIC> -> TCP/IP(Auto)).
  3. Simatic Shell:
    * Open Windows Explorer, right-click Simatic Shell, and select Settings.
    * Verify that Simatic Shell is bound to the correct physical adapter carrying the Terminal Bus.

Verification

Confirm the resolution of the OS compile hang:

  1. Launch the OS Compilation Wizard:
    * In SIMATIC Manager, right-click the OS project and select Compile.
    * Confirm that the wizard opens promptly (within 5 to 10 seconds) without hanging.
  2. Execute Test Compilation:
    * Select Changes only and click Compile.
    * Confirm that the compilation processes all automation stations, transfers variable tags, and completes with zero errors.
  3. Target Communication Verification:
    * Download the newly compiled OS to the target server.
    * Verify that WinCC establishes active S7 connections to all controllers across the new IP network.

Limitations and Operational Precautions

  • Always Backup Project Before Editing: Prior to performing batch find-and-replace operations across asasrv.ini files, create a full multiproject archive (File -> Archive).
  • Avoid Manual File Deletion: Do not delete all asasrv.ini files simultaneously without having verified backups, as automated regeneration is not guaranteed across all PCS 7 releases.
  • Hostname Consistency: If the computer name was changed alongside the IP address, verify that the computer name in WinCC Project Properties matches the Windows computer name exactly.

Engineer FAQ

  • Why does the OS compile wizard hang after changing the plant bus IP address?
    The AS-OS compilation subsystem queries cached IP endpoints stored in asasrv.ini files; invalid addresses trigger lengthy network socket timeouts.
  • Where are asasrv.ini files located?
    They are distributed throughout the PCS 7 project directory structure and within the Siemens engineering program directories.
  • Is it safe to delete all asasrv.ini files?
    No, while some systems recreate them, experience shows that bulk deletion can prevent SIMATIC Manager from opening projects properly. Updating the IP text is safer.
  • Why does enabling a dummy network adapter with the old IP temporarily fix the problem?
    Because Windows loopback detects the IP as active, preventing socket timeout penalties while the wizard initializes.
  • Does NetPro compilation update asasrv.ini automatically?
    NetPro updates connection tables in the project database, but historical cached parameters in asasrv.ini often persist until manually edited or overwritten.
  • What utility clears hung background compilation processes?
    Running reset_wincc.vbs terminates hung WinCC and compilation helper processes.
  • Can changing the ES IP address disrupt S7 communication to running controllers?
    Yes, until the new IP is downloaded to the CP or CPU connection table, the controller will reject S7 communication frames from the unconfigured IP.
  • What PG/PC interface setting should be used after changing an IP address?
    Set S7ONLINE to the specific adapter's TCP/IP(Auto) or ISO Industrial Ethernet profile corresponding to the new IP configuration.
  • Does this issue affect both standard network cards and CP 1623 adapters?
    Yes, any modification to plant bus IP addressing on the engineering station can trigger cached endpoint timeouts in the compile wizard.
  • How do I verify that the OS compile successfully registered the new IP?
    In WinCC Explorer, open Tag Management -> SIMATIC S7 Protocol Suite -> Industrial Ethernet, inspect the connection properties, and verify the target AS IP.

Technical References

  • Siemens Industry Online Support (SIOS) Portal: How do you configure and re-address the plant bus in SIMATIC PCS 7? (Entry ID: 22258957).
  • SIMATIC PCS 7 PC Configuration and Communication Setup Guide, Siemens AG.
  • Microsoft PowerShell Documentation: Managing Files and Directories with Get-ChildItem.

Related Articles

Related Tags

PCS 7, WinCC, OS Compile, Plant Bus, IP Address, asasrv.ini, NetPro, Troubleshooting

20 respuestas