Jump to content

Recommended Posts

Has anyone come up with a way to set a Vision PLC clock from the internet? I have a V1210 connected to the Internet and I'd like to keep the clock reasonably accurate. I can go online with it at any time and set it from my PC through VisiLogic, but I need to find a way to automate the process to keep it accurate.

Share this post


Link to post
Share on other sites

I seem to remember that the Visions have a FB for a NTP server. RCF is the block you want I think.

Share this post


Link to post
Share on other sites

I did a few, but they work on local NTP server. I guess logic is the same for server on the internet.

You need an UDP socket on port 123 for RFC-1305 function. You can try building it from the example program, if I recall correctly program from the example worked when I tried it out. Also you need to have a logic for daylight savings time.RFC.thumb.PNG.bc1becd83f201fbeffbb715a3ad4b154.PNG 

I attached a snip because rest of subroutine is a mess because I needed to switch a socket to UDP for time update and then back to TCP and that's a lot of gymnastics. If something goes wrong RFC returns 0 and resets the date so that's why there are Lower and Upper limits.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...