Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 250

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Comparison Instructions
Operand Specifications
Description
Area
CIO Area
CIO 0 to CIO 6143 CIO 0 to CIO 6141 CIO 0 to CIO 6142
Work Area
W0 to W511
Holding Bit Area
H0 to H511
Auxiliary Bit Area
A448 to A959
Timer Area
T0000 to T4095
Counter Area
C0000 to C4095
DM Area
D0 to D32767
Indirect DM
---
addresses in binary
Indirect DM
---
addresses in BCD
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
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
Comparison
S
1
Result
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.
C
W0 to W509
H0 to H509
A0 to A957
T0000 to T4093
C0000 to C4093
D0 to D32765
@ D0 to @ D32767
*D0 to *D32767
to S
+2 and creates an ON execution condition when
2
Flag status
<>
<
OFF
OFF
ON
ON
OFF
OFF
ON
ON
ON
S
2
Conditions Flags
(=, <>, <, <=, >, >=)
Section 3-6
S
S
1
2
W0 to W510
H0 to H510
A0 to A958
T0000 to T4094
C0000 to C4094
D0 to D32766
to S
+2 with the com-
1
1
<=
>
>=
OFF
ON
ON
ON
OFF
OFF
217

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents