How to Use a Timer in TIA Portal
This guide shows you how to use a timer in TIA Portal. You wire an on-delay timer (TON) to an HMI button so that a door opens only after you hold the button for a few seconds. You then monitor and test the logic in simulation, switch the same block to a pulse timer (TP) and an off-delay timer (TOF), and check how each one behaves.
Video: How to Use Timers in TIA Portal (TON, TOF, TP) | PLC Programming Guide by KK Automation. All credit for the demonstration goes to the creator; watch the original on YouTube. The written guide below was generated from this video by Docsie. Creator? Request a change or removal.
This guide shows you how to use a timer in TIA Portal. You wire an on-delay timer (TON) to an HMI button so that a door opens only after you hold the button for a few seconds. You then monitor and test the logic in simulation, switch the same block to a pulse timer (TP) and an off-delay timer (TOF), and check how each one behaves.
Prerequisites
Before you start, make sure you have the following:
- A TIA Portal project loaded with both the HMI screen and the PLC programming environment visible.
- An HMI screen that shows a "DOOR OPEN" button, a timer value display labeled "Msec", and an image or animation of a door.
- The PLC program open to the main OB1 block, labeled "Main [OB1]" in the project tree.
- HMI tags for the button (for example,
HMI BUTTON 1) and for the door output (for example,DOOR OPEN1) in your tag table.
Add and configure the on-delay timer
Open your project and check the starting point
Open your project so that the HMI screen and the main OB1 block are both available.
Pressing the "DOOR OPEN" button on the HMI does nothing yet, because the logic has not been programmed. Your goal is to make the button control the door through an on-delay timer (TON). Confirm that you are editing inside the main OB1 block, labeled "Main [OB1]" in the project tree.

Find the timer instructions
The door should open only after you press and hold the "DOOR OPEN" button for a few seconds. To build this logic, you need a timer.
Move your cursor to the far right of the TIA Portal screen to open the Instructions pane. Find the Timer operations folder and click the small arrow next to it to expand it.

Select the TON block
Locate TON (Generate on-delay) under Basic instructions > Timer operations. When you hover over it, a tooltip appears: "TON means Timer ON. Delays the setting of the Q output by the programmed time PT."

Drag the TON block to Network 1
Click and hold the TON block, then drag it to the empty rung in Network 1. Release the mouse button when a green circle appears on the network line. The green circle marks a valid drop location.

Review the Call options dialog
After you drop the block, a Call options window appears and prompts you to assign a unique name to the timer's data block. By default, the name is IEC_Timer_0_DB, the type is Single instance, and the numbering is Automatic.

Rename the data block
Click in the Name field and enter Door on delay timer. Make sure Automatic stays selected for the number assignment.
Click OK. The dialog closes and the TON block appears in Network 1 of your OB1 program.

Check the timer block pins
The block is labeled DB1 "Door on delay timer" and shows the TON symbol. It has four pins:
IN(input, left side): the main input that starts the timer counting.PT(input, left side): the preset time, where you specify how long the timer counts.Q(output, right side): the main output, which becomes true after the timer finishes counting.ET(output, right side): the elapsed time, which shows the current time while the timer counts.
Insert a normally open contact before the IN pin
Find the toolbar at the top of the TIA Portal interface and select the normally open contact symbol. Place the contact on the rung before the IN pin of the TON timer in Network 1. Question marks appear above the contact because it has no tag assigned yet.
Assign the HMI button tag to the contact
Open the PLC data block or tag table where your HMI tags are stored and find the tag for your HMI button (for example, HMI BUTTON 1). Drag the tag from the tag table and drop it onto the question marks above the new contact.
Check that the contact before the IN pin is now labeled with the tag, for example %I0.0 and "HMI BUTTON 1". The contact now controls the timer input.


Set the preset time
Click the PT input field of the TON block and enter the preset time in the required format: T#2S500ms. This value stands for 2 seconds and 500 milliseconds (2.5 seconds). Confirm that the value appears correctly next to the PT pin, shown as T#2.5S.
Connect the Q output to the door tag
Open the tag table and find the tag for the door open signal (for example, DOOR OPEN1). Drag the tag and drop it onto the question marks next to the Q output pin of the TON timer. The timer's output now controls the door opening.

Review the completed logic
Confirm that Network 1 of the Main [OB1] block is configured as follows:
- The rung begins with a normally open contact labeled
%I0.0and "HMI BUTTON 1". - The contact is wired to the
INpin of a TON block labeledDB1with the name "Door on delay timer". - The
PTinput is set toT#2.5S, a delay of 2.5 seconds. - The
Qpin is connected to the door open tag (for example,DOOR OPEN1). - The
EToutput is visible and showsT#0ms, which means the timer has not yet elapsed.
![Main [OB1] program block showing Network 1 with the HMI BUTTON 1 contact, the TON timer with PT set to T#2.5S, and the Q output connected](
)
Make sure all tag assignments and wiring are correct and match the logic you intend. Network 2 should be empty, ready for additional logic if you need it. The project tree, tag tables, and instruction list stay accessible for further configuration or troubleshooting.

Monitor and test the program
Turn on monitoring mode and load the program
Click the "glasses" icon in the toolbar to enable monitoring mode. This lets you observe live values and status changes in the PLC program during simulation or online operation.
A Load preview dialog appears and shows the following:
- Target:
PLC_1 - Status: Ready for loading
- Simulated module: The loading is performed from a simulated PLC.
- Software: Download software to device (Consistent download).
Click Load to continue.

Wait for the download to finish
The Download to device dialog appears and displays "Loading configuration. This will take some time." Let the configuration finish loading before you continue.
When loading completes, observe the main program block in monitoring mode. The ladder logic for the on-delay timer is visible, and you can watch the status of the timer and the output coil (DOOR OPEN1) in real time. The program is now ready for testing with the HMI or simulated inputs.

Test the on-delay timer in the HMI simulation
Open the SIMATIC WinCC Runtime Advanced HMI simulation. The HMI screen displays the "DOOR OPEN" button, a numeric input for milliseconds (Msec), and a graphical door.
Press the "DOOR OPEN" button to simulate pressing HMI BUTTON 1, and watch the timer count up in milliseconds. If you release the button before the timer completes, the timer resets and the door does not open. This is the behavior of an on-delay timer.
Change and test the timer type
Change the timer type in the main program block
Standard timers (TON, TOF, and TP) in TIA Portal are interchangeable. You do not need to delete or rewire the logic to switch between them. The program currently uses a TON (on-delay) timer.
Locate the timer block in Network 1 of Main [OB1] and click the timer type dropdown menu within the block labeled "Door on delay timer". Select a new type from the options:
- TP (Pulse Timer)
- TON (On-Delay Timer)
- TOF (Off-Delay Timer)
Keep the tag connections unchanged: %I0.0 for "HMI BUTTON 1" and %Q0.0 for "DOOR OPEN1".
After you select the new type (for example, TP), verify that the block updates. It should now display "TP" (Pulse Timer) instead of "TON", and the rest of the logic and tag assignments stay the same.


Download the updated program
Click the Download or Load button to transfer the updated program to the PLC or simulator. The Load preview dialog appears and displays the following:
- Target: PLC_1
- Status: Ready for loading
- Simulated module: The loading is performed from a simulated PLC.
- Different modules: Differences between configured and target modules (online)
- Software: Download software to device (Consistent download)
Click Load to download the changes.
Turn monitoring mode back on
When the download is complete, return to the main program block and click the "glasses" icon in the toolbar to enable monitoring mode. The ladder logic now displays the updated timer block (for example, TP). The status bar and message window at the bottom confirm the successful load and the connection to the PLC.

Test the pulse timer
Open the SIMATIC WinCC Runtime Advanced HMI simulation again. The screen shows the "DOOR OPEN" button, the numeric Msec input, and the graphical door.
Press the "DOOR OPEN" button to simulate pressing HMI BUTTON 1. The door opens immediately and stays open while the timer counts down from 2.5 seconds, the value set in the timer block. In the ladder logic, the TP timer block is active and the output coil is energized.
Switch to an off-delay timer and test it
Switch the block to TOF
Open the timer type dropdown menu in the timer block again and select TOF (Off-Delay Timer). The block updates to display "TOF". The HMI simulation can stay open.
A TOF timer keeps the door open for a period after you release the button. A dialog box may appear asking "Do you want to go offline?" with Yes and No options, which reflects a change in the PLC connection state. Respond to it as needed before you continue.

Download the program with the TOF timer
After you confirm any dialogs, click Download or Load to transfer the updated program to the PLC or simulator. The timer block in Network 1 is set to TOF, and the tag assignments remain unchanged.
The Load preview dialog appears again and confirms readiness to download to the simulated PLC. Click Load to complete the process. The message window confirms the successful load and connection.
Monitor the off-delay timer
Enable monitoring mode to observe the TOF timer logic in real time. The ladder logic displays the TOF timer block with the live status of the input, the timer, and the output coil. The message window confirms the successful load and operation.

Press the HMI button to trigger the TOF timer
In the SIMATIC WinCC Runtime Advanced HMI simulation, press the "DOOR OPEN" button to simulate activating %I0.0 ("HMI BUTTON 1"). With the ladder logic editor and the HMI simulation side by side, you see the following:
- The graphical door on the HMI opens immediately.
- The output coil
%Q0.0("DOOR OPEN1") is energized, so the Q output is ON. - The TOF timer block in Network 1 is active.

Observe the TOF countdown
Release the "DOOR OPEN" button in the HMI simulation. The TOF timer starts counting down from the preset value (2.5 seconds), and the door stays open during the countdown. The ladder logic editor shows the TOF block with the elapsed time changing, and the Q output remains ON. The numeric input on the HMI may show the remaining milliseconds (for example, "+1655 Msec").

Verify that the door closes
When the TOF timer completes its 2.5-second countdown, you see the following:
- The graphical door on the HMI closes.
- The Q output (
%Q0.0) in the ladder logic turns OFF. - The TOF timer block resets to its initial state.
- The HMI numeric input resets to "+2500 Msec".

Summary
You now know how to use a timer in TIA Portal. You inserted a TON block in Network 1 and named its data block "Door on delay timer". You wired a normally open contact tagged with the HMI button to the IN pin and set PT to T#2S500ms (2.5 seconds). You connected the Q output to the door open tag.
You then loaded the program, monitored it, and tested it in the HMI simulation. Finally, you switched the same block to TP and TOF, downloaded each version, and checked that each timer type behaves differently. A TON delays the door opening, a TP opens the door immediately and holds it for the preset time, and a TOF keeps the door open for the preset time after you release the button.
Generation details: cost, quality tiers
Docsie billed 5,000 credits ($3.50) to analyze this 10-minute video at standard quality. The rewrite, template fill and Word/PDF exports were included. The same video at each quality tier:
| Quality | Frames sampled | Credits | Approx. cost |
|---|---|---|---|
| Draft | every 16-30 s | 2,500 | $1.75 |
| Standard (this guide) | every 8-15 s | 5,000 | $3.50 |
| Detailed | every 4-7 s | 10,000 | $7.00 |
| Ultra | every 1-3 s | 20,000 | $14.00 |
Credits priced at $0.70 per 1,000; plans include a monthly allowance. Enterprise customers on on-premise or bring-your-own-model deployments run this on their own inference and pay no per-video credits.
Generated by Docsie Video-to-Docs on 2026-11-24 from a 9-minute video. Screenshots are frames from the source video and belong to their creator, KK Automation, whose original is embedded above. If you own this video and want the guide removed or credited differently, contact us and we will act within one business day.