7/21/2009 3:15 PM | |
Joined: 10/7/2005 Last visit: 10/4/2024 Posts: 3024 Rating: (1054) |
Hello adilmahsan it depends on the Timers you are using so let's start with the good old so called S5Timers (e.g T1, T2 , T3 etc.). S5 Timers: These are part of the Operating system of your S7 and are updated by the OSin the "background" as per their "Time base" (or resolution). For example, if your "Time Base" is 10 ms, then your S5 Timer value is updated every10ms. More importantly it will "time out" at any time in the scan when the time isup. As for the elusive"Time Base", this is another thing worthwhile noting about S5 Timers, especially since (unlike in an S5 where these "come from") it is sort of hidden from you in S7 due to usage of the more user friendly S5TIME format. The"Time base" that is automatically used by the OSis as listed below and depends on the choosen Preset Time. Note thatit is valid for the WHOLE Time that the Timer is running!: Time base: 0.01 sec. for a range of 10ms to 9.99 sec. Time base: 0.1 sec. for a range of 10sec. to 99.9 sec. (1 min. 39sec. 900ms) Time base: 1 sec. for a range of 100sec. to 999 sec. (16 min. 39sec.) Time base: 10sec. for a range of 1000sec. to 9990 sec. (2 h 46 min. 30sec.) Attached is a picture which hopefully makes this a bit clearer. What does this all mean for your "problem"?. Well, assuming you do NOT use the R(eset) input of your S5 Timer, you'll need a 0-->1 transition to start your Timer. It really depends on how you wrote your program but assuming you use the S5 Timer to retrigger itself (e.g AN T 7/ SD T7), your scan of the S5 Timer will "miss" the "0" call of the S5 Timer(since it expired after the inital start and beforeyour scan called it the second time)and it won't run again. IECTimers: The other Timers that are available in an S7 are the IEC Timers (i.e. SFB 3, 4 & 5) and can be found in the System Functions of the Standard Library. These are NOT updated by the OS, but instead each timethey are called and do NOT have a "variable" Time Base (their resolution is 10ms in an S7-300 and 1 ms in an S7-400). I hope this helps |
Last edited by: fritz at: 7/21/2009 3:19 PMForgot the attachmnet and noted that Aret had already beaten me to this post (sorry mate, dind''''t mean to copy you, I guess I have to learn to type faster or less or both...) Cheers |
|
This contribution was helpful to1 thankful Users |
Follow us on