Vous êtes sur la page 1sur 24

PLC INTERFACING MANUAL

SIEMENS S7-300
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 and
output modules (I/O modules).

The programmable logic controller (PLC) monitors and controls your machine with
the S7 program. The I/O modules are addressed in the S7 program via the
addresses.
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 hardware
requirements. You can find these in the Readme.wri on the STEP 7 CD under
<Drive>:/STEP 7 /Disk1.
• If you need to install STEP 7 first, insert the STEP 7 CD in the CD-ROM
drive now. The installation program starts automatically. Follow the
instructions on the screen.
• Once the installation is complete and you have restarted the computer, the
SIMATIC Manager icon will appear on your Windows desktop.
• If you double-click the SIMATIC Manager icon following installation, the
STEP 7 Wizard will be started automatically.

3. STARTING WITH SIMATIC MANAGER:


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 when
creating a STEP 7 project.

The project structure is used to store and arrange all the data and programs in
order.
• Double-click the SIMATIC Manager icon. The STEP 7 Wizard is activated.
• If it is not activated then go to FILE and select NEW PROJECT WIZARD.

4. SELECTING TYPE OF HARDWARE:


• 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.
6. PROGRAMMING IN LADDER LOGIC:
Now you have three options to choose one in which you want to program your
project.
These languages are
• LAD (Ladder Logic)
• STL (Statement List)
• FBD (Function block Diagram)
For simplicity, you have to choose LAD.
7. NAMING THE PROJECT:
Just write the name of your project and click MAKE and a blank project will be
prepared for you to use.

8. CHANGING THE DEFAULT LANGUAGE:


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 all
the requirements for this.

The hardware is configured with STEP 7. These configuration data are transferred to
the programmable controller later on "downloading".
Open the SIMATIC 300 Station folder and double-click the Hardware symbol.
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 insert
in the required slot.
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.
• 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.
• Go to STATION and then SAVE and COMPILE.
• 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 when
creating 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.


11. REMOVING COMMENTS:
Comments may be written in blank fields on the main window but this option usually
distracts beginners so just go to VIEW option in the project window and then to
DISPLAY WITH and uncheck COMMENTS. Now you can program easily.
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.
• 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.
• 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.
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 or
switch.
• 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 to
use as an input e.g. I126.0 whereas I is always written to denote inputs.
• 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.
• Now the addressing is complete. If address is written in red color that means
there is some error.
• Just save the program.
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 MODE
SWITCH 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.
• 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 can
see 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.
• At the bottom of this window, status of operating mode switch will be shown.
If is there, it means you are online.
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 means
you 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 convenience
these 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.
Just change the serial comport address and this problem will never occur
again.