Global Time Stamp

Bereggergo
2016-11-07
2018-03-19
  • Bereggergo - 2016-11-07

    Hello everybody,

    I would like to sync the date of my PLC with the local world clock.

    There is a Festo PLC (linux based, just as a Raspberry PI) and a windows 7 based standard PC. The PC has 2 ethernetcard: one for internet and one for the PLC. The PLC sends information via OPC-UA.

    The problem: any time the PLC communicate with the PC it sends its timestamp and it's different.

    Is there any way to sync the PLC time with the PC time via Codesys? Or maybe under linux?

    Thank you,
    GergΓΆ

     
  • Anonymous - 2016-11-07

    Originally created by: scott_cunningham

    A couple of ideas:

     
  • Bereggergo - 2016-11-08

    Dear scott_cunningham,

    Thank you for your answer! I will try the second case with sntp server and the oscat library.

     
  • Bereggergo - 2016-11-08

    Dear scott_cunningham,

    As I figured out the SMTP library is in the oscat newtork package, however this package is not available for codesys 3.5. Do you know why, or am I making something wrong?

     
  • yannickasselin1 - 2016-11-08

    Search for OSCAT in the CODESYS store.

     
  • Bereggergo - 2016-11-08

    Dear yannickasselin1 ,

    thank you for the tip, I found it!

     
  • Bereggergo - 2018-02-14

    Hello guys,

    I'm still facing with the issue of the time sync. I'm trying to use the oscat library sntp_client. I set the sntp server in my windows as attached in the picture. With Siemens plc that works.

    Than I call the sntp function block of the oscat library. I set the IP, than I give high signal to the activate input, but nothing happens. Do you know what am I missing? I do no give any value for the S-BUF. Shall I do?

    Thank you,
    Gergo

    IMG: sntp_codesys.PNG

    IMG: sntp_setup.png

     
  • e.kislov - 2018-02-15
     
  • Bereggergo - 2018-03-19

    Hello e.kislov,

    your example just works fine! Many thanks for the help!

    BR,
    Gergo

     

Log in to post a comment.