Siemens Simatic S7-200 CPU 210 System Manual

Preface, Contents
SIMATIC
S7-200 Programmable Controller, CPU 210
System Manual
Installing the CPU 210 Installing and Using the
STEP 7-Micro/WIN Version 2.0 Software
Getting Started with a Sample Program
Instruction Set
Appendix
CPU 210 Data Sheets
Special Memory (SM)
1
2 3 4 5
A B
C79000-G7076-C235-01
Error Handling and Error Codes Converting STEP 7-Micro/DOS
Files to STEP 7-Micro/WIN Files Execution Times for STL
Instructions
CPU 210 Order Numbers Index
C D E
F
Safety Guidelines
!
!
!
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.
Note
draws your attention to particularly important information on the product, handling the product, or to a particular part of the documentation.
Qualified Personnel
Correct Usage
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 sys­tems in accordance with established safety practices and standards.
Note the following:
Warning
!
Trademarks
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 Energy & Automation, Inc. 3333 Old Milton Parkway Alpharetta, GA 30202
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.
SIMATICR and SINECR are registered trademarks of SIEMENS AG.
Third parties using for their own purposes any other names in this document which refer to trademarks might infringe upon the rights of the trademark owners.
Disclaimer of LiabilityCopyright E Siemens SE&A 1997 All rights reserved We have checked the contents of this manual for agreement with the
hardware and software described. Since deviations cannot be precluded entirely , we cannot guarantee full agreement. However , the data in this manual are reviewed regularly and any necessary corrections included in subsequent editions. Suggestions for improvement are welcomed.
Technical data subject to change. E Siemens SE&A 1997
Siemens Energy & Automation
6ES7 298-8EA00-8BH0
S7-200 Programmable Controller, CPU 210

Preface

Purpose
The CPU 210 is an addition to the S7-200 series micro-programmable logic controllers (Micro PLCs). Its compact design, low cost, and powerful instruction set make the CPU 210 a perfect solution for controlling small applications. The selection of voltage options provides you with the flexibility you need to solve your automation problems.
SIMA TIC S7-200 CPU 210 Programmable Controller System Manual
The information about installing and programming the CPU 210 and the program development station (PDS 210). This manual also includes descriptions and examples for the programming instructions, typical execution times for the instructions, and the data sheets for the CPU 210 and related equipment.
Audience
This manual is designed for engineers, programmers, installers, and electricians who have a general knowledge of programmable logic controllers.
Scope of the Manual
The information contained in this manual pertains in particular to the following products:
S CPU 210 and the PDS 210 S STEP 7-Micro/WIN version 2.0 programming software
provides
How to Use This Manual
If you are a first-time (novice) user of S7-200 Micro PLCs, you should read the entire manual. If you are an experienced user, refer to the table of contents or index to find specific information.
The manual is organized in the following topics:
S “Installing the CPU 210” (Chapter 1) provides an overview of some of the features of the
equipment and the procedures, dimensions, and basic guidelines for installing the CPU 210.
S “Installing and Using the STEP 7-Micro/WIN V ersion 2.0 Software” (Chapter 2) describes
how to install the programming software. It also provides a basic explanation about the features of the software.
S “Getting Started with a Sample Program” (Chapter 3) helps you enter a sample program,
using the STEP 7-Micro/WIN software.
S “Basic Concepts for Programming the CPU 210” (Chapter 4) provides information about
how the CPU 210 processes data and executes a program.
S “Instruction Set” (Chapter 5) provides explanations and examples of the programming
instructions used by the CPU 210.
S7-200 Programmable Controller, CPU 210 C79000-G7076-C235-01
iii
Preface
Additional information (such as the equipment data sheets, error code descriptions and execution times) are provided in the appendices.
Additional Assistance
For assistance in answering technical questions, for training on this product, or for ordering, contact your Siemens distributor or sales office.
iv
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01

Contents

1 Installing the S7-200 CPU 210
1.1 Product Overview 1-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Equipment Requirements 1-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Features of the CPU 210 1-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Pre-installation Considerations 1-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Installation Configuration 1-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Clearance Requirements for Installing a CPU 210 1-4. . . . . . . . . . . . . . . . . . . . . . . . . . .
DIN Rail Requirements 1-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Panel-Mounting Dimensions 1-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3 Installing a CPU 210 1-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Mounting a CPU 210 on a Panel 1-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Installing a CPU 210 on a DIN Rail 1-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Installing a CPU 210 in a Panel Box 1-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4 Installing the Field Wiring 1-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
General Guidelines 1-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Grounding and Circuit Referencing Guidelines for Using Isolated Circuits 1-9. . . . . . .
Using the Optional Field Wiring Connector 1-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Guidelines for AC Installation 1-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Guidelines for DC Installation 1-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.5 Using Suppression Circuits 1-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Protecting DC Transistors 1-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Protecting Relays Controlling DC Power 1-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 Installing and Using the STEP 7-Micro/WIN Version 2.0 Software
2.1 Installing the STEP 7-Micro/WIN Version 2.0 Software 2-2. . . . . . . . . . . . . . . . . . . . . . .
Pre-installation Instructions 2-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Installation Instructions for Windows 3.1 2-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Installation Instructions for Windows 95 2-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Troubleshooting the Installation 2-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 Establishing Communication with the PDS 210 2-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting Your Computer to the PDS 210 for PPI Communications 2-3. . . . . . . . . . .
Setting Up the Communications Parameters 2-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3 Configuring the Preferences for STEP 7-Micro/WIN 2-5. . . . . . . . . . . . . . . . . . . . . . . . . .
2.4 Creating and Saving a Project 2-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating a New Project 2-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Saving a Project 2-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
S7-200 Programmable Controller, CPU 210 C79000-G7076-C235-01
v
Contents
2.5 Creating a Program 2-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Entering Your Program in Ladder 2-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Entering Your Program in Statement List 2-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Compiling the Program 2-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Viewing a Program in Ladder or Statement List 2-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.6 Downloading A Program 2-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Downloading the Program to the PDS 210 2-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Copying Your Program to the Memory Cartridge 2-1 1. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Transporting the Program to the CPU 210 2-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.7 Using Symbolic Addressing 2-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Guidelines for Entering Symbolic Addresses 2-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Starting the Symbol Table Editor 2-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Editing Functions within the Symbol Table 2-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sorting Table Entries 2-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Displaying the Symbolic Addresses 2-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.8 Using the Status Chart 2-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Reading and Writing Variables with the Status Chart 2-15. . . . . . . . . . . . . . . . . . . . . . . . .
Editing Addresses 2-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.9 Debugging and Monitoring Your Program 2-16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Single/Multiple Scans to Monitor Your Program 2-16. . . . . . . . . . . . . . . . . . . . . . . .
Displaying the Status of the Program in Ladder Logic 2-16. . . . . . . . . . . . . . . . . . . . . . . .
2.10 Error Handling for the PDS 210 2-17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Responding to Fatal Errors 2-17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Responding to Non-Fatal Errors 2-18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3 Getting Started with a Sample Program
3.1 Defining the Requirements for the Application Example 3-2. . . . . . . . . . . . . . . . . . . . . .
Defining the Inputs and Outputs for the Application 3-2. . . . . . . . . . . . . . . . . . . . . . . . . .
Creating Symbolic Names for the Elements of the Program 3-2. . . . . . . . . . . . . . . . . . .
3.2 Designing the Control Logic 3-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Defining the Operation of the Program 3-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Designing the Control Logic for Arming and Disarming the System 3-6. . . . . . . . . . . . .
Designing the Control Logic for Turning On the Low-Level Alert Notification 3-7. . . . .
Designing the Control Logic for Turning On the Alarm and Modem Dialer 3-8. . . . . . .
3.3 Putting the Control Logic into a Program 3-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4 Creating a Project with STEP 7-Micro/WIN 3-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.5 Creating a Symbol Table 3-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Entering the Symbol Names 3-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.6 Entering the Program 3-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Programming with Symbolic Addresses 3-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using the Ladder Editor to Enter the Program 3-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Compiling the Program 3-21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Saving the Sample Program 3-21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.7 Creating a Status Chart 3-22. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Building a Status Chart 3-22. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
vi
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01
3.8 Downloading and Monitoring the Sample Program 3-23. . . . . . . . . . . . . . . . . . . . . . . . . . .
Downloading the Project to the PDS 210 3-23. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using the Ladder Editor to Monitor the Status of the Program 3-23. . . . . . . . . . . . . . . . .
Using the Status Chart to Monitor and Modify the Current V alues of the Program 3-24
3.9 Modifying the Sample Program 3-25. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating the Blink Patterns for the LED 3-25. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Turning the LED On and Off 3-26. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4 Basic Concepts for Programming the CPU 210
4.1 Guidelines for Designing a Micro PLC System 4-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Partitioning Your Process or Machine 4-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating the Functional Specifications 4-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Designing the Safety Circuits 4-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Specifying the Operator Stations 4-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating the PLC Configuration Drawings 4-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating a List of Symbolic Names 4-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2 Concepts for Creating a Program 4-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Relating the Program to Inputs and Outputs 4-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Accessing Data in the Memory Areas 4-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Organizing the Program 4-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.3 Understanding the Scan Cycle of the CPU 210 4-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Understanding the Basic Scan Cycle of the CPU 210 4-6. . . . . . . . . . . . . . . . . . . . . . . .
Understanding the Basic Scan Cycle of the PDS 210 4-7. . . . . . . . . . . . . . . . . . . . . . . .
Using the Debug Option to Specify the Number of Scans 4-8. . . . . . . . . . . . . . . . . . . . .
4.4 Understanding the Programming Languages 4-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Understanding the Basic Elements of Ladder 4-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Understanding the Statement List Instructions 4-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5 Understanding the Addresses of the Memory Areas 4-11. . . . . . . . . . . . . . . . . . . . . . . . .
Using the Memory Address to Access Data 4-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Addressing the Input Image Register (I) 4-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Addressing the Outputs (Q) 4-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Addressing the Bit Memory (M) Area 4-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Addressing the Special Memory (SM) Bits 4-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Addressing the Timer (T) Memory Area 4-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Addressing the Counter (C) Memory Area 4-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Constant Values 4-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.6 Sample Program Using an Interrupt Routine 4-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.7 Using the Analog Adjustment Potentiometer 4-16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents
5 Instruction Set
5.1 V alid Ranges for the CPU 210 and PDS 210 5-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
V alid Operand Ranges 5-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2 Contact Instructions 5-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Standard Contacts 5-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Not 5-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Positive, Negative Transition 5-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Compare Word Integer 5-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contact Examples 5-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Output 5-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Set, Reset 5-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
S7-200 Programmable Controller, CPU 210 C79000-G7076-C235-01
vii
Contents
Output Example 5-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.4 Timer Instructions 5-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
On-Delay Timer 5-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Understanding How the CPU 210 Updates the Timers 5-6. . . . . . . . . . . . . . . . . . . . . . .
Timer Example 5-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.5 Counter Instructions 5-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Up/Down Counter 5-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Counter Example 5-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.6 Increment and Decrement Instructions 5-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Increment Word, Decrement Word 5-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Increment, Decrement Example 5-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.7 Move Instruction 5-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Move Word 5-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Move Examples 5-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.8 Program Control Instructions 5-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
END 5-1 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Watchdog Reset 5-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Considerations for Using the WDR Instruction to Reset the Watchdog T imer 5-11. . . .
END and WDR Example 5-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Jump to Label, Label 5-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Jump to Label Example 5-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.9 Logic Stack Instructions 5-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
And Load 5-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Or Load 5-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Logic Stack Example 5-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.10 Interrupt Instructions 5-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Interrupt Routine, Return from Interrupt Routine 5-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Enable Interrupt, Disable Interrupt 5-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Guidelines and Restrictions for Using the Interrupt Routine 5-15. . . . . . . . . . . . . . . . . . .
Sharing Data Between the Main Program and the Interrupt Routine 5-15. . . . . . . . . . . .
Interrupt Example 5-16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A CPU 210 Data Sheets
A.1 General Technical Specifications A-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.2 CPU 210 DC Power Supply, 24 VDC Inputs, 24 VDC Outputs A-4. . . . . . . . . . . . . . . . .
A.3 CPU 210 AC Power Supply, 24 VDC Inputs, Relay Outputs A-6. . . . . . . . . . . . . . . . . . .
A.4 CPU 210 AC Power Supply, AC Inputs, Relay Outputs A-8. . . . . . . . . . . . . . . . . . . . . . .
A.5 PDS 210 AC Power Supply, DC Inputs, Relay Outputs A-10. . . . . . . . . . . . . . . . . . . . . . .
A.6 Memory Cartridge 8K x 8 A-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.7 Memory Cartridge 16K x 8 A-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.8 PC/PPI Cable A-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.9 DC Input Simulator A-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
S7-200 Programmable Controller, CPU 210
viii
C79000-G7076-C235-01
Contents
BSpecial Memory (SM) B-1 CError Handling and Error Codes C-1 DConverting STEP 7-Micro/DOS Files to STEP 7-Micro/WIN Files D-1 EExecution Times for STL Instructions E-1 FCPU 210 Order Numbers F-1
Index Index-1
S7-200 Programmable Controller, CPU 210 C79000-G7076-C235-01
ix
Contents
x
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01

Installing the S7-200 CPU 210

The S7-200 CPU 210 is one of the S7-200 series of micro-programmable logic controllers (Micro PLCs) that can control a variety of automation applications. Figure 1-1 shows an S7-200 CPU 210. The compact design and low cost of the CPU 210 make a perfect solution for controlling small applications. In addition, the variety of input and output voltages provides you with the flexibility you need to solve your automation problems with the maintenance-free operation of the CPU 210.
The CPU 210 is easy to install. You can use the mounting holes to attach the module to a panel, or you can use the built-in DIN clips to mount the module onto a DIN rail. The small size of the CPU 210 allows you to make efficient use of space.
1
Figure 1-1 S7-200 CPU 210
Chapter Overview
Section Description Page
1.1 Product Overview 1-2
1.2 Pre-installation Considerations 1-4
1.3 Installing a CPU 210 1-6
1.4 Installing the Field Wiring 1-8
1.5 Using Suppression Circuits 1-12
S7-200 Programmable Controller, CPU 210 C79000-G7076-C235-01
1-1
Installing the S7-200 CPU 210

1.1 Product Overview

The CPU 210 combines a central processing unit (CPU), power supply, and discrete I/O points into a compact, stand-alone device.
S The CPU executes the program and stores the data for controlling the automation task or
process.
S 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.
S Status lights provide visual information about the CPU mode (RUN) or whether a system
fault (SF) has been detected.
Equipment Requirements
As shown in Figure 1-2, you use the STEP 7-Micro/WIN programming software with a program development station (the PDS 210) to create and to test your program. The final program is then loaded onto a memory cartridge, which is then installed in the CPU 210. You need the following equipment to create programs for the CPU 210:
S Personal computer (PC) running the STEP 7-Micro/WIN programming software. Refer to
Chapter 2 for the requirements for installing the STEP 7-Micro/WIN software.
S Program development station (PDS 210). S PC/PPI communications cable. S Memory cartridge for transferring the program to the CPU 210.
Refer to the data sheets in Appendix A for order numbers and other specifications of this equipment.
Components for developing a program for the CPU 210
Computer
STEP 7-Micro/WIN
PC/PPI Communications Cable
CPU 210
Figure 1-2 Components of a CPU 210 Micro PLC System
Program Development Station (PDS 210)
Memory cartridge transfers the program to the CPU 210
1-2
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01
Features of the CPU 210
БББББББ
Á
Á
БББББББ
Á
y
Á
Á
Á
Á
Á
Á
Á
Á
Á
Á
Á
Á
Á
Á
Á
Á
Á
Á
Inst
(36 total)
Á
Á
Á
Á
Á
Á
Á
The CPU 210 is an integral part of the S7-200 family of Micro PLCs. Table 1-1 provides a summary of the major features of the CPU 210.
Table 1-1 Features of the CPU 210
Installing the S7-200 CPU 210
Feature
CPU 210
Physical Size (length x width x depth) 90 x 80 x 62 mm Memory cartridge for downloading the program
Program size
ББББББ
Memory
ББББББББББ
Storage type Internal memory Local inputs
ББББББ
ББББББ
Inputs/Outputs (I/O)
ББББББ
ББББББ
ББББББ
ББББББББББ
Local outputs
ББББББББББ
Expansion I/O DC Input delay filter
ББББББББББ
AC Input delay filter
ББББББББББ
Sink/Source Inputs (DC)
ББББББББББ
Boolean execution speed On-Delay Timers
ББББББÁББББББББББ
ructions
ББББББ
ББББББÁББББББББББ
Resolution Up/Down Counters
Current value saved on power down
ББББББББББ
Jump / Label Analog adjustment potentiometers
Additional Features
ББББББ
Hardware Input Interrupts Interrupt response
ББББББББББ
Yes 256 words
ББББББ
EEPROM 48 bits (3 words) 4 digital inputs
ББББББ
4 digital outputs
ББББББ
No 15 ms
ББББББ
55 ms
ББББББ
Yes
ББББББ
95 µs/instruction 4
100 ms
ББББББ
4 Yes
ББББББ
Yes
ББББББ
1 1
20 s on, 40 s off
ББББББ
S7-200 Programmable Controller, CPU 210 C79000-G7076-C235-01
1-3
Installing the S7-200 CPU 210

1.2 Pre-installation Considerations

Installation Configuration
As shown in Figure 1-3, you can install a CPU 210 either on a panel or on a DIN rail. You can mount the CPU 210 either horizontally or vertically.
Mounting on a Panel Mounting on a DIN Rail
CPU 210
Figure 1-3 Mounting Configurations
Clearance Requirements for Installing a CPU 210
Use the following guidelines as you plan your installation:
S The CPU 210 is designed for natural convection cooling. You must provide a clearance
of at least 25 mm (1 inch), both above and below the units, for proper cooling. See Figure 1-4. Continuous operation of all electronic products at maximum ambient temperature and load will reduce their life.
S If you are installing a CPU 210 on a panel, you must allow 75 mm (2.9 inches) for the
minimum panel depth. See Figure 1-4.
S Be sure to allow enough space in your mounting design to accommodate the I/O wiring
connections.
25 mm (1 in.)
Clearance for cooling
CPU 210
CPU 210
Front of the enclosure
Mounting in a Panel Box
CPU 210
Mounting surface
CPU 210
1-4
25 mm (1 in.)
Front View Side View
Figure 1-4 Clearance Requirements for Installing a CPU 210
S7-200 Programmable Controller, CPU 210
75 mm (2.9 in.)
C79000-G7076-C235-01
DIN Rail Requirements
The CPU 210 can be installed on a standard DIN rail (DIN EN 50 022). Figure 1-5 shows the dimensions for this DIN rail.
Installing the S7-200 CPU 210
Figure 1-5 DIN Rail Dimensions
Panel-Mounting Dimensions
The CPU 210 and the PDS 210 include mounting holes to facilitate installation on panels. Figure 1-6 provides the mounting dimensions.
Mounting Holes (M4 or no. 8)
7.5 mm (0.29 in.)
1.0 mm (0.039 in.)
90 mm (3.54 in.)
77.3 mm (3.04 in.)
CPU 210
67.3 mm (2.65 in.)
35 mm (1.38 in.)
6.4 mm (0.25 in.)
80 mm (3.15 in.)
6.4 mm (0.25 in.)
6.4 mm (0.25 in.)
80 mm (3.15 in.)
67.3 mm (2.65 in.)
Figure 1-6 Mounting Dimensions for the CPU 210 and PDS 210
S7-200 Programmable Controller, CPU 210 C79000-G7076-C235-01
197 mm (7.76 in.)
184.3 mm (7.25 in.)
Program Development Station
(PDS 210)
Mounting Holes (M4 or no. 8)
1-5
Installing the S7-200 CPU 210

1.3 Installing a CPU 210

Warning
!
Mounting a CPU 210 on a Panel
Failure to disable all power to the CPU 210 and related equipment during installation or removal procedures may result in death or serious personal injury , and/or damage to equipment.
Disable all power to the CPU 210 and related equipment before installation or removal. Always follow appropriate safety precautions and ensure that power to the CPU 210 is
disabled before installation.
To install a CPU 210 on a panel, follow these steps:
1. Locate, drill, and tap the mounting holes for DIN M4 or American Standard number 8 screws. Refer to Section 1.2 for mounting dimensions and other considerations.
2. Secure the CPU 210 onto the panel, using DIN M4 or American Standard number 8 screws.
Installing a CPU 210 on a DIN Rail
To install a CPU 210 on a DIN rail (as shown in Figure 1-7), follow these steps:
1. Secure the DIN rail every 75 mm (approximately 3 inches) to the mounting panel.
2. Snap open the DIN clip (located on the bottom of the CPU 210) and hook the back of the module onto the DIN rail.
3. Snap the DIN clip closed, carefully checking to ensure that the DIN clip 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.
Figure 1-7 Installing a CPU 210 on a DIN Rail
CPU 210
Fasten DIN rail every 75 mm (approximately 3 inches)
DIN Clip
1-6
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01
Installing a CPU 210 in a Panel Box
To install a CPU 210 in a panel box, follow these steps:
1. Open one of the I/O access covers on the CPU 210. As shown in Figure 1-8, remove the access cover by gently pressing against the access cover until the hinges spring free. Repeat this procedure for the other access cover.
Installing the S7-200 CPU 210
Open the access cover. Gently press against the
CPU 210
CPU 210
(Side View)
(Side View)
Access covers
access cover until the access cover snaps off.
CPU 210
CPU 210
(Side View)
(Side View)
Figure 1-8 Removing the Access Covers from the CPU 210
2. Snap open the DIN clip (located on the bottom of the module).
3. Open the panel box and hook the back of the module onto the DIN rail. See Figure 1-9.
4. Snap the DIN clip closed, carefully checking to ensure that the DIN clip fastened the module securely onto the rail.
DIN rail
CPU 210
Figure 1-9 Installing the CPU 210 in a Panel Box
S7-200 Programmable Controller, CPU 210 C79000-G7076-C235-01
DIN Clip
1-7
Installing the S7-200 CPU 210

1.4 Installing the Field Wiring

Warning
!
General Guidelines
Failure to disable all power to the CPU 210 and related equipment during installation or removal procedures may result in death or serious personal injury , and/or damage to equipment.
Disable all power to the CPU 210 and related equipment before installing or removing field wiring.
Always follow appropriate safety precautions and ensure that power to the CPU 210 is disabled before installing field wiring.
The following items are general guidelines for designing the installation and wiring of your S7-200 CPU 210:
S Ensure that you follow all applicable electrical codes when wiring the CPU 210. 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.
S Always use the proper wire size that will carry the required current. The CPU 210 accepts
wire sizes from 1.50 to 0.50 mm
S Ensure that you do not over-tighten the connector screws. The maximum torque is
0.56 N-m (5 inches-pounds).
S Always use the shortest wire possible (maximum 500 meters shielded, 300 meters
unshielded). Wiring should be run in pairs, with a neutral or common wire paired with a hot or signal-carrying wire.
S Separate AC wiring and high-energy , rapidly switched DC wiring from low-energy signal
wiring.
S Properly identify and route the wiring to the CPU 210, using strain relief for the wiring as
required. For more information about identifying the terminals, see the data sheets in Appendix A.
S Install appropriate surge suppression devices for wiring that is subject to lightning surges. S 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.
2
(14 to 22 AWG).
1-8
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.
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01
Installing the S7-200 CPU 210
Grounding and Circuit Referencing Guidelines for Using Isolated Circuits
The following items are grounding and circuit guidelines for using isolated circuits:
S You should identify the reference point (0 voltage reference) for each circuit in the
installation, and the points at which circuits with possible different references can connect together. Such connections can result in unwanted current flows that can cause logic errors or damage circuits. A common cause of different reference potentials is grounds which are physically separated by long distances. When devices with widely separated grounds are connected with a sensor cable, unexpected currents can flow through the circuit created by the cable and the ground. Even over short distances, load currents of heavy machinery can cause differences in ground potential or directly induce unwanted currents by electromagnetic induction. Power supplies that are improperly referenced with respect to each other can cause damaging currents to flow between their associated circuits.
S The CPU 210 includes isolation boundaries at certain points to help prevent unwanted
current flows in your installation. When you plan your installation, you should consider where these isolation boundaries are, and where they are not provided. You should also consider the isolation boundaries in associated power supplies and other equipment, and where all associated power supplies have their reference points.
S You should choose your ground reference points and use the isolation boundaries
provided to interrupt unneeded circuit loops that could allow unwanted currents to flow. Remember to consider temporary connections which may introduce a new circuit reference, such as the connection of a programming device to the CPU.
S When locating grounds, you must also consider safety grounding requirements and the
proper operation of protective interrupting devices.
The following descriptions are an introduction to general isolation characteristics of the CPU 210, but some features may be different on specific products. Consult the data sheet in Appendix A for your product for specifications of which circuits include isolation boundaries and the ratings of the boundaries. Isolation boundaries rated less than 1500 V AC are designed as functional isolation only and should not be depended on as safety boundaries.
S CPU logic reference is the same as DC Sensor Supply M. S CPU logic reference is the same as the input power supply M on a CPU with DC power
supply.
S CPU logic is isolated from ground to 100 VDC. S DC digital inputs and outputs are isolated from CPU logic to 500 V AC. S Relay outputs and AC inputs are isolated from CPU logic to 1500 V AC. S Relay output groups are isolated from each other by 1500 V AC. S AC power supply Line and Neutral are isolated from ground, the CPU logic, and all I/O to
1500 V AC.
S7-200 Programmable Controller, CPU 210 C79000-G7076-C235-01
1-9
Installing the S7-200 CPU 210
Using the Optional Field Wiring Connector
The optional field wiring fan-out connector (Figure 1-10) allows for field wiring connections to remain fixed when you remove and re-install the CPU 210. Refer to Appendix F for the order number.
DC
M L+ 0.0 0.1 0.2 0.3
OUTPUTS
Figure 1-10 Optional Field Wiring Connector
Guidelines for AC Installation
The following items are general wiring guidelines for AC installations. Refer to Figure 1-1 1.
S Provide a single disconnect switch (A) that removes power from the CPU, all input
circuits, and all output (load) circuits.
S Provide overcurrent devices (B) to protect the CPU power supply, the output points, and
the input points. 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 (C) from the CPU 210. This sensor supply is short-circuit protected.
S Connect all CPU 210 ground terminals to the closest available earth ground (D) 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 mm connection.
If required, you can use a DC Sensor Supply from the CPU 210 to supply power for the inputs (E). Refer to the guidelines for DC installation, especially in regard to connecting and external power supply in parallel with the power supply of the CPU 210.
M L+ 24V DC
Field Wiring Fan-out Connector
2
wire for this
Guidelines for DC Installation
The following items are general wiring guidelines for isolated DC installations. Refer to Figure 1-1 1.
S Provide a single disconnect switch (1) that removes power from the CPU, all input
circuits, and all output (load) circuits.
S 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 CPU 210. This sensor supply is internally current limited.
S Ensure that the DC power supply has sufficient surge capacity to maintain voltage during
sudden load changes. External capacitance (5) may be required.
1-10
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01
Installing the S7-200 CPU 210
S Install or 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 1M and 4700 pf. You can also create a grounded DC system by connecting the DC power supply to ground (7).
S Connect all CPU 210 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 mm connection.
2
wire for this
S Always supply 24 VDC circuits from a source that provides safe electrical separation from
120/230 VAC power and similar hazards. Refer to the following documents for standard definitions of “safe separation”: PEL V (protected extra low voltage) according to EN60204-1, and Class 2 or Limited Voltage/Current Circuit according to UL 508.
Warning
!
Connecting an external 24 VDC power supply in parallel with the DC sensor supply of the CPU 210 can result in a conflict between the two supplies as each seeks to establish its own preferred output voltage level. The result of this conflict can be shortened lifetime or immediate failure of one or both power supplies, with consequent unpredictable operation of the PLC system. Unpredictable operation could result in death or serious injury to personnel, and/or damage to equipment and property .
The CPU 210 DC Sensor Supply and any external power supply should provide power to different points, with at most one connection between the two supplies.
120/230 V AC Using a Single Overcurrent Switch to Protect the CPU and Load Wiring
L1 N PE
24 VDC
L1 N PE
(A)
(E)
DO
DI
(B)
(D)
(B)
Fuse
(C)
M L+
P/S
CPU 210 AC/DC/Rly
Figure 1-11 Wiring Guidelines for AC and DC Installation
Isolated DC System Installation
(1)
(5)
Floating (6) or Grounded (7)
AC
DC
(2)
(3)
(4)
L+ M
(6)
(7)
DO DI
(8)
P/S
CPU 210 DC/DC/DC
S7-200 Programmable Controller, CPU 210 C79000-G7076-C235-01
1-11
Installing the S7-200 CPU 210

1.5 Using Suppression Circuits

Install or equip inductive loads with suppression circuits that limit voltage rise on loss of power. Use the following guidelines to design adequate suppression. The ef fectiveness of a given design is dependent 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 DC transistor outputs of the CPU 210 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. Figure 1-12 shows typical applications for DC transistor outputs.
Diode Suppression
Zener Diode Suppression
Figure 1-12 Diode Suppression and Zener Diode Suppression
Protecting Relays Controlling DC Power
Resistor/capacitor networks, as shown in Figure 1-13, can be used for low voltage (30 V) DC relay applications. Connect the network across the load. You can also use diode suppression, as shown in Figure 1-12, for DC relay applications. A threshold voltage of up to 36 V is allowed if you use a reverse zener diode.
+VDC
+VDC
RC
Inductor
(1)
Inductor
(1) (2)
Inductor
I
L
+VDC
(1) IN4001 diode or
equivalent
(1) IN4001 diode or
equivalent
(2) 8.2 V zener, 5 W
V
DC
R
I
L
where minimum R = 12
K
C I
L
where K is 0.5 to 1 µ F/A
1-12
Figure 1-13 Resistor/Capacitor Network on Relay-Driven DC Load
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01

Installing and Using the STEP 7-Micro/WIN Version 2.0 Software

This manual describes Version 2.0 of STEP 7-Micro/WIN. Previous versions of the software may operate differently.
STEP 7-Micro/WIN is a Windows-based software application used for programming the S7-200 Micro PLC (programmable logic controller). The STEP 7-Micro/WIN programming software package provides a set of tools required to program the S7-210 in either statement list (STL) or ladder logic (LAD) programming language.
In order to use STEP 7-Micro/WIN, you must have the following equipment:
S Recommended: a personal computer (PC) with an 80486 or greater processor and
8 Mbyte of RAM or a Siemens programming device (such as a PG 740); computer requirement: 80386 with 8 Mbyte of RAM
S A PC/PPI cable connected to your communications port (COM) S A program development station (PDS 210) S VGA monitor, or any monitor supported by Microsoft Windows S At least 35 Mbyte of free hard disk space (recommended) S Microsoft Windows 3.1, Windows for Workgroups 3.11, Windows 95, or Windows NT 3.51
or greater
S 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.
minimum
2
Chapter Overview
Section
2.1 Installing the STEP 7-Micro/WIN Version 2.0 Software 2-2
2.2 Establishing Communication with the PDS 210 2-3
2.3 Configuring the Preferences for STEP 7-Micro/WIN 2-5
2.4 Creating and Saving a Project 2-6
2.5 Creating a Program 2-7
2.6 Downloading a Program 2-10
2.7 Using Symbolic Addressing 2-13
2.8 Using the Status Chart 2-15
2.9 Debugging and Monitoring Your Program 2-16
2.10 Error Handling for the PDS 210 2-17
S7-200 Programmable Controller, CPU 210 C79000-G7076-C235-01
Description Page
2-1
Installing and Using the STEP 7-Micro/WIN Version 2.0 Software

2.1 Installing the STEP 7-Micro/WIN Version 2.0 Software

Pre-installation Instructions
Before running the setup procedure, do the following:
S If a previous version of STEP 7-Micro/WIN is installed, back up all application programs
to diskette.
S 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 or Windows NT) on your machine, use the following procedure to install the STEP 7-Micro/WIN software:
1. Start by inserting Disk 1 in the disk drive of your computer (usually designated drive A: or drive B:).
"
2. From the Program Manager, select the menu command File
3. In the Run dialog box, type a:\setup and click on the “OK” button. This starts the setup procedure.
4. Follow the online setup procedure to complete the installation.
Run...
Installation Instructions for Windows 95
If you have Windows 95 on your machine, you can use the following procedure to install the STEP 7-Micro/WIN software:
1. Start by inserting Disk 1 in the disk drive of your computer (usually designated 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 the “OK” button. This starts the setup procedure.
5. Follow the online setup procedure to complete the installation.
Troubleshooting the Installation
The following situations can cause the installation to fail:
S Not enough memory: you need to have at least 35 Mbyte of free space on your hard disk. S Bad diskette: verify that the diskette is bad, then call your salesman or distributor. S Operator error: start over and read the instructions carefully . S Failure to close any open applications, including the Microsoft Office toolbar .
Note
x
Review the README about STEP 7-Micro/WIN. (In the C = French, D = Spanish, E = Italian.)
.TXT file included on your diskettes for the most recent information
x
position, the letter A = German, B = English,
2-2
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01
Installing and Using the STEP 7-Micro/WIN Version 2.0 Software

2.2 Establishing Communication with the PDS 210

Connecting Your Computer to the PDS 210 for PPI Communications
Figure 2-1 shows a typical configuration for connecting your personal computer to your PDS 210 with the PC/PPI cable. To establish proper communications between the components, follow these steps:
1. Set the dipswitches on the PC/PPI cable for the baud rate of 9600 baud.
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 PDS 210, and tighten the connecting screws.
Dipswitch Settings: 0 1 0 0 = 9600 baud
RS-232
Computer
PC/PPI cable
Figure 2-1 Communicating with a PDS 210 in PPI Mode
Program development station (PDS 210)
RS-485
S7-200 Programmable Controller, CPU 210 C79000-G7076-C235-01
2-3
Installing and Using the STEP 7-Micro/WIN Version 2.0 Software
Setting Up the Communications Parameters
Figure 2-2 shows the Setup Communications dialog box. The first two port options are for PC communication ports. The address for the PDS 210 is 2 and cannot be changed. To set up the communication parameters, follow these steps:
1. Select the menu command Setup " Communications...
2. Verify that the information in the dialog box is correct for your configuration. Remember that the CPU address for the PDS 210 is always 2, and that the baud rate is always
9600.
3. Confirm your selections by clicking the “OK” button.
Project Edit View CPU Debug Tools Setup Window Help
Communications
Port
COM1 COM2 MPI Card
aud Rate:
B
9,600
RQ Number For MPI Card::
I
10
Setup
Preferences...
C
ommunications...
PU Address:
C
Micro/WIN A
ddress:
H
T
Figure 2-2 Setting Up Communications with the PDS 210
OK
Cancel
2 0
ighest Master Address:
31
arget Token Rotation Time::
39
Find
2-4
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01
Installing and Using the STEP 7-Micro/WIN Version 2.0 Software

2.3 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
2. Select your programming preferences in the dialog box that appears.
3. Confirm your choices by clicking the “OK” button.
Preferences... as shown in Figure 2-3.
rmat
Setup
Preferences...
C
ommunications...
Language
English
Symbol Table
Minimized
Status Chart
Data Size
Project Edit View CPU Debug Tools Setup Window Help
Preferences
Default Editor
STL Editor L
adder Editor
Mnemonic Set
International SIMATIC
Initial Window States
Maximize All
Program Editor Normalized
Data Block Editor Minimized Minimized
Options for an Uploaded Data Block
Retain Format and Comments
Data Fo Hexadecimal Byte
OK
Cancel
Figure 2-3 Selecting Your Programming Preferences
S7-200 Programmable Controller, CPU 210 C79000-G7076-C235-01
2-5
Installing and Using the STEP 7-Micro/WIN Version 2.0 Software

2.4 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:
S Ladder Editor or Statement List Editor (depending on your selected preference) S Data Block Editor (not applicable for the PDS 210) S Status Chart S Symbol Table
Creating a New Project
The Project menu command allows you to create a new project, as shown in Figure 2-4. Select the menu command Project 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.
"
New.... The CPU Type dialog box is displayed. If you
Note
STEP 7-Micro/WIN does not range-check parameters. For example, you can enter MW999 as a parameter to a ladder instruction even though it is an invalid parameter. This error would be identified when you attempt to download the program.
Figure 2-4 Creating a New Project
Saving a Project
You can save a copy of the active project to a different name or location by selecting the menu command Project " Save As... You can save all of the components of your project by selecting the menu command Project
Project
Project View CPU Setup Help
New... Ctrl+N
O
pen... Ctrl+O
1
c:\microwin\project1.prj 2 c:\microwin\project2.prj 3
c:\microwin\project3.prj Ex
it
CPU Type
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.
LAD STL SYM STATDB1
PDS 210CPU Type:
OK
"
Save All or by clicking the Save button:
Read CPU Type
Communications...
Cancel
2-6
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01
Installing and Using the STEP 7-Micro/WIN Version 2.0 Software

2.5 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
The Ladder Editor window allows you to write a program using graphical symbols. See Figure 2-5. 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 alphabetic order, press F9 or select the All Instructions category.
Each network allows two types of comments:
S Single-line network title comments are always visible in the ladder display . You can
access the network editor by double-clicking anywhere in the network title region.
S Multi-line network comments are only visible through a dialog box, but can be printed (if
that option has been selected through the Page Setup dialog). You can access the network comment editor by double-clicking anywhere in the network title region.
To start entering your program, follow these steps:
1. To enter a program title, select the menu command Edit
2. To enter ladder elements, select the type of element you want by clicking the corresponding icon button or selecting from the instruction list.
3. Type the address or parameter in each text field and press ENTER.
To change or replace one of the elements, move the cursor to that element and select the new element. You can also cut, copy, or paste elements at the cursor location.
"
Program Title.
Ladder Editor - project1.ob1
Contacts Normally Open
Network 1
NETWORK TITLE (single line)
I0.0
Figure 2-5 Ladder Editor Window
F3F2
Press ENTER or double-click to place element.
F4 F5 F8F7F6 F10
Double click here to access the network title and comment editor.
S7-200 Programmable Controller, CPU 210 C79000-G7076-C235-01
2-7
Installing and Using the STEP 7-Micro/WIN Version 2.0 Software
Entering Your Program in Statement List
The Statement List (STL) Editor is a free-form text editor which allows a certain degree of flexibility in the way you choose to enter program instructions. Figure 2-6 shows an example of a statement list program.
You can cut, copy, and paste in the STL Editor. STEP 7-Micro/WIN also includes search-and-replace functions.
STL
STL Editor - project1.ob1
// Program for a Home Security System
NETWORK 1 //Sound the alarm! LD I0.3 // If (the panic alarm has been turned on) LDW>= T0, +600 // or (if the alert timer is >= 60 seconds A I0.2 // and the system is armed) OLD // then S M0.1, 1 // set the high-level alarm bit S Q0.3, 1 // set the modem dialer bit R M0.2, 1 // reset the low-level alarm bit
Network 2 //Evaluate the system status. LDN I0.0 // If zone 1 is open ON I0.1 // or if Zone 2 is open
To allow viewing the program in STL or Ladder, divide segments of code with keyword NETWORK.
Figure 2-6 STL Editor Window with Sample Program
To enter an STL program, follow these guidelines:
S Start each comment with a double slash (//). Each additional comment line must also
begin with a double slash.
S End each line with a carriage return. S Separate each instruction from its address or parameter with a space or tab. S Do not use a space between the operand type and the address (for example, enter I0.0,
not I 0.0).
S Separate each operand within an instruction with a comma, space, or tab. S Use quotation marks when entering symbol names. For example, if your symbol table
contains the symbol name Start1 for the address I0.0, enter the instruction as follows: LD “Start1”
To be able to view an STL program in ladder, you must divide segments of code into separate networks by entering the keyword NETWORK. (Network numbers are generated automatically after you compile or upload the program.)
Compiling the Program
After completing a network or series of networks, you can check the syntax of your code by selecting the menu command CPU
2-8
"
Compile or by clicking the Compile button:
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01
Loading...
+ 110 hidden pages