Simulating Fail-Safe Analog Input Channel Drivers (F_CH_AI) in S7-PLCSIM with S7 F-Systems

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

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.

Parameter NameData TypeDirectionDefaultFunction during SimulationSIM_ONBOOLInputFALSEEnables internal simulation; must be set to TRUESIM_VREALInput0.0Injected engineering value (e.g., 45.5 PSI)ACK_REIBOOLInputFALSEFail-safe reintegration acknowledgment pulse (0 -> 1)PASS_ONBOOLInputFALSEExternal passivation command; ensure set to FALSEVREALOutput0.0Output process value processed by downstream safety logicQBADBOOLOutputTRUEBad quality flag; transitions to FALSE when simulation activePASS_OUTBOOLOutputTRUEPassivation active flag; clears to FALSE upon ACK_REI pulse

Step-by-Step Simulation and Depassivation Procedure

To simulate analog values on F_CH_AI in S7-PLCSIM without hardware, execute the following verified procedure:

  1. Open CFC Chart in Test Mode:
    * Open the CFC chart containing the F_CH_AI block.
    * Click the Test Mode (glasses) icon to connect to S7-PLCSIM online.
    * Verify that QBAD = TRUE and PASS_OUT = TRUE.

  2. Activate Internal Simulation:
    * Locate the input pin SIM_ON.
    * Right-click SIM_ON, open properties, and set its value to TRUE.
    * Confirm the parameter change. The block now switches from physical PROFIsafe telegram evaluation to internal simulation mode.

  3. Inject Simulated Process Value:
    * Locate the input pin SIM_V.
    * Enter the desired floating-point simulation value (e.g., 75.0).
    * Confirm the change. Notice that V may still report 0.0 if the channel was previously passivated.

  4. Execute Fail-Safe Depassivation (Reintegration):
    * Locate the input pin ACK_REI (or the central reintegration block F_ACK_GL).
    * Apply a rising-edge pulse: Set ACK_REI = TRUE, wait one cycle, then set ACK_REI = FALSE.
    * In response, the block resets PASS_OUT = FALSE and QBAD = FALSE.
    * Output V immediately mirrors SIM_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:

  1. Verify Driver Output Values:
    * In CFC Test Mode, confirm that F_CH_AI.V reflects the exact value written to SIM_V.
    * Confirm that QBAD = FALSE and PASS_OUT = FALSE.
  2. Test Trip Logic Propagation:
    * Change SIM_V to exceed a high-trip threshold.
    * Confirm that downstream safety comparator blocks (e.g., F_CMP_R) trip as intended.
  3. 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 all SIM_ON pins are FALSE.
  • 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

Related Articles

Related Tags

  • S7-F-Systems
  • PLCSIM
  • F_CH_AI
  • PROFIsafe
  • Passivation
  • Safety-Simulation
6 respuestas