EasyManuals Logo
Home>Omron>Controller>CJ - INSTRUCTIONS

Omron CJ - INSTRUCTIONS User Manual

Omron CJ - INSTRUCTIONS
1308 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #297 background imageLoading...
Page #297 background image
259
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Comparison Instructions
3
=DT, <>DT, <DT, <=DT, >DT, >=DT
Function
The time comparison instruction compares the unmasked values (corresponding bit of C set to 0) of the
present time data in S
1
to S
1
+2 with the comparison time data in S
2
to S
2
+2 and creates an ON
execution condition when the comparison condition is true. At the same time, the result of a time
comparison instruction is reflected in the arithmetic flags (=, <>, <, <=, >, >=).
The time comparison instructions are treated just like the LD, AND, and OR instructions to control the
execution of subsequent instructions.
There are 18 possible combinations of time comparison instructions.
Any time values that are masked in the control word (C) are not included in the comparison.
The following table shows the ON/OFF status of each flag for each comparison result.
z Masking Time Values
Time values can be masked individually and excluded from the comparison operation. To mask a time
value, set the corresponding bit in the control word (C) to 1. Bits 00 to 05 of C mask the seconds,
minutes, hours, day, month, and year, respectively.
Example:
When C = 39 hex, the rightmost 6 bits are 111001 (year=1, month=1, day=1, hours=0, minutes=0, and
seconds=1) so only the hours and minutes are compared. This mask setting can be used to perform a
particular operation at a given time (hour and minute) each day.
Hint
Previous data comparison instructions compared data in 16-bit units. The time comparison
instructions are limited to comparing 8-bit time values.
The following table shows the structure of the CPU Unit's internal Calendar/Clock Area.
The Calendar/Clock Area can be set with a Programming Device (including a Programming
Console), DATE(735) instruction, or “CLOCK WRITE” FINS command (0702 hex).
Result
Flag status
= <> < <= > >=
S
1
= S
2
ON OFF OFF ON OFF ON
S
1
> S
2
OFFON OFFOFFON ON
S
1
< S
2
OFFONONONOFFOFF
Addresses Contents
A351.00 to A351.07 Second (00 to 59, BCD)
A351.08 to A351.15 Minute (00 to 59, BCD)
A352.00 to A352.07 Hour (00 to 23, BCD)
A352.08 to A352.15 Day of month (01 to 31, BCD)
A353.00 to A353.07 Month (01 to 12, BCD)
A353.08 to A353.15 Year (00 to 99, BCD)
S
1
S
2
(=, <>, <, <=, >, >=)
Comparison
Result
Conditions Flags
00070815
S
1
S1+1
S
1+2
00070815
S
2
S2+1
S
2+2
Present time data Comparison time data
Compares only hours and
minutes data.
Year, month, day, and seconds
data is masked.
Second (00 to
59, BCD)
Second (00 to
59, BCD)
Minute (00 to
59, BCD)
Minute (00 to
59, BCD)
Hour (00 to
23, BCD)
Hour (00 to
23, BCD)
Day of month
(01 to 31, BCD)
Day of month
(01 to 31, BCD)
Month (01 to
12, BCD)
Month (01 to
12, BCD)
Year (00 to
99, BCD)
Year (00 to
99, BCD)

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CJ - INSTRUCTIONS and is the answer not in the manual?

Omron CJ - INSTRUCTIONS Specifications

General IconGeneral
BrandOmron
ModelCJ - INSTRUCTIONS
CategoryController
LanguageEnglish

Related product manuals