Converting Time Data From Seconds To Hour/Minute/Second In 32 Bits - Mitsubishi MELSEC iQ-F FX5 series Programming Manual

Melsec iq-f fx5 series
Hide thumbs Also See for MELSEC iQ-F FX5 series:
Table of Contents

Advertisement

Converting time data from seconds to hour/minute/second in 32
bits
DSTOH(P)
These instructions convert the 32-bit time value in seconds stored in the device numbers starting from (s) to the time value in
the HHMMDD format, and store the converted data in the device numbers starting from (d).
Ladder diagram
(s)
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s)
Head device number where the clock data before conversion is
stored
(d)
Head device number where the clock data after conversion is
stored
■Applicable devices
Operand
Bit
X, Y, M, L,
SM, F, B, SB
(s)
(d)
Processing details
• These instructions convert the time value in seconds stored in the device numbers starting from (s) to the time value in
HHMMDD format, and store the converted data in the device numbers starting from (d).
Data range
(s)+1
(s)
(0 to 117964799)
Second
Ex.
When specifying 45325 seconds in (s)
(s)+1
(s)
45325
Operation error
Error code
Description
(SD0/SD8067)
2820
The specified device area exceeds the corresponding device range.
3405
The value specified by (s) is outside the range.
7 APPLICATION INSTRUCTION
590
7.19 Clock instruction
(d)
Word
U\G T, ST,
T, ST, C, D,
C, LC
W, SD, SW, R
(d)
(d)+1
(d)+2
12
(d)
(d)+1
35
25
(d)+2
Structured text
ENO:=DSTOH(EN,s,d);
ENO:=DSTOHP(EN,s,d);
Range
Double word Indirect
U\G
Z
LC
Data range
Hour
(0 to 32767)
Minute
(0 to 59)
Second
(0 to 59)
Data type
Data type (label)
32-bit signed binary
ANY32
16-bit signed binary
ANY16
Constant
specification
LZ
K, H
Others
E
$

Advertisement

Table of Contents
loading

Table of Contents