Table of Contents

XOR

Function name

XOR

ST call

PROGRAM XOR
     VAR
       BOOL1,BOOL2,BOOL3: BOOL;
  END_VAR
    BOOL3:= BOOL1 XOR BOOL2;
END_PROGRAM

Description

Function calculates the exclusive disjunction of two or more inputs. Output is true if an odd number of inputs is in true.

Inputs

InputType Description
IN1..ANY_BITInput value

Outputs

OutputType Description
ANY_BITOutput value

Application example