Mitsubishi Electric MELSEC FX3U Programming Manual page 601

Melsec fx series programmable logic controllers
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
2. 32-bit operation (DSTOH and DSTOHP)
The time data in units of "second" stored in
minute, and second", and stored to three devices
Command
input
FNC165
DSTOH
S
+1
S
Second
For example, when "45,325 seconds" is specified, the operation is as follows:
S
+1
S
45325
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
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.
X020
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)
D1,D0
40000
S
D
(0 to 117964799)
D
12
D
+1
35
D
+2
25
is outside the allowable range (error code: K6706)
S
FNC165
D0
DSTOH
D100
D101
D102
21 Real Time Clock Control – FNC160 to FNC169
21.6 FNC165 – STOH / Second to Hour Conversion
+1 and
is converted into data in units of "hour,
S
S
,
+1, and
D
D
D
D
Hour
(0 to 32767)
D
+1
Minute
(0 to 59)
D
+2
Second
(0 to 59)
D100
END
11
6
40
+2 (hour, minute, and second).
599
21
22
23
24
25
26
27
28
29
30

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents