Simatic S5 to RSLogix 5000 Application Conversion Guide Application Solution
Important User Information Solid state equipment has operational characteristics differing from those of electromechanical equipment. Safety Guidelines for the Application, Installation and Maintenance of Solid State Controls (publication SGI-1.1 available from your local Rockwell Automation sales office or online at http://www.rockwellautomation.com/literature) describes some important differences between solid state equipment and hardwired electromechanical devices.
Table of Contents Preface Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Conversion versus Translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Additional Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 PLC Logic Conversion Services Provided by Rockwell Automation . .
Table of Contents Programming Languages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 RSLogix 5000 Ladder Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 RSLogix 5000 Structured Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 RSLogix 5000 Function Block Diagram . . . . . . . . . . . . . . . . . . . . . 49 RSLogix 5000 Sequential Function Chart. . . . . . . . . . . . . . . . . . . . 49 Conversion of STEP 5 Code to RSLogix 5000 Software. . . . .
Table of Contents Drive and Loop Control Encoder/Positioning Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Logix Servo Drive Controllers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Replacing S5 Positioning Module with Logix . . . . . . . . . . . . . . . . . . . 116 Controller with Motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 S5 Analog Control Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents 6 Publication LOGIX-AP010B-EN-P - May 2010
Preface Purpose This user manual provides guidance for users and engineers who have used control systems based on one of these two platforms: • • Siemens S5 Controller Rockwell Automation Logix Programmable Automation Controller (PAC) And in addition: • • have a desire or must take advantage of the PAC features, or are in the early stages of migrating a S5 to Logix. have STEP 5 program code that they wish to convert to effective and efficient RSLogix 5000 code.
Preface Terminology STEP 5 is the programming software environment for Siemens SIMATIC S5 controllers. RSLogix 5000 software is used with Rockwell Automation Logix programmable automation controllers. We refer to Logix as a programmable automation controller because it does so much more than a traditional general-purpose PLC.
Preface PLC Logic Conversion Services Provided by Rockwell Automation Rockwell Automation provides additional services for PLC logic conversion.
Preface Service Benefits Specialists for each of the product platforms will be involved during the program conversion process. There are no hard to find anomalies in the logic caused by typing errors. In most cases, the entire data table is reproduced and no data is lost, and the original documentation is preserved with no re-typing of comments and symbols. Original Allen-Bradley brand programs can be in 6200, APS, or AI series format. New programs will be in the RSLogix format.
Preface Additional Options Additional options include the following: • • • Application-level telephone support during the start-up and debugging phase of the project. Consultation on system re-engineering, operator interface, architecture and communication strategies, to take full advantage of the new platform’s control capabilities that are not part of a code translation effort, training, and onsite startup is available as an added value from you local Global Sales and Solutions (GSS) office.
Preface Notes: 12 Publication LOGIX-AP010B-EN-P - May 2010
Chapter 1 Controllers and I/O Modules Introduction The objective of this chapter is to provide a user with information for replacing Siemens S5 PLC hardware with Rockwell Automation’s family of Logix Controllers and hardware. In 2002, Siemens announced the gradual phasing out of the S5 PLC starting on October 1, 2003.
Chapter 1 Controllers and I/O Modules S5 Controllers 14 When converting a control system from Siemens S5 to a ControlLogix system, it is essential to select a CPU that will have sufficient memory capacity to store the converted code.
Controllers and I/O Modules Chapter 1 Logix Controllers Logix Controller Memory Capacity 1756-L60M03SE 750 KB 1756-L61 2 MB 1756-L61S (Safety) 2 MB 1 MB (Safety) 1756-L62 4 MB 1756-L62S (Safety) 4 MB 1 MB (Safety) 1756-L63 8 MB 1756-L63S 8 MB 1 MB (Safety) 1756-L64 16 MB 1756-L65 32 MB 1768-L43 2 MB 1768-L45 3 MB 1769-L31 512 KB 1769-L32E 750 KB 1769-L35E 1.5 MB Care must be taken when estimating the memory requirements for a Logix project that has been converted from S5.
Chapter 1 Controllers and I/O Modules Logix Controller Memory Use The following table provides calculations for estimating the amount of memory needed to store a program in a Logix controller. Additional recommendations for selecting ControlLogix system components can be found in the ControlLogix Selection Guide, publication 1756-SG001 and Logix5000 Controllers Design Considerations, publication 1756-RM094.
Controllers and I/O Modules Chapter 1 S5 Controller Memory Use Siemens recommends estimating 2 bytes of memory per each statement of code. If it is estimated that the program in the above example requires 25 tasks containing an average of 100 lines of code each and each line of code has 10 statements, then the memory requirements would be: 25 x 100 x 10 x 2 = 50,000 = 50 KB A spare capacity requirement of 25%: 50 KB x 1.25 = 62.
Chapter 1 Controllers and I/O Modules These are the available ControlLogix Digital DC Input Modules. ControlLogix Digital DC Input Modules Cat. No.
Controllers and I/O Modules Chapter 1 Replacing 6ES5 431-4UA12 DI Modules This module requires voltages from 24…60V to register an input as ON. The actual values of input voltage presented by the input signals should be reviewed and if they are all found to be within the range of 30…60V then this module can be replaced by the 1756-IC16 module, while any 24V inputs could be connected to a 1756-IB16 module.
Chapter 1 Controllers and I/O Modules These are the available ControlLogix Digital AC Input Modules. ControlLogix Digital AC Input Modules Cat. No.
Controllers and I/O Modules Digital Output Modules Chapter 1 The following table lists the available Siemens S5 Digital DC Output Modules. Siemens S5 Digital DC Output Modules Cat. No.
Chapter 1 Controllers and I/O Modules The Siemens S5 6ES5 457-4UA12 Digital DC Output Module has an operating range of 24…60V DC. The actual values of input voltage presented by the input signals should be reviewed and if within the range 30…60V DC, then this module can be replaced by the ControlLogix 1756-OC8 module. Siemens S5 Digital AC Output Modules Cat. No.
Controllers and I/O Modules Analog Input/Output Modules Chapter 1 When converting from a Siemens S5 Controller to a Rockwell Automation Logix Controller, it is essential to choose analog input/output modules that will be compatible with existing analog input/output devices. Some of the S5-135U and S5-155U analog input modules are used in conjunction with range cards, with range cards being used depending on the type of signal being produced by the analog input device as shown in the following tables.
Chapter 1 Controllers and I/O Modules All I/O configuration is done from the project tree of the RSLogix 5000 software. When selecting an analog module, a list of available analog modules is displayed as shown in the following dialog box. The Logix 1756 Analog Input Modules are listed in the following table. Logix Analog Input Modules Cat. No.
Controllers and I/O Modules Chapter 1 These modules are supplied with standard calibration but can be recalibrated on a module or channel-by-channel basis for greater accuracy in applications. Siemens S5 Analog Output Modules Cat. No. Channels Range 470-4UA12 8 ± 10V 0…20mA 8 ± 10V 8 1…5V 4…20mA 470-4UA13 470-4UB12 470-4UB13 470-4UC12 470-4UC13 The Logix 1756 Analog Output Modules are listed in the following table. Logix Analog Output Modules Cat. No.
Chapter 1 Controllers and I/O Modules The following dialog box shows how, by accessing the properties of an analog output module, the output signal range can be modified and the high/low voltage/current limits set for each analog output channel. The Logix analog output modules also provide scaling to convert the engineering units to the required raw values and configuration of the alarm limits via the Alarm Configuration Tab.
Controllers and I/O Modules Chapter 1 The programmer can then create new tags with recognizable tag names that describe the associated process signals to alias the analog module tags. These new alias tags will contain the same data as the analog module tags they alias. The following dialog box shows eight analog input channels from an analog input module for which alias tags were created.
Chapter 1 Controllers and I/O Modules If the S5 I/O must be maintained temporarily, communication modules for the CompactLogix range can connect to all sorts of networks (such as Profibus DP). Suppliers of ControlLogix communication modules for third party networks usually provide communication modules for the CompactLogix platform, too. For more details, please examine the encompass partner websites.
Controllers and I/O Modules Chapter 1 • Remote I/O Most remote I/O racks are connected to the Profibus DP network, so no changes are needed. When the remote I/O connects to another network (for example, Legacy Siemens network), the interface module must be replaced by a Profibus DP slave module.
Chapter 1 Controllers and I/O Modules Notes: 30 Publication LOGIX-AP010B-EN-P - May 2010
Chapter 2 Software Conversions - Program Structure Introduction The Siemens S5 controller is programmed with the Step 5 software package, while Rockwell Automation’s Logix controllers are programmed with the RSLogix 5000 software package. This chapter explains the differences between the structure of a Step 5 PLC program and an RSLogix 5000 project and provides guidance in converting an S5 program to a RSLogix 5000 project.
Chapter 2 Software Conversions - Program Structure The following window shows the layout of tasks in an RSLogix 5000 project and the folder icons used to indicate task types. Continuous Task In Step 5 there is only one continuously executed Organization Block and it is always designated OB1. This Organization Block determines the sequence by which the program blocks, function blocks and data blocks of the PLC program are processed.
Software Conversions - Program Structure Chapter 2 Periodic Task Step 5 and RSLogix 5000 software allow tasks to be programmed that will execute at defined intervals. In the S5 PLC, the number of tasks and the permitted time intervals is dependent on the model of controller used. For example, in the S5-135U PLC Series, there are up to nine periodic tasks that can be executed.
Chapter 2 Software Conversions - Program Structure Event Task Step 5 and RSLogix 5000 software allow tasks to be programmed that interrupt the normal cyclic sequence and process the logic contained in designated event task on detection of predefined event.
Software Conversions - Program Structure Chapter 2 Task Properties The following property settings can be configured for all tasks: • Watchdog - timer that specifies how long a task can run before triggering a fault. • Disable Automatic Output Processing To Reduce Task Overhead – this is an option that allows output processing to be turned off, reducing the elapsed time for that task.
Chapter 2 Software Conversions - Program Structure The nature of the application will determine how the tasks are divided into programs. On smaller applications it may be suitable to include all the user code in one program. The following example shows how the continuous task is divided into the following three programs with each one containing its own routines.
Software Conversions - Program Structure Chapter 2 In Step 5, OB1 is the first code executed. In RSLogix 5000 software, the first routine executed can be selected by the programmer. It is indicated in the project tree by the icon beside the Main Routine. When converting a PLC application from Step 5 to RSLogix 5000 software, function calls originally in S5 OB1, are commonly placed in the designated RSLogix 5000 Main Routine.
Chapter 2 Software Conversions - Program Structure More details on programming in RSLogix 5000 software can be found in the ControlLogix User Manual, publication 1756-UM001. Function Blocks/Add-On Instructions RSLogix 5000 software allows programming of Add-On Instructions that can replace and enhance the functionality of Step 5 Function Blocks.
Software Conversions - Program Structure Chapter 2 With the Add-On Instruction a pre-scan routine can be configured to run when the controller goes from Program mode to Run mode, or powers up in Run mode. Under these conditions, the pre-scan routine will run once, and can typically be used to initialize data. This is not available with Step 5 Function Blocks.
Chapter 2 Software Conversions - Program Structure In the ladder code these symbols can be displayed instead of the assigned addresses as shown below. A limitation of Step 5 is that the length of a symbol name is by default restricted to 8 characters, extendable to maximum 20 characters. The comment is limited to 20 characters and is extendable to 48 characters.
Software Conversions - Program Structure Logix Aliasing Chapter 2 The difference between Step 5 and RSLogix 5000 software is the RSLogix 5000 software uses a feature called aliasing to assign more intuitive names to I/O, which makes for more user-friendly programming. An alias can be created for each I/O point and this alias will contain the same value as the associated I/O point. When writing code, the programmer can use the alias name instead of the address location.
Chapter 2 Software Conversions - Program Structure When the alias tag is created, it will appear in the tag list as follows. When the code references the feedback from the pump it can use the address Pump1_Running rather than Local:1:I.Data.0 as shown below. It is possible also to display the aliased input reference as shown below.
Software Conversions - Program Structure Internal Memory Addressing Chapter 2 Internal controller memory locations are available as flag words/bits or DataBlock (DB) words/bits. Flag Words/Bits Step 5 internal controller flag address locations have these formats: • • • • • F3.5 for a bit FB7 for a byte FW10 for a word FD for a double word S for an extended memory location These addresses can then be assigned symbolic names via the symbols table.
Chapter 2 Software Conversions - Program Structure There is no address field in RSLogix 5000 software so the internal registers can be given any name as defined by the user. An example is shown below. This can be used in the controller logic to perform a comparison as shown below. Data Blocks In S5, controller data blocks are often used to store the various data elements relating to a device type such as a pump, motor or valve.
Software Conversions - Program Structure Chapter 2 Example Data Block DB1 could be assigned to store data relating to valves. The data block would store information such as the open/closed feedback status of the valves, the error status of the valves, or the auto/manual status of the valve. RSLogix 5000 software allows the creation of User Defined Data Types that will often be useful in replacing Step 5 data blocks.
Chapter 2 Software Conversions - Program Structure From the tag database, a tag with this User Data Type can then be created. Multiple instances are automatically generated by selecting the dimension of the array as shown below.
Software Conversions - Program Structure Chapter 2 The tag database will automatically create the required addresses for the number of valves specified in the dimensions of the array as shown below.
Chapter 2 Software Conversions - Program Structure Programming Languages This section describes the programming languages that are available with Step 5 and RSLogix 5000 software. All languages are not standard and depends on the version of the software purchased. Selection of the RSLogix 5000 language most suitable to the task will result in easier program design, more rapid coding, and a program that is easier to understand.
Software Conversions - Program Structure Chapter 2 RSLogix 5000 Ladder Diagram Traditionally, Ladder Diagram is used for implementing Boolean combinational logic. In RSLogix 5000 software, it can also be used for sequential logic, motion, data manipulation, and mathematical calculations, although other languages may be more convenient for these tasks. RSLogix 5000 Structured Text Structured Text is a high level procedural language that is similar in structure to Visual Basic, Pascal and C.
Chapter 2 Software Conversions - Program Structure Conversion of STEP 5 Code to RSLogix 5000 Software For most applications the easiest conversion is to convert the Step 5 program to RSLogix 5000 software with the same programming language. So a Step 5 program written in ladder logic should be converted to an RSLogix 5000 ladder program.
Software Conversions - Program Structure Chapter 2 One of the first decisions in developing a Logix 5000 project is to define the functions or operations of your machine or process. 1. Identify the major functions/operations of your machine or process. 2. For each function, choose the programming language that best fits the function. • This may require revising the functions list to take advantage of other languages. • Use any combination of the languages in the same project.
Chapter 2 Software Conversions - Program Structure Notes: 52 Publication LOGIX-AP010B-EN-P - May 2010
Chapter 3 Software Conversions Instructions Introduction The object of this chapter is to demonstrate how typical programming instruction in S5 can be performed in RSLogix 5000 software. It examines examples of S5 instructions in other programming languages and seeks to find the best RSLogix equivalent in each case. It is not advised to translate the code one on one to RSLogix 5000 software.
Chapter 3 Software Conversions Instructions Binary Instruction: AND SIMATIC S5 RSLogix 5000 S5 Control System Flowchart RSLogix Function Block Diagram S5 Statement List RSLogix 5000 Structured Text A I1.0 A I1.2 A I1.3 =Q3.
Software Conversions Instructions Chapter 3 Binary Instruction: OR SIMATIC S5 RSLogix 5000 S5 Control System Flowchart RSLogix Function Block Diagram S5 Statement List RSLogix 5000 Structured Text O I1.0 O I1.2 O I1.3 =Q3.
Chapter 3 Software Conversions Instructions Binary Instruction: SET/RESET SIMATIC S5 RSLogix 5000 S5 Control System Flowchart RSLogix Function Block Diagram S5 Statement List RSLogix 5000 Structured Text A I1.0 S Q3.0 A I1.1 R Q3.
Software Conversions Instructions Chapter 3 Binary Instruction: PULSE SIMATIC S5 RSLogix 5000 The pulse instruction is used to detect a change of state of a digital flag and it generates a pulse that is ON for once scan cycle when this change of state occurs. RSLogix 5000 software has a dedicated pulse function while in S5 the function can be constructed as shown below. This is a good example of where it may be an option to use another language in RSLogix 5000 software than in the original S5 project.
Chapter 3 Software Conversions Instructions Binary Instruction: Transfer/Move SIMATIC S5 RSLogix 5000 S5 Statement List RSLogix 5000 Structured Text L FW10 T FW12 data_word2 := data_word1; SIMATIC S5 - Ladder RSLogix 5000 - Ladder 58 Publication LOGIX-AP010B-EN-P - May 2010
Software Conversions Instructions Chapter 3 On Delay Timer The following example shows how a ON DELAY function in SIMATIC S5 can be converted into a similar function in RSLogix 5000 software for Statement List and Ladder formats. In S5 the time base is determined by the digit after the decimal point in the statement L KT xxx.y, where xxx denotes the preset of the timer and y denotes the time base as one of the following: .0 => 0.01sec .1 => 0.1sec .2 => 1sec .
Chapter 3 Software Conversions Instructions SIMATIC S5 - Ladder RSLogix 5000 - Ladder where timer T1 is defined as data type TIMER in the program tags as follows.
Software Conversions Instructions Chapter 3 Off Delay Timer The following example shows how an OFF DELAY function in SIMATIC S5 can be converted into a similar function in RSLogix 5000 for Statement List and Ladder formats. The RSLogix 5000-equivalent bit/word for each bit/word used in the S5 in the following example is shown below. Usage of the RES instruction is optional. Function Timer Enable Reset Output S5 Statement List AN L SF A R A = I1.0 KT9.2 T3 I1.1 T3 T3 Q4.
Chapter 3 Software Conversions Instructions SIMATIC S5 - Ladder RSLogix 5000 - Ladder where timer T5 is defined as data type TIMER in the program tags as follows.
Software Conversions Instructions Chapter 3 Counter - UP The following example shows how a COUNTUP function in SIMATIC S5 can be converted into a similar function in RSLogix 5000 for Statement List and Ladder formats. The RSLogix 5000-equivalent bit/word for each bit/word used in the S5 in the following example is shown below. Function Counter Preset Counter Reset Count Up Output S5 Statement List A L S A R A CU A = I4.0 DW20 C1 I4.1 C1 I4.2 C1 C1 Q4.
Chapter 3 Software Conversions Instructions SIMATIC S5 - Ladder RSLogix 5000 - Ladder where timer COUNTER is defined as data type COUNTER in the program tags as follows.
Software Conversions Instructions Chapter 3 Counter - DOWN The following example shows how a COUNTDOWN function in SIMATIC S5 can be converted into a similar function in RSLogix 5000 for Statement List and Ladder formats. The RSLogix 5000-equivalent bit/word for each bit/word used in the S5 in the following example is shown below. Function Counter Preset Counter Reset Count Down Output S5 Statement List A L S A R A CD A = I4.0 DW20 C1 I4.1 C1 I4.2 C1 C1 Q2.
Chapter 3 Software Conversions Instructions SIMATIC S5 - Ladder RSLogix 5000 - Ladder where counter COUNTDOWN is defined as data type COUNTER is the program tags as follows.
Software Conversions Instructions Chapter 3 Comparison - Equal In the following comparison function the two operands are compared and if found to be equal then the output is set to 1. The RSLogix 5000-equivalent bit/word for each bit/word used in the S5 in the following example is shown below: Function Operand1 Operand2 Output S5 Statement List L IB19 L IB20 !=F = Q3.0 S5 IB19 IB20 Q3.
Chapter 3 Software Conversions Instructions Comparison - Greater Than In the following comparison function the Operand 1 is compared to Operand 2 and if Operand 1 > Operand 2 then the output is set to 1. The RSLogix 5000 equivalent bit/word for each bit/word used in the S5 in the following example is shown below: Function Operand 1 Operand 2 Output S5 Statement List L IB19 L IB20 >F = Q3.0 S5 IB19 IB20 Q3.
Software Conversions Instructions Chapter 3 Comparison - Less Than In the following comparison function the Operand 1 is compared to Operand 2 and if Operand 1 < Operand 2 then the output is set to 1. The RSLogix 5000 equivalent bit/word for each bit/word used in the S5 in the following example is shown below: Function Operand 1 Operand 2 Output S5 Statement List L IB19 L IB20
Chapter 3 Software Conversions Instructions Comparison - Not Equal In the following comparison function the two operands are compared and if found to be NOT equal then the output is set to 1. The RSLogix 5000 equivalent bit/word for each bit/word used in the S5 in the following example is shown below: Function Operand1 Operand2 Output S5 Statement List L IB19 L IB20 >< F = Q3.0 S5 IB19 IB20 Q3.
Software Conversions Instructions Chapter 3 Comparison - Greater Than or Equal To In the following comparison function the Operand 1 is compared to Operand 2 and if Operand 1 >= Operand 2 then the output is set to 1. The RSLogix 5000 equivalent bit/word for each bit/word used in the S5 in the following example is shown below: Function Operand1 Operand2 Output S5 Statement List L IB19 L IB20 >= F = Q3.0 S5 IB20 Q3.
Chapter 3 Software Conversions Instructions Comparison - Less Than or Equal To In the following comparison function the Operand 1 is compared to Operand 2 and if Operand 1 <= Operand 2 then the output is set to 1. The RSLogix 5000 equivalent bit/word for each bit/word used in the S5 in the following example is shown below: Function Operand1 Operand2 Output S5 Statement List L IB19 L IB20 <= F = Q3.0 S5 IB19 IB20 Q3.
Software Conversions Instructions Jump Operations Chapter 3 Jump operations programmable in S5 can easily be converted to RSLogix 5000 software. The function of these jump instructions is to select to include/exclude the execution of code sections based on the TRUE/FALSE result of other instructions (for example, COMPARE or AND).
Chapter 3 Software Conversions Instructions Conditional Jump In the following example of the Conditional Jump function, the instruction that turns on the output if the input is on is executed only if the two data words are NOT equal. Function Operand 1 Operand 2 Input Output S5 Statement List L IB19 L IB20 >< F JC =DESA A I1.0 = Q4.0 DESA: NOP 0 S5 IB19 IB20 I1.0 Q4.
Software Conversions Instructions Chapter 3 Unconditional Jump In the following example of the Unconditional Jump function, the instruction that activates the output (if the input is on) is never executed regardless of whether the two data words are equal. Function Operand 1 Operand 2 Input Output S5 IB19 IB20 I1.0 Q4.
Chapter 3 Software Conversions Instructions Overflow Jump Function JO With S5 you can work with decimal number in the range -32768 to +32768. If the result of the arithmetic operation is outside this range then S5 sets the overflow bit, OV. The instructions JO can be used to program a jump if this bit is set. This is often used in programs to run error handling code when values exceed their expected range.
Software Conversions Instructions Arithmetic Operations Chapter 3 Arithmetic operations programmable in S5 can easily be converted to RSLogix 5000 software. The main difference between the two systems is that in S5 Statement List each operand is loaded into an accumulator before the operation is performed and then the result can be transferred to the required destination. The corresponding RSLogix 5000 Structured Text code is simpler as it executes the operation on the operands directly.
Chapter 3 Software Conversions Instructions Addition S5 uses three addition instructions depending on whether the operands are 16 bit integers, 32 bit integers or floating point numbers. RSLogix 5000 software has one addition instruction that can be used regardless of the format of the operands. Note that you can mix data types, but loss of accuracy and rounding error might occur and the instruction takes more time to execute. You can check the S:V bit to see whether the rest was truncated.
Software Conversions Instructions Chapter 3 SIMATIC S5 - Ladder 16 bit fixed point numbers RSLogix 5000 - Ladder Publication LOGIX-AP010B-EN-P - May 2010 79
Chapter 3 Software Conversions Instructions Subtraction S5 uses three subtraction instructions depending on whether the operands are 16 bit integers, 32 bit integers or floating point numbers. RSLogix 5000 software has one subtraction instruction that can be used regardless of the format of the operands. Note that you can mix data types, but loss of accuracy and rounding error might occur and the instruction takes more time to execute. You can check the S:V bit to see whether the rest was truncated.
Software Conversions Instructions Chapter 3 SIMATIC S5 - Ladder 16 bit fixed point numbers RSLogix 5000 - Ladder Publication LOGIX-AP010B-EN-P - May 2010 81
Chapter 3 Software Conversions Instructions Multiplication S5 uses two multiplication instructions depending on whether the operands are 16 bit integers or floating point numbers. RSLogix 5000 software has one multiplication instruction that can be used regardless of the format of the operands. Note that you can mix data types, but loss of accuracy and rounding error might occur and the instruction takes more time to execute. You can check the S:V bit to see whether the rest was truncated.
Software Conversions Instructions Chapter 3 SIMATIC S5 - Ladder 16 bit fixed point numbers RSLogix 5000 - Ladder Publication LOGIX-AP010B-EN-P - May 2010 83
Chapter 3 Software Conversions Instructions Division S5 uses two division instructions depending on whether the operands are 16 bit integers or floating point numbers. RSLogix 5000 software has one division instruction that can be used regardless of the format of the operands. Note that you can mix data types, but loss of accuracy and rounding error might occur and the instruction takes more time to execute. You can check the S:V bit to see whether the rest was truncated.
Software Conversions Instructions Chapter 3 SIMATIC S5 - Ladder 16 bit fixed point numbers RSLogix 5000 - Ladder Publication LOGIX-AP010B-EN-P - May 2010 85
Chapter 3 Software Conversions Instructions Block Call Operations S5 refers to independent portions of code as blocks while RSLogix 5000 software refers to these as subroutines. S5 uses two block call instructions, Jump Conditional (JC) and Jump Unconditional (JU), to call other program blocks. RSLogix 5000 software has a similar JumpToSubroutine (JSR) instruction to implement this operation.
Software Conversions Instructions Chapter 3 Block Calls Function S5 Operand 1 F10.3 data_bit1 Operand 2 PB10 Alarms S5 Statement List 16 bit fixed point numbers In the following example the code will jump to PB 10 if F10.3 =1. A F10.3 JC PB10 RSLogix RSLogix 5000 Structured Text In the following example the code will jump to the Alarms routine if data_bit1 =1. if data_bit1 then JSR (Alarms); end_if; In the following example the code will jump to PB 10 regardless of the state of F10.3 A F10.
Chapter 3 Software Conversions Instructions RSLogix 5000 software allows for the option of parameters to be passed to subroutines and also allows for the subroutine to return a result to the calling routine by using the RET function. The following RSLogix 5000 example illustrates how the JSR/SBR instructions can be used to pass parameters to the called subroutine and return a parameter from the subroutine to the main routine.
Software Conversions Instructions Shift Operations Chapter 3 S5 has the following instructions that will shift the contents of the accumulator to the left/right by the number of bits specified by the parameter. Instruction Description SLW Shifts the contents of the accumulator ACCU1-L (word) to the left by the number of bits specified in the parameter. SLD Shifts the contents of the accumulator ACCU1 (double word) to the left by the number of bits specified in the parameter.
Chapter 3 Software Conversions Instructions This BFD function is not available in RSLogix 5000 Structured Text but a similar function called Bit Field Distribute with Target (BFDT) can produce the same results. Shift Left The following example shows how S5 shifts the bits in FW18 by 4 places to the left and how the equivalent functionality is achieved by using RSLogix software.
Software Conversions Instructions Conversion Operations Chapter 3 Siemens S5 uses the two’s complement system in which negative numbers are represented by the two’s complement of the absolute value. The following instructions change the sign of a 16 bit word and a 32 bit double word integer. S5 Instruction Description CSW Form two’s complement of ACCU 1-L (bits 0 to 15) CSD Form two’s complement of ACCU1 (bits 0 to 31) The RSLogix 5000 Negate (Neg) instruction performs the same function.
Chapter 3 Software Conversions Instructions S5 Instruction Description DEF Convert a 16 bit fixed point from BCD into binary DED Convert a 16 bit fixed point from BCD into binary The RSLogix 5000 Convert to Integer (FRD) instruction performs the same function. BCD to Integer S5 DW64 DW78 RSLogix 5000 data_word1 data_word2 S5 Statement List 16 bit fixed point numbers L DW64 DEF T DW78 RSLogix 5000 Structured Text This instruction is not available in structured text format.
Software Conversions Instructions S5 Instruction Chapter 3 Description DUF Convert a 16 bit fixed point from binary to BCD DUD Convert a 32 bit fixed point from binary to BCD The RSLogix 5000 Convert to BCD (TOD) instruction performs the same function. BCD to Integer S5 DW64 DW78 RSLogix 5000 data_word1 data_word2 S5 Statement List 16 bit fixed point numbers L DW64 DUF T DW78 RSLogix 5000 Structured Text This instruction is not available in structured text format.
Chapter 3 Software Conversions Instructions FDG- Convert a 16 bit fixed point from binary to BCD In RSLogix 5000 software, this functionality is achieved by defining a register as having floating point format and moving an integer into it by using the MOVE (MOV) instruction in Ladder or the := instruction in Structured Text.
Software Conversions Instructions Chapter 3 DUD - Convert a floating point number to a 32 bit fixed point format. In RSLogix 5000 software, this functionality is achieved by defining a tag with Data Type = REAL (as shown below) and transferring it to a tag with Data Type = DINT by using the MOVE (MOV) instruction in ladder or the := instruction in Structured Text.
Chapter 3 Software Conversions Instructions Notes: 96 Publication LOGIX-AP010B-EN-P - May 2010
Chapter 4 Additional RSLogix 5000 Features Introduction The objective of this chapter is to describe RSLogix 5000 features unavailable in S5. Using these features can result in a more unified RSLogix 5000 application structure than one created by directly converting S5 program components. There are programming and structure elements in RSLogix 5000 software that differ from S5.
Chapter 4 Additional RSLogix 5000 Features Asynchronous I/O Updating In Logix systems, I/O is updated asynchronously with respect to program execution periods. In contrast, S5 uses the traditional PLC approach where an I/O image table is updated at the start of the cycle and input values do not change during an execution of the program. When converting from S5 to Logix, consider if you must buffer input data so its value remains constant during a program-scan cycle.
Additional RSLogix 5000 Features Chapter 4 RSLogix 5000 software also allows the programmer to perform the following conversions on string type variables. • • • • • • DINT to String (DTOS) – converts a numeric value to its ASCII equivalent. String to Dint (STOD) – converts an ASCII representation to its equivalent integer value. Real to String (RTOS) – converts a real value to its ASCII equivalent. String to Real (STOR) – converts an ASCII representation to its equivalent real value.
Chapter 4 Additional RSLogix 5000 Features The RSLogix 5000 time-based objects provide the foundation for clock synchronization for multi-CPU systems, accurate motion control functionality, scheduled output switching to 100 µs accurate, input-event timestamping, scheduled analog sampling, safety I/O monitoring and communication, motion cam position calculations, and Wall Clock Time.
Chapter 5 Conversion of System Functions Introduction The purpose of this chapter is to examine the most commonly used S5 System Functions and their RSLogix 5000 equivalents, and to show the range of system functions available in RSLogix 5000 software. Logix System Values In RSLogix 5000 software, the equivalent of most S5 System Functions will be the GSV (Get System Value) and the SSV (Set System Value) instructions.
Chapter 5 Conversion of System Functions The following objects can be accessed by the GSV/SSV instruction. Read/Write System Time Objects Description Axis Provides status information about a servo module axis. Controller Provides status information about a controller’s execution. Controller Device Identifies the physical hardware of the controller.
Conversion of System Functions Chapter 5 Example: Reading the Time The following ladder diagram shows how the GSV function is used to set the system clock. The following window shows the result of the above GSV instruction with the date and time stored in the elements of the array GetDateTime[7].
Chapter 5 Conversion of System Functions Example: Setting the Time The following ladder diagram shows a SSV instruction on the WallClock object being used to set the date and time with the values stored in the elements of the array SetDateTime[7].
Chapter 6 Communication and Networking S5 Serial Communication See these sections for information on communication and networks. S5 Serial Communication Processors (CP 521, CP 523, CP 524, and CP 525) These S5 communication modules can be used for point-to-point serial data communication with a peripheral device by using a current loop or RS-232 interface. They are often used to send messages to a serial printer.
Chapter 6 Communication and Networking Logix Serial Communication The S5 serial communication modules were designed to communicate with peripheral devices mainly by using RS-232 or the current-based TTY protocols. Advances in communication technology and protocols has made communication from a PLC to a peripheral device with RS-232 uncommon, and TTY nearly obsolete.
Communication and Networking Chapter 6 An example of a possible converter device is the following supplied by ELV: • • S5 Distributed Control Systems ELV V24-20mA interface converter (Order No. 68-176-10) ELV AT adapter cable Sub-B 9-pin female to Sub-D 25-pin male (Order No. 68-078-86) The Siemens S5 allows for remote I/O to be connected to a centralized CPU with interface modules installed in the centralized rack and expansion racks.
Chapter 6 Communication and Networking S5 has limited capacity for connecting large amounts of I/O to controllers as shown in the following table. S5 Network Communication S5 Controllers 922/928/948 I/O Capacity DI with process image 1024 DI without process image 7168 AI 448 DO with process image 1024 DO without process image 7168 AO 448 S5 has a low-performance Local Area Network (LAN) called SINEC L1 that operates at 9600 bps and uses the CP 530 communication module.
Communication and Networking Chapter 6 The SIMATIC S5 connects to the LAN bus as follows: • • • • • Master Controller (S5-115U, S5-135U, S5-150U) via the CP 530 module S5-115U as slave via the programmer port of the controller or via the CP 530 module S5-135U and S5-150U as slave via the CP 530 module S5-101U as slave via the programmer port of the computer S5-100U (from 102 CPU onwards) as slave via the computer programmer port Data is transferred between controllers by using SEND/RECEIVE functions.
Chapter 6 Communication and Networking Choosing a ControlNet Network or EtherNet/IP Network for communication between controllers will depend on the requirements of each particular application. Use the NetLinx Selection Guide, publication NETS-SG001 to determine which network is the best fit for your application.
Communication and Networking Chapter 6 Remote connections depend on the communication module. The number of connections supported by the module will determine how many connections the controller can access through that module. See the EtherNet/IP Performance User Manual, publication ENET-AP001, for detailed guidance on connections used by network components.
Chapter 6 Communication and Networking The dialog box below provides an overview for configuring a consumed tag. First, create a tag type of Consumed from the drop-down menu. Select the Connection button to prompt the Consumed Tag Connection dialog box. On the Connection tab, select the producer controller, provide the produced tag name, and set the requested packet interval (RPI). The configuration for a produced tag is similar, but no connection needs to be specified.
Communication and Networking Chapter 6 The Logix 1756-SYNCH module uses fiber optic links to transfer data at high speed from one controller chassis to multiple chassis. The high speed data transfer makes it particularly suitable for applications that require data to be transferred at a high speed and in a synchronized manner. Such applications may include distributed motion control and coordinated drive control applications where the rate of data transfer between networked nodes is critical.
Chapter 6 Communication and Networking IP 265 High Speed Sub Control This is essentially a high-speed programmable I/O module that was used in S5 to execute small segments of code requiring a rapid execution time. In a program conversion from S5 to RSLogix 5000 software, functions of this special module can be transferred to and executed by the Logix controller. With its quicker execution times, the Logix controller eliminates the need for a specialized module.
Chapter 7 Drive and Loop Control Encoder/Positioning Modules These are intelligent I/O modules that can calculate the position of a rotary or linear axis based on electronic encoder input signals. The module then processes this information to calculate and produce the required output for the positional control of speed drives. The modules determine the position of a rotary cam by counting and processing the high speed pulses generated by an encoder.
Chapter 7 Drive and Loop Control The RSLogix 5000 motion instruction set provides commands for a variety of operations to control servo drives including the following: • • • • • Replacing S5 Positioning Module with Logix Change the state of an axis – enabling/disabling an axis or setting the output voltage to an axis. Control the axis position – stopping/jogging an axis or sending an axis to a home position. Changing the speed, acceleration or deceleration of an axis.
Drive and Loop Control S5 Analog Control Modules Chapter 7 S5 has a number of intelligent I/O modules dedicated to the control of analog signals. IP 243 Analog Module This module is used for the quick processing of analog input signals. It has eight high-speed analog input channels with a maximum conversion time of 35 µs. It includes two comparators that allow the comparison of analog values with each other.
Chapter 7 Drive and Loop Control Logix Analog Control The RSLogix 5000 instruction set includes a PID block that executes control over a process variable. The PID calculations are performed on an analog signal coming from a standard analog input module. The PID output is transferred to the corresponding control variable via a standard analog output module. The PID calculations are performed by the controller so no dedicated hardware module is required.
Chapter 8 Logix Replacements for S5 Components Introduction This chapter lists S5 components and provides information for selecting suitable Logix replacements. It is not possible to give a definitive table specifying which Logix controller should replace each S5 controller. The best replacement will be determined only after analyzing the requirements of each particular application. For example, a stand-alone CPU 943 controller may be replaced by a Logix 1756-L62 controller.
Chapter 8 Logix Replacements for S5 Components There are also two controllers in the 1768 CompactLogix family. • • 1768-L43 – 2 MB Memory and maximum 16 tasks 1768-L45 – 3 MB Memory and maximum 16 tasks S5-90U/95U/100U CPU Logix CPU Cat. No. Memory Cat. No. Memory CPU 90 4 KB 1769-L3x 2 MB CPU 95 16 KB 1769-L3x 2 MB CPU 100 2 KB 1756-L61 2 MB CPU 102 4 KB 1756-L61 2 MB CPU 103 20 KB 1756-L61 2 MB S5-110S CPU Logix CPU Cat. No. Memory Cat. No.
Logix Replacements for S5 Components Chapter 8 Digital Input Modules The following table suggests Logix replacements for S5 digital DC input modules based on number of channels and input voltages. Siemens S5 Digital Input Modules Logix Digital Input Modules Cat. No. Inputs V DC Cat. No.
Chapter 8 Logix Replacements for S5 Components Digital Output Modules The following table suggests Logix replacements for S5 digital DC output modules based on numbers of channels and output voltages. Siemens S5 Digital Outputs Modules (DC) Logix Digital Outputs Modules (DC) Cat. No. Outputs V DC Cat. No.
Logix Replacements for S5 Components Chapter 8 Digital Relay Output Modules The following table lists the Logix replacements for S5 digital relay output modules based on number of channels and output voltages. Siemens S5 Digital Relay Output Modules (DC/AC) Logix Digital Relay Output Modules (DC/AC) Cat. No. Outputs V DC Cat. No.
Chapter 8 Logix Replacements for S5 Components Analog Input Modules The following table suggests Logix replacements for S5 analog input modules based on number of channels and input ranges. Siemens S5 Analog Input Modules Cat. No. Channels Range Cat. No. Channels Range 460-4UA13 8 – single See range cards 1756-IF8 8 ± 10.25V 0…10.25V 0…5.125V 0…20.5 mA 465-4UA12 16 – voltage/current See range cards 1756-IF16 16 ±± 10.25V 0…10.25V 0…5.125V 0…20.
Logix Replacements for S5 Components Siemens S5 Analog Input Modules Chapter 8 Logix Analog Input Modules Cat. No. Channels Range Cat. No. Channels Range 466-3LA11 16 – voltage/current 0…1.25V, 2.5V, 5V, 10V 1756-IF16 16 ± 10.25V 0…10.25V 0…5.125V 0…20.5 mA 8 – Pt100 resistance See range cards 1756-IR6I 6 1…487 Ω 2…1000 Ω 4…2000 Ω 8…4080 Ω 16 – voltage/current 0…20mA 4…20mA 1756-IF16 16 ± 10.25V 0…10.25V 0…5.125V 0…20.
Chapter 8 Logix Replacements for S5 Components Analog Output Modules The following table suggests Logix replacements for S5 Analog Output Modules based on numbers of channels and output ranges. Siemens S5 Analog Output Modules 126 Logix Analog Output Modules Cat. No. Channels Range Cat. No. Outputs Range 470-4UA12 8 ± 10V 0…20 mA 1756-OF8 8 ± 10.4V 0…21 mA 470-4UA13 8 ± 10V 0…20 mA 1756-OF8 8 ± 10.4V 0…21 mA 470-4UB12 8 ± 10V 1756-OF8 8 ± 10.
Appendix A Other Communication Modules Introduction This section contains an overview of the available modules that provide communication to S5 I/O and peer-to-peer communication. If you are using a protocol to which you want to connect but is not described in this manual, please check the websites of our encompass partners (such as Woodhead/Molex, ProSoft, or HMS).
Appendix A Other Communication Modules The Profibus DP/PA Network can be configured by the free SST Configuration Tool. The firmware is field-upgradeable with the HyperTerminal. More information on this module can be found at the website http://www.woodhead.com. For software/firmware/manual downloads, go to http: www.mysst.com/download. ProSoft MVI56-PDPMV1 The MVI56 Profibus DPV1 Master Communication Module is a powerful communication interface for ControlLogix platform processors.
Other Communication Modules Appendix A the I/O data transfer on the Profibus network. It supports all standardized baud rates, up to 12 Mbps. MVI56-PDPMV1 Specifications Specification Type Description Single Slot-1756 backplane compatible. The module is recognized as an Input/Output module and has access to processor memory for data transfer between processor and module. General Ladder Logic is used for data transfer between module and processor. Sample ladder file (add-on instruction) included.
Appendix A Other Communication Modules The ILX56-MM makes it easy for system integrators and end users to reduce the engineering effort required to coordinate data transfers between multiple control systems in Factory and Plant Automation applications. The Message Manager simplifies and streamlines data connection and transfer operations by enabling PLC/PAC data exchanges without the need for additional messagespecific PLC programming.
Other Communication Modules Appendix A Protocols Supported Modbus TCP/IP and Siemens Industrial Ethernet supported via the built-in Ethernet ports. EtherNet/IP, ControlNet, Data Highway+ (DH+) and Data Highway 485 (DH485) are supported through Rockwell Automation (RA) 1756 communication bridge modules. Data can be transferred between up to 16 individually-configurable communication-interface connections. A transfer list for data exchange can be created using source and destination tags.
Appendix A Other Communication Modules Ladder logic programming in the ControlLogix processor is required to enable and support the Siemens 3964R protocol functionality. The ladder program handles data encoding/decoding transferred from the module and the initiation of protocol-specific functionality in the module. Example ladder programs are provided with the module to ease the implementation of the module in the user application.
Other Communication Modules Standalone Modules Appendix A This section contains an overview of the available standalone modules that provide communication to S5 network. HMS HMS provides several linking devices to exchange data from one network to another. The device below can be used to pass data between the Ethernet/IP and Profibus DP network. Anybus X-Gateway The X-gateways are compact devices for standard DIN rail mounting and 24 Volt industrial-power supply.
Appendix A Other Communication Modules ProSoft ProSoft provides several linking devices to exchange data from one network to another. The device below can be used to pass data between the Ethernet/ IP and profibus DP network. EtherNet/IP to Profibus DP Master 5204-DFNT-PDPM The DFNT-PDPM modules are ideal for applications where EtherNet/IP connectivity can be used to integrate a Profibus DP slave device into a system.
Other Communication Modules Appendix A The unit is also used for configuration of the nodes on the PROFIBUS network. It provides access to standard and extended diagnostic information. The PROFIBUS master port can be used to continuously interface with PROFIBUS slave devices over a serial communication interface (RS-485). 5204-DFNT-PDPM Specifications Specification Type Description Multi-drop on a Profibus DP link with other DP compatible devices Software configurable parameters: • Baud rate: 9.
Appendix A Other Communication Modules In-rack Interface Cards for S5 rack To put the remote S5 I/O on the Profibus DP network, a Profibus DP slave card has to be installed in the remote S5 rack. If a S5 IM-308-C module is installed, the addressing needs to be configured with the Com Profibus software package. Because these cards are obsolete, third-party modules can also be used to put the S5 I/O on the Profibus DP network.
Other Communication Modules Appendix A One OPEN5 card is needed per 135U rack (main and extension rack). Insert the OPEN5 Board into the extension slot (extreme right-hand side-Slot 163). Profibus Limitations The Profibus exchange table limits a maximum of five boards of 16 analog I/O on the analog Inputs-Outputs. An interface card for the S5 115U processor is also available.
Appendix A Other Communication Modules Notes: 138 Publication LOGIX-AP010B-EN-P - May 2010
Rockwell Automation Support Rockwell Automation provides technical information on the web to assist you in using its products. At http://www.rockwellautomation.com/literature, you can find technical manuals, a knowledge base of FAQs, technical and application notes, sample code and links to software service packs, and a MySupport feature that you can customize to make the best use of these tools.