beautypg.com

Rockwell Automation 1785-Lxxx Enhanced and Ethernet PLC-5 Programmable Controllers User Manual

Page 306

background image

Publication 1785-UM012D-EN-P - July 2005

D-6 Instruction Set Quick Reference

Instruction

Description

Compare
CMP

If the expression is true, this input instruction is true. The CMP
instruction can perform these operations: equal (=), less than
(<), less than or equal (<=), greater than (>), greater than or
equal (>=), not equal (<>), and complex expressions (up to 80
characters).

Equal to
EQU

If the value in Source A (N7:5) is = to the value in Source B
(N7:10), this instruction is true.

Greater than or Equal
GEQ

If the value in Source A (N7:5) is > or = the value in Source B
(N7:10), this instruction is true.

Greater than
GRT

If the value in Source A (N7:5) is > the value in Source B
(N7:10), this instruction is true.

Less than or Equal
LEQ

If the value in Source A (N7:5) is < or = the value in Source B
(N7:10), this instruction is true.

Less than
LES

If the value in Source A (N7:5) is < the value in Source B
(N7:10), this instruction is true.

Not Equal
NEQ

If the value in Source A (N7:5) is not equal to the value in
Source B (N7:10), this instruction is true.

CMP

COMPARE

Expression
N7:5 = N7:10

xxx

xxxxxxxxxxxxx

Source A

Source B

N7:5

N7:10

3

1

Source A

EQU

10

5

21

-30

Source B

-15

10

6

20

-31

-14

GEQ

GRT

LEQ

LES

NEQ

T

F

F

F

F

T

F

T

T

F

F

F

T

T

F

T

T

F

F

T

F

T

F

F

T

F

T

T

T

T