siemens s7-200 plc by ashakoor nomani

13
PROGRAMMABLE LOGIC CONTROLLE ASHAKOOR COMSATS ABBOTTABAD Ashakoor CIIT PROGRAMMABLE LOGIC CONTROLLER Siemens-S7-200 Lab Manual Department of Electrical Engineering

Upload: sobi

Post on 27-Oct-2014

196 views

Category:

Documents


11 download

TRANSCRIPT

Page 1: Siemens s7-200 PLC by Ashakoor Nomani

P R O G R A M M A B L E L O G I C C O N T R O L L E A S H A K O O R

COMSATS ABBOTTABAD

Ashakoor

CIITPROGRAMMABLE LOGIC

CONTROLLERSiemens-S7-200

K

Lab Manual

Department of Electrical Engineering

Page 2: Siemens s7-200 PLC by Ashakoor Nomani

P R O G R A M M A B L E L O G I C C O N T R O L L E A S H A K O O R

COMSATS ABBOTTABAD

PROGRAMMABLE LOGIC CONTROLLER

Siemens S7-200

LAB MANUAL

Supervised By

MR. SAJJAD DURRANI

Department of Electrical Engineering

Page 3: Siemens s7-200 PLC by Ashakoor Nomani

P R O G R A M M A B L E L O G I C C O N T R O L L E A S H A K O O R

COMSATS ABBOTTABAD

This Manual describes the operation and function of the SiemensPLC. Read this carefully to ensure maximum performance fromyour PLC.

ObjectivesTo install the PLC in systemsTo construct PLC programs in LADTo run and debug the programs on Siemens S7-200 PLC.

Introduction to PLCThe S7-200 is referred to as a micro PLC because of its small size. TheS7-200 has a brick design which means that the power supply and I/Oare on-board. The S7-200 can be used on smaller, stand-aloneapplications such as elevators, car washes, or mixing machines. It canalso be used on more complex industrial applications such as bottlingand packaging machines.

PLC consists of three main parts:

CPUMemoryI/O units.

CPU is the brain of PLC. It reads the input values from inputs, runs theprogram existed in the program memory and writes the output valuesto the output register.

Memory is used to store different types of information in the binarystructure form.

I/O units provide communication between PLC control systems.

Page 4: Siemens s7-200 PLC by Ashakoor Nomani

P R O G R A M M A B L E L O G I C C O N T R O L L E A S H A K O O R

COMSATS ABBOTTABAD

How Plc Works

PLC reads the INPUTS then executes the program burned in itaccordingly and then updates the OUTPUT respectively.

InstallationProgrammingPractical

Getting familiar with Siemens S7-200 PLC

Installation:Installing software

Download the software.

Download the communication cable driver.

Run the software and follow following steps

Install the PC/PPI cable

Go to device manager:->my computer>properties>hardware>device manager

Double click the PPI portChange the port setting to the COM1

Page 5: Siemens s7-200 PLC by Ashakoor Nomani

P R O G R A M M A B L E L O G I C C O N T R O L L E A S H A K O O R

COMSATS ABBOTTABAD

**Remember** “if Com1 is already assigned to some other portlike ‘communication port’ then change that one to any other COM butPPI’s port must be COM1.For laptops check by selecting one by one.”

Connecting the plc with the computer.

Use PC/PPI cable to connect plc with the PC.Place the knob at TRM position of the PLC.Plc can be connected to PC in standalone as well inoperational mode.

Connecting the plc with the inputs and load.

Page 6: Siemens s7-200 PLC by Ashakoor Nomani

P R O G R A M M A B L E L O G I C C O N T R O L L E A S H A K O O R

COMSATS ABBOTTABAD

Programming:**Remember** “Connect the PLC to the Power supply before programming.”

Ladder logic diagrams

Ladder logic (LAD) is one programming language used with PLC’s.Ladder logic uses components that resemble elements used in a linediagram format to describe hard-wired control. The left vertical lineof a ladder logic diagram called rail represents the power orenergized conductor. The output element or instruction representsthe neutral or return path of the circuit. The right vertical linerepresents the return path on a hard-wired control line diagram.Ladder logic diagrams are read from left-to-right, top-to-bottom.Rungs are sometimes referred to as networks or horizontal lines. ARung may have several control elements and output coils.

The user-friendly design allows data entry from a mouse. You canselect and specify a device type. This ensures error-free entry of targetsymbols.

Addresses

SS77--220000IInnppuuttss

OOuuttppuuttss

II00..00–– II00..77

QQ00..00 –– QQ00..33

Page 7: Siemens s7-200 PLC by Ashakoor Nomani

P R O G R A M M A B L E L O G I C C O N T R O L L E A S H A K O O R

COMSATS ABBOTTABAD

Basic Ladder Logic Programming

Running PLC Programs

When the program is compiled successfully, click on the Downloadbutton on the taskbar to transfer the compiled program to the PLC.During this operation, be sure that PLC is STOP or TERM mode.When the transfer is completed, switch the PLC to RUN mode orclick RUN button in the toolbar. Now, PLC is running. Switch theinputs ON and OFF, and observe the change on outputs of the PLCmodule. Check if your program works correctly.You can also transfer the existed program in PLC to PC. In a similarway, when the PLC is STOP mode, click on the Upload button on thetaskbar. When the operation is completed, you can see the programcode existed in PLC on computer screen. Now you can modify theprogram if it is necessary.

Building Program(e-g. latch)

Start -> Programs -> Keyence Applications ->LadderBuilder for KV Sample Ver.

Page 8: Siemens s7-200 PLC by Ashakoor Nomani

P R O G R A M M A B L E L O G I C C O N T R O L L E A S H A K O O R

COMSATS ABBOTTABAD

Create a new file. Select the KV10 model.

The new window will bw like this.

Place an N.O contact and give it address of the desiredinput contact.

Page 9: Siemens s7-200 PLC by Ashakoor Nomani

P R O G R A M M A B L E L O G I C C O N T R O L L E A S H A K O O R

COMSATS ABBOTTABAD

Now place an N.C contact.

Extend the rung by placing horizontal lines(F9).

Now place an output (F7) and address it accordingly.

Connect the circuit to the right power line.

Page 10: Siemens s7-200 PLC by Ashakoor Nomani

P R O G R A M M A B L E L O G I C C O N T R O L L E A S H A K O O R

COMSATS ABBOTTABAD

Place the cursor below the contact of relay 0001 add aBranch with a NO contact (OR logic), Select relay 0500

Place the cursor below the NO contact of relay 0500.Type END -> for end of routine . Click OK.

Place the cursor below on line 0004. Type ENDH -> forend of program. Click OK.

Page 11: Siemens s7-200 PLC by Ashakoor Nomani

P R O G R A M M A B L E L O G I C C O N T R O L L E A S H A K O O R

COMSATS ABBOTTABAD

Compile and Execute the program for continuous scan.Then simulate.

Simulator

It’s a quick debugging without a PLC. Even without a PLC connected,the Ladder Builder for KV can simulate program execution. Theexecution can be checked without transferring the program to the PLC.By providing a single-step execution function (forward or reverse) inaddition to a regular scan execution function, debugging efficiency isincreased.

PLC Monitor

Real time monitoring without stopping the machine Ladder diagramand element on/off stands can be monitored real time. Timing chartscan be monitored simultaneously.

Simulation of above build program

CompilePLC Monitor

Simulator

Page 12: Siemens s7-200 PLC by Ashakoor Nomani

P R O G R A M M A B L E L O G I C C O N T R O L L E A S H A K O O R

COMSATS ABBOTTABAD

Practical:Develop a relay based controller that will allow three switches ina room to control a single light.Develop a simple ladder logic program that will turn on anoutput X if inputs A and B, or input C is on.Develop basic logic gates on PLC.Develop a motor forward/reverse program using interlock circuitwith 5 sec delay on PLC.Develop a program which counts subjects on a conveyor belt.Develop time delayed security alarm program using relay.Develop a pressure and level controller program of a boilerhaving self fault identifier.

Experimental Work

An automatic stamp system shown in Figure 2 works as follows:When start switch is turned on, system gets ready to run. When theoperator puts a box at the beginning of the conveyor (on LS1) themotor runs and conveyor moves. Upon reaching the mid point ofthe conveyor (on LS2) the conveyor motor stops. Then the stampcomes down and puts the stamp on the box. When this process isfinished, the stamp goes up and conveyor moves again to the otherend of the conveyor. After box reaches to end of the conveyor (onLS3), the motor stops. The system waits for the box to get and

Page 13: Siemens s7-200 PLC by Ashakoor Nomani

P R O G R A M M A B L E L O G I C C O N T R O L L E A S H A K O O R

COMSATS ABBOTTABAD

another box to be placed at the beginning of the conveyor. If startswitch is turned off, the system can not run even if there is a boxon conveyor. The light on the start box indicates that the system isactive whereas UP and Down lights indicate that the stamp is UPand DOWN position respectively. Develop a LAD to control thestamp system.