QORPLCopen motion icon

Operator - Count the number of TRUE inputs.

Inputs

IN1 ... INn : BOOL Boolean inputs

Outputs

Q : DINT  Number of inputs being TRUE

Remarks

The block accepts a non-fixed number of inputs.

ST Language

Q := QOR (IN1, IN2);
Q := QOR (IN1, IN2, IN3, IN4, IN5, IN6);

FBD Language

(* the block may have up to 16 inputs *)
Or FBD

FFLD Language

(* the block may have up to 16 inputs *)
Or FFLD

IL Language

Op1: LDClosed "Ladder diagram"
Ladder logic is a method of drawing electrical logic schematics. It is now a very popular graphical language for programming Programmable Logic Controllers (PLCs). It was originally invented to describe logic made from relays. The name is based on the observation that programs in this language resemble ladders, with two vertical "rails" and a series of horizontal "rungs" between them  IN1
     QOR  IN2, IN3
     STClosed "Structured text" A high-level language that is block structured and syntactically resembles Pascal  Q