Moxa Technologies 331 User Manual Page 32

  • Download
  • Add to my manuals
  • Print
  • Page
    / 69
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 31
Moxa C Programmable RTU Controllers Managing the RTU Controllers
3-6
Adjusting the System Time
Setting the Time Manually
The Moxa C programming RTU controller has two time settings. One is the system time, and the other is the
RTC (Real Time Clock) time kept by the RTU controller’s hardware. Use the #date command to query the
current system time or set a new system time. Use #hwclock to query the current RTC time or set a new RTC
time.
Use the following command to query the system time:
#date
Use the following command to query the RTC time:
#hwclock
Use the following command to set the system time:
#date MMDDhhmmYYYY
MM = Month
DD = Date
hhmm = hour and minute
YYYY = Year
Use the following command to set the RTC time:
#hwclock –w
Write current system time to RTC.
The following figure illustrates how to update the system time and set the RTC time.
192.168.127.254 – PuTTY
root@Moxa:~# date
Fri Jun 23 23:30:31 CST 2000
root@Moxa:~# hwclock
Fri Jun 23 23:30:35 2000 -0.557748 seconds
root@Moxa:~# date 120910002010
Thu Dec 9 10:00:00 CST 2010
root@Moxa:~# hwclock –w
root@Moxa:~# date ; hwclock
Thu Dec 9 10:01:07 CST 2010
Thu Dec 9 10:01:08 2010 -0.933547 seconds
root@Moxa:~#
Updating the Time with NTP Client
The Moxa C programming RTU controller has a built-in NTP (Network Time Protocol) client that is used to
initialize a time request to a remote NTP server. Use #ntpdate <Time Server> to update the system time,
and save it to the RTC.
#ntpdate time.stdtime.gov.tw
#hwclock –w
Visit http://www.ntp.org
for more information about NTP and NTP server addresses.
Page view 31
1 2 ... 27 28 29 30 31 32 33 34 35 36 37 ... 68 69

Comments to this Manuals

No comments