Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 1002

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

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).
Sample program
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
CS/CJ/NSJ Series Instructions Reference Manual (W474)
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
3. Instructions
Registers
Flags
Pulse
bits
Indirect
IR
TK
CF
using IR
---
OK
---
---
Seconds
Minutes
Seconds
Hours
TR
bits
---
---
3
965

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 and is the answer not in the manual?

Questions and answers

Table of Contents