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

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
SEC(065) converts the 8-digit BCD hours/minutes/seconds data in S
and S+1 to 8-digit BCD seconds-only data and outputs the result to D
and D+1.
The maximum value for the source data is 9,999 hours, 59 minutes,
and 59 seconds (35,999,999 seconds).
Sample program
When CIO 0.00 turns ON in the following example, the hours/minutes/seconds data in D200 and D201
(34 hours, 17 minutes, and 36 seconds) is converted to seconds-only data and the result is output to
D100 and D101.
0.00
CS/CJ/NSJ Series Instructions Reference Manual (W474)
AR
T
C
DM
EM
OK
OK
OK
OK
OK
Label
ER
• ON when S+1 (time data) is not BCD data
• ON if the minutes data in S (bits 08 to 15) is not BCD and in the range 00 to 59.
• ON if the seconds data in S (bits 00 to 07) is not BCD and in the range 00 to 59.
• OFF in all other cases.
=
• ON if the content of D is 0000 after the operation.
• OFF in all other cases.
D100
S:
D200
D200
D201
D:
D100
D101
Indirect DM/EM
addresses
Con-
stants
@DM
*DM
DR
@EM
*EM
OK
OK
OK
---
---
Operation
17 minutes, 36 seconds
34 hours
Hours/minutes/seconds
123,456 seconds
3. Instructions
Registers
Flags
Pulse
bits
Indirect
IR
TK
CF
using IR
---
OK
---
---
Minutes
Seconds
Hours
Seconds
seconds
TR
bits
---
---
3
963

Advertisement

Table of Contents
loading

Table of Contents