Rockwell Automation Publication 1756-RM003N-EN-P - October 2011 253
Compare Instructions (CMP, EQU, GEQ, GRT, LEQ, LES, LIM, MEQ, NEQ) Chapter 5
FBD_MASK_EQUAL Structure
Description: A ‘1’ in the mask means the data bit is passed. A ‘0’ in the mask means the data bit
is blocked. Typically, the Source, Mask, and Compare values are all the same data
type.
If you mix integer data types, the instruction fills the upper bits of the smaller
integer data types with 0s so that they are the same size as the largest data type.
Entering an Immediate Mask Value
When you enter a mask, the programming software defaults to decimal values. If
you want to enter a mask by using another format, precede the value with the
correct prefix.
Input Parameter Data Type Description
EnableIn BOOL If cleared, the instruction does not execute and outputs are not updated.
If set, the instruction executes as described under Execution.
Default is set.
Source DINT Value to test against Compare.
Valid = any integer
Mask DINT Defines which bits to block (mask).
Valid = any integer
Compare DINT Compare value.
Valid = any integer
Output Parameter Data Type Description
EnableOut BOOL The instruction produced a valid result.
Dest BOOL Result of the instruction. This is equivalent to rung-condition-out for the relay ladder
MEQ instruction.
Prefix Description
16# Hexadecimal
For example; 16#0F0F
8# Octal
For example; 8#16
2# Binary
For example; 2#00110011