omron — XOR operator

XOR operator XOR operator Syntax ... XOR value ... Function Perform the logical exclusive-OR operation on two values. Details The XOR operator operates on two values, resulting in their logical exclusive-OR combination. For example, during the exclusive-OR operation c = a XOR b the following four situations can occur: That is, the result is TRUE if only one of the two operand values is logically TRUE. To review the order of evaluation for operators within expressions, see the section Order of Evaluation in the eV+ Language User's Guide .

Example In the following sequence, the instructions immediately following the IF are executed when not_eq_one is TRUE and count does not equal 1, or when not_eq_one is FALSE and count equals 1. Otherwise, they are not executed. IF not_eq_one XOR (count == 1) THEN ... END Related Keywords AND operator eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 576 a b c FALSE FALSE -> FALSE FALSE TRUE -> TRUE TRUE FALSE -> TRUE TRUE TRUE -> FALSE