Siemens Simatic S7-300 Service Manual Page 257

  • Download
  • Add to my manuals
  • Print
  • Page
    / 272
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 256
Programming Examples
B.3 Example: Timer Instructions
Clock Pulse Generator
You can use a clock pulse generator or flasher relay when you need to produce a
signal that repeats periodically. A clock pulse generator is common in a signalling
system that controls the flashing of indicator lamps.
When you use the S7-300, you can implement the clock pulse generator function by
using time-driven processing in special organization blocks. The example shown in
the following statement list, however, illustrates the use of timer functions to
generate a clock pulse. The sample program shows how to implement a
freewheeling clock pulse generator by using a timer.
Statement List to Generate a Clock Pulse (pulse duty factor 1:1)
STL Explanation
U T1 //If timer T 1 has expired,
L S5T#250ms //load the time value 250 ms into T 1 and
SV T1 //start T 1 as an extended-pulse timer.
NOT //Negate (invert) the result of logic operation.
BEB //If the timer is running, end the current block.
L MB100 //If the timer has expired, load the contents of memory byte MB100,
INC 1 //increment the contents by 1,
T MB100 //and transfer the result to memory byte MB100.
Signal Check
A signal check of timer T1 produces the following result of logic operation (RLO).
0
1
250 ms
As soon as the time runs out, the timer is restarted. Because of this, the signal check
made the statement AN T1 produces a signal state of 1 only briefly.
Statement List (STL) for S7-300 and S7-400 Programming
A5E00706960-01
B-7
Page view 256
1 2 ... 252 253 254 255 256 257 258 259 260 261 262 ... 271 272

Comments to this Manuals

No comments