Anda di halaman 1dari 22

15-Mar-17

Programmable Logic Controllers


ET ZC323
MECHATRONICS & AUTOMATION

Dr. Arshad Javed


BITS Pilani Asst. Prof.
Department of Mechanical Engineering
Hyderabad Campus

PLC

1
15-Mar-17

What is PLC?
Digital electronic device
Uses a programmable memory
Store instructions (logic)
Sequencing
Timing
Counting
Arithmetic operations

Advantage of PLC
Cost effective for controlling complex systems.
Flexible and can be reapplied to control other systems
quickly and easily.
Computational abilities allow more sophisticated
control.
Trouble shooting aids make programming easier and
reduce downtime.
Reliable components make these likely to operate for
years before failure.

2
15-Mar-17

Main Units of PLC


The program memory
Instruction for the logic control are stored

The Data memory


The status of switches, interlocks, past values of data and other working data
stored

The output device


Drivers for the industrial process actuators (solenoid switch, motor, valves)

The input Device


Status sensors, proximity detectors, interlock settings

Main Units of PLC

3
15-Mar-17

PLC
PLC HARDWARE
Small self contained 20 digital i/o
Modular large I/o, digital/analogue, 20 A current on
output
programming device: key pad/key board/link with PC
Display: digital/LCD/VDU
SIGNAL CONDITIONING
AD-DA
Multiplex
Input: optocoupler/safety
Output: optocoupler/Fuse/MCB

Programming Languages for PLC-


Systems
No fixed programming languages for PLC-systems
Different kinds of programming, also depending on the
manufacturer
IEC 1131 is defining graphical and text-based basic-
languages

4
15-Mar-17

Formal methods in PLC programming


Georg Frey and Lothar Litz, 2000 IEEE

10

5
15-Mar-17

Programming Languages for PLC-Systems

Base of all programming languages are logical connections


Addition of possibilities for time processing
Suitable kind of representation depends on problem
State-oriented program parts are more suitable for FBD or LD
Flow-oriented program parts are more suitable for IL
The different representations can be converted into each other

Some operations can only be programmed using IL (e.g. bit


shifting)!

11

Ladder Diagram (LD)


Simple illustration
Similar to the circuit diagram of the relay
technology
Symbol based programming
Symbolized current flow from left to right
I/O states are mapped onto switch-states
The program is read from top to bottom
Disadvantage: difficult representation of
complex mathematic functions
12

6
15-Mar-17

PLC PROGRAMMING

LADDER PROGRAMMING a graphical


programming language
Identify all elements of a mechatronic system and
represent graphically
Elements
Rails
Rungs
Input
Output
Branches
Timer
counter
13

PLC

PLC LADDER PROGRAMMINGSYMBOLS


Input (NO/Close on input)

Input (NC/Open on input)

Output (Motor/timer/alarm/..)

Special Instruction (e.g. END)

14

7
15-Mar-17

Programming (Ladder Diagram)

15

OR

16

8
15-Mar-17

AND

17

NOR

18

9
15-Mar-17

NAND

19

NOR

20

10
15-Mar-17

Exclusive-OR

21

Inverting the output

22

11
15-Mar-17

23

Permissive Circuit

24

12
15-Mar-17

Interlock Circuit

OL: Over Load

25

26

13
15-Mar-17

Latching: Motor control

27

Timer, Internal Relays and Counter


Tasks involved time delay
TIMER
Waits a set amount of time before doing INPUT TIMER

something (control time)

Count fractions of seconds or seconds TIMER OUTPUT

using the internal CPU clock.

The time duration for which a timer has


been set is termed the preset and is set in
multiples of the time base used.

28

14
15-Mar-17

Timer, Internal Relays and Counter


Timers Types

On-Delay timer- simply delays turning on. It is


called TON, TIM or TMR.

Off-Delay timer- simply delays turning off. It is


called TOF and is less common than the on-delay
type.

The on/off delay timers above would be reset if


the input sensor wasnt on/off for the complete
timer duration.

Retentive or Accumulating timer- holds or


retains the current elapsed time when the
sensor turns off in mid-stream. It is called RTO or
TMRA. This type of timer needs 2 inputs.

29

30

15
15-Mar-17

Large delay, cascaded timers

31

In the example above, when the operator pushes button 0001 the timer
starts ticking.
When the accumulated value reaches 0 the timer contacts (T000) will close
and output 0500 becomes true.
When the operator releases the button (0001) the accumulated value
changes back to the preset value.(i.e. it resets)

32

16
15-Mar-17

In the example above, when the operator pushes button 0002 the timer
starts ticking.
When the accumulated value reaches 0 the timer contacts (T000) will close
and output 0500 becomes true.
When the operator releases the button (0002) the accumulated value is
held(i.e. retained).
Only when the operator pushes the reset button(0001) does the timer reset.

33

Timer, Internal Relays and Counter


1 IR 1
INTERNAL RELAYS
Marker or Auxiliary relay,
2
Simulation by software of PLC
May have battery back up IR 2
3 4

IR 1 OUTPUT

IR 2
END

34

17
15-Mar-17

Timer, Internal Relays and Counter


COUNTER
Counter changes its stage after a preset no. of pulse
Up Counter
1
Down Counter RESET

Counter
2 K10

OUT

Counter OUTPUT

35

36

18
15-Mar-17

Cylinder sequencing

37

Cylinder sequencing

38

19
15-Mar-17

Case Study
Car Parking Barriers:
2 barriers
in & out

IN-barrier: Open when the correct money


is inserted in the box

OUT-barrier: Open when a car is detected

39

Limit
Switch

Barrier

Limit
Switch

40

20
15-Mar-17

Sensors & Actuators


X400 coin switch Y430 solenoid on valve A
for entrance barrier
X401 entrance barrier up
Y431 solenoid on valve B
X402 entrance barrier down for entrance barrier

X403 input when car at exit barrier Y432 solenoid on valve A


for exit barrier
X404 exit barrier up
Y433 solenoid on valve B
for exit barrier
X405 exit barrier down

41

X400 M100 Y431 X403 M101 Y433 Y432


Y430

Y430 Y432

X401 T450 X404 T451


10 10

T450 M100 T451 M101

M100 X402 Y430 Y431 M101 X405 Y432 Y433

Y431 Y431

42

21
15-Mar-17

0V
+24 V

X400 Entrance A
Y430
X401 Entrance B
Y431
EXIT A
X402 Y432
EXIT B
X403 Y433

X404

X405

43

22

Anda mungkin juga menyukai