Turn On An Output For 5 Seconds - Siemens SIMATIC S7-1200 Getting Started

Hide thumbs Also See for SIMATIC S7-1200:
Table of Contents

Advertisement

4.2

Turn on an output for 5 seconds

Next, you add an off-delay timer (TOF) to the third network of your user program.
When the timer turns on (IN = 1), the output of the off-delay timer turns on (Q = 1). After a
preset amount of time (PT), the output of the off-delay timer turns off.
Like the on-delay timer, the off-delay timer uses a data block (DB) to maintain the timer
data. You assign this data block when you insert the TOF instruction onto the network.
As with the on-delay timer, you will enter a constant for the for preset time parameter (PT).
You could also enter a Time (4-byte signed value) memory address that stores the preset
value. This would allow your user program to change the preset value according to
operating conditions, if required. You can also store the elapsed time (ET) as a Time (4-
byte signed value) memory address that can be accessed by the other elements of your
user program.
Getting started with S7-1200
Getting Started, 11/2009, A5E02486791-01
You use a TOF instruction to hold an output (Q) on for a preset amount of
time after the input (IN) turns off. When enabled by the rising edge of IN,
the TOF instruction turns Q on. The TOF timer starts on the falling edge of
IN. After the preset time (PT) elapses, the TOF instruction turns Q off.
Complete the user program
4.2 Turn on an output for 5 seconds
45

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents