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
| Name | Type | Description |
|---|---|---|
| IN | BOOL | Trigger input - rising edge starts pulse |
| PT | TIME | Pulse duration (preset time) |
Outputs
| Name | Type | Description |
|---|---|---|
| Q | BOOL | Pulse output - TRUE for duration PT |
| ET | TIME | Elapsed 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.
State table
| Moment | Input | Internal state | Output | Engineering meaning |
|---|---|---|---|---|
| Ready | IN = FALSE | ET = T#0s | Q = FALSE | The block is armed for a new rising edge. |
| Trigger | IN changes FALSE → TRUE | ET starts increasing | Q = TRUE immediately | The fixed pulse begins on the edge, not after PT. |
| Input changes during pulse | IN falls or rises while ET < PT | ET continues | Q stays TRUE | The active pulse is not shortened or extended. |
| Preset reached | Any stable state | ET reaches PT | Q = FALSE | The 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.
| Platform | Instruction | What maps cleanly | Caveat to verify |
|---|---|---|---|
| Siemens S7-1200/1500 | TP with IEC_TIMER instance data | Rising edge starts a pulse of PT | Confirm re-arm and dynamic-PT behavior in the exact CPU/TIA version. |
| Rockwell controllers | TP exists in Micro800; classic Logix projects often use a one-shot plus timer pattern | Both can create a bounded pulse | Instruction availability varies by controller family and programming language; do not claim one universal Allen-Bradley TP interface. |
| CODESYS / IEC libraries | TP | Common IN, PT, Q and ET interface | Input 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
- 1Trigger TP with an input pulse shorter than PT and measure Q for the full preset.
- 2Hold IN true beyond PT and verify Q still becomes false.
- 3Apply a second rising edge during the active pulse and confirm it is ignored.
- 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.
- 1Start with AlarmTrigger false and confirm Q is false.
- 2Pulse AlarmTrigger true for one task execution.
- 3Toggle AlarmTrigger again while Q is still true.
- 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.
- TP / TP_S pulse function block
Schneider Electric — Pulse behavior, interface and instance requirements
- TP function block
ABB Automation Builder — IEC-style declaration and elapsed-time output
- TP pulse timing for Micro800
Rockwell Automation — Shows controller-family-specific availability
Platform-Specific Implementation
Siemens (TIA Portal)
Use IEC_Timer (TP) in TIA Portal. Legacy: SFB 3 (TP_TIME).
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.
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.
Related Function Blocks
TON (Timer On-Delay)
Starts timing on rising edge, output activates after preset delay.
View Reference →TOF (Timer Off-Delay)
Output stays TRUE for preset time after input goes FALSE.
View Reference →R_TRIG (Rising Edge Detection)
Detects FALSE-to-TRUE transition, outputs single-scan pulse on rising edge.
View Reference →RTO (Retentive Timer On)
Timer retains accumulated value when input goes FALSE; requires manual reset.
View Reference →TONR (Timer On-Delay Retentive)
Siemens time accumulator that retains ET across enable cycles until its reset input is applied.
View Reference →RTOR (Retentive Timer On with Reset)
Retentive on-delay timer with integrated reset input for accumulated time clearing.
View Reference →