174
TWR
D0
X0
S·
Write the RTC value to the PLC.
Write the set clock data into PLC’s real time clock.
In order to write real time clock, please set the 7 registers value from D0 to D6.
After executing TWR instruction, the time in real time clock will immediately change to be
the new time. It is a good idea to set the time few minutes late as the current time, and then
drive the instruction when the real time reaches this value.
Note: when choosing secret download program advance mode in XDPpro software, the RTC
only can be changed through TWR instruction.
There is another method to write the RTC. In the XDPpro software, please click the clock
details in project bar on the left. Then click write into the current time.the PC will auto-write
the current time to the PLC.
4-10-3
.
Clock compare [TCMP]
1. Instruction Summary
Compare three continuous clocks time.
Clock compare [TCMP]
16 bits
TCMP
32 bits
-
Condition
Normally ON/OFF,
rising/falling edge
Suitable
model
XD, XL
Hardware
-
Software
-
Unit
Item
Clock data
Data fo
r clo
ck
s
ettin
g
D0
Year
0-99
D1
Month
1-12
D2
Date
1-31
D3
Hour
0-23
D4
Minute
0-59
D5
Second
0-59
D6
Week
0 (Sun.)-6 (Sat.)
Unit
Item
SD018
Year
Sp
ecial d
ata re
g
is
ter
f
o
r r
eal
tim
e clo
ck
t
SD017
Month
SD016
Date
SD015
Hour
SD014
Minute
SD013
Second
SD019
Week