Resolving PCS 7 "Could not find AdvLib81" During V8.0 to V9.1

David Krause12 min read
SiemensTIA PortalTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Problem Overview

The error "Could not find AdvLib81" is generated by the SIMATIC PCS 7 CFC/SFC compiler when it cannot resolve block-type references to the PCS 7 Advanced Process Library (APL) version 8.1 inside a project that was originally engineered on PCS 7 V8.0. The dialog is typically raised while performing a Chart → Compile → Charts as program (full program compilation) or while the Generate Module Driver step is run from the CFC Editor. The symptom is consistent across the S7-400 AS stations in the multiproject and prevents the download of the changed runtime data to the automation system.

The root cause is an incompatible coupling between the installed PCS 7 master data library (APL / Basic Library) and the block-type version stamped in the CFC instances of the S7 program. PCS 7 stores a FB/FC number range and a version suffix (e.g. APLOF81, CTRL_PID81) inside the chart container; the compiler cross-checks these against the currently installed library. If the suffix (e.g. 81 for APL 8.1) cannot be located in the master data library registered in the Plant View, the editor raises the dialog and aborts the module driver generation.

Affected Versions and Compatibility Matrix

The following combinations are known to produce the "Could not find AdvLibxx" symptom. Use this matrix to identify whether your project is in an unsupported intermediate state.

Project Source Version Target PCS 7 Version Intermediate Library Result
PCS 7 V8.0 + APL 7.1 V9.1 APL 8.1 installed in Plant View Faulty - "Could not find AdvLib81" at module driver generation
PCS 7 V8.0 + APL 7.1 V8.2 APL 8.1 + Basic Library 8.1 Compiles only after full block-type update
PCS 7 V8.2 + APL 8.2 V9.0 APL 9.0 + Basic Library 9.0 Compiles after staged upgrade
PCS 7 V9.0 + APL 9.0 V9.1 APL 9.1 + Basic Library 9.1 Supported direct upgrade

According to the PCS 7 Advanced Process Library Readme V8.2 SP1 Update 1, after installation the master data library is registered in the SIMATIC Manager under the name PCS 7 AP Library V82 and the template charts are located beneath that node. Any deviation between this registered name and the version suffix expected by the CFC compiler is the typical cause of the "Could not find" family of errors.

Compatibility rule: The block-type version suffix in the CFC (e.g. 81, 90, 91) must match the suffix of the currently installed APL in the Plant View. Skipping a major version (e.g. jumping directly from APL 7.1 to APL 9.1 without 8.1 and 9.0 as intermediate steps) is not supported by the block-type update procedure and leads to unresolved type references.

Root Cause Analysis

The PCS 7 Advanced Process Library is more than a collection of FBs and FCs - it is an integrated type system that also contains:

  • Symbolic I/O channel drivers (PADP_Lxx, CH_U_xx, CH_AI_xx, CH_DI_xx, CH_DO_xx) that bind chart signals to the symbol table of the AS.
  • Standard diagnostic blocks (OB_BEGIN, OB_END, CTRL_PID, MOT_SPEED, VALVE_ANA, VALVE_DIG) whose internal instance DB structure is regenerated by the version-specific Update Block Types tool.
  • Versioned APL style block icons for the WinCC faceplates (e.g. @APL_V8_xx.pdl) that must correspond to the same block-type version as the AS program.

When the CFC compiler is triggered with the Generate Module Driver option enabled, it scans the Plant View for an installed master data library whose name matches the suffix stored in each instance. The scan order is:

  1. The Plant View root: \<Project>\Plant View\<Unit>\<ChartFolder>
  2. The S7 Program container of the AS station under \<Project>\Component View\<AS>\S7 Program
  3. The global library catalog \<Project>\Library\PCS 7 AP Library Vxx

If the suffix 81 is absent from all three lookup locations, the compiler reports "Could not find AdvLib81" and the module driver generation step terminates. Typical conditions that lead to the missing suffix are:

  • The APL was uninstalled from the Plant View after the block-type update completed, but the CFC still contains old instances that were not re-instanced.
  • The PCS 7 installation was upgraded to V9.1 (which removes APL 8.1) while the project file still references the 8.1 suffix from a partial earlier update.
  • Two different APL versions are installed side-by-side, and the Update Block Types tool picked the newer one (e.g. APL 9.1) while the chart still carries CTRL_PID81 instances from a previous compile.

Staged Library Upgrade Procedure

The supported migration path from PCS 7 V8.0 (with APL 7.1) to PCS 7 V9.1 (with APL 9.1) is a three-stage incremental upgrade. Skipping stages is the most common root cause of the "Could not find AdvLibxx" error.

Prerequisites

  • SIMATIC PCS 7 V9.1 installed (DVD or SCC image). Confirm the installation in Control Panel → Programs and Features and check for entries SIMATIC PCS 7 APL V9.1 and SIMATIC PCS 7 Basic Library V9.1.
  • Intermediate PCS 7 media for V8.1 and V9.0 must be available locally or mounted as ISO to obtain the APL/Basic Library setup packages.
  • An archived, time-stamped backup of the V8.0 multiproject (.zip via SIMATIC Manager → File → Archive) before any modification.
  • Logged-in Windows user must be a member of the local SIMATIC HMI group and have full control NTFS rights on the project directory.
  • The PCS 7 OS Project Editor and the CFC/SFC editors must be closed before the Update Block Types tool is invoked.

Step 1 - Archive and Open the Source Project

  1. Launch SIMATIC Manager as administrator.
  2. Open the V8.0 multiproject by selecting File → Retrieve and pointing to the archived ZIP.
  3. Verify in Help → About that the project header reads PCS 7 V8.0. If not, the project has already been partially upgraded - reset to the backup.

Step 2 - Upgrade Stage 1: APL 8.1

  1. Insert the PCS 7 V8.1 media (or the standalone APL 8.1 install) and run Setup.exe.
  2. Select Install → PCS 7 Advanced Process Library V8.1 and PCS 7 Basic Library V8.1.
  3. After installation, confirm in the Plant View that the global library PCS 7 AP Library V81 and PCS 7 Basic Library V81 are registered.
  4. In the SIMATIC Manager menu, choose Options → Charts → Update Block Types. In the dialog select Update block types in the current chart folder / project and tick Replace block types with current version.
  5. Open any CFC in the project and trigger Compile → Charts → Charts as program. Enable Generate Module Driver under Options → Compile/Download….
  6. Wait for the build to complete without errors. The compiler log should report AdvLib81: all blocks updated.
  7. Critical: once the build is clean, remove APL 8.1 and Basic Library 8.1 from the Plant View via Options → Library Update → Remove Library from Project. This prevents accidental down-version type usage during the next stage.
Why remove the library? The PCS 7 compiler always uses the highest version of a type suffix present in the Plant View. Leaving APL 8.1 installed while installing APL 9.0 will cause mixed-suffix charts and re-introduce the "Could not find AdvLibxx" dialog after the next compile.

Step 3 - Upgrade Stage 2: APL 9.0

  1. Install the PCS 7 V9.0 media: SIMATIC PCS 7 APL V9.0 and SIMATIC PCS 7 Basic Library V9.0.
  2. Confirm the global library entries PCS 7 AP Library V90 and PCS 7 Basic Library V90 in the Plant View.
  3. Run Options → Charts → Update Block Types on every S7 program and the master data library.
  4. Compile the CFCs as program with Generate Module Driver enabled.
  5. Once the build succeeds, remove APL 9.0 and Basic Library 9.0 from the Plant View.

Step 4 - Upgrade Stage 3: APL 9.1 (Final Target)

  1. Install the PCS 7 V9.1 media: SIMATIC PCS 7 APL V9.1 and SIMATIC PCS 7 Basic Library V9.1.
  2. Confirm the global library entries PCS 7 AP Library V91 and PCS 7 Basic Library V91 in the Plant View.
  3. Run Options → Charts → Update Block Types. Verify that the dialog shows Update from version 90 to version 91 for every block instance.
  4. Compile the CFCs as program with Generate Module Driver enabled.
  5. Re-run Compile → SCL if the project contains SCL sources for derived data block types (type UDT).
  6. Open the WinCC Explorer and execute OS Project Editor → Activate to regenerate the faceplate links for the new APL version.

Verification

After the final compile, perform the following checks to confirm the migration is complete and stable:

  1. Compile log: open the log file \<Project>\Logs\<AS>_compile.log and search for AdvLib91. The expected line is AdvLib91: all blocks updated, no errors.
  2. Block-type consistency: in the CFC editor, right-click a chart → Block Type → Check Consistency. The dialog must report 0 inconsistencies for every chart.
  3. Module driver: open the Module Driver view of one AS and confirm that the Generate button is greyed out (already generated for the new version). If it is active, repeat the compile with Generate Module Driver.
  4. OS faceplates: open one OS picture in Graphics Designer and double-click a faceplate instance. The Configuration dialog must reference the V9.1 faceplate type, e.g. @APL_PID_V9_91.pdl.
  5. Download test: perform a Download → Stop → Download user program to target system cycle on the test AS. The AS must reach RUN within 30 s without SF (system fault) LED activation.

Advanced Diagnostics

If the dialog "Could not find AdvLib81" persists after a clean staged upgrade, the following diagnostics uncover the residual type reference:

  1. Search for the suffix in the S7 program: open the S7 Program of the affected AS and execute Options → Block Consistency Check. The tool lists every FB/FC number that has a type stamp but no matching source in the installed libraries.
  2. Inspect the block icon: in the CFC, right-click a block → Properties → Block. The Block type field shows the version suffix, e.g. CTRL_PID81. If it differs from the installed APL, manual re-instancing is required.
  3. Use S7-Block management: open Component View → AS → S7 Program → Blocks and search for FB numbers in the APL range (FB 1800-1999 for APL 7.1, FB 2000-2199 for APL 8.x, FB 2300-2499 for APL 9.x). Stale blocks with no source are deleted via Delete → All blocks not referenced by SFC/CFC.
  4. Cross-project search: in the SIMATIC Manager execute Options → Cross References → Chart Folder to find every chart that still references the 8.1 suffix. Each chart must be re-opened and the type re-assigned manually if the automatic update failed.

Common Pitfalls and Workarounds

Symptom Likely Cause Workaround
Compiler dialog still references AdvLib81 after stage 3 APL 8.1 was not removed from Plant View after the stage 1 compile Run Options → Library Update → Remove Library from Project for both APL and Basic Library 8.1, then re-compile
OS picture shows a '?' icon on the faceplate WinCC faceplate version mismatch with the AS block version Re-run OS Project Editor → Activate and update the dynamic wizard links
SF LED on AS after download Mixed-suffix channel drivers (e.g. PADR_81 inside a PADR_91 chart) Run Generate Module Driver with the Delete unused option enabled
Project opens with warning 'Incompatible library version' SFV / SFC charts were not upgraded in lockstep with CFC Open every SFC and run Options → SFC → Update Block Types before CFC recompile
Compile log shows 'Block FB 1820 not found' Legacy IMAP/CFC block from PCS 7 V6.x still present Use the IMAP migration tool to convert V6 blocks to APL, or delete orphan blocks via Block Consistency Check

Field-Commissioning Best Practices

  • Always perform the library upgrade on a copy of the production project. Use a separate ES station with a fresh Windows user profile to avoid conflicts with cached type catalogs in %LOCALAPPDATA%\Siemens\Automation\Catalogs.
  • Compile the AS in Stop mode once and observe the diagnostic buffer (CPU → Operator Panel → Diagnostic Buffer) for entries with OB 121 / OB 122 (programming errors). Their presence indicates a residual type mismatch even if the CFC compile log is clean.
  • Document the exact APL/Basic Library version that is registered in the Plant View by exporting the project header via SIMATIC Manager → Project → Properties. The field is named Library version and must equal the S7 block FB number range used in the project.
  • Schedule the final download during a production pause of at least 30 minutes. The module driver regeneration can briefly take the AS out of RUN when the Initialize outputs option is selected.
  • After the upgrade, run the PCS 7 OS Server redundancy test if the plant uses a redundant OS pair. The faceplate version mismatch is the most common cause of OS server failover failures after APL upgrades.

What the Readme Confirms

The official PCS 7 Advanced Process Library Readme V8.2 SP1 Update 1 states that after the APL installation the blocks and templates are registered under the name PCS 7 AP Library V82. The same naming convention applies to APL 8.1 (PCS 7 AP Library V81), 9.0 (PCS 7 AP Library V90), and 9.1 (PCS 7 AP Library V91). Any deviation in this name - including trailing spaces, lower-case characters, or locale-specific characters - will cause the CFC compiler to fail with the "Could not find AdvLibxx" message even if the library is technically present in the master data library tree.

FAQ

Why does the error say "AdvLib81" when I have already installed APL 9.1?

Because the CFC still contains block instances stamped with the version suffix 81 from a previous compile. The compiler reports the first unresolved suffix it encounters. Re-run Options → Charts → Update Block Types on every S7 program, and confirm that no APL 8.1 reference remains in the Plant View before recompiling with the module driver option enabled.

Can I upgrade directly from APL 7.1 to APL 9.1 without intermediate steps?

No. PCS 7 only supports one major version jump per staged upgrade. Skipping APL 8.1 or 9.0 produces mixed-suffix channel drivers and "Could not find AdvLibxx" errors. The supported path is 7.1 → 8.1 → 9.0 → 9.1, with each stage ending in a successful compile and a clean removal of the previous library.

What is the difference between APL and Basic Library in PCS 7?

The Basic Library contains the legacy and standardized IEC 61131-3 blocks (e.g. CTRL_PID, MOT_SPEED) that are not APL-styled. The Advanced Process Library (APL) adds faceplate-enabled, diagnostic-rich block types (e.g. CTRL_PIDL, MOT_SPEDL) with operator and maintenance views. Both libraries must be upgraded in lockstep, and the suffix must match between the two for the CFC compiler to resolve all type references.

How do I confirm that the Generate Module Driver step actually ran?

Open the Module Driver view of the AS in the Plant View, select the channel folder (e.g. AI 8x16Bit), and check that the Generate button is greyed out. If it is active, the module driver has not been generated for the current block version. Re-run Compile → Charts as program with the Generate Module Driver option enabled in Options → Compile/Download….

Does this error also occur on PCS 7 V9.0 SP3 to V9.1 single-step upgrades?

Rarely. Single-step upgrades within the same major branch (9.0 → 9.1) are supported directly. The "Could not find AdvLibxx" symptom on V9.0 projects almost always points to a manual downgrade attempt or a mixed-installation where the S7-400 AS has the older block type catalogue loaded. Verify the catalogue via SIMATIC Manager → Options → Block Consistency Check before opening a service request.

Back to blog