Docsity
Docsity

Prepare-se para as provas
Prepare-se para as provas

Estude fácil! Tem muito documento disponível na Docsity


Ganhe pontos para baixar
Ganhe pontos para baixar

Ganhe pontos ajudando outros esrudantes ou compre um plano Premium


Guias e Dicas
Guias e Dicas

SIMATIC S7-200 Programmable Controller, Notas de estudo de Cultura

Introducing the S7-200 Micro PLC Installing an S7-200 Micro PLC Installing and Using the STEP 7-Micro/WIN Software Getting Started with a Sample Program Additional Features of STEP 7-Micro/WIN Basic Concepts for Programming an S7-200 CPU CPU Memory: Data Types and Addressing Modes Input/Output Control Network Communications and the S7-200 CPU Instruction Set S7-200 Data Sheets Power Calculation Table Error Codes Special Memory (SM) Bits Using STEP 7-Micro/WIN with STEP 7 and STEP 7

Tipologia: Notas de estudo

2010

Compartilhado em 04/02/2010

sergio-henrique-de-paula-5
sergio-henrique-de-paula-5 🇧🇷

4.6

(158)

117 documentos

Pré-visualização parcial do texto

Baixe SIMATIC S7-200 Programmable Controller e outras Notas de estudo em PDF para Cultura, somente na Docsity! Preface, Contents Introducing the S7-200 Micro PLC 1 Installing an S7-200 Micro PLC 2 Installing and Using the STEP 7-Micro/WIN Software 3 Getting Started with a Sample Program 4 Additional Features of STEP 7-Micro/WIN 5 Basic Concepts for Programming an S7-200 CPU 6 CPU Memory: Data Types and Addressing Modes 7 Input/Output Control 8 Network Communications and the S7-200 CPU 9 Instruction Set 10 Appendix S7-200 Data Sheets A Power Calculation Table B Error Codes C Special Memory (SM) Bits D How STEP 7-Micro/WIN Works with Other STEP 7 Programming Products E Execution Times for STL Instructions F S7-200 Order Numbers G S7-200 Troubleshooting Guide H Index S7-200 Programmable Controller System Manual This manual has the order number: 6ES7298-8FA01-8BH0 SIMATIC ii ier tragen Sie Ihren Buchtitel ein --- C79000 G7076 C230 02 This manual contains notices which you should observe to ensure your own personal safety, as well as to protect the product and connected equipment. These notices are highlighted in the manual by a warning triangle and are marked as follows according to the level of danger: ! Danger indicates that death, severe personal injury or substantial property damage will result if proper precautions are not taken. ! Warning indicates that death, severe personal injury or substantial property damage can result if proper precautions are not taken. ! Caution indicates that minor personal injury or property damage can result if proper precautions are not taken. The device/system may only be set up and operated in conjunction with this manual. Only qualified personnel should be allowed to install and work on this equipment. Qualified persons are defined as persons who are authorized to commission, to ground, and to tag circuits, equipment, and systems in accordance with established safety practices and standards. Note the following: ! Warning This device and its components may only be used for the applications described in the catalog or the technical description, and only in connection with devices or components from other manufacturers which have been approved or recommended by Siemens. This product can only function correctly and safely if it is transported, stored, set up, and installed correctly, and operated and maintained as recommended. SIMATIC, SIMATIC NET and SIMATIC HMI are registered trademarks of Siemens AG. STEP7 and S7 are trademarks of Siemens AG. Microsoft, Windows, Windows 95, and Windows NT are registered trademarks of Microsoft Corporation. Underwriters Laboratories is a trademark of Underwriters Laboratories, Inc. We have checked the contents of this manual for agreement with the hardware and software described. Since deviations cannot be pre- cluded entirely, we cannot guarantee full agreement. However, the data in this manual are reviewed regularly and any necessary cor- rections included in subsequent editions. Suggestions for improve- ment are welcomed. Technical data subject to change.  Siemens AG 1998 Disclaimer of Liability Copyright Siemens AG 1998 All rights reserved. The reproduction, transmission or use of this document or its contents is not permitted without express written authority. Offenders will be liable for damages. All rights, including rights created by patent grant or registration of a utility model or design, are reserved. Siemens AG Bereich Automatisierungs- und Antriebstechnik Geschaeftsgebiet Industrie-Automatisierungssysteme Postfach 4848, D-90327 Nuernberg Siemens Aktiengesellschaft 6ES7 298-8FA01-8BH0 Safety Guidelines Qualified Personnel Correct Usage Trademarks v S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Contents 1 Introducing the S7-200 Micro PLC 1-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1 Comparing the Features of the S7-200 Micro PLCs 1-2. . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Major Components of the S7-200 Micro PLC 1-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Installing an S7-200 Micro PLC 2-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 Panel Layout Considerations 2-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Installing and Removing an S7-200 Micro PLC 2-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Installing the Field Wiring 2-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4 Using Suppression Circuits 2-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5 Power Considerations 2-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Installing and Using the STEP 7-Micro/WIN Software 3-1. . . . . . . . . . . . . . . . . . . . . . . 3.1 Installing the STEP 7-Micro/WIN Software 3-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Using STEP 7-Micro/WIN to Set Up the Communications Hardware 3-4. . . . . . . . . . . 3.3 Establishing Communication with the S7-200 CPU 3-7. . . . . . . . . . . . . . . . . . . . . . . . . . 3.4 Configuring the Preferences for STEP 7-Micro/WIN 3-25. . . . . . . . . . . . . . . . . . . . . . . . . . 3.5 Creating and Saving a Project 3-26. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6 Creating a Program 3-27. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.7 Creating a Data Block 3-32. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.8 Using the Status Chart 3-34. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.9 Using Symbolic Addressing 3-36. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Getting Started with a Sample Program 4-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Creating a Program for a Sample Application 4-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Task: Create a Project 4-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Task: Create a Symbol Table 4-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4 Task: Enter the Program in Ladder Logic 4-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5 Task: Create a Status Chart 4-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.6 Task: Download and Monitor the Sample Program 4-15. . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Additional Features of STEP 7-Micro/WIN 5-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1 Using the TD 200 Wizard to Configure the TD 200 Operator Interface 5-2. . . . . . . . . . 5.2 Using the S7-200 Instruction Wizard 5-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3 Using the Analog Input Filtering Instruction Wizard 5-14. . . . . . . . . . . . . . . . . . . . . . . . . . 5.4 Using Cross Reference 5-17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.5 Using Element Usage 5-18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi S7-200 Programmable Controller System Manual C79000-G7076-C230-02 5.6 Using Find/Replace 5-19. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.7 Documenting Your Program 5-21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.8 Printing Your Program 5-23. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Basic Concepts for Programming an S7-200 CPU 6-1. . . . . . . . . . . . . . . . . . . . . . . . . . 6.1 Guidelines for Designing a Micro PLC System 6-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 Concepts of an S7-200 Program 6-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3 Concepts of the S7-200 Programming Languages 6-5. . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4 Basic Elements for Constructing a Program 6-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.5 Understanding the Scan Cycle of the CPU 6-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.6 Selecting the Mode of Operation for the CPU 6-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.7 Creating a Password for the CPU 6-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.8 Debugging and Monitoring Your Program 6-16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.9 Error Handling for the S7-200 CPU 6-19. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 CPU Memory: Data Types and Addressing Modes 7-1. . . . . . . . . . . . . . . . . . . . . . . . . 7.1 Direct Addressing of the CPU Memory Areas 7-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2 Indirect Addressing of the CPU Memory Areas 7-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3 Memory Retention for the S7-200 CPU 7-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4 Using Your Program to Store Data Permanently 7-16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.5 Using a Memory Cartridge to Store Your Program 7-17. . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Input/Output Control 8-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1 Local I/O and Expansion I/O 8-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2 Using the Selectable Input Filter to Provide Noise Rejection 8-5. . . . . . . . . . . . . . . . . . 8.3 Using the Output Table to Configure the States of the Outputs 8-6. . . . . . . . . . . . . . . . 8.4 High-Speed I/O 8-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.5 Analog Adjustments 8-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Network Communications and the S7-200 CPU 9-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.1 Communication Capabilities of the S7-200 CPU 9-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.2 Communication Network Components 9-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.3 Data Communications Using the PC/PPI Cable 9-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.4 Data Communications Using the MPI or CP Card 9-13. . . . . . . . . . . . . . . . . . . . . . . . . . . 9.5 Distributed Peripheral (DP) Standard Communications 9-15. . . . . . . . . . . . . . . . . . . . . . . 9.6 Network Performance 9-28. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Instruction Set 10-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.1 Valid Ranges for the S7-200 CPUs 10-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2 Contact Instructions 10-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.3 Comparison Contact Instructions 10-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.4 Output Instructions 10-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Contents vii S7-200 Programmable Controller System Manual C79000-G7076-C230-02 10.5 Timer, Counter, High-Speed Counter, High-Speed Output, Clock, and Pulse Instructions 10-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.6 Math and PID Loop Control Instructions 10-50. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.7 Increment and Decrement Instructions 10-66. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.8 Move, Fill, and Table Instructions 10-68. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.9 Shift and Rotate Instructions 10-78. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.10 Program Control Instructions 10-84. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.11 Logic Stack Instructions 10-99. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.12 Logic Operations 10-102. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.13 Conversion Instructions 10-108. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.14 Interrupt and Communications Instructions 10-114. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A S7-200 Data Sheets A-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.1 General Technical Specifications A-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.2 CPU 212 DC Power Supply, DC Inputs, DC Outputs A-6. . . . . . . . . . . . . . . . . . . . . . . . . A.3 CPU 212 AC Power Supply, DC Inputs, Relay Outputs A-8. . . . . . . . . . . . . . . . . . . . . . . A.4 CPU 212 24 VAC Power Supply, DC Inputs, Relay Outputs A-10. . . . . . . . . . . . . . . . . . . A.5 CPU 212 AC Power Supply, AC Inputs, AC Outputs A-12. . . . . . . . . . . . . . . . . . . . . . . . . A.6 CPU 212 AC Power Supply, Sourcing DC Inputs, Relay Outputs A-14. . . . . . . . . . . . . . A.7 CPU 212 AC Power Supply, 24 VAC Inputs, AC Outputs A-16. . . . . . . . . . . . . . . . . . . . . A.8 CPU 212 AC Power Supply, AC Inputs, Relay Outputs A-18. . . . . . . . . . . . . . . . . . . . . . . A.9 CPU 214 DC Power Supply, DC Inputs, DC Outputs A-20. . . . . . . . . . . . . . . . . . . . . . . . . A.10 CPU 214 AC Power Supply, DC Inputs, Relay Outputs A-22. . . . . . . . . . . . . . . . . . . . . . . A.11 CPU 214 AC Power Supply, AC Inputs, AC Outputs A-24. . . . . . . . . . . . . . . . . . . . . . . . . A.12 CPU 214 AC Power Supply, Sourcing DC Inputs, Relay Outputs A-26. . . . . . . . . . . . . . A.13 CPU 214 AC Power Supply, 24 VAC Inputs, AC Outputs A-28. . . . . . . . . . . . . . . . . . . . . A.14 CPU 214 AC Power Supply, AC Inputs, Relay Outputs A-30. . . . . . . . . . . . . . . . . . . . . . . A.15 CPU 215 DC Power Supply, DC Inputs, DC Outputs A-32. . . . . . . . . . . . . . . . . . . . . . . . . A.16 CPU 215 AC Power Supply, DC Inputs, Relay Outputs A-34. . . . . . . . . . . . . . . . . . . . . . . A.17 CPU 216 DC Power Supply, DC Inputs, DC Outputs A-36. . . . . . . . . . . . . . . . . . . . . . . . . A.18 CPU 216 AC Power Supply, DC Inputs, Relay Outputs A-38. . . . . . . . . . . . . . . . . . . . . . . A.19 Expansion Module EM221 Digital Input 8 x 24 VDC A-40. . . . . . . . . . . . . . . . . . . . . . . . . . A.20 Expansion Module EM221 Digital Input 8 x 120 VAC A-41. . . . . . . . . . . . . . . . . . . . . . . . . A.21 Expansion Module EM221 Digital Sourcing Input 8 x 24 VDC A-42. . . . . . . . . . . . . . . . . A.22 Expansion Module EM221 Digital Input 8 x 24 VAC A-43. . . . . . . . . . . . . . . . . . . . . . . . . . A.23 Expansion Module EM222 Digital Output 8 x 24 VDC A-44. . . . . . . . . . . . . . . . . . . . . . . . A.24 Expansion Module EM222 Digital Output 8 x Relay A-45. . . . . . . . . . . . . . . . . . . . . . . . . . A.25 Expansion Module EM222 Digital Output 8 x 120/230 VAC A-46. . . . . . . . . . . . . . . . . . . Contents 1-2 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 1.1 Comparing the Features of the S7-200 Micro PLCs Equipment Requirements Figure 1-2 shows the basic S7-200 Micro PLC system, which includes an S7-200 CPU module, a personal computer, STEP 7-Micro/WIN programming software, and a communications cable. In order to use a personal computer (PC), you must have one of the following sets of equipment:  A PC/PPI cable  A communications processor (CP) card and multipoint interface (MPI) cable  A multipoint interface (MPI) card. A communications cable is provided with the MPI card. S7-200 CPU PC/PPI Cable Computer STEP 7-Micro/WIN Figure 1-2 Components of an S7-200 Micro PLC System Capabilities of the S7-200 CPUs The S7-200 family includes a wide variety of CPUs. This variety provides a range of features to aid in designing a cost-effective automation solution. Table 1-1 provides a summary of the major features of each S7-200 CPU. Introducing the S7-200 Micro PLC 1-3 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Table 1-1 Summary of the S7-200 CPUs Feature CPU 212 CPU 214 CPU 215 CPU 216 Physical Size of Unit 160 mm x 80 mm x 62 mm 197 mm x 80 mm x 62 mm 218 mm x 80 mm x 62 mm 218 mm x 80 mm x 62 mmÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁMemory ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Program (EEPROM) ÁÁÁÁ ÁÁÁÁ 512 words ÁÁÁÁÁ ÁÁÁÁÁ 2 Kwords ÁÁÁÁÁÁ ÁÁÁÁÁÁ 4 Kwords ÁÁÁÁÁ ÁÁÁÁÁ 4 Kwords ÁÁÁÁÁÁÁÁÁ User data ÁÁÁÁ 512 words ÁÁÁÁÁ 2 Kwords ÁÁÁÁÁÁ 2.5 Kwords ÁÁÁÁÁ 2.5 Kwords ÁÁÁÁÁÁÁÁÁ Internal memory bits ÁÁÁÁ 128 ÁÁÁÁÁ 256 ÁÁÁÁÁÁ 256 ÁÁÁÁÁ 256 ÁÁÁÁÁÁÁÁÁ Memory cartridge ÁÁÁÁ None ÁÁÁÁÁ Yes (EEPROM) ÁÁÁÁÁÁ Yes (EEPROM) ÁÁÁÁÁ Yes (EEPROM) Optional battery cartridge None 200 days typical 200 days typical 200 days typical ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Backup(super capacitor) ÁÁÁÁ ÁÁÁÁ 50 hours typical ÁÁÁÁÁ ÁÁÁÁÁ 190 hours typical ÁÁÁÁÁÁ ÁÁÁÁÁÁ 190 hours typical ÁÁÁÁÁ ÁÁÁÁÁ 190 hours typical ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Inputs/Outputs (I/O) ÁÁÁÁÁÁÁÁÁ Local I/O ÁÁÁÁ 8 DI / 6 DQ ÁÁÁÁÁ 14 DI / 10 DQ ÁÁÁÁÁÁ 14 DI / 10 DQ ÁÁÁÁÁ 24 DI / 16 DQ ÁÁÁÁÁÁÁÁÁ Expansion modules (max.) ÁÁÁÁ 2 modules ÁÁÁÁÁ 7 modules ÁÁÁÁÁÁ 7 modules ÁÁÁÁÁ 7 modules ÁÁÁÁÁÁÁÁÁ Process-image I/O register ÁÁÁÁ 64 DI / 64 DQ ÁÁÁÁÁ 64 DI / 64 DQ ÁÁÁÁÁÁ 64 DI / 64 DQ ÁÁÁÁÁ 64 DI / 64 DQ ÁÁÁÁÁÁÁÁÁ Analog I/O (expansion) ÁÁÁÁ 16 AI / 16 AQ ÁÁÁÁÁ 16 AI / 16 AQ ÁÁÁÁÁÁ 16 AI / 16 AQ ÁÁÁÁÁ 16 AI / 16 AQ Selectable input filters No Yes Yes Yes ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁInstructions ÁÁÁÁÁÁÁÁÁBoolean execution speed ÁÁÁÁ1.2 µs/instruction ÁÁÁÁÁ0.8 µs/instruction ÁÁÁÁÁÁ0.8 µs/instruction ÁÁÁÁÁ0.8 µs/instruction ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Counters / timers ÁÁÁÁ ÁÁÁÁ 64/64 ÁÁÁÁÁ ÁÁÁÁÁ 128/128 ÁÁÁÁÁÁ ÁÁÁÁÁÁ 256/256 ÁÁÁÁÁ ÁÁÁÁÁ 256/256 ÁÁÁÁÁÁÁÁÁ For / next loops ÁÁÁÁ No ÁÁÁÁÁ Yes ÁÁÁÁÁÁ Yes ÁÁÁÁÁ Yes ÁÁÁÁÁÁÁÁÁ Integer math ÁÁÁÁ Yes ÁÁÁÁÁ Yes ÁÁÁÁÁÁ Yes ÁÁÁÁÁ Yes ÁÁÁÁÁÁÁÁÁ Real math ÁÁÁÁ No ÁÁÁÁÁ Yes ÁÁÁÁÁÁ Yes ÁÁÁÁÁ Yes PID No No Yes Yes ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Additional Features ÁÁÁÁÁÁÁÁÁ High-speed counter ÁÁÁÁ 1 S/W ÁÁÁÁÁ 1 S/W, 2 H/W ÁÁÁÁÁÁ 1 S/W, 2 H/W ÁÁÁÁÁ 1 S/W, 2 H/W ÁÁÁÁÁÁÁÁÁ Analog adjustments ÁÁÁÁ 1 ÁÁÁÁÁ 2 ÁÁÁÁÁÁ 2 ÁÁÁÁÁ 2 ÁÁÁÁÁÁÁÁÁ Pulse outputs ÁÁÁÁ None ÁÁÁÁÁ 2 ÁÁÁÁÁÁ 2 ÁÁÁÁÁ 2 ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Communication interrupt events ÁÁÁÁ ÁÁÁÁ 1 transmit/ 1 receive ÁÁÁÁÁ ÁÁÁÁÁ 1 transmit/1 receive ÁÁÁÁÁÁ ÁÁÁÁÁÁ 1 transmit/2 receive ÁÁÁÁÁ ÁÁÁÁÁ 2 transmit/4 receive ÁÁÁÁÁÁÁÁÁ Timed interrupts ÁÁÁÁ 1 ÁÁÁÁÁ 2 ÁÁÁÁÁÁ 2 ÁÁÁÁÁ 2 ÁÁÁÁÁÁÁÁÁ Hardware input interrupts ÁÁÁÁ 1 ÁÁÁÁÁ 4 ÁÁÁÁÁÁ 4 ÁÁÁÁÁ 4 ÁÁÁÁÁÁÁÁÁ Real time clock ÁÁÁÁ None ÁÁÁÁÁ Yes ÁÁÁÁÁÁ Yes ÁÁÁÁÁ Yes ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ Communications ÁÁÁÁÁÁÁÁÁ Number of comm ports: ÁÁÁÁ 1 (RS-485) ÁÁÁÁÁ 1 (RS-485) ÁÁÁÁÁÁ 2 (RS-485) ÁÁÁÁÁ 2 (RS-485) ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ ÁÁÁÁÁÁÁÁÁ Protocols supported Port 0: Port 1: ÁÁÁÁ ÁÁÁÁ ÁÁÁÁ PPI, Freeport N/A ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ PPI, Freeport N/A ÁÁÁÁÁÁ ÁÁÁÁÁÁ ÁÁÁÁÁÁ PPI, Freeport, MPI DP, MPI ÁÁÁÁÁ ÁÁÁÁÁ ÁÁÁÁÁ PPI, Freeport, MPI PPI, Freeport, MPI Peer-to-peer Slave only Yes Yes Yes Introducing the S7-200 Micro PLC 1-4 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 1.2 Major Components of the S7-200 Micro PLC An S7-200 Micro PLC consists of an S7-200 CPU module alone or with a variety of optional expansion modules. S7-200 CPU Module The S7-200 CPU module combines a central processing unit (CPU), power supply, and discrete I/O points into a compact, stand-alone device.  The CPU executes the program and stores the data for controlling the automation task or process.  The power supply provides electrical power for the base unit and for any expansion module that is connected.  The inputs and outputs are the system control points: the inputs monitor the signals from the field devices (such as sensors and switches), and the outputs control pumps, motors, or other devices in your process.  The communications port allows you to connect the CPU to a programming device or to other devices. Some S7-200 CPUs have two communications ports.  Status lights provide visual information about the CPU mode (RUN or STOP), the current state of the local I/O, and whether a system fault has been detected. Figures 1-3, 1-4, and 1-5 show the different S7-200 CPU modules. Introducing the S7-200 Micro PLC 2-1 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Installing an S7-200 Micro PLC The installation of the S7-200 family is designed to be easy. You can use the mounting holes to attach the modules to a panel, or you can use the built-in clips to mount the modules onto a standard (DIN) rail. The small size of the S7-200 allows you to make efficient use of space. This chapter provides guidelines for installing and wiring your S7-200 system. Chapter Overview Section Description Page 2.1 Panel Layout Considerations 2-2 2.2 Installing and Removing an S7-200 Micro PLC 2-5 2.3 Installing the Field Wiring 2-8 2.4 Using Suppression Circuits 2-13 2.5 Power Considerations 2-15 2 2-2 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 2.1 Panel Layout Considerations Installation Configuration You can install an S7-200 either on a panel or on a standard rail. You can mount the S7-200 either horizontally or vertically. An I/O expansion cable is also available to add flexibility to your mounting configuration. Figure 2-1 shows a typical configuration for these types of installations. S7-200 I/O I/O Panel mounting Standard rail mounting S7-200 I/O I/O I/O I/O Figure 2-1 Mounting Configurations Clearance Requirements for Installing an S7-200 PLC Use the following guidelines as you plan your installation:  The S7-200 CPU and expansion modules are designed for natural convection cooling. You must provide a clearance of at least 25 mm (1 in.), both above and below the units, for proper cooling. See Figure 2-2. Continuous operation of all electronic products at maximum ambient temperature and load reduces their life.  For vertical mounting, the output loading may need to be derated because of thermal constraints. Refer to Appendix A for the data sheet for your particular CPU. If you are mounting the CPU and modules on a DIN Rail, the DIN rail stop is recommended.  If you are installing an S7-200 horizontally or vertically on a panel, you must allow 75 mm (2.9 in.) for the minimum panel depth. See Figure 2-2.  If you plan to install additional modules horizontally or vertically, allow a clearance of at least 25 mm (1 in.) on either side of the unit for installing and removing the module. This extra space is required to engage and disengage the bus expansion connector.  Be sure to allow enough space in your mounting design to accommodate the I/O wiring and communication cable connections. ÂÂÂÂÂÂÂ ÂÂÂÂÂÂÂ ÂÂÂÂÂÂÂ ÂÂÂÂÂÂÂ ÂÂÂÂÂÂÂ ÂÂÂÂÂÂÂ 75 mm (2.9 in.) S7-200 Front of the enclosure Mounting surface 25 mm (1 in.) 25 mm (1 in.) 25 mm (1 in.) Clearance for removing expansion I/O module Clearance for cooling Front View Side View S7-200 I/O Figure 2-2 Horizontal and Vertical Clearance Requirements for Installing an S7-200 PLC Installing an S7-200 Micro PLC 2-3 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Standard Rail Requirements The S7-200 CPU and expansion modules can be installed on a standard (DIN) rail (DIN EN 50 022). Figure 2-3 shows the dimensions for this rail. 35 mm (1.38 in.) 1.0 mm (0.039 in.) 7.5 mm (0.29 in.) Figure 2-3 Standard Rail Dimensions Panel-Mounting Dimensions S7-200 CPUs and expansion modules include mounting holes to facilitate installation on panels. Figures 2-4 through 2-8 provide the mounting dimensions for the different S7-200 modules. 6.4 mm (0.25 in.) 6.4 mm (0.25 in.) 147.3 mm (5.8 in.) S7-212 Mounting holes (M4 or no. 8) 80 mm (3.15 in.) 67.3 mm (2.65 in.) 160 mm (6.3 in.) Figure 2-4 Mounting Dimensions for an S7-212 CPU Module 6.4 mm (0.25 in.) 184.3 mm (7.25 in.) S7-214 Mounting holes (M4 or no. 8) 197 mm (7.76 in.) 6.4 mm (0.25 in.) 80 mm (3.15 in.) 67.3 mm (2.65 in.) Figure 2-5 Mounting Dimensions for an S7-214 CPU Module Installing an S7-200 Micro PLC 2-6 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Installing an S7-200 Micro PLC onto a Standard Rail Warning Attempts to install or remove S7-200 modules or related equipment when they are powered up could cause electric shock. Failure to disable all power to the S7-200 modules and related equipment during installation or removal procedures may result in death or serious personal injury, and/or damage to equipment. Always follow appropriate safety precautions and ensure that power to the S7-200 modules is disabled before installation. To install the S7-200 CPU module, follow these steps: 1. Secure the rail every 75 mm (3.0 in.) to the mounting panel. 2. Snap open the clip (located on the bottom of the module) and hook the back of the module onto the rail. 3. Snap the clip closed, carefully checking to ensure that the clip has fastened the module securely onto the rail. Note Modules in an environment with high vibration potential or modules that have been installed in a vertical position may require DIN rail stops. If you are installing an expansion module, use the following steps: 1. Remove the bus expansion port cover from the existing module housing by inserting a screwdriver into the space between the bus expansion port cover and the housing, and gently prying. Ensure that the plastic connecting joints are completely removed. Use caution not to damage the module. Figure 2-9 shows proper screwdriver placement. 2. Insert the bus connector into the bus expansion port of the existing module and ensure that the connector snaps into place. 3. Ensure that the expansion module is correctly oriented with respect to the CPU module. If you are using an expansion cable, orient the cable up towards the front of the module. 4. Snap open the clip and hook the back of the expansion module onto the rail. Slide the expansion module onto the bus connector until it snaps into place. 5. Snap the clip closed to secure the expansion module to the rail. Carefully check to ensure that the clip has fastened the module securely onto the rail. Installing an S7-200 Micro PLC ! 2-7 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Removing the S7-200 Modules Warning Attempts to install or remove S7-200 modules or related equipment when they are powered up could cause electric shock. Failure to disable all power to the S7-200 modules and related equipment during installation or removal procedures may result in death or serious personal injury, and/or damage to equipment. Always follow appropriate safety precautions and ensure that power to the S7-200 modules is disabled before you install or remove a CPU or expansion module. To remove the S7-200 CPU module or expansion module, follow these steps: 1. Disconnect all the wiring and cabling that is attached to the module that you are removing. If this module is in the middle of a chain, the modules to the left or right must be moved at least 25 mm (1 in.) to allow the bus connector to be disconnected. See Figure 2-10. 2. Unscrew the mounting screws or snap open the clip, and slide the module at least 25 mm (1 in.) to disengage the bus connector. The bus connector must be disconnected on both sides of the module. 3. Remove the module from the panel or rail, and install a new module. Warning If you install an incorrect module, the program in the micro PLC could function unpredictably. Failure to replace an expansion module and expansion cable with the same model or in the proper orientation may result in death or serious personal injury, and/or damage to equipment. Replace an expansion module with the same model, and orient it correctly. If you are using an expansion cable, orient the cable up towards the front of the module. Move both units at least 25 mm, and disconnect bus connector. Or, move this unit at least 25 mm and disconnect bus connector. To remove this unit: Figure 2-10 Removing the Expansion Module Installing an S7-200 Micro PLC ! ! 2-8 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 2.3 Installing the Field Wiring Warning Attempts to install or remove S7-200 modules or related equipment when they are powered up could cause electric shock. Failure to disable all power to the S7-200 modules and related equipment during installation or removal procedures may result in death or serious personal injury, and/or damage to equipment. Always follow appropriate safety precautions and ensure that power to the S7-200 modules is disabled before installing field wiring. General Guidelines The following items are general guidelines for designing the installation and wiring of your S7-200 Micro PLC:  Ensure that you follow all applicable electrical codes when wiring the S7-200 Micro PLC. Install and operate all equipment according to all applicable national and local standards. Contact your local authorities to determine which codes and standards apply to your specific case.  Always use the proper wire size to carry the required current. The S7-200 modules accept wire sizes from 1.50 mm2 to 0.50 mm2 (14 AWG to 22 AWG).  Ensure that you do not overtighten the connector screws. The maximum torque is 0.56 N-m (5 inches-pounds).  Always use the shortest wire possible (maximum 500 m shielded, 300 m unshielded). Wiring should be run in pairs, with a neutral or common wire paired with a hot or signal-carrying wire.  Separate AC wiring and high-energy, rapidly switched DC wiring from low-energy signal wiring.  Properly identify and route the wiring to the S7-200 module, using strain relief for the wiring as required. For more information about identifying the terminals, see the data sheets in Appendix A.  Install appropriate surge suppression devices for any wiring that is subject to lightning surges.  External power should not be applied to an output load in parallel with a DC output point. This may cause reverse current through the output, unless a diode or other barrier is provided in the installation. Warning Control devices can fail in an unsafe condition, resulting in unexpected operation of controlled equipment. Such unexpected action could result in death or serious personal injury, and/or equipment damage. Consider using an emergency stop function, electromechanical overrides, or other redundant safeguards that are independent of the programmable controller. Installing an S7-200 Micro PLC ! ! 2-11 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Guidelines for DC Installation The following items are general wiring guidelines for isolated DC installations. Refer to Figure 2-13.  Provide a single disconnect switch (1) that removes power from the CPU, all input circuits, and all output (load) circuits.  Provide overcurrent devices to protect the CPU power supply (2), the output points (3), and the input points (4). You can also fuse each output point individually for greater protection. External overcurrent protection for input points is not required when you use the 24 VDC sensor supply from the Micro PLC. This sensor supply is current limited internally.  Ensure that the DC power supply has sufficient surge capacity to maintain voltage during sudden load changes. External capacitance (5) may be required.  Equip ungrounded DC power supplies with a resistor and a capacitor in parallel (6) from the power source common to protective earth ground. The resistor provides a leakage path to prevent static charge accumulations, and the capacitor provides a drain for high frequency noise. Typical values are 1 MΩ and 4,700 pf. You can also create a grounded DC system by connecting the DC power supply to ground (7).  Connect all S7-200 ground terminals to the closest available earth ground (8) to provide the highest level of noise immunity. It is recommended that all ground terminals be connected to a single electrical point. Use 14 AWG or 1.5 mm2 wire for this connection.  Always supply 24 VDC circuits from a source that provides safe electrical separation from 120/230 VAC power and similar hazards. The following documents provide standard definitions of safe separation:  PELV (protected extra low voltage) according to EN60204-1  Class 2 or Limited Voltage/Current Circuit according to UL 508 L1 N PE (1) DO DI PS S7-200 DC/DC/DC DO EM 222 DC DI EM 221 DC (5) (6) (2) (3) (4) (7) L+ M24 VDC AC DC (8) Floating (6) or Grounded (7) Figure 2-13 Isolated DC System Installation Installing an S7-200 Micro PLC 2-12 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Guidelines for North American Installation The following items are general wiring guidelines for installations in North America where multiple AC voltages are present. Refer to Figure 2-14 as you read these guidelines.  Provide a single disconnect switch (1) that removes power from the CPU, all input circuits, and all output (load) circuits.  Provide overcurrent devices to protect the CPU power supply (2), the output points (3), and the input points (4). You may also fuse each output point individually for greater protection.  Make AC power connections to the CPU power supply, AC output driven loads, and relay-driven loads either line-to-grounded neutral (5) or line-to-line (6).  Connect all S7-200 ground terminals to the closest available earth ground (7) to provide the highest level of noise immunity. It is recommended that all ground terminals be connected to a single electrical point. Use 14 AWG or 1.5 mm2 wire for this connection. Caution Line-to-line voltages in power systems with 230 VAC nominal line-neutral voltages will exceed the voltage rating of the S7-200 power supply, inputs, and outputs. Exceeding the voltage may cause failure of the S7-200 and connected equipment. Do not use line-to-line connections where the voltage rating of your S7-200 module is exceeded. L1 L2 N PE (1) (3) (6) (2) (4) (5) (2) (5) DO DI P/S S7-200 AC/AC/AC DO EM 222AC DI EM221AC (7) 120 VAC power to CPU and inputs 120 VAC and 220 VAC load outputs Figure 2-14 AC System Installation Installing an S7-200 Micro PLC ! 2-13 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 2.4 Using Suppression Circuits General Guidelines Equip inductive loads with suppression circuits that limit voltage rise on loss of power. Use the following guidelines to design adequate suppression. The effectiveness of a given design depends on the application, and you must verify it for a particular use. Be sure all components are rated for use in the application. Protecting DC Transistors The S7-200 DC transistor outputs contain zener diodes that are adequate for many installations. Use external suppression diodes for either large or frequently switched inductive loads to prevent overpowering the internal diodes. Figures 2-15 and 2-16 show typical applications for DC transistor outputs. +VDC (1) IN4001 diode or equivalent (1) Inductor Figure 2-15 Diode Suppression (1) IN4001 diode or equivalent (2) 8.2 V zener, 5 W +VDC (1) (2) Inductor Figure 2-16 Zener Diode Suppression Installing an S7-200 Micro PLC 2-16 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Calculating a Sample Power Requirement Table 2-1 shows a sample calculation of the power requirements for an S7-200 Micro PLC that includes the following modules:  CPU 214 DC/DC/DC  Three EM 221 Digital Input 8 x DC 24 V expansion modules  Two EM 222 Digital Output 8 x Relay expansion modules The CPU in this example provides sufficient 5 VDC current for the expansion modules; however, it requires an additional power supply to provide the 24 VDC power requirement. (The I/O requires 448 mA of 24 VDC power, but the CPU provides only 280 mA.) Appendix B provides a blank power calculation table. Table 2-1 Power Budget Calculations for a Sample Configuration CPU Power Budget 5 VDC 24 VDC CPU 214 DC/DC/DC 660 mA 280 mA minus System Requirements 5 VDC 24 VDC CPU 214 DC/DC/DC BASE UNIT 14 input x 7 mA = 98 mA Three EM 221 expansion modules 3 x 60 mA = 180 mA 3 x 60 mA = 180 mA Two EM 222 expansion modules 2 x 80 mA = 160 mA 2 x 85 mA = 170 mA Total Requirement 340 mA 448 mA equals Current Balance 5 VDC 24 VDC Current Balance Total 320 mA [168 mA] Installing an S7-200 Micro PLC 3-1 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Installing and Using the STEP 7-Micro/WIN Software This manual describes Version 2.1 of STEP 7-Micro/WIN. Previous versions of the software may operate differently. STEP 7-Micro/WIN is a Windows-based software application that supports both the 16-bit Windows 3.1 environment (STEP 7-Micro/WIN 16) and the 32-bit Windows 95 and Windows NT environments (STEP 7-Micro/WIN 32). In order to use STEP 7-Micro/WIN, the following equipment is recommended:  Recommended: a personal computer (PC) with an 80586 or greater processor and 16 Mbytes of RAM, or a Siemens programming device (such as a PG 740); minimum computer requirement: 80486 processor with 8 Mbytes  One of the following sets of equipment: – A PC/PPI cable connected to your communications port (PC COM1 or COM2) – A communications processor (CP) card and multipoint interface (MPI) cable – A multipoint interface (MPI) card (A communications cable comes with the MPI card.)  VGA monitor, or any monitor supported by Microsoft Windows  At least 50 Mbytes of free hard disk space  Microsoft Windows 3.1, Windows for Workgroups 3.11, Windows 95, or Windows NT 4.0 or greater  Optional but recommended: any mouse supported by Microsoft Windows STEP 7-Micro/WIN provides extensive online help. Use the Help menu command or press F1 to obtain the most current information. Chapter Overview Section Description Page 3.1 Installing the STEP 7-Micro/WIN Software 3-2 3.2 Using STEP 7-Micro/WIN to Set Up the Communications Hardware 3-4 3.3 Establishing Communication with the S7-200 CPU 3-7 3.4 Configuring the Preferences for STEP 7-Micro/WIN 3-25 3.5 Creating and Saving a Project 3-26 3.6 Creating a Program 3-27 3.7 Creating a Data Block 3-32 3.8 Using the Status Chart 3-34 3.9 Using Symbolic Addressing 3-36 3 3-2 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 3.1 Installing the STEP 7-Micro/WIN Software Pre-Installation Instructions Before running the setup procedure, do the following:  If a previous version of STEP 7-Micro/WIN is installed, back up all STEP 7-Micro/WIN projects to diskette.  Make sure all applications are closed, including the Microsoft Office toolbar. Installation may require that you restart your computer. Installation Instructions for Windows 3.1 If you have Windows 3.1 (Windows for Workgroups 3.11) on your machine, use the following procedure to install the STEP 7-Micro/WIN 16 software: 1. Start by inserting Disk 1 in the disk drive of your computer (usually drive A or drive B). 2. From the Program Manager, select the menu command File  Run... 3. In the Run dialog box, type a:\setup and click “OK” or press ENTER. This starts the setup procedure. 4. Follow the online setup procedure to complete the installation. Installation Instructions for Windows 95 or Windows NT 4.0 If you have Windows 95 or Windows NT 4.0 on your machine, use the following procedure to install the STEP 7-Micro/WIN 32 software: 1. Start by inserting Disk 1 in the disk drive of your computer (usually drive A or drive B). 2. Click once on the “Start” button to open the Windows 95 menu. 3. Click on the Run... menu item. 4. In the Run dialog box, type a:\setup and click on “OK” or press ENTER. This starts the setup procedure. 5. Follow the online setup procedure to complete the installation. 6. At the end of the installation, the Install/Remove Modules dialog box appears automatically. See Figure 3-1. You can install the hardware for your machine to communicate now (see Section 3.2), or you can wait until later (see Section 3.3). Installing and Using the STEP 7-Micro/WIN Software 3-5 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Note STEP 7-Micro/WIN 16 does not support the multi-master parameter set under the Windows 95 or Windows NT 4.0 operating system. The following hardware configurations are possible:  CPU 212, CPU 214, CPU 216, CPU 215 (port 0) – PC/PPI Cable (PPI), 9.6 kbaud or 19.2 kbaud – MPI Card (PPI), 9.6 kbaud or 19.2 kbaud  CPU 215 (port 1, that is, the DP port) MPI Card (MPI), 9.6 kbaud to 12 Mbaud Note STEP 7-Micro/WIN 16 does not support communications on port 1 of the CPU 215. The selections for MPI Card are different for STEP 7-Micro/WIN 16 and STEP 7-Micro/WIN 32. On the left side of the Install/Remove Modules dialog box is a list of hardware types that you have not installed yet (see Figure 3-1). On the right side is a list of currently installed hardware types. If you are using the Windows NT 4.0 operating system, there is a “Resources” button under the Installed list box. To install the hardware, follow these steps: 1. From the Selection list box, select the hardware type that you have. A description of your selection is shown in the lower window. 2. Click the “Install -->” button. To remove hardware, follow these steps: 1. Select the hardware from the Installed list box on the right. 2. Click the “<-- Remove” button. When you are finished installing or removing hardware, click the “Close” button. This action returns you to the Setting the PG/PC Interface dialog box. The selections that you made appear now in the list box that contains the module parameter sets. See Figure 3-7. For detailed information on the communications setup for your configuration, see Section 3.3. Installing and Using the STEP 7-Micro/WIN Software 3-6 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Special Hardware Installation Information for Windows NT Users Installing hardware modules under the Windows NT operating system is slightly different from installing hardware modules under Windows 95. Although the hardware modules are the same for either operating system, installation under Windows NT requires more knowledge of the hardware that you want to install. Windows 95 tries automatically to set up system resources for you; however, Windows NT does not. Windows NT provides you with default values only. These values may or may not match the hardware configuration. However, these parameters can be modified easily to match the required system settings. When you have installed a piece of hardware, select it from the Installed list box and click the “Resources” button. The Resources dialog box appears. See Figure 3-2. The Resources dialog box allows you to modify the system settings for the actual piece of hardware that you installed. If this button is unavailable (gray), you do not need to do anything more. At this point you may need to refer to your hardware manual to determine the setting for each of the parameters listed in the dialog box, depending on your hardware settings. You may need to try several different interrupts in order to establish communication correctly. For detailed information on the communications setup for your configuration, see Section 3.3. HelpOK Cancel Resources - MPI-ISA Card<Board 1> Memory Range: Input/Output Range: Interrupt Request: #15 Direct Memory Access: #000CC000-000CC7FF # - Current hardware setting * - Possible conflict with other hardware Figure 3-2 Resources Dialog Box for Windows NT Installing and Using the STEP 7-Micro/WIN Software 3-7 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 3.3 Establishing Communication with the S7-200 CPU You can arrange the S7-200 CPUs in a variety of configurations to support network communications. You can install the STEP 7-Micro/WIN software on a personal computer (PC) that has a Windows 3.1x, Windows 95, or Windows NT operating system, or you can install it on a SIMATIC programming device (such as a PG 740). You can use the PC or the programming device as a master device in any of the following communications configurations:  A single master device is connected to one or more slave devices. See Figure 3-3.  A single master device is connected to one or more slave devices and one or more master devices. See Figure 3-4 and Figure 3-5.  A CPU 215 functions as a remote I/O module owned by an S7-300 or S7-400 programmable logic controller or by another PROFIBUS master. See Figure 3-13.  A single master device is connected to one or more slave devices. This master device is connected by means of 11-bit modems to either one S7-200 CPU functioning as a slave device or else to a network of S7-200 CPUs functioning as slave devices. See Figure 3-14. Connecting Your Computer to the S7-200 CPU Using the PC/PPI Cable Figure 3-3 shows a typical configuration for connecting your personal computer to your CPU with the PC/PPI cable. To establish proper communications between the components, follow these steps: 1. Set the DIP switches on the PC/PPI cable for the baud rate. 2. Connect the RS-232 end of the PC/PPI cable labeled PC to the communications port of your computer, either COM1 or COM2, and tighten the connecting screws. 3. Connect the other end (RS-485) of the PC/PPI cable to the communications port of the CPU, and tighten the connecting screws. For the technical specifications of the PC/PPI cable, see Section A.40; for its order number, see Appendix G. RS-232 PC/PPI cable Computer DIP switch settings (down = 0, up = 1): 0 1 0 0 = 9600 baud (shown) 0 0 1 0 = 19200 baud RS-485 S7-200 CPU 1 0 Figure 3-3 Communicating with a CPU in PPI Mode Installing and Using the STEP 7-Micro/WIN Software 3-10 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Setting Up Communications within STEP 7-Micro/WIN Within STEP 7-Micro/WIN there is a Communications dialog box that you can use to configure your communications setup. See Figure 3-6. You can use one of the following ways to find this dialog box:  Select the menu command Setup  Communications....  Create a new project and click the “Communications...” button in the CPU Type dialog box.  If you have a project open, select the menu command CPU  Type... and click the “Communications...” button in the CPU Type dialog box. ✂ Project View CPU Setup Help STEP 7-Micro/WIN Communications Close Modem Setup... PG/PC Interface... Test Setup Current Communication Settings Remote Station Address 2 Module Parameter Local Station Address Transmission Rate COM Port PC/PPI cable (PPI) 0 9.6 kbps 2 Figure 3-6 Setting Up the Communications between Programming Device or PC and the CPU After you have called up the Communications dialog box, click the “PG/PC Interface...” button. The Setting the PG/PC Interface dialog box appears. See Figure 3-7. Installing and Using the STEP 7-Micro/WIN Software 3-11 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 ✂ Project View CPU Setup Help STEP 7-Micro/WIN Cancel HelpOK Modules Install... Setting the PG/PC Interface Access Path Access Point of Application: Micro/WIN (Standard for Micro/WIN) Module Parameter Set Used: MPI-ISA Card(PPI) <None> MPI-ISA Card(MPI) MPI-ISA Card(PPI) MPI-ISA Card(PROFIBUS) PC/ PPI cable(PPI) Properties... Delete Copy... (Assigning Parameters to an MPI-ISA Card for a PPI Network) Figure 3-7 Setting the PG/PC Interface Dialog Box Setting Up Communications from the Windows Control Panel If you are using the Windows 95 or Windows NT 4.0 operating system, you can set up the communications configuration by means of the Control Panel. From the Control Panel, select the Setting the PG/PC Interface icon. See Figure 3-8. File Edit View Help Control Panel Setting the PG/PC Interface Figure 3-8 Control Panel with Setting the PG/PC Interface Icon Installing and Using the STEP 7-Micro/WIN Software 3-12 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Setting Up Communications during Installation Under the Windows 95 or Windows NT 4.0 operating system, at the end of the STEP 7-Micro/WIN installation, the Communications dialog box appears automatically. You can set up your configuration at that time, or later. Selecting the Correct Module Parameter Set and Setting It Up When you have reached the Setting the PG/PC Interface dialog box (see Figure 3-7), you must select “Micro/WIN” in the Access Point of Application list box in the Access Path tab. This dialog box is common to several different applications, such as STEP 7 and WinCC, so you must tell the program the application for which you are setting parameters. When you have selected “Micro/WIN” and have installed your hardware, you need to set the actual properties for communicating with your hardware. The first step is to determine the protocol that you want to use on your network. See Table 3-1 or Chapter 9 to find out what your CPU supports and what you should use for your configuration. In most cases, you will use the PPI protocol for all of your CPU modules, except for the high-speed port (DP port) on the CPU 215. This port uses the MPI protocol. When you have decided what protocol you want to use, you can choose the correct setup from the Module Parameter Set Used list box in the Setting the PG/PC Interface dialog box. This box lists each hardware type that you have installed, along with the protocol type in parentheses. For example, a simple setup might require you to use the PC/PPI cable to communicate with a CPU 214. In this case, you select “PC/PPI cable(PPI).” Another example is a setup that requires communicating with a CPU 215 through its high-speed port (DP port) by means of a plain MPI-ISA card that you have installed in your computer. In this case, you select “MPI-ISA Card(MPI).” After you have selected the correct module parameter set, you must set up the individual parameters for the current configuration. Click the “Properties...” button in the Setting the PG/PC Interface dialog box. This action takes you to one of several possible dialog boxes, depending on the parameter set that you selected. The sections that follow describe each of these dialog boxes in detail. In summary, to select a module parameter set, follow these steps: 1. In the Setting the PG/PC Interface dialog box (see Figure 3-7), select “Micro/WIN” in the Access Point of Application list box in the Access Path tab. 2. Ensure that your hardware is installed. See Section 3.2. 3. Determine the protocol that you want to use. 4. Select the correct setup from the Module Parameter Set Used list box in the PG/PC Interface dialog box. 5. Click the “Properties...” button in the Setting the PG/PC Interface dialog box. From this point, you make selections according to the parameter set that you chose. Setting Up the PC/PPI Cable (PPI) Parameters This section explains how to set up the PPI parameters for the following operating systems and hardware:  Windows 3.1: PC/PPI cable  Windows 95 or Windows NT 4.0: PC/PPI cable Installing and Using the STEP 7-Micro/WIN Software 3-15 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 From the Setting the PG/PC Interface dialog box, if you are using any of the MPI or CP cards listed above along with the PPI protocol, and you click the “Properties...” button, the properties sheet appears for XXX Card(PPI), where “XXX” stands for the type of card you installed, for example, MPI-ISA. See Figure 3-11. Follow these steps: 1. In the PPI Network tab, select a number in the Local Station Address box. This number indicates where you want STEP 7-Micro/WIN to reside on the programmable controller network. 2. Select a value in the Timeout box. This value represents the length of time that you want the communications drivers to spend to attempt to establish connections. The default value should be sufficient. 3. Determine whether you want STEP 7-Micro/WIN to participate on a network that has multiple masters. See Chapter 9 for more information. You can leave the check mark in the Multiple Master Network box. 4. Set the transmission rate at which you want STEP 7-Micro/WIN to communicate over the network. See Chapter 9, Table 9-1, for valid baud rates for your CPU module. 5. Select the highest station address. This is the address where STEP 7-Micro/WIN stops looking for other masters on the network. 6. Click the “OK” button to exit the Setting the PG/PC Interface dialog box. ✂ Project View CPU Setup Help STEP 7-Micro/WIN Setup Cancel HelpOK Setting the PG/PC Interface Access Path PPI Network Standard HelpOK Station Parameters Cancel Local Station Address: Multiple Master Network 0 Timeout: 1s Network Parameters Transmission Rate: Highest Station Address: 31 9.6 kbps Properties - MPI-ISA Card(PPI) Figure 3-11 MPI-ISA Card (PPI) Properties Sheet Installing and Using the STEP 7-Micro/WIN Software 3-16 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Setting Up the MPI Card (MPI) Parameters This section explains how to set up the MPI parameters for the following operating systems and hardware:  Windows 3.1: MPI-ISA card (including those found in SIMATIC programming devices)  Windows 95 or Windows NT 4.0: – MPI-ISA card – MPI-ISA card on board (MPI cards for SIMATIC programming devices) – CP 5411 – CP 5511 – CP 5611 From the Setting the PG/PC Interface dialog box, if you are using any of the MPI or CP cards listed above along with the MPI protocol, and you click the “Properties...” button, the properties sheet appears for XXX Card(MPI), where “XXX” stands for the type of card you installed, for example, MPI-ISA. See Figure 3-12. ✂ Project View CPU Setup Help STEP 7-Micro/WIN Cancel HelpOK Setting the PG/PC Interface Access Path Properties - MPI-ISA Card(MPI) MPI Network Standard HelpOK Station Parameters Cancel Local Station Address: Not the Only Master Active 0 Timeout: 1s Network Parameters Transmission Rate: Highest Station Address: 31 187.5 kbps Make sure that this check box is empty. Figure 3-12 MPI-ISA Card (MPI) Properties Sheet Installing and Using the STEP 7-Micro/WIN Software 3-17 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Follow these steps: 1. In the MPI Network tab, select a number in the Local Station Address box. This number indicates where you want STEP 7-Micro/WIN to reside on the programmable controller network. 2. Make sure that the Not the Only Master Active check box is cleared, regardless of the number of masters you have on your network. If the check box contains a check mark, click the box to clear it. Be sure to connect the communication cable between the programming device and the CPU before initiating communications. If you start communications before connecting the programming device to the existing CPU network including one or more master devices, then communications are disrupted while the network is being reinitialized. 3. Select a value in the Timeout box. This value represents the length of time that you want the communications drivers to spend to attempt to establish connections. The default value should be sufficient. 4. Set the transmission rate at which you want STEP 7-Micro/WIN to communicate over the network. Because you are probably using the DP port on a CPU 215, you can select any available transmission rate up to 12 Mbaud. See Chapter 9, Table 9-1, for valid baud rates for your CPU module. 5. Select the highest station address. This is the address where STEP 7-Micro/WIN stops looking for other masters on the network. 6. Click the “OK” button to exit the Setting the PG/PC Interface dialog box. Troubleshooting the MPI Communications Setup for 16-Bit Applications The MPI Card option activates the MPI drivers in the S7DPMPI.INI configuration file, which was placed in the Windows directory during the STEP 7-Micro/WIN installation. If you get an interrupt error, you must set the MPI card to a free hardware interrupt request (IRQ) line. The default interrupt line is IRQ 5. The IRQ field is used to specify the interrupt number used by the MPI card. An interrupt error indicates that IRQ 5 is already in use. To specify a different IRQ line, follow these steps: 1. Select the menu command Setup  Communications.... The communications dialog box is displayed. Locate the hardware interrupt options and choose an alternate value. 2. Accept your changes by clicking “OK” or pressing ENTER. The software automatically modifies the S7DPMPI.INI file, and informs you if exiting the application is required. 3. Restart the STEP 7-Micro/WIN application and select the MPI option again. Note The following are the default addresses for the S7-200 CPU modules with more than one communication port:  CPU 215 Port 0: 2 Port 1: 126  CPU 216 Port 0: 2 Port 1: 2 Installing and Using the STEP 7-Micro/WIN Software 3-20 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Depending on whether you want to connect to only one S7-200 CPU or to a network of them, you need the following cables and adapter (see Figure 3-14):  A cable with RS-232 capability at each end to connect the PC or SIMATIC programming device to a full-duplex 11-bit modem at one end of the telephone line  A null modem adapter to connect the modem at the other end of the telephone line to a PC/PPI cable  A PC/PPI cable to connect the null modem adapter to either of the following ports: – The communications port of the S7-200 CPU (see Figure 3-14) – A Siemens programming port connector on a PROFIBUS network (see Figure 9-3) 11-bit modem RS-232 RS-232 COMx RS-232 11-bit modem Telephone line PG/ PC CPU 214 PC/PPI cable Null modem adapter Local Remote Full-duplex Full-duplex Note: x = your port number Figure 3-14 S7-200 Data Communications Using an 11-Bit Modem Because these configurations allow only one master device, there is no token passing. These configurations support only the PPI protocol. In order to communicate through the PPI interface, the S7-200 programmable logic controller requires that the modem use an 11-bit data string. The S7-200 controller requires one start bit, eight data bits, one parity bit (even parity), one stop bit, asynchronous communication, and a transmission speed of 9600 baud for PPI. Many modems are not capable of supporting this data format. The modem requires the settings listed in Table 3-3. Figure 3-15 shows the pin assignments for a null modem adapter. For more information on network communications using the PC/PPI cable, see Chapter 9. Table 3-3 Modem Settings Required Data Format in Bits Transmission Speed between Modem and PC Transmission Speed on the Line Other Features 8 data Ignore DTR signal 1 start 9600 baud 9600 baud No hardware flow control 1 stop 1 parity (even) Installing and Using the STEP 7-Micro/WIN Software 3-21 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Null Modem Adapter 25-Pin to 9-Pin Adapter Modem PC/PPI cable 25-pin 25-pin 25-pin 9-pin 2 3 4 5 6 7 8 20 2 3 4 5 6 7 8 20 2 3 2 3 7 5 Figure 3-15 Pin Assignments for a Null Modem Adapter Setting Up the Communications Parameters When Using Modems To set up communications parameters between your programming device or PC and the CPU when using modems, you must use the module parameter set for the PC/PPI cable. Otherwise, the Configure Modems function is not enabled. Ensure that the Configure Modems function is enabled and then set up the configuration parameters by following these steps: Note The communications setup described here applies to the Multi Tech MultiModemZDX MT1932ZDX. If you are not using this type of modem, you must choose “User-Defined” as the Selected Modem in the Configure Modems dialog box. Your modem must be an 11-bit modem and must run at 9600 baud. Check the manual for your modem to determine the parameters to enter in the Configuration tabs of the Configure Modems dialog box. 1. Select the menu command Setup  Communications.... In the Communications dialog box, if the Current Protocol area shows “PC/PPI cable(PPI),” click the “PG/PC Interface...” button and go on to step 3. If the Current Protocol area does not show “PC/PPI cable(PPI),” click the “PG/PC Interface...” button and continue with step 2. 2. In the Access Path tab, in the Module Parameter Set Used list box, select PC/PPC cable(PPI). If this selection is not in the list box, you must install it. See Section 3.1. 3. Click the “Properties” button. The PC/PPI cable(PPI) properties sheet appears. 4. In the PC/PPI cable(PPI) properties sheet, click the Local Connection tab. 5. In the COM Port area, ensure that the Use Modem box contains a check mark. If the box is empty, select it to insert a check mark. 6. Click the “OK” button. The Access Path tab appears again. 7. Click the “OK” button. The Communications dialog box appears again. Installing and Using the STEP 7-Micro/WIN Software 3-22 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 8. Click the “Configure Modems...” button. The Configure Modems dialog box appears. (You can also access the “Configure Modems...” button by selecting the menu command Setup  Connect Modem.... The button appears in the Connect dialog box.) The General Information tab of the Configure Modems dialog box provides the 11-bit data string requirements for the modems and lists the hardware components that you need. Figure 3-14 shows the same hardware components. 9. Click the Local Modem Configuration tab. See Figure 3-16. 10. In the Local Modem Configuration tab, in the Selected Modem list box, choose Multi Tech MultiModemZDX MT1932ZDX. The only other fields that you can edit in this tab are Connect Phone Number and Timeout. The time-out is the length of time that the local modem attempts to set up a connection to the remote modem. If the time indicated in seconds in the Timeout field elapses before the connection is set up, the attempt to connect fails. 11. If you want to test the configuration of your local modem, click the “Test Modem” button while the modem is connected to your local machine (your programming device or PC). 12. Disconnect your local modem and connect your remote modem to your local machine (your programming device or PC). Configure Modems OK Cancel Remote Modem Configuration General InformationLocal Modem Configuration Initialize: None Selected Modem: 5538 Connect Phone Number: Multi Tech MultiModemZDX MT1932ZDX AT&F0%E5=1&E12M0X3 Prefix: ATDT Timeout: 30 seconds Suffix: ^ M Command: ATH0 Use Command Use DTP se o and se T Set 11 Bit Mode: $EB11 Set Baud Rate: $SB Transmitter Receiver None Status: Test ModemProgram Modem DisconnectisconnectDial Options Command Strings Flow Controll tr l tri s Figure 3-16 Local Modem Configuration Tab of the Configure Modems Dialog Box Installing and Using the STEP 7-Micro/WIN Software 3-25 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 3.4 Configuring the Preferences for STEP 7-Micro/WIN Before creating a new project, specify the preferences for your programming environment. To select your preferences, follow these steps: 1. Select the menu command Setup  Preferences... as shown in Figure 3-19. 2. Select your programming preferences in the dialog box that appears. 3. Confirm your choices by pressing ENTER or clicking the “OK” button. Note To enable a change in the Language field shown below, you must exit STEP 7-Micro/WIN and restart the software. ✂ Preferences Cancel OK English STL Editor Ladder Editor Default Editor International SIMATIC Mnemonic Set Program Editor Initial Window States Language Data Block Editor Maximize All Symbol Table Status Chart Project Edit View CPU Debug Tools Setup Window Help Preferences... Communications... Connect Modem Normalized Minimized Minimized Minimized Figure 3-19 Selecting Your Programming Preferences Installing and Using the STEP 7-Micro/WIN Software 3-26 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 3.5 Creating and Saving a Project Before you create a program, you must create or open a project. When you create a new project, STEP 7-Micro/WIN opens the following editors:  Ladder Editor or Statement List Editor (depending on your selected preference)  Data Block Editor  Status Chart  Symbol Table Creating a New Project The Project menu command allows you to create a new project, as shown in Figure 3-20. Select the menu command Project  New.... The CPU Type dialog box is displayed. If you select the CPU type from the drop-down list box, the software displays only those options which are available for your CPU; if you select “None,” no CPU-specific restrictions are placed on your program. When you download the program, the CPU notifies you if you have used options that are not available. For example, if your program uses an instruction that is not supported by your CPU, the program is rejected. Note STEP 7-Micro/WIN does not check the range of parameters. For example, you can enter VB9999 as a parameter to a ladder instruction even though it is an invalid parameter. ✂ Project View CPU Setup Help LAD STL SYM STATDB1 New... Ctrl+N Open... Ctrl+O 1 c:\microwin\project1.prj 2 c:\microwin\project2.prj 3 c:\microwin\project3.prj Exit CPU Type CancelOK Select or read the CPU type from your PLC if you would like the software to limit the available options to only those supported by a specific CPU. Read CPU Type Communications... CPU 214CPU Type: Figure 3-20 Creating a New Project Saving a Project You can save all of the components of your project by selecting the menu command Project  Save All or by clicking the Save All button: You can save a copy of the active project to a different name or location by selecting the menu command Project  Save As.... Installing and Using the STEP 7-Micro/WIN Software 3-27 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 3.6 Creating a Program STEP 7-Micro/WIN allows you to create the user program (OB1) with either the Ladder Editor or the Statement List Editor. Entering Your Program in Ladder Logic The Ladder Editor window allows you to write a program using graphical symbols (see Figure 3-21). The toolbar includes some of the more common ladder elements used to enter your program. The first (left) drop-down list box contains instruction categories. You can access these categories by clicking or pressing F2. After a category is selected, the second drop-down list contains the instructions specific to that category. To display a list of all instructions in alphabetical order, press F9 or select the All Instructions category. Or you can select the View  Instruction Toolbar to display the Ladder Instruction Toolbar. There are two comments associated with each network as described below.  Single-line network title comments are always visible in the ladder display, and you can access these by clicking anywhere in the network title region.  Multi-line network comments are accessed by double-clicking on the network number region. Multi-line network comments are only visible through a dialog box, but are printed on all printouts. To start entering your program, follow these steps: 1. To enter a program title, select the menu command Edit  Program Title.... Type in your new program title, then click the “OK” button. 2. To enter ladder elements, select the type of element you want by clicking the corresponding icon button or selecting it from the instruction list. 3. Type the address or parameter in each text field and press ENTER. Installing and Using the STEP 7-Micro/WIN Software 3-30 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Downloading Your Program After completing your program, you can download the project to the CPU. To download your program, select the menu command Project  Download... or click the Download button in the main window. The Download dialog box that appears allows you to specify the project components that you want to download, as shown in Figure 3-23. ✂ Project Edit View CPU Debug Tools Setup Window Help STEP 7-Micro/WIN - c:\microwin\project1.prj New... Ctrl+N Open... Ctrl+O Close Save All Ctrl+S Save As... Import Export Upload... Ctrl+U Download... Ctrl+D Page Setup... Print Preview... Print... Ctrl+P Print Setup... Exit Download Cancel OKAll Data Block CPU Configuration Program Code Block Figure 3-23 Downloading Project Components to the CPU  Program Code Block (OB1) contains your program logic to be executed by the CPU.  Data Block (DB1) contains the initialization values to be used by your program.  CPU Configuration (CFG) contains the system setup information, which includes communication parameters, retentive ranges, input filter selections, password, and output table definitions. Click the “OK” button or press ENTER to confirm your choices and to execute the download operation. Installing and Using the STEP 7-Micro/WIN Software 3-31 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Viewing a Program in Ladder Logic or Statement List You can view a program in either ladder or STL by selecting the menu command View  STL or View  Ladder, as shown in Figure 3-24. When you change the view from STL to ladder and back again to STL, you may notice changes in the presentation of the STL program, such as:  Instructions and addresses are changed from lower case to upper case.  Spaces between instructions and addresses are replaced with tabs. You can accomplish the same formatting of the STL instructions by selecting the menu command CPU  Compile while the STL Editor is active. Note Certain combinations of statement list instructions cannot be converted successfully to ladder view. In that case, the message “Illegal Network” marks the section of code that cannot be represented in ladder. ✂ Project Edit View CPU Debug Tools Setup Window Help STEP 7-Micro/WIN - c:\microwin\project1.prj Ladder Editor - untitled.ob1 Contacts F2 Normally Open Start/stop switch “E-Stop1” Q0.0 Network 1 ✓ ✓ ✓ STL Ladder Data Block Symbol Table Status Chart Cross Reference Element Usage Symbolic Addressing Ctrl+Y Toolbar Status Bar Instruction Toolbar Zoom... F4 F5 F8F7F6 F3 F10 STL Editor - untitled.ob1 NETWORK 1 //Start/stop switch LD “Start1” AN “E-Stop1” = Q0.0 NETWORK 2 //End MEND STL “Start1” Figure 3-24 Changing the Program View from Ladder to Statement List Installing and Using the STEP 7-Micro/WIN Software 3-32 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 3.7 Creating a Data Block You can use the Data Block Editor to pre-define or initialize variables to be used in your program. Usage of the data block is optional. The Data Block Editor appears by default as a minimized window icon at the bottom of the main window (if selected in Setup  Preferences... ). To access the data block, double-click the icon, or click the Restore or Maximize button on the icon (in Windows 95). Entering Data Block Values The Data Block Editor is a free-form text editor that allows a certain degree of flexibility in the format that you choose to enter the data values. Use the following guidelines when creating a data block:  Use the first column of each line to specify the data size and starting address of each value to be stored in V memory.  Separate the starting address from the data value(s) by a space or tab as shown below. Figure 3-25 shows a sample data block with comments that describe each data element. Data Block Editor - untitled.db1 VB0 255 //stored as a byte, starting at VB0 VW2 256 //word value, starting at VW2 VD4 700.50 //double word real number, starting at VD4 VB8 -35 //byte value, stored starting at VB8 VW10 16#0A //word value in HEX, stored starting at VW10 VD14 123456 //double word value, stored starting at VD14 VW20 2 4 8 16 //table of word values, starting at VW20 -2 64 12 56 //(note that data values in 2nd and 85 10 20 40 //3rd line cannot start in column 1) VB45 ’Up’ //two-byte ASCII string, starting at VB45 V50 ’This is a new message with 40 characters’ //ASCII string starting at VB50 (through VB89) VW90 65535 //Word value starting at VW90 Address column Data values Comments DB Figure 3-25 Example of a Data Block Installing and Using the STEP 7-Micro/WIN Software 3-35 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Forcing Variables Using the Status Chart To force a variable in the Status Chart to a specific value, follow these steps: 1. For a cell in the Address column, enter the address or symbol name of the variable that you want to force. 2. If the element is a bit (I0.0, Q0.1), the format is always bit and cannot be changed. If the element is a byte, word, or double word, select the format that you wish to use by double-clicking or pressing the SPACEBAR to cycle through the valid formats. 3. To force the variable to its current value, first read the current values in the PLC by selecting the menu command Debug  Single Read or clicking the Single Read button . Click or scroll to the cell that contains the current value you wish to force. Press the Force button while positioned on a current value to force the variable to that value. 4. To force a new value for a variable, enter the desired value in the “Change Value” column and press the Force button. 5. To view all currently forced variables, click the Read Force button. 6. To unforce all currently forced variables in the CPU, click the Unforce All button. Editing Addresses To edit an address cell, use the arrow keys or mouse to select the cell you want to edit.  If you begin typing, the field clears and the new characters are entered.  If you double-click the mouse or press F2, the field becomes highlighted and you can use the arrow keys to move the editing cursor to the place that you want to edit. Installing and Using the STEP 7-Micro/WIN Software 3-36 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 3.9 Using Symbolic Addressing The Symbol Table allows you to give symbolic names to inputs, outputs, and internal memory locations. See Figure 3-27. You can use the symbols that you have assigned to these addresses in the Ladder Editor, STL Editor, and Status Chart of STEP 7-Micro/WIN. The Data Block Editor does not support the use of symbolic names. Guidelines for Entering Symbolic Addresses The first column of the Symbol Table is used to select a row. The other columns are for the symbol name, address, and comment. For each row, you assign a symbolic name to the absolute address of a discrete input, output, memory location, special memory bit, or other element. A comment for each assigned symbol is optional. Follow these guidelines when creating a Symbol Table:  You can enter symbol names and absolute addresses in any order.  You can use up to 23 characters in the Symbol Name field.  You can define up to 1,000 symbols.  The Symbol Table is case-sensitive: for example, “Pump1” is considered a different symbol from “pump1”.  All leading and trailing spaces are removed from the symbol name by the Symbol Table Editor. All adjacent internal spaces are converted to a single underscore. For example, “Motor starter 2” changes to “Motor_starter_2”.  If you have duplicate symbol names and/or addresses, they are marked with blue italics by the Symbol Table Editor These duplicate names are not compiled, and they are not recognized outside the symbol table. Overlapping addresses are not flagged as duplicates; for example, VB0 and VW0 overlap in memory but are not flagged as duplicates. Starting the Symbol Table Editor The Symbol Table Editor appears by default as a minimized window icon at the bottom of the main window. To access the Symbol Table, double-click the icon, or click the Restore or Maximize button on the icon (in Windows 95). Symbol Table - untitled.sym Start1 E-Stop1 ReadyLight1 MotorStarter1 Mixer1_Timer I0.0 I0.1 Q1.0 Q1.1 T0 Mixer2_Timer Line1_Counter T37 C1 Relay_1 M0.0 Relay_1 M0.1 Start Switch for assembly line 1 Assembly Line1 ready light (green) Assembly Line 1 motor Emergency Stop for assembly line 1 Duplicate symbols are displayed in italics. Symbol Name Address Comment To clear a cell, press the DELETE key or SPACEBAR when cell is selected. Figure 3-27 Example of a Symbol Table Installing and Using the STEP 7-Micro/WIN Software 3-37 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Editing Functions within the Symbol Table The Symbol Table provides the following editing functions:  Edit  Cut / Copy / Paste within a cell or from one cell to another.  Edit  Cut / Copy / Paste one or several adjacent rows.  Edit  Insert Row above the row containing the cursor. You can also use the INSERT or INS key for this function.  Edit  Delete Row for one or several highlighted adjacent rows. You can also use the DELETE or DEL key for this function.  To edit any cell containing data, use the arrow keys or mouse to select the cell that you want to edit. If you begin typing, the field clears and the new characters are entered. If you double-click the mouse or press F2, the field becomes highlighted, and you can use the arrow keys to move the editing cursor to the place you want to edit. Sorting Table Entries After entering symbol names and their associated absolute addresses, you can sort the Symbol Table alphabetically by symbol names or numerically by addresses in the following ways:  Select the menu command View  Sort Symbol Name to sort the symbol names in alphabetical order.  Select the menu command View  Sort Symbol Address to sort the absolute addresses by memory types. Installing and Using the STEP 7-Micro/WIN Software 4-2 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 4.1 Creating a Program for a Sample Application System Requirements for the Sample Program After you create and download the sample program provided in this chapter, you can run this program on an S7-200 CPU. Figure 4-1 shows the components that are required to run and monitor the sample program:  PC/PPI programming cable, or MPI card installed in your computer and RS-485 cable to connect to the S7-200 CPU  S7-200 CPU  Input simulator  Power cord and power supply  STEP 7-Micro/WIN 32 Version 2.1 for the 32-bit Windows 95 and Windows NT, or STEP 7-Micro/WIN 16 Version 2.1 for the 16-bit Windows 3.1x S7-200 CPU PC/PPI Communications Cable Computer STEP 7-Micro/WIN Input Simulator Figure 4-1 Requirements to Run the Sample Program Getting Started with a Sample Program 4-3 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Tasks for a Sample Mixing Tank Application Figure 4-2 shows the diagram for a mixing tank. This mixing tank can be used for different applications, such as for making different colors of paint. In this application, two pipelines enter the top of the tank; these supply two different ingredients. A single pipeline at the bottom of the tank transports the finished mixture. The sample program controls the filling operation, monitors the tank level, and controls a mixing and heating cycle. The following tasks describe the process: Step 1: Fill the tank with Ingredient 1. Step 2: Fill the tank with Ingredient 2. Step 3: Monitor the tank level for closure of the high-level switch. Step 4: Maintain the pump status if the start switch opens. Step 5: Start the mix-and-heat cycle. Step 6: Turn on the mixer motor and steam valve. Step 7: Drain the mixing tank. Step 8: Count each cycle. Pump_1 Q0.0 Pump_2 Q0.1 Steam_Valve Q0.3 Drain_Pump Q0.5 Drain_Valve Q0.4 Mixer_Motor Q0.2 Low_Level I0.5 Start_1 I0.0 Stop_1 I0.2 Start_2 I0.1 Stop_2 I0.3 Pump 1 Controls Pump 2 Controls High_Level I0.4 Figure 4-2 Program Example: Mixing Tank Getting Started with a Sample Program 4-4 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Sample Program in Statement List (STL) and Ladder Logic You can enter the sample program in either statement list (STL) or ladder representation. Table 4-1 provides the STL version of the sample program, and Figure 4-3 shows the same sample program in ladder. Sections 4.2 to 4.4 guide you through the tasks required to enter this program in ladder. Table 4-1 Sample Program in Statement List STL Description NETWORK 1 LD “Start_1” O “Pump_1” A “Stop_1” AN “High_Level” = “Pump_1” NETWORK 2 LD “Start_2” O “Pump_2” A “Stop_2” AN “High_Level” = “Pump_2” NETWORK 3 LD “High_Level” S “Hi_Lev_Reached”, 1 NETWORK 4 LD “Hi_Lev_Reached” TON “Mix_Timer”, +100 NETWORK 5 LDN “Mix_Timer” A “Hi_Lev_Reached” = “Mixer_Motor” = “Steam_Valve” NETWORK 6 LD “Mix_Timer” AN “Low_Level” = “Drain_Valve” = “Drain_Pump” NETWORK 7 LD “Low_Level” A “Mix_Timer” LD “Reset” CTU “Cycle_Counter”, +12 NETWORK 8 LD “Low_Level” A “Mix_Timer” R “Hi_Lev_Reached”, 1 NETWORK 9 MEND //Fill the tank with Ingredient 1. //Fill the tank with Ingredient 2. //Set memory bit if high level is reached. //Start timer if high level is reached. //Turn on the mixer motor. //Drain the mixing tank. //Count each cycle. //Reset memory bit if low level or time-out. //End the main program. Getting Started with a Sample Program 4-7 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Naming the Sample Project You can name your project at any time; for this example, refer to Figure 4-5 and follow these steps to name the project: 1. Select the menu command Project  Save As... . 2. In the File Name field, type the following: project1.prj 3. Click the “Save” button. ✂ Project Edit View CPU Debug Tools Setup Window Helpr j t New... Ctrl+N Open... Ctrl+O Close Save All Ctrl+S Save As... Import Export Upload... Ctrl+U Download... Ctrl+D Page Setup... Print Preview... Print... Ctrl+P Print Setup... Exit Save As Project Save in: File name: sample.prj Projects project1.prj Save as type: Project Cancel Save Help Enter project name here. Figure 4-5 Naming the Sample Project Getting Started with a Sample Program 4-8 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 4.3 Task: Create a Symbol Table Opening the Symbol Table Editor To define the set of symbol names used to represent absolute addresses in the sample program, open the Symbol Table editor. Double-click the icon, or click the Restore or Maximize button on the icon (in Windows 95). You can also select the menu command View  Symbol Table. Entering the Symbol Names Figure 4-6 shows the list of symbol names and the corresponding addresses for the sample program. To enter the symbol names, follow these steps: 1. Select the first cell in the Symbol Name column, and type the following: Start_1 2. Press ENTER to move the focus to the first cell in the Address column. Type the address I0.0 and press ENTER. The focus moves to the cell in the Comment column. (Comments are optional, but they are a useful way to document the elements in your program.) 3. Press ENTER to start the next symbol row, and repeat these steps for each of the remaining symbol names and addresses. 4. Use the menu command Project  Save All to save your Symbol Table. Symbol Name Address Comment Start_1 Start_2 Stop_1 Stop_2 High_Level I0.0 I0.1 I0.2 I0.3 I0.4 Low_Level Reset I0.5 I0.7 Pump_1 Q0.0 Pump_2 Q0.1 Mixer_Motor Q0.2 Start switch for Paint Ingredient 1 Stop switch for Paint Ingredient 1 Stop switch for Paint Ingredient 2 Limit switch for maximum level in tank Limit switch for minimum level in tank Reset control for counter Pump for Paint Ingredient 1 Pump for Paint Ingredient 2 Motor for the tank mixer Start switch for Paint Ingredient 2 Steam_Valve Q0.3 Drain_Valve Drain_Pump Q0.4 Q0.5 Hi_Lev_Reached M0.1 Mix_Timer T37 Cycle_Counter C30 Steam to heat mixture in tank Valve to allow mixture to drain Pump to drain mixture out of tank Memory bit Timer to control mixing/heating mixture Counts total mix & heat cyles completed Symbol Table - c:\microwin\project1.sym Figure 4-6 Symbol Table for the Sample Program Getting Started with a Sample Program 4-9 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Programming with Symbolic Addresses Before you start entering your program, make sure the ladder view is set for symbolic addressing. Use the menu command View  Symbolic Addressing and look for a check mark next to the menu item, which indicates that symbolic addressing is enabled. Note Symbol names are case-sensitive. The name you enter must match exactly the uppercase and lowercase characters entered in the symbol table. If there is any mismatch, the cursor stays on the element and the message “Invalid parameter” appears in the status bar at the bottom of the main window. Getting Started with a Sample Program 4-12 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 The ladder cursor is now positioned to the right of the normally closed “High_Level” input. Refer to Figure 4-11 and follow these steps to complete the first network: 1. Click the coil button (“F6”) and move the mouse cursor inside the ladder cursor and click. A coil appears with the name “Pump_1” highlighted above it. (Each coil that you enter is given the default address of Q0.0, which in this case has been defined as Pump_1 in the symbol table.) 2. Press ENTER to confirm the coil and its symbol name. 3. Use the mouse or press the left arrow key to move the cursor back to the first element of the current network. 4. Click the vertical line button (“F7”) to draw a vertical line between the first and second contacts. 5. Click the normally open contact button (“F4”) on the toolbar, and press ENTER. A contact with the name “Start_1” appears. 6. Type Pump_1 and press ENTER. The first network is now complete. Output Coils Output Network 1 F4 F5 F8F7 F10F3F2 Fill the tank with Paint Ingredient 1 and monitor tank. “Start_1” “Stop_1” “High_Level” “Pump_1” Pump_1 Type symbol name here. F6 Coil button Vertical line button Figure 4-11 Completing the First Network Getting Started with a Sample Program 4-13 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Entering the Second Network Follow these steps to enter the second network of the sample program: 1. Use the mouse or press the down arrow key to move the cursor to Network 2. 2. In the network comment field, type the comment shown in Figure 4-12. (Since the comment for Network 2 is nearly identical to the one for Network 1, you can also select and copy the text from Network 1 and paste it into the comment field for Network 2, then change the paint ingredient number to 2.) 3. Repeat the steps you used to enter the elements of Network 1, using the symbol names shown in Figure 4-12. 4. After you finish Network 2, move the cursor down to Network 3. Contacts Normally Open Network 2 F5 F8F7F6 F10F3F2 Fill the tank with Paint Ingredient 2 and monitor tank. “Start_2” “Stop_2” “High_Level” “Pump_2” “Pump_2” F4 Figure 4-12 Entering the Second Network Entering the Remaining Networks From this point on, you can follow the same general procedures that you have used up to now to enter the remaining networks. Refer to Figure 4-3 for the remaining networks. Compiling the Program After completing the sample program, check the syntax by selecting the menu command CPU  Compile or by clicking the Compile button. If you have entered all the networks correctly as shown in the sample program, you get a “Compile Successful” message that also includes information on the number of networks and the amount of memory used by the program. Otherwise, the Compile message indicates which networks contain errors. Saving the Sample Program You can save your project by selecting the menu command Project  Save All or by clicking the Save All button. This action saves all the components of your sample project. Getting Started with a Sample Program 4-14 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 4.5 Task: Create a Status Chart Building Your Status Chart To monitor the status of selected elements in the sample program, you create a Status Chart that contains the elements that you want to monitor while running the program. To access the Status Chart editor, double-click the icon at the bottom of the main window. Then enter the elements for the sample program by following these steps: 1. Select the first cell in the Address column, and type the following: Start_1 2. Press ENTER to confirm your entry. This element type can only be displayed in bit format (either 1 or 0), so you cannot change the format type. 3. Select the next row, and repeat these steps for each of the remaining elements, as shown in Figure 4-13. When an Address cell is in focus and the row below is empty, pressing ENTER automatically increments the address for each additional row. Refer to the online Help for more information about using the Status Chart. You can use the menu command Edit  Insert Row (or the INSERT or INS key) to insert a blank row above the row containing the cursor. 4. The timer T37 and the counter C30 can each be displayed in other formats. With the focus in the Format column cell, press the SPACEBAR to cycle through the formats that are valid for these element types. For this example, select Signed for the timer and counter. Save your Status Chart by selecting the menu command Project  Save All or by clicking the Save All button. Status Chart Address Format Change ValueCurrent Value Bit Bit Bit Bit Bit “Start_1” Bit Bit Bit Bit Bit 2#0 2#0 2#0 2#0 “Start_2” “Stop_1” “Stop_2” “High_Level” “Low_Level” “Reset” “Pump_1” “Pump_2” “Mixer_Motor” “Steam_Valve” “Drain_Valve” “Drain_Pump” “Hi_Lev_Reached” “Mix_Timer” “Cycle_Counter” Bit Bit Bit Bit Signed Signed 2#0 2#0 2#0 2#0 2#0 2#0 2#0 2#0 2#0 2#0 +0 +0 Figure 4-13 Status Chart for the Sample Program Getting Started with a Sample Program 4-17 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Viewing the Current Status of Program Elements You can use the Status Chart to monitor or modify the current values of any I/O points or memory locations. Reopen the Chart window, if necessary, and select the menu command Debug  Chart Status On, as shown in Figure 4-16. As you switch inputs on or off with the CPU in RUN mode, the Status Chart shows the current status of each element.  To view the current PLC value of the elements in your program, click the Single Read button or the Continuous Read button in the Status Chart window.  To stop the reading of status, click the Continuous Read button in the Status Chart window. ✂ Project Edit View CPU Debug Tools Setup Window Help STEP 7-Micro/WIN - c:\microwin\project1.prj Status Chart Address Format Change ValueCurrent Value Bit Bit Bit Bit “Start_1” Bit Bit Bit Bit Bit 2#1 2#0 2#1 2#0 “Start_2” “Stop_1” “Stop_2” “High_Level” “Low_Level” “Reset” “Pump_1” “Pump_2” “Mixer_Motor” “Steam_Valve” “Drain_Valve” “Drain_Pump” “Hi_Lev_Reached” “Mix_Timer” “Cycle_Counter” Bit Bit Bit Bit Signed Signed 2#0 2#0 2#0 2#1 2#0 2#0 2#0 2#0 2#0 2#0 +0 +0 Bit Execute Scans... Single Read Write Chart Status On Mark Forced Unmark Forced Force Value Unforce Value Read All Forced Unforce All Figure 4-16 Monitoring the Status Chart of the Sample Program Getting Started with a Sample Program 4-18 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Getting Started with a Sample Program 5-1 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Additional Features of STEP 7-Micro/WIN This chapter describes how to use the TD 200 Wizard to configure the TD 200 Operator Interface. It also tells how to use the S7-200 Instruction Wizard to configure complex operations, and describes other new features of version 2.1 of STEP 7-Micro/WIN. Chapter Overview Section Description Page 5.1 Using the TD 200 Wizard to Configure the TD 200 Operator Interface 5-2 5.2 Using the S7-200 Instruction Wizard 5-12 5.3 Using the Analog Input Filtering Instruction Wizard 5-14 5.4 Using Cross Reference 5-17 5.5 Using Element Usage 5-18 5.6 Using Find/Replace 5-19 5.7 Documenting Your Program 5-21 5.8 Printing Your Program 5-23 5 5-4 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Selecting Language and Bar Graph Character Set The first dialog box in the TD 200 Wizard allows you to select the menu language and character set. Use the drop-down list box shown in Figure 5-4 to select the language in which the TD 200 menus display. Use the option buttons to select the standard character set or the alternative character set that allows you to display bar graph charts on the TD 200. The TD 200 Wizard sets the corresponding bits in byte 2 of the parameter block. TD 200 Configuration Wizard CancelNext > You can configure the TD 200 to display menus and prompts in a specific national language. < Prev Would you like to enable the Bar Graph character set? Yes No Which national language would you like your TD 200 to support? English Figure 5-4 TD 200 Language and Character Set Enabling the Time of Day Menu, Force Function, and Password Protection Use the option buttons to select the modes shown in Figure 5-5. If you select password protection, a field appears for you to assign a password. Refer to the SIMATIC TD 200 Operator Interface User Manual for more information on these options. The TD 200 Wizard sets the corresponding bits in byte 3 of the parameter block. TD 200 Configuration Wizard CancelNext > You can configure your TD 200 to allow the user to set the Time of Day clock in the CPU, and to Force I/O in the CPU. You can also password- protect these options, so that a user may only access them after entering the correct 4-digit password. < Prev Would you like to enable the Time-of-Day (TOD) menu on your TD 200? Yes No Would you like to enable the force menu on your TD 200? Yes No Would you like to enable password protection? Yes No 0000Password (0000 - 9999): Figure 5-5 TD 200 Time-of-Day Clock, Force I/O, and Password Protection Additional Features of STEP 7-Micro/WIN 5-5 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Specifying Function Key Memory Bits and the Display Update Rate You must specify a byte address in M memory to reserve eight bits that correspond to the function keys on the TD 200. Valid address values are 0 to 15 in the CPU 212 and 0 to 31 in the CPU 214, CPU 215, and CPU 216. The TD 200 Wizard writes the value to byte 5 of the parameter block. Use the drop-down list box to select the display update rate, as described in Figure 5-6. The TD 200 Wizard sets the corresponding bits in byte 2 of the parameter block. TD 200 Configuration Wizard CancelNext > The TD 200 has 8 function keys (F1 through F4 and SHIFT F1 through SHIFT F4) that are used to set memory bits in the CPU. You must reserve eight bits of memory (M bits) for the TD 200 to set when a function key is pressed. One M bit is set by the TD 200 each time the corresponding function key is pressed. < Prev Which byte of M memory would you like to reserve for the TD 200? The update rate determines how often the TD 200 polls the CPU for messages to display. How often would you like the TD 200 to poll for messages? 0 As fast as possible Figure 5-6 TD 200 Function Key Memory Bits and Update Rate Warning The TD 200 sets an M bit each time a function key is pressed. If you do not intend to use function keys, and so do not assign an M byte address for function keys, the TD 200 defaults to byte M0 for the function keys. If your program uses bits in M0, and a user presses any function key, the TD 200 sets the corresponding bit in M0, overwriting the value assigned to that bit by your program. Inadvertent changes to M bits could cause your program to behave unexpectedly. Unpredictable controller operation could cause death or serious injury to personnel, and/or damage to equipment. Always reserve an M area address, even when your program does not utilize function keys. Additional Features of STEP 7-Micro/WIN ! 5-6 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Selecting Message Size and Number of Messages Use the option buttons to select the message size (bit 0 of byte 3 in the parameter block). Enter a number from 1 to 80 in the text field to specify the number of messages you want to create. The corresponding value is written to byte 4 in the parameter block. See Figure 5-7. TD 200 Configuration Wizard CancelNext > The TD 200 allows two message sizes, please select the message size you wish to support. < Prev 1 20 character message mode - displays two messages at a time 40 character message mode - displays one message at a time The TD 200 allows you to configure up to 80 messages. How many messages do you wish to configure? Figure 5-7 TD 200 Message Size and Number of Messages Additional Features of STEP 7-Micro/WIN 5-9 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Typing International and Special Characters When you enter certain international and special characters in the TD 200 Configuration Wizard, they may not appear correctly on the TD 200 display. If the characters do not display correctly, use the ALT key and number combinations shown in Table 5-1 to enter the characters in the TD 200 Wizard. Table 5-1 ALT Key Combinations for International and Special Characters Character ALT Key Combination Character ALT Key Combination ü ALT+0129 ñ ALT+0164 ä ALT+0132 Ω ALT+0234 æ ALT+0145 Σ ALT+0228 Æ ALT+0146 Π ALT+0227 å ALT+0134  ALT+0157 ö ALT+0148  ALT+0195 (left arrow ←) Å ALT+0143  ALT+0180 (right arrow →) ° ALT+0248 ALT+0200 (single bar) α ALT+0224 ALT+0201 (double bar) ß ALT+0225 ALT+0202 (triple bar)  ALT+0238 ALT+0203 (four bars)  ALT+0230 ALT+0204 (five bars)  ALT+0229 ↑ ALT+0194 (up arrow) ¢ ALT+0155 Additional Features of STEP 7-Micro/WIN 5-10 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Formatting the Embedded Data Value Figure 5-10 shows the dialog box where you define the parameters of the value to be displayed. The format and options you specify are written to a format word (two bytes) that precedes each embedded value. Select the size, display format, number of decimal places, and other options for the embedded data variable. Embedded Data CancelOKDelete None Word Double Word Signed Unsigned 2 Digits to the right of the decimal User must acknowledge message Is the user allowed to edit this data? VD47Address of Data Value: Real (floating point) V45.2Edit Notification Bit: Should the user edit of data be Password-protected? Data Format: Display Format: Note: Some fields appear according to options chosen. Figure 5-10 TD 200 Message Embedded Data Dialog Figure 5-11 shows the message dialog box after you have selected the parameters for an embedded data value. The grayed fields are the place holders for the data value. If you specified that a user must acknowledge each message, then the acknowledgement notification bit is displayed in the message dialog. TD 200 Configuration Wizard CancelFinish You have asked to configure 1 message(s). Define your message by placing your highest priority message first. < Prev Embedded Data... INS <Previous Message Next Message > VB32 VB12.7 Message beginning address: Message enabled bit: 5 10 15 20 T I M E E L A P S E D V45.1Acknowledgement notification bit: Message 1 of 1 Note: Gray fields are place holders for embedded data values. Figure 5-11 TD 200 Embedded Data Value Place Holder in Message Additional Features of STEP 7-Micro/WIN 5-11 S7-200 Programmable Controller System Manual C79000-G7076-C230-02 Finishing the TD 200 Parameter Block Click on the “Next Message >” button to enter text for each subsequent message. After entering all of your TD 200 messages, click on “Finish” to save your configured parameter block and messages to the data block. You can view the TD 200 parameter block as formatted by the TD 200 Wizard by opening the data block editor. Figure 5-12 shows a sample parameter block for a 40-character message as it appears in the data block editor. Data Block EditorDB // BEGIN TD200_BLOCK 0 // (Comments within this block should not be edited or removed) VB0 ‘TD’ // TD 200 Identification VB2 16#10 // Set Language to English, set Update to As fast as poss VB3 16#31 // Set the display to 40 character mode; Up key V3.2; Dow VB4 10 // Set the number of messages VB5 0 // Set the Function Keys notification bits to M0.0 - M0.7 VW6 32 // Set the starting address for messages to VW32 VW8 12 // Set the starting address for message enable bits to V1 // MESSAGE 1 // Message Enable Bit V12.7 VB32 ‘TIME ELAPSED ’ VB45 16#11 // Edit Notification Bit V45.2; Acknowledgement Notificat VB46 16#22 // Signed Double Word; 2 Digits to the right of the decim VD47 16#0000 // Embedded Data Value: Move data for display here. VB51 ‘ PUMP PRESSURE=’ VB66 16#10 // Edit Notification Bit V66.2; No Acknowledgement; No Pa VB67 16#52 // Real Double Word; 2 Digits to the right of the decimal Figure 5-12 Data Block Editor Showing a Sample TD 200 Parameter Block Additional Features of STEP 7-Micro/WIN
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved