Best Practices for Structuring APL Channel Drivers and Control Blocks in PCS 7
In modern SIMATIC PCS 7 systems (V8.0 through V9.1 SP2 and higher), channel driver blocks (Pcs7DiIn, Pcs7AnIn, Pcs7DiOu) and technological control blocks (VlvL, MotL, PIDConL) should be structured using Control Module Types (CMT) in the Master Data Library, rather than compiling charts into monolithic block types. While early PCS 7 V6 training materials demonstrated compiling individual charts into custom function blocks, the modern Advanced Process Library (APL) relies on rich data structures containing both value and signal status (STRUCT: Value + ST). Compiling APL blocks into custom block types strips WinCC OS compile attributes (S7_m_c), destroys automated module driver generation, and prevents WinCC faceplate integration.
Table of Contents
- Evolution of PCS 7 Architecture: Classic V6 vs. Modern APL
- The Role of APL Structures: Process Value and Signal Status (ST)
- Why Compiling Charts to Blocks Breaks Modern PCS 7 Systems
- Method: Implementing Reusable Modules via Control Module Types (CMT)
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Evolution of PCS 7 Architecture: Classic V6 vs. Modern APL
Engineers transitioning from older PCS 7 versions (such as V6.x tutorials) frequently encounter fundamental architectural differences in modern PCS 7 releases:
- Legacy Approach (PCS 7 V6): Engineers created elementary charts containing raw I/O channel drivers, logic gates, and basic control blocks, then executed "Compile Chart as Block Type" to produce a single custom Function Block (FB). Tag types were subsequently used for replication.
- Modern APL Approach (PCS 7 V8/V9): PCS 7 standardized on autonomous, highly parameterized technological blocks equipped with standardized faceplates, alarm management, and driver autogeneration.
- The Modern Paradigm: Reusability is achieved through Control Module Types (CMT) and Equipment Modules (EMT) managed in the project's Master Data Library (MDL).
The Role of APL Structures: Process Value and Signal Status (ST)
A primary distinction of the Advanced Process Library is the elimination of raw elementary data types in favor of compound structures compliant with NAMUR NE 107:
ValueREAL or BOOLST (Signal Status)BYTE16#80: Good, 16#60: Simulated, 16#00: Bad/Wire Break).Channel driver blocks (Pcs7DiIn, Pcs7AnIn) read raw field data, evaluate hardware health via system diagnostic blocks, and package the measurement into an output structure:
Out : STRUCT
Value : REAL; // Process value
ST : BYTE; // Quality status (Good/Bad/Uncertain)
END_STRUCT;
Technological blocks (PIDConL, VlvL) evaluate this signal status directly. If a channel driver detects a wire break, ST changes to 16#00, causing the downstream motor or valve to enter a configurable safe fallback position automatically without requiring custom interlock code.
Why Compiling Charts to Blocks Breaks Modern PCS 7 Systems
Attempting to place APL channel drivers and control blocks into a CFC chart and compiling that chart into a single block type triggers catastrophic DCS breakdowns:
* Loss of WinCC OS Attributes (S7_m_c): When WinCC compiles the operator station, it scans the top-level interfaces of blocks in the chart. When blocks are embedded inside a compiled block type, their individual S7_m_c attributes become hidden multi-instance variables. WinCC cannot generate individual faceplates, trend curves, or alarm messages for the nested valve or motor.
* Driver Generator Failure: The PCS 7 Driver Generator (Generate module drivers) automatically routes diagnostic connections between physical hardware modules and channel drivers. The generator cannot penetrate custom composite block types to wire diagnostic signals.
* Structure Manipulation Bottlenecks: Standard logic blocks (such as AND, OR, ADD) operate on primitive types (BOOL, REAL). Connecting APL structures to primitive logic requires converter blocks (StruDiIn, StruAnIn), vastly increasing complexity inside a compiled block.
Method: Implementing Reusable Modules via Control Module Types (CMT)
The industry-standard methodology for creating standardized typicals (e.g., 100 identical valves with channel drivers and interlocks) is Control Module Types:
Step 1: Create the CMT Template in the Master Data Library
- In SIMATIC Manager, navigate to the Master Data Library -> Templates.
- Right-click and select Insert New Object -> Control Module Type.
- Name the template (e.g.,
CMT_Valve_APL). - Open the CMT in the CFC editor.
Step 2: Assemble Technological and Driver Blocks
- From the APL catalog, insert:
-VlvL(FB1899) as the core valve control block.
-Pcs7DiIn(FB1871) for Open Feedback (FbkOpen).
-Pcs7DiIn(FB1871) for Closed Feedback (FbkClose).
-Pcs7DiOu(FB1873) for Open Command (Ctrl). - Interconnect the driver output structures directly to the valve inputs:
- ConnectPcs7DiIn_1.OuttoVlvL.FbkOpen.
- ConnectPcs7DiIn_2.OuttoVlvL.FbkClose.
- ConnectVlvL.CtrltoPcs7DiOu.In.
Step 3: Configure the Technological Interface
- Open the Technological Editor (View -> Technological Editor).
- Define the technological inputs and outputs that will receive physical field addresses:
- DragPcs7DiIn_1.PV_Into the interface pane and label itField_Feedback_Open.
- DragPcs7DiIn_2.PV_Into the interface pane and label itField_Feedback_Close.
- DragPcs7DiOu.PV_Outto the interface pane and label itField_Output_Sol.
Step 4: Instantiate and Synchronize Across the Plant Hierarchy
- In the Plant View, drag
CMT_Valve_APLinto any plant hierarchy folder (e.g.,Plant1/AreaA/Valves). - Assign the instance tag name (e.g.,
XV_201). - Connect the physical field I/O addresses to the exposed technological inputs.
- When library updates occur, run Options -> 'Plant Types' -> Synchronize to update all instantiated valves across the entire plant simultaneously.
Verification
To verify that the modern CMT structure functions correctly:
- In SIMATIC Manager, execute Chart -> Compile -> Charts as Program with Generate module drivers checked: confirm that the driver generator automatically populates the @ diagnostic charts and binds hardware addresses without warnings.
- Run an OS Compile: confirm that WinCC generates the individual block icons for every instantiated valve and maps all alarm texts.
- Open WinCC Runtime: verify that clicking the block icon opens the standard APL faceplate, displaying live process values, simulation indicators, and signal status bytes (ST).
Limitations and Operational Precautions
- Do Not Mix CMT and Legacy Tag Types: Facilities operating modern PCS 7 versions should migrate legacy Tag Types / Models to Control Module Types. Mixing both architectures within the same multiproject complicates library synchronization.
- Process Object (PO) Accounting: Each instantiated APL block counts toward the AS runtime PO license count upon OS compilation. Ensure the CPU System Expansion Card (SEC) is sized appropriately.
- Avoid Nested CMT Complexities: Keep Control Module Types focused on single technological units (a motor, a valve, a transmitter). For coordinating entire unit operations, use Equipment Modules (EMT) or SFC Types.
Engineer FAQ
Why did older PCS 7 manuals recommend compiling charts to blocks?
In PCS 7 V5 and V6, Control Module Types did not exist, and CPU memory was severely limited. Compiling charts to blocks was a workaround to save memory and encapsulate repetitive code before modern object-oriented DCS architectures matured.
Can I connect a primitive BOOL output to an APL STRUCT input?
No. An APL structure requires both Value (BOOL) and ST (BYTE). If connecting non-APL logic, use the converter block StruDiIn to combine a boolean signal with an explicit signal status byte.
What is the advantage of CMT over simply copying and pasting CFC charts?
Copying and pasting creates static, unlinked duplicates. If a bug is discovered or an enhancement is required, every pasted chart must be edited manually. With CMT, editing the Master Data Library template propagates modifications across hundreds of instances automatically.
Does the Driver Generator work with non-Siemens fieldbus devices?
Yes, provided an approved GSDML/GSD file is installed and the field device addresses map to supported channel driver blocks (FbAmPn, FbDiPn, Pcs7AnIn).
Technical References
- Siemens Industry Online Support: SIMATIC PCS 7 Advanced Process Library (APL) Manual.
- SIOS Entry 109742323: PCS 7 Compendium Part A - Configuration Guidelines (Section: CMT Engineering).
- NAMUR Recommendation NE 107: Self-Monitoring and Diagnosis of Field Devices.
- Siemens Programming Guideline: Control Module Type (CMT) Engineering in SIMATIC PCS 7.
Related Articles
- How to Structure Program Data in PCS 7: Moving from TIA Portal to Control Module Types
- How to Resolve SCL Syntax Errors When Compiling CFC Charts as Block Types in PCS 7
- How to Create and Name Custom Block Icons in SIMATIC PCS 7 OS
Related Tags
- APL
- Channel Drivers
- Control Module Types
- PCS 7
- CFC
- NAMUR NE 107
- Industrial Automation