Simulating Fail-Safe Analog Input Channel Drivers (F_CH_AI) in S7-PLCSIM with S7 F-Systems
In SIMATIC PCS 7 with S7 F-Systems, fail-safe analog channel drivers (such as F_CH_AI) cannot be simulated simply by writing raw peripheral values into S7-PLCSIM because the block requires active PROFIsafe communication. Without physical or emulated PROFIsafe communication, the block passivates the channel, forcing QBAD = 1 and clamping the output V to 0.0. To simulate F_CH_AI, you must activate internal simulation by setting input SIM_ON = 1, write the desired process value to SIM_V, and execute a fail-safe reintegration handshake by pulsing ACK_REI = 1 to clear passivation.
Table of Contents
- Why Standard PLCSIM Peripheral Writes Fail on F-Blocks
- PROFIsafe Communication and Passivation Architecture
- Comparison Table - F_CH_AI Operational and Simulation Parameters
- Step-by-Step Simulation and Depassivation Procedure
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Why Standard PLCSIM Peripheral Writes Fail on F-Blocks
When commissioning or testing standard PCS 7 automation logic using S7-PLCSIM, engineers routinely write simulated sensor counts into peripheral input words (PIWxxx) via the PLCSIM variable view. The standard channel driver (Pcs7AnIn or CH_AI) reads the word and scales it into engineering units.
However, when this technique is attempted on fail-safe channel driver blocks such as F_CH_AI (FB 327 / FB 377) from the S7 F-Systems Lib, the simulated value is completely ignored:
* The driver output V remains permanently clamped at 0.0.
* The fail-safe bad quality output asserts QBAD = 1.
* The passivation output asserts PASS_OUT = 1.
This behavior occurs because fail-safe signal acquisition adheres to strict IEC 61508 / EN 954-1 / ISO 13849 safety principles. Fail-safe blocks reject uncertified memory writes and demand cryptographically secured PROFIsafe telegram communication.
PROFIsafe Communication and Passivation Architecture
In real hardware, an F_CH_AI driver communicates with a fail-safe analog input module (such as ET 200M SM 336 F-AI 6ES7336-4GE00-0AB0):
1. PROFIsafe Telegram Validation: The F-driver exchanges 12-byte PROFIsafe V2 telegrams containing consecutive message sequence numbers, virtual time-stamps, and a 32-bit CRC signature.
2. Channel Passivation: In S7-PLCSIM, the emulated CPU does not receive cyclic PROFIsafe response telegrams from non-existent physical modules. The driver detects a communication loss and immediately transitions the channel into Passivation mode, outputting preconfigured fail-safe substitute values (typically zero) to prevent unsafe machine operation.
3. Reintegration Handshake Requirement: Once passivated, S7 F-Systems blocks latch the faulted state. Even if healthy values are subsequently provided, the channel remains passivated until an operator or safety logic delivers a positive-edge acknowledgment pulse to ACK_REI.
Comparison Table - F_CH_AI Operational and Simulation Parameters
The following table details the key control and diagnostic pins of F_CH_AI used during simulation and normal operation.
SIM_ONFALSETRUESIM_V0.045.5 PSI)ACK_REIFALSE0 -> 1)PASS_ONFALSEFALSEV0.0QBADTRUEFALSE when simulation activePASS_OUTTRUEFALSE upon ACK_REI pulseStep-by-Step Simulation and Depassivation Procedure
To simulate analog values on F_CH_AI in S7-PLCSIM without hardware, execute the following verified procedure:
-
Open CFC Chart in Test Mode:
* Open the CFC chart containing theF_CH_AIblock.
* Click the Test Mode (glasses) icon to connect to S7-PLCSIM online.
* Verify thatQBAD = TRUEandPASS_OUT = TRUE. -
Activate Internal Simulation:
* Locate the input pinSIM_ON.
* Right-clickSIM_ON, open properties, and set its value toTRUE.
* Confirm the parameter change. The block now switches from physical PROFIsafe telegram evaluation to internal simulation mode. -
Inject Simulated Process Value:
* Locate the input pinSIM_V.
* Enter the desired floating-point simulation value (e.g.,75.0).
* Confirm the change. Notice thatVmay still report0.0if the channel was previously passivated. -
Execute Fail-Safe Depassivation (Reintegration):
* Locate the input pinACK_REI(or the central reintegration blockF_ACK_GL).
* Apply a rising-edge pulse: SetACK_REI = TRUE, wait one cycle, then setACK_REI = FALSE.
* In response, the block resetsPASS_OUT = FALSEandQBAD = FALSE.
* OutputVimmediately mirrorsSIM_V(75.0), allowing downstream safety interlocks, ESD matrices, and trip limits to be tested.
Verification
Confirm that the fail-safe simulation is active and valid:
- Verify Driver Output Values:
* In CFC Test Mode, confirm thatF_CH_AI.Vreflects the exact value written toSIM_V.
* Confirm thatQBAD = FALSEandPASS_OUT = FALSE. - Test Trip Logic Propagation:
* ChangeSIM_Vto exceed a high-trip threshold.
* Confirm that downstream safety comparator blocks (e.g.,F_CMP_R) trip as intended. - Verify Simulation Diagnostic Annunciation:
* If the safety signal is linked to WinCC faceplates via an F-to-Non-F data conversion block (F_BO_F), verify that the operator faceplate indicates Simulation active.
Limitations and Operational Precautions
- Mandatory Deactivation Before Production: Simulation inputs (
SIM_ON) must never be left enabled in production plants. Before commissioning with physical I/O, execute a safety program cross-reference to verify allSIM_ONpins areFALSE. - Safety Password Enforcement: Modifying parameters online on safety blocks in S7-PLCSIM requires entering the Safety Program Password.
- PLCSIM Version Requirements: Ensure S7-PLCSIM version V5.4 SP4 or higher is used; earlier versions lacked complete support for S7 F-Systems safety runtime groups.
Engineer FAQ
Can I simulate F_CH_AI by writing directly to peripheral memory in PLCSIM?
No. F-channel drivers ignore standard peripheral memory writes because they require verified PROFIsafe data packets. You must use the built-in SIM_ON and SIM_V simulation pins.
What is F_ACK_GL and how does it relate to ACK_REI?
F_ACK_GL is the central global reintegration block in S7 F-Systems. Connecting an operator push-button to F_ACK_GL broadcasts a synchronized acknowledgment pulse across all passivated F-channel drivers simultaneously.
Why does V revert to 0.0 when I change SIM_V?
If SIM_V is set out-of-range or if a fault condition occurs, the block may re-passivate. Check whether QBAD has reverted to TRUE and re-apply an ACK_REI pulse.
Can digital fail-safe drivers (F_CH_DI) be simulated the same way?
Yes. F_CH_DI features identical simulation pins: SIM_ON, SIM_I (boolean simulated input), and ACK_REI.
Technical References
- SIMATIC S7 F/FH Systems - Configuring and Programming Manual
- SIMATIC S7-PLCSIM Testing Your S7 Program User Manual
- PROFIsafe System Description - Technology and Application (PI Standard)
Related Articles
- How to Optimize and Reduce S7 F-Systems CFC Compilation Times in SIMATIC PCS 7
- Resolving S7 F-Systems Safety Compilation Errors - 64 KB Code Section Limits
- Configuring Interlock, Protect, and Permit Inputs with Faceplate Reset on APL VlvL
Related Tags
- S7-F-Systems
- PLCSIM
- F_CH_AI
- PROFIsafe
- Passivation
- Safety-Simulation