Transcription of Simatic S7 to Logix5000 Application Conversion Guide
1 Application SolutionSimatic S7 to Logix5000 Application Conversion GuideImportant User InformationSolid state equipment has operational characteristics differing from those of electromechanical equipment. Safety Guidelines for the Appli-cation, Installation and Maintenance of Solid State Controls (publication available from your local Rockwell Automation sales office or online at ) describes some important differences between solid state equipment and hard-wired electromechanical devices. Because of this difference, and also because of the wide variety of uses for solid state equipment, all persons re-sponsible for applying this equipment must satisfy themselves that each intended Application of this equipment is no event will Rockwell Automation, Inc.
2 Be responsible or liable for indirect or consequential damages resulting from the use or Application of this examples and diagrams in this manual are included solely for illustrative purposes. Because of the many variables and requirements as-sociated with any particular installation, Rockwell Automation, Inc. cannot assume responsibility or liability for actual use based on the ex-amples and patent liability is assumed by Rockwell Automation, Inc. with respect to use of information, circuits, equipment, or software described in this of the contents of this manual, in whole or in part, without written permission of Rockwell Automation, Inc.
3 , is this manual, when necessary, we use notes to make you aware of safety , Rockwell Automation, and TechConnect are trademarks of Rockwell Automation, not belonging to Rockwell Automation are property of their respective information about practices or circumstances that can cause an explosion in a hazardous environment, which may lead to personal injury or death, property damage, or economic information that is critical for successful Application and understanding of the information about practices or circumstances that can lead to personal injury or death, property damage, or economic loss. Attentions help you identify a hazard, avoid a hazard, and recognize the consequenceLabels may be on or inside the equipment, for example, a drive or motor, to alert people that dangerous voltage may be may be on or inside the equipment, for example, a drive or motor, to alert people that surfaces may reach dangerous LOGIX-AP008B-EN-P - June 20083 Table of ContentsPrefacePurpose.
4 7 Conversion versus Translation .. 7 Terminology .. 8 Additional Resources .. 8 PLC Logic Conversion Services Provided by Rockwell Automation .. 9 Service Features .. 9 One-stop PLC Program Conversion Services .. 9 Service Benefits .. 10 Services Offered.. 10 Basic Conversion Package .. 10 Conversion Plus Initial Clean-up Package .. 10 Additional Options .. 11 Additional Program Conversions Available .. 11 Chapter 1 Hardware ConversionIntroduction .. 13S7 Controllers .. 13I/O Systems .. 14S7 Local I/O .. 14 Selection and Configuration of S7 I/O Components .. 14 Logix Local I/O.. 16 Selection and Configuration of Logix I/O Components.
5 18S7 Remote I/O .. 20 Configuration of S7 Profibus DP Remote I/O .. 21 Logix Distributed I/O .. 22 Configuration of Logix Distributed I/O .. 22 Networks .. 25 Networks in S7 .. 25 Networks in Logix .. 27 Conversion of HMI .. 31 Conversion of Systems Containing Distributed Controllers .. 32 Hardware and Software Implementation .. 32 Connecting Siemens and Rockwell Automation Devices .. 34 Controllers .. 34 Distributed Devices .. 34 Chapter 2 Logix Features that May Not be Familiar to S7 UsersIntroduction .. 35S7 Organization Blocks Compared to Logix Tasks .. 36 Organization Blocks in S7 .. 36 Tasks in Logix .. 41 Task Monitor .. 46 Tags Not Addresses.
6 47 Data Areas in S7.. 47 Data in Logix .. 50I/O and Alias Tags.. 51 Programming Languages .. 534 Publication LOGIX-AP008B-EN-P - June 2008 Table of ContentsLogix Ladder Diagram.. 54 Logix Structured Text .. 54 Logix Function Block Diagram.. 55 Logix Sequential Function Chart .. 55 Conversion of STEP 7 Code to Logix .. 55 Arrays not Pointers .. 56 Add-On Instructions .. 57 Add-On Instruction Summary .. 57 Backing Tags .. 58 The Common Industrial Protocol (CIP).. 58 Viewing the Network.. 59 Data Exchange between Controllers.. 60 Send / Receive in STEP 7 .. 60 Produced / Consumed Tags in Logix.. 60 User-Defined Data Types .. 61 Asynchronous I/O Updating.
7 62 The DINT Data Type .. 62 Phase Manager .. 63 Phase Management in STEP 7 .. 63 PhaseManager in Logix .. 63 Coordinated System Time (CST).. 65 Timestamped Inputs .. 65 Scheduled Outputs .. 65No Temporary Variables .. 66No Accumulators or Special Registers needed .. 66 Chapter 3 Conversion of System Software and Standard FunctionsIntroduction .. 67 Logix System Functions .. 68 Copy .. 68 Date and Time Setting and Reading .. 69 Read System Time .. 69 Handling of Interrupts .. 70 Errors .. 70 Status Controller .. 71 Status Module.. 71 Status for OBs and Tasks .. 72 Timers .. 72 Conversion Routines .. 73 String Handling Routines.. 73 Examples of System Function Calls.
8 74 Setting the Clock .. 74 Disabling Interrupts .. 76 Read System Time .. 78 Get Faults .. 79 Module Information .. 80 Publication LOGIX-AP008B-EN-P - June 20085 Table of ContentsGet Scan Time .. 81 Chapter 4 Conversion of Typical Program StructuresIntroduction .. 83 Conversion Code Examples .. 83 Ladder Logic Translation .. 83 Jumps and Decision Making .. 90 Arrays .. 94 User Data Types .. 99 Pointers and Arrays .. 102 State Machine .. 103 STEP 7 State Machine .. 104 Strings .. 108 STEP 7 Temporary Variables .. 110 Functions .. 110 Block Copy, COP and CPS .. 114 Mathematical Expressions .. 116 Other Topics Related to Programming.. 120 Scope of Variables.
9 120 OBs, Tasks, and Scheduling .. 120A Larger Example - Control Module .. 121 Components of the CM.. 121 User Data Type Valve .. 122 The Add-On Instruction .. 123 Add-On Instruction Local Data .. 124 Call-up .. 127 Chapter 5 Common Mistakes when Converting to LogixIntroduction .. 129 Not Selecting Appropriate Hardware .. 129 Underestimating Impact of Task Scheduling .. 130 Performing Translation Instead of Conversion .. 130 Not Using the Most Appropriate Logix Languages .. 130 Implementation of Incorrect Data Types DINT versus INT .. 131 Add DINTs .. 131 Add INTs .. 131 Timing Results .. 131 User Code Emulating Existing Instructions.
10 132 User Code.. 132 COP Instruction .. 132 Incorrect Usage of COP, MOV, and CPS .. 133 Incorrect Usage of CPT .. 133 Not Handling Strings in Optimal Way .. 133 Extensive Usage of Jumps .. 133 Not Using Aliased Tags .. 1336 Publication LOGIX-AP008B-EN-P - June 2008 Table of ContentsChapter 6S7 to Logix Glossary Introduction.. 135 Hardware Terminology .. 135 Software Terminology .. 136 Appendix AS7 300 and S7 400 Parts and RA EquivalentsIntroduction .. 139 Compact S7 300 CPUs.. 140 Standard S7 300 CPUs .. 140 Technology S7 300 CPUs .. 141 Fail-Safe S7 300 CPUs .. 142S7 300 Digital Input Modules .. 142S7 300 Digital Output Modules.. 143S7 300 Relay Output Modules.