Eliminating Bad Signal Quality and Passivation During S7-PLCSIM Offline Testing in PCS 7
In SIMATIC PCS 7, when simulating a project offline in S7-PLCSIM after adding hardware configurations, channel driver blocks passivate and display 'Bad Signal' (quality code ST = 16#00) with yellow warning icons because physical I/O modules are unreached. To eliminate bad signal quality during offline testing: on modern APL channel drivers (Pcs7DiIn FB1865, Pcs7AnIn FB1869), set SimOn = TRUE and supply valid values to SimPV_In; on legacy driver blocks (CH_DI FB125, CH_DO FB126), set parameter MODE to 16#8000FFFF for digital inputs or 16#8000FFFE for digital outputs.
Table of Contents
- Signal Status Architecture and Passivation in PCS 7 Channel Drivers
- Why S7-PLCSIM Triggers Bad Quality Codes (ST = 16#00)
- Configuring Simulation Mode on Modern APL Channel Drivers
- Configuring MODE Parameters on Legacy Standard Library Drivers
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Signal Status Architecture and Passivation in PCS 7 Channel Drivers
In SIMATIC PCS 7, process automation logic relies on standardized channel driver blocks (Pcs7AnIn, Pcs7DiIn, Pcs7AnOu, Pcs7DiOu) to read physical hardware modules. When compiling charts with Generate Module Drivers enabled, the compiler automatically inserts diagnostic blocks (MOD_D1, MOD_HA, DPDIAGV0) to supervise the health of every I/O channel.
Each technological signal carries an IEEE 754 Signal Status byte (ST):
* 16#80: Good / Valid process measurement.
* 16#60 / 16#48: Simulation active / Valid simulated value.
* 16#00: Bad / Device passivated due to hardware failure or communication timeout.
Downstream technological blocks (MotL, VlvL, PIDConL) evaluate this status. If a channel passivates (ST = 16#00), the faceplate displays a yellow warning triangle, interlocks may trip, and automatic control is locked out.
Why S7-PLCSIM Triggers Bad Quality Codes (ST = 16#00)
When an engineer tests a project in S7-PLCSIM prior to configuring hardware, logic can run using simple memory markers. However, once the official Hardware Configuration (ET 200M/ET 200SP racks) is loaded:
* S7-PLCSIM simulates the S7-400 CPU memory, but does not emulate physical backplane bus ASICs or distributed ET 200 interface modules (6ES7153-2BA10-0XB0).
* The CPU operating system detects absent I/O racks and triggers OB86 (Rack Failure) and OB82 (Diagnostic Interrupt).
* The diagnostic block MOD_D1 detects that the hardware rack is missing and instructs the channel drivers to passivate their outputs.
* Consequently, all process values default to substitute values (0.0 or FALSE) with ST = 16#00.
Configuring Simulation Mode on Modern APL Channel Drivers
In the Advanced Process Library (APL), channel blocks incorporate dedicated simulation parameters to bypass hardware diagnostics during offline simulation:
SimOnBOOLFALSETRUE to disconnect hardware and activate simulation.SimPV_InREAL / BOOL0.0 / FALSEPV_Out.Value.SimLiOpSTRUCT01 to control simulation mode via external CFC logic.PV_Out.STBYTE16#8016#60 (Simulated Good) when SimOn = TRUE.Table 1: APL channel driver simulation parameters.
Setting SimOn = TRUE instructs the driver to ignore MOD_D1 rack fault telegrams, immediately restoring valid quality (16#60) on WinCC faceplates.
Configuring MODE Parameters on Legacy Standard Library Drivers
In legacy PCS 7 Standard Library blocks (such as CH_DI FB125 and CH_DO FB126), signal evaluation is governed by the MODE double-word parameter:
* In physical hardware, the PCS 7 Driver Generator automatically writes a hardware-specific descriptor into MODE (e.g., byte encoding measuring range and module type).
* In S7-PLCSIM without hardware, the driver generator leaves MODE in a faulted state, passivating the driver.
* Workaround for Legacy Drivers:
* On block CH_DI (FB125), set parameter MODE = 16#8000FFFF.
* On block CH_DO (FB126), set parameter MODE = 16#8000FFFE.
* The leading 16#8000 sets the high-order valid bit, forcing the driver to evaluate inputs as valid and clear the bad signal flag.
Verification
To confirm that signal passivation has cleared:
- In S7-PLCSIM, ensure the simulated S7-400 CPU is in
RUNmode. - Open the CFC chart in test mode: inspect
Pcs7DiInorPcs7AnIn. - Verify that
SimOn = TRUEandPV_Out.STindicates16#60. - In WinCC Runtime, open the connected technological faceplate (e.g.,
MotL):
* Confirm that the yellow exclamation/passivation badge is gone.
* Confirm that the blue simulation hand icon appears, indicating valid simulated status.
* Verify that operator start/stop commands function normally.
Limitations and Operational Precautions
- Never leave
SimOn = TRUEor forcedMODEvalues active when downloading software to a physical production controller on live plant equipment. - S7-PLCSIM does not simulate analog sensor conversion delays or fieldbus transmission latencies; use SIMIT Simulation Platform for realistic behavioral dynamics.
- Re-compiling CFC with Generate Module Drivers will overwrite manual interconnections on internal driver parameters; use the official simulation parameters (
SimOn,SimPV_In).
Engineer FAQ
Can I activate simulation for all channels globally?
Yes. In CFC, you can interconnect a centralized simulation control tag (e.g., from an internal DB or WinCC button) to the SimOn pins of all channel drivers to toggle plant simulation globally.
Why does WinCC show a blue hand icon when simulation is active?
The blue hand icon is the standardized APL visual indicator notifying operators that the process value is generated by software simulation rather than physical field instruments.
What is the difference between SimOn and Feature.Bit25?
SimOn activates basic software simulation on the driver block. Feature.Bit25 on certain technological blocks controls whether simulation mode can be toggled directly from operator faceplates.
Technical References
- SIMATIC Process Control System PCS 7 Advanced Process Library (A5E35003921)
- SIMATIC S7-PLCSIM V5.4 Operating Manual (A5E00996875)
- Siemens Industry Online Support: Simulating Channel Drivers in S7-PLCSIM (Entry ID 109780813)
- SIMATIC Process Control System PCS 7 Engineering System (A5E35003949)
Related Articles
- Simulating Fail-Safe Channel Drivers and Safety Parameters in SIMATIC S7 F-Systems
- Understanding APL Structured Data Types and Signal Status Propagation
- Setting Up S7-PLCSIM for Redundant and Safety-Related S7-400H Controllers
- Temporarily Suppressing Wire Break Alarms and Passivated Channels in SIMATIC PCS 7
Related Tags
- S7-PLCSIM
- Simulation
- Bad Signal
- Pcs7AnIn
- Pcs7DiIn
- Signal Status
- PCS 7