271
4
4 Instructions 4.8.3 Clock Conversion
◆
Function
1) 16-bit instruction
The time value in
hours:minutes:seconds
format stored in [S, S+1, S+2] is converted to seconds. The
result is stored in D.
Hours' range: 0 to 9
Minutes' range: 0 to 59
Seconds' range: 0 to 59
2) 32-bit instruction
The time value in
hours:minutes:seconds
format stored in [S, S+1, S+2] is converted to seconds. The
result is stored in [D, D+1].
Hours' range: 0 to 32,767
Minutes' range: 0 to 59
Seconds' range: 0 to 59
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 of the 16- and 32-bit instructions are out of range.
• Error 6706 is returned when the conversion result acquired by the 16-bit instruction is greater than 32,767.
• Error 6706 is returned when the time value in [S, S+1, S+2] is out of range.
◆
Application
The time value in
hours:minutes:seconds
format stored in D100, D101, and D102 is converted to
seconds. The result is stored in R100.