Mitsubishi Electric FX3G SERIES Programming Manual page 575

Programmable controllers
Hide thumbs Also See for FX3G SERIES:
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
"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 built-in PLC real time clock 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
D
+1,
D
.
S
D
D
(0 to 32767)
(0 to 59)
(0 to 59)
D
S
,
S
+ 1 or
S
+ 2 is outside the allowable range (error code: K6706)
FNC166
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
S
,
S
+1, and
S
+1
D
second
+1
D
126658
D10
Clock data
Time data
+2 is converted into data in units of
21
22
23
24
25
26
27
28
29
30
573

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3uc series

Table of Contents