PLCcheck

SCL Timer Functions: TON, TOF, TP, TONR

SCL timer function reference for Siemens TIA Portal. IEC timers TON (on-delay), TOF (off-delay), TP (pulse), TONR (accumulating). Syntax, timing diagrams, and examples.

·6 min read
SCLtimerTONTOFTPTONRIEC 61131-3TIA PortalS7-1500on-delayoff-delaypulse

Diesen Artikel auf Deutsch lesen

SCL Timer Functions: TON, TOF, TP, TONR

Siemens S7-1200/1500 supports IEC 61131-3 timer function blocks. Each timer instance requires its own instance data (either a named instance or multi-instance in an FB).

TON — On-Delay Timer (Einschaltverzögerung)

Output Q goes TRUE after the input IN has been continuously TRUE for the duration PT.

Syntax:

#TON_Instance(IN := #Start_Condition,
              PT := T#5s);

#Delayed_Output := #TON_Instance.Q;
#Elapsed := #TON_Instance.ET;

Parameters:

ParameterTypeDescription
INBOOLStart input — timer runs while TRUE
PTTIMEPreset time (duration)
QBOOLOutput — TRUE after PT has elapsed
ETTIMEElapsed time (0 to PT)

Behavior:

S5 equivalent: SD (Einschaltverzögerung) — exact match.

TOF — Off-Delay Timer (Ausschaltverzögerung)

Output Q goes TRUE immediately when IN goes TRUE. When IN goes FALSE, Q stays TRUE for the duration PT.

Syntax:

#TOF_Instance(IN := #Motor_Running,
              PT := T#10s);

#Fan_Output := #TOF_Instance.Q;  // Fan runs 10s after motor stops

Behavior:

S5 equivalent: SA (Ausschaltverzögerung) — exact match.

TP — Pulse Timer (Impulstimer)

Output Q goes TRUE for exactly the duration PT after a rising edge on IN. The output runs for the full duration regardless of the input state.

Syntax:

#TP_Instance(IN := #Trigger,
             PT := T#2s);

#Pulse_Output := #TP_Instance.Q;  // TRUE for exactly 2 seconds

Behavior:

S5 equivalent: SI and SE are approximately TP, but with important differences:

TONR — Accumulating On-Delay Timer (S7-1500 only)

Accumulates time across multiple input pulses. The timer does NOT reset when IN goes FALSE — it pauses and continues when IN goes TRUE again.

Syntax:

#TONR_Instance(IN := #Condition,
               R  := #Reset,
               PT := T#60s);

#Total_Output := #TONR_Instance.Q;
#Accumulated := #TONR_Instance.ET;

Parameters:

ParameterTypeDescription
INBOOLRun input — timer counts while TRUE
RBOOLReset input — resets ET to 0
PTTIMEPreset time (total accumulated duration)
QBOOLOutput — TRUE when ET reaches PT
ETTIMEAccumulated elapsed time

Behavior:

S5 equivalent: There is NO S5 equivalent. S5 SS (speichernde Einschaltverzögerung) is sometimes confused with TONR, but SS does NOT accumulate — it starts once and runs to completion. TONR accumulates across multiple pulses.

Availability: TONR is available on S7-1500 only (not on S7-300, S7-400, or S7-1200).

Timer Summary Table

TimerFull NameQ goes TRUEQ goes FALSES5 Equivalent
TONOn-DelayAfter IN=TRUE for PTWhen IN goes FALSESD (exact)
TOFOff-DelayImmediately when IN=TRUEPT after IN goes FALSESA (exact)
TPPulseOn rising edge of INAfter PT (always full duration)SI/SE (approximate)
TONRAccumulatingWhen accumulated ET ≥ PTOn R (reset)None

Declaration Example (FB with Multi-Instance)

VAR
    #Delay_Timer : TON;      // On-delay instance
    #Fan_Timer : TOF;         // Off-delay instance
    #Pulse_Timer : TP;        // Pulse instance
    #Accum_Timer : TONR;      // Accumulating instance (S7-1500 only)
END_VAR

Part of the SCL Reference. See also: S5 Timer Types to S7 Equivalents. Maintained by PLCcheck.ai.


Convert Your AWL Code to SCL

PLCcheck Pro analyzes your S5/S7 AWL code and generates SCL equivalents automatically. Upload your program and see the conversion side by side.

Upload code for AWL→SCL conversion → | AWL to SCL Guide →

Related Articles

Analyze your PLC code with AI

PLCcheck Pro explains, documents, optimizes, and migrates PLC code — automatically.

Try PLCcheck Pro →
← Back to Blog

Not affiliated with Siemens AG. S5, S7, STEP 5, STEP 7, and TIA Portal are trademarks of Siemens AG.