Sunteți pe pagina 1din 15

PLC Tutorial Series

Amna Ejaz Chaudhry Fatima Ahsan July 21, 2012

Contents
1 Getting Started 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Conguring the Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Experiment # 1: 1 1 1 5 8

1
1.1

Getting Started
Introduction

Denition of a PLC: A programmable logic controller is a device which uses a computer to turn on output devices (motors, lights, buzzers) and relays, ON and OFF in response to inout devices (switches, sensors). A typical PLC has three modules: input moduletells computer which connection from input device has been activated output modulecontains relays which activate according to the program controller or processorhouses computer for PLC and takes decisions What is the dierence between a PLC and a hard-wired circuit?: If a hard-wired circuit needs to be changed, all the components need to be re-wired. With PLC, only the program must be modied to change the circuit operation.

1.2

Getting Started

1. Step # 1: Open the SIMATIC MANAGER from desktop icon or Start Menu.

2. Step # 2: If the New Project Wizard is not open then go to File menu drop down and Select New project Wizard. Press Preview, if its not pressed.Click Next.

3. Step # 3: Select CPU Type CPU315-2 DP. The name of your CPU is indicated on your PLC. Click Next.

4. Step # 4: Chose LAD as your Language for Selected Blocks.Make sure OB1 is selected as your block name.Click Next.

5. Step # 5: Write Project name as Getting Started and press Finish button.

6. Step # 6: Once your project has been created, your project screen will look like this.

1.3

Conguring the Hardware

1. Step # 1: Click SIMATIC300 station and double-click on the Hardware icon. You will see the window below:

2. Step # 2: There will be a table with the Slots Module, Modules, Order Numbers and other specications regarding your PLC Hardware. On the right side of the window, You can nd all the components of the hardware. Select slot# 1.The rst item you will search for is the Power Supply with module No. PS 307 5A. Search for this and double-click on it to add it to the rst slot. Second and third slot will be occupied by your CPU, which you already specied while creating your project.

3. Step # 3: Now select the fourth slot and search for DI32xDC24V and add it to slot number four.

4. Step # 4: 7

Now select slot# 5 and search for a SM322 D032xDC24V/0.5A and double-click to add to fth slot.

Now your Hardware has been congured.

Experiment # 1:

Suppose you have ve cylinders which are being lled with some uid and you want to be alerted when any three of them are over-owing. You will need ve boolean variables indicating which of the ve cylinders are overowing. Suppose in our example we give the variables a value of 1 if they are over-owing. So now we will create these ve symbols and their output to indicate if they are over-owing or not. 1. Step # 1: Go to your SIMATIC Manager Window and select S7 Program (1). Double click on the Symbols icon.

You will now see Symbol Editor with a table in which you will ll out all your variables whether input or output. Add in your rst row the symbol Main Program with address OB 1 and Data Type OB 1. In the second row, add Cylinder 1 in the symbols column and address I0.0 and Data Type as BOOL. Do the same for the rest four cylinders and name them Cylinder 2, Cylinder 3, Cylinder 4 and Cylinder 5. In the seventh row, in the symbols column add the last variables as INDICATOR and write the address for it as Q 4.0. Specify the Data Type as BOOL.

2. Step # 2: Open the SIMATIC Manager window and select blocks in S7 Program(1) and double click o OB 1. You will now see your main program showing networks. The horizontal cable is called rung and vertical cable is called rail.

10

3. Step # 3: Click on the rung and insert an open contact. It is available on the toolbar and appears as shown in the gure below:

11

4. Step # 4: Click on the rung on the right of the open contact and add another open contact. Repeat the same procedure to add one more open contact.

5. Step # 5: Click on the rung again and add a coil.

12

6. Step # 6: Click on the rail and add a branch shown as the icon with horizontal arrow on the toolbar.

7. Step # 7: 13

Add three normally open contacts to this branch by pressing the icon three times and close the branch by using vertical arrow icon. You have now created a parallel logic circuit for the cylinders.

8. Step # 8: Now add eight more branches in parallel until your circuit looks like the image shown below.

14

Now you will double click on the ?? signs above the normally open contacts on the rungs and give them labels/tags. Label them as shown in the image above. 9. Step # 9: Now go back to the SIMATIC Manager window and click on the PLC drop down menue and click on download. This will program your PLC according to the circuit you just designed. Test your hardware by conguring the switches in and ON/OFF position. Check if the output turns on when any of the three switches are in the ON position. The ON position indicates over-owing cylinders.

15

S-ar putea să vă placă și