Network Time Servers
JohnMichnr
Junior Member
in AMX Hardware
Hey - does anybody know if I can set the Network Time server IP Address of the master from inside the program? I was thinking about something at startup.
I always forget to go into the web page and set that when I'm setting up a system
I always forget to go into the web page and set that when I'm setting up a system
Comments
-
How about:CLKMGR_ADD_USERDEFINED_TIMESERVER
Adds a user-defined time server entry.
CLKMGR_GET_ACTIVE_TIMESERVER
Populates the TIMESERVER structure with the currently active time server's data.
CLKMGR_SET_ACTIVE_TIMESERVER
Sets the time server entry that has the matching IP-ADDRESS to the IP parameter as the active time server entry. -
how 'bout 'em.
Wonder when those came in. Looks like they should do the trick. The one thing I've never really understood is that they have the network time server setup to look for a NIST clock somewhere, is that the same as a network time protocol from a time server (NTP)? -
I believe you get the time in NTP format from an NIST server.JohnMichnr wrote: »The one thing I've never really understood is that they have the network time server setup to look for a NIST clock somewhere, is that the same as a network time protocol from a time server (NTP)? -
Yeah - I did a little more digging and that is what it looked like to me as well. Looks like there is a NTP protocol and a Simple NTP protocol out there.
-
This is an interesting feature. I went ahead and tried to implement the calls into a program to have the control system sync the time from a NIST time sync server but I'm not having any luck. Does anyone happen to know what I am doing wrong?
It doesn't seem to get the time from the time server.
Here is the url for the time sync server I am trying to poll. For testing purposes I have the resync rate set to around 3 minutes according to the documentation I was following.
http://tf.nist.gov/tf-cgi/servers.cgi
Here is my code.
Main body of code:PROGRAM_NAME='TimeSync Test' Define_Device dvTP = 10003:1:0 Define_Variable Integer iTestText Integer iTimeServerReSyncRate Char TimeServerIP[15] Char TimeServerURL[30] Char TimeServerLocation[20] CLKMGR_TIMESERVER_STRUCT TimeServer Define_Module '12 Hour Clock' modClock(dvTP, iTestText) Define_Start iTestText = 1 iTimeServerReSyncRate = 3 TimeServerIP = '64.90.182.55' TimeServerURL = 'nist1-ny.ustiming.org' TimeServerLocation = 'Ney York City, NY' CLKMGR_ADD_USERDEFINED_TIMESERVER(TimeServerIP, TimeServerURL, TimeServerLocation) CLKMGR_SET_ACTIVE_TIMESERVER(TimeServerIP) CLKMGR_GET_ACTIVE_TIMESERVER(TimeServer) CLKMGR_SET_RESYNC_PERIOD (iTimeServerReSyncRate)
12 hour clock module:Module_Name = '12 Hour Clock' (Dev dvTPNavigation, Integer iTimeChannel) Define_Variable Char iHour Char iMinute Define_Call 'Get The Time' { iHour = Type_Cast(Time_To_Hour(Time)) iMinute = Type_Cast(Time_To_Minute(Time)) If (iHour < 13) { If (iMinute < 10) { Send_Command dvTPNavigation, "'^TXT-', ITOA(iTimeChannel), ',0,', ITOA(iHour), ':0', ITOA(iMinute), ' AM'" } Else { Send_Command dvTPNavigation, "'^TXT-', ITOA(iTimeChannel), ',0,', ITOA(iHour), ':', ITOA(iMinute), ' AM'" } } Else { iHour = iHour - 12 If (iMinute < 10) { Send_Command dvTPNavigation, "'^TXT-', ITOA(iTimeChannel), ',0,', ITOA(iHour), ':0', ITOA(iMinute), ' PM'" } Else { Send_Command dvTPNavigation, "'^TXT-', ITOA(iTimeChannel), ',0,', ITOA(iHour), ':', ITOA(iMinute), ' PM'" } } } Define_Event Data_Event [dvTPNavigation] { Online: { Call 'Get The Time' } } Define_Program Wait 600 'Get The Time' { Call 'Get The Time' } -
OK - Update on this.
I'm using the following code in Define_StartDEFINE_CONSTANT sNTPServer[] = {'137.22.128.2'} DEFINE_START wait 100 { CLKMGR_ADD_USERDEFINED_TIMESERVER(sNTPServer,sNTPServer,'Network') CLKMGR_SET_ACTIVE_TIMESERVER(sNTPServer) clkmgr_set_clk_source(clkmgr_mode_network) }
But it doesn't seem to be working - The web pages on the masters show that they have loaded the time server in and selected it - but I dont' seem to be updating the clock in the masters. Of course now with DST ending all the systems are off an hour.
Any ideas from anybody? -
Your location is misspelt.
Try entering the details manually into the master and see if it works.
Try using the same details on a PC to make sure the time server will respond to that. -
Yeah - I figured it out - put the wrong IP Address in for the time server. Duh
Boy that really confounded the master. you couldn't even go in and manually reset the time.
Leave a Comment
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums