PLC Time Sync with OPC Tags

kenwos_19

Member
Join Date
Oct 2019
Location
Deeside
Posts
6
Hi, I have a multiple PLCs (AB) running multiple applications, inc Motion, on different VLANS, but connected via Stratix5700 (CGN) switches and NAT table to a LAN where a Kepware OPC server is the only common connection. I need to syncronise the time in each PLC to a master time clock derived from the OPC server or NTP, but only when the process machine is NOT running, or simply use Tags as the time source for HMI sync, instead of the PLC clock.
The Stratix switches are all Sync'd to NTP.
Not all HMI are Rockwell, and various generations.
Controllogix, CompactLogix, Micrologix & SLC 505 are present.

NO SCADA is available, and no other software app with OPC, etc is available on the server or connected VLAN to drive the DateTime data into OPC Tags.
SNMP is NOT an option.
Need a Free utility to run on the OPC server !

Any Ideas ?
 
How good are you with Python and DMroeder's (a forum member) Rockwell communication library?

Failing that, nodered is a possibility, but I'd imagine it to be more onerous to implement than with Python.
 
Each machine sits inside it own network below the Stratix 5700 switch. The Switch the NAT's the machine network on a dedicated VLAN for each machine to the OPC server via a firewall. OPC Server sits inside DMZ.
Each VALN can not communicate with another VLAN only the OPC server.
OEE application connects to OPC server and extracts data from each process network. ONLY the OPC server is permanently connected to ALL the machine VLANs.
 
What problem are you trying to solve ?

You state that you want to "use Tags as the time source for HMI sync, instead of the PLC clock", and describe the HMI devices as "various".

Are you trying to assure that alarms and event timestamps be consistent across HMI's, so they are consistent with the timestamps used by the OPC serve r?

Synchronizing PLC clocks is a challenge with various approaches and solutions. Rockwell has provided a couple of different tools over the years that run on a supervisory computer (very often a server doing HMI, MES, or other tasks like your Kepware OPC server).

Sometimes the most difficult challenge is doing this kind of change on a system that is running CIP/Logix Motion, which can be disrupted by large changes in the system clock. Is that the basis for your requirement that the time synchronization be done only "when the process machine is NOT running" ?
 
What problem are you trying to solve ?

You state that you want to "use Tags as the time source for HMI sync, instead of the PLC clock", and describe the HMI devices as "various".

Are you trying to assure that alarms and event timestamps be consistent across HMI's, so they are consistent with the timestamps used by the OPC serve r?

Synchronizing PLC clocks is a challenge with various approaches and solutions. Rockwell has provided a couple of different tools over the years that run on a supervisory computer (very often a server doing HMI, MES, or other tasks like your Kepware OPC server).

Sometimes the most difficult challenge is doing this kind of change on a system that is running CIP/Logix Motion, which can be disrupted by large changes in the system clock. Is that the basis for your requirement that the time synchronization be done only "when the process machine is NOT running" ?

Thank you for your time, your last point is the most important, I need to avoid changing the PLC clock whilst a process is executing. By making the "Time" Tags based this can be use to fulfil a number of functions which include synchronised time stamps on 'Tag' based alarm generated on FTView ME alarms, with the station being sync'd to the "Time" tags.
Another use is the date & time stamping of data in a UDT for retrieval via the OPC server to ensure events are correctly stamped and sequenced in time. A form of store and forward.
I also need accurate D & T on files created on any of the control systems on the machine network.

I need a SCADA, but IT are reluctant to support as they have there own agenda.
 
So this facility doesn't have an engineering station?

If you can't install Python (even portable??), can you install anything at all on that OPC server? If not, what possibilities are you thinking of?

We dont have an eng WS, but we do need one. IT !

I have access to the OPC server and can install apps on there, Java and Python are banned.

OPC Bridging would work as I can add time sync to the Kepware OPC server System tags to a UDT in each machine PLC.

This looks like the route I shall take.
 
Thanks for the mention of FTView ME; are you running PanelView Plus terminals, and/or FTVME on Windows hosts ?

I'm a little curious about what the OPC Server provides data for, if you say there's no SCADA or HMI system. I assume it's for some enterprise or data logging purposes.

Links to some useful documents on clocks and ControlLogix:

RA Knowledgebase Article IN5505 (Access Level: Everyone): "What's New for the Logix 5000 Clock Update Tool".

RA Knowledgebase Article QA50631 (Access Level: TechConnect): "Logix 5000 Clock Update Tool with CIP Motion".

Overview video for FactoryTalk Action Manager: https://www.youtube.com/watch?v=Fe5bq5r7VFc
 
About FTView ME and PanelView Plus terminal time:

One of the unusual features of PV+ is that it doesn't have an ordinary NTP client that's independent of a connection to a Windows domain. If you're not using domain authentication and membership, then you don't have an easy way to get the PV+ system time set via an upper-level network. (This might have changed with the new PV+7 Series B with Windows 10 IoT Edition).

But it does have a Global Connection that allows you to read specific tags for each element of the system time from a PLC, then use another boolean tag transition from false to true to have the PV+ apply those values to its system clock.

For most users, those tags are derived from the Status file (PLC/SLC) or using a Get System Variable (GSV) instruction to access the Wall Clock Time (Logix).

But they don't have to be. They could be tags written by your OPC server to the controller, that aren't connected to the controller's clock at all.
 
We dont have an eng WS, but we do need one. IT !

I have access to the OPC server and can install apps on there, Java and Python are banned.

OPC Bridging would work as I can add time sync to the Kepware OPC server System tags to a UDT in each machine PLC.

This looks like the route I shall take.


I feel sorry for you... I wouldn't have accepted to work there.
 
I would enable synchronization on the PLCs. CIP Sync is a proven technology and is literally intended for motion systems.

PTP & NTP don't propagate timezone and DST info, those only change when you change them -- the PLC clocks are all CST internally.

Your setup is fine: assuming your stratum 1 clock is the internet, the 5700's will be stratum 2.

If you absolutely must follow the rule, I would follow one of these paths:

1. Get a local stratum 1 NTP server and sync the 5700's off that. Then turn it off when you want to avoid synchronization. The 5700's will revert to stratum 16 and the PLC's won't use them.

2. Use CIP Messaging (or SSV if available) to disable synchronization when you don't want it.
 
Last edited:

Similar Topics

Hi, I'm working with a Citect OPC DA server and an Allen Bradley ControlLogix L71 PLC. I have set up my boards, ports, and I/O device. When I...
Replies
7
Views
3,278
Hi All, How can I configure the PLC to be a "Synchronized Time Slave" ? When I enable Time sync, it sets the PLC as the master by default...
Replies
19
Views
14,534
Hi, I need to synchronize a PLC but I have no experience with this. I would like to know which are the common alternatives to achieve this and...
Replies
17
Views
8,548
I want syn of two same 80 kw generators (Gen Model--KOHLER 80EFOZDJ) using PLC. The gen is electronics engine controlled by ECU (level 14, Deere &...
Replies
3
Views
2,117
Hi sir. We are using Control logix redundant PLC system which supports only PTP time synchronization protocol but from DCS side we are receiving...
Replies
1
Views
2,410
Back
Top Bottom