OR_MASK (bit to bit OR mask)
Integer OR bit-to-bit mask, turns bits on.
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the
Micro810
, L20E, L50E, and L70E controllers.OR_MASK

Parameter | Parameter Type | Data Type | Description |
---|---|---|---|
EN | Input | BOOL | When set to true, the instruction is enabled.
|
IN | Input | DINT | Must have integer format. |
MSK | Input | DINT | Must have integer format. |
OR_MASK | Output | DINT | Bit-to-bit logical OR between IN and MSK. |
ENO | Output | BOOL | Enables output. Applies to ladder diagram programs. |
OR_MASK examples
OR_MASK function block diagram example

OR_MASK ladder diagram example

OR_MASK structured text examples

(* ST Equivalence: *) parity := OR_MASK (xvalue, 1); (* makes value always odd *) result := OR_MASK (16#abc, 16#f0f); (* equals 16#fbf *)
Results

Provide Feedback