272
4
4 Instructions4.8.3 Clock Conversion
STOH: Conversion from seconds to hours:minutes:seconds format
◆
Overview
The STOH instruction converts time values represented in seconds to the
hours:minutes:seconds
format.
STOH
S D
Conversion from seconds
to hours:minutes:seconds
format
Applicable model:
H3U
S
Source
data
Number of the element that stores a time value
represented in seconds
16-bit instruction (5
steps)
STOH: Continuous
execution
STOHP: Pulse
execution
32-bit instruction (9
steps)
DSTOH: Continuous
execution
DSTOHP: Pulse
execution
D Result
Start number of elements that store the time in
hours:minutes:seconds
format after conversion
◆
Operands
Operand
Bit Element Word Element
System·User System·User Bit Designation Indexed Address Constant
Real
Number
S X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
D X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
Note: The elements in gray background are supported.
◆
Function
1) 16-bit Instruction
The time value represented in seconds stored in [S] is converted to the
hours:minutes:seconds
format.
The result is stored in [D, D+1, D+2].
The value in [S] ranges from 0 to 32,767.
2) 32-bit Instruction
The time value represented in seconds stored in [S, S+1] is converted to the
hours:minutes:seconds
format. The result is stored in [D, D+1, D+2].
The value in [S, S+1] ranges from 0 to 117,964,799.
In 16- and 32-bit operations, an error occurs in the following conditions. The instruction is not executed and
the error code is stored in D8067.
• Error 6705 is returned when the operands are out of range.
• Error 6706 is returned when the number of seconds to be converted is out of range.