Networked Time Protocol

ThorleifurThorleifur Junior MemberPosts: 58
Hi guys,

Has anyone tried to connect a Netlinx to a NTP server?
I did a concert hall slash conference senter a few years ago. The four bigger halls have 2-5 TPI-PROs with an ELO touchscreen to control lighting and AV. The AV and lighting are on two different systems and two different subnets also, per hall also just to complicate it even more. The problem is that I put a clock on each of the screens, which the customer loved, but they tend to run out of sync every few months.

I usually just VPN to the system and correct the time on all 16 NIs about every two months. But now my customer wants to connect every piece of networked equipment to a NTP server. They want to make it so every log their equipment spits out has the same timestamp.

My eager customer went ahead and made the network guys put up a NTP server/service on the router. Then I got the email saying I had to make it work on my stuff. No problem with most of my equipment, but not the NIs.
I have looked at the Clock Manager on the WebConsole, but it only support NIST. I also looked at the Clock Manager API that comes with the Netlinx.axi, but that it seems does the same thing as the webconsole.

So I come to you guys. Have you got a good idea for me to try, or have you already solved this problem?

Comments

  • GregGGregG Just some guy... Posts: 249
    On the web settings on my master there is a blank line after the pre-populated nist time servers where I can add my own server. All the listed nist addresses are just the default NTP servers.
  • ThorleifurThorleifur Junior Member Posts: 58
    Wow.. in my mind it was so complicated... I thought I had to connect to a NIST server, not just any server.

    Thanks Greg.
  • Danny CampbellDanny Campbell Senior Member Posts: 311
    If your systems are connected to a corporate network, you can generally just enter the IP address of the default gateway as your NIST server.
  • ThorleifurThorleifur Junior Member Posts: 58
    That is what I did in the end :)
  • GregGGregG Just some guy... Posts: 249
    Realistically, _any_ valid NTP server that your master can connect with should be good enough to get you sync'd to within 1 second of any other NTP source. The main reason to connect to an internal NTP source on a corporate network is usually just to keep from needing internet access through a firewall.


    http://www.ntp.org/ntpfaq/NTP-s-algo.htm#Q-ACCURATE-CLOCK
  • cmasoncmason Junior Member Posts: 123
    Setting up Network time on multiple masters can be a bit annoying and "time" (pardon the pun) consuming.
    After receiving a few complaints about the time being off on the TPs, I wrote the following function into my code to nip it in the bud, once and for all!
    DEFINE_FUNCTION fnSYSSetupTime()
    {
        STACK_VAR CLKMGR_TIMEOFFSET_STRUCT ctsOffset
        STACK_VAR CLKMGR_TIMESERVER_STRUCT ctsServer
        ctsoffset.hours = 1
        ctsoffset.minutes = 0
        ctsoffset.seconds = 0
        CLKMGR_SET_CLK_SOURCE(CLKMGR_MODE_NETWORK)
        CLKMGR_SET_RESYNC_PERIOD(60) // re-sync every hour
        CLKMGR_SET_TIMEZONE('UTC-05:00') // your timezone offset
        CLKMGR_GET_ACTIVE_TIMESERVER(ctsServer)
        IF(ctsServer.IS_SELECTED != 'xxx.xxx.xxx.xxx') // your time server IP or URL
        {
    	CLKMGR_ADD_USERDEFINED_TIMESERVER ('xxx.xxx.xxx.xxx','mytimeserver.mydomain.com', 'West Seneca, NY') // fill in your own serverIP/URL, domain and location info
    	CLKMGR_SET_ACTIVE_TIMESERVER('xxx.xxx.xxx.xxx') // your time server IP or URL
        }
        CLKMGR_SET_DAYLIGHTSAVINGS_MODE(TRUE) // does your timezone follow DST?
        CLKMGR_SET_DAYLIGHTSAVINGS_OFFSET (ctsOffset) // if so, what is the DST offset
        CLKMGR_SET_START_DAYLIGHTSAVINGS_RULE('occurrence:2,1,3,02:00:00') // when does DST start for you?
        CLKMGR_SET_END_DAYLIGHTSAVINGS_RULE('occurrence:1,1,11,02:00:00') // when does DST end?
    }
    

    Just call the function on DEFINE_START and never worry about setting the time on your masters again!
Sign In or Register to comment.