Lecture 2
Lecture 2
PLC Course
Fundamentals of Logic
➢The PLC, like all digital equipment, operates on the binary principle. The term
binary principle refers to the idea that many things can be thought of as existing
in only one of two states.
➢represent ON or OFF, open or closed, true or false, high or low, or any other two
conditions.
Fundamentals of Logic
➢A logic gate is a circuit with several inputs but only one output that is activated by
particular combinations of input conditions.
➢The two-state binary concept, applied to gates, can be the basis for making
decisions.
The OR Function
The OR Function
Boolean Algebra
➢The mathematical study of the binary number system and logic is called Boolean
algebra.
➢ There are many applications where Boolean algebra could be applied to solving
PLC programming problems.
Boolean Algebra
Boolean Algebra
Boolean Algebra
Ladder logic
➢The control scheme is drawn between two vertical supply lines. All the components are
placed between these two lines, called rails or legs, connecting the two power lines with
what look like rungs of a ladder—thus the name, relay ladder schematic.
➢A rung is the contact symbolism required to control an output. Some PLCs allow a rung to
have multiple outputs while others allow only one output per rung.
➢A complete ladder logic program then consists of several rungs, each of which controls
an output. In programmed logic all mechanical switch contacts are represented by a
software contact symbol and all electromagnetic coils are represented by a software coil
symbol.
Ladder logic
➢Each rung is a combination of input conditions (symbols) connected from left to
right, with the symbol that represents the output at the far right.
Examples:
Ladder logic
Examples:
Two limit switches connected in parallel and used to control a solenoid valve.
Ladder logic
Examples:
Two limit switches connected in parallel with each other and in series with a pressure
switch.
7/24/2019 Dr. Hani Muhsen 21
Mechatronics Eng. PLC Course
Ladder logic
Exclusive-OR circuit. The output lamp of this circuit is ON only when pushbutton A or B is
pressed, but not both. This circuit has been programmed using only the normally open A
and B pushbutton contacts as the inputs to the program.