B&R NTP Server accuracy

Hi community!

I have a production line with 37 PLCs (X20CP0484).
1 will host a NTP server and the remaining 36 will make a NTP client to this server. All PLCs have a light tower which will blink with a 1s interval and it is important for the customer that they blink at the same time on all 37 PLCs. On all the PLCs I use the function block DTStructureGetTime to get the time but the result is really poor. They all blink at very different times.

They are all on a local LAN, so no big delays should be there. I only found this in the help:

Is the accuracy of the B&R NTP server really this poor? If the accuracy was about 50ms I think that it will be fine for the human eye :slight_smile: .

Do anyone know how to improve the accuracy?


I don’t think that the NTP server accuracy is the problem.
NTP is designed for “long range time synchronization” and works in a way, that the client has to aquire its time update from the server, and the time interval for aquiring an update changes (it get longer, as longer as the client runs, and it can be up to 1024 seconds between two reqests to the server.
So, even if the server is highly accurate, you’ll not come automatically into the situation that all clients will have the exactly same time in the RTC (as I know, the RTC has a minimum resolution of 1 second).
In addition, the processors base tick (which is the base for the taskclass system) will differ between different PLCs, because it’s not synchronized to a clock.
In distributed processor systems such a synchronisation is normally solved by special “clock synchronize protocols” like IEEE1588, but a such protocol is not available on the PLC.

Can you see in the logger of the clients, that synchronisation really happened (there should be some warning), how is the stratum setting of the NTP server?
Im asking because of the information in that post:

We solved something similar about “synchronized
blinking” some years ago by defining a own mechanism, based on NTP synched clocks (so that they all have the “same second”) + running a timer FB like TON() on every PLC in the same and fast taskclass (for the blink rate) + restarting this timer FB every 4 seconds (based on the RTC’s second modulo 4 information) by setting .enable to False, call the FB, then set it again to True, and so on…
So we “cyclically resynchronized” the starting point of the TON() timer on the different PLCs. Sorry, I can’t remember in detail for example why we’ve choosen 4 seconds for restarting the timer, I have to check if I have something written down somewhere.

Best regards!

Is the powerlink interface of the X20CP0484 used?
If not you could make a powerlink network (extra cables and hubs) needed, with one MN and 36 iCNs, which are then synchronized in the usec range. And you can synchronize the task class to this powerlink cycle time.

Probably a too big chance of concept.