553
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
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
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
Содержание FX3U Series
Страница 1: ...PROGRAMMING MANUAL Basic Applied Instructions Edition FX3U FX3UC SERIES PROGRAMMABLE CONTROLLERS ...
Страница 2: ......
Страница 889: ......