วันอังคารที่ 13 พฤศจิกายน พ.ศ. 2555

How to program a Siemens S7-300 Programmable Logic Controller

Do you have a Siemens S7-300 Programmable Logic Controller that you are not well-known with but you need to program it Now! Following is a quick set of instructions I have put together to help you get started programming a Siemens S7-300 Plc.

After loading the programming software and connecting a Siemens Mpi cable in the middle of your programming computer and the Plc, open Simatic boss by clicking the icon on the desktop. The Step 7 Wizard: "New Project" window will open. It is easier to use the Wizard to setup communications with your Plc, but I chose to take the scenic route. I figured I would learn more this way. So, close the Step 7 Wizard window by clicking Cancel. If there are any other windows or projects open, close them. We want to start with a totally new program.

Rack Rails

Create a new scheme by clicking the new scheme button on the toolbar in the upper left corner of your screen.

The New scheme window opens. Here you will see any existing programs located on your computer. Near the bottom of the window, you will see the Name: input form. Type anyone you want to name your new scheme and click Ok.

A new window will open showing the name of your scheme at the top. You will also see your scheme in the window on the left hand side of the screen at the top. Right click your scheme and pick "Insert New Object". pick the device you will be programming. We will be using the Simatic 300 center so pick that selection.

You will now see Simatic 300 appear in the right window of your screen. It should be highlighted blue. Click in any place in the window to make the blue go away. Duplicate click Simatic 300 and it will move to the left window and "Hardware" will appear in the right window.

Double click "Hardware" and two (maybe three) new windows will open. On the left will be Simatic 300 - (the name of your project). The window on the right will be the catalog of parts.

Look in the right window, the parts catalog, and click the plus sign beside Simatic 300.

Click the plus sign beside Rack - 300. Click and drag the Rail onto the left window. You will now see the Slots window appear. This is where we will place our Plc components.

We will first pick our Cpu. Finding at the parts catalog, in the Simatic 300 tree, pick the Cpu that you are using. We are using the Cpu - 300 so click the plus sign beside that choice.

Now look at the front top left of your Plc. This is where you will find the Plc model. I will use Cpu313C-2 Dp as an example since this is the model Plc that I use.

Find this Cpu in your parts catalog and click the plus sign. You will now see some part numbers.

Look back at your Plc. Uncover the door surface the Mpi port. This will be the bottom left side of the Plc. At the bottom of the door you will find the part number. The part estimate for the Plc I am using as an example is 313-6Cf03-0Ab0.

Find this part estimate in the parts catalog. You will consideration this is someone else folder. Open it and you will see V2.0 and V2.6. Look back at the Plc, open the door surface the Mpi port, and right above the Mpi port you will see V2.6.3.

Go back to the parts catalog and click V2.6. consideration how a slot in the left hand window will highlight green. I believe it will be slot #2. (Slot #1 is reserved for power supplies.) This is where you will drag and drop your Cpu. (Notice the software will not let you put the Cpu in any other slot but slot #2.)

When you publish the mouse button over slot #2, a new window will open, "Properties - Profibus interface". Click new, a new window opens, click Ok, and then click Ok again. We are not setting up a network at this time.

You will now see your Cpu and related hardware listed.

Double click in the Slot that list your Di16/Do16 (Digital Input/Digital Output).

A window with three tabs will open. The first tab will be General, the second tab will be Addresses and the third tab will be Inputs.

Open the tab "Addresses". We need to convert the default addresses. Do this by unchecking the ideas Default button and changing 124 (or anyone address you have) to 0. Do this for both the Inputs and Outputs.

We now need to convert the Node Address. Go back to the window where you Duplicate clicked Di16/Do16 and Duplicate click in Slot 2, the Cpu 313-2Dp slot.

The Properties - Cpu 313C-2Dp window will open.

Look down the window a small over half way and find the Interface area and click on Properties. someone else window, "Properties - Mpi interface Cpu 313-2Dp" will open.
Change the address to meet your specific criteria. I know that my laptop, which I am using to program my Plc, is always addressed as 1 and my target Plc is usually addressed as 2. You will probably be the same.

Now click Mpi(1) and click Ok. Click Ok again to close the Properties window.

Save and Compile by clicking the icon located on the left of the toolbar.

Download the hardware configuration to the Plc by clicking the download icon located on the toolbar.

A window titled "Select Target Module" should open. Click Ok.

Another window titled "Select Node Address" will open. You should see listed your node address for the Plc you are working with as you configured it in a old step. If not, click view and click on anyone node address appears and click Ok.

Switch back to Simatic boss (by clicking the tab on the taskbar).

Click on Options. pick Set Pg/Pc Interface. pick Pc Adapter (Auto).

Click Properties. A new window will open, displaying either self-acting Bus Profile Detection or Local Connection. Click Local connection and pick Usb. Now pick self-acting Bus Profile Detection and convert the address to 30. You can check your connection now by clicking Start Network Detection. If a new window opens displaying Network Type = Mpi, Transmission Rate = 187.5kbps, you have established communications with your S7-300. Click Close. Click Ok. Click Ok.

It is now time to start programming. Finding at the Simatic boss window, click the plus sign located beside Simatic 300(1), click the plus sign beside Cpu 313C-2Dp, click the plus sign beside S7 Program(1). Now click on Blocks and you will see ideas data and Ob1 appear in the right window on your screen.

Double click on Ob1 and a new window will open named Properties - assosication Block

Here you can pick how you want to program, in Lad (ladder), Stl (statement list), or Fbd (function block diagram). pick which you want to use and click Ok.

Double click Ob1 again and the Lad/Stl/Fbd programming window will open.

You can now start programming.

I have these same instructions with pictures on my website at http://www.saturdayafternoonhobbies.com

How to program a Siemens S7-300 Programmable Logic Controller

My Links : KVM Switch Kit Hit Camera

ไม่มีความคิดเห็น:

แสดงความคิดเห็น