-

XOR / XOR_S

XOR_S

Type Function

Available as standard (non-safety-related) and safety-related type (*_S). For the safety-related type, the safety-related data types (SAFE*) are expected at the formal parameters.
Description Performs a logical XOR operation (exclusive OR) on the operands connected to IN1 and IN2. The output is TRUE if the inputs are not equivalent.

Truth table for the XOR function:

IN1IN21OUT
FALSEFALSE1FALSE
FALSETRUE1TRUE
TRUEFALSE1TRUE
TRUETRUE1FALSE
Notes
  • Further inputs can be added.
  • All parameters can be negated.

    Note: The negation of formal parameters is not supported in safety-related code (SNOLD).

  • The function provides implicit data type conversion at its input and output parameters according to the rules defined by the IEC 61131 standard.
Parameters Inputs

IN1

IN2

Output

OUT
Additional information EN/ENO behavior