Unsigned Compare: Cmp(028); Double Unsigned Compare: Cmpl(029) - Omron SYSMAC CVM1 Series Operation Manual

Duplex system
Hide thumbs Also See for SYSMAC CVM1 Series:
Table of Contents

Advertisement

Comparison Instructions

5-16-10 UNSIGNED COMPARE: CMP(028)

Ladder Symbol
(
)
028
CMP S
Variations
! CMP(028)
Description
Flags

5-16-11 DOUBLE UNSIGNED COMPARE: CMPL(029)

Ladder Symbol
(
)
029
CMPL S
1
Description
Flags
Example
Operand Data Areas
S
S
1
2
S
When the execution condition is OFF, CMP(028) is not executed. When the ex-
ecution condition is ON, CMP(028) compares constants and/or the contents of
specified words as unsigned 16-bit binary data and changes the status of com-
parison flags according to the results.
After CMP(028) execution, the A50005 (GR), A50006 (EQ), and A50007 (LE)
flags turn ON and OFF as shown in the following table.
Comparison result
S
> S
1
S
= S
1
S
< S
1
Note The immediate-refresh variation of CMP(028) can be used in simplex mode
only; it cannot be used in duplex mode.
ER (A50003):
GR (A40213), EQ (A50006), LE (A50007):
Operand Data Areas
S
: First comparison word 1
1
S
2
S
: First comparison word 2
2
When the execution condition is OFF, CMPL(029) is not executed. When the ex-
ecution condition is ON, CMPL(029) compares constants and/or the contents of
specified sets of words as unsigned 32-bit data and changes the status of com-
parison flags according to the results. The content of S
to that of S
and S
2
After CMPL(029) execution, the A50005 (GR), A50006 (EQ), and A50007 (LE)
flags turn ON and OFF as shown in the following table.
Comparison result
S
+ 1, S
> S
1
1
S
+ 1, S
= S
1
1
S
+ 1, S
< S
1
1
ER (A50003):
GR (A40213), EQ (A50006), LE (A50007):
When CIO 000000 is ON in the following example, the content of CIO 0011 and
CIO 0010 is compared with that of CIO 0009 and CIO 0008 as binary data.
• If the content of CIO 0011 and CIO 0010 is greater than that of CIO 0009 and
CIO 0008, then output CIO 002000 will turn ON.
: Comparison word 1
1
: Comparison word 2
2
A50005 (GR)
ON
2
OFF
2
OFF
2
Content of *DM word is not BCD when set for BCD.
+1.
2
A50005 (GR)
+ 1, S
ON
2
2
+ 1, S
OFF
2
2
+ 1, S
OFF
2
2
Content of *DM word is not BCD when set for BCD.
Section 5-16
CIO, G, A, T, C, #, DM, DR, IR
CIO, G, A, T, C, #, DM, DR, IR
A50006 (EQ)
A50007 (LE)
OFF
ON
OFF
(Refer to tables above.)
CIO, G, A, T, C, #, DM,
CIO, G, A, T, C, #, DM,
and S
+1 is compared
1
1
A50006 (EQ)
A50007 (LE)
OFF
ON
OFF
(Refer to tables above.)
OFF
OFF
ON
OFF
OFF
ON
205

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cv seriesSysmac cvm1d series

Table of Contents