Mitsubishi Electronics FX3G User Manual

Page of 964
575
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
21 Real Time Clock Control – FNC160 to FNC169
21.7 FNC166 – TRD / Read RTC data
21
FNC160
-F
NC1
69
R
eal
 T
ime C
lock
 
C
ontrol
22
FNC17
0-F
NC
179
E
xternal D
evice
23
FNC
180
Alternate 
Instructions
24
FN
C181-
FNC18
9
O
thers
25
FNC190
-F
NC1
99
Bl
oc
k D
ata
 
Op
er
ation
26
FNC20
0-F
NC209
C
har
ac
te
r S
trin
Con
tro
l
27
FNC2
10-
FNC21
9
Dat
Operati
on 3
28
FNC220
-F
NC2
49
Da
ta 
C
omp
ari
son
29
FNC25
0-F
N
C
269
D
ata T
abl
Operation
30
FNC2
70-
FNC276
Ex
-Dev
ice
21.7
FNC166 – TRD / Read RTC data
Outline
This instruction reads the clock data of the built-in PLC real time clock.
1. Instruction format
2. Set data
3. Applicable devices
S1: This function is supported only in FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 PLCs.
S2: This function is supported only in FX
3U
/FX
3UC
 PLCs.
Explanation of function and operation
1. 16-bit operation (TRD)
The clock data stored in D8013 to D8019 of the built-in PLC real time clock is read in the following format, and stored
to  
to +6.
This instruction reads the real time clock data in a PLC, and transfers it to seven
data registers.
Caution
1. Number of occupied devices
Seven devices are occupied by 
.
Make sure that these devices are not used in other controls for the machine.
Operand type
Description
Data type
Specifies the head device number storing the clock data.  
(Seven devices are occupied.)
16-bit binary
Oper-
and 
Type
Bit Devices
Word Devices
Others
System User
Digit Specification
System User
Special 
Unit
Index
Con-
stant
Real 
Number
Charac-
ter String
Pointer
X Y M T C S D .b KnX KnY KnM KnS T C D
R
U \G
V Z Modify K H
E
" "
P
S1
S2
Device
Item
Clock data
Device
Item
S
p
ec
ial
 d
at
re
gi
st
er
D8018
Year
0 to 99
(lower two digits)
D 0
Year
D8017
Month
1 to 12
D 1
Month
D8016
Day
1 to 31
D 2
Day
D8015
Hour
0 to 23
D 3
Hour
D8014
Minute
0 to 59
 D 4
Minute
D8013
Second
0 to 59
D 5
Second
D8019
Day of week
0 (Sunday) to
6 (Saturday)
D 6
Day of week
P
FNC 166
TRD
Mnemonic
Operation Condition
16-bit Instruction
3 steps TRD
TRDP
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
32-bit Instruction
  D
S
2
 ‚
  D
   
D
   
D
Command
input
FNC166
TRD
   
D