Technical data

Table Of Contents
SFCs for Handling Run-Time Meters
System Software for S7-300/400 System and Standard Functions - Volume 1/2
A5E00709327-01
6-7
6.6 Reading the System Time with SFC 64 "TIME_TCK"
Description
With SFC 64 "TIME_TCK" (time tick), you can read the system time of the CPU.
The system time is a "time counter" counting cyclically from 0 to a maximum of
2147483647 ms. In case of an overflow the system time is counted again starting
with 0. The resolution and the accuracy of the system time are 1 ms for the S7-400
and CPU 318 and 10 ms for all other S7-300 CPUs. The system time is influenced
only by the operating modes of the CPU.
Application
You can use the system time for example, to measure the duration of processes by
comparing the results of two SFC 64 calls.
System Time and Modes
Mode System Time ...
Startup ... is constantly updated
RUN
STOP ... is stopped and retains the current value
Hot restart
(not with S7-300 and S7-400 H)
... continues with the value saved at the change to the STOP mode
Warm restart ... is deleted and restarts with "0"
Cold restart
Parameter Declaration Data Type Memory Area Description
RET_VAL OUTPUT TIME I, Q, M, D, L The RET_VAL parameter contains
the read system time in the range
from 0 to 2
31
-1 ms.
Error Information
SFC 64 "TIME_TCK" does not provide any error information.