Preventing Interconnection Loss Between StrctCom and APL Feature Pins During Driver Generation

Preventing Interconnection Loss Between StrctCom and APL Feature Pins During Driver Generation

Interconnections between the StrctCom block and APL Feature pins break during chart compilation with 'Generate module drivers' enabled when the project's internal cross-reference pointers are corrupted or when an element-level structural interconnection violates driver generator rules. In PCS 7 Advanced Process Library, the driver generator manages hardware diagnostic channels and verifies structural block pins. Performing a 'Save As... With Reorganization (Slow)' in SIMATIC Manager and establishing type-safe connections via StrgCom or configuring Feature bits directly within Control Module Types prevents connection deletion.

Table of Contents

Mechanism of APL Feature Pins and Module Driver Generation

In the SIMATIC PCS 7 Advanced Process Library (APL), blocks such as Pcs7AnIn, MotL, and VlvL control their operational characteristics through structured configuration inputs named Feature and Feature2. These inputs are 32-bit structured types (Struct of Bit0 through Bit31) defining parameters such as startup behavior, reset modes, and alarm response.

During CFC compilation, enabling the option Generate module drivers triggers the PCS 7 Driver Generator. This automated compiler engine scans the hardware configuration (HW Config) and all CFC charts to instantiate diagnostic driver blocks (e.g., MOD_D16_PN, RACK, SUBNET) in @ system charts and connects them to process channel blocks.

As part of this compilation pass, the driver generator validates signal paths, diagnostic links, and structured I/O interconnections across all charts in the target CPU. If a connection involves an incompatible structural adapter or corrupted project database references, the generator removes the invalid interconnection to guarantee system stability.

Root Causes of Broken Structural Interconnections

When an engineer connects StrctCom (a block used to combine individual Boolean signals into a structured bit collection) to the Feature input of an APL block, the link can be purged during compilation due to two primary issues:

  1. Database Pointer Fragmentation / Cross-Reference Inconsistencies: Over extended engineering cycles with frequent copy-paste operations across charts, the Step 7 database cross-reference table can retain dangling pointers. When the module driver generator rebuilds chart networks, it detects an internal consistency error on the pin and drops the link.
  2. Structure Type Definition Mismatch: StrctCom generates a generic structure format. APL Feature inputs require a strictly typed 32-bit feature structure defined by the PCS 7 APL data dictionary. Connecting non-standard or partially populated structures causes the compiler's strict structural type-checking routine to flag the connection as invalid during the driver generation phase.

Corrective Procedures and Recommended Engineering Workflows

To prevent interconnection breakage and maintain stable APL feature configuration, execute the following corrective steps:

  1. Perform Database Reorganization:
    * In SIMATIC Manager, close all open CFC charts and editors.
    * Select File -> Save As....
    * Check the radio button With Reorganization (Slow).
    * Provide a new project name or path and click OK. This process physically rebuilds the database, reorganizes internal ID tables, and purges orphaned pointer records.
  2. Standard APL Method: Configure Feature Bits Directly:
    * Instead of using runtime logic to dynamically manipulate feature bits via StrctCom, configure the Feature input statically in the block I/O properties dialog or through Control Module Types (CMT).
    * In CFC, double-click the block, open the I/Os tab, expand the Feature structure, and configure individual bits (e.g., Feature.Bit0 = 1).
  3. Alternative: Utilize Type-Safe Struct Converters:
    * If dynamic runtime switching of feature bits is genuinely required, use the designated APL structure converter blocks such as StrgCom or create a customized, type-compliant UDT that exactly mirrors the 32-bit APL Feature structure layout.

Verification

  • In SIMATIC Manager, open the CFC chart and re-establish the connection to the Feature pin.
  • Initiate chart compilation: Select PLC -> Compile -> Charts as Program.
  • Ensure the check box Generate module drivers is enabled. Select Changes only or Entire program.
  • After compilation completes with zero errors and zero warnings, reopen the CFC chart. Confirm that the interconnection to the Feature input remains intact and highlighted in green/blue.

Limitations and Operational Precautions

  • Modifying Feature bits at runtime while a process is operating can alter interlocking, reset, or tracking behaviors unexpectedly. APL feature bits are designed primarily for static plant configuration.
  • Reorganization (Slow) can take several minutes on large multiprojects. Ensure that no other engineers have projects checked out in multi-user engineering mode during reorganization.

Engineer FAQ

  • Can Feature bits be dynamically toggled by PLC logic?
    While physically possible if interconnected to an external block, Siemens strongly advises configuring Feature bits statically during engineering. Dynamic changes can cause transient discrepancies during warm restarts.
  • Why did the connection work during CFC editing but break only during compilation?
    The graphical CFC editor only checks basic pin connectivity rules at the time of drawing. Comprehensive type safety and structural validation are executed by the compiler when 'Generate module drivers' runs.
  • What is the difference between StrctCom and StrgCom?
    StrctCom is an older system block for assembling generic structures, whereas StrgCom and newer APL converter blocks enforce strict data type compatibility aligned with modern APL conventions.

Technical References

  • SIMATIC PCS 7 Advanced Process Library (APL) Function Manual (A5E43360408-AA).
  • SIMATIC PCS 7 CFC for S7 / M7 Manual (A5E41356247-AA).
  • Siemens Industry Online Support Entry ID 109801081: Module Driver Generation and Interconnection Rules.

Related Articles

Related Tags

PCS 7, APL, CFC, Feature Bits, Pcs7AnIn, StrctCom, Module Drivers, Simatic Manager

20 respuestas