Understanding 'Generate Module Drivers' in SIMATIC PCS 7: Function, OS Impact, and Execution Rules
In SIMATIC PCS 7 CFC, 'Generate Module Drivers' automatically constructs system diagnostic charts (prefixed with '@') that query hardware status from STEP 7 HW Config, wire diagnostic interrupt blocks (OB82-OB86), and interconnect channel drivers with raw I/O addresses. This mechanism generates system diagnostic alarms on the WinCC OS, sets signal quality status (ST), and enables Asset Management. Always check this option when hardware configurations or channel block assignments change.
Table of Contents
- What Are Module Drivers in SIMATIC PCS 7
- Internal Mechanics of the Driver Wizard and '@' System Charts
- Impact of Module Drivers on the WinCC Operator Station
- Compilation Execution Rules and Checkbox Behavior
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
What Are Module Drivers in SIMATIC PCS 7
In standard PLC programming (such as basic STEP 7 Classic or TIA Portal), an engineer who reads an analog input (PIW 512) must manually write ladder or SCL logic to monitor hardware diagnostics: handling organization blocks (OB82 for diagnostic interrupts, OB83 for module removal/insertion, OB85/OB86 for rack failures, and OB122 for I/O access errors). If a wire breaks or a remote I/O head station loses communication, custom logic is required to invalidate process values and generate alarms.
In SIMATIC PCS 7, this manual programming is entirely eliminated through the PCS 7 Driver Concept and the Driver Wizard (Generate module drivers):
1. The automation engineer places technological blocks (e.g. MotL, VlvL, PIDConL) and channel driver blocks (e.g. Pcs7AnIn, Pcs7DiIn, Pcs7AnOu, Pcs7DiOu) into CFC charts.
2. The channel driver blocks are interconnected to symbolic hardware addresses (e.g. Pcs7AnIn.PV_In connected to FT_101_PV).
3. During CFC compilation, checking the box Generate module drivers instructs the compiler to analyze the entire hardware topology defined in STEP 7 HW Config and automatically construct the underlying diagnostic infrastructure.
Internal Mechanics of the Driver Wizard and '@' System Charts
When 'Generate module drivers' executes, the compiler carries out several complex automated tasks:
-
Generation of System CFC Charts (
@Charts):
* The compiler creates dedicated system charts identified by an@prefix (e.g.,@(1),@(2),@(3)).
* These charts are placed into the Chart folder and assigned to appropriate execution tasks (OB100 for restart, OB1 for background, and OB8x for diagnostic interrupts). -
Instantiation of Diagnostic Blocks:
* The Driver Wizard instantiates modular diagnostic blocks based on the hardware catalog definition:MOD_D1/MOD_D2: Monitors digital I/O modules.MOD_HA/MOD_D8_4: Monitors ET 200SP HA and ET 200M analog/digital cards.RACK: Monitors physical subracks, backplanes, and power supplies.SUBNET: Monitors PROFINET and PROFIBUS DP bus lines.CPU_RT: Monitors controller runtime health and cycle time overruns.
-
Wiring Parameter and Status Words:
* The Driver Wizard connects hardware logical base addresses (LADDR), diagnostic addresses (DADDR), and channel numbers to the diagnostic blocks.
* It routes the module operating mode word (MODE) to the channel blocks (Pcs7AnIn.MODE). If an analog card channel is configured in HW Config for4..20 mA 2-wire, the MODE parameter automatically receives the appropriate hex code (e.g.16#02030004).
* It interconnects the diagnostic quality code (QualityCode/ST). If a channel suffers a wire break, the diagnostic block detects the event, setsBad = 1andST = 16#00on the channel driver, which propagates immediately to technological blocks.
Impact of Module Drivers on the WinCC Operator Station
The module driver architecture directly drives operator station behavior:
- Automatic System Diagnostic Alarms: When a field wire breaks, an interface module faults, or a power supply fails, the module driver generates standard system messages on the WinCC OS (e.g., 'I/O Module Fault: Rack 1, Slot 4, Channel 2 - Wire Break'). No custom alarm scripting is required.
- Technological Faceplate Degradation: Technological blocks (such as
MonAnLorPIDConL) evaluate the signal status (ST). If the module driver reports bad quality, the faceplate immediately displays a yellow warning triangle or red fault cross, disables automatic control mode, and commands actuators to configured safe positions. - Maintenance Station (Asset Management) Integration: The hierarchy generated by module drivers populates the PCS 7 Maintenance Station. Operators and maintenance personnel can drill down from the plant overview into individual subracks, modules, and channel diagnostics according to NAMUR NE 107 standards.
Compilation Execution Rules and Checkbox Behavior
@ system charts, address mappings, and MODE settingsPcs7AnIn, Pcs7DiIn)@ chartsNote: If 'Generate module drivers' is skipped after inserting a new Pcs7AnIn block, its input MODE remains unlinked (16#00000000). In runtime, the block will report Bad = 1 and fail to read field values.
Verification
- In STEP 7 HW Config, insert an analog input module and assign symbolic address
FT_201_PV. - In a CFC chart, insert
Pcs7AnInand connect inputPV_Into symbolFT_201_PV. - In CFC, select Chart > Compile > Charts as Program. Ensure Generate module drivers is checked.
- Open the Chart folder; verify that
@system charts (e.g.@(1)) have been generated. - Inspect the
Pcs7AnInblock in CFC; confirm inputMODEis automatically interconnected to a diagnostic block output in the@chart. - Compile and download to S7-PLCSIM; verify
Pcs7AnIn.Bad = 0andPcs7AnIn.PV_Out.ST = 16#80(Good).
Limitations and Operational Precautions
- Never Manually Edit
@Charts: Do not move, rename, delete, or manually alter connections inside@charts. During subsequent compilations, the Driver Wizard deletes and regenerates these charts, wiping out manual edits. - Catalog Profile Selection: Always select the PCS 7 Vx.y catalog profile in HW Config (
Options > Specify Module...). Selecting generic modules from the standard STEP 7 catalog may cause module driver generation to fail. - Compilation Time Optimization: On large plants exceeding 2,000 Process Objects, compiling with 'Generate module drivers' takes significantly longer. If only modifying internal calculation math or timers, unchecking the box saves substantial engineering time.
Engineer FAQ
Why does my new analog input show Bad=1 even though the transmitter is working?
You likely compiled CFC without checking 'Generate module drivers'. Without driver generation, the block's MODE input is uninitialized, causing the channel driver to treat the module as invalid.
Can I delete @ system charts if my chart folder becomes cluttered?
No. Deleting @ charts removes all diagnostic interrupt handlers, leaving your technological blocks blind to hardware faults. The compiler will re-create them upon the next full compile.
What is the difference between Classic drivers (CH_AI) and APL drivers (Pcs7AnIn)?
Classic drivers output simple values and separate quality bits, while APL drivers output structured variables (STRUCT) containing value and IEEE 8-bit signal status (ST), integrating seamlessly with APL faceplates.
Technical References
- SIMATIC Process Control System PCS 7 CFC for S7 (V8.1) Programming and Operating Manual
- SIMATIC Process Control System PCS 7 Engineering System Compendium Part A
- SIMATIC Process Control System PCS 7 Advanced Process Library (APL) Manual
- Siemens Industry Online Support: The PCS 7 Driver Concept (SIOS Entry ID 109780813)
Related Articles
- Troubleshooting Module Driver Generation Errors in SIMATIC CFC
- Configuring Maintenance Station Basic and Standard in SIMATIC PCS 7
- APL Signal Status Propagation and Quality Code Architecture
Related Tags
- Generate Module Drivers
- Driver Wizard
- CFC
- Pcs7AnIn
- MOD_HA
- Asset Management