Automationcontrol4

30
PLC programming for applications and maintenance By Dr. Palitha Dassanayake

Transcript of Automationcontrol4

Page 1: Automationcontrol4

PLC programming for applications and

maintenanceBy

Dr. Palitha Dassanayake

Page 2: Automationcontrol4

Content Programming a simple application Faultfinding and maintenance Programming application for

sequential operations Another program application

Page 3: Automationcontrol4

Constructing a PLC Program

Methodology in programming a PLC are given as follows. 

2.Write down or draw the requirements, logics or/and sequences in an understandable format using pseudocodes, flowcharts or UML (in some special cases). This may be skipped for smaller tasks, but essential when that the task becomes large or complicated. However, it is good practice to conduct this step to avoid unnecessary logical errors. 

1. Identify the requirements or logical sequences that aregoing to be handled by a PLC.

Page 4: Automationcontrol4

3.Draw the necessary tables or maps to illustrate the PLC logic that match with the requirement, but independent from the language code (ladder, logo or statement list)

4. Connect the PLC to the system to be controlled and to the computer that PLC is going to get programmed 

5. Identify the input and output cables that are connected in order to program.

Page 5: Automationcontrol4

6. Write the PLC program according to step 3 using the identified inputs/outputs in step 5. 

7. See the possibilities of improving the program 

8. Validate the program before the actual run. This may be achieved through a simulation facilitated in the software or using a virtual model using bulb and switches 

Page 6: Automationcontrol4

9. Check the program. Remove the connection from the computer if necessary. It  may be conducted part by part in a large application. Also, when the program is run for the first time, required safety precautions must be made before hand in order to avoid any damagesdue to logical errors.

10.Remove the connection from the computer if that has not been done and use the PLC for the application.

Page 7: Automationcontrol4

Example

A1

IsC1

C2

 Fig:Two views of the system 

Is-Inductivesensor

A1-Pneumatic Actuator

C1-Collector

C2-Collector

GearBox

 motor-m

item

Os-Optical sensor

A0

A0

Page 8: Automationcontrol4

1. When Os detects an item, it should be pushed by A0 and conveyor         should start moving 

2.      If the item is metal, it has to be identified by Is.  

3.       Metal items are to be pushed by A1 and collected in C1.  

4.      Non-metal items are to be collected at the end of the belt to C2  

5. If an item is in process, even if Os detects an item, it should not be    pushed by A1 until the previous item is fully processed.  

Page 9: Automationcontrol4

Start -No item Os=0

Os=1 A0 should be ejected provided no other item is in process

If the item is metal, it is sensed by Is.If Is=1 item is metal, this should be remembered

If Is had been 1 it has to pushed by A1 after a time interval

If the item is not metal, it should not be pushed and collected atthe end. The time required to travel is also required.

Page 10: Automationcontrol4

Amplifier

Electro-pneumaticvalve

PLCOperating Voltage –24 v

I0.1

I0.0

Q0.0

Q0.1

I s-

C

C2

GearBox

m

Os

If output the sensor is in mv

A/C motor

RelayA0

Q0.2

Electro-pneumaticvalve

A1

Page 11: Automationcontrol4

Os - I0.0Is - I0.1

A1 - Q0.0M - Q0.1A0 - Q0.2

Input-output connections

M0.0 - An item is in processM0.1- The item is Metallic0.3 sec time is required for a pneumatic actuator to activate

Operation Time(s) Activate A0 0

Near A1 10 End of the belt 15

Page 12: Automationcontrol4

Start -No item Os=0

Os=1 A0 should be ejected provided no other item is in processTime=0.3 sec

T33 Q0.2

RM0.0

S

Q0.2 T33

30+

IN

PT

TON

QET

I0.0 M0.0 Q0.2

S

Page 13: Automationcontrol4

If the item is metal, it is sensed by Is.If Is=1 item is metal, this should be remembered

I0.1 M0.1

S

If Is had been 1 it has to pushed by A1 after a time interval

T37 T34

30+

IN

PT

TOF

QET

T34

T34 Q0.0M0.1

M0.0 T37

100+

IN

PT

TON

QET

T37

Page 14: Automationcontrol4

If the item is not metal, it should not be pushed and collected atthe end. The time required to travel is also required.

You must reset already set items once the process is completed

M0.0 T38

150+

IN

PT

TON

QET

T38

Q0.0

T38

M0.1

R

M0.0R

Page 15: Automationcontrol4

Fault in a system

System is not working at all

1. Check whether PLC is in the run modeStop mode, changeError Mode, Restart PLC again error go to Step 2

2. Check inputsNo input working check input power supply, connections etcSome inputs not working, check the connected wires, sensors or switches and interfacesAll inputs working go to Step 3

3. Check outputsCheck the outputs in the order it should workCheck the LED of the PLC, if it is working find the fault in the connection or deviceNo LED output is on, down load the programCommunication with PLC is not possible replace PLCAfter downloading the programming Not working replace PLC

Page 16: Automationcontrol4

Faults and causes

Os Fault A0 –Not work and Motor not workIs Fault A1-Not workMotor Fault Motor not workA0 Fault A0 Not WorkA1 Fault A1 Not WorkSensor Faults Nothing WorkPneumatic problem A0 and A1 Not workPLC Fault Nothing Work

Page 17: Automationcontrol4

Fault FindingA/C Motor is not working, but the pneumatic actuator A0 pushes the item into conveyor

Check the output of the PLC connected to the relay of the PLCThat is Q 0.1 if it is on (LED on) fault is from that pointIf it is off (Generally not possible) check the program or check all sensors

Pneumatic Actuator A0 is not working, but the A/C motor is working

Check the output of the PLC connected to the electro-pneumatic valve of the PLC That is Q 0.2 if it is on (LED on) fault is from that pointIf it is off, Place a metal onto the conveyor and check A1 is workingA1 Not working Pneumatic problemA1 is working (Generally not possible)check the program or check all sensors

Page 18: Automationcontrol4

Fault Finding Contd.

A0 and A/C Motor is working, but the pneumatic actuator A1 does not sort items

Check the output of the PLC connected to the electro-pneumatic valve of the PLC That is Q 0.0 if it is on (LED on) fault is from that pointIf it is off, check the sensor Is Working generally not possiblecheck the program or check all sensors or sensor Is

System is not working at all

Check electrical connections, check sensor failure,No program in PLCPneumatic failure+ Motor is not working PLC is at fault

Page 19: Automationcontrol4

Setting and Resetting a Memory

I0.0 M0.0

S

I0.1 M0.0

R

Another method with one ladder

I0.0

M0.0

I0.1 M0.0

Page 20: Automationcontrol4

Cylinders are in the original position

A

B

C

D

Cylinder 2

X2Cylinder 1

X1

Page 21: Automationcontrol4

A

B

C

D

Cylinder 2

X2

Cylinder 1

X1

Page 22: Automationcontrol4

A

B

C

D

Cylinder 1

X1

Cylinder 2

X2

Page 23: Automationcontrol4

Cylinders are in the original position

A

B

C

D

Cylinder 1

X1

Cylinder 2

X2

Page 24: Automationcontrol4

Cylinders are in the original position

A

B

C

D

Cylinder 2

X2Cylinder 1

X1

=1 =1

Page 25: Automationcontrol4

Cylinders are in the original position

A

B

C

D

Cylinder 2

X2Cylinder 1

X1

=0 =1

Page 26: Automationcontrol4

ABC

PneumaticActuator

ProductProductProductProduct

Product

Product

Page 27: Automationcontrol4

ABC

PneumaticActuator

Product

A=0 B=0 C=0

Product

A=1 B=0 C=0

Product

Time 1 sec after C=1

Product

A=1 B=1 C=0

If short when B=1 A=0

Product

A=0 B=1 C=1

If long when C=1 A=1

Product

Time 1.3 sec after C=1

If the product is long or short

Page 28: Automationcontrol4

A B M0.0S

T34

M0.1

100+

IN

PT

TON

QET

T33

30+

IN

PT

TOF

QET

34T T33

M0.1S

M0.0

A C

C

PLC programming using S7 Version

Page 29: Automationcontrol4

apT33 T34

M0.0R

T33 T34 M0.1

R

C

Page 30: Automationcontrol4

END