Today is...
Friday, May 25, 2018
Welcome to, the global online
community of automation professionals.
Featured Video...
Featured Video
A tutorial introduction to programming using the QuickBuilder Programming Environment.
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive
Time to PLC via Kepware OPC
Synchronize time and date between WinCC 6.2 and s7200 PLC via Ethernet +kepware OPC


Hope someone could helpme, I need to syncronise the time in my S7-200 PLC from WinCC or directly from Kepware EX (if possible ). So I would like to set up a tag in WinCC on OPC channel and this tag is read by PLC via this tag. Is there some script in WinCC that could be used to write the pC time and date to this tag?

By Fred Loveless on 6 September, 2011 - 10:38 am

Well, there is no Date format supported on the Kepware Siemens drivers. You can write the data and time as a string and parse it in the controller or you could create a data block that of 6 integers for the Day, Month, Year, Hour, Minute, and Second. WinCC will need to write this to these block elements. At this point you have 2 options. You can use the Siemens TCPIP driver, which is a master to write the values down to the PLC, or you can use the Siemens TCPIP Slave driver and write to local cache and allow the PLC to poll the server and get the data block in a single request. Once the PLC has the data it can update its Internal Data and Time register.