Introduction To Mechatronics: Programmable Logic Controllers
Introduction To Mechatronics: Programmable Logic Controllers
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..
Allen-Bradley Telemecanique
Logic Functions and ladder diagram