1011
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Clock Instructions
3
HMS
HMS
Applicable Program Areas
Operands
S and S+1: Source Data (seconds)
D and D+1: Result Data (hours/minutes/seconds)
Note S, S+1, D and D+1 must be in the same data area.
Instruction Mnemonic Variations
Function
code
Function
SECONDS TO HOURS HMS @HMS 066
Converts seconds data to an equivalent time in
hours/minutes/seconds format.
Symbol
HMS
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or
transition programs
Usage OK OK OK OK OK OK
Operand Description Data type Size
S First source word DWORD 2
D First destination word DWORD 2
S: First source word
D: First destination word
HMS(066)
S
D
15 0
S
15 0
S
+1
Rightmost 4 digits
Seconds: 0000 to 9999 (BCD)
Leftmost 4 digits
Seconds: 0000 to 3599 (BCD)
15 8 07
D
15 0
D+1
Seconds: 00 to 59 (BCD)
Minutes: 00 to 59 (BCD)
Hours: 0000 to 9999 (BCD)