beautypg.com

Equal (equ), Not equal (neq), Less than (les) – Rockwell Automation 1761 MicroLogix 1000 Programmable Controllers User Manual

Page 125: Programming

background image

Using Comparison Instructions

7–3

Equal (EQU)

Use the EQU instruction to test whether two values are equal. If source A and
source B are equal, the instruction is logically true. If these values are not equal, the
instruction is logically false.

Source A must be a word address. Source B can be either a constant or word
address. Negative integers are stored in two’s complement form.

Not Equal (NEQ)

Use the NEQ instruction to test whether two values are not equal. If source A and
source B are not equal, the instruction is logically true. If the two values are equal,
the instruction is logically false.

Source A must be a word address. Source B can be either a constant or word
address. Negative integers are stored in two’s complement form.

Less Than (LES)

Use the LES instruction to test whether one value (source A) is less than another
(source B). If the value at source A is less than the value of source B the instruction
is logically true. If the value at source A is greater than or equal to the value of
source B, the instruction is logically false.

Source A must be a word address. Source B can be either a constant or word
address. Negative integers are stored in two’s complement form.

Programming

Execution Times

(

µ

sec) when:

True

False

21.52

6.60

EQU

EQUAL
Source A

Source B

Execution Times

(

µ

sec) when:

True

False

21.52

6.60

NEQ

NOT EQUAL
Source A

Source B

True

False

23.60

6.60

Execution Times

(

µ

sec) when:

LES

LESS THAN
Source A

Source B