XOR block
Short summary
Name |
|
→POU type |
|
Category |
|
Conform to →IEC-standard |
no restrictions |
Graphical interface |
|
Available since |
|
Functionality
The block returns the result of a bitwise EXCLUSIVE-OR operation of all values connected to the inputs.
According to the table 31 of the →IEC-standard, the behavior of the statement XOR(a,b,c,d)
corresponds to the behavior of the statement a XOR b XOR c XOR d
. These statements are processed from left to right according to the priority of the operators in ST. Thus, first result = a XOR b
is evaluated, then result2 = result XOR c
and then endResult = result2 XOR d
.
Inputs, return value
|
Identifier |
Description |
|
---|---|---|---|
Inputs: |
|
|
1st value |
|
|
2nd value |
|
... (extensible until) |
|||
|
|
16th value |
|
Return value: |
– |
|
|
Input EN
and output ENO
are available when →calling the block. See "Execution control: EN, ENO" for information on input EN
and output ENO
.
See:
-
"Blocks for safe logic" whether this block is supported for developing safety-relevant applications.
-
"Highlighting safe logic in the FBD-editor" for the effects when using the block as a block for safe logic.
Example for usage within ST-editor
|
When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.