Paolo_911

Sync PLC Clock slow by 3s

5 posts in this topic

I synced the PLC clock in a Q03UDECPU to my PC. It updated in the software and then I executed it (synced the PLC to it).

However, when I close the settings and go back, the clock is slow by 3 seconds consistently. Why is this? How can I accurately sync the PLC clock to my PC with exact seconds? Anyone else experience this or is this even possible?

Another way I know the PLC clock is 3s slow is because I set up a SNTP server from the PLC which the GOT looks at. Again the GOT clock is 3 seconds delayed from my PC. This brings me to another point, in which I turn on the SM1028 bit (clock read request), but nothing turns on in SD1025 to SD1028 as the manual says it should. What am I doing wrong that I can't read the PLC clock into registers?  

Edited by Paolo_911

Share this post


Link to post
Share on other sites

To read clock data you need to use DATERD(P) which will output an array of INT's. Why your clock is 3 seconds out of sync is hard to say, but as long as your not synchronizing your PLC and GOT against a valid (S)NTP server it's a bit hard to say. Do you have a (S)NTP server available in your network, or only your computer?

Share this post


Link to post
Share on other sites

Thank you! I will program in that instruction. I only have a SNTP server on my computer. So I was trying to sync the PLC to my computer. The one PLC is connected to the GOT and that's it. I figured it would be difficult to figure out why the PLC is 3 seconds off. It just seems odd that it isn't able to accurately sync to my computer. 

Share this post


Link to post
Share on other sites

Actually, I just had a thought. The PLC is actually connected to an MES US interface module through an Ethernet switch. We are going to look into whether or not we can sync the PLC and GOT time to whatever time the MES is running. I just don't know if the MES US module can broadcast its time as a SNTP server where the PLC and GOT can read from. 

Share this post


Link to post
Share on other sites

Well, if you have a MES US module, I would highly recommend a "global" SNTP server for all units (GOT, MES and PLC all synchronizes with the global SNTP server). If you already have a MES module then you probably also have a DB server of some kind that can be setup to also be a SNTP server.

P.S. SNTP servers don't broadcast timestamps. They are servers and receive time-requests from clients (like GOT/MES/PLC).

But any Windows server or Linux server (or even a Windows computer) can be setup to accept and reply to SNTP requests.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now