0% found this document useful (0 votes)
57 views

Introduction To Mechatronics: Programmable Logic Controllers

PLC stands for programmable logic controller. It is a digital electronic device that uses programmable memory to store instructions to implement logic functions like sequencing, timing, and counting to control machines and processes. The basic structure of a PLC includes a processor unit, memory, power supply, input and output modules, and a programming interface. PLCs can be either single box units for small applications or modular systems for larger applications. Programming is done graphically using ladder logic to represent switching circuits.

Uploaded by

Amanuel tadiwos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Introduction To Mechatronics: Programmable Logic Controllers

PLC stands for programmable logic controller. It is a digital electronic device that uses programmable memory to store instructions to implement logic functions like sequencing, timing, and counting to control machines and processes. The basic structure of a PLC includes a processor unit, memory, power supply, input and output modules, and a programming interface. PLCs can be either single box units for small applications or modular systems for larger applications. Programming is done graphically using ladder logic to represent switching circuits.

Uploaded by

Amanuel tadiwos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Introduction to Mechatronics

Chapter 7
Programmable Logic Controllers
Introduction
▪ PLC is a digital electronic device that uses a programmable memory to store
instructions and to implement functions
▪ The functions implemented by PLC are logic, sequencing, timing, counting
and arithmetic
▪ It is objective is to control machines and processes
▪ It has been specifically designed to make programming easy.
▪ The term logic is used because the programming is primarily concerned with
implementing logic and switching operations.
▪ By changing the instructions in the program we can use the same
microprocessor system to control a wide variety of situations.
▪ It was developed in 1969
Basic PLC structure
1. Hardware components:
Hardware components:
1. The processor unit or central processing unit (CPU)
✓ Is the unit containing the microprocessor
✓ Interprets the input signals and carries out the control actions, according
to the program stored in its memory
✓ Communicating the decisions as action signals to the outputs
2. The power supply units
✓ Needed to convert the mains a.c. voltage to the low d.c. voltage (5 V)
necessary for the processor and the circuits in the input and output
interface modules.
3. The programming device
✓ Is used to enter the required program in to the memory of the processor
Cont..
4.The memory unit
✓ Is where the program is stored that is to be used for the control actions to
be exercised by the microprocessor and
✓ Data stored from the input for processing and for the output for
outputting.
5.The input and output sections
✓Are where the processor receives information from external devices and
communicates information to external devices.
6.The communications interface
✓Is used to receive and transmit data on communication networks from or
to other remote PLCs
Basic PLC structure
❑ Internal architecture
PLC systems
Single box (brick) Modular (rack)
➢Commonly used for small programmable ❖Systems with larger numbers of inputs
controllers and outputs are likely to be modular and
➢Supplied as an integral compact package designed to fit in racks.
complete with power supply, processor, ❖Consists of separate modules for power
memory, and input/output units. supply, processor, etc., which are often
➢Have 6, 8, 12 or 24 inputs and 4, 8 or 16 mounted on rails within a metal cabinet.
outputs
➢Memory can store 300 to 1000 instructions
Input-output devices
Input devices Output devices
▪ Sensors ▪ Actuators
➢ Mechanical switches ➢ Relay
➢ Proximity switches ➢ Directional control valves
➢ Photoelectric sensors and ➢ Motors
switches ➢ Stepper motors
➢ Encoders
➢ Temperature sensors
➢ Position/displacement sensors
➢ Strain gauges
➢ Pressure sensors
PLC Programming
▪ Programs for microprocessor-based systems have to be loaded into them in
machine code
▪ This being a sequence of binary code numbers to represent the program
instructions.
▪ Programming can be made even easier by the use of the so-called high level
languages, e.g. C, BASIC, PASCAL, FORTRAN, COBOL.
▪ Ladder programming was developed to be used by engineers without any great
knowledge of programming
▪ This is a means of writing programs which can then be converted into machine
code by some software for use by the PLC microprocessor.
PLC ladder programming
❖ A very commonly used method of programming
❖ Writing a program is then equivalent to drawing a switching circuit.
❖ In drawing a ladder diagram:
✓ The vertical lines of the diagram represent the power rails. The power flow
is taken to be from the left-hand vertical across a rung.
✓ Each rung on the ladder defines one operation in the control process.
✓ A ladder diagram is read from left to right and from top to bottom
✓ Each rung must start with an input or inputs and must end with at least
one output.
✓ Electrical devices are shown in their normal condition
✓ A particular device can appear in more than one rung of a ladder.
✓ The inputs and outputs are all identified by their addresses, the notation
used depending on the PLC manufacturer.
Cont..

✓ This procedure of going through all


the rungs of the program is termed
a cycle.
✓ The end rung might be indicated
by a block with the word END or
RET for return

Figure: Scanning the ladder program


Basic Symbols for Ladder Programming
Instruction Symbol Description
An input condition that is open when
Normally Open
de-energized
An input condition that is closed when
Normally Closed
de-energized
An output instruction that is true when
Output
the inputs conditions become true
An output instruction that is true all
Negated Output the time except when all input
conditions true
Input/output notation with different PLC manufacturer

Mitsubishi and Toshiba Siemens

Allen-Bradley Telemecanique
Logic Functions and ladder diagram

AND gate OR gate NOT gate

NOR gate XOR gate


NAND gate
Latching
▪ Latch circuit is used to hold an output energized, even when the input ceases.
▪ Example: a motor which is started by pressing a push button switch.
✓When the input 1 contacts close, there is an
output.
✓However, when there is an output, another set
of contacts associated with the output closes
and form an OR logic gate system with the
input contacts.
✓Thus, even if the input A opens, the circuit will
still maintain the output energised.
✓The only way to release the output is by
operating the normally closed contact 2.
Cont.
❑Example for an application of a latching circuit:
➢ Consider a motor controlled by stop and start
push button switches
➢ Signal light must be illuminated when the
power is applied to the motor and another
when it is not applied.
➢ Note that the stop contacts X401 are shown as
being programmed as open.
➢ If the stop switch used is normally closed then
X401 receives a start-up signal to close.
➢ This gives a safer operation than programming
X401 as normally closed. Figure: Motor on-off, with signal lamps,
ladder diagram.
Internal relays
• Behave like relays with their associated contacts, but in reality are not actual
relays but simulations by the software of the PLC.
• Application
• Used when there are programs with multiple input conditions.
• Consider the situation where the excitation of an output depends on two
different input arrangements.
✓ The first rung shows one input arrangement being
used to control the coil of internal relay IR1.
✓ The second rung shows the other input arrangement
controlling the coil of internal relay IR2.
✓ The contacts of the two relays are then put in an OR
situation to control the output.
Figure: An output controlled by two
input arrangements
Cont.
▪ Used for the starting of multiple outputs: ▪ Used for resetting a latch:
✓When the start contacts are closed, the ✓ When the contacts of Input 1 are
internal relay is activated and latches the momentarily pressed, the output is
input. energized.
✓It also starts Output 1 and makes it ✓ The contacts of the output are then closed
possible for Outputs 2 and 3 to be and so latch the output.
activated ✓ The output can be unlatched by the internal
relay contacts opening.
✓ This will occur if Input 2 is closed and
energises the coil of the internal relay.

Figure: starting of multiple outputs Figure: Resetting a latch.


Sequencing
➢Control situations where sequences of outputs are required.
➢The switch from one output to another being controlled by sensors
➢Consider the pneumatic system with double-solenoid valves controlling two
double-acting cylinders A and B

❖ The cylinder activation


sequence A+, B+, A-, B- is
required.
❖ Limit switches a+, a-, b- and
b+ are used to detect the limits
of the piston rod movements in
the cylinders
Cont..
• The ladder program will be:
Description:
✓ The solenoid A1 energized (Extension of cylinder A), only
when the start switch is closed and the b- switch is closed,
this switch indicating that the B cylinder is retracted.
✓ When cylinder A is extended, the switch a+, which
indicates the extension of A, is activated.
✓ This then leads to an output to solenoid B+ which results
in B extending.
✓ This closes the switch indicating the extension of B, i.e. the
b1switch, and leads to the output to solenoid A- and the
retraction of cylinder A.
✓ This retraction closes limit switch a- and so gives the
output to solenoid B- which results in B retracting.
Cont..
• Using an internal relay to control a pneumatic system
Sequence: A+, B+, B-, A-, Description
▪ When the start switch is closed, the internal relay
is activated. This energizes solenoid A+ with the
result that the piston in cylinder A extends.
▪ When extended it closes limit switch a+ and the
piston in cylinder B extends.
▪ When this is extended it closes the limit switch
b+.This activates the relay.
▪ As a result the B- solenoid is energized and the
piston in B retracts.
▪ When this closes limit switch b-, solenoid A- is
energized and the piston in cylinder A retracts.
Timers
➢A common approach used by PLC manufacturers is to consider timers to
behave like relays with coils which when energised result in the closure or
opening of contacts after some preset time.
➢Is treated as an output for a rung with control being exercised over pairs of
contacts elsewhere
➢Others consider a timer as a delay block in a rung which delays signals in that
rung reaching the output

Fig: Timer as a delay block in a rung


Fig: Timer treated as an output for a rung
Programming timers
1. Sequencing
Consider the ladder diagram shown below ▪ When the input In 1 is on, the output
Out 1 is switched on.
▪ The contacts associated with this output
then start the timer.
▪ The contacts of the timer will close
after the preset time delay, in this case
5.5 s.
▪ When this happens, output Out 2 is
switched on.
▪ Thus, following the input In 1, Out 1 is
switched on and followed 5.5 s later by
Out 2.
Cont..
2. Cascaded timers: the term cascaded is used to give longer delay times than
are possible with just one timer.
▪ Thus we might have timer 1 with a delay time of 999 s.
▪ This timer is started when there is an input to In 1.
▪ When the 999 s time is up, the contacts for timer 1
close.
▪ This then starts timer 2.
▪ This has a delay of 100 s.
▪ When this time is up, the timer 2 contacts close and
there is an output from Out 1.
▪ Thus the output occurs 1099 s after the input to In 1.
On-off cycle timer
▪ Consider on-delay timers can be used to produce an on-off cycle timer.
▪ The timer is designed to switch on an output for 5 s, then off for 5 s, then on
for 5 s, then off for 5 s, and so on.
▪ When there is an input to In 1 and its contacts close, timer 1
starts.
▪ Timer 1 is set for a delay of 5 s. After 5 s, it switches on
timer 2 and the output Out 1.
▪ Timer 2 has a delay of 5 s. After 5 s, the contacts for timer
2, which are normally closed, open.
▪ This results in timer 1, in the first rung, being switched off.
▪ This then causes its contacts in the second rung to open and
switch off timer 2.
▪ This results in the timer 2 contacts resuming their normally
closed state and so the input to In 1 causes the cycle to start
all over again.
Example: Sequencing of traffic lights
Counters
▪ Counters are used when there is a need to count a specified number of contact
operations,
• e.g. where items pass along a conveyor into boxes, and when the specified number of
items has passed into a box, the next item is diverted into another box.
▪ Counter circuits are supplied as an internal feature of PLCs.
▪ There are two types of counter
1. Down-counters : count down from the preset value to zero, i.e. events are
subtracted from the set value.
• When the counter reaches the zero value, its contacts change state.
2. Up-counters: count from zero up to the preset value, i.e. events are added
until the number reaches the preset value.
• When the counter reaches the set value, its contacts change state.
Programming Counter
➢When there is a pulse input to In 1, the
counter is reset.
➢When there is an input to In 2, the counter
starts counting.
➢ If the counter is set for, say, 10 pulses, then
when 10 pulse inputs have been received at
In 2, the counter’s contacts will close and
there will be an output from Out 1.
➢ If at any time during the counting there is an
input to In 1, the counter will be reset and
start all over again and count for 10 pulses. Figure: Basic counter program
Counter Example
Consider the problem of the control for a machine which is
required to direct 6 items along one path for packaging in a box,
and then 12 items along another path for packaging in another
box.
✓It involves two counters, one preset to count 6 and the other to
count 12.
✓ Input 1 momentarily closes its contacts to start the counting
cycle, resetting both counters.
✓Input 2 contacts could be activated by a micro switch, which is
activated every time an item passes up to the junction in the
paths.
✓Counter 1 counts 6 items and then closes its contact. This
activates the output, which might be a solenoid used to activate
a flap which closes one path and opens another.
✓Counter 1 also has contacts which close and enables Counter 2
to start counting.
✓When Counter 2 has counted 12 items it resets both the
counters and opens the Counter 1 contacts, which then results
in the output becoming deactivated and items no longer
directed towards the box to contain 12 items.
Software used for programming PLC

➢ RSLogix from Rockwell Automation Inc. for Allen-Bradley PLCs

➢ MELSOFT −GX Developer for Mitsubishi PLCs

➢STEP 7 - Micro/WIN V4 for Siemens PLCs


Thank you!!!

You might also like