Mechatronics Automation CH 5
Mechatronics Automation CH 5
Course Syllabus
Pneumatics actuators, gripper technology, control valves and pneumatic circuit
representation.
Sequential Control Systems.
o Programmable Logic Controllers (PLC). Sequential control system representation,
logic analysis and PLC programming. Relay logic ladder diagram, Timers,
Counters, shift registers.
Sensor technology for sequence control, optical, capacitive, inductive and
magnetic.
o Computer simulation of a programmable pneumatic positioning system.
Chapter Outlines
Programmable Logic Controllers (PLC). Sequential control system representation,
logic analysis and PLC programming. Relay logic ladder diagram, Timers, Counters,
shift registers.
A B op
0 0 0
0 1 0
1 0 0
1 1 1
A B op
0 0 0
0 1 1
1 0 1
1 1 1
Example
In a certain bank, each of three bank officers has a unique key to the vault. The bank rules
require that two out of the three officers be present when the vault is opened. Draw the
ladder diagram for a relay logic circuit that will unlatch the door and turn on the light when
two of the three keys are inserted.
Symbols
o Contacts
Normally Open Contacts (NO)
o Coils
Symbols
o Boxes
Timers
Counters
Math Operations
Symbols
Symbols
The ladder diagram consists of two vertical lines representing the power rails.
Circuits (rung) are connected as horizontal lines
Ladder diagram language is the most commonly used PLC language and is designed
to mimic hardwired relay logic.
Rack Terminal
Byte number number
number
Example I:012/03
Example:
Example: The Allen-Bradley PLC-5
I0.1 is an input at bit 1 in byte 0
has I: 012/03 to indicate an
Q2.0 is an output at bit 0 in byte 2
input in rack 01 at module 2
and terminal 03
Mechatronic Automation Dr. Aly Gaballa 16
Chapter (5) PLC Programming
Basic Instructions
LOAD (LD)
LD → normally open contact
Basic Instructions
LDI LOAD Inverse
LDI → Normally Closed Contact
Basic Instructions
o OUT Relay
I Input
Q Output
M Memory
T Timer
C counter
Mechatronic Automation Dr. Aly Gaballa 19
Chapter (5) PLC Programming
Relay-Type Instructions
Normally Open Instruction
Relay-Type Instructions
Normally Closed Instruction
the output instruction O:0/01 is energized or TRUE if either input A or input B is TRUE
or if both inputs are TRUE.
Ladder programming
The form of programming commonly use with PLC is ladder programming. Each
program task is specified as though a rung of a ladder. Thus a rung could specify
that the state of switches A and B be examined and if both A and B are closed then a
solenoid, the output is energized.
Ladder program
Figure below shows a basic standard symbols that are used and rung, Inputs must
always precede outputs and there must be at least one output on each line Each
rung must start with an input or series of inputs and end with an output
The output from the PLC is to energize a solenoid when a normally open start
switch connected to the input is activated by being closed
Logic functions
o The logic Functions can be obtained by combinations of switches
o AND
A B O/P
0 0 0
0 1 0
1 0 0
1 1 1
o OR
A B O/P
0 0 0
0 1 1
1 0 1
1 1 1
Mechatronic Automation Dr. Aly Gaballa 26
Chapter (5) PLC Programming
Logic functions
o The logic Functions can be obtained by combinations of switches
o NOR
A B O/P
0 0 1
0 1 0
1 0 0
1 1 0
o NAND
A B O/P
0 0 1
0 1 1
1 0 1
1 1 0
Mechatronic Automation Dr. Aly Gaballa 27
Chapter (5) PLC Programming
Logic functions
o XOR
A B O/P
0 0 0
0 1 1
1 0 1
1 1 0
A B C O
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
Instruction lists
o Each horizontal rung on the ladder represents a line in the program and the entire
ladder gives the complete program in the ladder language.
o Using a graphic interface, a programmer can build his program, then translate these
symbols into machine language that can be stored in the PLC memory.
o Alternatively, the ladder program can be translated into an instruction list and entered
into the programming panel or computer.
o Instruction lists consist of a series of instruction with each instruction being on a
separate line.
o An instruction consists of an operator followed by one or more operand
Instruction lists
Stop pushbutton
Start pushbutton
Data in memory, showing the relationship between memory position and the I/O
terminals.
Logic Design
o Process Description:
A heating oven with two bays can heat one ingot in each bay. When the heater is on it
provides enough heat for two ingots. But, if only one ingot is present the oven may
become too hot, so a fan is used to cool the oven when it passes a set temperature.
o Control Description:
If the temperature is too high and there is an ingot in only one bay then turn on fan.
Logic Design
Multiplexers
Design Cases
o Problem: Develop a program that will cause output D to go true when switch A and
switch B are closed or when switch C is closed.
o Problem: Develop a program that will cause output D to be on when push button A is
on, or either B or C are on.
Motor Forward/Reverse
o Problem: Design a motor controller that has a forward and a reverse button. The motor
forward and reverse outputs will only be on when one of the buttons is pushed.
A Burglar Alarm
o Consider the design of a burglar alarm for a house. When activated an alarm and lights
will be activated to encourage the unwanted guest to leave. This alarm be activated if an
unauthorized intruder is detected by window sensor and a motion detector. The window
sensor is effectively a loop of wire that is a piece of thin metal foil that encircles the
window. If the window is broken, the foil breaks breaking the conductor. This behaves
like a normally closed switch. The motion sensor is designed so that when a person is
detected the output will go on. As with any alarm an activate/deactivate switch is also
needed. The basic operation of the alarm system, and the inputs and outputs of the
controller are itemized
A Burglar Alarm
A Burglar Alarm