MEL - 334: Low Cost Automation: Programmable Logic Controller
MEL - 334: Low Cost Automation: Programmable Logic Controller
LOVERZ
www.facebook.com/ELECTRONICS.LOVERZ
We will use the term PLC generically to refer to both PLCs, and PACs. This section will explore the various components that comprise a PLC system.
In addition to these 5, most PLCs also have: A network interface Lets look at each in more detail..
I/O that is remotely located from the PLC requires a network connection back to the PLC
Input Modules
Input modules interface directly to devices such as switches and temperature sensors. Input modules convert many different types of electrical signals such as 120VAC, 24VDC, or 4-20mA, to signals which the controller can understand. 24 Volt DC System Terminal block - this is where wires from the field devices are connected Field device - this is showing a simple switch
Input Module
+ 24 Volts
- 24 Volts
1 2 3 4 5 6 7 8 9 10 COM
A/D conversion
To PLC
Input Modules
Input modules convert real world voltage and currents to signals the PLC can understand. Since there are different types of input devices, there is a wide variety of input modules available, including both digital and analog modules.
Switch 24V DC
Pressure 4-20 mA
Temperature 0-10V DC
DC Input
Analog Input
Discrete Modules
Devices that are either on or off, such as a pushbutton, get wired to discrete modules. Discrete modules come in a variety of types, such as 24VDC or 120VAC. You can buy discrete modules that allow you to typically connect anywhere from 2 to 32 devices, with the most popular being 16 devices. Since it takes only 1 bit to represent the state of a device, a 16 point discrete module only requires 16 bits of memory in the controller to store the states of all the points on the module. .
Output Modules
Output modules interface directly to devices such as motor starters and lights Output modules take digital signals from the PLC and convert them to electrical signals such as 24VDC and 4 mA that field devices can understand
Output Module
Terminal block - this is where wires from the field devices are connected Field device -Motor starter, controlling an AC motor.
From PLC
1 2 3 4 5 6 7 8 9 10 COM
D/A Conversion
Output Modules
www.facebook.com/ELECTRONICS.LOVERZ
Output modules take a signal from a PLC and convert it to a signal that a field device needs to operate. Since there are different types of output devices, there is a wide variety of output cards available, including both digital and analog cards.
Valve 0-10V DC
Fan 120V AC
Light 24V DC
Each module plugs into the one to the left Connections for the built in I/O
Example of a PLC with the modules built in. Comes as one block
Each module plugs into the one to the left Connections for the built in I/O
Network Interface
Modular systems allow the user to add network interface modules to the chassis. The controller communicates to the network interface over the backplane.
In some cases the network interface is built directly into the PLC and will appear as a plug on the front of the PLC
Network interface
Controller
PLC PROGRAMMING
Programming a PLC
Every PLC has associated programming software that allows the user to enter a program into the PLC. Software used today is Windows based, and can be run on any PC. Different products may require different software: PLC5, SLC, and ControlLogix each require their own programming software.
Programming a PLC
Before a PLC can perform any control task, it must be programmed to do so. The most popular language used to program a PLC is ladder logic.
www.facebook.com/ELECTRONICS.LOVERZ
Programming a PLC
In a conveyor system, we have several requirements to accomplish; for example, timing and counting parts on the conveyor. Each of these requirements must be programmed into the PLC so that it knows how to respond to different events.
Programming a PLC
The programmer develops the program, and connects their personal computer to the PLC through a network or cable and then downloads the program to the PLC.
www.facebook.com/ELECTRONICS.LOVERZ
Here, we can see an example of ladder logic. Each line of code is known as a rung. In this example there are 4 rungs, numbered 0, 1 and 2, and the end rung marking the end of the program. The PLC executes the program 1 rung at a time, starting with the first rung and then working down.
Ladder logic rungs are basically IF-THEN statements. Each individual rung is executed from the left to the right. The outputs at the right side of each rung is set to a condition that reflects the status of the permissive contacts in a particular rung.
The rung is read as: If the Start Button is on, turn the Motor on. If the Start Button is off, then turn the Motor off.
In this example, if the actual Start Button is on, then the value of all the XICs named Start Button, in the program will be true (also known as a one, or closed). If the start button is off (not on) then the value of the Start Button XICs will be false (also known as a zero, or open).
www.facebook.com/ELECTRONICS.LOVERZ
Motor
The second instruction is known as an Output Energize, or OTE. This is an output instruction.
This instruction turns on if the logic to the left of the OTE is true. If the logic is false, then the output will be turned off. The OTE commands a physical output located on a output module to turn either on or off.
www.facebook.com/ELECTRONICS.LOVERZ
The text above the XIC and OTE is the address associated with the instruction. PLC addresses may appear in many different ways depending on the PLC being used.
Start_Button Local:2:I.Data[0].1 I:020/2
The address is used by the PLC to tell exactly which input to read or which output to command.
I/O Addressing
Since a PLC will be controlling real devices down on a plant floor, it has to have some way of communicating to the correct device. All PLCs use some sort of method of I/O Addressing to perform this function.
I/O addresses are a means to tie a physical I/O point to a location in PLC memory An input address will represent the state of an input device, i.e. the switch is on or off. An output address will represent the commanded state for a device. i.e., turn the motor on or off.
Local:5:I.Data[0].1
Local:7:O.Data[6].11
I/O Addressing
Often, a descriptive name of the device connected to the I/O point is used in addition to, or in place of the base I/O address which describes the physical location of the module in the rack.
Motor Local:7:O.Data[6].11
Part_detected Local:5:I.Data[0].1
Counter part_count
Part_detected Local:5:I.Data[0].1
Counter part_count
Light 1
Motor 1
Now lets take a look at a simple program for a conveyor application. When a box is placed on the conveyor in front of Photoeye 1, Light 1,and Motor 1 will turn on, causing the box to move down the conveyor to the left. When the box passes in front of Photoeye 2, Motor 1 and Light 1 will turn off, stopping the conveyor.
Heres the program for the conveyor: The first line of code turns on the motor and the light when a box is detected by photoeye1. Likewise, the motor and light are turned off when photoeye2 detects the box in the second line of code.
The third line begins a timer when the box passes by photoeye1, and if the box does not pass by photoeye2 in 30 seconds (the timer counts in milliseconds), the motor and light are shut off by line 4. This is the indication of a jam condition.
ARCHITECTURE
A complete control system is made up of a combination of PLCs, networks, I/O, terminals and software. All the components work together to form a complete control system.
I/O Systems
I/O systems are often referred to as local or distributed. Local refers to the I/O being attached directly to the Controller or on the same backplane as the Controller Distributed refers to I/O which is not on the same backplane as the Controller. Distributed I/O is connected using a network. Local I/O PLC I/O network I/O adapter Input module - distributed I/O Switch-input
The distributed input module sends the inputs across the backplane to the adapter. The adapter sends them over the I/O network to the PLC (Controller).
I/O Architectures
I/O architectures are made up of I/O systems. The architectures are referred to as Centralized and Distributed Centralized refers to the I/O being located near or in the same cabinet as the processor. Wires from field devices are brought back to the I/O, and can be quite long. Distributed refers to I/O that is located near the field devices. The wires from the field devices are short. The network cable is run out to the Distributed I/O instead of running the field wires back to the I/O.
Centralized I/O
I/O network
Distributed I/O
field wiring
Switch-input
Processor cabinet
Local I/O - I/O that is attached to or in the same chassis as the PLC
Local I/O
Processor cabinet
Field devices distributed around the machine - too much wiring to take back to one chassis Out of local I/O local I/O limited by number of slots in the backplane or fixed I/O attached to the processor Local I/O does not meet your needs module type, current capability, etc
Field devices distributed around the machine - too much wiring to take back to one chassis I/O mounted to machine - becomes a part of it instead of in a central cabinet.
Centralized Control
Centralized control refers to a control system where a single (usually large) PLC controls all of the I/O and performs all the control for the system
A single PLC controls the local I/O and all the networked I/O
Centralized Control
Advantages and disadvantages of centralized control
Advantages The control program is all in one place Easier to troubleshoot system problems I/O performance throughout entire system Disadvantages Programs can get quite large related I/O performance slower compared to distributed control Single PLC failure shuts down entire system
Distributed Control
Distributed control refers to a control system where multiple PLC controllers share the responsibility of controlling the system. The PLCs usually communicate frequently with each other.
Multiple PLCs share control of the networked I/O. The sections are often broken up into logical systems. For example, one controller might control the conveyor bringing ingredients to the ovens while the other 2 are controlling the ovens.
ALLEN-BRADLEY
ALLEN-BRADLEY
ALLEN-BRADLEY
Distributed Control
Advantages and disadvantages of distributed control
Advantages Segmented programs to specific tasks Easier to troubleshoot local problems Performance on local network Disadvantages System problems harder to troubleshoot Performance from I/O across PLCs Cost Maintain multiple programs
ALLEN-BRADLEY
ALLEN-BRADLEY
ALLEN-BRADLEY
PLC
HMI
I/O
File server
Made up of devices and networks which are responsible for acquiring data about the process. Not responsible for direct control of the process.
File server
Safety System The Function of a Safety System is to monitor and control conditions on a machine or process that are hazardous in themselves or, if no action were taken, may give rise to hazardous situations The Safety System runs in parallel with the Control System The Control System and Safety System may share components Focus of Control System is Throughput Focus of Safety System is Protection A Safety system is designed to protect People Environment Machinery
Safety System The safety system is often referred to as safety control while the PLC system controlling the devices that produce the end product is often referred to as the standard control
The PLC performing standard control would control the robot while it performs tasks related to producing the desired product
The safety control would monitor the light curtain to make sure that the operator never moved into the robot area while the robot was moving. If the operator broke the light curtain, the safety system would remove power to the robot so that it could not move and injure the operator