OR   ORN

Operator - Performs a logical OR of all inputs.

Inputs

IN1 : BOOL First boolean input
IN2 : BOOL Second boolean input

Outputs

Q : BOOL   Boolean OR of all inputs

Truth table

IN1

IN2

Q

0

0

0

0

1

1

1

0

1

1

1

1

Remarks

In FBD language, the block may have up to 16 inputs. The block is called ">=1" in FBD language. In LD language, an OR operation is represented by contacts in parallel. In IL language, the OR instruction performs a logical OR between the current result and the operand. The current result must be boolean. The ORN instruction performs an OR between the current result and the boolean negation of the operand.

ST Language

Q := IN1 OR IN2;
Q := IN1 OR IN2 OR IN3;

FBD Language

(* the block may have up to 16 inputs *)
OrFbd.gif (1633 octets)

LD Language

(* parallel contacts *)
OrLd.gif (1330 octets)

IL Language

Op1: LD  IN1
     OR  IN2
     ST  Q   (* Q is equal to: IN1 OR IN2 *)
Op2: LD  IN1
     ORN IN2
     ST Q    (* Q is equal to: IN1 OR (NOT IN2) *)

See also

AND   XOR   NOT