PLC Programming Comparison Instructions – MEQ | Masked Equal

The MEQ, also known as the Masked Equals, is an instruction which will perform a similar function to the EQU (Equals) Instruction, with one key difference: a mask is applied to the compared bits. This instruction will take three operands: two which will be compared and a mask which needs to be applied. A mask is a key element of programming which boils down to selecting which bits need to be processed by the controller. In the case of the MEQ instruction, only the bits which have been masked as HIGH will be compared. Should those bits be the same within the two other operands, the instruction will evaluate to TRUE.


This is a companion discussion topic for the original entry at https://www.solisplc.com/tutorials/plc-programming-comparison-instructions-meq-masked-equal