Jump to content

Servoing Windows System Time


Recommended Posts

I am trying to create a vi to servo the windows system time to match my cRIO clock which is disciplined by GPS.

I was hoping to find a IEEE1588 stack for windows that would do this for me but in the meantime...

It appears that the way to do this is by using a windows dll function called SetSystemTimeAdjustment which can speed up or slow down

the windows tick time, with this in hand, you can implement a PID servo loop to gradually sync the clock to an external reference.

I was wondering if anybody has gone down this path before and might have a few tips.

Link to comment

The problem is that I do not have any master time servers on my network other than a GPS based IEEE1588 master clock node which is not supported by windows network time clients.

You could build a simple SNTP server on your cRIO system and then have Windows sync to it using the built in NTP client. I haven't tried it, but I think it should work.

There's example code for a SNTP client on ni.com; you'd have to build the opposite end in this case.

Link to comment

Hi Christian,

Thanks for the suggestion. I took a look at the SNTP client vi's and they look pretty simple (as the name implies). I think I can get a SNTP server going

with this as a starting point. I hope that in a future release, NI will consider adding a 1588 windows client to the NI-SYNC driver.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...

Important Information

By using this site, you agree to our Terms of Use.