s7-300 interfacing manual

24
PLC INTERFACING MANUAL SIEMENS S7-300

Upload: muhammad-mehdi

Post on 09-Apr-2018

230 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 1/24

PLC INTERFACING MANUAL

SIEMENS S7-300

Page 2: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 2/24

1. CONNECTING HARDWARE:

Using the STEP 7 software, you can create your S7 program within a project. The

S7 programmable controller consists of a power supply unit, a CPU, and input andoutput modules (I/O modules).

The programmable logic controller (PLC) monitors and controls your machine withthe S7 program. The I/O modules are addressed in the S7 program via theaddresses.

Hardware is equipped with a cable to be plugged in the serial port of a computer.Plug this wire into the serial port carefully and turn on the computer.

2. INSTALLING STEP 7.0:• When installing the STEP 7 software on a programming device or PC without a

previously installed version of STEP 7, note the software and hardwarerequirements. You can find these in the Readme.wri on the STEP 7 CD under

<Drive>:/STEP 7 /Disk1.

Page 3: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 3/24

Page 4: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 4/24

• Now you have to select the type of your CPU. You are given with a lot of 

types of hard wares but you have to select CPU 314 IFM that is compatible

with our requirements.

• After doing this, click NEXT.

5. CHOOSING A BLOCK FOR PROGRAMMING:

You always have to choose the block OB1 specially meant for CYCLIC EXECUTION.

Page 5: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 5/24

6. PROGRAMMING IN LADDER LOGIC:

Now you have three options to choose one in which you want to program yourproject.

These languages are

• LAD (Ladder Logic)

• STL (Statement List)

• FBD (Function block Diagram)For simplicity, you have to choose LAD.

Page 6: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 6/24

7. NAMING THE PROJECT:

Just write the name of your project and click MAKE and a blank project will beprepared for you to use.

8. CHANGING THE DEFAULT LANGUAGE:

Page 7: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 7/24

Go to SIMATIC MANAGER Window and click on CUSTOMIZE, and you have a lot of 

options. Click on LANGUAGE and then select ENGLISH.

9. CONFIGURING THE CENTRAL RACK:You can configure the hardware once you have created a project with a SIMATIC

station. The project structure which was created with the STEP 7 Wizard meets allthe requirements for this.

The hardware is configured with STEP 7. These configuration data are transferred tothe programmable controller later on "downloading".

Open the SIMATIC 300 Station folder and double-click the Hardware symbol.

Page 8: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 8/24

The HW CONFIG window opens. After this, search for CATALOG in the main pallet

and open it. There are a lot of options, we will select our required module and insertin the required slot.

Page 9: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 9/24

Now we have to fill first five slots. Let’s move.

• First you require a power supply module. Navigate in the catalog until you

reach PS300. Open this folder and drag and drop PS 307 2A into slot 1.

Page 10: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 10/24

• The CPU you selected on creating the project is already displayed in slot

2.There is no need to change it.

• Slot 3 remains empty for serial communication purpose.

• Navigate until you find the input module SM 300, then open it and search for

AI/AO-300. Open this folder too and search SM 334 AI4/AO2 X 12BIT.Now drag and drop it into slot 4.

• After this navigate for the module DI/DO-300 and search for SM 323

DI16/DO16 X 24V/0.5A. After you get it, drag and drop it in slot 5.

Page 11: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 11/24

• Go to STATION and then SAVE and COMPILE.

Page 12: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 12/24

• Close the HW CONFIG window.

10. OPENING THE BLOCK FOR PROGRAMMING:

The SIMATIC Manager is the central window which becomes active when STEP 7 is

started. The default setting starts the STEP 7 Wizard, which supports you whencreating a STEP 7 project. The project structure is used to store and arrange all the

data and programs in order.

• Go to name of your project e.g. S7_PRO10 and then click on the BLOCKS

and then on OB1.

• A window will open in which you can write a program.

Page 13: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 13/24

11. REMOVING COMMENTS:

Comments may be written in blank fields on the main window but this option usuallydistracts beginners so just go to VIEW option in the project window and then to

DISPLAY WITH and uncheck COMMENTS. Now you can program easily.

Page 14: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 14/24

12. WRITING A PROGRAM IN LADDER LOGIC:

Now we have to write a simple program to check our connectivity with PLC.

For writing the program, follow with the given steps.• Click on the long circuit line and then go the side column and double click the

BIT LOGIC folder.

Page 15: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 15/24

• Double click on the first symbol that is NORMALLY OPEN CONTACT used for

input. You may see that this symbol has been inserted in the wire.

Page 16: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 16/24

• Now, again click on the rest of the circuit line and then go to BIT LOGIC.

• Double click the fourth symbol that is COIL used for output. It is also inserted

at the end of the circuit line.

Page 17: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 17/24

13. ADDRESSING INPUTS AND OUTPUTS:

Addressing is the major step in writing a program for PLC. It is very simple but we

have to take care that which port or switch is to be made an input or output port orswitch.

• Click on the red question marks given exactly above the symbol of NORMALY

OPEN CONTACT, and click on them. Write the address of switch you want touse as an input e.g. I126.0 whereas I is always written to denote inputs.

Page 18: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 18/24

• After this, do the same with the output COIL, but with address don’t forget to

write Q that denotes the outputs e.g. Q124.0.

Page 19: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 19/24

• Now the addressing is complete. If address is written in red color that meansthere is some error.

• Just save the program.

Page 20: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 20/24

14. CLEARING PREVIOUS MEMORY OF PLC:

This step should be done with care. This is always required to be performed before

writing a new program in the PLC’s memory. There is an OPERATING MODESWITCH given on PLC. You will have to use that switch to reset the memory.

• Turn the operating mode switch to the MRES position and hold it there for at

least 3 seconds until the red STOP LED starts flashing slowly.

• Release the switch and, after a maximum of 3 seconds, turn it to the MRES

position again. When the STOP LED flashes quickly, the CPU has been reset.

• If the STOP LED does not start flashing quickly, repeat the procedure.

15. DOWNLOADING THE PROGRAM:

• Now turn the operating mode switch to STOP again to download the program.

Page 21: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 21/24

• Go to the computer and open the PROJECT WINDOW in which you have

also written your program.

• Click on the PLC option in the main pallet and then select DOWNLOAD.

• Wait for the message describing completion of downloading.

16. CREATING AN ONLINE CONTACT:Online contact helps us to check the instantaneous status of the hard ware. We cansee each and every step of our program while running.

• Go to SIMATIC MANAGER window and search for the icon in the main pallet

showing symbolic description of two computers connected with a wire. Click

on this icon and it will open a new window for you.

• In the new window, select OB1 and your project window will be opened.

Page 22: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 22/24

• At the bottom of this window, status of operating mode switch will be shown.

If is there, it means you are online.

Page 23: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 23/24

17. RUNNING THE PROGRAM:

Go to PLC and set the OPERATING MODE SWITCH to run.

18. MONITORING EXECUTION OF THE PROGRAM:Now you have to monitor your program’s working and efficiency. For this, you will

have to select the monitoring option.

• Go to the Project Window and click on the icon showing spectacles.

• If at the bottom of window, a line showing run status is moving, that meansyou are monitoring your program.

• Go to hardware and switch on the input switch 126.0 and see what happens.

• If light at output 124.0 turns on, it means that you have been successful in

interfacing the PLC and computer.

19. POSSIBLE ERRORS:

There are some problems which may occur during interfacing. For your conveniencethese problems have been discussed briefly and their solutions have been described.

• First problem is the display of COMMUNICATION ERROR during

interfacing. To avoid it, restart your computer and open the BIOS settings.

Page 24: s7-300 Interfacing Manual

8/8/2019 s7-300 Interfacing Manual

http://slidepdf.com/reader/full/s7-300-interfacing-manual 24/24

Just change the serial comport address and this problem will never occuragain.