Entry type: FAQ, Entry ID: 14782704, Entry date: 04/06/2009
(0)
Rate

How do you synchronize the date and time between an OP3 and an S7-200 CPU?

  • Entry
  • Associated product(s)

Instructions:
There are two possibilities for synchronizing date/time between a S7-200 and the OP3:

The communication between the S7-200 and the OP3 is implemented within the interface area that has been entered in the ProTool project.


Fig. 1: Interface area

For time synchronization purposes, the areas control and response bits date and time are relevant.

Transfer date/time from the S7-200 to the OP3 

In the control and response bits area, bit 2 signalized the date/time request of the OP.


Fig. 2: Control/return information bits

The synchronization of the OP 3 with the SIMATIC S7 is carrie out in four steps:

  1. Every 15 minutes the OP 3 sets the bit 2 in the data byte n+0 on 1.
  2. If bit 2 is set, the CPU time has to be read with the function "READ_RTC" from the S7-200 and be copied into the date and time area of the interface area.
  3. As soon as the S7 program resets bit 2, the OP 3 recognizes that the S7 program has stored the current values for time and date in the interface area.
  4. The OP 3 reads out the recent data from data bytes n+15 to n+17 and n+21 to n+24 of the interface area.


Fig. 3: Time/date folder

Transfer date/time from the OP3 to the S7-200
If bit 6 of bytes n+0 of the control and response bit has been set, a new time was set on the OP. If bit 5 of Byte n+0 of the control and response bit is set, the date on the OP was changed. The new values for date and time are stored in the interface area of the date/time folder. For the S7-200, the values have to be copied back into the appropriate variable area and the setting for the CPU time have to be made with the funciton "SET_RTC". Bits 5 and 6 must be reset after setting the CPU clock.

Note:

  • Further information can be found in the manual of the OP3 under entry ID 1142799.

The STEP 7 Micro/WIN library as archive file:
Copy the "timeop3.zip" file into a separate directory and unpack the file. You can then integrate the library, which can be used in version V3.2.2.11 and higher of STEP 7 Micro/WIN, into your S7-200 project.

 Time_OP3.zip ( 2 KB )

Note:
Information on how to insert libraries in STEP 7 Micro/WIN is available in Entry ID 16689345.

Error details
Detailed error description
Help us to improve Online Support.
The page requested cannot be displayed. Please contact the webmaster.
Contact to webmaster