show the entry list
WinCC flexible ES -- Creating HMI configurations -- Synchronizing date and time
What settings are to be made in Windows 7 in order to change the system time of the PC by means of WinCC flexible Runtime/WinCC Runtime Advanced?
How can you calculate the actual local time (summer time or winter time) in the S7-300/400 CPU and then use it on the panel as system time?
How do you synchronize the data and time between a SIMATIC HMI panel and a SIMOTION controller?
How do you synchronize date/time between a TP170A / TP170micro / TP177micro and an S7-200 CPU with WinCC flexible?
How do you synchronize the date and time between a TP170A and the S7-300/S7-400 controller with WinCC flexible?
How do you synchronize the date and time between an operator panel and an S7-300/S7-400 controller with WinCC flexible?
How do you synchronize the system clock between a Windows-based panel and an S7-200 CPU with WinCC flexible?
How do you do the summer/winter time switchover with WinCC flexible (update to version V1.1)?
How do you change the date format in WinCC flexible?
STEP 7 Micro/WIN -- System wide configuration -- Synchronizing time
How are the date and time of the S7-200 CPU displayed on a TP170A connected to it?
How do you synchronize date/time between a TP170A / TP170micro / TP177micro and an S7-200 CPU with WinCC flexible?
How do you synchronize the system clock between a Windows-based panel and an S7-200 CPU with WinCC flexible?
How do you synchronize the system clock between a Windows-based panel and an S7-200 CPU with ProTool?
How do you synchronize time/date between a TP170A and an S7-200 CPU with ProTool?
How do you synchronize the date and time between a line or graphics device (TD17, OP5, OP7, OP15, OP17, TP27, OP27, TP37, OP37) and an S7-200 CPU with ProTool?
How do you synchronize the date and time between an OP3 and an S7-200 CPU?
Micro Panels -- Creating HMI configurations -- Setting and editing date and time
How do you have specific language character sets (e.g. Cyrillic) displayed in S7-200 Text Displays?
How do you do a multilingual configuration of S7-200 Text Displays?
How do you synchronize the system clock between a Windows-based panel and an S7-200 CPU with ProTool?
How do you synchronize date/time between a TP170A / TP170micro / TP177micro and an S7-200 CPU with WinCC flexible?
Touch Panel / Operator Panel -- Creating HMI configurations -- Setting and editing date and time
How do you do the summer/winter time switchover with WinCC flexible (update to version V1.1)?
How do you synchronize the system clock between a Windows-based panel and an S7-200 CPU with WinCC flexible?
How do you synchronize the system clock between a Windows-based panel and an S7-200 CPU with ProTool?
How do you synchronize date/time between a TP170A / TP170micro / TP177micro and an S7-200 CPU with WinCC flexible?
How do you synchronize the date and time between a TP170A and the S7-300/S7-400 controller with WinCC flexible?
How do you synchronize the date and time between a Windows-based operator panel and the S7-300/S7-400 controller with ProTool?
How do you synchronize the date and time between an operator panel and an S7-300/S7-400 controller with WinCC flexible?
How do you change the date format in WinCC flexible?
How do you synchronize date/time between a TP170A / TP170micro / TP177micro and an S7-200 CPU with WinCC flexible?
Part number:

Instructions:
Since only an unbuffered system clock is integrated in TP170A, TP170micro and TP177micro, the panel's system clock can only be synchronized at regular intervals with the system clock of the S7-200 controller using the "Date/time PLC" area pointer.

You have two options:

An example of the two transfer methods mentioned above is available at the end of this entry in the form of a compressed file. It contains a block (library) for the STEP 7 Micro/Win program and WinCC flexible projects for the relevant panels.

Transfer the CPU system time to the panel

You can synchronize the system time on the panel, which is used for time stamping incoming operation messages among other things, to the system time of the controller using the "Date/time PLC" area pointer (see Fig. 01). In the case of panels that do not have the "Date/time PLC" area pointer, this is not presented as a choice in WinCC flexible.

Configuring in WinCC flexible
Insert the "Date/time PLC" area pointer by parameterizing the area pointer's connection in the "Area pointer" tab (Fig. 01). Then define the initial address of the area pointer, e.g. "VB 0", in which the system time is to be transferred from the S7-200 to the panel. Via the Acquisition Cycle you define the interval at which the system time in the Touch Panel is updated with the current system time of the CPU. It is recommended to set an acquisition cycle of at least 10 seconds.


Fig. 01

In order to be able to read out the system time of the S7-200 you need the READ_RTC block from the project tree instructions of STEP 7 Micro/WIN.

Configuring in STEP 7 Micro/WIN
In your STEP 7 Micro/WIN program you call the READ_RTC function for reading out the system time. You assign the address of the area pointer to the T parameter. Finally you load the sample WinCC flexible project into your panel.


Fig. 02

Transferring a user-defined system time to the CPU and the panel

If you want to synchronize the time between panel and S7-200 and want to change the time via the panel, you must use the "Timesynch_TP170A_micro" (v1.1) block that is included in Attachment 1 at the end of this entry.

In the following we explain the implementation of the "Timesynch_TP170A_micro" block for synchronizing between S7-200 and panel.

Configuration in STEP 7 Micro/WIN
Import the library in STEP 7 Micro/WIN (Attachment 1).  Information on inserting libraries in STEP 7 Micro/WIN is available in Entry ID: 16689345.

Define the global memory area for the synchronization area by opening "File > Library Memory...". Select the "Timesynch_TP170A_micro" (v1.1) block and enter the initial address "VB 0", for example.


Fig. 03

Note:
Use the updated version of the synchronization block from the "Timesynch_TP170A_micro (v1.1)" library.

Note:
You can verify the block version by marking the block in the library and right-clicking to open the pop-up menu. Then select "Properties...". The latest version of the block is displayed under "Version Library". With version v1.1 the version number is also given in the block comment.

Integrate the time synchronization block into the program (e.g. "MAIN (OB1)") and define the parameters (variables) for the block. You activate the block via the input "EN" that must be interconnected in the S7-200 program, e.g. with "LD SM0.0".
The variables used in this example (VB12-VB19) are for setting the system time of the S7-200. Marker M1.1 acts as trigger bit for transfer to the CPU. The second marker is only required for internal operations.


Fig. 04

In order to be able to change the system time of the S7-200 via the panel you must make the following settings in WinCC flexible.

Configuring in WinCC flexible
As described above, insert the "Date/time PLC" area pointer into your WinCC flexible project. For the area pointers use the same data area that you used for the block's global data in STEP 7 Micro/WIN (see Fig. 03).


Fig. 05

In WinCC flexible you define six variables of the data type "Byte" for input of the date/time on the panel and one variable of the data type "Bool" as trigger for transfer to the CPU. On the panel you can assign values to the variables via I/O fields and set/reset the trigger bit (M1.1) via a button. Display of the input field on the panel must be hexadecimal.


Fig. 06

Note:
Note that in the case of changing the system clock via the panel the update time can take several seconds. This depends on the baud rate among other things.

The STEP 7 Micro/WIN library and the WinCC flexible project as archive file
Copy the "timesync.zip" file into a separate folder and then unpack the file. You can then integrate the library, which can be used in version V4 and higher of STEP 7 Micro/WIN, into your S7-200 project. You can open and use the HMI project in WinCC flexible 2004 and higher.

Information on inserting libraries in STEP 7 Micro/WIN is available in Entry ID: 16689345.

Notes:

  • For STEP 7 Micro/WIN V4.0 the SP 5 is available for downloading free of charge in Entry ID: 24675347 .

Attachment 1: timesync.zip ( 5624 KB )

Runnability and test environment:
The following table lists the components that have been used to create this entry and verify the functions described.   
 
Components Product and version designation
PC operating system Microsoft Windows XP SP2
Standard tools  
Engineering tools STEP 7 Micro/WIN 4.0.2.26
HMI software WinCC flexible 2005 SP1
HMI system -

Keywords:
Setting the clock, Synchronize, Synchronization

 Entry ID:19323674   Date:2007-11-29 
I regard this article....as helpfulas not helpful                                 
mySupport
My Documentation Manager 
Newsletter 
CAx-Download-Manager 
Support Request
To this entry
Print
Create PDF 
Send to a friend
QuickLinks
Compatibility tool 
Help
Online Help
Guided Tour