Today is...
Wednesday, November 26, 2014
Welcome to Control.com, the global online
community of automation professionals.
Advertisement
Featured Video...
Featured Video
Wiring and programming your servos and I/O just got a lot easier...
Advertisement
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

Hi

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.