AND_MASK
Integer AND bit-to-bit mask.

Arguments | |||
---|---|---|---|
IN | IN | DINT | Must have integer format |
MSK | MSK | DINT | Must have integer format |
AND_MASK | Q | DINT | Bit-to-bit logical AND between IN and MSK |
Example
(* FBD example with AND_MASK Operators *)

(* ST Equivalence: *)
parity := AND_MASK (xvalue, 1); (* 1 if xvalue is odd *) result := AND_MASK (16#abc, 16#f0f); (* equals 16#a0c *)
Provide Feedback