Siemens SIMATIC S7-200 Manual

Siemens SIMATIC S7-200 Manual

Microsystem
Hide thumbs Also See for SIMATIC S7-200:

Advertisement

s
Microsystem
SIMATIC S7-200
One HourPrimer
7/99

Advertisement

Table of Contents
loading

Summary of Contents for Siemens SIMATIC S7-200

  • Page 1 Microsystem SIMATIC S7-200 One HourPrimer 7/99...
  • Page 2 It is not a substitute for the S7-200 manual. Therefore, please observe the instructions given in the S7-200 manual, especially the safety guidelines. SIMATIC® and SIMATIC NET® are registered trademarks of Siemens AG. Trademarks Third parties using for their own purposes any other names in this document which refer to trademarks might infringe upon the rights of the trademark owners.
  • Page 3 3UDFWLFH H[DPSOHV Practice examples for the 1 Hour Primer can be found in the directory: "PRIM_200/1H_EX/"...
  • Page 4 Contents of the S7-200 Starter Kit Item Quantity available S7-200 CPU 221 Relay Simulator for CPU 221 Software STEP 7-Micro/WIN 32 (V 3) Training Model on Mounting Rail PC/PPI Cable S7-200 Documentation One Hour Primer incl. Exercise Diskette Screw driver Edition 07/1999...
  • Page 5 Preface Dear S7-200 User, The use of programmable controllers (PLC) in automation is constantly on the increase as the pressure to reduce costs in the production process rises. The fast pace of technical development is another reason why more and more automation problems are being solved with programmable controllers.
  • Page 6 Basic 1st Exercise More Hardware Software Appendix Program Exercises Settings...
  • Page 7: Table Of Contents

    Table of Contents Setting up the Hardware (Assembly) Structure of an S7-200 (CPU 221) PLC Hardware Wiring of the Training Assembly Circuit Diagram of the Training Assembly Terminal Diagram of the S7-200 (CPU 221) Installing the Software on Windows 95/98/NT Starting STEP 7-Micro/WIN Software The Help System...
  • Page 8 Basic 1st Exercise More Hardware Software Appendix Settings Program Exercises...
  • Page 9: Setting Up The Hardware (Assembly)

    Setting up the Hardware (Assembly) Mounting rail Base plate 1. Mount the enclosed mounting rail on a base plate as shown in the drawing. S7-200 Training model Simulator 2. Mount the simulator on the input terminal block of the S7-200. The input terminal block is the terminal block on the underside of the PLC.
  • Page 10 Structure of a S7-200 (CPU 221) Output Power terminals Supply Mode selector switch STOP, TERM, RUN Port for expansion modules (not with CPU 221) Analog potentiometer Programming Input Output for sensors interface port (PPI) Terminals DC 24 V /180 mA Basic 1st Exercise More...
  • Page 11 Wiring of the Exercise Assembly Warning Training Danger of injury model and material damage. Ground (blue) On/off Direction reversal Power supply: (black) 85 to 264 V AC / 47 to 63 Hz (red) Always connect PE ! grey A0.0 0.1 0.2 PE N S7-200 (CPU 221) 6ES7 211-0BA20-0XB0...
  • Page 12: Circuit Diagram Of The Training Assembly

    Circuit Diagram of the Training Assembly Training model DC 24 V Power supply 85 to 264 V AC/ 47 to 63 Hz Always connect PE ! Contacts of the internal relay outputs A0.0 0.1 0.2 S7-200 CPU 221 6ES7 211-0BA20-0XB0 24 V inputs (input signals 0 to 24 V DC) E0.0 L+ Sensor Supply...
  • Page 13: Terminal Diagram Of The S7-200 (Cpu 221)

    Terminal Diagram of the S7-200 (CPU 221) 6 relay outputs A0.0 to A0.5 Power supply (24 V DC/ 24 to 230 V AC max. 2 A) (85 to 264 V AC) Output side 1L 0.0 0.1 0.2 1M 0.0 0.1 0.2 0.3 2M 0.4 0.5 Input side Power supply 24 V DC/ 180 mA...
  • Page 14 Basic 1st Exercise More Hardware Software Appendix Settings Programm Exercises...
  • Page 15: Installing The Software On Windows 95/98/Nt

    (PG) with a Microsoft operating system. The software will run on Windows 95, Windows 98 and Windows NT 4.0. 1. Insert the CD ROM or diskette 1 in your computer when it is running. SIEMENS PG / PC 2. Call up the start menu by selecting Start from the task bar.
  • Page 16: Starting Step 7-Micro/Win

    Starting STEP 7-Micro/WIN Windows 95 / 98 / NT In the folder Simatic , which you can call up from the Start menu, you will find the folder STEP 7-Micro/WIN 32 V3.0 . This folder contains the start icons for STEP 7-Micro/WIN 32 . The program is started by clicking these icons.
  • Page 17: The Help System

    The Help System STEP 7-Micro/WIN has a powerful online help system similar to other Windows applications. By selecting the menu item Help you can call up information on the Contents or the Instruction Sets of STEP 7-Micro/WIN. If your computer has access to the Internet you can download or retrieve information about catalogs, tips and tricks, etc., using the S7-200 on the Web menu item in the Help menu, Basic 1st Exercise...
  • Page 18 Basic 1st Exercise More Hardware Software Appendix Settings Program Exercises...
  • Page 19: Setting The Transmission Rate

    6HWWLQJ WKH 7UDQVPLVVLRQ 5DWH 3*3& 6 &38 56 & &20&20 SRUW 3&33, FDEOH ',3 VZLWFK ÃÃÃÃÃ!ÃÃÃÃÃ"ÃÃÃÃÃ# VHWWLQJ   ELWV 7KH 3&33, FDEOH FRQQHFWV WKH 3& WR WKH 6 3/& 2Q \RXU SURJUDPPLQJ GHYLFH3& \RX VKRXOG XVH WKH VHULDO SRUW ZLWK WKH SLQ VXE ' VRFNHW RU WKH SLQ VXE ' VRFNHW ZLWK DQ DGDSWHU  HJ &20  7KH 6 VHQGV DQG UHFHLYHV GDWD DW  ELWV 3OHDVH UHIHU WR WKH GLDJUDP DERYH WR VHW WKH WUDQVPLVVLRQ UDWH RQ WKH 3&33, 7KHQ SOXJ WKH 3&33, FDEOH LQWR WKH 3&...
  • Page 20 &RQILJXULQJ WKH 3RUW IRU WKH 3*3&  &OLFN WR WKH &RPPXQLFDWLRQV LFRQ LQ WKH QDYLJDWLRQ EDU  &KHFN WKH FRPPXQLFDWLRQV VHWWLQJV  5HIUHVK WKH FRPPXQLFDWLRQV E\ GRXEOHFOLFNLQJ WKH FRUUHVSRQGLQJ ILHOG 7KH FRQQHFWHG &38 VKRXOG QRZ EH UHFRJQL]HG DQG UHJLVWHUHG DXWRPDWLFDOO\  ,I WKH &38 KDV QRW EHHQ UHFRJQL]HG RU LI D SRSXS ZLQGRZ WHOOV \RX WKDW FRPPXQLFDWLRQ LV QRW SRVVLEOH GRXEOHFOLFN WKH ILHOG 3&33, FDEOH  0DUN 3&33, FDEOH LQ WKH 3*3&...
  • Page 21 )LUVW )XQFWLRQ 7HVW 2QO\ LQ WKH 7(50 RU 581 SRVLWLRQ LV UHPRWH FRQWURO RI  6HW WKH PRGH VHOHFWRU RI WKH 3/& WR WKH 7HUP RU 581 WKH RSHUDWLQJ PRGH 581 RU SRVLWLRQ 7KH PRGH VHOHFWRU LV ORFDWHG 6723 IURP WKH 3&3* EHKLQG WKH VPDOO FRYHU DW WKH IURQW VLGH RI WKH &38 SRVVLEOH 7(50...
  • Page 22 %DVLF VW ([HUFLVH 0RUH +DUGZDUH 6RIWZDUH $SSHQGL[ 6HWWLQJV 3URJUDP ([HUFLVH...
  • Page 23: Writing Your First Program

    Writing Your First Program Great, the first functionabality test has been successfully performed. The controller is up and running and the data transmission to the PLC works. But how do I write a program? Now you will quickly learn how to program the basic functions of the PLC in small steps using the small exercise program on the diskette supplied as a basis.
  • Page 24: Opening The 1St Exercise Program

    Opening the 1st Exercise Program 3.5” diskette drive 1. Insert the exercise diskette from the starter kit in your 3.5” diskette drive. The diskette is in the envelope on the last page of the manual. From the menu item Project > Open load the 1st exercise program from the diskette into the STEP 7-Micro/WIN Editor.
  • Page 25: Downloading The 1St Exercise Program

    Downloading the 1st Exercise Program It is only possible to transfer a program to the S7-200 in STOP mode ! Click this icon with the mouse to switch the PLC to STOP mode when the mode selector on the PLC is set to TERM or RUN and the PLC was in RUN mode (LED STOP lights up).
  • Page 26: Function And Test Of The 1St Exercise Program

    Function and Test of the 1st Exercise Program In exercise program 1, switch S0 is to 24 V DC from Sensor Power Supply be used in order to switch on a motor. of the S7-200 Switch S1 is used to control the direction of rotation of the motor.
  • Page 27: Ladder Logic Elements

    Ladder Logic Elements Contactor Instruction on the PLC/ corresponding function Scan: Is current flowing ? If yes, then the result of the scan is true. (Result is “1”) Scan: Is no current flowing ? If yes (no current), then the result of the scan is true.
  • Page 28: Transforming A Circuit Diagram

    Transforming a Circuit Diagram E0.0 E0.1 S7-200 A0.0 A0.1 Circuit without PLC Power rail phase E0.1 A0.1 Change in direction of Motor on/off: E0.0 A0.0 rotation: Switch S1 is Switch S0 is connected to connected to input E0.1 of input E0.0. In our example, the PLC.
  • Page 29: Elements Of The 1St Exercise Program

    Elements of Exercise Program 1 Let’s have a closer look at the structure of the PLC program in ladder diagram (LAD). This type of representation most closely resembles the circuit diagram. Ladder representation of program E.PRJ This is a network “Motor comment.
  • Page 30: Status View (Online)

    Status View (online) Select the menu item Debug > Ladder Status to activate the status view of the ladder diagram type of representation. You can now view the status of the operands in the PLC. In the example, switch S0 is connected to input 0.0.
  • Page 31: Statements

    Statements Control Statements The control statement is the smallest unit of a PLC user program. A statement consists of an operation part and an operand part. E0.0 Operation Operand (Do what ?) (... to what ?) The operand part of a statement (in this case The operation part of a statement (in this input 0.0) contains the additional information case an AND logic operation) determines...
  • Page 32 Basic 1st Exercise More Hardware Software Appendix Settings Program Exercises...
  • Page 33: 1St Program Modification: And Logic Operation

    1. Program Modification: AND Logic Operation Objective: Switch S2 is to be actuated in addition to switch S0 in the exercise program, in order to switch on the fan motor. As before, switch S1 will be used to reverse the direction of rotation of the fan motor.
  • Page 34: Inserting A Logic Gate

    Inserting a Logic Gate If you want to connect a further normally-open contact for input E0.2 in series between normally-open contact E0.0 and coil A0.0 (i.e. insert an AND link between E0.0 and E0.2), you first need a free location. Mark the position in the ladder diagram located just before where you want to insert the function.
  • Page 35: Entering The Operand And Testing

    Entering the Operand and Testing When the new element has been inserted, you just need to specify the correct operand. Click with the mouse into the operand field and input the operand. In our case this is: E0.2. Confirm the input with the Enter key. Don’t forget to save your changes! If you want to enter or change the operand later, you can select it again at any time by clicking...
  • Page 36: Deleting

    Deleting ... Logic gates If you want to delete a logic gate again, select the corresponding gate with the mouse and press the DEL key. To close the current path again, you must establish a connection again. Columns, rows, networks and lines If you want to delete a column, row, line or network proceed as follows: Select the desired object.
  • Page 37: 2Nd Program Modification: Or Logic Operation

    2nd Program Modification: OR Logic Operation Objective: Switches S0 und S2 in the exercise program are to be actuated in order to switch on the motor. Switch S3 alone is to be used as an alternative in order to switch on the motor. Switch S1 is to be used to reverse the direction of rotation of the fan.
  • Page 38: Inserting An Or Element

    Inserting an OR Element Select with the mouse a free position in the same network and insert a normally-open contact in the following line. Click with the mouse the Line up symbol in the LAD tool bar. Now the OR Element is complete. Your program is now as shown on the previous page.
  • Page 39 3. Program Modification: On-Delay Timer Objective: In the following program modification, a time is to be inserted in exercise program 1 as an on-delay. When input E0.3 (S3) is activated on the simulator, a waiting time is started. Output 0.0, and thus the motor, is not activated until the waiting time has expired.
  • Page 40: The On-Delay Timer Function

    The On-Delay Timer Function You require an on-delay of 1 s. The S7-200 (CPU 221) control has 256 timers. The timers have the designations T0 to T255. Use T34 in this example. Before the timer will run, it must be started.
  • Page 41: Programming The On-Delay Timer

    Programming the On-Delay Timer Using Toolbar To be able to evaluate the timer to be inserted in our OR logic opera- tion, you must program the timer yourself in a previous network. First of all insert a normally-open contact for input E0.3 in the first column of the new network 1.
  • Page 42: Plain Speaking

    “Plain Speaking (1)” So far you have been working in the PLC program with operands in the “PLC language” such as E0.3 or T34, but if the program is longer, it is not easy to read with these operands. It would be a good idea if we could have the switch designations or some other plain text. This is exactly what you can do with symbolic programming.
  • Page 43 “Plain Speaking (2)” With the menu item View > Symbolic Addressing you can switch to the display mode for symbolic addressing. If you have selected the symbolic addressing and changed to LAD, STL or FBD, the symbolic addresses should now be visible.
  • Page 44: Creating A New Project

    Creating a New Project (1) If you want to write a new program of your own, you need a sort of container to put your program file in. In STEP 7-Micro/WIN, this container is the project. A S7-200 project contains, next to the program file, all additional information to your project, as it is, for example, symbol table, comments etc.
  • Page 45 Creating a New Project (2) Save Project1 immediately or after or during programming under a name that means something to you. With menu File > Save As... you have the relevant input box displayed. In this box you can give a name to your project and select the hard disk drive and the path/folder where you want to store your project.
  • Page 46 Basic 1st Exercise More Hardware Software Appendix Settings Program Exercises...
  • Page 47: Congratulations

    Congratulations, now you know how to program the Micro PLC S7-200. If you want to learn more, you will find useful information in the appendix. Basic 1st Exercise More Hardware Software Appendix Settings Program Exercise...
  • Page 48 Basic 1st Exercise More Hardware Software Appendix Settings Program Exercise...
  • Page 49 “Tips & Tricks” from your SIMATIC representative. You will find more information in the manuals for the S7-200. For further training you can attend a S7-200 course in your Siemens Training Center or with your SIMATIC representative. Unanswered questions? Technical problems? The SIMATIC representatives will be glad to help.
  • Page 50 Basic 1st Exercise More Hardware Software Appendix Settings Program Exercise...
  • Page 51 Appendix Basic 1st Exercise More Hardware Software Appendix Settings Program Exercises...
  • Page 52: Of Bits, Bytes And Words

    Of Bits, Bytes and Words The smallest unit of information in a digital system is known as a “bit”. A bit can only have the states “0” (i.e. false or untrue) or “1” (i.e. true). A light switch, for example, only has the states “light on” or “light off”, i.e. the value of the light switch in answer to the question “Is the light on?”...
  • Page 53: Address Areas Of The S7-200

    Address Areas of the S7-200 Address areas of an S7-200 PLC with CPU 221 Byte address Bit address (corresponds to the exponent of the bit value) Inputs: Onboard inputs (E0.0 to E0.5) Address area of expansion modules for CPU 221 not possible as no expansion modules can be connected.
  • Page 54: Cyclic Program Execution In The S7-200 Plc

    Cyclic Program Execution in the S7-200 PLC Begin of cycle Inputs Process-image input table STEP 7 program, - Bit memories - Timers - Counters - ... Process image output table Outputs End of cycle All SIMATIC PLCs operate cyclically. During each cycle, the switch states are first read in from the inputs, and then stored in the process-image input table.
  • Page 55 Siemens AG Fax: +49 911 895-2786 A&D AS MVM Gleiwitzer Str. 555 90475 Nuremberg Federal Republic of Germany Response to the "One Hour Primer" Dear user of the Micro PLC S7-200 We created the One Hour Primer so that, together with the Starter Kit, you can learn to use the Micro PLC S7-200 within a very short time.

Table of Contents