You are on page 1of 61

A PLC system: CPU module (left) and an I/O rack (right) (Allen Bradley PLC-5)

(Courtesy of Allen-Bradley)

3/25/2013

A small PLC (Allen Bradley MicroLogix 1000)


(Courtesy of Allen-Bradley).

3/25/2013

Definition of PLC
PLC is a digitally operating electronic apparatus which uses a programmable memory for the internal storage of instructions by implementing specific functions such as logic sequencing, timing, counting, and arithmetic to control, through digital or analog input/output modules, various types of machines or processes.

3/25/2013

Inputs and outputs of PLC


Inputs of PLC
Discrete signal from switch, approximate sensor, push buttons Analog signal from thermal couple, voltmeters, etc.

Outputs of PLC
Most often is the control signal to motor, valves, etc.

3/25/2013

Types of switches

3/25/2013

A Relay

3/25/2013

A counter

3/25/2013

Counter timing diagram (the count value is 5)

3/25/2013

A timer

3/25/2013

Timer timing diagram (the timing value is 5)

3/25/2013

Ladder diagram for the circuit

3/25/2013

Wiring diagram

3/25/2013

Programmable logic controller system structure

3/25/2013

Memory
ROM RAM PROM EPROM etc

3/25/2013

I/O modules (Courtesy of Allen-Bradley)

3/25/2013

Input/output module
Analog inputs
Flow sensors Humidity sensors Potentiometers Pressure sensors Temperature sensors

Analog outputs
Analog meters Analog valves and actuators DC and AC motor drives

Digital input/output
Bar code, encoder Display

Special purpose I/O


PID controller Fast input Network module

3/25/2013

Power input connections: (a) AC, (b) DC, and (c) TTL

3/25/2013

Power output connections: (a) AC, (b) DC, and (c) TTL

3/25/2013

Peripherals
Operator console Printer Simulator EPROM loader Network communication PC based programming software

3/25/2013

Human interface terminal


(Courtesy of Allen-Bradley)

3/25/2013

PC-based programming software

3/25/2013

A ladder diagram (also called contact symbology) is a means of graphically representing the logic required in a relay logic system.

3/25/2013

Some relay diagram symbols

3/25/2013

A ladder diagram

3/25/2013

PLC wiring diagram

3/25/2013

PLC scan

3/25/2013

Functions of PLC
Relay Timer and counter Program control Arithmetic Data manipulation Data transfer Others, such as sequencers

3/25/2013

Basic logic

3/25/2013

And logic

3/25/2013

OR logic

3/25/2013

Combine AND and OR logic

3/25/2013

Example
A robot is used to load/unload parts to a machine from a conveyor. A part comes along the conveyor. When it touches a microswitch, it is scanned by a bar-code reader to identify it. If the part is the desired one, a stopper is activated to stop it. A robot picks up the part and loads it onto the machine if it is idle. Otherwise, the robot waits to unload the machine.

3/25/2013

Cell layout

3/25/2013

Example

3/25/2013

Program

3/25/2013

Wiring diagram

3/25/2013

EXPLANATION OF THE PROGRAM

Rung 1. If a part arrives and no part is stopped, trigger the barcode reader. Rung 2. If it is a right part, activate the stopper. Rung 3. If the stopper is up, the machine is not busy and the robot is not busy; load the part onto the machine. Rung 4. If the task is completed and the robot is not busy, unload the machine.

3/25/2013

Procedure for developing automation system using PLC 1. 2. 3. 4. 5. 6. 7. 8. 9. Define the process to be controlled. Make a sketch of the process operation. Create a written step sequence listing for the process. Add sensors on the sketch as needed to carry out the control sequence. Add manual controls as needed for process setup or operational checking. Consider the safety of the operating personnel and make additions and adjustments as needed. Add master stop switches as required for safe shutdown. Create the ladder logic diagram that will be used as a basis for the PLC program. Consider the "what if's" where the process sequence may go astray.

3/25/2013

1. Define the problem


We wish to set up a system for spray-painting parts. A part is to be placed on a mandrel. (A mandrel is a shaft or bar whose end is inserted into a workpiece to hold it during an operation.) When the part is in place, two pushbuttons are pressed and the mandrel rises. After the part rises to the top and is in the hood, it is to have spray paint applied for a period of 6 seconds. At the end of the 6 seconds, the mandrel returns to the original position. The painted part is then removed from the mandrel by hand.
3/25/2013

2. Process sketch

3/25/2013

3. List of operation sequence


1. Turn on the paint pump and pneumatic air supply. 2. Turn the system on. This requires pushbuttons other than the system buttons. 3. Put the part on the mandrel. A sensor indicates that the part is in place. 4. Push the Master Start button and the two system start buttons. Having to push two system start buttons (with both hands) reduces the possibility of the operator's hands being injured by the rising mandrel. 5. The mandrel is raised by a pneumatic cylinder energized by the opening of an electrically actuated air valve when the system start buttons are pressed. (The mandrel will return by gravity and downward spring action when the valve is reopened.) When the mandrel rises, the part-in-place sensor at the bottom becomes de-energized. (Note: The part-in-place sensor does not rise with the mandrel.) 6. When the part reaches the top and is under the hood, it is held against a stop by air pressure. A sensor has indicated that the part has reached the top. 7. A timer starts and runs for 6 seconds. 8. During the timing period of 6 seconds, paint is applied by the sprayer. 9. At the end of 6 seconds, painting stops and the mandrel, with the part on it, lowers. 10. The up sensor is deenergized when the mandrel with the part on it descends. 11. The part arrives at the bottom, reenergizing the part-in-place sensor. 12. The part is removed from the mandrel. 13. The system resets so that we may start at step 3 again.

3/25/2013

4. Add sensors

3/25/2013

5. Add manual control


We may need a manual pushbutton to raise the mandrel to the top for setup purposes. The manual up position is needed when we set the spray-gun pressure for optimum paint coverage. We include pushbutton up (PBU) on our ladder diagram to accomplish this manual control.

3/25/2013

6. Consider safety
One basic way to keep hands out of a process is to have two start buttons. Then both hands must be away from the work to depress both buttons (which works until the operator figures out how to use one knee and one hand). Other considerations, which we do not cover in detail here, might be operating a fan to disperse fumes during spraying, or perhaps a photocell proximity-personnel-system-stop device.

3/25/2013

7. Add emergency stop


Add emergency and master stop switches as needed for operator safety. This may seem to be part of step 6 because both steps deal with operator safety. It is a continuation of the safety issue, but emergency stop switches are so important that they need special consideration as an additional step.

3/25/2013

Create Ladder Diagram

3/25/2013

9. Determine what-ifs
All possible situations and emergencies should be listed. In this example, some of them might be:
What if no part is in place when the start buttons are pushed? What if the power fails during the cycle when the part is rising, during painting, or at any other time? What if the sprayer runs out of paint? What if the same part is left in for a double coat? What if the master stop button is pushed? Does the stop button really stop the entire process, or can the mandrel move and create a safety problem after the stop button is depressed (it can)?
3/25/2013

System I/O

3/25/2013

Truth table

3/25/2013

3/25/2013

Ladder diagram for a three-switch system

3/25/2013

Ladder diagram for Example 10.2

3/25/2013

State diagram for a two-state and transition system

3/25/2013

Ladder diagram for Example 10.3

3/25/2013

Ladder diagram for the state diagram in Figure 10.27

3/25/2013

State diagram for Example 10.4

3/25/2013

3/25/2013

State diagram for Example 10.5

3/25/2013

3/25/2013

State diagram for Example 10.6

3/25/2013

3/25/2013

You might also like