Home AMX User Forum AMX General Discussion
Options

NX1200 odd behavior due to clock manager?

I was setting up a new NX1200 and to be honest I have little experience with the NX series. After a reboot or program upload the program would run for a minute or so and then stop, after which time no variable would be recognized in debug window. I thought maybe it was a memory issue since the code worked fine on an NX 2200 but the program does use a lot of memory. Looking at the specs the memory is the same for the 1200 & 2200 except for flash which AFAIK the program doesn’t use. After a little playing I noticed the program stopped working at the same point while watching diagnostics on the line where I call get clock manager server. So before that line I added set clock manager server and gave it an IP to a nist server. If you go to clock manage settings in the web browser they do list 3 default servers so I didn’t think I’d have to add my own although that’s what I’ve done in the past. I think I had to add the same IP in the web gui too to match the ip address added in code but I’m not sure. Long story short adding that nist server allowed my code to run past the point where I called get clock manager server. One wouldn’t think that would be a legitimate cause to cripple the master but apparently it is.

Comments

  • Options
    Reese JacobsReese Jacobs Posts: 347

    I primarily use NX-4200 masters but I have had numerous issues with clock manager services. While I have not experienced the specific problem you described, I discovered that adding too many user defined time servers will cause clock manager services to simply stop working. When clock manager services are working properly, you can see the network connection to the time server in Diagnostics at the appropriate configured update interval. In my system, no calls were made after adding 8-10 time server entries. I was trying to define multiple entries that I could then use to rotate calls to avoid always referencing the same time server. Eventually, I implemented my own NTP client module and I no longer use internal clock manager services.

    While on the subject, having to specify the IP address for a time server is a bad design. Most public time server pools (NIST, NTP.org, Google, ...) have gone to a round robin time server design where a single URL is used to access a pool of servers. You do not need to know (nor do they want you to know) the IP address of any time server. Instead, time services are to be accessed using a URL which is DNS resolved to an available time server in the server pool. This is how I implemented my NTP client module -- it can be configured for NIST, Google, or NTP server pools and it uses the canonical URL for the configured time service in order to open a connection to obtain the current time. Sorry for the digression but the current clock manager service not only has some bugs but also suffers from some limitations that impact its usefulness (such as when NIST or other services change the IP addresses for their time servers).

  • Options
    viningvining Posts: 4,368
    edited May 2019

    I might add that this would have been almost impossible to track down if I didn’t have a bunch of debug send string 0’s in my date and time include file. Normally in my code I require a debug variable be set to enable debug for any particular device but in my date and time code things that only happen at boot up don’t require a flag set to run. I honestly don’t know how I would have figured it out if I didn’t have those giving me the clue.

    I would highly recommend AMX looking into this and fixing it. Of corse maybe I’m the only idiot to use that system function although I can’t say that I really even use the info the function returns for anything.

Sign In or Register to comment.