There is no time conversion of the S7-300/400 CPU clock to summer or winter time in automation facilities with integrated time synchronization. Industrial plants with time synchronization are always supposed to be set to winter time In order to determine the current local time (summer time) in the CPU you can use block FC61 "BT_LT" of the standard library "Miscellaneous Blocks". The Online Help for "BT_LT" contains a list of the blocks required in addition. Based on a default basic time, "BT_LT" calculates the current local time by means of data stored in a data block The calculated local time can for instance serve as system time for operation and monitoring devices (e.g. SIMATIC HMI panels) by means of time synchronization.
Example of a conversion of the CPU basic time in local time and transfer of the local time to the panel
Conversion of the CPU basic time into local time
- Configure a data block according to structure UDT60 of the Standard Library "Miscellaneous Blocks" with the calculation parameters for the local time and the conversion data for summertime and wintertime. This DB must be specified as input parameter "WS_DAT" at the "BT_LT".
- Read out the basic time of the CPU using SFC1 "READ_CLK".
- Specify the read out basic time as input parameter "BT" at the "BT_LT".
- At the parameter "LT" the local time calculated is issued in the DATE_AND_TIME format.
Transfer of the local time to the panel
The transfer of the local time determined "LT" to the panel can be carried out via the time-of-day synchronization between panel and CPU. With time-of-day synchronization, the local time determined can be transferred to the panel using controller jobs (14 "Set time" and 15 "Set date"). After executing job 14 or 15, the system time of panel is automatically set with the delivered data.
For more information and sample programs on time-of-day synchronization, see the following entries:
Table 1: Sample programs for time-of-day synchronization
|How do you synchronize date/time between a line/graphics operator panel (TD17, OP5, OP15, OP17, TP27, OP27, TP37, OP37) and an S7-300/400 controller with ProTool?
|How do you synchronize the date and time between an S7-300/400 and OP3 (C7-621) with ProTool?
|How do you synchronize date and time between a TP170A and an S7-300/400 controller with ProTool?
|How do you synchronize the date and time between a Windows-based operator panel and the S7-300/S7-400 controller with ProTool?