Cps/Cpsl - Omron SYSMAC CP Series Instruction & Reference Manual

Cpu unit
Hide thumbs Also See for SYSMAC CP Series:
Table of Contents

Advertisement

2 Instructions

CPS/CPSL

Instruction
SIGNED BINARY COMPARE
DOUBLE SIGNED BINARY
COMPARE
Symbol
Applicable Program Areas
Area
Usage
Operands
Operand
CMP: Comparison data 1
S1
CMPL: Comparison data 1, rightmost word address
CMP: Comparison data 2
S2
CMPL: Comparison data 2, rightmost word address
Operand Specifications
Area
CIO
WR
S1, S2
OK
OK
Flags
Name
Error Flag
Greater Than Flag
Greater Than or Equal Flag
Equal Flag
Not Equal Flag
Less Than Flag
Less Than or Equal Flag
Negative Flag
2-98
Mnemonic
Variations
CPS
!CPS
CPSL
---
CPS
CPS(114)
S
: Comparison data 1
S
1
1
S
: Comparison data 2
2
S
2
Step program areas
OK
Description
Word addresses
HR
AR
T
C
DM
OK
OK
OK
OK
OK
Label
P_ER
Unchanged
P_GT
• ON if S
> S
.
1
2
• OFF in all other cases.
≥ S
P_GE
• ON if S
.
1
2
• OFF in all other cases.
P_EQ
• ON if S
= S
.
1
2
• OFF in all other cases.
≠ S
P_NE
• ON if S
.
1
2
• OFF in all other cases.
P_LT
• ON if S
< S
.
1
2
• OFF in all other cases.
≤ S
P_LE
• ON if S
.
1
2
• OFF in all other cases.
P_N
Unchanged
Function
code
Compares two signed binary values (constants
and/or the contents of specified words) and out-
114
puts the result to the Arithmetic Flags in the Auxil-
iary Area.
Compares two double signed binary values (con-
stants and/or the contents of specified words) and
115
outputs the result to the Arithmetic Flags in the
Auxiliary Area.
Subroutines
OK
Data type
CPS
CPSL
INT
DINT
INT
DINT
Indirect DM addresses
@DM
*DM
OK
OK
Operation
CPS
OFF or unchanged
• ON if S
• OFF in all other cases.
• ON if S
• OFF in all other cases.
• ON if S
• OFF in all other cases.
• ON if S
• OFF in all other cases.
• ON if S
• OFF in all other cases.
• ON if S
• OFF in all other cases.
OFF or unchanged
CP1E CPU Unit Instructions Reference Manual(W483)
Function
CPSL
CPSL(115)
S
: Comparison data 1
S
1
1
S
: Comparison data 2
2
S
2
Interrupt tasks
OK
Size
CPS
CPSL
1
2
1
2
Pulse
Constants
CF
bits
OK
---
---
CPSL
+1, S
> S
+1, S
.
1
1
2
2
≥ S
+1, S
+1, S
.
1
1
2
2
+1, S
= S
+1, S
.
1
1
2
2
≠ S
+1, S
+1, S
.
1
1
2
2
+1, S
< S
+1, S
.
1
1
2
2
≤ S
+1, S
+1, S
.
1
1
2
2
TR
bits
---

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents