There are two options for synchronizing the date/time between an S7-300/400 and a line/graphics operator panel.
- Transfer date/time from the CPU to the OP (FC1 in the STEP 7 project)
- Transfer date/time from the OP to the CPU (FC2 in the STEP 7 project)
The two types of synchronizing date/time between an OP and the CPU are implemented in a STEP 7 project available for downloading at the end of this entry.
Time synchronization between an OP and an S7-300/400 controller is done by controller jobs in the CPU. The following controller jobs are available for time synchronization between a CPU and a line/graphics device.
Transfer date/time from the CPU to the OP (FC1 in the STEP 7 project)
- Controller job 14: Set time
The CPU time is read out with the "READ_CLK" function (SFC1) in the S7 program and used as a parameter for Job 14.
Once all the parameters of controller job 14 have been set, the job number can be written to the data area provided for it in the controller. The controller job is executed, i.e. the CPU time is set on the OP.
- Controller job 15: Set date
The CPU date is read out with the "READ_CLK" function (SFC1) in the S7 program and used as a parameter for Job 15.
Once all the parameters of controller job 15 have been set, the job number can be written to the data area provided for it in the controller. The controller job is executed, i.e. the CPU date is set on the OP.
Transfer date/time from the OP to the CPU (FC2 in the STEP 7 project)
- Controller job 41: Transfer date/time to controller
Controller job 41 transfers the date/time from the OP to the CPU. Controller job 41 doesn't need any parameters. Once the job has been executed the OP date and OP time are stored in the interface area ("Date and Time"). The "SET_CLK" function (SFC0) can be used to synchronize the CPU's date/time with the OP's date/time.
You need the interface area for communication (execution of controller jobs) between the S7 and a line/graphics device. You insert this in the ProTool project under area pointer. The interface area has the following structure.
Fig. 1 - Area pointer interface area
From the interface area you need the Job mailbox (from byte n+4), the Date (from byte n+21) and the Time (from byte n+15). The controller jobs are parameterized and executed via the job mailbox. The OP date and OP time are stored in the date and time areas after execution of controller job 41.
More information on the interface area and the controller jobs is available in the communication manual in Entry ID: 1137086.
The attached download contains a STEP 7 project with the functions described above.
ProTool_Clk_OP.zip ( 100 KB )
Time synchronization, TD17, OP5, OP7, OP15A, OP15C, OP17, OP25, OP27, OP35, OP37, TP27, TP37, Line-oriented Operator Panels, Graphics-oriented Operator Panels, Line device, Graphics device