![Mitsubishi Electric MELSEC FX3G Скачать руководство пользователя страница 597](http://html.mh-extra.com/html/mitsubishi-electric/melsec-fx3g/melsec-fx3g_programming-manual_239083597.webp)
595
FX
3G
/FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
21 Real Time Clock Control – FNC160 to FNC169
21.4 FNC163 – TSUB / RTC Data Subtraction
21
FN
C
160-
FN
C
169
R
eal T
im
e C
lo
ck
C
ont
ro
l
22
FN
C
170-
FN
C
179
Exter
nal D
ev
ice
23
FN
C
180
Al
ter
nate
In
str
uc
tions
24
FN
C
181-
FN
C
189
O
ther
s
25
FN
C
190-
FN
C
199
B
lock D
ata
O
per
at
ion
26
FN
C
200
-F
N
C
20
9
C
har
acter
S
tring
C
ont
ro
l
27
FN
C
210-
FN
C
219
Da
ta
O
per
ation 3
28
FN
C
220-
FN
C
249
Da
ta
C
om
par
ison
29
FN
C
250
-F
N
C
26
9
D
ata T
abl
e
O
per
ati
on
30
FN
C
270-
FN
C
274
Ex
-D
ev
ice
Inv
ert
er
Com
m
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 TRD (FNC166) instruction, and then specify those word
devices as the operands.
Program example
When the operation result is smaller than "00:00:00"
S
1
S
2
D
X000
FNC163
TSUB
D 10
D 20
D 30
S
1
S
2
D
−
D 11 30 (minute)
D 10 10 (hour)
D 12 10 (second)
D 21 10 (minute)
D 20 3 (hour)
D 22 5 (second)
D 31 20 (minute)
D 30 7 (hour)
D 32 5 (second)
→
10:30:10
3:10:5
7:20:5
( D10, D11, D12)
−
(D20, D21, D22)
→
( D30, D31, D32)
−
S
1
20 (minute)
5 (hour)
40 (second)
S
2
10 (minute)
18 (hour)
5 (second)
D
10 (minute)
11 (hour)
35 (second)
→
11:10:35
18:10:5
5:20:40
←
5
−
18=
−
13 (<0)