Mitsubishi Electric MELSEC FX3U Programming Manual page 599

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 (DHTOS and DHTOSP)
The time data (hour, minute, and second) stored in
units of "second", and stored to
Command
input
FNC164
DHTOS
S
hour
S
+1
minute
S
+2
second
For example, when "35 hours 10 minutes 58 seconds" is specified, the operation is as follows:
S
35
S
+1
10
S
+2
58
Error
An operation error is caused in the following case; The error flag M8067 turns ON, and the error code is
stored in D8067.
• When the data of
Program example
In the program shown below, the time data read from the real time clock built in a PLC is converted into data
in units of "second", and stored to D100 and D101 when X020 turns ON.
X020
Operation
• Clock data reading operation by TRD (FNC166) instruction
Real time
clock
• Conversion operation into "second" by DHTOS (FNC164) instruction
D13
20
D14
21
D15
23
+1,
.
D
D
S
D
D
+1
(0 to 32767)
(0 to 59)
second
(0 to 59)
D
+1
126658
,
+ 1 or
+ 2 is outside the allowable range (error code: K6706)
S
S
S
FNC166
D10
TRD
FNC164
D13
D100
DHTOS
END
D10
2004
Year
D11
1
Month
D12
31
Day
D13
20
Hour
D14
21
Minute
D15
23
Second
D16
6
Day of week
D101,D100
73283
21 Real Time Clock Control – FNC160 to FNC169
21.5 FNC164 – HTOS / Hour to Second Conversion
,
+1, and
+2 is converted into data in
S
S
S
D
D
Clock data
Time data
21
22
23
24
25
26
27
28
29
30
597

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents