Documentation

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

Input Type Description
IN1.. ANY_BIT Input value

Outputs

Output Type Description
=> ANY_BIT Output value

Application example