Mitsubishi Electronics FX2C Home Theater Server User Manual


 
FX Series Programmable Controlers Applied Instructions 5
5-139
5.14.5 TRD (FNC 166)
Contents:
The current time and date of the real time clock are
read and stored in the 7 data devices specified b
y
the head address D.
The 7 devices are set as follows:
Points to note:
The
y
ear is read as a two di
g
it number. This can be chan
g
e to a 4 di
g
it number b
y
settin
g
D8018 to 2000 durin
g
the first pro
g
ram scan; see followin
g
pro
g
ram extract.
Mnemonic Function
Operands
Program steps
D
TRD
FNC 166
(Time
Read)
Reads the current
value of the real
time clock to a
g
roup of re
g
isters
T, C, D
Note: 7 consecutive devices are used.
TRD, TRDP:
5 steps
Device Meaning Values Device Meaning
D8018 Year 00-99
D
+0
Year
D8017 Month 01-12
D
+1
Month
D8016 Date 01-31
D
+2
Date
D8015 Hours 00-23
D
+3
Hours
D8014 Minutes 00-59
D
+4
Minutes
D8013 Seconds 00-59
D
+5
Seconds
D8019 Da
y
0-6 (Sun-Sat)
D
+6
Da
y
M34
D12TRD
[ D ]
M8002
K2000 D8018
MOV
If this is done then the clock
y
ear should not be used durin
g
the first scan as it will be a two
di
g
it number before the instruction and a value of 2000 after the instruction until the END
instruction executes. After the first scan the
y
ear is read and written as a 4 di
g
it number.
The FX-10DU-E, FX-20DU-E and FX-25DU-E onl
y
support a 2 di
g
it
y
ear.