Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
(Lecture # 21)
PLC
Lecture No 21 Week
th 11
29-05-2007
Logic Sequencing Timing Counting & Arithmetic In order to control machines & Process I/P devices as switches & o/p devices as motors are connected to PLC. controller monitors the i/ps & o/ps according to the program stored in the PLC
Features of PLC
1. 2. 3.
They are rugged and designed to withstand vibrations, Temperature, Humidity and Noise. The interfacing for i/p and o/p is inside the controller. They are easily programmed.
2. The change can be to initiate an 2. operation or terminate an operation, start a motor or stop, open a valve or close 3. Has no memory. 3. 4. Does not consider any previous 4. values of i/p
Executed by the control system either at a specific point in time or after a certain time lapse has occurred Uses internal timing devices to determine when to initiate changes in o/p variables.
Sequencing Examples
Starting times & ending times for the shift & uniform break periods for all the workers. Heat treating operations carried out for certain length of time.
A robot is programmed to pickup a raw work part from a known stopping point along a conveyor & place it into a forging press. In this three conditions must be satisfied
PLC
CPU Input Flag System Input Module
Output
User Ladder Diagram
Output Module
PLC
Lecture No 25 Week
th 13
16-06-2007
OUTPUT OR
RELAYS
contact
coil
TIMER
R1 TIMER R2
Motor R2
PR=5
R1
Problem:
Try to develop a relay based controller that will allow three switches in a room to control a single light.
The second solution assumes that each switch can turn the light on or off, regardless of the states of the other switches. This method is more complex and involves thinking through all of the possible combinations of switch positions. You might recognize this problem as an exclusive or problem.
COUNTER
input Re giste r
Digital counters, output in the form of a relay contact when a pre-assigned count value is reached.
1 2
Clock
TIMER
Accumulator re se t Re giste r
Time 5 seconds.
Counters and Timers Counters can be used in manufacturing to measure quantities such as production stock, inventory, and packaging Timers are used specifically to count clock pulses Timers and counters greatly expand the versatility of a PLC and allow the handling of some variable-type questions Virtually all PLCs on the market today include countering and timing capability
PLC ARCHITECTURE
Programmable controllers replace most of the relay panel wiring by software programming.
Progr am Loade r Printe r Proce ssor Casse tte Loade r EPROM Loade r Pe riphe rals M emory Powe r Supply I/O M odule s M achine s PC Switche s
A typical PLC
PLC COMPONENTS
1. Processor
Microprocessor based, may allow arithmetic operations, logic operators, computer interface, local area network, functions, etc.
PLC COMPONENTS
3. I/O Modular plug-in periphery
AC voltage input and output, DC voltage input and output, Low level analog input, High level analog input and output, Special purpose modules, e.g., high speed timers, Stepping motor controllers, etc.
Logical Control
Control actions are taken by making decisions depending on the values associated with various inputs or variables and the control logic in the program If a decision can be made by answering yes or no to a given question, it is referred to as a decision by attributes
Is a part loaded in the machine? Is the tool path unobstructed? Is the AGV carrying a part?
Decisions that cannot be made by answering yes or no are referred to as decisions by variables
How long is the bar stock? What is the feed rate? What is the part temperature?
LADDER DIAGRAM
A ladder diagram is a means of graphically representing the logic required in a relay logic system.
Rail
start PB1 emergency stop PB2 R1
Rung
R1
R1 A
03
20 11
External switches
Stored program
CONTROL DEVICES
1) 2) Mechanical Control - cam, governor, etc., Pneumatic Control - compressed air, valves, etc.
3)
4)
5)
Computer Control
PLC Evolution
Binary World Relay control pneumatic sequencer
A B C P1 P2
Analog World
combinatorial
sequential
Regulation, controllers
discrete processes
continuous processes
"sequential"
ladder logic
I1
P1 P2
Ladder Logic
make contact
01
02
relay coil
03
50
break contact
02 50 rung
05 44
Ladder Logic
Binary combinations are expressed by series and parallel relay contact: ladder logic representation "CMOS" equivalent 01 50 02 50
Series
01
02
PLC
Lecture No 26 Week
th 14
19-06-2007
IF sensor 1 is tripped AND the timer is not done timing THEN energize motor
IF the timer is done timing THEN energize solenoid 3 (drain)
How would you write the ladder logic for this problem?
Solution
X1, X2 = sensors S1, S2, S3 = solenoids (relays) M = motor (relay) T1 = tank stir period T2 = drain period
X2
S3
S1
X1
X2
S2
IF sensor 2 is not tripped THEN energize solenoid 1 (Ingr A) IF sensor 2 is tripped AND sensor is not tripped THEN energize solenoid 2 (ingr B) IF sensor 1 is tripped THEN enable timer (10 Sec)
X1 M
M TMR T1 T1 S3
IF sensor 1 is tripped AND the timer is not done timing THEN energize motor
IF the timer is done timing THEN energize solenoid 3 (drain)
S3
TMR T2
Programming a PLC
PROGRAMMING EXAMPLE
Bar code re ader microswitch Part Stopper Conveyor
Robot
Machine
id MSI R1 C1 R2 R3 C2 R4 C3 C4
description microswitch output to bar code reader input from bar code reader output robot output robot input from robot output to stopper input from machine input from machine
state 1 1 1 1 1 1 1 1 1
explanation part arrive scan the part right part loading cycle unloading cycle robot busy stopper up machine busy task complete
SOLUTION
Input MS1 C1 C2 C3 C4 01 02 03 04 05 Pro grammable Controlle r PLC Outpu t 11 12 13 14 15 R1 R2 R3 R4
01
14
11
02
14
14
04
03
12
05
03
13
Rung 1. If part arrives and no part is stopped, trigger the bar code 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.
Switch_1 X0
Switch_2 X1
Switch_1 X0
Switch_3 X2
Switch_2 X1
Light_3 Y2
Switch_1 X0
Switch_3 X2
Switch_1 X0
Switch_3 X2
Switch_2 X1
Switch_1 X0
Switch_3 X2
END
Stop X0
Start X1
Motor Y0
Motor_FB X2
Intrlk_1 X3
Stop X0
Start X1
Intrlk_2 X4
Motor Y0
Motor_FB X2
Intrlk_3 X5
END