4/7/2017 10:50 AM | |
Posts: 7 Rating:
|
Good morning, a customer asked me to make based management synchronizing the date and time of a PLC using the date/time of the PC. To do this, I managed a PC as NTP server and have configured CPU319F-2PN in order to receive information from the computer. And so far everything is OK !! The problem arises in the summer/winter time change, because the PLC receives the UTC time of my time zone and not the exact time displayed on Windows. To correct this problem, I used the management through the FC61 function. As a result I get the exact current time. And so far everything is OK !! The problem now lies in the fact that the correct date/time, I can see it only within the project output of FC61 function and I can not download it to the CPU via SFC0 (SET_CLK). Or rather, in an attempt to override the date/time I have several problems. Ex .: - if I enable SFC0 continuously, the PLC will visualize an increase of the date and time infinity; - if I enable SFC0 by a clock, the PLC will visualize the correct date and time until refresh by the NTP protocol that will take me back to the PLC date/time in the UTC time zone of the PC (with -1 hour in my case). Unfortunately I am not able to query the NTP update interval pulse, I wanted to use as an impulse to enable SFC0, although not think it works as a solution. In summary: - reception of the date / time from PC to PLC via NTP is OK - the development of the date / time via FC61 is OK - writing the result FC61 in PLC through SFC0 NOT OK Can you, kindly, help me with the writing of the date/time in the PLC ?? Or, do you know a solution to correctly synchronize, via Ethernet, the time and date between a PC (master) and a CPU (slave) or CP ?? Thank you in advance !! P.S. Should I help in attachment I sent you a little test project (nell'FC100 there is the date / time processing). I use SIMATIC Step7 v5.5 + SP3 AttachmentData_and_Time_Sync.zip (283 Downloads) |
4/10/2017 12:05 PM | |
Joined: 8/3/2009 Last visit: 8/15/2024 Posts: 13561 Rating:
|
Hello Fury13 -> I´m Sorry I am not a PLC Expert. My Topics are HMI, IPCs and Communication. But perhaps this FAQ helps: https://support.industry.siemens.com/cs/ww/en/view/17990844 Bye Murof |
If this Information really helps, you could use the Rate function |
|
This contribution was helpful to
1 thankful Users |
4/10/2017 2:15 PM | |
Joined: 9/27/2006 Last visit: 8/28/2024 Posts: 12280 Rating:
|
Hello Fury; How are you connected between the PLC and the PG/PC? The cscreen you show works if you are connected through MPI (PC Adapter, for example). If you are using Ethernet, you could use S7 communication or UDP blocks to synchronize the time. Look at the following information FAQ: How can you set the time of an S7-300 CPU via Industrial Ethernet and via MPI? Daniel Chartier |
Follow us on