S7-200 CPU 210 Englisch - E L & E L

Transcription

Preface, ContentsSIMATICS7-200Programmable Controller,CPU 210Installing the CPU 2101Installing and Using theSTEP 7-Micro/WIN Version 2.0Software2Getting Started with a SampleProgram3Basic Concepts forProgramming the CPU 2104Instruction Set5AppendixSystem ManualCPU 210 Data SheetsASpecial Memory (SM)BError Handling and Error CodesCConverting STEP 7-Micro/DOSFiles to STEP 7-Micro/WIN FilesDExecution Times for STLInstructionsECPU 210 Order NumbersFIndexC79000-G7076-C235-01

iiSafety Guidelines!!!This manual contains notices which you should observe to ensure your own personal safety, as well as toprotect the product and connected equipment. These notices are highlighted in the manual by a warningtriangle and are marked as follows according to the level of danger:Dangerindicates that death, severe personal injury or substantial property damage will result if proper precautions arenot taken.Warningindicates that death, severe personal injury or substantial property damage can result if proper precautions arenot taken.Cautionindicates that minor personal injury or property damage can result if proper precautions are not taken.Notedraws your attention to particularly important information on the product, handling the product, or to a particularpart of the documentation.Qualified PersonnelThe 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 aredefined as persons who are authorized to commission, to ground, and to tag circuits, equipment, and systems in accordance with established safety practices and standards.Correct Usage!Note the following:WarningThis device and its components may only be used for the applications described in the catalog or the technicaldescription, and only in connection with devices or components from other manufacturers which have beenapproved or recommended by Siemens.This product can only function correctly and safely if it is transported, stored, set up, and installed correctly, andoperated and maintained as recommended.TrademarksSIMATICR and SINECR are registered trademarks of SIEMENS AG.Third parties using for their own purposes any other names in this document which refer totrademarks might infringe upon the rights of the trademark owners.Copyright E Siemens SE&A 1997 All rights reservedDisclaimer of LiabilityThe reproduction, transmission or use of this document or itscontents is not permitted without express written authority.Offenders will be liable for damages. All rights, including rightscreated by patent grant or registration of a utility model or design, arereserved.We have checked the contents of this manual for agreement with thehardware and software described. Since deviations cannot beprecluded entirely, we cannot guarantee full agreement. However,the data in this manual are reviewed regularly and any necessarycorrections included in subsequent editions. Suggestions forimprovement are welcomed.Siemens Energy & Automation, Inc.3333 Old Milton ParkwayAlpharetta, GA 30202Siemens Energy & AutomationTechnical data subject to change.E Siemens SE&A 19976ES7 298-8EA00-8BH0S7-200 Programmable Controller, CPU 210C79000 G7076 C235 01

PrefacePurposeThe 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 210a perfect solution for controlling small applications. The selection of voltage options providesyou with the flexibility you need to solve your automation problems.The SIMATIC S7-200 CPU 210 Programmable Controller System Manual providesinformation about installing and programming the CPU 210 and the program developmentstation (PDS 210). This manual also includes descriptions and examples for theprogramming instructions, typical execution times for the instructions, and the data sheets forthe CPU 210 and related equipment.AudienceThis manual is designed for engineers, programmers, installers, and electricians who have ageneral knowledge of programmable logic controllers.Scope of the ManualThe information contained in this manual pertains in particular to the following products:S CPU 210 and the PDS 210S STEP 7-Micro/WIN version 2.0 programming softwareHow to Use This ManualIf 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 specificinformation.The manual is organized in the following topics:S “Installing the CPU 210” (Chapter 1) provides an overview of some of the features of theequipment and the procedures, dimensions, and basic guidelines for installing theCPU 210.S “Installing and Using the STEP 7-Micro/WIN Version 2.0 Software” (Chapter 2) describeshow to install the programming software. It also provides a basic explanation about thefeatures 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 abouthow the CPU 210 processes data and executes a program.S “Instruction Set” (Chapter 5) provides explanations and examples of the programminginstructions used by the CPU 210.S7-200 Programmable Controller, CPU 210C79000-G7076-C235-01iii

PrefaceAdditional information (such as the equipment data sheets, error code descriptions andexecution times) are provided in the appendices.Additional AssistanceFor assistance in answering technical questions, for training on this product, or for ordering,contact your Siemens distributor or sales office.ivS7-200 Programmable Controller, CPU 210C79000-G7076-C235-01

Contents1Installing the S7-200 CPU 2101.11.21.31.41.52Product Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-2Equipment Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Features of the CPU 210 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-21-3Pre-installation Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-4Installation Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Clearance Requirements for Installing a CPU 210 . . . . . . . . . . . . . . . . . . . . . . . . . . .DIN Rail Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Panel-Mounting Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-41-41-51-5Installing a CPU 210 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-6Mounting a CPU 210 on a Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Installing a CPU 210 on a DIN Rail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Installing a CPU 210 in a Panel Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-61-61-7Installing the Field Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-8General Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Grounding and Circuit Referencing Guidelines for Using Isolated Circuits . . . . . . .Using the Optional Field Wiring Connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Guidelines for AC Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Guidelines for DC Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-81-91-101-101-10Using Suppression Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-12Protecting DC Transistors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Protecting Relays Controlling DC Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-121-12Installing and Using the STEP 7-Micro/WIN Version 2.0 Software2.12.2Installing the STEP 7-Micro/WIN Version 2.0 Software . . . . . . . . . . . . . . . . . . . . . . .2-2Pre-installation Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Installation Instructions for Windows 3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Installation Instructions for Windows 95 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Troubleshooting the Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-22-22-22-2Establishing Communication with the PDS 210 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-3Connecting Your Computer to the PDS 210 for PPI Communications . . . . . . . . . . .Setting Up the Communications Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-32-42.3Configuring the Preferences for STEP 7-Micro/WIN . . . . . . . . . . . . . . . . . . . . . . . . . .2-52.4Creating and Saving a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-6Creating a New Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Saving a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-62-6S7-200 Programmable Controller, CPU 210C79000-G7076-C235-01v

ding A Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-10Downloading the Program to the PDS 210 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Copying Your Program to the Memory Cartridge . . . . . . . . . . . . . . . . . . . . . . . . . . . .Transporting the Program to the CPU 210 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-102-112-11Using Symbolic Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-13Guidelines for Entering Symbolic Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Starting the Symbol Table Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Editing Functions within the Symbol Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Sorting Table Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Displaying the Symbolic Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-132-132-142-142-14Using the Status Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-15Reading and Writing Variables with the Status Chart . . . . . . . . . . . . . . . . . . . . . . . . .Editing Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-152-15Debugging and Monitoring Your Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-16Using Single/Multiple Scans to Monitor Your Program . . . . . . . . . . . . . . . . . . . . . . . .Displaying the Status of the Program in Ladder Logic . . . . . . . . . . . . . . . . . . . . . . . .2-162-16Error Handling for the PDS 210 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-17Responding to Fatal Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Responding to Non-Fatal Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-172-18Getting Started with a Sample Program3.13.2Defining the Requirements for the Application Example . . . . . . . . . . . . . . . . . . . . . .3-2Defining the Inputs and Outputs for the Application . . . . . . . . . . . . . . . . . . . . . . . . . .Creating Symbolic Names for the Elements of the Program . . . . . . . . . . . . . . . . . . .3-23-2Designing the Control Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-4Defining the Operation of the Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Designing the Control Logic for Arming and Disarming the System . . . . . . . . . . . . .Designing the Control Logic for Turning On the Low-Level Alert Notification . . . . .Designing the Control Logic for Turning On the Alarm and Modem Dialer . . . . . . .3-43-63-73-83.3Putting the Control Logic into a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-93.4Creating a Project with STEP 7-Micro/WIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-133.5Creating a Symbol Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-143.63.7viCreating a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Entering Your Program in Ladder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Entering Your Program in Statement List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Compiling the Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Viewing a Program in Ladder or Statement List . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Entering the Symbol Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-14Entering the Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-15Programming with Symbolic Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Using the Ladder Editor to Enter the Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Compiling the Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Saving the Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-153-153-213-21Creating a Status Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-22Building a Status Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-22S7-200 Programmable Controller, CPU 210C79000-G7076-C235-01

Contents3.83.943-23Downloading the Project to the PDS 210 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Using the Ladder Editor to Monitor the Status of the Program . . . . . . . . . . . . . . . . .Using the Status Chart to Monitor and Modify the Current Values of the Program3-233-233-24Modifying the Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-25Creating the Blink Patterns for the LED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Turning the LED On and Off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-253-26Basic Concepts for Programming the CPU 2104.14.24.34.44.55Downloading and Monitoring the Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . .Guidelines for Designing a Micro PLC System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-2Partitioning Your Process or Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Creating the Functional Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Designing the Safety Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Specifying the Operator Stations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Creating the PLC Configuration Drawings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Creating a List of Symbolic Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-24-24-34-34-34-3Concepts for Creating a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-4Relating the Program to Inputs and Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Accessing Data in the Memory Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Organizing the Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-44-44-5Understanding the Scan Cycle of the CPU 210 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-6Understanding the Basic Scan Cycle of the CPU 210 . . . . . . . . . . . . . . . . . . . . . . . .Understanding the Basic Scan Cycle of the PDS 210 . . . . . . . . . . . . . . . . . . . . . . . .Using the Debug Option to Specify the Number of Scans . . . . . . . . . . . . . . . . . . . . .4-64-74-8Understanding the Programming Languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-9Understanding the Basic Elements of Ladder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Understanding the Statement List Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-94-10Understanding the Addresses of the Memory Areas . . . . . . . . . . . . . . . . . . . . . . . . .4-11Using the Memory Address to Access Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Addressing the Input Image Register (I) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Addressing the Outputs (Q) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Addressing the Bit Memory (M) Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Addressing the Special Memory (SM) Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Addressing the Timer (T) Memory Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Addressing the Counter (C) Memory Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Using Constant Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-114-124-124-124-124-134-134-134.6Sample Program Using an Interrupt Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-144.7Using the Analog Adjustment Potentiometer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-16Instruction Set5.15.2Valid Ranges for the CPU 210 and PDS 210 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-2Valid Operand Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-2Contact Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-3Standard Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Not . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Positive, Negative Transition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Compare Word Integer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Contact Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Set, Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-35-35-35-45-45-55-5S7-200 Programmable Controller, CPU 210C79000-G7076-C235-01vii

Contents5.45.55.65.75.85.95.10AviiiOutput Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-5Timer Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-6On-Delay Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Understanding How the CPU 210 Updates the Timers . . . . . . . . . . . . . . . . . . . . . . .Timer Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-65-65-7Counter Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-8Up/Down Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Counter Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-85-8Increment and Decrement Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-9Increment Word, Decrement Word . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Increment, Decrement Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-95-9Move Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-10Move Word . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Move Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-105-10Program Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-11END . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Watchdog Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Considerations for Using the WDR Instruction to Reset the Watchdog Timer . . . .END and WDR Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Jump to Label, Label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Jump to Label Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-115-115-115-125-125-12Logic Stack Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-13And Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Or Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Logic Stack Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-135-135-13Interrupt Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-14Interrupt Routine, Return from Interrupt Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Enable Interrupt, Disable Interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Guidelines and Restrictions for Using the Interrupt Routine . . . . . . . . . . . . . . . . . . .Sharing Data Between the Main Program and the Interrupt Routine . . . . . . . . . . . .Interrupt Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-145-145-155-155-16CPU 210 Data SheetsA.1General Technical Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A-2A.2CPU 210 DC Power Supply, 24 VDC Inputs, 24 VDC Outputs . . . . . . . . . . . . . . . . .A-4A.3CPU 210 AC Power Supply, 24 VDC Inputs, Relay Outputs . . . . . . . . . . . . . . . . . . .A-6A.4CPU 210 AC Power Supply, AC Inputs, Relay Outputs . . . . . . . . . . . . . . . . . . . . . . .A-8A.5PDS 210 AC Power Supply, DC Inputs, Relay Outputs . . . . . . . . . . . . . . . . . . . . . . .A-10A.6Memory Cartridge 8K x 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A-12A.7Memory Cartridge 16K x 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A-13A.8PC/PPI Cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A-14A.9DC Input Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .A-15S7-200 Programmable Controller, CPU 210C79000-G7076-C235-01

ContentsBSpecial Memory (SM)B-1CError Handling and Error CodesC-1DConverting STEP 7-Micro/DOS Files to STEP 7-Micro/WIN FilesD-1EExecution Times for STL InstructionsE-1FCPU 210 Order NumbersF-1IndexS7-200 Programmable Controller, CPU 210C79000-G7076-C235-01Index-1ix

ContentsxS7-200 Programmable Controller, CPU 210C79000-G7076-C235-01

Installing the S7-200 CPU 2101The 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 anS7-200 CPU 210. The compact design and low cost of the CPU 210 make a perfect solutionfor controlling small applications. In addition, the variety of input and output voltages providesyou with the flexibility you need to solve your automation problems with the maintenance-freeoperation of the CPU 210.The CPU 210 is easy to install. You can use the mounting holes to attach the module to apanel, or you can use the built-in DIN clips to mount the module onto a DIN rail. The smallsize of the CPU 210 allows you to make efficient use of space.Figure 1-1S7-200 CPU 210Chapter OverviewSectionDescriptionPage1.1Product Overview1-21.2Pre-installation Considerations1-41.3Installing a CPU 2101-61.4Installing the Field Wiring1-81.5Using Suppression Circuits1-12S7-200 Programmable Controller, CPU 210C79000-G7076-C235-011-1

Installing the S7-200 CPU 2101.1Product OverviewThe CPU 210 combines a central processing unit (CPU), power supply, and discrete I/Opoints into a compact, stand-alone device.S The CPU executes the program and stores the data for controlling the automation task orprocess.S The inputs and outputs are the system control points: the inputs monitor the signals fromthe 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 systemfault (SF) has been detected.Equipment RequirementsAs shown in Figure 1-2, you use the STEP 7-Micro/WIN programming software with aprogram development station (the PDS 210) to create and to test your program. The finalprogram is then loaded onto a memory cartridge, which is then installed in the CPU 210. Youneed the following equipment to create programs for the CPU 210:S Personal computer (PC) running the STEP 7-Micro/WIN programming software. Refer toChapter 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 thisequipment.Components for developing a program for the CPU 210ComputerProgram Development Station(PDS 210)STEP 7-Micro/WINPC/PPI Communications CableMemory cartridgetransfers the programto the CPU 210CPU 210Figure 1-21-2Components of a CPU 210 Micro PLC SystemS7-200 Programmable Controller, CPU 210C79000-G7076-C235-01

Installing the S7-200 CPU 210Features of the CPU 210The CPU 210 is an integral part of the S7-200 family of Micro PLCs. Table 1-1 provides asummary of the major features of the CPU 210.Table 1-1Features of the CPU 210CPU ÁÁÁÁÁÁÁÁÁÁÁÁÁPhysical Size (length x width x depth)90 x 80 x 62 mmMemory cartridge for downloading the programYesMemoryyInputs/Outputs (I/O)Instructions (36 total)Additional FeaturesS7-200 Programmable Controller, CPU 210C79000-G7076-C235-01Program size256 wordsStorage typeEEPROMInternal memory48 bits (3 words)Local inputs4 digital inputsLocal outputs4 digital outputsExpansion I/ONoDC Input delay filter15 msAC Input delay filter55 msSink/Source Inputs (DC)YesBoolean execution speed95 µs/instructionOn-Delay Timers4Resolution100 msUp/Down Counters4Current value saved on power downYesJump / LabelYesAnalog adjustment potentiometers1Hardware Input Interrupts1Interrupt response20 s on, 40 s off1-3

Installing the S7-200 CPU 2101.2Pre-installation ConsiderationsInstallation ConfigurationAs shown in Figure 1-3, you can install a CPU 210 either on a panel or on a DIN rail. You canmount the CPU 210 either horizontally or vertically.Mounting on a PanelMounting o

STEP 7-Micro/WIN version 2.0 programming software 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: