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?
Synchronization between a line or graphics device and an S7-200 controller is done using control jobs in the CPU. The following control jobs are available for synchronizing an S7-200 CPU and a line or graphics device:
- Control job 14: Set time
In an S7-200 the CPU time is read with the "READ_RTC" function and used as a parameter for job 14.
When all the parameters of control job 14 are assigned, the job number can be written to the data area provided. The control job is executed, i.e. the CPU time is set on the panel.
- Control job 15: Set date
In an S7-200 the CPU date is read with the "READ_RTC" function and used as a parameter for job 15.
When all the parameters of control job 15 are assigned, the job number can be written to the data area provided. The control job is executed, i.e. the CPU date is set on the panel.
- Control job 41: Transfer date / time to the controller
Control job 41 transfers the time and date from the panel to the CPU. Control job 41 does not require any parameters. Once the job has been executed the OP date and OP time are stored in the interface area ("Date and Time"). Using the S7-200 function "SET_RTC" you can synchronize the date/time of the CPU with the date/time of the OP.
For communication (execution of control jobs) between the S7 and line or graphics device you need the interface area. You must insert this in the ProTool project under Area Pointer. The interface area has the following structure.
Fig. 1: Interface area
The job mailbox, date and time are used from the interface area. The control jobs are parameterized and executed via the job mailbox. After control job 41 has been executed the OP date and OP time are stored in the date/time area.
The structure of each area is explained in the Communications Manual for Line and Graphics Devices Entry ID: 1137086.
The STEP 7 Micro/WIN library as an archive file:
Copy the file "OP7_S7200.zip" to a separate directory and extract the file. You can then integrate the library, which can be used in version 4.0 and higher of STEP 7 Micro/WIN, into your S7-200 project. You can open and use the OP7 project in ProTool V6.0 SP2 and higher.
Information on inserting libraries in STEP 7 Micro/WIN is available in Entry ID 16689345.
OP7_S7200.zip ( 19 KB )