Retaining Output Channel Driver States Across CPU Restart and Module Driver Generation in PCS 7
In SIMATIC PCS 7 APL, manually modifying Feature Bit 0 or start values directly on output channel driver blocks (Pcs7AnOu / Pcs7DiOu) is repeatedly overwritten because the Module Driver Generator derives these parameters from Hardware Configuration (HW Config). During CFC compilation with 'Generate module drivers' selected, PCS 7 inspects the hardware properties of the ET 200 output module. If the hardware module's restart reaction is left at factory defaults, the compiler forces Feature Bit 0 back to 1 and resets the start value to 0. To permanently retain output states (such as holding valve positions across a CPU restart), you must configure the restart reaction and substitute value directly within the module properties in HW Config, compile the hardware, and then compile CFC with module drivers.
Table of Contents
- Executive Summary
- Architecture and Fundamental Mechanics
- Step-by-Step Implementation Procedure
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Executive Summary
In continuous process manufacturing facilities governed by SIMATIC PCS 7 (such as petrochemical refining and specialty chemical synthesis), critical hydraulic isolation valves and pressure-relief actuators must maintain their last commanded position across automation station restarts or planned hardware upgrades. Automation engineers frequently attempt to configure this behavior by setting Feature.Bit0 and adjusting start values directly on the APL output channel driver blocks (Pcs7AnOu, Pcs7DiOu). However, upon the next routine CFC compilation with 'Generate module drivers' enabled, the compiler overwrites these block pins back to factory defaults. This article explains the hierarchical relationship between HW Config and the Module Driver Generator, and details the correct configuration workflow in HW Config to preserve output states permanently.
Architecture and Fundamental Mechanics
Module Driver Generator Hierarchy and Feature Bit 0 Mechanics:
- The Role of the Module Driver Generator in PCS 7:
- PCS 7 automates field device diagnostics and channel mapping via the Module Driver Generator.
- When 'Generate module drivers' is selected during CFC compilation, the compiler queries the STEP 7 Hardware Configuration database and instantiates diagnostic blocks (
MOD_D1,RACK,SUBNET) and channel drivers (Pcs7AnOu,Pcs7DiOu). -
Channel driver blocks act as pure software adapters between technological APL control blocks (e.g.
VlvL,MotL) and physical I/O hardware addresses. -
Why Direct CFC Parameterization is Overwritten:
Feature.Bit0onPcs7AnOuandPcs7DiOudefines: 'Set start value after CPU restart' (1 = Set start value, 0 = Do not set start value / hold process state).- By design, the Module Driver Generator treats HW Config as the authoritative master. On every compilation pass, the generator inspects the module parameters configured in HW Config for that specific channel.
-
If an engineer sets
Feature.Bit0 := 0in CFC, the Module Driver Generator interprets this as an unmanaged deviation from HW Config, deletes the connection, and re-imposes the hardware-defined parameter values. -
Hardware-Driven Parameter Propagation:
- Output modules (e.g. ET 200M
6ES7322-8BH01-0AB0or ET 200SP output modules) support configurable parameters in HW Config, including 'Reaction to CPU STOP' (Substitute value or Keep last value) and startup parameterization. - When configured in HW Config, the compiler automatically reads these attributes and sets
Feature.Bit0andStartValon the generated channel driver blocks accordingly.
Step-by-Step Implementation Procedure
-
Verify Hardware Module Support for Substitute / Retentive Values:
* In SIMATIC Manager, open HW Config for the automation station.
* Locate the physical digital or analog output module driving the critical valves.
* Verify that the module type supports configurable startup/substitute behavior (e.g. ET 200M high-feature modules like6ES7322-8BH01-0AB0or fail-safe output modules; standard unmanaged commercial cards may lack this feature). -
Configure Restart Behavior in HW Config:
* Double-click the output module in HW Config to open its Properties dialog.
* Navigate to the 'Parameters' or 'Outputs' tab.
* Locate 'Reaction to CPU STOP / Restart'.
* Change the setting from 'De-energized' (0) to 'Retain last value' (Keep last value) or specify a dedicated substitute value (e.g. Hold Open).
* Click OK to save module parameters. -
Save and Compile HW Config:
* In HW Config, selectStation -> Save and Compile.
* Download Hardware Configuration to the target CPU during an authorized maintenance window. -
Compile CFC with 'Generate Module Drivers':
* Open any CFC chart in the project.
* SelectChart -> Compile -> Changes Only.
* Ensure the checkbox Generate module drivers is checked.
* Execute compilation.
* The compiler reads the updated HW Config database and automatically configuresFeature.Bit0and start values on all associatedPcs7AnOu/Pcs7DiOublocks. -
Verify in CFC Test Mode:
* Open the CFC chart containing the output channel driver.
* Verify thatFeature.Bit0reflects the HW Config parameterization and is no longer reset on subsequent compilations.
Verification
Verify Retentive Output Behavior and Driver Stability:
1. In CFC editor, verify that Pcs7AnOu.Feature.Bit0 and StartVal match the configured HW Config settings.
2. Make an arbitrary change in an unrelated CFC chart, execute 'Compile with Generate module drivers', and confirm that the channel driver settings remain completely intact.
3. During a planned CPU warm restart (OB100), verify that field hydraulic valves hold their commanded positions without momentary de-energization dips.
Limitations and Operational Precautions
Operational Precautions and Process Safety Constraints:
- Holding valve states across a CPU restart must comply with plant process safety requirements. Never configure emergency blowdown or toxic isolation valves to 'Retain last value' if plant safety standards mandate a fail-safe de-energized state upon system disruption.
- Downloading HW Config requires a CPU stop on standard non-redundant S7-400 systems; on redundant S7-400H systems, use Configuration in RUN (CiR) where supported.
Engineer FAQ
Why does 'Generate module drivers' keep overwriting Feature Bit 0 in CFC?
The Module Driver Generator derives channel driver parameters from HW Config. Any manual changes made in CFC are treated as discrepancies and overwritten during the next compilation pass.
Where do I configure the restart behavior for Pcs7AnOu and Pcs7DiOu?
In HW Config, inside the Module Properties dialog of the physical ET 200 output card under the 'Parameters' tab.
Does parameter readback protect channel driver settings from being overwritten?
No. Parameter readback preserves block values in the database, but 'Generate module drivers' regenerates driver interconnections and re-applies HW Config values over readback data.
Can all digital output cards retain their values across a restart?
No. Only advanced or high-feature output modules (such as 6ES7322-8BH01-0AB0) support configurable restart reactions; basic standard output cards default to de-energized (0).
What does Feature.Bit0 do on APL output driver blocks?
Feature.Bit0 defines whether the block writes a defined start value to the hardware output immediately upon CPU restart (1 = write start value, 0 = do not write start value / maintain state).
Technical References
- SIMATIC PCS 7 Advanced Process Library (APL) V9.0 Manual
- SIMATIC PCS 7 Basis Library V9.0 Manual
- SIMATIC S7-400 S7-300 ET 200M Module Data Manual
Related Articles
- CPU Restart Behavior in PCS 7 - Warm Restart vs Cold Restart and Retaining Readback Setpoints
- Resolving Module Driver Generation Errors during Migration from PCS 7 V8.0 to V9.0
- Implementing Redundant Analog Input Channels with Pcs7AnIn in SIMATIC PCS 7 V9.0
- Managing S7-400 Local Data Stack Allocation and Resolving CFC Compilation Exhaustion
Related Tags
- Module Drivers
- Pcs7AnOu
- Pcs7DiOu
- Feature Bit 0
- HW Config
- CPU Restart
- ET 200M
- PCS 7 V9.0