1. Problem Definition: 2-3 Second Safety DI Response on S7-400H
A field report describes an S7-400H fault-tolerant station (CPU 412-5H) using SIMATIC SM 326F safety digital input module 6ES7326-1BK02-0AB0 in which every Safety DI signal exhibits a 2-3 second response delay even though the standard program is running in OB35. Two critical clarifications frame the troubleshooting path:
- The F-program does not execute in the standard
OB35. It runs in an F-runtime group that the Distributed Safety (or S7 F/FH Systems) editor assigns to a cyclic interrupt OB. The cyclic time of that OB - not the user's standardOB35- is what determines the safety scan rate. - SM 326F is an ET 200M safety module, not a centralized S7-400 module. The 412-5H communicates with it through PROFIsafe on top of PROFIBUS DP or PROFINET IO. The PROFIsafe watchdog adds deterministic transport latency on top of the F-cycle time.
A 2-3 second end-to-end response on a properly configured F-system is an order of magnitude larger than the typical 10-100 ms total. The delay almost always traces to one of the following configuration errors:
- F-runtime group assigned to a cyclic interrupt OB with a 2000-3000 ms period.
-
MaxCycleTimeof the F-runtime group set in seconds instead of the typical 100 ms default. - PROFIsafe
F_WD_Time(watchdog) set to 2000-3000 ms. - SM 326F input filter
Input delayset to50 mson every channel combined with debounce in the safety program. - PROFIBUS DP / PROFINET update time scaled to 1-2 s on the ET 200M station.
This article walks through the architecture, the timing model, the parameter paths inside the F-Configuration editor, and the verification procedure using STEP 7 / TIA Portal online diagnostics.
2. Hardware Architecture: CPU 412-5H, ET 200M, SM 326F
The configuration described in the source does not place the SM 326F in the central rack of the S7-400H. Central S7-400 I/O is the SM 4xx family. The SM 326F belongs to the S7-300 family and is mechanically and electrically designed for either the S7-300 central rack (where it cannot be used with an F-CPU without an F-link) or, more commonly, the ET 200M distributed I/O station. With CPU 412-5H, the realistic topology is an ET 200M with IM 153-2 / IM 153-4 PROFINET or PROFIBUS interface module, hosting the SM 326F, connected to the H-CPU via PROFINET IO or PROFIBUS DP, and using the PROFIsafe profile (V2.4 on PROFIBUS, V2.6.1 on PROFINET).
2.1 Module Reference
| Component | Order Number (MLFB) | Role |
|---|---|---|
| CPU 412-5H | 6ES7412-5HK06-0AB0 | F-CPU; fault-tolerant pair; S7 F/FH Systems optional package |
| IM 153-4 PN | 6ES7153-4BA00-0XB0 | ET 200M interface for PROFINET; supports PROFIsafe V2.6.1 |
| IM 153-2 | 6ES7153-2BA10-0XB0 | ET 200M interface for PROFIBUS; supports PROFIsafe V2.4 |
| SM 326F DI 24xDC 24V | 6ES7326-1BK02-0AB0 | 24-channel SIL 3 / PL e / Cat 4 safety digital input module |
| SM 321 DI 16xDC 24V | 6ES7321-1BH02-0AA0 | Standard DI - not safety-rated, must not be used as a safety input |
6ES7321-1BH02-0AA0 that originally appeared in the field report is the SM 321 standard digital input module, not the SM 326F safety module. Confirm the order number stamped on the front of the module - it must end in 1BK02 for the F-version.2.2 SM 326F (6ES7326-1BK02-0AB0) Key Parameters
| Parameter | Value | Source |
|---|---|---|
| Number of safe inputs | 24 (3 groups of 8, dual-channel internally) | Siemens manual |
| Rated input voltage | 24 V DC | Siemens manual |
| Sensor supply | 4 outputs, short-circuit-proof | Siemens manual |
| Configurable input delay | 0.5 ms / 3 ms / 15 ms / 50 ms (per channel via HW Config) | HW Config - SM 326F properties |
| Module cycle / conversion | typ. 5 ms (channel-by-channel processing) | Siemens manual |
| PROFIsafe address range | 6 bytes default (F-source / F-destination pair) | PROFIsafe profile |
| Achievable safety class | SIL 3 (IEC 61508), SILCL 3 (IEC 62061), PL e / Cat 4 (ISO 13849-1) | Siemens manual |
| Discrepancy behavior | Configurable: passivation or 0/1 evaluation | HW Config |
2.3 Topology Diagram
3. How the F-Runtime Group and PROFIsafe Affect Cycle Time
An F-runtime group is the smallest unit of execution that contains one or more safety-related function blocks (F-FB / F-FC / F-DB). The group is mapped to a cyclic interrupt OB whose period becomes the F-scan time. The F-Configuration tool defines three principal timing parameters per group:
| Parameter | Where it lives | Default | Effect |
|---|---|---|---|
| F-Cycle time (cyclic interrupt period of the assigned OB) | OB properties in HW Config / TIA Portal | OB35 = 100 ms | How often the F-runtime group is called |
| MaxCycleTime (F-MAX_CYC_TIME) | F-runtime group properties -> "Maximum cycle time of the F-runtime group" | Typical 100-200 ms | Time after which the F-system treats the cycle as failed (STOP / passivation) |
| F_WD_Time (PROFIsafe watchdog) | PROFIsafe slot of the F-module in HW Config | 150 ms typical | Maximum time between two valid PROFIsafe telegrams before passivation |
The 412-5H typically runs Distributed Safety (STEP 7 V5.x) or S7 F/FH Systems (STEP 7 V5.x, fault-tolerant extension) as the engineering tool, or the safety editor in TIA Portal with the F-CPU enabled. The F-runtime group editor exposes both the MaxCycleTime and the OB assignment.
4. Root Cause Analysis: Why Safety DI Signals Lag 2-3 Seconds
A 2-3 second total response in a properly installed F-system is almost never a wiring or hardware fault - the SM 326F itself cycles in roughly 5 ms. The delay sits in one or more of the following configuration parameters:
4.1 OB Cycle Time Set in Seconds
If the cyclic interrupt OB assigned to the F-runtime group (commonly OB35, but the editor allows OB30-OB38) is configured with a period of 2000 ms or 3000 ms, every safety DI will appear to lag 2-3 s because the F-CPU only polls the F-input process image once per cycle. This is the single most common cause of the symptom in the field report.
4.2 PROFIsafe Watchdog Oversized
PROFIsafe uses an F_WD_Time value that is doubled from the configured value to form the actual transport timeout. If F_WD_Time is set to 2000-3000 ms, the system will wait that long before declaring a telegram lost. While it is waiting, the F-input value is buffered; the F-program does not see the new state until the next valid telegram is processed. The default in STEP 7 is conservative; users often increase it to "make passivation stop happening," which silently slows the response.
4.3 ET 200M PROFINET / PROFIBUS Update Time
On PROFINET, the IM 153-4 PN has an "Update time" parameter that determines how often the device is polled. If the user selected 1 s or 2 s (for example, by setting the send clock to 1 ms and the reduction ratio to 1000), the F-input process image will lag accordingly. The Siemens recommendation is to keep the update time of an F-device at or below the F-cycle time, otherwise the F_WD_Time will trip passivation.
4.4 Input Filter on SM 326F
Each channel of the SM 326F offers a selectable input delay: 0.5 ms, 3 ms, 15 ms, or 50 ms. A misconfiguration to 50 ms on all 24 channels only adds 50 ms, but combined with a 2 s OB cycle and a 2 s PROFIsafe watchdog, the chain easily exceeds 4 s, which the operator often rounds to "2-3 seconds."
4.5 Debounce / Discrepancy Logic in the Safety Program
F-input blocks such as F-I-DI from the F-library contain a discrepancy window for 1oo2 / 2oo2 evaluation. If the discrepancy time is set in seconds instead of milliseconds, the block will not propagate the new state until the discrepancy window elapses without disagreement.
4.6 Diagnostic Re-evaluation Loop
If the F-CPU has a redundant partner CPU and the two are in different run states, the H-sync link can briefly hold the F-input value at the last synchronized value until both CPUs agree. This normally resolves in tens of milliseconds; persistent 2-3 s lags indicate a sync-link problem rather than tuning.
5. Adjusting MaxCycleTime in the F-Configuration Interface
The field report asks how to edit the MaxCycleTime of the F-runtime group. The path depends on the engineering tool.
5.1 STEP 7 V5.x with Distributed Safety / S7 F/FH Systems
- Open the SIMATIC Manager and the S7 project.
- Select the F-CPU in the project tree.
- Open Safety -> F-Configuration (Distributed Safety) or Safety -> F-Runtime Groups (S7 F/FH Systems).
- Highlight the F-runtime group that owns the safety DI tags.
- Open the properties dialog. The field "Maximum cycle time of the F-runtime group (ms)" exposes the
F-MAX_CYC_TIMEvalue. - Set it to a value greater than the worst-case OB execution but less than any PROFIsafe watchdog. A typical safe choice is
200 msfor a 412-5H running OB35 at 100 ms. - Save and download (with F-password if protected).
5.2 TIA Portal with S7 F-CPU
- Open the TIA Portal project.
- Expand the F-CPU in the project tree.
- Open Safety Administration -> F-runtime groups.
- Select the relevant F-runtime group; the right-hand pane shows Cycle time (the OB period) and Maximum cycle time.
- Reduce Cycle time to 100 ms if it is currently in the second range.
- Set Maximum cycle time to a value of
2xthe cycle time (e.g. 200 ms). - Compile and download hardware configuration and software to the F-CPU.
5.3 Changing the OB Period
In HW Config (STEP 7 V5.x) or Device Configuration (TIA Portal), open the properties of the cyclic interrupt OB that hosts the F-runtime group (commonly OB35) and change the Cycle time field. For example:
OB35 (Cyclic interrupt) -> Cycle time = 100000 microseconds (100 ms)
The change requires a STOP / RUN transition of the F-CPU, or an H-sync resynchronization on the 412-5H pair.
6. Parameter Reference: F-Runtime Group Settings
| Parameter | Recommended Range | Notes |
|---|---|---|
| F-runtime group cycle time (OB period) | 10 - 100 ms | Shorter is faster but consumes CPU bandwidth |
| MaxCycleTime (F-MAX_CYC_TIME) | 2x the OB cycle time | Watchdog for F-runtime group execution |
| F_WD_Time (PROFIsafe watchdog) | 50 - 500 ms | Must exceed the worst PROFINET update time plus jitter |
| SM 326F input delay | 0.5 / 3 / 15 / 50 ms | Default 3 ms unless contact bounce requires more |
| PROFINET update time for ET 200M | 1 - 4 ms | Match to OB cycle if possible |
| PROFIBUS DP bus cycle | 1.5 - 10 ms | Lower values reduce PROFIsafe latency |
| F-input block discrepancy time | 10 - 100 ms | Tune to sensor mechanics, not seconds |
7. Verification: Reading Online Cycle Diagnostics and PROFIsafe Status
After each parameter change, verify the actual measured cycle against the configuration:
7.1 STEP 7 V5.x Online
- Go online to the F-CPU.
- Open PLC -> Module Information -> Performance Data on the CPU.
- Read the OB35 execution time and compare to the configured cycle.
- Open Safety -> F-Diagnostics for any passivation events and PROFIsafe communication errors.
7.2 TIA Portal Online
- Go online to the F-CPU.
- Open Online & Diagnostics -> Cycle time for the CPU.
- Open Safety Administration -> Diagnostics for F-runtime group status and PROFIsafe status per slot.
7.3 Reading PROFIsafe Watchdog State
In HW Config, right-click the SM 326F slot, choose PROFIsafe, and read the live F_WD_Time currently in use. If the field shows a value in the second range, the parameter is misconfigured.
7.4 Functional Test
Force a Safety DI transition and timestamp the response in the F-application via SFB 37 / SFB 38 or via a non-safety timestamp. The expected end-to-end response after tuning should be:
| Stage | Expected |
|---|---|
| Sensor mechanical bounce settling | 5 - 20 ms |
| SM 326F input filter (3 ms default) | 3 ms |
| PROFIsafe transport on PROFINET (4 ms update) | 4 - 8 ms |
| F-runtime OB35 cycle (100 ms) | 50 ms average, 100 ms worst case |
| F-application logic | 1 - 10 ms |
| Total | 60 - 150 ms typical |
8. Common Pitfalls and Edge Cases
| Symptom | Likely Configuration | Correction |
|---|---|---|
| All F-DI lag 2-3 s identically | OB35 / OB3x period in seconds | Lower OB period to 100 ms |
| F-DI passivate intermittently | F_WD_Time too short for the PROFINET update time | Increase F_WD_Time to 1.5x update time |
| Single F-DI lags the rest | Input delay set to 50 ms on that channel | Match all channels; use 3 ms default |
| Discrepancy trips randomly | Discrepancy time set to seconds | Set to milliseconds based on sensor mechanics |
| Pair of redundant H-CPUs disagrees on F-input | Sync link degradation; H-sync time too long | Check fiber-optic links, redundant sync modules |
| Response is 2-3 s on the second cycle after stop/start | Reintegration time of F-input after passivation | Normal but configurable; check reintegration mode in F-I-DI |
| SM 326F appears as "address error" in HW Config | F-source address / F-destination address conflict | Re-assign PROFIsafe addresses, unique per slot |
| F-DI never updates | Module in passivated state after wire break | Acknowledge via ACK_OP or operator acknowledgment procedure |
9. Calculating the Safety Response Time
The safety response time from sensor transition to safe actuator de-energization is the sum of the deterministic stages plus the worst-case wait for the next cycle of the slowest stage. A conservative field formula:
T_response = T_filter + T_module + T_PROFIsafe + T_F_cycle + T_logic + T_output_filter + T_output
Where:
-
T_filter= SM 326F input delay (0.5 - 50 ms) -
T_module= SM 326F module conversion (~5 ms) -
T_PROFIsafe= PROFIsafe transport = PROFINET update time + telegram jitter (1 - 10 ms typical) -
T_F_cycle= F-runtime OB period (100 ms default; up to 2x the average wait) -
T_logic= F-program execution (1 - 20 ms for a typical 412-5H F-application) -
T_output_filter= F-DO output filter (0.5 - 50 ms) -
T_output= actuator drop-out time
With the recommended 100 ms F-cycle, 3 ms input filter, 4 ms PROFINET update, and 5 ms output filter:
T_response = 3 + 5 + 8 + 100 + 10 + 5 = 131 ms (typical)
Worst case = 3 + 5 + 8 + 200 + 20 + 50 + actuator = ~300 ms
With a 2000 ms OB period (the misconfiguration in the field report):
T_response = 3 + 5 + 8 + 2000 + 10 + 5 = ~2031 ms
That matches the 2-3 second symptom precisely and confirms the OB period as the dominant contributor.
10. Related Standards and Documentation
- IEC 61508 - Functional safety of E/E/PE systems, defines SIL 1-3 and the architecture constraints that drive the use of an F-CPU and F-I/O.
- IEC 62061 - Safety of machinery: functional safety of E/E/PE safety-related systems. Specifies SILCL 3 and the PFHd calculation that the F-runtime group must meet.
- ISO 13849-1 - Safety of machinery: safety-related parts of control systems. Defines PL e / Cat 4 to which the SM 326F is rated.
- PROFIsafe profile V2.6.1 - The transport protocol encapsulating safety telegrams over PROFINET IO. Defines the F_WD_Time semantics.
When evaluating PFHd for the safety function, the F-cycle time directly affects the diagnostic test interval and must remain within the values assumed during the SISTEMA / PAS calculation. Reducing the cycle time below the assumed value is safe but increases CPU load; raising it can invalidate the safety case.
11. Frequently Asked Questions
Why are my Safety DI signals on the SM 326F responding 2-3 seconds after the sensor input changes?
The dominant cause is the F-runtime group cyclic interrupt OB period being set to 2-3 seconds instead of the typical 100 ms. Verify OB35 (or whichever OB the F-runtime group is assigned to) in HW Config or Device Configuration, and reduce the period to 100 ms. Then check the PROFIsafe F_WD_Time on the SM 326F slot - it must be set in tens to hundreds of milliseconds, not seconds.
Does the safety program run inside OB35 on the S7-400H?
The standard cyclic OB35 can host user code, but the F-program runs inside an F-runtime group that the safety editor maps to a cyclic interrupt OB. That OB is frequently OB35 but can be OB30-OB38 depending on the project. Open the F-runtime group properties to see which OB owns it and what its period is.
Where do I change MaxCycleTime for the F-runtime group?
In STEP 7 V5.x Distributed Safety / S7 F/FH Systems: Safety -> F-Configuration -> select F-runtime group -> properties. In TIA Portal: Safety Administration -> F-runtime groups -> select group -> set "Maximum cycle time". Typical value is 100-200 ms.
Is the SM 326F directly mountable in an S7-400H central rack?
No. The SM 326F is an ET 200M module. With a CPU 412-5H it must be installed in an ET 200M station (with IM 153-2 / IM 153-4) connected via PROFIBUS DP or PROFINET IO. The PROFIsafe layer runs on top of the bus protocol and terminates in the F-CPU.
What happens if MaxCycleTime is exceeded?
The F-CPU passivates the affected F-runtime group: all F-DO are de-energized, the SM 326F inputs are marked passivated, and a diagnostic entry is written to the F-diagnostics buffer. To recover, the operator must run the acknowledgment procedure (manual or automatic depending on the F-I-DI configuration).
How do I measure the actual F-runtime group cycle time online?
In STEP 7 V5.x, go online and open the CPU module information. The OB execution times for the F-runtime group's OB are displayed alongside other OBs. In TIA Portal, open Online & Diagnostics -> Cycle time on the F-CPU. The value must stay below MaxCycleTime at all times.
Can reducing the OB period cause the F-CPU to stop?
Yes if the worst-case OB execution time is longer than MaxCycleTime. Always measure the worst-case OB execution first and set MaxCycleTime to at least twice the worst-case execution. On a 412-5H with a small F-application, 100 ms cycle with 200 ms MaxCycleTime is robust.