LG MASTER-K 120S Series User Manual page 72

Programmable logic controller
Table of Contents

Advertisement

Chapter 5 Power Supply / CPU
(2) Read RTC data from special register
Special register Area
(Word)
F053
F054
F055
F056
Example : 2002. 07. 23. 13:50:20, Tuesday
2) Write RTC data
There is two ways to write new RTC data to the CPU.
The first one is using a graphic loader (KGLWIN). For detailed information, refer the user's manual of KGLWIN.
The second one is write sequence program. By switching a special bit on, user can replace the current RTC data with the
reset data stored in a specified memory area. The followings are the memory address of preset data and an example
program.
Data register Area
(Word)
D4993
D4994
D4995
D4996
Example : 2002. 7. 10. 11:53:24, Monday
* M1904 : RTC data change bit
When the M1904 bit is switched on, the new data in D4993 ~ D4996 will be moved to F53 ~ F56. After data is
moved, M1904 has to be switched off immediately because current data will be updated every scan while
M1904 is on.
3) Date expression
Number
Date
Sunday
REMARK
1)
If RTC stops or error occurs, write new data to the RTC then error is called off.
2)
There is no written clock data in the RTC when shipped.
3)
Before using RTC module, write clock data to the RTC first
Upper byte
Lower 2 digits of year
Day
Minute
Higher 2 digits of year
Upper byte
Lower 2 digits of year
Day
Minute
Higher 2 digits of year
0
1
2
Monday
Tuesday
Description
Lower byte
Month
Hour
Second
Date
Description
Lower byte
Month
Hour
Second
Date
3
4
Wednesday
Thursday
5-35
Data
(BCD format)
H0207
H2313
H5020
H2002
Data
(BCD format)
H0207
H1011
h5324
H2001
5
6
Friday
Saturday

Advertisement

Table of Contents
loading

Table of Contents