SLC 5/03 Clock Losing Time

Doug-P

I thought of something like that, but due to the timer accuracy between PLC's, and the scan time lost between timer cycles (one scan every /DN not being timed), I figured that would only be as accurate as the built in clock.
 
I don't think there was a .DN bit involved. I think I've reconstructed it reasonably accurately. It goes something like:

SOR TON T4:1 .01 110 EOR
SOR GRT T4:1.ACC 100 BST ADD N7:0 1 N7:0 NXB SUB T4:1.ACC 100 T4:1.ACC BND EOR

I tried to put up the rungs graphically but using the 'ladder' tag is too infuriating.

As I recall this logic has the effect of bringing the clock stability to that of the system crystal frequency.
 
I'm going to load that into my test bench 5/03 & see how accurate that is, thanks.

But, as noted earlier in changing a SLC project to a ML, the timers ran at different speeds.
 
Last edited:
Going back to my external input method, what about putting a very reliable repeat timer, say set at 2 seconds on, 2 seconds off, then when it comes on as a one-shot you would know precisely 4 seconds has elapsed - just test the timer to make sure it is as reliable as you need (like let it run for a couple of weeks & see how off it gets).
 
Differences between MicroLogix clocks and SLC-5/03 clocks or timers will probably reflect the differences in scantime and in real-time-clock design between the controllers. I don't know all of the internal details, but in general a MicroLogix scans faster (not to mention that it has a 0.001 timebase available) and has an RTC design with components that are 10 to 15 years newer.

Drift of 4 minutes per hour on an SLC-5/03 is very high and suggests an oscillator that is degraded or something else is wrong in the system.

Some of the "my controller time is drifting excessively" problems that I have seen are when a user inadvertently configures both a read and write connection to the system clock from their HMI. Every time these HMI devices read the system clock, they also write to the system clock, so you get a 1 second error introduced depending on exactly when over the course of a second the event occurred and how long the transaction takes. On some systems I was seeing 1 second error every 60 seconds because that was the update rate of the HMI's system clock sync feature.

I have worked on a system that requires very good time accuracy both for its various Windows servers and its S7-300 controllers, but it is isolated from the Internet and has no view of the sky. And no, it's not hiding from American bombers. Not since the spring of 1945, anyhow.

We installed a time reference device from EndRun technologies that uses CDMA cell phone signals to derive a highly accurate time signal. It distributes that to all the networked PCs and servers using NTP, and uses the discrete outputs to provide a sync signal to all the S7 controllers once an hour.

PC time drift is not a big issue now that virtually all PCs are connected to the Internet and can access a network time server. But put a bunch of ordinary Dell PCs on a totally isolated system and come back in a few months, and you'll find their clocks scattered around a window of fifteen or twenty minutes.
 
Last edited:
The discrete input method using an appliance timer is a fantastic cheap-and-dirty technique to perform synchronizing tweaks, as long as you're using grid power and don't need to auto-recover or share time with a PC.

The Wikipedia article Bernie noted is excellent, and an appliance timer almost certainly uses mains frequency as its reference.

It makes sense that PLC don't use the mains frequency method because they can run off a variety of power systems; 50 Hz, 60 Hz, DC, or generators, and because such a technique cannot preserve timekeeping through a power cycle.

Another Forum member reviewed his experience using a simple GPS reference clock recently, using a device I might adopt for my next isolated system. [Link]

If you want something a little more industrial than an appliance timer, good old Intermatic sells a neat looking device that mounts on a DIN rail and has its own internal clock: [Talento 882 Pro]
 
Last edited:
Drift of 4 minutes per hour on an SLC-5/03 is very high and suggests an oscillator that is degraded or something else is wrong in the system.

Some of the "my controller time is drifting excessively" problems that I have seen are when a user inadvertently configures both a read and write connection to the system clock from their HMI. Every time these HMI devices read the system clock, they also write to the system clock, so you get a 1 second error introduced depending on exactly when over the course of a second the event occurred and how long the transaction takes. On some systems I was seeing 1 second error every 60 seconds because that was the update rate of the HMI's system clock sync feature.

Ken,

If the time was a consistent loss I think that may be worth looking into, but as I was monitoring this SLC it could lose up to 4 minutes in an hour, then the next hour gain almost all of it back, then the next hour could go either way - not something that could be said was a drain on the system resources.

I bought a new appliance timer today & it ended up having 20 ON times, so I have it coming on every hour for 2 shifts & every other hour overnight.
 
I had a similar requirement for accurate clock time (customer wanted it for his alarm logs), using Compactlogix PLC.

I used a Rockwell HiProm GPS module (1769HP-GPS), to keep the PLC Clock synched.

There is module for the SLC PLCs (1746HP-GPS) http://www.hiprom.com/Pages/Products/1746_SLC/1746HP-GPS/web/1746HP-GPS.htm

- I know that the website says that they are discontinued, but contact HiProm directly, as there was a similar comment for 1769HP-GPS module, so local distributers were refusing to try and order it, but when I contacted HiProm directly, and they said that it was discontinued only because they had a large stock of them on the shelves, and they would make more once they sold them.

Armed with that response, we were able to get the distributor to order us one. Problem solved :)
 

Similar Topics

I was online a SLC5/04 yesterday and one thing I did was go to processor properties and set the date and time to get the PLC clock current. It...
Replies
4
Views
725
Hello I was needing to stop one device and start the second device at a certain time each day, for example 10:00 am each day. I thought the best...
Replies
13
Views
5,255
Hey everyone I'm adding some code to a program to keep track of the date and time when a system is enabled and disabled. I'm using the status...
Replies
1
Views
1,781
I have a question from a customer about a site, where he wants a new control panel, which he wants the PLC to link to their SCADA via Modbus...
Replies
9
Views
6,785
I've been looking for a listing of clock cycles each instruction uses for the SLC and micrologix instruction set. The purpose of this is to...
Replies
3
Views
2,311
Back
Top Bottom