Allen Bradley Free running counter or clock - CST - and time synchronization

V0N_hydro

Member
Join Date
Sep 2010
Location
lower mainland
Posts
560
I want to keep wallclocktime roughly the same on 5 different controllers using factory talk alarms and events so the timestamps in the alarm log and alarm history are in the correct order.



The programs also need to know how long it has been since the last time the logic was executed for integral and derivative calculations which include delta t.


I am reading https://literature.rockwellautomation.com/idc/groups/literature/documents/at/ia-at003_-en-p.pdf and it sounds like the free running counter for PID loop changes in time could be the CST clock.


I am getting confused because the document also talks about keeping CST in sync within the backplane. Can anyone confirm that when there are multiple CPUs or modules in the same backplane or chassis that CST would actually slew within some of those modules to keep in sync with the chassis master, and that in my case where all of the controllers are in different chassis the CST in each chassis will never slew or step change to keep in sync with other CPUs but the wallclock time can be kept in sync by "enabling time synchronization"


Here are some relevant bits from the PDF about CST.



"Coordinated System Time (CST): A backplane clock propagated between all modules on the ControlLogix backplane.


Relevance to real world time is basically the difference between the Logix backplane time standard, which starts counting when power is applied to the CST Master in microseconds from January 1st, 1970, and time in the real world. The time relevant to the real-world time means building a correlation between the Logix backplane CST (which cannot be programmatically or externally influenced in anyway) and the real world clock (UTC).



CST enabled devices in a ControlLogix backplane synchronize their local clocks by using the CST protocol. Both CST and the PTP protocol are operational in a ControlLogix backplane. CST is used to synchronize the clocks to CST time and PTP is used to synchronize the clocks to System Time.System Time and CST time are related by System Time = CST time + offsetwhere offset is the Wall Clock Time (WCT) object CstOffset.On powerup, a CST Master, such as a 1756-L6x or 1756-L7x ControlLogix controller, or a 1756-ENxTx communication module, sends out a CST sync message that causes all CST Slave modules in the chassis to synchronize to the Master’s current CST. CST is zero at powerup and then continually increases. Every 4 ms CST update messages are sent out to slowly ramp the modules drift to keep it matched to the Master’s CST.




System Time: The absolute time value as defined by CIP Sync in the context of a distributed time system where all devices have a local clock that is synchronized with a common Master clock. System Time is a 64-bit integer value in units of nanoseconds or microseconds with a value of 0 corresponding to an epoch of January 1, 1970



Wall Clock Time (WCT): The controllers’ real-world time is represented as Wall Clock Time, which is the time the controller gets from the Grandmaster. For example, the controller WCT is used as the time source for the Alarm and Events instruction, better know as System Time.



Coordinated System Time (CST)CST is a backplane clock propagated between all modules on the ControlLogix backplane. Its presence is necessary whenever CST time coordination between modules in the chassis is required. This includes the following systems:CIP SyncSERCOS MotionIntegrated Motion on the EtherNet/IP networkSafetySynchLinkRSLogix 5000 software, version 17 and earlier, SOE systems, for example, coordinated time based outputs, including MAOC operations, and synchronized analog scansCST is a free running clock with microsecond resolution that starts up when power is applied to the chassis.


System TimeThis clock is based on UTC (Coordinated Universal Time). It provides a time reference independent of time zone and daylight savings time settings. You use this, for example, these types of systems:CIP MotionCIP SyncSequence of Events, RSLogix 5000 software, version 18 and laterScheduled OutputSystem Time relies on a combination of CST and CIP Sync to assure proper delivery through the rack. Additionally, it can be transported via Ethernet bridge modules to other devices that are on the EtherNet/IP network. It is the preferred clock to perform time stamps of events and is ultimately used to synchronize Integrated Motion on the EtherNet/IP network drives."
 
Even if you have multiple CPU, they should all sync to the network card. Figure 19 in the document you link shows that, doesn't it?
 
Even if you have multiple CPU, they should all sync to the network card. Figure 19 in the document you link shows that, doesn't it?


I am looking to confirm the wallclocktime AKA system time can use CIP Sync to stay in sync between multiple CPUs in different chassis but the CST in each CPU will never jump or slew.


I am having a hard time understanding the document to distinguish between keeping the time the same in modules in the same chassis (such as a CPU, motion module, or high speed counter module) vs. different CPUs and different chassis over the network.



My concern is with CST changing unpredictably in a CPU.
Thanks for any insights, including figures in the document to stare at more.
 
When you open up the property page on the CPU, it should show you the Grandmaster it's syncing to. Every PLC on the network should use the same Grandmaster.

I don't think it's a concern with the CST jumping unless somehow another PTP source with a higher priority is somehow introduced that got a significant difference in time.

I see that you are using Rockwell's A&E, so what HMI and historian are you using? I'm just curious.
 
They are on Factory Talk, I think version 7? Whatever was new in 2014. RSLogix 20.01 i think.



Does CST actually sync to a grandmaster that is in a different chassis over the network? Or is it only that wallclocktime AKA System Time gets synced between CPUs in different chassis by calculating an offset to the local chassis CST?


the document does say: "CST ... cannot be programmatically or externally influenced in any way"


The site is a hydro electric power plant with a SEL satellite clock and RTAC providing NTP server on the local network and IRIG to anything that supports it. Currently I am not concerned with keeping the PLC time in sync with satellite time - just the PLCs in sync with eachother for the FTAE.
 
We have similar setup with the exception of using iFix as the HMI. One network got over 15 PLCS, all the PLC shows the same Grandmaster AFAIK. I'll make a note to verify that the next I visit the site. Overall, I'm impressed with PTP and how reliably it seems to work as compared with HMI computer with NTP sync. NTP would often not sync for unknown reasons.

Another thing I was told is that all the switches also has to support PTP, therefore adding the correct offset in each leg.
 
CST also lets you do cool stuff like make all the flashers work in sync. It is a glorious to see a whole factory of machines all flashing their fault lights together when the compressor drops out. The beepers not so much :)
 
CST also lets you do cool stuff like make all the flashers work in sync. It is a glorious to see a whole factory of machines all flashing their fault lights together when the compressor drops out. The beepers not so much :)


Would all those flashers be driven by CPUs in different chassis?



And CST is used in the programs to determine when to turn the flashers on and off?
 

Similar Topics

Hello everyone, Is there a free version of Rockwell's programming software for Allen Bradley plc's? It's been a lot of years since I worked with...
Replies
9
Views
4,598
I acquired an Allen Bradley 1500. I built a crappy switch board thing (i think if it looked better it would be called a "trainer") to send inputs...
Replies
4
Views
1,703
I have 5 years of experience in the field and have recently left the nest where some of the higher level projects where reserved for the other...
Replies
4
Views
2,309
Free USB pen drive from Allen-Bradley for survey: http://www.ab.com/networks/ethernet/next-step.html# Looks like they have a new EtherNet/IP...
Replies
87
Views
25,861
I have a client who periodically experiences network communication issues. Sometimes when I VPN into the site, their SCADA systems will flash comm...
Replies
2
Views
31
Back
Top Bottom