Home AMX User Forum NetLinx Studio

clock send command in Netlinx

Any news on the Axcess clock command. Is it now implemented in Netlinx. At the moment a rs 232 cable is running from port1 to the master port . We send the set time command out on port 1 .


Axcess:
send_command 0,"'CLOCK ',date,' 0',itoa(uur),':',mid_string(time,4,2),':01'"

Nick from the Netherlands

Comments

  • DHawthorneDHawthorne Posts: 4,584
    I never got it to work on a NetLinx, but I haven't tried in some time.
  • nick_bnick_b Posts: 15
    USE A G3 TOUCHPANEL to adjust the clock
    nick_b wrote:
    Any news on the Axcess clock command. Is it now implemented in Netlinx. At the moment a rs 232 cable is running from port1 to the master port . We send the set time command out on port 1 .


    Axcess:
    send_command 0,"'CLOCK ',date,' 0',itoa(uur),':',mid_string(time,4,2),':01'"

    Nick from the Netherlands


    It seems that the clock setup in the touchpanel is doing the job automatic. It is both ways. Adjust the clock of the master with terminal and it will adjust the clock on the touchpanel. GREAT. Also adjusting the clock in the setup on the touchpanel will adjust the NETLINX master clock. That easy, never seen that in the manuals.

    Nick
  • From a Modero TP Manual (same is true for G3):

    ...touch panels do not have an on-board clock. This page both utilizes the
    time/date from and sets the time/date to the NetLinx Master.

    If you need to give a client access to the clock just use the Port 0, Set Time address codes

    Cheers

    Jim
  • DHawthorneDHawthorne Posts: 4,584
    nick_b wrote:
    It seems that the clock setup in the touchpanel is doing the job automatic. It is both ways. Adjust the clock of the master with terminal and it will adjust the clock on the touchpanel. GREAT. Also adjusting the clock in the setup on the touchpanel will adjust the NETLINX master clock. That easy, never seen that in the manuals.

    Nick
    Which is all well and good, but doesn't help if you have a multiple master system and you want them all to sync off the main master. That would be the only time I want to use the CLOCK command; it seems installing i!-TimeManager or i!-Schedule on every master is a bit of overkill.
  • yuriyuri Posts: 861
    doesnt this work:

    SEND_COMMAND 0:1:0,"'CLOCK ',DATE,' ',cHour,':',cMin,':00'";

    because i've used that in an older netlinx frame (ni-3000 i think)
  • ericmedleyericmedley Posts: 4,177
    nick_b wrote:
    Any news on the Axcess clock command. Is it now implemented in Netlinx. At the moment a rs 232 cable is running from port1 to the master port . We send the set time command out on port 1 .


    Axcess:
    send_command 0,"'CLOCK ',date,' 0',itoa(uur),':',mid_string(time,4,2),':01'"

    Nick from the Netherlands

    If I'm understanding you correctly...

    You can do a clock/date set command from the program. You don't need to burn up a serial port to do it.



    SEND_COMMAND 0,"'CLOCK ',TIME_INCOMING_DATE,' ',TIME_INCOMING_TIME"

    SEND_STRING 0,"'DLS:CLOCK ',TIME_INCOMING_DATE,' ',TIME_INCOMING_TIME,13,10"

    I don't know why you wouldn't be able to send it via Maseter-to-Master to another master on the system either.

    You'd just have to change the address to 0:1:system number (I think)
  • Spire_JeffSpire_Jeff Posts: 1,917
    Even if you can't send it directly via 0:1:Sys#, you could always create a simple module that uses a virtual device to send the string locally.

    Jeff
  • DHawthorneDHawthorne Posts: 4,584
    Except it doesn't work across virtual ports from master to master. Neither does it work from a Telnet connection - I just tried it. It may work from the code of the master running it, but that's about it.
  • Spire_JeffSpire_Jeff Posts: 1,917
    If it works from the master to itself, wouldn't you be able to do this:
    DATA_EVENT[vdvTIME]{
    
      STRING:{
       SEND_COMMAND 0,"DATA.TEXT";
      }
    
    }
    

    Then just send the properly formated CLOCK command to the virtual device.

    But, this all hinges on the command actually working. Now that I think about it, wasn't there an !i-time module or maybe it was !i-Scheduler that had some sort of internet time server capability? This means there must be a way to set the clock on the processor.

    Jeff
  • annuelloannuello Posts: 294
    I used i!-TimeManager with relative ease on my masters, until I started using RMS. (The RMS modules can sync with the RMS server, which is in turn synced to a time server.) It took a little bit to modify the i!-TimeManager i .axi file to suite my needs (time zone & server), but after that it was a matter of one #include line in my program.

    I'm not sure if the i!-TimeManager module takes network latency into account, but it couldn't be much worse than a M2M implimentation.

    From my point of view, the best thing about NTP is that I can forget daylight savings rules, etc. The NTP server admin now looks after that for me, and they don't even realise it.

    Roger McLean
    Swinburne University
  • AM93AM93 Posts: 10
    The Clock command works for me. I usually have one master on site that goes out and gets time and the other units on site ask that master for time. I use just a raw tcp/ip connection for communication, no M2M. Works fine.
Sign In or Register to comment.