TP (Pulse Timer)
Generates a fixed-duration pulse on the output when the input has a rising edge.
Description
The TP (Timer Pulse) instruction generates a pulse of fixed duration, as defined in IEC 61131-3. When the input .IN transitions from FALSE to TRUE (rising edge), the output .Q becomes TRUE and remains TRUE for exactly the preset time .PT, regardless of what happens to the input.
Key behavior:
- Rising edge on input: output
.QbecomesTRUE, timer starts - During the pulse: output stays
TRUEeven if input goesFALSE - Elapsed time reaches preset: output
.QbecomesFALSE - Input changes during pulse: ignored, the pulse runs to completion
- New rising edge after pulse ends: starts a new pulse
This is useful for generating a fixed-duration signal, such as a brief activation of a solenoid, a timed light flash, or a measured dispensing operation.
Unlike
TON, theTPtimer is non-retriggerable. A new pulse cannot start until the current pulse finishes.
Syntax
Sequence Visual Editor

The PT chip sets the pulse length in milliseconds.
Python
from automation_machine import ActionInstruction
step.add_action("timer_name", "Timer description", instruction=ActionInstruction.TP, duration=2000)
Parameters
- name: the name of the timer instance
- description: human-readable description
- qualifier:
ActionQualifierenum (default:ActionQualifier.N, keep timer running while step active) - instruction: must be
ActionInstruction.TP - duration: the pulse duration in milliseconds (e.g.,
2000for 2 seconds)
Timer Variables
Each TP timer instance exposes the following child variables:
| Variable | Type | Description |
|---|---|---|
.IN |
BOOL | Input signal: rising edge triggers the pulse |
.Q |
BOOL | Output signal: TRUE for the duration of the pulse |
.PT |
TIME | Preset time: the configured pulse duration |
.ET |
TIME | Elapsed time: the current time since the pulse started |
See Also
- TON (On-Delay Timer): delays turning on
- TOF (Off-Delay Timer): delays turning off
- RTO (Retentive On-Delay Timer): remembers elapsed time
- Action Qualifiers Overview
- Instructions Overview