Complete the user program
4.1 Add an on-delay timer to delay the start of an output
Getting started with S7-1200
Getting Started, 11/2009, A5E02486791-01
43
Insert an on-delay timer
The second network of your user program will use a TON instruction that turns on 5
seconds after the "Run" output of the latching circuit turns on.
First, enter the contact that will activate the timer.
1. Select the second network of your user program.
2. Just like you did for the latch circuit (Page 31), click the
normally ope
n contact in the "Favorites" to insert the
instruction.
3. For the address of the instruction, select the "Run" tag. (As
for the previous exercise (Page 33), you can type an "r" or
else
click the tag icon to di
splay the list of tags.)
Expand the "Timers" folder in the Instruction task card, and then drag the TON timer to the
network.
Dropping the TON instruction onto the network
automatically creates a single-instance data block
(DB) for storing the timer data.
Click "OK" to create the DB.
Now create a 5-second delay.
1. Double-click the preset time
(PT) parameter.
2. Enter a constant value of
"5000" (for 5000 ms, or 5
seconds).
You can also enter "5s" for 5
seconds. ("5h" enters 5 hours,
and "5m" enters 5 minute.)
STEP 7 Basic formats the constant as "T#5000ms"