Beruflich Dokumente
Kultur Dokumente
TIMER
SIEMENS
SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved
1/10
SIEMENS
Objectives
- Understand The Move Function & How It Works. - Know The Types Of Timer & What Is The Difference Between Them.
SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved
2/10
SIEMENS
Move
MOVE
EN
ENO
Example: L +5 // 16-bit constant T MB0 L L#523123 // 32-bit constant T MD4 L B#16#EF // byte in hexadecimal form T MW8 L 2#0010 0110 1110 0011 //16-bit binary T MW10 L 3.14 // 32-bit constant T MD12
LAD Diagram
20 IN OUT MW10
FBD Diagram
20 IN ENO
20 MB10
STL
SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved
3/10
SIEMENS
Timers
- ON Delay Timer (SD) - Stored ON Delay Timer (SS) - Pulse Timer (SP) LAD Diagram
I 0.0 S5T#5s I 0.1
T(No.) S_(Type) Q S
TV R BI BCD
Q0.0 MW0
T(No.) S_(Type) BI
BCD
MW0 Q0.0 =
FBD Diagram
S5T#5s I 0.1
STL
A I 0.0 L S5T#5s S(Type) T(No.) A I 0.1 R T(No.) L T(No.) T MW0 A T(No.) = Q0.0
SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved
4/10
SIEMENS
T0 S_ODT S Q BI BCD TV R T0
Start
The timer starts when the Start input LAD Diagram "S" changes from "0" to "1". The timer starts with the time value specified at the Time Value "TV" for as long as the signal state at input "S" =1.
S5T#5s I 0.1
Q0.0 MW0
S_ODT
I 0.0 S5T#5s I 0.1 S TV R BI
BCD
MW0 Q0.0 =
Reset
When the Reset input "R" changes from "0" to "1", the current time value and the time base are deleted and the output "Q" is reset.
FBD Diagram
Output
The signal at the "Q" output changes to "1" when the timer has expired without error and input "S" has signal state "1".
STL
Digital Outputs
The current time value can be read as a binary number at the "BI" output and as a BCD number at the "BCD" output.
SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved
A L SD A R L T A =
5/10
SIEMENS
Start
The stored-on-delay timer starts when the "S" input changes from "0" to "1". The timer runs starting with the time value specified at input "TV" and continues to run even if the signal at input "S" changes back to "0" during that time.
I 0.0 T1 S_ODTS Q S TV BI Q0.1 MW0
LAD Diagram
S5T#5s I 0.1
R
T1
BCD
S_ODTS
Reset
When the reset input "R" changes from "0" to "1", the current time value and the time base are deleted and output "Q" is reset.
I 0.0
S TV R
BI
BCD
MW0 Q0.1 =
FBD Diagram
S5T#5s
I 0.1
Output
The signal state at output "Q" changes to "1" when the timer has expired without error, regardless of whether the signal state at input "S" is still "1".
STL
A L SS A R L T A =
SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved
6/10
SIEMENS
Q0.2 MW0
LAD Diagram
S5T#5s I 0.1
Reset Output "Q" is reset when the timer has expired, or the start "S" signal changes from "1" to "0", or the reset input "R" has a signal state of "1".
I 0.0
S_PLUSE S TV R BI
BCD
MW0 Q0.2 =
FBD Diagram
S5T#5s
I 0.1
STL
A L SP A R L T A =
SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved
7/10
SIEMENS
Q0.3 MW0
LAD Diagram
S5T#5s I 0.1
BI BCD
MW0 Q0.3 =
FBD Diagram
S5T#5s
I 0.1
Reset Output "Q" is reset when the timer has expired, or the reset input "R" has a signal state of "1".
STL
A L SS A R L T A =
SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved
8/10
SIEMENS
I 0.0
Q0.4 MW0
LAD Diagram
S5T#5s I 0.1
I 0.0
S TV R
BI
BCD
MW0 Q0.4 =
FBD Diagram
S5T#5s
I 0.1
STL
A L SS A R L T A =
9/10
SIEMENS
10/10
SIEMENS
Exercise:
1- By using two On Delay timer, write a PLC program to make the car flasher. 2- By using two .. timer, write a PLC program to make two Lamp flashing opposite to each other.
3- By using two Extended Pulse timer , write a PLC program to make Pulse Generator.
4- By using one Extended Pulse timer, write a PLC program to make the car flasher.
SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved
11/10
SIEMENS
Answer of Exercise 1:
Answer of Exercise 2:
Answer of Exercise 3:
SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved
12/10
SIEMENS
Answer of Exercise 4:
SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved
13/10