8/20/2010 7:33 AM | |
Posts: 2 Rating:
|
Could you help me reading CPU's "last scan rate time". I am converting S7-200 program to S7-1200 and there is used SMW22 to read last scan rate time. How to read last scan rate time in S7-1200. Regards, Torsti Splitted from Converting S7-200 to S7-1200: SM0.0 SM0.1 and SM0.5. |
Last edited by: O_Moderator at: 8/20/2010 9:41 AMnew subject after splitting |
|
8/20/2010 12:16 PM | |
Joined: 9/23/2005 Last visit: 12/1/2023 Posts: 4279 Rating:
|
Hi, unhapply, there is no SMW2x or SFC64 The way that I found is to use a TON, and read the ET (.ELAPSED) and subbrated it from the previus reading. |
Last edited by: Pegaia at: 8/20/2010 12:17 PMDenilson Pegaia |
|
8/20/2010 7:21 PM | |
Posts: 13 Rating:
|
Another option for calculating scan time is to use the Extended Date and Time Instructions "RD_SYS_T" and "T_DIFF". The attached screenshot showsone possible implementation that producesasnapshot of the last scan time in mSec. This could be extended to capture the last n scantimes and average them(using an array). |
8/23/2010 11:59 AM | |
Joined: 9/23/2005 Last visit: 12/1/2023 Posts: 4279 Rating:
|
Hi, thanks for your suggestion However, be carrefur with this solution, because it takes mutch more processing time as to use a Timer. |
Denilson Pegaia |
|
6/27/2015 11:26 AM | |
Joined: 8/5/2009 Last visit: 7/4/2022 Posts: 156 Rating:
|
I don't know where you use the cycle time for but be carefull Because the way your programm works, at the transition from 23:59:59:99x tot 00:00:00:00x you wil have an extreme high cycle time What i do is only update the cycle time when the new DTL is higher then the previous DTL, and i still transfer the new to previous DTL So once per day i don't update the cycle time, but use the time from the previous cycle calculation |
Follow us on