S7-1200/TP700 Time sync

Tazikel

Member
Join Date
Jul 2007
Location
KS
Posts
29
Hello,
I need to sync the time on a TP700 Comfort Outdoor with a S7-1214C. I mostly work with AB and Eaton PLCs. This is my first project using Siemens. Aside from a learning curve and a few BIG headaches, I am liking the platform. I have most everything on this project done, but I am having a problem with time.

I have a screen on the HMI for the user to set the date/time. The user enters the values and presses a button that enables the WR_LOC_T instruction in the PLC. On the HMI I displayed the time with a Date/Time field assigned to the tag in the PLC. This works, but then I noticed the times in the alarm log were wrong.

I found a application example on the Siemens website (a chore in itself) but it's as clear as mud to me. I tried following a couple of the examples. I made another Date/Time Field set for System Time and Input/Output. In Connections I set the HMI Time Synchronization to both Master and Slave, but when I change the time on the HMI the PLC isn't updated. I made a button with SetPLCDateTime in the 'Click' Event but still nothing.

I'd appreciate any pointers as to what I may be doing wrong, or a better explanation of how to accomplish this. I have tried google but other than the application example I found, most results I've been getting didn't seem relevant or helpful

Thanks for any help!
 
You can either have the HMI get the time from the PLC or have the PLC get the time from the HMI. I usually have the HMI get the time from the PLC. So read up on the help on connections in the HMI to find out which time connection to use. Make a input field where you enter you time to set and a button to set it with. In the plc use the wr_sys_time to set thetime in the plc. Then use rd_sys_time to read the actual plc time. The output from the read time block is what you use in the connection editor in the HMI.

It's possible that this isn't 100% correct, I havent got the program in front of me
 
That is correct. I'm just not sure what I am missing. I don't quite follow the pointer methods.
 
It's the date/time PLC you should use if you wan't the HMI to read the PLC time.
You use the data type DTL here (I think).

So use RD_SYS_TIME in the PLC, on the output of that block is the system time that you read from the PLC, in DTL format. Use the result from the block in the areapointer of the HMI "date/time PLC".

Once again not 100% sure
 

Similar Topics

Long story short..... Customer : We want you to replace this hmi with a direct replacement. We don't have the original hmi program. Me: OK, I...
Replies
12
Views
1,289
Hey guys! Newbie here, have some experience in both S7 Classic and TIA V13, but would really like your opinions/help on a solution...
Replies
37
Views
25,203
Hello all. I'm working with a S7-1200 CPU, a TP700 comfort panel and 4 drives that are all connected through profinet. I've started my project...
Replies
2
Views
5,877
Hi all, Currently having trouble getting a speed reference to write over modbus to an Omron M1... I can successfully write a run command and...
Replies
6
Views
252
HI i would like to know how to get a variable that will store the amount of times a program has been executed. The issue is I have 3 DBs for 1 FB...
Replies
2
Views
82
Back
Top Bottom