beautypg.com

Cps/cpsl, Applicable program areas operands, Flags – Omron SYSMAC CP CP1E-N@@D@-@ User Manual

Page 134: 2 instructions, Operand specifications

background image

2 Instructions

2-98

CP1E CPU Unit Instructions Reference Manual(W483)

CPS/CPSL

Applicable Program Areas

Operands

Operand Specifications

Flags

Instruction

Mnemonic

Variations

Function

code

Function

SIGNED BINARY COMPARE

CPS

!CPS

114

Compares two signed binary values (constants
and/or the contents of specified words) and out-
puts the result to the Arithmetic Flags in the Auxil-
iary Area.

DOUBLE SIGNED BINARY
COMPARE

CPSL

---

115

Compares two double signed binary values (con-
stants and/or the contents of specified words) and
outputs the result to the Arithmetic Flags in the
Auxiliary Area.

Symbol

CPS

CPSL

Area

Step program areas

Subroutines

Interrupt tasks

Usage

OK

OK

OK

Operand

Description

Data type

Size

CPS

CPSL

CPS

CPSL

S1

CMP: Comparison data 1
CMPL: Comparison data 1, rightmost word address

INT

DINT

1

2

S2

CMP: Comparison data 2
CMPL: Comparison data 2, rightmost word address

INT

DINT

1

2

Area

Word addresses

Indirect DM addresses

Constants

CF

Pulse

bits

TR

bits

CIO

WR

HR

AR

T

C

DM

@DM

*DM

S1, S2

OK

OK

OK

OK

OK

OK

OK

OK

OK

OK

---

---

---

Name

Label

Operation

CPS

CPSL

Error Flag

P_ER

Unchanged

OFF or unchanged

Greater Than Flag

P_GT

ON if S

1

> S

2

.

OFF in all other cases.

ON if S

1

+1, S

1

> S

2

+1, S

2

.

OFF in all other cases.

Greater Than or Equal Flag

P_GE

ON if S

1

≥ S

2

.

OFF in all other cases.

ON if S

1

+1, S

1

≥ S

2

+1, S

2

.

OFF in all other cases.

Equal Flag

P_EQ

ON if S

1

= S

2

.

OFF in all other cases.

ON if S

1

+1, S

1

= S

2

+1, S

2

.

OFF in all other cases.

Not Equal Flag

P_NE

ON if S

1

≠ S

2

.

OFF in all other cases.

ON if S

1

+1, S

1

≠ S

2

+1, S

2

.

OFF in all other cases.

Less Than Flag

P_LT

ON if S

1

< S

2

.

OFF in all other cases.

ON if S

1

+1, S

1

< S

2

+1, S

2

.

OFF in all other cases.

Less Than or Equal Flag

P_LE

ON if S

1

≤ S

2

.

OFF in all other cases.

ON if S

1

+1, S

1

≤ S

2

+1, S

2

.

OFF in all other cases.

Negative Flag

P_N

Unchanged

OFF or unchanged

CPS(114)

S

1

S

2

S

1

: Comparison data 1

S

2

: Comparison data 2

CPSL(115)

S

1

S

2

S

1

: Comparison data 1

S

2

: Comparison data 2

This manual is related to the following products: