Omron SYSMAC CS Series Instruction & Reference Manual page 972

Hide thumbs Also See for SYSMAC CS Series:
Table of Contents

Advertisement

3. Instructions
 Operand Specifications
Word addresses
Area
CIO
WR
HR
S
OK
OK
OK
D
Flags
Name
Error Flag
Equal Flag
Function
HMS(066) converts the 8-digit BCD seconds-only data in S and S+1
to 8-digit BCD hours/minutes/seconds data and outputs the result to
D and D+1.
The maximum value for the source data is 35,999,999 seconds
(9,999 hours, 59 minutes, and 59 seconds).
Example Programming
When CIO 0.00 turns ON in the following example, the seconds data in D100 and D101 (123,456
seconds) is converted to hours/minutes/seconds data and the result is output to D200 and D201.
0.00
938
AR
T
C
DM
EM
OK
OK
OK
OK
OK
Label
ER
• ON if the seconds data in S and S+1 is not BCD and in the range 0 to 35,999,999.
• OFF in all other cases.
=
• ON if the content of D is 0000 after the operation.
• OFF in all other cases.
D100
S:
D100
D200
D101
D:
D200
D201
Indirect DM/EM
addresses
Con-
stants
@DM
*DM
DR
@EM
*EM
OK
OK
OK
---
---
Operation
123,456 seconds
Seconds
Hours/minutes/seconds
17 minutes, 36 seconds
34 hours
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Registers
Flags
Pulse
bits
Indirect
IR
TK
CF
using IR
---
OK
---
---
Seconds
Minutes
Seconds
Hours
TR
bits
---
---

Advertisement

Table of Contents
loading

Table of Contents