Chapter 6 Function of CPU Module
6
-
5
3) RTC Data Modification by Program
It is available for the user to set the RTC value by program.
This function is used when setting the time manually through external Digit switch or making the system
that corrects the time periodically through network.
‘DATEWR’ instruction is to insert the setting value in the F area device below and write the time to RTC at
scan END.
RTC write F device
Comments
Setting range
_MON_YEAR_DT (F1034)
Month/Year
1984 ~ 2163 Year, Jan.~ Dec.
_TIME_DAY_DT (F1035)
Time/Day
1~31 Days, 0~23 Hour
_SEC_MIN_DT (F1036)
Second/Minute
0~59 minute, 0~59 second
_HUND_WK_DT (F1037)
100years/Weekday
0 ~ 6
It is available to write the data to RTC without using a instruction, by writing the RTC data to the above
area and making ‘_RTC_WR (F10240)’ to be ‘On’.
•
In case that time data does not match with the form, the value is not allowed to write.
(But if the week does not match, it shall be set as it is without error detection.)
•
Monitor the RTC read device after writing RTC data, and check if it is modified correctly.
4) Weekday Expression Method
No.
0
1
2
3
4
5
6
Day Sunday
Monday
Tuesday
Wednesday Thursday
Friday
Saturday
5) Time Tolerance
RTC tolerance depends on ambient temperature. Time tolerance according to temperature per day was
indicated on the table as below.
Operation
temperature
Max. tolerance
(second/day)
Normal case
(second/day)
0 °C
- 4.67 ~ 1.38
-1.46
25 °C
- 1.64 ~ 2.42
0.43
55 °C
- 5.79 ~ 0.78
-2.29
1) RTC may not have the clock data written at first.
2) When using a CPU module, you must set the clock data correctly at first.
3) In case that the data out of range of clock data is written in RTC, it may not work normally.
Ex) 14Month 32Day 25Hour
4) RTC may stop or occur error because of battery error. If new clock data is written in RTC, the
error shall be cleared.
5) For more information about the time date modification by program, refer to the
XGK
Instructions
user’s manual.
Note