IEC Timer updating & accuracy

Jieve

Member
Join Date
Feb 2012
Location
USA
Posts
274
Hello guys,

I understand that Siemens IEC timers update asynchronous to the program cycle. While the Time value is stored in milliseconds, I'm wondering how accurate they actually are. As I understand it, the Time value is updated by subtracting the current cpu Time from start time. Can anyone provide information on how often they are truly updated? I originally thought they were updated whenever called, and not updated if not called. I also thought i had remembered reading something somewhere about the cpu clock (at least on the 1200) updating every 10 ms, which wouldn't make them especially accurate (at least in the s7-1200). 300/400 would obviously have to be way more accurately updated than this. But I could be totally off on this, so any input would be appreciated.

Thanks!
 
Thanks for that response L D. I initially thought that's how they worked but when reading over my Hans Berger books I found under the section on Simatic Timers that Simatic timers update asynchronously. The next section was on IEC timers, but there was no mention of how they updated so I assumed it was the same.

Just tested out an IEC pulse timer using PLCSim, calling it in a function with a clock memory bit in front. Exactly right, the timer only updates when called.

What's the deal with the Simatic Timers? Anyone know the answer to my above question with regard to the simatic timers, in other words how often they actually update?
 
Summary:

S5 timers: Once triggered they will keep going. Even when not scanned.
NOTE: Since they are asynchronous to the scan cycle, it means they can change state within the scan cycle.

IEC timers: These are identical to your general FC/FB's. They need to be scanned to work.

CPU Clock Memory: This is something you configure in the HardwareConfig.
It is a byte of memory, of which every bit in the byte has a different frequency.


S5 timers have a different resolution depending on the time base used.
IEC timers have a 1ms resolution, but the actual accuracy will depend on the scan cycle time.
Clock memory isn't a timer. :D

Hope this clears things up a bit.
 

Similar Topics

I recently discovered that when downloading an online edit [S7-1500] that requires the initialization of the modified FB's iDB, an IEC timer whose...
Replies
36
Views
11,998
Tried Googling and searching this forum for the answer to this, but no luck, so figured start a new post to see if anyone can help me...or confirm...
Replies
8
Views
3,445
After a previous post I have been trying my best to set up a simple s7 IEC timers within a FB (Timings) and then use it from a FC (FC1). I have...
Replies
24
Views
3,349
Hi all, :huh: How the IEC timer works? I tried to simulate the IEC timer SFB4 in FB but it seems its hard for me to analyse where I...
Replies
6
Views
4,380
Hello! I intend to use the iec timer SFB4 for alarm blocks. In order not to use up one instance data block for each timer, my intention was to...
Replies
4
Views
7,751
Back
Top Bottom