Learn PLCs free
Timers & CountersBeginnerIEC 61131-3

TP Timer in PLC: Fixed Pulse Timing and Examples

Quick answer

A TP timer generates one fixed-duration output pulse. A FALSE-to-TRUE edge at IN sets Q immediately and starts ET. Q remains TRUE until ET reaches PT even if IN falls. Input changes during the active pulse normally do not retrigger or extend it; a new edge is needed afterward.

The TP (Timer Pulse) function block generates a fixed-duration output pulse when triggered. On a rising edge of IN, the output Q goes TRUE for exactly the preset time PT, regardless of when IN goes FALSE. The elapsed time ET increments from 0 to PT. Once the pulse duration expires, Q returns to FALSE. A new pulse cannot be triggered until the current pulse completes and IN has returned to FALSE. TP timers are used for one-shot pulse generation, solenoid activation, alarm horns, and any application requiring a precise fixed-duration output.

Reviewed

Parameters

Inputs

NameTypeDescription
INBOOLTrigger input - rising edge starts pulse
PTTIMEPulse duration (preset time)

Outputs

NameTypeDescription
QBOOLPulse output - TRUE for duration PT
ETTIMEElapsed time of current pulse

How TP fixed-duration pulse timer works scan by scan

Read the waveforms and state table together. The diagram shows the sequence; the table states what the program should observe at each execution.

TP fixed-pulse timing diagram

The first rising edge starts Q for exactly PT. A second input edge during the active pulse is ignored and does not extend the output.

TP fixed-pulse timing diagramThe first rising edge starts Q for exactly PT. A second input edge during the active pulse is ignored and does not extend the output.INQETPT
Blue is the input, green is the boolean output, and amber is elapsed time or current count. Transitions are shown at task executions; real timing resolution depends on the controller and task.

State table

MomentInputInternal stateOutputEngineering meaning
ReadyIN = FALSEET = T#0sQ = FALSEThe block is armed for a new rising edge.
TriggerIN changes FALSE → TRUEET starts increasingQ = TRUE immediatelyThe fixed pulse begins on the edge, not after PT.
Input changes during pulseIN falls or rises while ET < PTET continuesQ stays TRUEThe active pulse is not shortened or extended.
Preset reachedAny stable stateET reaches PTQ = FALSEThe pulse completes; re-arming may require IN to return FALSE.

Ladder and Structured Text examples

Generate a three-second horn pulse

|----[ Alarm_Trigger ]----[ TP HornPulse ]----|
|                            PT: T#3s          |
|----[ HornPulse.Q ]---------( Alarm_Horn )----|

The horn sounds for the programmed pulse even if Alarm_Trigger is brief. A trigger held TRUE generally must return FALSE before another rising edge can start a new pulse.

IEC-style Structured Text call

VAR
    HornPulse   : TP;
    AlarmTrigger : BOOL;
    AlarmHorn    : BOOL;
END_VAR

HornPulse(IN := AlarmTrigger, PT := T#3s);
AlarmHorn := HornPulse.Q;

Do not write logic that assumes changing PT or toggling IN during an active pulse has identical effects on every runtime. Lock critical pulse parameters or validate dynamic changes.

Vendor compatibility

A shared mnemonic does not guarantee an identical interface or state machine. Confirm the instruction help for the controller, firmware, language and library version used on the project.

PlatformInstructionWhat maps cleanlyCaveat to verify
Siemens S7-1200/1500TP with IEC_TIMER instance dataRising edge starts a pulse of PTConfirm re-arm and dynamic-PT behavior in the exact CPU/TIA version.
Rockwell controllersTP exists in Micro800; classic Logix projects often use a one-shot plus timer patternBoth can create a bounded pulseInstruction availability varies by controller family and programming language; do not claim one universal Allen-Bradley TP interface.
CODESYS / IEC librariesTPCommon IN, PT, Q and ET interfaceInput edges during the active pulse are ignored in the standard model; test what changing PT at runtime does.

Failure modes and edge cases to test

IN remains TRUE after the pulse

Q becomes FALSE at PT and no new pulse starts until a valid new rising edge occurs.

A second edge arrives during the pulse

The active pulse continues to its original completion; the edge is normally ignored.

PT changes while Q is TRUE

Behavior can be runtime specific. Treat a dynamic preset as a tested design feature, not an assumption.

The pulse drives a safety-related output

Use an approved safety timer/block and validate de-energization; a standard TP is not a safety function.

Evidence and review status

The standard pulse behavior was checked against current Schneider Electric and ABB/CODESYS-derived library documentation. Instruction availability varies across Rockwell controller families.

Technical review date:

Critical behavior

  • A rising edge at IN starts Q immediately and holds it true for the programmed PT interval.
  • Dropping IN during an active pulse does not normally shorten the output pulse.
  • A new edge during the active pulse does not normally restart or extend the pulse.
  • A valid new trigger requires the block to complete and observe the input in its re-armed state.

Verification checklist

  1. 1Trigger TP with an input pulse shorter than PT and measure Q for the full preset.
  2. 2Hold IN true beyond PT and verify Q still becomes false.
  3. 3Apply a second rising edge during the active pulse and confirm it is ignored.
  4. 4Test dynamic PT, re-arm and startup behavior in the target runtime.

Worked test

Prove a three-second alarm-horn pulse

Call HornPulse(IN := AlarmTrigger, PT := T#3s) and drive AlarmHorn from HornPulse.Q.

  1. 1Start with AlarmTrigger false and confirm Q is false.
  2. 2Pulse AlarmTrigger true for one task execution.
  3. 3Toggle AlarmTrigger again while Q is still true.
  4. 4Measure Q until the three-second preset expires, then return IN false before retriggering.

Expected result: AlarmHorn turns on at the first rising edge, remains on for one three-second pulse and is not extended by the second edge.

Technical sources

The target controller's version-specific instruction help remains authoritative.

Platform-Specific Implementation

S

Siemens (TIA Portal)

Use IEC_Timer (TP) in TIA Portal. Legacy: SFB 3 (TP_TIME).

AB

Allen-Bradley (Studio 5000)

Instruction availability depends on controller family. Micro800 provides TP; classic Logix projects commonly implement a fixed pulse with a one-shot and timer pattern.

C

CODESYS

Standard TP in Standard library. Fully IEC 61131-3 compliant.

Common Applications

  • Alarm horn activation
  • Solenoid pulse (dispensing)
  • One-shot signal generation
  • Indicator light flash
  • Pneumatic valve pulse

Common Mistakes to Avoid

  • Expecting pulse to restart while still active
  • Forgetting that IN must return to FALSE before re-triggering
  • Confusing TP with TON behavior

Frequently Asked Questions

What is TP (Timer Pulse) in PLC programming?

Generates a fixed-duration pulse on rising edge of input. The TP (Timer Pulse) function block generates a fixed-duration output pulse when triggered. On a rising edge of IN, the output Q goes TRUE for exactly the preset time PT, regardless of when IN goes FALSE.

What are common applications of TP (Timer Pulse)?

TP (Timer Pulse) is commonly used for: Alarm horn activation, Solenoid pulse (dispensing), One-shot signal generation, Indicator light flash, Pneumatic valve pulse.

How do I use TP (Timer Pulse) in different PLC platforms?

Siemens: Use IEC_Timer (TP) in TIA Portal. Legacy: SFB 3 (TP_TIME). Allen-Bradley: Instruction availability depends on controller family. Micro800 provides TP; classic Logix projects commonly implement a fixed pulse with a one-shot and timer pattern. CODESYS: Standard TP in Standard library. Fully IEC 61131-3 compliant.

Free PLC simulator

Wire this block up and run it

Drop the instruction into a rung, hit Run, and watch it execute in your browser. 12 guided lessons across 8 PLC dialects — free account, no credit card.

Practice PLCs free →