X: EXCLUSIVE OR logic operation (S7-1200, S7-1500) - STEP 7

FBD (S7-1200, S7-1500)

ft:publication_title
FBD (S7-1200, S7-1500)
Product
STEP 7
Version
V20
Publication date
11/2024
Language
en-US
X: EXCLUSIVE OR logic operation

Description

You can use the "EXCLUSIVE OR logic operation" instruction to query the result of a signal state query according to the EXCLUSIVE OR truth table.

With an "EXCLUSIVE OR logic operation" instruction, the signal state is "1" when the signal state of one of the two specified operands is "1". When more than two operands are queried, the common RLO is "1" if an odd number of the queried operands returns the result "1".

Parameters

The following table shows the parameters of the instruction "EXCLUSIVE OR logic operation":

Parameters

Declaration

Data type

Memory area

Description

S7-1200

S7-1500

<Operand>

Input

BOOL

I, Q, M, D, L or constant

I, Q, M, D, L, T, C or constant

The operand indicates the bit whose signal state will be queried.

Example

The following example shows how the instruction works:

The "TagOut" output is set, when the signal state of either operand "TagIn_1" or "TagIn_2" is "1". When both operands return the signal state "1" or "0", the output "TagOut" is reset.