+ All Categories
Home > Documents > 67518641 WinCC Pro TimeSynch En

67518641 WinCC Pro TimeSynch En

Date post: 14-Apr-2018
Category:
Upload: ensis-caliburnus
View: 226 times
Download: 1 times
Share this document with a friend

of 40

Transcript
  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    1/40

    Applications & ToolsAnswers for industry.

    23BCover

    Time-of-Day Synchronizationbetween WinCC Runtime Professionaland S7 Controllers

    WinCC Runtime Professional

    Application Description March 2013

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    2/40

    2WinCC Runtime Professional - Time Synchronization

    V1.0, Entry ID: 67518641

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Industry Online Support

    This entry is taken from Siemens Industry Online Support. The following link takesyou directly to the download page of this document:

    http://support.automation.siemens.com/WW/view/en/67518641

    CautionThe functions and solutions described in this entry predominantly confinethemselves to the realization of the automation task. Please also take into accountthat corresponding protective measures have to be taken in the context ofIndustrial Security when connecting your equipment to other parts of the plant, theenterprise network or the Internet. For more information, please refer to Entry ID50203404.

    http://support.automation.siemens.com/WW/view/en/50203404

    http://support.automation.siemens.com/WW/view/en/67518641http://support.automation.siemens.com/WW/view/en/67518641http://support.automation.siemens.com/WW/view/en/50203404http://support.automation.siemens.com/WW/view/en/50203404http://support.automation.siemens.com/WW/view/en/50203404http://support.automation.siemens.com/WW/view/en/67518641
  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    3/40

    WinCC Runtime Professional - Time SynchronizationV1.0, Entry ID: 67518641 3

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    s

    SIMATIC

    WinCC Runtime Professional -Time Synchronization

    TIA Portal V11

    Task 1

    Solution 2

    Basics 3

    Function Mechanisms ofthis Application 4

    Setting theTime of Day 5

    Synchronizing the

    Time of Day 6

    References 7

    History 8

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    4/40

    Warranty and Liability

    4WinCC Runtime Professional - Time Synchronization

    V1.0, Entry ID: 67518641

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Warranty and Liability

    Note The Application Examples are not binding and do not claim to be completeregarding the circuits shown, equipping and any eventuality. The ApplicationExamples do not represent customer-specific solutions. They are only intendedto provide support for typical applications. You are responsible for ensuring thatthe described products are used correctly. These Application Examples do notrelieve you of the responsibility to use safe practices in application, installation,operation and maintenance. When using these Application Examples, yourecognize that we cannot be made liable for any damage/claims beyond theliability clause described. We reserve the right to make changes to theseApplication Examples at any time without prior notice.If there are any deviations between the recommendations provided in theseApplication Examples and other Siemens publications e.g. Catalogs thecontents of the other documents have priority.

    We do not accept any liability for the information contained in this document.

    Any claims against us based on whatever legal reason resulting from the use ofthe examples, information, programs, engineering and performance data etc.,described in this Application Example shall be excluded. Such an exclusion shallnot apply in the case of mandatory liability, e.g. under the German Product LiabilityAct (Produkthaftungsgesetz), in case of intent, gross negligence, or injury of life,body or health, guarantee for the quality of a product, fraudulent concealment of adeficiency or breach of a condition which goes to the root of the contract(wesentliche Vertragspflichten). The damages for a breach of a substantialcontractual obligation are, however, limited to the foreseeable damage, typical forthe type of contract, except in the event of intent or gross negligence or injury to

    life, body or health. The above provisions do not imply a change of the burden ofproof to your detriment.

    Any form of duplication or distribution of these Application Examples or excerptshereof is prohibited without the expressed consent of Siemens Industry Sector.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    5/40

    Table of Contents

    WinCC Runtime Professional - Time SynchronizationV1.0, Entry ID: 67518641 5

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Table of ContentsWarranty and Liability ................................................................................................. 4

    1 Task ..................................................................................................................... 6

    2 Solution............................................................................................................... 8

    2.1 Overview of the overall solution ........................................................... 82.2 Description of the core functionality ................................................... 102.3 Hardware and software components used ......................................... 11

    3 Basics ............................................................................................................... 12

    4 Function Mechanisms of this Application .................................................... 13

    4.1 Setting the time of day........................................................................ 134.2 Time-of-day synchronization .............................................................. 13

    5 Setting the Time of Day ................................................................................... 14

    5.1 From WinCC Runtime Professional to S7-300/S7-400 ...................... 14

    5.2 From WinCC Runtime Professional to S7-1200/S7-1500 .................. 19

    6 Synchronizing the Time of Day ...................................................................... 24

    6.1 Settings on the PC ............................................................................. 246.1.1 Customizing Windows Time ............................................................... 246.1.2 Settings for the firewall ....................................................................... 276.1.3 Configuring the NTP server ................................................................ 316.2 Settings for S7-300/S7-400 ................................................................ 366.3 Settings for S7-1200/S7-1500 ............................................................ 38

    7 References ....................................................................................................... 40

    7.1 Bibliography ........................................................................................ 407.2 Internet links ....................................................................................... 40

    8 History............................................................................................................... 40

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    6/40

    1 Task

    6WinCC Runtime Professional - Time Synchronization

    V1.0, Entry ID: 67518641

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    1 Task

    Introduction

    In industrial plants, time-of-day synchronization is of great importance.

    For example,

    data recording and data storage

    alarms

    shift logs

    energy data management

    ... only make sense with a reliable, identical date and time stamp of all componentsinvolved.

    Overview of the automation task

    The figure below provides an overview of the automation task:

    Figure 1

    Description of the automation task

    The time of day of a higher-level industrial PC has to be transmitted to allconnected nodes, e.g. programmable controller, and synchronized at regularintervals.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    7/40

    1 Task

    WinCC Runtime Professional - Time SynchronizationV1.0, Entry ID: 67518641 7

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Depending on the hardware used, the time of day is to be synchronized via bothinterface tags andNTP.

    Automation task requirements

    Table 1

    Requirement Explanation

    Set time of day Using interface tags and system functions if the hardwareconfiguration does not support time-of-daysynchronization.

    Synchronize time of day Via NTP if this protocol is supported by the hardwareconfiguration.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    8/40

    2 Solution

    2.1 Overview of the overall solution

    8WinCC Runtime Professional - Time Synchronization

    V1.0, Entry ID: 67518641

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    2 Solution

    2.1 Overview of the overall solution

    The diagrammatic representation below shows the most important components ofthe solution:

    Figure 2

    Configuration

    All nodes are connected to one another via a network.

    WinCC Runtime Professional or the industrial PC (PC-System_1) on whichthe visualization runs acts as the time-of-day master.

    The controllers shown in the figure (PLC_1 and PLC_2) are the time-of-dayslaves.

    Both S7-300/S7-400 and S7-1200/S7-1500 are supported.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    9/40

    2 Solution

    2.1 Overview of the overall solution

    WinCC Runtime Professional - Time SynchronizationV1.0, Entry ID: 67518641 9

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Advantages

    This application offers you the following advantages:

    Identical time-of-day information plant-wide

    Comparability of recorded data and measured values

    Meaningful shift and alarm logs

    Setting the time of day independently of devices, modules and bus topologies

    Time-of-day synchronization for Industrial Ethernet and appropriate hardware

    Can be (simultaneously) used for both S7-300/S7-400 and S7-1200/S7-1500

    Scope

    This application does not include a description of

    the installation of the SIMATIC TIA Portal software

    the installation and configuration of the hardware used.Basic knowledge of these topics is required.

    Required knowledge

    Basic knowledge of the WinCC Professional V11 and STEP 7 Professional V11software products is required.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    10/40

    2 Solution

    2.2 Description of the core functionality

    10WinCC Runtime Professional - Time Synchronization

    V1.0, Entry ID: 67518641

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    2.2 Description of the core functionality

    This application example offers you two basic functions:

    Setting the time of day

    Synchronizing the time of day

    NOTICE Both functions can be used alternatively or in combination with oneanother. However, only one of the two methods may be used per time-of-day slave.

    Note If all components involved support NTP, it is preferable to use only time-of-daysynchronization.

    Setting the time of day via interface tags

    Setting the time of day is the conventional way of reducing time differencesbetween operator station and controller to a minimum. However, when setting thetime of day, transmission delay times and the processing time of scripts andfunctions cause a delay that results in the times in the HMI and PLC deviating fromone another.

    The advantage of setting the time of day is its universal applicability, e.g. fordevices, modules and bus topologies that do not support NTP.

    Note The supplied sample files are used for setting the time of day.

    Time-of-day synchronization via NTP

    NTP (Network Time Protocol) is a standardized protocol for synchronizing clocks incomputer systems and uses the connectionless UDP transport protocol.

    In NTP mode, the controller sends timing requests (in client mode) to the NTPserver at regular intervals.

    From the request, the NTP server determines the transmission delay time andconsiders it for the synchronization with the controller.

    The advantage of time-of-day synchronization is its accuracy, which also considersdelays during transmission.

    Furthermore, implementation is less complicated than for setting the time of day asno further scripts and functions are necessary.

    Note The supplied sample files are not required for time-of-day synchronization.

    However, all devices involved must support NTP.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    11/40

    2 Solution

    2.3 Hardware and software components used

    WinCC Runtime Professional - Time SynchronizationV1.0, Entry ID: 67518641 11

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    2.3 Hardware and software components used

    The application was created with the following components:

    Hardware components

    Table 2-1

    Component Qty. Order no. Note

    CPU 1214C 1 6ES7214-1HE30-0XB0 Alternatively, anyother controller of theS7-1200/S7-1500series can also beused.

    CPU 317F-2PN/DP 1 6ES7317-2FK13-0AB0 Alternatively, anyother controller of theS7-300/S7-400 series

    can also be used.SIMATIC IPC847C 1 6AG4114-1....-.... Alternatively, any

    other industrial PCcan also be used.

    Standard software components

    Table 2-2

    Component Qty. Order number

    Note

    STEP 7 ProfessionalV11 SP2 Update 5

    1 6ES7822-1A.01-..

    WinCC ProfessionalV11 SP2 Update 5

    1 6AV2105-.1-0

    Sample files

    The following list contains all files that are used in this example.

    Table 2-3

    Component Note

    SetDateTime_AWL.txt STL code for setting the time of day in the S7-300/S7-400

    SetDateTime_SCL.txt SCL code for setting the time of day in the S7-1200/S7-1500

    WriteDateTime_VBS.txt VBS code for writing the time of day in WinCC RuntimeProfessional

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    12/40

    3 Basics

    12WinCC Runtime Professional - Time Synchronization

    V1.0, Entry ID: 67518641

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    3 Basics

    Time functions in STEP 7

    To extract and edit the values for year, month, day and time from theDATE_AND_TIME data type, you need different instructions or functions inSTEP 7 V11 and in STEP 7 V5.5.

    In STEP 7 V11, you will find these instructions in the Extended Instructionspalette and in the Date and time-of-day folder.

    For STEP 7 V5.5, you need the IEC standard functions included in the STEP 7Standard Library.

    Use

    Table 3

    STEP 7 (TIA Portal) V11 STEP 7 V5.5 Description

    S7-300/S7-400 S7-1200 S7-300/S7-400

    WR_SYS_T WR_SYS_T SFC 0 SET_CLK Set time of day

    RD_SYS_T RD_SYS_T SFC 1 READ_CLK Read time of day

    T_CONV T_CONV FC 6 DT_DATE Convert / extract times

    FC 7 DT_DAY Convert / extract times

    FC 8 DT_TOD Convert / extract times

    T_COMBINE T_COMBINE FC3 D_TOD_DT Combine times

    T_COMP - FC 9 EQ_DT Compare time tags

    T_ADD T_ADD FC 1 AD_DT_TM Add times

    T_SUB T_SUB FC 34 SB_DT_DT Subtract times

    FC35 SB_DT_TM Subtract times

    T_DIFF T_DIFF - Time difference

    DATE_AND_TIME data type (S7-300/S7-400)

    The DT data type is used for the S7-300/S7-400.

    The data for date and time of day is stored in BCD format.

    The DT data type has a length of 8 bytes.

    The structure elements of this data type can only be accessed via absoluteaddresses.

    DTL data type (S7-1200/S7-1500)

    The DTL data type is used for the S7-1200/S7-1500.

    The data for date and time of day is stored in INT format.

    The DTL data type has a length of 12 bytes.

    The structure elements of this data type can be accessed symbolically.

    Note This application uses the time functions of STEP 7 only for setting the time ofday.

    The time functions of STEP 7 are not required for time-of-day synchronization.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    13/40

    4 Function Mechanisms of this Application

    4.1 Setting the time of day

    WinCC Runtime Professional - Time SynchronizationV1.0, Entry ID: 67518641 13

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    4 Function Mechanisms of this Application

    4.1 Setting the time of day

    Figure 4

    1. The WriteDateTime_VBS script is called cyclically every minute by thescheduler.

    2. Via interface tags, the script writes the date, time of day and trigger to theinstance data block of the FB.

    3. The FB with the SetDateTime_... code (depending on the controller) is calledcyclically by the OB.

    4. If the trigger is set, the WR_SYS_T system function will be called with thedate and time of day data of the instance data block and the time of day will beset.

    5. After calling the system function, the trigger will be reset by the FB.

    4.2 Time-of-day synchronization

    The supplied files are not used for time-of-day synchronization. Instead,NTPisused here, which has to be parameterized only once for all devices involved.

    The services used for this purpose run in the background and must be provided bythe devices involved.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    14/40

    5 Setting the Time of Day

    5.1 From WinCC Runtime Professional to S7-300/S7-400

    14WinCC Runtime Professional - Time Synchronization

    V1.0, Entry ID: 67518641

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    5 Setting the Time of Day

    5.1 From WinCC Runtime Professional to S7-300/S7-400

    Table 5-1

    Step Action

    1. Create a new FB1 with the name SetDateTime and the STL language.

    In the static part of the declaration section, define three tags:

    DateTime (Date_And_Time)

    RET_VAL (Int)

    Trigger (Bool)

    Make sure that the Visible in HMI option is checked for all tags.

    Insert the STL code of the SetDateTime_AWL.txt text file into FB1.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    15/40

    5 Setting the Time of Day

    5.1 From WinCC Runtime Professional to S7-300/S7-400

    WinCC Runtime Professional - Time SynchronizationV1.0, Entry ID: 67518641 15

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Step Action

    2. Call FB1 SetDateTime in OB1 Main.

    As the instance data block, select DB1 and assign SetDateTime_DB as the name.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    16/40

    5 Setting the Time of Day

    5.1 From WinCC Runtime Professional to S7-300/S7-400

    16WinCC Runtime Professional - Time Synchronization

    V1.0, Entry ID: 67518641

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Step Action

    3. Create the tags in the WinCC Runtime Professional tag management as shown in thefigure.

    Make sure that the Trigger tag has the Bool data type. When assigning the addresses, make sure that the absolute addresses are addressed

    correctly.

    Note

    If an HMI connection between the PC station and the controller has not yet been establishedin your project, you can also copy the Trigger tag from the DB1 instance data block to theWinCC Runtime Professional tag management.

    This automatically creates the HMI connection.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    17/40

    5 Setting the Time of Day

    5.1 From WinCC Runtime Professional to S7-300/S7-400

    WinCC Runtime Professional - Time SynchronizationV1.0, Entry ID: 67518641 17

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Step Action

    4. Change the coding of the tags with the Byte data type to BCD.

    NoteWhen the coding is changed, the HMI data type will be automatically set to USInt.

    5. Create a new VB script named WriteDateTime.

    Copy the VBS code of the WriteDateTime_VBS.txt text file to the script.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    18/40

    5 Setting the Time of Day

    5.1 From WinCC Runtime Professional to S7-300/S7-400

    18WinCC Runtime Professional - Time Synchronization

    V1.0, Entry ID: 67518641

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Step Action

    6. Open the scheduler.

    Create a new task and assign it a unique name (in the example: Task_1).

    Set the trigger to 1 Minute. In Events, integrate the WriteDateTime script.

    7. In the Project tree, select the Online & Diagnostics area of your CPU.

    In Online access, select the appropriate parameters of your connection.

    Select Go online to connect to your CPU.

    Select Functions > Set time of day to check the module time of your CPU.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    19/40

    5 Setting the Time of Day

    5.2 From WinCC Runtime Professional to S7-1200/S7-1500

    WinCC Runtime Professional - Time SynchronizationV1.0, Entry ID: 67518641 19

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    5.2 From WinCC Runtime Professional to S7-1200/S7-1500

    Table 5-2

    Step Action1. Create a new FB1 with the name SetDateTime and the SCL language.

    In the static part of the declaration section, define three tags:

    DateTime (DTL)

    RET_VAL (Int)

    Trigger (Bool)

    Make sure that the Visible in HMI option is checked for all tags.

    Insert the SCL code of the SetDateTime_SCL.txt text file into FB1.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    20/40

    5 Setting the Time of Day

    5.2 From WinCC Runtime Professional to S7-1200/S7-1500

    20WinCC Runtime Professional - Time Synchronization

    V1.0, Entry ID: 67518641

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Step Action

    2. Call FB1 SetDateTime in OB1 Main.

    As the instance data block, select DB1 and assign SetDateTime_DB as the name.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    21/40

    5 Setting the Time of Day

    5.2 From WinCC Runtime Professional to S7-1200/S7-1500

    WinCC Runtime Professional - Time SynchronizationV1.0, Entry ID: 67518641 21

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Step Action

    3. Copy the tags of the DB1 instance data block to the clipboard.

    NoteWhen copying, press Ctrl to select multiple tags at a time.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    22/40

    5 Setting the Time of Day

    5.2 From WinCC Runtime Professional to S7-1200/S7-1500

    22WinCC Runtime Professional - Time Synchronization

    V1.0, Entry ID: 67518641

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Step Action

    4. Paste the copied tags into the WinCC Runtime Professional tag management.

    NoteIt is recommended to create a new tag table (in the example: DateTime) for the tags.

    If an HMI connection between the PC station and the controller has not yet been establishedin your project, it will be automatically created when copying.

    5. Create a new VB script named WriteDateTime.

    Copy the VBS code of the WriteDateTime_VBS.txt text file to the script.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    23/40

    5 Setting the Time of Day

    5.2 From WinCC Runtime Professional to S7-1200/S7-1500

    WinCC Runtime Professional - Time SynchronizationV1.0, Entry ID: 67518641 23

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Step Action

    6. Open the scheduler.

    Create a new task and assign it a unique name (in the example: Task_1).

    Set the trigger to 1 Minute. In Events, integrate the WriteDateTime script.

    7. In the Project tree, select the Online & Diagnostics area of your CPU.

    In Online access, select the appropriate parameters of your connection.

    Select Go online to connect to your CPU.

    Select Functions > Set time of day to check the module time of your CPU.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    24/40

    6 Synchronizing the Time of Day

    6.1 Settings on the PC

    24WinCC Runtime Professional - Time Synchronization

    V1.0, Entry ID: 67518641

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    6 Synchronizing the Time of Day

    6.1 Settings on the PC

    6.1.1 20BCustomizing Windows Time

    Generally, Windows Time for synchronizing the time of day is not preconfigured forindividual networks, it starts only when joining a domain.

    If your network does not have a domain controller, the W32time service must becustomized as described in this chapter.

    Table 6-1

    Step Action

    1. Select Start > All Programs > Accessories > Command Prompt and right-click to openthe context menu of the console.

    Select the Run as administrator option.

    2. In the command prompt, enter the following command line:

    sc triggerinfo w32time start/networkon stop/networkoff

    Note

    The sc qtriggerinfo w32timecommand line allows you to query the current triggers ofWindows Time.

    3. Use the exitcommand to close the command prompt.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    25/40

    6 Synchronizing the Time of Day

    6.1 Settings on the PC

    WinCC Runtime Professional - Time SynchronizationV1.0, Entry ID: 67518641 25

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Step Action

    4. Use the Windows + R shortcut to open the window for running programs.

    In the drop-down list, enterservices.mscto open the management console for the

    services. Select OK to confirm your input.

    5. Right-click to open the Properties window of the Windows Time service.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    26/40

    6 Synchronizing the Time of Day

    6.1 Settings on the PC

    26WinCC Runtime Professional - Time Synchronization

    V1.0, Entry ID: 67518641

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Step Action

    6. Set Startup type to Automatic.

    Select the OK button to confirm the change.

    7. Restart the computer.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    27/40

    6 Synchronizing the Time of Day

    6.1 Settings on the PC

    WinCC Runtime Professional - Time SynchronizationV1.0, Entry ID: 67518641 27

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    6.1.2 21BSettings for the firewall

    In order to receive time synchronization requests of network nodes on the PC of

    the time-of-day master, appropriate settings have to be made in the firewall.

    Table 6-2

    Step Action

    1. Select Start > Control Panel > Windows Firewall to open the firewall of the PC.

    2. In the navigation pane, select Advanced Settings.

    3. In the navigation pane of Advanced Settings, select Inbound Rules and in Actions, selectNew Rule.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    28/40

    6 Synchronizing the Time of Day

    6.1 Settings on the PC

    28WinCC Runtime Professional - Time Synchronization

    V1.0, Entry ID: 67518641

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Step Action

    4. As the rule type, select Port.

    5. In Does this rule apply to TCP or UDP?, select UDP.

    As the port number, enter 123.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    29/40

    6 Synchronizing the Time of Day

    6.1 Settings on the PC

    WinCC Runtime Professional - Time SynchronizationV1.0, Entry ID: 67518641 29

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Step Action

    6. As the action, select Allow the connection.

    7. According to the policies in your network, select when the rule applies.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    30/40

    6 Synchronizing the Time of Day

    6.1 Settings on the PC

    30WinCC Runtime Professional - Time Synchronization

    V1.0, Entry ID: 67518641

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Step Action

    8. Assign a meaningful name to the rule.

    Select Finish to close the dialog box.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    31/40

    6 Synchronizing the Time of Day

    6.1 Settings on the PC

    WinCC Runtime Professional - Time SynchronizationV1.0, Entry ID: 67518641 31

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    6.1.3 22BConfiguring the NTP server

    In NTP mode, the network components cyclically and actively retrieve the time from

    an NTP server in this case from the PC on which WinCC Professional RT runs.Most S7 CPUs can be synchronized using NTP mode. This requires a connectionvia Industrial Ethernet.

    Note This FAQ lists all S7-300/S7-400 modules that support NTP mode:

    http://support.automation.siemens.com/WW/view/en/28383201

    All S7-1200/S7-1500 modules support NTP mode.

    Table 6-3

    Step Action

    1. Log in with a user with administrative rights.

    2. Use the Windows + R shortcut to open the window for running programs.

    In the drop-down list, entergpedit.mscto open the Local Group Policy Editor.

    Select OK to confirm your input.

    http://support.automation.siemens.com/WW/view/en/28383201http://support.automation.siemens.com/WW/view/en/28383201http://support.automation.siemens.com/WW/view/en/28383201
  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    32/40

    6 Synchronizing the Time of Day

    6.1 Settings on the PC

    32WinCC Runtime Professional - Time Synchronization

    V1.0, Entry ID: 67518641

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Step Action

    3. In the tree view, select Local Computer Policy > Computer Configuration >Administrative Templates > System > Windows Time Service.

    In the details window, double-click on the Global Configuration Settings object.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    33/40

    6 Synchronizing the Time of Day

    6.1 Settings on the PC

    WinCC Runtime Professional - Time SynchronizationV1.0, Entry ID: 67518641 33

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Step Action

    4. Check the Enabled option.

    Make the settings as shown in the screen shot.

    Select OK to confirm your entries.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    34/40

    6 Synchronizing the Time of Day

    6.1 Settings on the PC

    34WinCC Runtime Professional - Time Synchronization

    V1.0, Entry ID: 67518641

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Step Action

    5. In the tree view, select Local Computer Policy > Computer Configuration >Administrative Templates > System > Windows Time Service.

    In the details window, double-click on the Time Providers object.

    6. In the details window, double-click on the Enable Windows NTP Server object.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    35/40

    6 Synchronizing the Time of Day

    6.1 Settings on the PC

    WinCC Runtime Professional - Time SynchronizationV1.0, Entry ID: 67518641 35

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Step Action

    7. Check the Enabled option.

    Select OK to confirm your entries.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    36/40

    6 Synchronizing the Time of Day

    6.2 Settings for S7-300/S7-400

    36WinCC Runtime Professional - Time Synchronization

    V1.0, Entry ID: 67518641

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    6.2 Settings for S7-300/S7-400

    Table 6-4

    Step Action

    1. Open the CPU device configuration.

    In the graphical representation of the CPU, select the Ethernet port (marked in green inthe figure).

    2. In Properties > General > Time-of-day synchronization, select the Enable time-of-daysynchronization in NTP mode option.

    Enter the IP address of the NTP server.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    37/40

    6 Synchronizing the Time of Day

    6.2 Settings for S7-300/S7-400

    WinCC Runtime Professional - Time SynchronizationV1.0, Entry ID: 67518641 37

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Step Action

    3. In the Project tree, select the Online & Diagnostics area of your CPU.

    In Online access, select the appropriate parameters of your connection.

    Select Go online to connect to your CPU. Select Functions > Set time of day to check the module time of your CPU.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    38/40

    6 Synchronizing the Time of Day

    6.3 Settings for S7-1200/S7-1500

    38WinCC Runtime Professional - Time Synchronization

    V1.0, Entry ID: 67518641

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    6.3 Settings for S7-1200/S7-1500

    Table 6-5

    Step Action

    1. Open the CPU device configuration.

    In the graphical representation of the CPU, select the Ethernet port (marked in green inthe figure).

    2. In Properties > General > Time-of-day synchronization, select the Enable time-of-daysynchronization in NTP mode option.

    Enter the IP address of the NTP server.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    39/40

    6 Synchronizing the Time of Day

    6.3 Settings for S7-1200/S7-1500

    WinCC Runtime Professional - Time SynchronizationV1.0, Entry ID: 67518641 39

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    Step Action

    3. In the Project tree, select the Online & Diagnostics area of your CPU.

    In Online access, select the appropriate parameters of your connection.

    Select Go online to connect to your CPU. Select Functions > Set time of day to check the module time of your CPU.

  • 7/30/2019 67518641 WinCC Pro TimeSynch En

    40/40

    7 References

    CopyrightS

    iemens

    AGC

    opyright-2013Allrightsreserved

    7 References

    7.1 18BBibliography

    This list is by no means complete and only presents a selection of relatedreferences.

    Table 7-1

    Topic Title

    /1/ STEP7

    SIMATIC S7-300

    Automating with SIMATIC S7-300 inside TIA Portal

    Author: Hans Berger

    Publicis Corporate Publishing

    ISBN: 978-3-89578-382-1

    /2/ STEP7

    SIMATIC S7-1200

    Automating with SIMATIC S7-1200

    Author: Hans Berger

    Publicis Corporate PublishingISBN: 978-3-89578-356-2

    7.2 19BInternet links

    This list is by no means complete and only provides a selection of usefulinformation.

    Table 7-2

    Topic Title

    \1\ Reference to the

    entry

    http://support.automation.siemens.com/WW/view/en/67518641

    \2\ Siemens IndustryOnline Support

    http://support.automation.siemens.com

    \3\ Local time/systemtime in WinCCRuntimeProfessional

    http://support.automation.siemens.com/WW/view/en/59558655

    \4\ CPUs that supportNTP

    http://support.automation.siemens.com/WW/view/en/28383201

    8 History

    Table 8

    Version Date Modifications

    V1.0 02/2013 First version

    http://support.automation.siemens.com/WW/view/en/67518641http://support.automation.siemens.com/WW/view/en/67518641http://support.automation.siemens.com/http://support.automation.siemens.com/http://support.automation.siemens.com/WW/view/en/59558655http://support.automation.siemens.com/WW/view/en/59558655http://support.automation.siemens.com/WW/view/en/28383201http://support.automation.siemens.com/WW/view/en/28383201http://support.automation.siemens.com/WW/view/en/28383201http://support.automation.siemens.com/WW/view/en/59558655http://support.automation.siemens.com/http://support.automation.siemens.com/WW/view/en/67518641

Recommended