217
Comparison Instructions Section 3-6
Operand Specifications
Description The time comparison instruction compares the unmasked values (corre-
sponding bit of C set to 0) of the present time data in S
1
to S
1
+2 with the com-
parison 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 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.
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.
Area C S
1
S
2
CIO Area CIO 0 to CIO 6143 CIO 0 to CIO 6141 CIO 0 to CIO 6142
Work Area W0 to W511 W0 to W509 W0 to W510
Holding Bit Area H0 to H511 H0 to H509 H0 to H510
Auxiliary Bit Area A448 to A959 A0 to A957 A0 to A958
Timer Area T0000 to T4095 T0000 to T4093 T0000 to T4094
Counter Area C0000 to C4095 C0000 to C4093 C0000 to C4094
DM Area D0 to D32767 D0 to D32765 D0 to D32766
Indirect DM
addresses in binary
--- @ D0 to @ D32767
Indirect DM
addresses in BCD
--- *D0 to *D32767
Constants See previous page. See previous page. ---
Data Registers ---
Index Registers ---
Indirect addressing
using Index Registers
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
Result Flag status
=<><<=>>=
S
1
= S
2
ON OFF OFF ON OFF ON
S
1
> S
2
OFF ON OFF OFF ON ON
S
1
< S
2
OFFONONONOFFOFF
S1 S2
(=, <>, <, <=, >, >=)
Comparison
Result
Conditions Flags