![Mitsubishi Electric FX3G SERIES Programming Manual Download Page 577](http://html.mh-extra.com/html/mitsubishi-electric/fx3g-series/fx3g-series_programming-manual_238902577.webp)
575
FX
3G
/FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
21 Real Time Clock Control – FNC160 to FNC169
21.6 FNC165 – STOH / Second to Hour Conversion
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
atio
n
26
FNC20
0-F
NC209
C
har
ac
te
r S
trin
g
Con
tro
l
27
FNC2
10-
FNC21
9
Dat
a
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
e
Operation
30
FNC2
70-
FNC275
Ex
-Dev
ice
Inverter C
om
m
s
2. 32-bit operation (DSTOH and DSTOHP)
The time data in units of "second" stored in
+1 and
is converted into data in units of "hour, minute, and
second", and stored to three devices
,
+1, and
+2 (hour, minute, and second).
For example, when "45,325 seconds" is specified, the operation is as follows:
Error
An operation error is caused in the following case; The error flag M8067 turns ON, and the error code is store in
D8067.
• When the data of
is outside the allowable range (error code: K6706)
Program example
In the program shown below, the time data in units of "second" stored in D0 and D1 is converted into data in units of
"hour, minute, and second", and stored to D100, D101, and D102 when X020 turns ON.
Operation
• Converting the data in second into the data in hour, minute and second using STOHP instruction
(when "40,000 seconds" is specified by D1 and D0)
S
S
D
D
D
Command
input
FNC165
DSTOH
S
D
Hour
Minute
Second
D
+1
+2
D
D
(0 to 32767)
(0 to 59)
(0 to 59)
S
Second
(0 to 117964799)
S
+1
12
35
25
D
+1
+2
D
D
S
45325
S
+1
S
X020
FNC165
DSTOH
D0
D100
END
11
6
40
40000
D1,D0
D100
D101
D102