Converting Time Data From Seconds To Hour/Minute/Second In 16 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 16
bits
STOH(P)
These instructions convert the 16-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)
(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
■Applicable devices
Operand
Bit
X, Y, M, L,
U\G T, ST,
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)
(0 to 32767)
Second
Ex.
When specifying 29011 seconds in (s)
(s)
(d)
(d)+1
29011
(d)+2
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.
Word
T, ST, C, D,
U\G
C, LC
W, SD, SW, R
Data range
(d)
Hour
(0 to 9)
(d)+1
Minute
(0 to 59)
(d)+2
Second
(0 to 59)
8
3
31
Structured text
ENO:=STOH(EN,s,d);
ENO:=STOHP(EN,s,d);
Range
Data type
16-bit signed binary
16-bit signed binary
Double word Indirect
specification
Z
LC
LZ
7 APPLICATION INSTRUCTION
Data type (label)
ANY16
ANY16
Constant
Others
K, H
E
$
589
7.19 Clock instruction
7

Advertisement

Table of Contents
loading

Table of Contents