547
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
21 Real Time Clock Control – FNC160 to FNC169
21.3 FNC162 – TADD / RTC Data Addition
21
FN
C
160-FN
C
169
R
eal
Ti
m
e
C
loc
k
C
ont
ro
l
22
FN
C
170
-F
N
C
17
9
E
xt
e
rnal
D
evi
ce
23
FN
C
180
Su
b
st.
I
n
str
. I
n
fo
24
FN
C
181-FN
C
189
O
ther
s
25
FN
C
190-FN
C
19
9
B
loc
k D
a
ta
O
per
at
io
n
26
FN
C
200-FN
C
209
C
har
act
e
r St
ring
C
ont
ro
l
27
F
N
C2
10
-F
NC
21
9
Da
ta
O
per
at
ion 3
28
FN
C
220-FN
C
24
9
Da
ta
Co
m
p
a
ris
o
n
29
FN
C
250-FN
C
269
Da
ta
T
a
b
le
O
per
at
io
n
30
FN
C
27
0-F
N
C
274
Ex
-D
ev
ic
e
In
ve
rte
r C
o
mm
s
Cautions
1) Number of occupied devices
Three devices are occupied by
,
and
respectively.
Make sure that these devices are not used in other controls for the machine.
2) When utilizing the time (hour, minute, and second) of the real time clock built in a PLC
Read the values of special data registers using the TRD (FNC166) instruction, and then specify those
word devices as the operands.
Program example
When the operation result exceeds 24 hours
S
1
S
2
D
X000
FNC162
TADD
D 10
D 20
D 30
S
1
S
2
D
( D10 ,D11 ,D12)+(D20 ,D21 ,D22)
→
( D30 ,D31,D32)
+
S
1
+1 30 (minute)
10 (hour)
+2 10 (second)
S
1
S
1
S
2
+1 10 (minute)
3 (hour)
+2 5 (second)
S
2
S
2
D
+1 40 (minute)
13 (hour)
+2 15 (second)
D
D
→
10:30:10
3:10:5
13:40:15
+
S
1
10 (minute)
18 (hour)
30 (second)
S
2
20 (minute)
10 (hour)
5 (second)
D
30 (minute)
4 (hour)
35 (second)
→
4:30:35
10:20:5
18:10:30
←
18+10=28(
≥
24)