Download Print this page

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

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

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)
FBD/LD
EN
ENO
s
d
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
EN
Execution condition
ENO
Execution result
■Applicable devices
Operand
Bit
X, Y, M, L, SM,
F, B, SB, S
(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).
(s)+1
(s)
(0 to 117964799)
second
Ex.
When specifying 45325 seconds in (s)
(s)+1
(s)
45325
8 APPLICATION INSTRUCTION
700
8.24 Clock Instruction
(d)
Word
T, ST, C, D, 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
hour
(0 to 32767)
minute
(0 to 59)
second
(0 to 59)
Data type
32-bit signed binary
16-bit signed binary
Bit
Bit
Constant
specification
LZ
K, H
Data type (label)
ANY32
ANY16_ARRAY
(Number of elements: 3)
BOOL
BOOL
Others
E
$

Hide quick links:

Advertisement

loading