You are on page 1of 44

PLC Programming

By: Cabingas, Ben T., ECE

1

Basic PLC
Objectives:  Describe the major components of common PLC  Use Automation Studio Simulation  Convert conventional relay logic to PLC language  Operate and program a PLC (Siemens S7200 PLC) for a given application using Ladder Programming
PLC in Automation Technology 2

Basic PLC
Programmable Logic Controllers (Definition according to NEMA Standard ICS3-1978) A digitally operating electronic apparatus which uses a programming memory for the internal storage of instructions for implementing specific functions such as logic, sequencing, timing, counting and arithmetic to control through digital or analog modules, various types of machines or process.
PLC in Automation Technology 3

Basic PLC
PLC other definition:  Considered as the “ Brain of modern industrial control and as the hub for wide varieties of automation and control PLC Utilization in the Industries in Region X  A microprocessor based controller specifically designed for industrial control applications

PLC in Automation Technology

4

relay-controlled systems PLC in Automation Technology 5 .Basic PLC Historical Background  The Hydramatic Division of the General Motors Corporation specified the design criteria for the first programmable controller in 1968 Goal:  To eliminate the high costs associated with inflexible.

Basic PLC Historical Background… New control system had to meet the following requirements:  Survive in an industrial environment  Easily programmed and maintained  Reusable PLC in Automation Technology 6 .

Basic PLC Other initial specifications:  Price competitive with the use of relay systems  The controller had to be designed in modular form  The input and output had to be easily replaceable  The control system needed the capability to pass data collection to a central system PLC in Automation Technology 7 .

Basic PLC Programmable Logic Controller Development 1968 Programmable concept developed 1969 Hardware CPU controller.timers and counters. 1 K of memory and 128 I/O points 1974 Use of several (multi) processors within a PLC . 12 K of memory and 1024 I/O points PLC in Automation Technology 8 . arithmetic operations. with logic instructions.

Basic PLC Programmable Logic Controller Development 1976 Remote input/output systems introduced 1977 Microprocessors .based PLC introduced 1980 Intelligent I/O modules developed Enhanced communications facilities Enhanced software features Use of personal microcomputers as programming aids PLC in Automation Technology 9 .

computer and machine using SCADA software PLC in Automation Technology 10 .cost small PLC’s introduced Networking of all levels of PLC.Basic PLC 1983 1985on Low .

Festo 4. Square D EUROPEAN 1. Texas Instruments 4.Leading Brands of PLC AMERICAN 1. Gould Modicon 3. Allen Bradley 2. Klockner & Mouller 3. Telemechanique Basic PLC PLC in Automation Technology 11 . Westinghouse 6. Cutter Hammer 7. Siemens 2. General Electric 5.

Toshiba 2. Omron 3. Mitsubishi PLC in Automation Technology 12 . Fanuc 4.Basic PLC Leading Brands of PLC Japanese 1.

Basic PLC Areas of Applications  Manufacturing / Machining  Food / Beverage  Metals  Power  Mining  Petrochemical / Chemical PLC in Automation Technology 13 .

alarms etc. etc. limit switches.Major Components of PLC POWER SUPPLY From SENSORS Pushbuttons. PROGRAMMING DEVICE PLC in Automation Technology 14 . I M N O P D U U T L E PROCESSOR O U T P U T M O D U L E To OUTPUT Solenoids. contactors. contacts.

Major Components of PLC 1.level signals inside the PLC and the field’s high level signal (analog or discrete) PLC in Automation Technology 15 . I/O Modules  Provides signal conversion and isolation between the internal logic. Power Supply  Provides voltage needed to run the primary PLC components 2.

Processor  Provides intelligence to command and govern the activities of the entire PLC systems 4. Programming device  used to enter the desired program that will determine the sequence of operation and control of process equipment or driven machine PLC in Automation Technology 16 .Major Components of PLC 3.

Programming Device Types:  Hand held unit with LED / LCD display  Desktop type with a CRT display PLC in Automation Technology 17 .

Programming Device Handheld programmers:  Industrial terminal (Allen Bradley) PLC in Automation Technology 18 .

Programming Device Handheld programmers:  Program Development Terminal (General Electric) PLC in Automation Technology 19 .

Programming Device Handheld programmers:  Programming Panel ( Gould Modicon ) PLC in Automation Technology 20 .

Programming Device Handheld programmers:  Programming Console ( Keyence / Omron ) PLC in Automation Technology 21 .

Programming Device Handheld programmers:  Siemens PLC in Automation Technology 22 .

Discrete Input Discrete input also referred as digital input (ON or OFF) connected to the PLC digital input. ON condition = logic 1 or a logic high OFF condition= logic o or logic low. Normally Open Pushbutton Normally Closed Pushbutton Normally Open switch Normally Closed switch Normally Open contact Normally closed contact PLC in Automation Technology 23 .

Basic PLC IN OFF Logic 0 PLC Input Module IN OFF Logic 1 PLC Input Module 24 V dc PLC in Automation Technology 24 .

4 to 20mA or 0 to10V. Level Transmitter IN Tank PLC Analog Input Module PLC in Automation Technology 25 . Typical input signals are 0 to 20mA.Basic PLC An analog input is an input signal that has a continuous signal.

Examples: Solenoids.Basic PLC Digital Output A discrete output is either in an ON or OFF condition. and lamps. OUT PLC Lamp Digital Output Module PLC in Automation Technology 26 . contactors coils.

Basic PLC Analog Output An analog output is an output signal that has a continuous signal. Electric to pneumatic transducer OUT E PLC Analog Output Module 0 to 10V P Supply air Pneumatic control valve PLC in Automation Technology 27 . 4 to 20mA or 0 to10V. Typical outputs may vary from 0 to 20mA.

PLC Communications Common Uses of PLC Communications Ports  Changing resident PLC programs .uploading/downloading from a supervisory controller (Laptop or desktop computer).  Forcing I/O points and memory elements from a remote terminal.  Linking a PLC into a control hierarchy containing several sizes of PLC and computer PLC in Automation Technology 28 .

30 m at 9600 baud PLC in Automation Technology 29 . with the majority of computer hardware and peripherals  Has a maximum effective distance of approx.PLC Communications Serial Communications PLC communications facilities normally provides serial transmission of information Common Standards RS 232  Used in short-distance computer communications.

often between several PCs in a distributed system  maximum distance of about 1000 meters PLC in Automation Technology 30 .PLC Communications Local Area Network (LAN) provides a physical link between all devices Provides overall data exchange management or protocol  provide the common. high-speed data communications bus which interconnects any or all devices within the local area. RS 422 / RS 485  longer-distance links.

PLC Programming Types of Programming (IEC 1131-3)  Ladder Language  Instruction List language  Sequential Function Chart Language  Function Block diagram Language  Statement List Language PLC in Automation Technology 31 .

Ladder Programming PLC in Automation Technology 32 .

Instruction List Programming PLC in Automation Technology 33 .

Sequential Function Chart PLC in Automation Technology 34 .

Function Block Programming PLC in Automation Technology 35 .

Drilling Robot Application Diagram: yy+ z+ zLIOC2.OUT1 LIOC2.OUT0 LIOC2.OUT2 PLC in Automation Technology DC motor (M) x+ x36 .

After the material is pushed. After the material is properly bore then the solenoid double acting cylinder in vertical position will return to its original position at the same time deactivating the dc motor. the solenoid controlled double acting cylinder in vertical position(y coordinate) will be activated allowing the dc motor controlled drilling machine in position. The material that is bore properly will be placed in the storage area by means of solenoid controlled double acting cylinder (z coordinate) placed in adjacent between the two double acting cylinders.Drilling Robot Application Problem Statement: Materials from the feeder line is to be pushed by means a solenoid controlled double acting cylinder in horizontal position (x coordinate) refer to set up diagram. The drilling of the material is for about 5s to ensure that the material is properly bore. PLC in Automation Technology 37 .

Motion Sequence Diagram t=5s z+ xX+ Y+ M+ Y-/M.= Deactivation x+ PLC in Automation Technology 38 .Z+ Z.RST Start/stop y+ yzNote: + = Activation .X.

Cuasito. The first step of the sequence shall be connected in series with the triggering switches and is connected in series with normally closed interlocking contact.SUGGESTED PATTERN IN PROGRAMMABLE LOGIC CONTROLLER (PLC) SEQUENCE CONTROL by: Ruvel J. 2. A step (rung) is executed and represented by a relay. PECE 1. X+ Interlocking contact Latching contact PLC in Automation Technology 39 . Each relay representing a step is self-latched .

The step is also self-latched.3.The proceeding steps shall also represented by a relay unique from the other and is connected in series with normally open step marker (relay marker previous rung). Step Marker PLC in Automation Technology 40 .

No selflatching is required. (This rung is the termination of the control circuit. The power circuits shall be represented by the appropriate tag name designated to its output component. (Solenoid Coil.4. The relay representing the reset step shall be used and assigned to the interlocking contact of the first step (1st rung). Reset rung shall also be connected in series with the triggering switch and the step marker.) Step marker 5. 6.) PLC in Automation Technology 41 . Buzzer. Lamp. and etc.

X+/- Activation Deactivation PLC in Automation Technology 42 . and then it is connected in series with the normally closed relay representing step deactivation of the concerned output component. . The power circuit rung shall be connected in series with the normally open relay representing step activation of the output component.7.

If the activation and deactivation are repetitive.8. X+/- Second Activation and deactivation PLC in Automation Technology 43 . its relay representation shall be connected in parallel to the previous step activation and deactivation bearing the same output component First Activation and deactivation .

PLC in Automation Technology 44 .

f¾n9.

.70 9.0.48982.0/ 0947341.3/2.425:907.  43 4 .! 83974/:.30:83 $8419.0841!  .

°¯f°@ n°–  .

f¾n9.

 f °– f° ¾€9.

. .

2207  $6:./0  4:/4/.43  %0. 037.97..0.70 &# !  $02038  4.83897:20398  0307.36:0 9.  08934:80  :9907.307 4:07  0894  %0020.

°¯f°@ n°–  .

f¾n9.

 f °– f° ¾€9.

3:.  2743  .  98:-8 9. f½f° ¾  %48-.

°¯f°@ n°–  .

f¾n9.

9:73..3:1.  f¾€½½nf°¾  .

.33  44/..

.0  09.07.0.8  !407  33  !0974.02..

02.. 9.

°¯f°@ n°–  .

f©..

¯½° °¾€9.

! # $&!! 742 $$ #$ !:8-:99438 ...    ! && %  !# $$ #  & % !& & % %4 &%!&% $4034/8  .9478  .439.439.08 09.728 09.98 2989. !# # ' 9..

°¯f°@ n°–  .

.f©.

¯½° °¾€9.

49.425430398  .  !407$:55  !74./08.7!.0300/0/947:390 572.

.0 83. 0./0883.4.943 -090039039073.3/9010/ 80.3.8 38/090!.3/84.083. 4/:08  !74.07843.7090 9. .43.447/8.

°¯f°@ n°–  .

f©..

¯½° °¾€9.

0  :80/940390790/0870/5747.943./0839003.07390.908419003970! 889028  !747..3/ ...3/.223/0.3/ 4.4397441574.422.9 /090723090806:03.0414507.29.30 9.03 2.094.  !74.08847  !74.08806:5203947/7.9.

°¯f°@ n°–  .

3/0/:399.9–f¯¯°– n @½ ¾  .

  089459509.#%/85./85. 9.

°¯f°@ n°–  .

9–f¯¯°– n f°   ½–f¯¯ ¾  ° ¾f ¯°f% ° f  % 9.

°¯f°@ n°–  .

9–f¯¯°– n f°   ½–f¯¯ ¾  9–f¯  ½¯ °@ ¯°f% ° f nn% 9.

°¯f°@ n°–  .

43 9.9–f¯¯°– n f°   ½–f¯¯ ¾  !747.223!.30 4:/4/.

°¯f°@ n°–  .

9–f¯¯°– n f°   ½–f¯¯ ¾  !747.0.22343840 003.

 2743 9.

°¯f°@ n°–  .

9–f¯¯°– n f°   ½–f¯¯ ¾  $02038 9.

°¯f°@ n°–  .

 .4.8/9.35:9 .847010770/.4474.43/9434.43/9434.35:9 90!/9.4 -¯f½ °9¾ ° -¯f.¾n  °½ 8.47.709035:9.

¾ 9¾ ° -¯f½ °¾n -¯f.

¾ ¾n -¯f½ °n°fn -¯fn¾ n°fn 9.

4330.°¯f°@ n°–  47  .90/94 .

f¾n9.

 ! 35:9 4/:0 '/.   4. 9. ! 35:9 4/:0   4.

°¯f°@ n°–  .

f¾n9.

3.3 ! 3.9.35:983.3829907  %.9.8.8..70 94 2 94 247 94 '  0.0%7.335:983.  %5..4393:4:8 83.3.435:98.4 35:9 4/:0 9.

°¯f°@ n°–  .

f¾n9.

439. 9.43/943  .9478..3/.258  &% ! .25 9.2508$4034/8 . :95:9 4/:0 9. :95:9 /8.70904:95:9809073.48 .3 47 .

°¯f°@ n°–  .

f¾n9.

4 :95:9 4/:0 94 ' ! $:55. %5.97.71742 94 2 94 2 47 94 ' 0..4 :95:9 3.4:95:982.7 !30:2.9.34:95:983..38/:.97..9...43974.9.9.07 &%  ! 3..0 9. 3.4393:4:8 83.8.3.44:95:98.94530:2..

°¯f°@ n°–  .

9.

.

28 :54.9438 !4798 ..¯¯°nf°¾ 42243&80841!422:3./3.33708/039!5747.

3.847./3 1742.425:907  47.4397407 ./434.594547/08945.8:507.

!394.7.808 41!.3/2024700203981742..3/.4397407.07.425:907 9.439.3380.702490 90723..   33. 54398.

°¯f°@ n°–  .

9.

.

.:/ 9.9.70.38288434131472...9  -.943 42243$9.9438 !.7/8 #$  &80/38479 /89.425:907.422:3.7/.3../08 807.0/89.9438 9 902.422:3.041.3.2:20110.5574  2.¯¯°nf°¾ $07.0.425:907.3/507507.2.97.8  .8.574.422:3.3/.47941.94381.9083472.

°¯f°@ n°–  .

9.

.

/./084.¯¯°nf°¾ 4.42243  8500//.9.9438 -:8.98.. #$./0./08..0947  574..4  574.3-09003../090.3907..0.089390 4.58..3.302..020394757494.70.4330.08 !74.347.07../0.70..9.422:3.

038 41903-0900380.07.!83.041.2:2/89.#$  4307 /89.3. /897-:90/88902  2.3.-4:9 209078 9.

°¯f°@ n°–  .

9.

9–f¯¯°– @½ ¾€9–f¯¯°–%.

 %  f f°–f–  °¾n°¾f°–f–    °f°n°.

ff°–f–  °n° n f–f¯f°–f–  f ¯ °¾f°–f– 9.

°¯f°@ n°–  .

f 9–f¯¯°– 9.

°¯f°@ n°–  .

°¾n°¾9–f¯¯°– 9.

°¯f°@ n°–  .

  °f°n°.

f 9.

°¯f°@ n°–  .

°n° n9–f¯¯°– 9.

°¯f°@ n°–  .

°– ½½nf° f–f¯  + +  .

¯%.% .

 D@ .

 D@ .

 D@ 9.

°¯f°@ n°– +   .

 548943  709:73 94 98 473.3/078 9.439740/ /4:-0 .90 70107 94 809 :5 /.907.. 8 5:80/ 90 84034/ .907.. 8 147 .93 .9 90 2. 548943 .907. 24947 . 9.43 90 /.039 -09003 90 94 /4:-0 .8 1742 90 100/07 30 8 94 -0 5:80/ - 20.20 920 /0.93 .0/ 3 .93 90 /.°– ½½nf° !74-02$9..93 .90/ .70.3/07 3 .447/3.907. - 20.....90 5. 84034/ .38 41 84034/ ..439740/ /4:-0 ./.3/07 3 47439.9 8 -470 574507  -0 5.907.-4:9 8 94 038:70 9.9.079.0 .93 . 8 574507 -470 1907 90 2.. 548943  ... 548943  .3/07 3 .2 1907 90 2.3/07  .079.93 ..9 90 8. 8 574507 -470 903 90 84034/ /4:-0 .447/3..38 .7..907.. 24947 %0 2.902039 .9.447/3.30 3 548943 %0 /73 41 90 2.90  -0 .0/ 3 90 8947.439740/ /73 2.439740/ /4:-0 .

°¯f°@ n°–  .

.+ $.°  °n f–f¯ + ¾+ O++. + O @ f$¾½ +  - + nf°  fnf° 9.

°¯f°@ n°–  .

D@9@@--9.. .

 .

-@%9.

% .D-.

.

-@     .

f¾ 9.

7057080393..:90/..90/38070893472.08.08.480/ 39074.70.  %0178989054190806:03.  8905 7:3 800.0/ O+ ° n°– n°fn fn°–n°fn 9.9.-0. 70.439.3.3/7057080390/-.9 .8905 8801 .90/ 3807089909707389.3/8 ..4330.4330.

°¯f°@ n°–  .

2.0/  ½.00/3890588.847057080390/-.450389052.f  9.707 70.4:87:3 %089058.707 570.3/8.84801 .90/3 8070893472.9. 70..:36:01742904907.4330. %0574.

°¯f°@ n°–  .

42543039  $4034/4 . 9.3/.439..90/94984:95:9 .25 :07 .8830/949039074.557457. #08097:38.941 9017898905 89 7:3  %05407.43974.4330.84-0.-07057080390/-90 .:9  ½¯f   %070.90/3807089 909707389.7057080393907080989058.94341 90.909.3/9089052.9..3.707 4801 ..:988.-0 :80/.3/ 09.20/083.38706:70/  %87:389090723.7.3.7.

°¯f°@ n°–  .

.42543039 .3/90398.70570803938905 /0.-0.450370..9..480/70.9.943 41904:95:9.:97:38..7.0730/4:95:9.4330.4330.42543039 O+$ nf°  fnf° 9.43.90/380708 9903472. %05407.70570803938905..9434190.90/3 807089903472.

°¯f°@ n°–  .

4:88905.-0.204:95:9.. 190.943-0...0 98 70..094 90570.73 908.90/35.705708039.7.943.9438.70705099.3//0.9.9.9.9..943..4330.3//0...943.42543039 ¾nf°f°  fnf° O+$  n° nf°f°  fnf° 9.

°¯f°@ n°–  .

9.

°¯f°@ n°–  .