Help - Search - Members - Calendar
Full Version: atomic time sync with plc
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
ace
Hi

We a have power demand problem. Where the power company sends a reset pulse two times in the hour 12' and 6' twice a hour but off peak is 9pm is off peak so if we go online 8:59pm you know what happens,

Is ther a way to use the atomic time to sync the plc? We're using logix 5000

Thanks
ace

another company electrian
pandersen
I don't know of any module that would do it, but if you can insert data into the PLC using OPC or some other method, you can use the SSV instruction with the WALLCLOCKTIME class to set the PLC's date and time. Some other device would have to grab the date/time and separate it into 7 individual values: Year, Month, Day, Hour, Minute, Second, and Microsecond. Look it up in Logix 5k, its in the help file and explains it pretty well.
Bill Linne
QUOTE(ace @ Nov 17 2008, 11:00 AM) [snapback]75830[/snapback]
Hi

We a have power demand problem. Where the power company sends a reset pulse two times in the hour 12' and 6' twice a hour but off peak is 9pm is off peak so if we go online 8:59pm you know what happens,

Is ther a way to use the atomic time to sync the plc? We're using logix 5000

Thanks
ace

another company electrian


Do a Google search for Logix 5000 Clock Update Tool. Download and install the utility. Then configure it to sync whichever processors you care to sync. Works like a charm! It syncs the PLC's to the clock in the PC on which it is running. So, you sync that PC to an Internet source, and you're done.

Bill

TWControls
The EWEB can update to an internet time server...if it's really time critical it seems like someone makes a GPS module for the Controllogix for just that purpose
paulengr
QUOTE(TWControls @ Nov 17 2008, 07:41 PM) [snapback]75847[/snapback]

The EWEB can update to an internet time server...if it's really time critical it seems like someone makes a GPS module for the Controllogix for just that purpose


You mean this?
http://www.hiprom.com/Pages/Products/1756_.../1756HP-GPS.htm

Another method is IEEE 1588. This is the protocol that CLX uses with it's IO for time stamping data and among other CLX processors (if you use it). At least with Hirschmann Ethernet switches, you can turn this on as well as NTP, which allows the switch itself to directly synchronize to an NTP clock distribution source. Beyond that you have to make the CLX synchronize to the switch. I'm not clear on the details beyond this because I've never done it but as far as I know, you should be able to synchronize to UTC within +/-100 ms. If you figure it out, post it as it will be much more elegant than my solution.

I have all my PC's running NTP and they are all synchronized through the usually chain company-wide to AT&T which gets it's synchronization from NIST. I synchronize all the PLC's every 3 minutes merely by writing the time from a script running in the SCADA system. I'm only accurate to 0-2 seconds at best but it's good enough for what I use it for (zeroing out counters at midnight and such). Most of the PLC's are only PLC-5's which seem to be good only to about 1 second per day at best anyways so I'm providing a far more accurate time service than they have natively. I'm also not slewing or anything fancy like, and I'm updating "wallclocktime", not even considering the peculiarities of daylight savings time, so there is no gaurantee of any sort that monotonicity will exist.

The result is that most of my PLC code looks something like this:
IF hour=midnight THEN (one shot) reset a counter
(note: DON'T do this at 1AM-2AM when daylight savings occurs)
...or...
IF hour<>cached_hour and mins = 1 THEN cached_hour=hour, and (do something once and hour)
(avoid clock jitter at the "top" of an hour)
ace
Thanks

the 1756hp-gps looks like what we need also the software looks good, I felt like more people out there needed the same thing. thanks again for the input clapping.gif
paulengr
QUOTE(ace @ Nov 18 2008, 10:15 AM) [snapback]75879[/snapback]

Thanks

the 1756hp-gps looks like what we need also the software looks good, I felt like more people out there needed the same thing. thanks again for the input clapping.gif


Rockwell has sample code and tutorial information on their web site available for download that explains exactly how to synchronize multiple CLX PLC's with each other and/or another external source.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.