How to Configure Parameter DELTA_T on Retentive Timer TONR (FC80) in SIMATIC PCS 7
In SIMATIC PCS 7, the retentive on-delay timer block TONR (FC80 from the TI-S7 Converting Blocks library) requires the sampling time parameter 'DELTA_T' to be configured with the exact cyclic execution period of the Organization Block in which it executes. Parameter DELTA_T represents the incremental time step (of data type TIME) added to the internal accumulator on each execution cycle while input IN is true. In Continuous Function Charts (CFC), if TONR is placed in cyclic interrupt OB35 (100 ms execution frequency), DELTA_T must be assigned 'T#100ms'. In modern PCS 7 APL development, engineers should migrate to the standardized 'TimerP' block, which automates cycle time integration via parameter SAMPLE_T.
Table of Contents
- Operating Architecture of TONR (FC80) from the TI-S7 Library
- The Critical Role of Parameter DELTA_T in Cycle Time Accumulation
- Configuring DELTA_T Across Cyclic Organization Blocks (OB30 to OB38)
- Migrating Legacy FC80 Logic to PCS 7 Advanced Process Library (APL)
- Comparison of Timer Blocks in SIMATIC STEP 7 and PCS 7
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Operating Architecture of TONR (FC80) from the TI-S7 Library
The TONR block (FC80) originates from the legacy TI-S7 Converting Blocks library, designed to emulate the retentive on-delay timer instruction of Texas Instruments (TI 505) PLCs within SIMATIC S7-300 and S7-400 controllers:
- Functional Behavior:
- When input
INisTRUE, the block increments an internal accumulated elapsed time (ET). - When
INtransitions toFALSE,ETstops accumulating and holds its current value (retentive freeze). - When
INbecomesTRUEagain, accumulation resumes from the frozen value. - When
ET >= PV(Preset Value), outputQtransitions toTRUE. - An explicit pulse on input
RESETclearsETto zero and dropsQtoFALSE.
The Critical Role of Parameter DELTA_T in Cycle Time Accumulation
Unlike standard IEC timers (SFB4 TON), which query the CPU system clock (TIME_TCK) dynamically:
- Mathematical Accumulator:
TONRcalculates elapsed time by adding a discrete time delta on every block call:
$$\text{ET}{\text{new}} = \text{ET}$$}} + \text{DELTA_T - The Configuration Trap:
- If parameter
DELTA_Tis left disconnected or set toT#0ms, the accumulator will never advance, and outputQwill never trip. - If
DELTA_Tis set toT#1swhile the block executes every 100 ms (OB35), the timer will run 10 times faster than real time, expiring in 6 seconds instead of 60 seconds! - Parameter
DELTA_Tmust strictly match the real-world execution interval of the host Organization Block.
Configuring DELTA_T Across Cyclic Organization Blocks (OB30 to OB38)
To correctly configure DELTA_T in CFC:
- Identify the Block's Execution Group:
* In CFC, click the run sequence bar at the top of theTONRblock.
* Open the Run Sequence Editor to determine which cyclic interrupt OB hosts the chart (e.g.,OB35,OB32,OB38). - Assign Matching TIME Literals:
* For OB38 (10 ms cycle): SetDELTA_T := T#10ms.
* For OB35 (100 ms cycle): SetDELTA_T := T#100ms.
* For OB32 (1000 ms cycle): SetDELTA_T := T#1s. - CFC Dynamic Interconnection:
* Alternatively, interconnectDELTA_Tto a global time base or system variable to ensure automatic adjustment if the OB scan rate is modified in HW Config.
Migrating Legacy FC80 Logic to PCS 7 Advanced Process Library (APL)
While FC80 remains functional for legacy compatibility, Siemens strongly discourages using TI-S7 converting blocks in modern PCS 7 systems:
- Why Migrate Away from FC80?:
FC80is an FC (Function) requiring external instance storage; it does not support WinCC operator faceplates, OS alarm generation, or APL feature bits.- It does not adhere to APL structured signal types (
Structwith.Valueand.ST). - The Modern Replacement: TimerP (FB1810):
- Part of the official PCS 7 Basis / APL Library.
- Automatically binds parameter
SAMPLE_T(REAL in seconds) to the OB cycle time during CFC compilation. - Fully integrated with WinCC faceplates and operator control.
Comparison of Timer Blocks in SIMATIC STEP 7 and PCS 7
The table below compares timer block options across SIMATIC S7 and PCS 7 platforms.
DELTA_T (TIME)SAMPLE_T (REAL)SAMPLE_T (REAL)Verification
To confirm that TONR (FC80) timing is accurate:
1. In CFC, insert TONR into OB35 (100 ms).
2. Configure DELTA_T := T#100ms and PV := T#30s.
3. Switch CFC to Test Mode: set input IN = TRUE.
4. Using a precision stopwatch, verify that parameter ET matches real elapsed time at 10 s, 20 s, and 30 s.
5. Set IN = FALSE at 15 seconds: confirm that ET freezes at exactly T#15s.
6. Set IN = TRUE: confirm accumulation resumes seamlessly and sets Q = TRUE upon reaching 30 seconds.
7. Apply a momentary pulse to RESET: confirm ET resets to T#0ms and Q transitions to FALSE.
Limitations and Operational Precautions
- Never place
TONR (FC80)into OB1 (free-wheeling cyclic task); because OB1 execution time varies dynamically with CPU load,DELTA_Taccumulation will suffer severe timing drift. - Ensure that the execution group containing
TONRis not disabled or throttled by runtime phase logic unless timer freezing is explicitly desired. - Do not interconnect
DELTA_Tto an uninitialized memory word, as passing zero or negative values will corrupt the timer calculation. - Always validate final software licensing and system documentation against the applicable Siemens catalog and authorized distributor quotation.
Engineer FAQ
Why did my TONR timer run 10 times too fast?
You likely set DELTA_T to T#1s while the block was executing inside OB35 (100 ms). Because the block was called 10 times per second, it added 1 second on every call, running 10x faster than real time. Change DELTA_T to T#100ms.
Can I enter DELTA_T as a REAL number in seconds?
FC80 requires the IEC TIME data type for DELTA_T (e.g., T#100ms). If you prefer working with REAL seconds, migrate to the APL TimerP block which uses SAMPLE_T : REAL.
Does FC80 retain its value across CPU power cycles?
Only if the Data Block or marker memory holding the instance parameters for FC80 is configured in the retentive memory partition of the S7-400 CPU.
Technical References
- SIMATIC S7-300/400 TI-S7 Converting Blocks System Manual
- Siemens Industry Online Support FAQ: Using TONR FC80 in PCS 7
- SIMATIC Process Control System PCS 7 Advanced Process Library System Manual
Related Articles
- How to Implement a Retentive Pause-Resume Timer in SIMATIC PCS 7 APL Using TimerP and Custom SCL
- How to Handle Operator Time Values Between WinCC Faceplates and SCL Blocks in SIMATIC PCS 7
- Troubleshooting CFC Module Driver Generation Failures in PCS 7
Related Tags
- TONR
- FC80
- DELTA_T
- OB35
- TI-S7 Library