Masked comparison for equal (meq), Entering parameters, Entering the instruction – Rockwell Automation 1761-HHP-B30 MicroLogix 1000 with Hand-Held Programmer (HHP) User Manual
Page 160

Chapter 9
Using Comparison Instructions
9–9
Use the MEQ instruction to compare data of a source address with data of a
reference address. Use of this instruction allows portions of the data to be
masked by a separate word.
Entering Parameters
•
Source is the address of the value you want to compare.
•
Mask is the address of the mask through which the instruction moves
data. The mask can be a hexadecimal value (constant).
•
Compare is an integer value or the address of the reference.
If the 16 bits of data at the source address are equal to the 16 bits of data at
the compare address (less masked bits), the instruction is true. The
instruction becomes false as soon as it detects a mismatch. Bits in the mask
word mask data when reset; they pass data when set.
Entering the Instruction
HHP Display
Mnemonic
Function
Code
Use This Instruction When the Input:
MEQ
LD MEQ
68
appears first on a rung or block
MEQ
AND MEQ
69
is placed in series with any previous input
instruction in the current rung or block
MEQ
OR MEQ
70
is placed in parallel with any previous in-
put instruction in the current rung or block
You enter the instruction from within the program monitor functional area.
The example below shows how to enter the LD MEQ instruction. Use the
same procedure to enter the other MEQ instructions, only substitute the
function code with one from the table above.
P 0 0 0
M E Q
S R C
N 1 1
0
P 0 0 0
M E Q
M A S K
0 0 0 0 H
P 0 0 0
M E Q
C O M P
1 0 0
28.79
False
28.39
True
7.69
LD MEQ
8.09
AND MEQ
28.79
8.09
OR MEQ
MEQ
MASKED EQUAL
Source
N7:11
Mask
0000H
Compare
100
Execution Times (
µ
sec) when:
Ladder representation:
Masked Comparison for Equal
(MEQ)
8
To enter the function code, press:
ENT
6
FUN