Troubleshooting Sample Time Acceleration and Cycling Interrupt Failures in CPU 417-4 with CEMAT
When timer countdowns accelerate (e.g., a 10-second timer elapsing in 5 seconds) in a CPU 417-4 running a CEMAT multiproject following a memory reset, the root cause is a mismatch between the controller hardware cyclic interrupt interval and the block SAMPLE_T (Sample Time) parameter, or incorrect organization block placement. In classic CEMAT standards, all CEMAT drive and group blocks must reside strictly in OB1, while PID controllers belong in OB35. Furthermore, if a CPU memory reset restored default OB35 intervals (100 ms) while the original project used modified hardware timings, or if AS compilation omitted 'Set sample time', block timers execute at double frequency. Re-assigning CEMAT blocks to OB1 and synchronizing sample times in CFC resolves the timing fault.
Table of Contents
- Time Tracking Mechanics in S7-400 and CEMAT Blocks
- Root Causes of Timer Acceleration After CPU Memory Reset
- Mandatory CEMAT Organization Block Placement Rules
- Remediation Procedure and Sample Time Alignment
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Time Tracking Mechanics in S7-400 and CEMAT Blocks
In SIMATIC PCS 7, blocks containing internal timers, ramp generators, integrators, and lag filters do not query the real-time system clock every millisecond. Instead, they calculate time intervals by accumulating their configured sampling interval: Accumulated_Time = Accumulated_Time + SAMPLE_T on every execution scan.
If a block has parameter SAMPLE_T = 0.2s (expecting execution every 200 ms), but the organization block calling it actually fires every 100 ms (twice as fast), the internal accumulator increments by 0.2 seconds every 0.1 seconds. Consequently, a 10-second countdown expires in exactly 5 seconds, causing pre-warning horns, run-up timers, and fault delays to elapse prematurely.
Root Causes of Timer Acceleration After CPU Memory Reset
The table below details why timers run erratically following power loss and controller memory reset:
Reset in as-delivered state); default OB intervals restored.SAMPLE_T attributes against the target OB task.Mandatory CEMAT Organization Block Placement Rules
The Siemens CEMAT Minerals & Cement DCS architecture defines strict execution placement rules:
CEMAT Block Execution Standards:
- OB1 (Main Cyclic Task): ALL CEMAT core blocks MUST reside here:
- C_DRIVE_1D, C_DRIVE_2D (Drive blocks)
- C_GROUP (Group coordinators)
- C_ROUTE (Transport routes)
- C_DAMPER, C_VALVE (Actuators)
- C_MEASUR (Analog measurements)
- OB35 (Cyclic Interrupt - 100 ms): ONLY closed-loop controllers reside here:
- CTRL_PID / PIDConL
- Custom APL analog PID control loops
- OB100 (Warm Restart): Restart blocks (e.g., C_OB100) for initialization
Remediation Procedure and Sample Time Alignment
To resolve the accelerated timer behavior and restore deterministic CEMAT timing:
Step 1: Relocate CEMAT Blocks to OB1
- Open the CFC Editor -> open the Run Sequence editor (
Options->Customize->Run Sequence). - Inspect OB30 through OB38: identify any CEMAT drive, group, route, or damper blocks residing in interrupt OBs.
- Move all CEMAT blocks into OB1, maintaining logical execution order (measurements -> drives -> groups).
Step 2: Audit and Download HW Config
- Open HW Config for the CPU 417-4 (
6ES7417-4XT05-0AB0). - Double-click the CPU -> navigate to the Cycle/Clock Memory tab.
- Verify cyclic interrupt settings (e.g., OB35 interval) match the project design baseline.
- Compile and download HW Config to the CPU.
Step 3: Recompile CFC with 'Set Sample Time'
- In the CFC Editor, select
Compile->Compile Entire Program. - Ensure the option 'Set sample time' is checked: this forces the compiler to re-write accurate time constants into all block
SAMPLE_Tparameters. - Download changes to the controller.
Verification
To verify accurate timing across CEMAT control blocks:
- In WinCC OS Runtime, open the faceplate for a CEMAT group block (
C_GROUP). - Initiate a group start: monitor the pre-warning horn timer (
HORN_TIM) with a physical stopwatch. - Confirm that a 10-second pre-warning timer elapses in exactly 10 seconds (1.0x real time) rather than counting down in 2-second jumps.
- Open CFC Online Test mode on a drive block (
C_DRIVE_1D): verify that the run delay accumulator matches clock time. - Check the CPU Diagnostic Buffer: verify scan cycle time remains stable (typically 30 ms to 80 ms) well below the 6000 ms watchdog limit.
Limitations and Operational Precautions
Operational boundaries in CEMAT S7-400 systems:
- Cycle Time Monitoring: When moving hundreds of CEMAT blocks into OB1, monitor the OB1 cycle time in CPU Properties. Ensure OB1 scan time remains comfortably below 150 ms to ensure responsive operator button feedback.
- Battery Maintenance: Maintain functioning backup batteries (
6ES7971-0BA00) in the PS 407 power supply to prevent catastrophic memory loss during plant power outages. - Do Not Mix Library Timing: Never place classic CEMAT blocks into APL-style 100 ms cyclic interrupt OBs; CEMAT internal pulse logic expects OB1 scan dynamics.
Engineer FAQ
Why did moving CEMAT blocks to OB1 fix the timer counting speed?
CEMAT blocks are designed to calculate internal timer decrements based on OB1 execution dynamics. When placed in OB35 or OB34 with mismatched sample times, the timer accumulators received double the expected execution ticks.
What does the 'Set sample time' option do during CFC compilation?
It scans the organization block to which each block instance is assigned in the run sequence, reads the OB's configured hardware interval, and automatically writes that exact value to the block's SAMPLE_T parameter.
Can CEMAT drive blocks be placed in OB35 with APL blocks?
No. The CEMAT standard explicitly mandates that all drive, group, route, and valve blocks must execute in OB1. Only PID controllers should be assigned to OB35.
What happens to S7-400 CPUs when cycle time exceeds 6000 ms?
If the main cycle time breaches protective watchdog thresholds, the CPU operating system enters a degraded protective state, altering or halving interrupt OB execution rates to maintain controller survivability.
Technical References
- Siemens SIMATIC PCS 7 CEMAT Minerals V7.1 / V8.0 System Description (C79000-G8976-C198)
- Siemens SIMATIC S7-400 CPU 417-4 Technical Specifications Manual (6ES7417-4XT05-0AB0)
- Siemens Industry Online Support Entry ID 109748904: CEMAT OB Task Organization and Timing
Related Articles
- Troubleshooting CEMAT C_GROUP Block Start and Interlock Failures
- Resolving Missing Running Feedback on SIMOCODE pro V Blocks After PCS 7 CEMAT Upgrade
- Converting Motor Current Percentage Values to Absolute Physical Units in PCS 7 CEMAT
Related Tags
- CPU-417-4
- CEMAT
- SAMPLE_T
- OB1
- OB35
- Timer-Acceleration