Omron SYSMAC CJ - REFERENCE MANUAL 08-2008 Reference Manual page 340

Programmable controllers
Hide thumbs Also See for SYSMAC CJ - REFERENCE MANUAL 08-2008:
Table of Contents

Advertisement

Comparison Instructions
Description
300
Area
Constants
See previous page. See previous page. ---
Data Registers
---
Index Registers
---
Indirect addressing
,IR0 to ,IR15
using Index Registers
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
The time comparison instruction compares the unmasked values (corre-
sponding bit of C set to 0) of the present time data in S
parison time data in S
to S
2
the comparison condition is true. At the same time, the result of a time com-
parison instruction is reflected in the arithmetic flags (=, <>, <, <=, >, >=).
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 compari-
son result.
Result
=
S
= S
ON
1
2
S
> S
OFF
1
2
S
< S
OFF
1
2
S
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 com-
pared. This mask setting can be used to perform a particular operation at a
given time (hour and minute) each day.
C
+2 and creates an ON execution condition when
2
Flag status
<>
<
OFF
OFF
ON
ON
OFF
OFF
ON
ON
ON
Comparison
S
1
Conditions Flags
Result
(=, <>, <, <=, >, >=)
Section 3-7
S
S
1
2
to S
+2 with the com-
1
1
<=
>
>=
OFF
ON
ON
ON
OFF
OFF
2

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cs seriesSysmac one nsj seriesSysmac cj series

Table of Contents