8/26/2014 8:35 AM | |
Joined: 9/1/2005 Last visit: 11/8/2024 Posts: 4111 Rating: (195) |
new question published by MadCatis split to a seperate thread with the subjectoption for multi timers. Best regards CS Moderator |
My Forum is the place to personalize your profile, |
|
8/29/2014 8:28 AM | |
Joined: 10/28/2008 Last visit: 7/21/2023 Posts: 245 Rating: (14) |
Hi. I do not know what do you mean with "Get Tick Count" function, maybe you mean to make your own timer... Some time ago I found out that TOF timer in some PLCs does not work properly (threadhttps://www.automation.siemens.com/tf/WW/en/Posts/82815#top). I got some indefinite answers so I developed my own timer function block (TON and TOF) to be able to use them instead of S5 timers and instead of SFB IEC timers. I made workbench test for my timers: Size of the Siemens and developed timers: 22Bytes (TON, TOF) Tested on PLC S7 400: CPU 6ES7 414-4HM14-0AB0 bit operations: 0,045 microseconds word operation: 0,045 microseconds fixed point operation: 0,045 microseconds floating point operation: 0,135 microseconds For testing I used system time reading for time duration of timers code evaluation System time duration for 1000 Siemens timers: 7 miliseconds. Timers tests: 1) TOF timer a) 1000 Siemens timers - not timing - 7 to 8 ms (moreless 7ms) - when timing - 10 to 11 ms (moreless 11ms) b) 1000 my developed timers - the first developed version - 15 to 16 ms in all cases (not timing or when timing) - the second developed version - reading of the system time only when timing, 9 to 10 ms not timing, 13 to 14 ms when timing 2) TON a) 1000 Siemens timers - not timing - 7 to 8 ms (moreless 7ms) - when timing - 10 to 11 ms (moreless 11ms) b) 1000 my developed timers - only the first developed version - 15 to 16 ms in all cases (not timing or when timing) So there is easy way how to develop your own timers to be able to be independent to Siemens timers. In new versions of PLC firmware the mistake of the TOF timer is fixed, so we decided to stay with IEC SFB timers... Regards. |
Georgio |
|
Follow us on