Clear a Stale CH_AI Library Error When Using Pcs7AnIn in PCS 7
If PCS 7 reports missing CH_AI library files while the intended analog channel uses Pcs7AnIn, inspect retained block types before looking for a VIPA-specific library. CFC provides a documented cleanup function for unnecessary offline types, and that cleanup resolved the reported PCS 7 V9.0 case. Apply it selectively: the second cleanup dialog can include blocks called by other blocks. Removing a stale dependency is distinct from proving that the VIPA SLIO hardware and analog data are correctly integrated.
Table of Contents
- Separate the Library Error from the VIPA Device
- Inspect Whether CH_AI Is Actually Needed
- Documented CFC Cleanup Procedure
- Recompile and Continue Device Validation
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Separate the Library Error from the VIPA Device
The reported PCS 7 V9.0 configuration adds VIPA SLIO I/O through a PROFINET node and uses Pcs7AnIn for an analog input. Compilation nevertheless refers to CH_AI:
Necessary files are missing for block CH_AI. Please note that you have to install exactly the same version of the library as the one this block was imported from
This diagnostic identifies a block-library dependency. It does not itself identify a missing VIPA-specific library or prove that the GSD configuration is incorrect. In the reported case, the final successful action was CFC block-type cleanup, despite Pcs7AnIn being the intended channel block. That result is configuration-specific, not proof that every error naming CH_AI has the same cause.
Inspect Whether CH_AI Is Actually Needed
Before cleanup, preserve a recoverable project copy and record the installed PCS 7, CFC and channel-library versions. Inspect whether CH_AI still has an instance in the relevant chart folder or is required by other program content.
Siemens' CFC V9.0 SP5 manual distinguishes block types retained in the chart folder without any chart instances from offline block-folder content that can still be called by other blocks. This is the important mechanism: the intended visible Pcs7AnIn instance does not, by itself, prove that no older block type remains in project data.
If CH_AI is still genuinely used, cleanup is not a substitute for its matching library and associated supported engineering configuration.
Documented CFC Cleanup Procedure
For CFC V9.0 SP5, chapter 10.5.8 documents the following cleanup route. Confirm the installed CFC release before using it.
- Open a CFC chart for the affected AS.
- Select Options > Block Types....
- Select Clean up.
- Review Clean up blocks in CFC. It lists chart-folder types without chart instances. Select only confirmed unnecessary types and confirm with OK.
- Review Clean up blocks in block folder separately. Do not select everything automatically: Siemens warns that listed types can be called from other blocks even though they are not present in the CFC chart folder.
- Confirm only the reviewed, unnecessary block-folder selections.
Cleanup removes selected types from the respective offline folders. It is not a download operation or a device-driver installation. CFC manual, chapter 10.5.8, p. 119
Recompile and Continue Device Validation
Recompile the affected program using its normal project configuration and inspect the resulting diagnostics. The expected result for the stale-type case is that the unwanted CH_AI dependency no longer blocks compilation. If the error persists, determine whether CH_AI is still required and identify the exact originating library version before changing installed software.
Successful cleanup does not establish complete VIPA SLIO support. The PROFINET coupler, module identifiers, GSD version, I/O addressing, analog representation and required diagnostic behavior still need device-specific verification. No particular VIPA coupler model or manufacturer-supported PCS 7 integration procedure was established here.
Verification
Confirm that the intended Pcs7AnIn instance and its interconnections remain intact, that removed types were genuinely unnecessary, and that compilation no longer reports the original CH_AI dependency.
Before any production download, review the compilation results and test the device configuration in an authorized environment. Verify actual analog values and fault behavior separately from compilation. Neither GSD insertion nor a clean compiler log proves correct process measurement.
Limitations and Operational Precautions
The successful cleanup is reported for one PCS 7 V9.0 project; the exact installed CFC build was not given. The independently verified menu sequence and cleanup behavior are from CFC V9.0 SP5.
Keep a rollback copy and assess block dependencies before deleting offline types. Do not install an arbitrary legacy library or replace a required channel block solely to silence the diagnostic. A subsequent AS download requires its own operational review; no live-change or uninterrupted-operation guarantee follows from offline cleanup.
Engineer FAQ
Do I need a VIPA library because the error names CH_AI?
The message does not establish that. Investigate the named block dependency and its actual use first.
Can I remove every block offered in the second cleanup dialog?
No. The manual warns that those types can include blocks called indirectly by other program blocks.
Technical References
- Siemens — CFC for SIMATIC S7 V9.0 SP5, November 2020, A5E41356073-AF, chapter 10.5.8, p. 119 — exact cleanup commands, the two offline cleanup scopes and the indirect-call warning. This reference does not certify VIPA SLIO integration.