Bit Or function block provides the bitwise output by performing logical OR operation bitwise between input In and Mask value.
Operator compares each binary digit across two integers and gives back "1", if either of inputs are "1". If not, it returns to "0".
Figure 1: BitOr-Function Block |
Figure 2: BitOr-Property Sheet |
If In or Mask = "null", Out and EqZero = "null". If Enable = "false", Out = In and EqZero = "false".
Figure 3: BitOr-Logic Diagram
Input
Input Name |
Description |
Enable |
This is a Boolean point. If it is set to set to "true", it enables the function block. |
In |
Integer value. |
Mask (In & Par) |
Integer value. |
Table 1:Inputs of BitOr Function
Output
Output Name |
Description |
Out |
Out = In BitOr Mask |
Out Equal Zero |
If Out is zero, Out Equal Zero is "true" |
Table 2:Outputs of BitOr Function
Parameter
Parameter Name |
Description |
Mask Par (In & Par) |
If Mask is "null" or not connected, Mask Par is used as parameter. |
Out Save |
Master Sync Enabled : If you set it to "true" the last output will be set as output for one cycle after the controller restarts. The application can use it to return to the same state before the controller restart. Out: To enable or disable the Out Save feature. Out Equal Zero:To enable or disable the Out Equal Zero feature. |
Table 3:Parameter of BitOr Function
Examples
1. In is "6" and Mask is "5".
Name of the inputs and output |
Float |
Binary |
||
In |
6 |
1 |
1 |
0 |
Mask |
5 |
1 |
0 |
1 |
Out |
7 |
1 |
1 |
1 |
Output Equal Zero |
false |
|
Figure 4: Example-In "6" and Mask "5"
2. In is "0" and Mask is "0"
Name of the inputs and output |
Float |
Binary |
||
In |
0 |
0 |
0 |
0 |
Mask |
0 |
0 |
0 |
0 |
Out |
0 |
0 |
0 |
0 |
Output Equal Zero |
true |
|
Figure 5: Example-In "0" and Mask "0"
3. In is "4" and Mask is "3". Enable is set to "false".
Figure 6: Example-In "4"and Mask "3"
Refer to General Description for general information about IRMN4 Function Blocks.