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?
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.