You are on page 1of 82

Application for Communication

Communication with Allen-Bradley ControlLogix Controllers via PROFIBUS Scanner


Application with Sample Code

Warranty, liability and support

Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Note

The Application Examples are not binding and do not claim to be complete regarding the circuits shown, equipping and any eventuality. The Application Examples do not represent customer-specific solutions. They are only intended to provide support for typical applications. You are responsible for ensuring that the described products are correctly used. These Application Examples do not relieve you of the responsibility of safely and professionally using, installing, operating and servicing equipment. When using these Application Examples, you recognize that Siemens cannot be made liable for any damage/claims beyond the liability clause described. We reserve the right to make changes to these Application Examples at any time without prior notice. If there are any deviations between the recommendations provided in these Application Examples and other Siemens publications e.g. Catalogs then the contents of the other documents have priority.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Warranty, liability and support


We do not accept any liability for the information contained in this document. Any claims against us based on whatever legal reason resulting from the use of the examples, information, programs, engineering and performance data etc., described in this Application Example shall be excluded. Such an exclusion shall not apply in the case of mandatory liability, e.g. under the German Product Liability Act (Produkthaftungsgesetz), in case of intent, gross negligence, or injury of life, body or health, guarantee for the quality of a product, fraudulent concealment of a deficiency or breach of a condition which goes to the root of the contract (wesentliche Vertragspflichten). However, claims arising from a breach of a condition which goes to the root of the contract shall be limited to the foreseeable damage which is intrinsic to the contract, unless caused by intent or gross negligence or based on mandatory liability for injury of life, body or health. The above provisions do not imply a change in the burden of proof to your detriment. Copyright 2006 Siemens A&D. It is not permissible to transfer or copy these Application Examples or excerpts of them without first having prior authorization from Siemens A&D in writing. For questions about this document please use the following e-mail address: mailto:csweb@ad.siemens.de

V 1.0

Issue 10/01/06

2/82

Foreword

Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Foreword
Objective of the application The demand for the connection of networks of different manufacturers increases worldwide. For economic and technological reasons, interoperability is of greatest importance. In this context, the products manufactured by Allen-Bradley/Rockwell are of particular interest. Together with a large number of partner companies, Allen-Bradley sells a broad portfolio of controllers, I/O devices and network components, which hold a considerable market share particularly in the USA. This application uses an example to show how SIMATIC S7 controllers can be brought into contact with Allen-Bradley networks. Main contents of this application
Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

The widely ramified product range of both Allen-Bradley and Siemens makes it impossible to comprehensively explain all possibilities in one single application. For this reason, this document focuses on one example describing how an S7 PROFIBUS network can be connected to an AllenBradley ControlLogix network to enable a direct data exchange of the two CPUs. The following will be explained: Delimitation This application only includes introductory descriptions of principles of programming Allen-Bradley ControlLogix controllers, the use of the RsLogix 5000 configuration software for these controllers, ladder logic as programming paradigm for PLC. Which network technologies Allen-Bradley uses, which products are available to establish the connection between Allen-Bradley and SIMATIC networks, which technologies are used for the connection.

This application does not provide in-depth knowledge on these topics.

V 1.0

Issue 10/01/06

3/82

Foreword

Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Structure of the document The documentation of this application is divided into the following main parts.
Part Application Description Description You are provided with a general overview of the contents. You are informed on the used components (standard hardware and software components and the specially created user software). This part describes the detailed functional sequences of the involved hardware and software components, the solution structures and where useful the specific implementation of this application. It is only required to read this part if you want to familiarize with the interaction of the solution components to use these components, e.g. as a basis for own developments. This part takes you step by step through structure, important configuration steps, startup and operation of the application. This part of the documentation includes further information, e.g. bibliographic references, glossaries, etc.

Principles of Operation and Program Structures

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Structure, Configuration and Operation of the Application Appendix

Reference to Automation and Drives Service & Support This entry is from the internet application portal of Automation and Drives Service & Support. Clicking the link below directly displays the download page of this document. http://support.automation.siemens.com/WW/view/en/23809864

V 1.0

Issue 10/01/06

4/82

Foreword

Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Table of Contents
Table of Contents ......................................................................................................... 5 Application Description ............................................................................................... 7 1 1.1 1.2 2 2.1 2.2 2.3 2.4 2.5
Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Automation Problem ...................................................................................... 7 General overview.............................................................................................. 7 Requirements ................................................................................................... 9 Automation Solution .................................................................................... 11 Overview of the overall solution...................................................................... 11 Description of the core functionality................................................................ 13 Required hardware and software components ............................................... 17 Performance data ........................................................................................... 19 Alternative solutions........................................................................................ 20

Principles of Operation and Program Structures .................................................... 21 3 3.1 3.2 3.3 3.4 3.5 4 4.1 4.2 5 5.1 5.2 5.3 5.4 6 6.1 6.2 6.3 6.4 6.5 6.6 Basics on Working with Allen-Bradley Products....................................... 21 Controllers ...................................................................................................... 21 Networks......................................................................................................... 22 Configuration software.................................................................................... 23 The SST PROFIBUS scanner ........................................................................ 28 Variable management..................................................................................... 28 Functional Mechanisms of this Application............................................... 31 Communication via data modules................................................................... 31 Limitation to Integer values....................................................................... 32 Explanations of the Example Program ....................................................... 33 Exchanged data.............................................................................................. 33 Details on programming the SIMATIC CPU 315 ............................................ 34 Programming the Allen-Bradley ControlLogix 5500 CPU ............................... 37 SST PROFIBUS scanner configuration .......................................................... 42 Modifications to the Example Program ...................................................... 44 Integrating several slaves ............................................................................... 44 Expanding the transferred variable ranges/data modules .............................. 44 Expanding the Allen-Bradley network ............................................................. 45 Adaptation to other Allen-Bradley controllers ................................................. 45 Consistent transfer of larger data volumes ..................................................... 45 Transferring large data volumes ..................................................................... 46

Structure, Configuration and Operation of the Application ................................... 47 7 7.1 7.1.1 Installation and Startup................................................................................ 47 Installation of hardware and software ............................................................. 47 Hardware installation ...................................................................................... 47

V 1.0

Issue 10/01/06

5/82

Foreword

Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

7.1.2 7.2 8 8.1 8.2 8.3 9

Installation of the standard software ............................................................... 50 Installation of the application software ............................................................ 50 Configuration ................................................................................................ 60 Configuring the SIMATIC configuration .......................................................... 60 Configuring the ControlLogix CPU.................................................................. 66 Configuring the SST PROFIBUS scanner ...................................................... 68 Operation of the Application ....................................................................... 76

Appendix and Literature ............................................................................................ 80 10 11 11.1 11.2


Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Troubleshooting ........................................................................................... 80 Literature ....................................................................................................... 81 Bibliographic references ................................................................................. 81 Internet links ................................................................................................... 82

V 1.0

Issue 10/01/06

6/82

Application Description Automation Problem


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Application Description
Content You are provided with an overview of Allen-Bradley network components and technologies and connection options with SIMATIC networks. You are informed on the used components (standard hardware and software components and the user configurations created in the scope of the application). The listed performance data show the performance of this application.

Automation Problem
... the classes of controllers and networks sold by Allen-Bradley, the options to establish a connection to SIMATIC networks and the motivation for such a connection. In addition, it is explained which specific solution was selected from the various solutions as an example.

You are provided with information on


Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

1.1
Note

General overview
From a legal point of view, Allen-Bradley is a subsidiary of Rockwell Automation, which deals with the development and the application of programmable controllers. The RSLogix configuration software for controllers, however, is sold by Rockwell. To avoid confusion, the termAllen-Bradley designates all products sold by Rockwell and Allen-Bradley in this application.

Introduction Allen-Bradley currently has a significant market share particularly in the United States. To serve the combination of different networks and the increasingly desired interoperability, this application uses an example to present an option to operate a Siemens PROFIBUS network in conjunction with an Allen-Bradley network. Since a comprehensive product portfolio consisting of different classes of controllers and networks has been developed and introduced to the market by Allen-Bradley over the years, one single application cannot cover all possible versions of Allen-Bradley products. For this reason, this document only focuses on one representative application.

V 1.0

Issue 10/01/06

7/82

Application Description Automation Problem


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Allen-Bradley product range The different controller classes which come into consideration for a connection include (roughly sorted by ascending performance):
Table 1-1: Allen-Bradley controllers

Class Programmable logic controllers:

Designation PLC 5 SLC 500 MicroLogix

Programmable automation controllers:

DriveLogix SoftLogix (PC-based) FlexLogix ControlLogix CompactLogix

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Networks which are considered include (again sorted by ascending order of performance):
Table 1-2: Allen-Bradley networks

Network Data Highway Plus (DH+) DH-485 ControlNet DeviceNet EtherNet/IP

Both controllers and networks greatly differ in their date of introduction, their performance and their market penetration. For this reason, a solution which is valid for a large number of existing installations or which can easily be adapted to other hardware/network combinations is presented for this application. Our example presents the use of a ControlLogix controller in conjunction with any Allen-Bradley network.

High-end controllers which are used when complex control processes/simulations, database accesses, HMI functionalities or high computing power are required are referred to as programmable automation controllers by Allen-Bradley.

V 1.0

Issue 10/01/06

8/82

Application Description Automation Problem


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Overview of the automation problem The figure below provides an overview of the automation problem.
Figure 1-1: Overview of the automation problem
Allen-Bradley SIMATIC

AB CPU

SST PB-CP

S7-300 CPU

S7-300 CPs

IO

PROFIBUS

DeviceNet*)

DeviceNet*)-Peripherie

*) oder anderes Allen-Bradley-Netzwerk

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

SST PB-CP is an SST PROFIBUS communications processor, a plug-in module for ControlLogix controllers, which acts as a gateway to PROFIBUS. This will be referred to as PROFIBUS scanner in the following. 2 Description of the automation problem This application solves the automation problem to provide a direct communication of two CPUs of different manufacturers one S7-CPU and one Allen-Bradley ControlLogix CPU. It is assumed that both CPUs in their respective subnetworks any network such as DeviceNet for AllenBradley, PROFIBUS for S7 still communicate with their corresponding distributed I/O and simultaneously perform control tasks in the distributed I/O. In this application, the I/O devices are not directly included in the communication between the networks, but only indirectly via the controllers. 3

1.2

Requirements
The ControlLogix controller communicates with its I/O devices and its input/output modules while the S7-CPU does the same within the PROFIBUS network. The possible connection of the ControlLogix controller to other Allen-Bradley networks (DeviceNet, ControlNet, etc.), which can

2 3

We thus follow the manufacturers nomenclature.

An additional application describes the alternative that the SIMATIC CPU communicates directly (i.e. not indirectly via the ControlLogix CPU) with the DeviceNet I/O devices with the aid of an Anybus gateway (see \6\). The corresponding application is currently being prepared and will probably be published in fall 2006.

V 1.0

Issue 10/01/06

9/82

Application Description Automation Problem


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

take place simultaneously to the PROFIBUS communication, is not affected by this. The PROFIBUS scanner coordinates PROFIBUS as master and communicates with the S7-CPU as slave. Both controllers cyclically exchange variable blocks simulating the process variables of a real automation problem. Importance is attached to a consistent variable transfer.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

V 1.0

Issue 10/01/06

10/82

Application Description Automation Solution


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Automation Solution
... the solution selected for the automation problem.

You are provided with information on

2.1

Overview of the overall solution


A particularly simple model was selected for the communication between the two subnetworks. A PROFIBUS scanner by SST/Woodhead (see \5\) is used to establish the connection. This is a module which is inserted into the rack of the Allen-Bradley CPU, comparable to a CP in an S7 rack. The scanner acts as a master in PROFIBUS and communicates with the S7-CPU as a slave. Both controllers cyclically exchange data which are grouped in packets modules. These modules are mapped to virtual input/output ranges. This means that the controllers identify the data packets as variables in their I/O ranges, the input variables of one controller acting as output variables of the other controller.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Diagrammatic representation The system is installed on two separate racks, one for SIMATIC components and one for Allen-Bradley components, between which a PROFIBUS connection is created. The following figure schematically shows the most important components of the solution in both racks: Configuration of the SIMATIC rack
Figure 2-1: Component set of the SIMATIC rack
CPU315-2 DP
SF ATF DC5V FRCE RUN S TOP RUN S TOP MR ES
S M374 IN/OUT 16

DC 24 V

PS 307 5A

SM 374

SIEMENS

VOLTAGE S E LE CTOR

x 2 3 4

x 2 3 4

x 2 3 4

Profibus network

V 1.0

Issue 10/01/06

11/82

Application Description Automation Solution


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

The SIMATIC rack includes the following components: PS 307 power supply S7 300-CPU (315-2) SM374 simulator module

Configuration of the Allen-Bradley rack


Figure 2-2: Component set of the Allen-Bradley rack

Slot: 0
Logix 5500
POWER
RUN I/O RS232 BAT OK
ST 0 FLT 0 ST 8 FLT 8 1 1 9 9

1
DC INPUT
2 2 3 3 4 4 5 5 6 6 7 7

2
DC OUTPUT
ST 0 Fuse 0 ST 8 Fuse 8 1 1 9 9 2 2 3 3 4 4 5 5 6 6 7 7

3
SST Profibus SCANNER

COPN
COMM SYS OK

10 11 12 13 14 15 10 11 12 13 14 15

10 11 12 13 14 15 10 11 12 13 14 15

DIAGNOSTIC

ELECTRONIC FUSING

RUN

REM

PROG

Allen-Bradley

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Allen-Bradley network (optional)

Profibus network

The Allen-Bradley rack is equipped with the following modules: 1756-PA72/B 1756-L1M2 1756-IB16D 1756-OB 16E Power supply ControlLogix 5500 CPU Input module (digital inputs) Output module (digital outputs)

SST-PFB-CLX-RLL PROFIBUS scanner, firmware version 5.01 or higher

Used software For the configuration of the SIMATIC CPU: SIMATIC Step 7 Manager, version 5.3 or higher

For the configuration of the ControlLogix CPU: RSLogix 5000 configuration software, version 13.03 or higher RSLinx or RSLinx lite communication software, version 2.42 or higher (for RSLinx lite)

V 1.0

Issue 10/01/06

12/82

Application Description Automation Solution


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

For the configuration of the PROFIBUS scanner: SST PROFIBUS Configuration Tool, version 3.6 or higher

Additional information A field PG is required for the configuration of the SIMATIC CPU. The ControlLogix CPU and the PROFIBUS scanner can only be configured via an RS-232 interface. If the used field PG does not feature this interface, a second laptop with respective functionality is required.

2.2
Note

Description of the core functionality


The PROFIBUS scanner can be used in numerous ways, for example, as a PROFIBUS slave. For greater clarity, the documentation is limited to the features actually used in this application, i.e. the use as a bus master. For a related documentation on the scanner, please refer to \2\. In this application, two subnetworks are set up; one PROFIBUS DP network with a SIMATIC CPU and an SM374 simulator module used for the simulation of inputs and outputs and one Allen-Bradley network with one input and one output module.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Connection of the subnetworks The connection between the two subnetworks is established by a PROFIBUS scanner by SST/Woodhead, which is inserted into the AllenBradley rack as a module, similar to a CP in the S7 environment. The scanner is the only Allen-Bradley component which features a PROFIBUS interface and is thus physically connected to the SIMATIC CPU. The scanner is logically configured as a master which cyclically polls the data of a slave here: the SIMATIC CPU or transfers the data to this slave. 4

Basically, the scanner can simultaneously communicate with several slaves; however, this capability is not used in this application. Corresponding possible expansions of the application are described in chapters 6.1 and 8.3.

V 1.0

Issue 10/01/06

13/82

Application Description Automation Solution


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Data exchange via modules In the application, the data exchange is limited to two modules (i.e. data packets): 16 words from the Allen-Bradley CPU to the SIMATIC CPU (master slave), 6 words from the SIMATIC CPU to the Allen-Bradley CPU (slave master).

The data modules include simulated process data, counter values and switch positions of the SM374 module. Configuration of the modules Basically, virtually any number of modules can be configured for the communication with a number of different slaves. However, the total volume of the data exchanged via the modules must not exceed 240 written or received data words per cycle and no individual module must be larger than 16 words. The data modules are from the output memory areas of the two CPUs and written into the input range of the respective other CPU. This is the actual PROFIBUS DP communication; in this application, the CPU configurations additionally ensure that the received values are routed to the output modules in their slots where they are displayed. But this only visualizes the successful PROFIBUS communication. Data consistency during the transfer The transfer of the data packets between the CPUs is consistent, i.e., it is not possible to modify the contents of one of the data packets between the start and the completion of the transfer. This ensures that all elements within one transferred packet always represent the same system state. It is, for instance, excluded that the system changes from state A to B during the transfer of the data so that one part of the data would still belong to state A and the other part already to B. Consistency is always only ensured within one module. If several modules are configured, the planner is responsible for ensuring the cross-module data consistency. Overview of the data exchange The figure below schematically shows the communication paths used in this application. Table 2-1 explains the individual steps.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

V 1.0

Issue 10/01/06

14/82

Application Description Automation Solution


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864
Figure 2-3: Sequence of the data exchange
CPU 315-2 DP SM 374
Input range Output range Input range Output range

SIMATIC

v
DP

6 words 16 words u

Logix 5500
Input range

Input

Output

Profibus scanner

Input range

Allen-Bradley
Output range

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Sequence of the core functionality The following tables show the individual communication steps as schematically represented in Figure 2-3.
Table 2-1: Sequence of the core functionality: Communication from SIMATIC to Allen-Bradley

1.

Data from the input range of the SM 374 are copied to the output range of the CPU 315. Together with further simulated process data, a data module is prepared for the transfer via PROFIBUS DP. The CPU 315 transfers the data module in reply to the polling by the PROFIBUS scanner. The data module received at the PROFIBUS scanner is copied to the input range of the ControlLogix CPU. The data are used to control the LEDs on the output module.

Output range

r q t

DP

Action

Note The data are one data byte of which the value is determined by the switch positions on the SM 374. Data volume: 6 words

2.

3. 4.

5.

Data volume: One word, which transfers CPU 315 counter content and SM 374 switch position.

V 1.0

Issue 10/01/06

15/82

Application Description Automation Solution


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864
Table 2-2: Sequence of the core functionality: Communication from Allen-Bradley to SIMATIC

Action 6. A data module for the transfer to the CPU 315 is assembled in the ControlLogix from the input range of the input module and internal variables. The data module is transferred to the PROFIBUS scanner. The module is transferred to the CPU 315 slave by the scanner master. The received data are copied to the input range of the CPU 315. Parts of the data from the input range are used to control the SM 374.

Note

7. 8. 9. 10.

Data volume: 16 words

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Note

The individual steps are only represented in a logical order. It is in no way ensured that the actual order of the steps within a CPU cycle is identical to the sequence in the table. On the contrary: The clock cycles of S7-CPU and ControlLogix CPU are not matched to one another and a PROFIBUS DP communication does not occur during each CPU cycle.

Advantages of this solution The application of this solution is perfectly suited particularly due to the fact that its configuration is simple and not complicated: The hardware additionally required to connect the two (assumed to be already existing) subnetworks is limited to the PROFIBUS scanner. The configuration overhead is also insignificant; it is basically limited to the definition of the new data modules in the ControlLogix CPU and the CPU 315 and the registration of the used hardware in the PROFIBUS scanner. To ensure the consistency of the transferred modules, only standard blocks have to be used. The communication with several slaves can also be configured easily and quickly; the data are transferred at a speed that is sufficient for most applications. See also chapters 2.5 and 6.1.

V 1.0

Issue 10/01/06

16/82

Application Description Automation Solution


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

2.3
Note

Required hardware and software components


In the tables below, components not sold by Siemens are silhouetted in gray. The respectively specified sales sources are responsible for their procurement (see also page 18).

Hardware components
Table 2-3: Required hardware components

Component SIMATIC Field PG M Standard PS 307 load power supply


Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

No. 1 1 1 1 1 1 1 1 1 1

MLFB / Order number 6ES7712-0AA0.0XXX 6ES73071BA00-0AA0 6ES73152AG10-0AB0 6ES79538LlOO-0AA0 6ES73742XH01-0AA0 1756-PA72/B 1756-L1M2 1756-IB16D 1756-OB16E SST-PFB-CLXRLL

Note Or comparable PC with MPI Or comparable power source Or SIMATIC NET PROFIBUS CP (CP 342-5) Or higher capacity Or DI8/DO8 module with digital inputs/outputs Procurement via 1 Procurement via 1 Procurement via 1 Procurement via 1 Procurement via 1

SIMATIC S7-300 CPU 315-2DP SIMATIC Micro Memory Card 2 MB SM 374 simulator module Power supply ControlLogix 5500 CPU Input module Output module PROFIBUS scanner

In addition, a PROFIBUS cable for connecting CPU 315 and PROFIBUS scanner and a null modem cable (RS232, 9-pin sub D plug) for configuring ControlLogix controller and PROFIBUS scanner are required. Standard software components
Table 2-4: Required software components

Component Simatic S7, Step 7 V5.3 incl. SP3 (or higher) RSLogix 5000 Standard Edition, V13.03 (or higher)

No. 1

MLFB / Order number 6ES78104CC07-0YA5 9324RLD300DEE

Note

German version, procurement via 1

V 1.0

Issue 10/01/06

17/82

Application Description Automation Solution


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Component SST PROFIBUS Configuration, V3.6 (or higher)

No. 1

MLFB / Order number

Note Included in the scope of delivery of the PROFIBUS scanner; if not, procurement via 2

Sources of supply for Germany: 1. Rockwell Automation regional office of Rockwell Int'l GmbH Dsselbergerstrasse 15 42781 Gruiten Germany Tel: +49 2104 9600 Fax: +49 2104 960 121 (see also \4\
Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

2. Woodhead Connectivity GmbH Im Gssle 9 70771 Leinfelden-Echterdingen, Germany Tel: +49 711 782374 0 Fax: +49 711 782374 11 (see also \5\) Example files and projects The following list includes all files and projects used in this example.
Table 2-5: Configurations included in the application

Component 23809864_DOKU_v10_e.pdf 23809864_CODE_v10.zip This document.

Note Configurations for the application

The code archive 23809864_CODE_v10.zip includes the following configurations:


Table 2-6: Configurations within the code archive

Configuration 23809864_allen_bradley_s7_v10.zip 23809864_allen_bradley_rslogix_v10.zip 23809864_allen_bradley_sst_v10.zip STEP 7 project

Note Allen-Bradley configuration for RSLogix/ControlLogix CPU Configuration for SST PROFIBUS Configuration Tool/PROFIBUS scanner GSD file for CPU315-2DP (see chapter 5.4)

CPU315-2AF02.ZIP

V 1.0

Issue 10/01/06

18/82

Application Description Automation Solution


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

2.4

Performance data
The presented technology for the data exchange between the CPUs is subject to the following restrictions: The size of the exchanged data modules must not exceed 244 bytes for the inputs and outputs of each individual slave. The permissible total size of all data modules is 246 words for outputs and 248 words for inputs. The size of each individual module for which the consistent transfer is still ensured is 16 words. A maximum of 35 modules (for inputs and outputs) can be defined. The presented example is limited to the use with ControlLogix controllers, however, it can easily be adapted. Compare chapter 6.4. The communication takes place between the CPUs. It is not possible to directly access the I/O devices within the Allen-Bradley network.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

If these key data represent serious restrictions, alternative solutions are listed in chapter 2.5. Please also observe that only integer variables are correctly transferred with the suggested example. See chapter 4.2.

V 1.0

Issue 10/01/06

19/82

Application Description Automation Solution


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

2.5

Alternative solutions
The communication via the PROFIBUS scanner standard mechanisms presented in this document requires little hardware and configuration overhead and provides a performance which is sufficient for many applications. At the same time, however, the mechanism is subject to specific restrictions as mentioned in chapter 2.4. If these key data do not meet the requirements, the following alternatives are available: The consistent transfer of larger data areas can be achieved by implementing a protocol layer for the controllers, which causes a segmentation of the data blocks into smaller, consistent modules and which puts the transferred modules together to form a consistent block on the receiving end. Such a mechanism has been developed for the S7, e.g. in \5\. However, it would still have to be configured and tested on the Allen-Bradley side. SST/Woodhead also sells scanner modules which are designed for other controllers such as PLC-5 and SLC 500, but which basically have the same functionality as the used scanner. Compare \5\. The company sells HMS networks gateways under the brand name Anybus, which can link a large number of networks. These gateways include models which can connect other Allen-Bradley networks such as DH+, DH 485 or ControlNet to PROFIBUS networks, see also \6\. For the use of these gateways, please refer to the application /3 (fall 2006).5 These gateways also allow direct communication with the Allen-Bradley I/O devices from the PROFIBUS network. INAT GmbH sells Echochange gateways, which can establish the connection from Ethernet/IP networks (Allen-Bradley) to other Ethernet networks, in particular Industrial Ethernet (SIMATIC). See /7/ (fall 2006) or \7\. The actual PROFIBUS scanner can not only be operated as a master but also as a slave.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

It has to be observed that this application is not subject to restrictions with regard to the used Allen-Bradley networks since PROFIBUS is directly connected to the Allen-Bradley rack and no distance has to be bridged between gateway and CPU.

V 1.0

Issue 10/01/06

20/82

Principles of Operation and Program Structures Basics on Working with Allen-Bradley Products
Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Principles of Operation and Program Structures


Content This part describes the detailed functional sequences of the involved hardware and software components, the solution structures and where useful the specific implementation of this application. It is required to read this part if you are interested in the interaction of the solution components.

Basics on Working with Allen-Bradley Products


... the controllers, networks and configuration paradigms Allen-Bradley uses and the used nomenclatures. You are provided with a brief overview of the automation work with Allen-Bradley products.

You are provided with information on

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

3.1

Controllers

Programmable logic controllers and programmable automation controllers Allen-Bradley always divides its controllers into two groups: Programmable logic controllers (PLCs) and programmable automation controllers (PACs). PACs are used for demanding tasks. They combine PC and PLC features. The table below shows typical properties and fields of application of the two controller classes.
Table 3-1: Typical fields of application and use of PLCs and PACs

PLCs Control of inputs and outputs Logical interconnections Timing Communication Generation of reports Simple counting and math operations

PACs Advanced control algorithms Manipulation of comprehensive databases HMI functionality without using a separate device Complex process simulation Very high computing power and memory requirements

V 1.0

Issue 10/01/06

21/82

Principles of Operation and Program Structures Basics on Working with Allen-Bradley Products
Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

PLCs Members of the PLC group are the controllers of the classes PLC 5: The oldest still actively supported controllers. They can be roughly compared to S5 controllers regarding performance and also still consist of relatively large sized cards. SLC 500: More modern controllers with smaller form factor and generally a higher performance. Its specifications can roughly be compared to an S7-300. MicroLogix: Controllers aimed at the low price segment and correspondingly limited in their performance capability.

PACs and Logix platform Currently, the following classes are sold:
Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

CompactLogix: Controllers for compact applications ControlLogix: High-performance controllers in compact form factor SoftLogix: PC-based control solutions FlexLogix: Low-level models as budget-priced alternatives to ControlLogix controllers.

All PACs belong to the Logix platform, which is characterized by standardized configuration, communication and visualization concepts.

3.2

Networks
In the course of the technical development, Allen-Bradley also developed a number of protocols for communication. Data Highway Plus (DH+, proprietary): The oldest still supported protocol by Allen-Bradley, originally developed for the work with PLC 5 controllers. Serial communication via RS-422/RS-232 cables with up to 57.6 Kbit/s and 99 network nodes. DH-485 (proprietary): DH-485 is a further development of DH+ for multimaster operation. It was designed for use with SLC 500 PLCs and supports up to 32 nodes on an RS-485 cable. The communication can take place with up to 19.2 Kbit/s. DeviceNet (open): A more modern protocol based on CAN technology. It is intended for linking sensors and actuators to modern controllers at process level. ControlNet (open): A high-performance protocol based on coax and glass fiber connections developed for the communication at control level. The data rate is up to 5 Mbit/s. Ethernet/IP (open): An adaptation of the Ethernet communication to the industrial environment requirements.

V 1.0

Issue 10/01/06

22/82

Principles of Operation and Program Structures Basics on Working with Allen-Bradley Products
Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Nowadays, virtually every Allen-Bradley controller can communicate via each of the offered networks with the aid of corresponding gateways, etc.

3.3

Configuration software

RSLogix 5000 The application with the aid of which ControlLogix and other Allen-Bradley controllers are configured is named RSLogix 5000; its functionality basically corresponds to the SIMATIC Manager. The current version is 13.3. The figure below is a screen shot of the configuration user interface.
Figure 3-1: RSLogix 5000 screen shot

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

The left screen field includes the Project Tree which lists the components of the project hardware, program code and variables. The right screen field changes depending on the component selected in the Project Tree; the figure shows a command sequence programmed in ladder logic (see below).

V 1.0

Issue 10/01/06

23/82

Principles of Operation and Program Structures Basics on Working with Allen-Bradley Products
Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864
Figure 3-2: RSLogix screen shot , tag table

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

In addition, RSLogix also provides further options for project management. The above screen shot shows a selected table of tags, which basically corresponds to the function of the variable table of the SIMATIC Manager. RSLogix also enables to access an online view of the current values of the tags in the viewed controller and to modify them in the process sequence if required (forcing). Ladder logic Ladder logic is the programming paradigm preferred by Allen-Bradley, the CPUs are programmed with ladder logic by default also in RSLogix. A chart is drawn, which consists of two vertical rails on the left and on the right. The two rails are connected by a row of horizontal rungs. (See Figure 3-3 below.) A number of conditions and instructions is located on each rung. The individual rungs are sequentially processed from top to bottom during one program cycle. Due to this, the ladder logic bears a certain resemblance to a ladder diagram (LAD). As an alternative, the ControlLogix controllers can also be programmed with Structured Text, a text-oriented configuration language, which rather follows traditional programming languages or SCL.

V 1.0

Issue 10/01/06

24/82

Principles of Operation and Program Structures Basics on Working with Allen-Bradley Products
Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864
Figure 3-3: Screen shot of the ladder logic programming example as used in the RSLogix configuration software.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Although many suppliers use ladder logic for the programming of their PLCs, the details of the implementation always differ. This makes it necessary to check the function of a ladder logic diagram in each individual case. Tasks, programs and routines The configuration within the ControlLogix controller is hierarchically divided into tasks, programs and routines, which represent individual modules structuring both the program flow and the managed data. The top programming level consists of the tasks. Aside from the main task, which always exists (comparable to OB 1 of S7), up to 31 further tasks can be programmed. A priority is assigned to each task, the task with the highest priority is always executed. If several tasks have the same priority, they share the available computing time in the form of 1 ms time slices. Controller tags are variables which globally exist in all tasks. Up to 32 programs can be defined within each task. These programs are not executed concurrently as the tasks but strictly successively in the order in which they are defined in the source code.

V 1.0

Issue 10/01/06

25/82

Principles of Operation and Program Structures Basics on Working with Allen-Bradley Products
Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Each program has variables with a local range of validity in the form of program tags. Programs can be divided into routines. The function of these routines can be compared to S7 function blocks or procedures of classic programming languages.

A symbolic addressing of the variables ( via variable names) is the default for the ControlLogix programming, the exact placing of the variables in the memory is left to the configuration software. But it is also possible to explicitly assign specific memory locations to variables. User-defined data types can be defined as structures. RSLinx RSLinx is an application which cooperates closely with RSLogix and which provides communications services for this application. It acts as a type of driver with additional functions for diagnostics and configuration. It can, for example, provide an overview of the networks active nodes via the RSWho option.
Figure 3-4: RSLinx screen shot with an overview of the active modules in the Allen-Bradley rack

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Note

RSLinx is automatically called by RSLogix, but it is not automatically terminated when stopping RSLogix. This may particularly cause that the serial interface is not enabled. In this case, the SST PROFIBUS Configuration Tool (see page 27) can no longer communicate with the PROFIBUS scanner. If required, RSLinx must be manually terminated or the computer has to be restarted.

V 1.0

Issue 10/01/06

26/82

Principles of Operation and Program Structures Basics on Working with Allen-Bradley Products
Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

SST PROFIBUS Configuration Tool The SST PROFIBUS Configuration Tool is a software with which the PROFIBUS scanner by SST/Woodhead is configured. The main function is to communicate to the PROFIBUS scanner which variable ranges (data modules) are to be exchanged with which bus nodes.
Note

It has to be observed that the SST PROFIBUS Configuration Tool was not developed by Rockwell/Allen-Bradley; thus, its interaction with RSLogix/RSLinx requires particular care.

Figure 3-5: SST PROFIBUS Configuration Tool screen shot

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

As illustrated above (Figure 3-5), the SST Configuration Tool shows a tripartite screen. The left column includes a tree structure which lists the available bus node types, i.e., the models of known PROFIBUS masters and slaves. As a further tree structure, the box on the right includes the actual scanner configuration consisting of branches in which the individual bus nodes are linked to the scanner and attached twigs which concern the exchanged data areas. In the above example, the scanner is configured to communicate with exactly one slave, a CPU 315. Aside from three dummy entries, the scanner as master exchanges one input and one output data range with this slave.

V 1.0

Issue 10/01/06

27/82

Principles of Operation and Program Structures Basics on Working with Allen-Bradley Products
Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

A bar that can be used for network diagnostics is located in the bottom screen field. It displays the found bus nodes and their properties.

3.4

The SST PROFIBUS scanner


The PROFIBUS scanner is one of many network gateways sold by SST/Woodhead. The gateways are used in the form of plug-in cards or modules, which can connect different Allen-Bradley networks or controllers as master or slave to a PROFIBUS. In our application, a PROFIBUS Master module (a scanner) is used together with a ControlLogix CPU. The scanner is configured with a separate software. The configuration is used for the following tasks: For the ControlLogix CPU, input/output modules are defined for the communication: As seen from the CPU, the scanner operates as an I/O module; the data packets to be exchanged (modules) are mapped to the I/O ranges of the CPU. (See below.) The PROFIBUS configuration (bus addresses, baud rates, cycle times) is defined and the exchanged data modules are assigned to the slaves on the PROFIBUS.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

3.5

Variable management
The main difference between the management of data and variables in Allen-Bradley and SIMATIC is that the separation between memory areas (flags, input/output ranges, etc.) on the one hand and symbolic variables on the other hand is not so distinct.

Controller tags Aside from procedure-local and temporary variables, the RSLogix software automatically generates a set of controller tags, which are shown in Figure 3-6 as examples. Aside from the variables defined by the user in this case the user-defined types Data_received and Data_to_send with their respective members the controller tags comprise also variables automatically generated by the system which correspond to the input/output ranges of the modules integrated in the rack. These data areas are designated with Local:n:, n representing the number of the slot in which the respective module is located. The variables of the scanner configured in slot 3 are also located in the Local:3: area.

V 1.0

Issue 10/01/06

28/82

Principles of Operation and Program Structures Basics on Working with Allen-Bradley Products
Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864
Figure 3-6: Variable management of the ControlLogix CPU with controller tags

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Depending on the function of the module, the memory areas are further divided into C (Control), I (Input), O (Output) and S (Status) sections:
Table 3-2: Different sections of the controller tag fields

Design. C I O S

Section Control Input Output Status

In the 1756-OB 16E output module in slot 2 of our configuration, the O section is, for example, occupied by the process output image. Each section consists of an array containing the actual data designated with Data. Local:2:O.Data.3 thus includes data bit 3 in the output range of the I/O module installed in slot 2, Local:3:S.Data[12] (note the subtle distinction of the syntax!) data word 12 in the S section of module 3. 6

Depending on their use, the individual memory area elements can be specified in different data types and addressed correspondingly. Mostly BOOL or INT (corresponds to WORD) are used.

V 1.0

Issue 10/01/06

29/82

Principles of Operation and Program Structures Basics on Working with Allen-Bradley Products
Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Structure of the controller tags area of the PROFIBUS scanner The structure of the scanners input and output fields is as follows:
Table 3-3: Memory area structures of the scanner. The offset is specified in words.

Area 0 Input 1

Offset (words)

Meaning Register: Scanner Status Register: Command Reply User data Register: Issue Command Register: Command Value User data

2 ... 247 (246 words) 0 Output 1 2 ... 249 (248 words)

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

The sent and received data words can thus only start in the controller tag Local:3:I:Data[2] or Local:3:O:Data[2] since the words 0 or 1 are used as registers for the communication with the actual scanner. The output words 0 and 1 are of particular importance. A new status can be entered in word 1; by setting word 0 to 1, a change to this status is then actually performed. Possible status values are:
Table 3-4: Scanner statuses (Command Value), specified in word 1 of the output range, change by setting bit 0 in word 0 (Issue Command).

Value 0 1 2 3 4 5 6 7 Run Clear

Meaning Not specified

Clear status counter Set scanner online Read slave diagnostics Acknowledge slave diagnostics Set scanner offline

To commission the scanner after the configuration, first word 1 and then word 0 of the output range have to be set to the value 1. For detailed information on the contents of the command and status registers and of the status area, please also refer to \2\. The exchange of the data modules between scanner and SIMATIC will be explained in detail in chapter 4.1.

V 1.0

Issue 10/01/06

30/82

Principles of Operation and Program Structures Functional Mechanisms of this Application


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Functional Mechanisms of this Application


... the PROFIBUS communication mechanisms on which this application is based.

You are provided with information on

4.1

Communication via data modules


The used PROFIBUS DP mechanism, which switches the communication between a PROFIBUS master and the I/O modules configured as a slave, is based on the exchange of data modules. This application is configured in such a way that the SST PROFIBUS scanner acts as a master and the CPU 315 operates as an intelligent slave.

The scanner takes the initiative of the communication.


Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Basically, any data can be exchanged between scanner and SIMATIC CPU. The data are prepared by being displayed as input/output variables which are exchanged between master and slave as intelligent I/O devices. Figure 4-1 shows the principle of the communication:
Figure 4-1: PROFIBUS communication via data modules in the SIMATIC. Managing the process image in the ControlLogix CPU is similar. (See chapter 3.5)
Data modules from/to Profibus communications partners

Physical variable ranges (e.g. SM 374)

Backplane bus DB DB Flags

Process image (I/O memory area of the CPU)

Consistent copying (BLKMOV)

Daten areas of the CPU

Profibus

CPU

V 1.0

Issue 10/01/06

31/82

Principles of Operation and Program Structures Functional Mechanisms of this Application


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Data from the data blocks (or other memory areas of the CPU) are stored in the process image. From there they are either transferred to the I/O modules, or they are sent to the receivers as virtual I/O modules via PROFIBUS. (Since the communications partners appear to the user as I/O modules, they are also configured in the hardware configuration of the CPU.) Data from outside pass the opposite way and are copied to data blocks or other memory areas for further use after having been included in the process image. When copying, it has to be observed that it is performed consistently. Otherwise there is a risk that a new data module is received or sent during copying. This means that a part of the data would still have the old time stamp, but the other part already the new one. The figure shows the process for SIMATIC controllers. Basically, the principle of operation is identical for Allen-Bradley.
Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

4.2
Note

Limitation to Integer values


Due to the different internal data formats of the two controllers (big endian or little endian), only integers (2 bytes or 1 word) are transferred correctly. When transferring a sequence of individual bytes, a change of the byte order may occur, high and low word are exchanged for longer data units (long int or real). This problem cannot be solved without programming overhead. The data transfer of the stream works correctly, but the problem is the assignment of the individual bytes to the variables to which they are associated. The corresponding information gets lost in the Profibus communication, which only sees a stream of individual bytes in the transferred data!

V 1.0

Issue 10/01/06

32/82

Principles of Operation and Program Structures Explanations of the Example Program


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Explanations of the Example Program


... the setup of the SIMATIC and Allen-Bradley configurations and the essential code sections.

You are provided with information on

5.1

Exchanged data
The functionality of the application is that master and slave (thus PROFIBUS scanner and CPU 315) exchange data. Table 5-1 provides an overview of the exchanged data.

Table 5-1: Data exchanged in the application

Memory location CPU 315 DB 1.


switches status reserved cycle_counter

Data type (S7)

Memory location Allen-Bradley From_CPU315.


Switches Status

Data type AllenBradley

Address offset

Remark

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

BYTE BYTE INT DWORD

SINT SINT

0 (S7) 1 (AB) 1 (S7) 0 (AB) 2-3 4-7

SM 374 switch position

S7_cycles

DINT

CPU 315 program cycle counter

DB 2.
counter_x

INT

To_CPU315.
Counter

INT

0-1

Program cycle counter of the Allen-Bradley CPU Status of the inputs of the IB16D module Scanner status (internal variable) Slaves detected on the network by the scanner Received confirmations (scanner network variable) (Scanner network variable)

ib16d

INT

ib16d_inputs

INT

2-3

scanner active_slaves

INT INT

Scanner_status Active_slaves

INT INT

4-5 6-7

confirmations

INT

Confirmations

INT

8-9

indications notOK

INT INT

Indications NotOK

INT INT

10-11 12-13

V 1.0

Issue 10/01/06

33/82

Principles of Operation and Program Structures Explanations of the Example Program


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Memory location CPU 315


scanner_control speed angle

Data type (S7) BYTE REAL DINT

Memory location Allen-Bradley


Scanner_control Speed Angle

Data type AllenBradley SINT REAL DINT

Address offset 14 16-19 20-23

Remark

Simulated process variable

Please observe the exchange of the memory cells for status and switches. Values that have not been correctly transferred (compare chapter 4.2 and section 9) are italicized and only for demonstration! See also the description of the data blocks and the following sections.

5.2
Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Details on programming the SIMATIC CPU 315


The programming of the CPU 315 is not very extensive. It only consists of OB 1 and two data blocks DB 1 and DB 2, which have the user-defined structures.

V 1.0

Issue 10/01/06

34/82

Principles of Operation and Program Structures Explanations of the Example Program


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

OB 1
Figure 5-1: Programming of OB 1

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

The individual networks in OB 1 have the following function:

V 1.0

Issue 10/01/06

35/82

Principles of Operation and Program Structures Explanations of the Example Program


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864
Table 5-2: Programming of OB 1

Network no. 1. 2.

Function The received data module (configured to the memory area from input byte 5) is copied to DB 2 (volume: 24 bytes) The counter_x variable from DB 2 is mapped to output byte 4. (These are the output LEDs of the SM 374); the switches variable of DB 1 (!) is copied to output byte 5 of the SM 374.) The status of the switch on the SM 374 (input byte 4) is copied into the switches variable in DB 1 and a program cycle counter (cycle_counter) is incremented. 7 The data from DB 1 are copied to the output data module (memory area on output byte 6, volume: 8 bytes).

3.

4.

Note
Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

SFC 20, BLKMOV, is used for the copy operations since this ensures consistent data handling. The switches variable is defined by the position of the lower eight toggle switches on the SM 374 module. It has to be observed that the selector switch of the SM 374 (front panel center) is set to position 8 Output, 8 Input. The display of the output LEDs is not determined by the current switch positions, but by the values buffered in DB 1. For this reason, the display always lags one communication cycle behind the actual switch position.

Note

Data blocks DB 1 and DB 2 DB 1 includes the data that are sent to the PROFIBUS scanner:
Figure 5-2: Structure of DB 1

Values are not written to the status variable. reserved has only been inserted for demonstration purposes. The actual data transfer in the modules is performed as a mere byte field without internal structure. It is thus theoretically possible (even though rarely desired) to write a structure to the data to be sent which differs from the

This variable is not synchronized with Data_to_send.Counter (see. Table 5-3); the values of both variables are independent of one another.

V 1.0

Issue 10/01/06

36/82

Principles of Operation and Program Structures Explanations of the Example Program


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

one with which they were read. For instance, the sender can write a sequence of four bytes which are read by the receiver as a doubleword. 8 DB 2 comprises the variables which are received by the scanner:
Figure 5-3: Structure of DB 2

counter_x is a counter of the Allen-Bradley CPU which is incremented every 256 CPU program cycles. ib16d indicates the status of the inputs in the IB16D digital input module in the Allen-Bradley rack. The variables scanner, active_slaves, confirmations, indications, notOK and scanner_control are diagnostic variables the PROFIBUS scanner has reported to the Allen-Bradley CPU from where the variable values returned to the SIMATIC via the scanner. Primarily active_slaves is of interest. In this word, the addresses of the slaves are stored which the scanner has detected in its role as a master on PROFIBUS. If, for example, bit 4 is set to TRUE, a slave with address 4 has been detected on the bus. (The addresses 0 to 15 are encoded.) speed and angle are two simulated process variables. They are currently not written to and only used to demonstrate that basically also floating point values, etc. can be transferred. Please observe chapter 4.2!

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

5.3

Programming the Allen-Bradley ControlLogix 5500 CPU

Ladder logic The programming of the ControlLogix 5500 CPU was deliberately kept simple. There is only one task which does not include any further subprograms or routines so that the necessary instructions are all executed in the main task. Only controller tags with a global range of validity were defined, but no module global or local variables. The figures and tables below represent the function of the ladder logic program.

The loss of the data structure is also indicated by the fact that the copy commands from and to the input/output ranges of the modules only copy memory areas, irrespective of their contents.

V 1.0

Issue 10/01/06

37/82

Principles of Operation and Program Structures Explanations of the Example Program


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864
Figure 5-4: Programming the main task, rung 0-2. The rung numbers are displayed on the left as blue figures.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Table 5-3: Explanation of the ControlLogix main program in Figure 5-4

Rung 0. 1. 2.

Description Incrementing the Counter auxiliary variable and the Data_to_send.Counter 9variable to be transferred. Reading the status of the inputs of the IB16D module Copying the Scanner_status scanner diagnostic variable

This variable is not synchronized with cycle_counter (see. Table 5-2); the values of both variables are independent of one another.

V 1.0

Issue 10/01/06

38/82

Principles of Operation and Program Structures Explanations of the Example Program


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864
Figure 5-5: Programming the main task, rung 3-6 (continuation)

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Table 5-4: Explanation of the ControlLogix main program in Figure 5-5 (continuation)

Rung 3. 4. 5. 6.

Description Copying the list of active slaves Copying the further diagnostic variables ... ...

V 1.0

Issue 10/01/06

39/82

Principles of Operation and Program Structures Explanations of the Example Program


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864
Figure 5-6: Programming the main task, rung 7-10 (continuation)

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Table 5-5: Explanation of the ControlLogix main program in Figure 5-6 and Figure 5-7 (end)

Rung 7. 8. 9. 10. 11.

Description Copying the further diagnostic variables Consistent copying of the data to be sent to the scanner Consistent copying of the received data from the scanner Representation of the Allen-Bradley counter ... and of the switch position on the SM 374 module on the LEDs of the OB 16E output module

Figure 5-7: Programming the main task, rung 11 (end)

V 1.0

Issue 10/01/06

40/82

Principles of Operation and Program Structures Explanations of the Example Program


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Note

The CPS commands (Synchronous Copy File) are used for steps 8 and 9 since otherwise a consistent transfer would not be ensured. Its function is analogous to SFC 20 of the SIMATIC.

Data structures
Figure 5-8: Overview of the defined controller tags

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

The structure of the user-defined data structures is shown below. The meaning of the individual member variables corresponds to the SIMATIC data block descriptions, see also Figure 5-2 and Figure 5-3 and the accompanying text. (Page 36)
Figure 5-9: User-defined data type for the data structure sent by S7

Please note that the order of the first two members Status and Switches respectively is exchanged in the From_CPU315 structure compared to the corresponding elements of DB 1 (compare Figure 5-2 ). This is the consequence of the different data formats of the controllers discussed in chapter 4.2. S7_cycles is also not transferred correctly. A display of the variable values in hexadecimal representation illustrates the problem.

V 1.0

Issue 10/01/06

41/82

Principles of Operation and Program Structures Explanations of the Example Program


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864
Figure 5-10: User-defined data type for the data structure received by S7

5.4
Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

SST PROFIBUS scanner configuration


The configuration of the PROFIBUS scanner basically consists of three steps: 1. Defining the master (i.e. the actual scanner), 2. defining the slaves to which the master is connected, 3. configuring the data modules to be exchanged with the slaves. The figure shows a screen shot section of the SST PROFIBUS configuration software with which the scanner is configured.
Figure 5-11: Overview of the PROFIBUS scanner configuration

The elements inserted in Figure 5-11 correspond to the three steps. The top entry (under PROFIBUS DP, marked with Disconnected since there was no connection to the scanner at the time of the screen shot) marks the actual scanner. The SIMATIC CPU is entered in the line below (highlighted). Since AllenBradley considers this is a third-party product, the controller has to be introduced to the scanner by entering its configuration file (GSD file) in the project. (See note page 72 and Table 8-6). Finally, the exchanged data modules follow. The entries [003] and [004], the two only actually read and written blocks, are relevant.

V 1.0

Issue 10/01/06

42/82

Principles of Operation and Program Structures Explanations of the Example Program


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Note

Although the entries [000] to [002] do not define user data, they must not be left out. The numbering of the modules corresponds to the (virtual) slots of the I/O modules in the S7 rack. In this rack, however, slots 0 to 2 are occupied by the power supply and the actual CPU. In other words, the above blank entries are not defined and the scanner attempts to exchange data with the incorrect virtual slots and communication cannot be established. The volume of the defined data areas is 32 bytes for both modules. (This is the maximum which can be consistently transferred.) The configured user data volume, however, is only 8 bytes (SIMATIC to Allen-Bradley) or 24 bytes (Allen-Bradley to SIMATIC).

Note

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

V 1.0

Issue 10/01/06

43/82

Principles of Operation and Program Structures Modifications to the Example Program


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Modifications to the Example Program


... how you can expand this application to adapt it to your requirements.
Note

You are provided with information on

Specific instructions for the expansion and adaptation of your project are also listed in chapter 8.

6.1

Integrating several slaves


To integrate more than one slave into the project, expand the PROFIBUS scanner configuration correspondingly by making an entry for each slave analogous to the already configured CPU 315 and by assigning further data modules to this entry.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Please observe that it might possibly be necessary to adapt the bus parameters to maintain the communication. To do this, consult your PROFIBUS documentation.

6.2

Expanding the transferred variable ranges/data modules


To expand the transferred data, two options are available: Increase the size of the DBs (SIMATIC) and user defined types (Allen-Bradley) by the respective components. At the same time, ensure that the copying processes correspond to the new block sizes in both controllers. 10 This procedure allows you to transfer a maximum of 32 bytes in each direction in one module. For larger data volumes, define several data modules for the transfer. Define these modules analogously to the already defined modules. Changes have to be made in the configuration of the PROFIBUS scanner and in HW Config of the S7 project 11. (See also chapter 8.1) For the two controllers, the changes only result in an increase in size of the usable I/O ranges. With this procedure, you can define up to 35 modules with a total volume of 244 bytes for input and output for each module.

10

Please ensure that the alignment of the elements of the data blocks corresponds in both controllers. Refer also to the explanation of the reserved variable, page 36. 11 Data modules are handled as virtual I/O modules.

V 1.0

Issue 10/01/06

44/82

Principles of Operation and Program Structures Modifications to the Example Program


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

6.3

Expanding the Allen-Bradley network


As long as you only want to use one CPU in your Allen-Bradley network, just proceed as if the PROFIBUS scanner did not exist when configuring the network. The presence of the scanner only affects the ControlLogix CPU as an additional I/O module inserted into the rack; the scanner is not perceived as a network node and the Allen-Bradley internal networking is not affected by this. In other words, set up your network as if you used no PROFIBUS scanner. In case of doubt, consult the Allen-Bradley documentation and comparable resources.

6.4

Adaptation to other Allen-Bradley controllers


The presented PROFIBUS scanner is only one model of the backplane modules sold by SST/Woodhead. The following table lists the complete current product range.
Table 6-1: SST/Woodhead backplane modules for PROFIBUS

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

PLC class PLC 5 SLC 500 ControlLogix

Order number SST-PFB-PLC5 SST-PFB-SLC SST-PFB-SLC-ADP SST-PFB-CLX-RLL

Use Master or slave Master or slave Only slave Master or slave

Controllers other than ControlLogix PLCs are configured with the corresponding module analogously to this application. Anybus gateways (see /3/ and \6\) and other alternatives are available for the other controllers.

6.5

Consistent transfer of larger data volumes


The size of an individual data module is limited to 32 bytes. This is concurrently the largest unit for which the PROFIBUS scanner guarantees a consistent transfer. To transfer larger data blocks consistently, it is required to program a protocol layer in the two CPUs, which performs the following tasks: Separating the data blocks into modules of the permissible size, transferring the individual modules, assembling the modules at the receiver, checking the complete transfer and validity of the data; if required, new request of the transfer.

V 1.0

Issue 10/01/06

45/82

Principles of Operation and Program Structures Modifications to the Example Program


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

An application exists which solves this task for the connection of two SIMATIC CPUs. (Compare /5/) However, please observe that the functionality still has to be programmed on the Allen-Bradley side in this case.

6.6

Transferring large data volumes


The PROFIBUS scanner is limited to input/output ranges of 246 data bytes each. If larger data volumes are to be exchanged between the controllers, the presented methods are no longer feasible.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

V 1.0

Issue 10/01/06

46/82

Structure, Configuration and Operation of the Application Installation and Startup


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Structure, Configuration and Operation of the Application


Content This part takes you step by step through structure, important configuration steps, startup and operation of the application.

Installation and Startup


... the hardware and software you have to install and the steps necessary to start up the example.

You are provided with information on

7.1
Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Installation of hardware and software


This chapter describes which hardware and software components have to be installed. The descriptions and manuals as well as delivery information included in the delivery of the respective products should be observed in any case.

7.1.1

Hardware installation For the required hardware components, please refer to chapter 2.3 and Table 2-3.

Note

In general, the installation guidelines of the individual components have to be observed.

Configuration of the SIMATIC rack For the hardware configuration, please follow the instructions listed in the table below and observe Figure 7-1:
Table 7-1: Hardware installation of the SIMATIC rack

No. 1. 2. 3.

Instruction Use a backplane bus connector to connect the CPU 315 2DP and the SM 374 module. Attach all three components side by side on a suitable rack. Connect the 24V power supply of the CPU to the voltage source (PS 307). Ensure that the polarity is correct. Connect the PS307 source to the network. (230 V alternating current) Connect the CPU to the PROFIBUS network.

4.

The configuration of the CPU can be performed either via PROFIBUS or the MPI.

V 1.0

Issue 10/01/06

47/82

Structure, Configuration and Operation of the Application Installation and Startup


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864
Figure 7-1: Component set of the SIMATIC rack
Backplane bus connector
PS 307 5A CPU315-2 DP
SF ATF DC5V FRCE RUN S TOP RUN S TOP MR ES
S M374 IN/OUT 16

SM 374

SIEMENS

DC 24 V

VOLTAGE S E LE CTOR

x 2 3 4

x 2 3 4

x 2 3 4

24V DC

Profibus network

Configuration of the Allen-Bradley rack


Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

For the hardware configuration, please follow the instructions listed in the table below and observe Figure 7-2:
Table 7-2: Hardware installation of the ControlLogix rack

No. 1. 2. 3. 4.

Instruction Insert the modules side by side into a suitable rack. Ensure the correct order and assignment of the slots (see Table 7-3 )! Connect the PA72B voltage source to the network. (230 V alternating current) Connect the PROFIBUS scanner to PROFIBUS. Connect the CPU to your Allen-Bradley network.

Note

You are free to select your Allen-Bradley network; any network can be used which is supported by the used CPU. This application is completely independent of the existence of an Allen-Bradley network. The configuration of the ControlLogix CPU is performed via the serial port on the front of the housing. The PROFIBUS scanner is also configured via the serial port on the front of the scanner. The order of the modules in the rack must be as follows:

V 1.0

Issue 10/01/06

48/82

Structure, Configuration and Operation of the Application Installation and Startup


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864
Table 7-3: Order of installation of the modules in the Allen-Bradley rack

Slot -0 1 2 3

Module 1756-PA72/B power supply 1756-L1M2 ControlLogix 5500 CPU 1756-IB16D input module 1756-OB 16E output module SST-PFB-CLX-RLL PROFIBUS scanner

Figure 7-2: Component set of the Allen-Bradley rack


Logix 5500
POWER
RUN I/O RS232 BAT OK DIAGNOSTIC
ST 0 FLT 0 ST 8 FLT 8 1 1 9 9

DC INPUT
2 2 3 3 4 4 5 5 6 6 7 7

DC OUTPUT
ST 0 Fuse 0 ST 8 1 1 9 9 2 2 3 3 4 4 5 5 6 6 7 7

SST Profibus SCANNER

COPN
COMM SYS OK

10 11 12 13 14 15 10 11 12 13 14 15

10 11 12 13 14 15 10 11 12 13 14 15

Fuse 8

ELECTRONIC FUSING

RUN

REM

PROG

Allen-Bradley
Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Allen-Bradley network (optional)

Profibus network

Note

Ensure the correct setting of the terminating resistors when cabling the PROFIBUS.

V 1.0

Issue 10/01/06

49/82

Structure, Configuration and Operation of the Application Installation and Startup


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

7.1.2

Installation of the standard software To be able to configure the components, it is required that different standard applications are installed on your PG/PC. If necessary, follow the corresponding installation instructions for these applications.

Table 7-4: Software installations on the field PG/PC

No. 1. 2. 3. 4. Install the SIMATIC Step 7 Manager.

Instruction Install the RSLogix 5000 configuration software for ControlLogix controllers. Install the RSLinx communication software for Allen-Bradley networks. Install the PROFIBUS Configuration Tool for the configuration of the PROFIBUS scanner.

7.2
Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Installation of the application software


The configuration files of the application consist of three packets: One Step 7 project, one configuration for the PROFIBUS scanner and one RSLogix project.
Note

In addition to this guide, please also observe the instruction manuals and online helps of the respective configuration applications!

Table 7-5: Installation and download of the Step 7 project

No. 1.

Instruction Extract the archive of the configuration using the File Retrieve... command of the SIMATIC Manager or unzip the archive with WinZip, FileZip or another compression utility and manually open the project. If necessary, perform a general reset of the CPU and download the project to the CPU 315. Depending on your last operations, make sure to use the correct interface for the download! (MPI or PROFIBUS, setting via the Options Set PG/PC Interface... menu command) Set the CPU to RUN. The SF (group fault) and BF (bus fault) LEDs on the CPU are lit red.

2.

3. 4.

Table 7-6: Installation and download of the PROFIBUS scanner configuration

No. 1.

Instruction If no CPU configuration exists, the LED display of the scanner shows Bckplane OK after turning on. The status LEDs are extinguished except for OK.

Comment
SST Profibus SCANNER

BckP
COMM SYS OK

V 1.0

Issue 10/01/06

50/82

Structure, Configuration and Operation of the Application Installation and Startup


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

No. 2.

Instruction Extract the archive which includes the configuration using WinZip, FileZip or another compression utility. Before the start of the installation, ensure that both the RSLogix application and the RSLinx communication tool are closed. (RSLinx must be separately opened from the command bar by clicking the icon before the Exit and Shutdown command is issued. This possibly requires clicking the icon in the task bar to display all icons.) The serial interface is only enabled for the configuration access by the scanner configuration software after exiting these two programs. Set the function type selector switch on the front of the ControlLogix CPU (red arrow, top right figure) to PROG position. The RUN LED is extinguished.

Comment

3.

RSLinx icon in the Windows task bar

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

4.

Logix 5500
RUN I/O RS232 BAT OK

RUN

REM

PROG

5.

Connect the serial interface of your PG to the configuration interface of the scanner (top jack). Use a null modem cable. (For the wiring, refer to the AllenBradley documentation if necessary. 12.) Start the SST PROFIBUS Configuration Tool from the start menu (Programs SST PROFIBUS PFB SST PROFIBUS Configuration Tool).

6.

12

See /2/, chapter 4.2 (rev. 1.6)

V 1.0

Issue 10/01/06

51/82

Structure, Configuration and Operation of the Application Installation and Startup


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

No. 7.

Instruction Open the desired configuration. Disconnected is displayed as status of the scanner

Comment

8.

Configure the communication by selecting the Browse Network Properties... command from the icon main menu or by clicking the (bottom left window pane). In the Connection section, select the Serial entry to define the connection type between PG and scanner. Select the serial interface via which the null modem cable is connected to the scanner. In Station and Baud Rate, select the address and the connection speed with which the Configuration Tool is to log on on PROFIBUS via the scanner. Ensure that you do not use an already assigned address and that the data rate is the same as the rate of the other bus nodes. Confirm with OK.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

9.

By selecting the Browse Search for Devices command or by clicking icon (bottom left window pane, the see arrow), search PROFIBUS for logged on stations, which are displayed in the bottom window pane after a short period of time. (This step is only for diagnostics and can be skipped.) The example on the right shows a bus node with address 4. (The actual PROFIBUS scanner does not appear during this check.)

10.

If the CPU is in RUN, an error message is displayed if diagnostics is attempted.

V 1.0

Issue 10/01/06

52/82

Structure, Configuration and Operation of the Application Installation and Startup


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

No. 11.

Instruction Select the scanner entry in the system display of the Configuration Tool (right window), open the context menu with the right mouse button and click the Properties entry. In the displayed dialog box, select the COM Channel tab and select the interface via which you configure the scanner. This is usually the interface you have set in step 8. Again, select the scanner module and select the Connect command from the context menu to establish a connection to the scanner.

Comment

12.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

13.

When, after a moment, the connection has been established, select the Load Configuration context menu command to transfer the configuration to the scanner.

14.

Subsequently, select the

icon in

the command bar (see arrow) to switch the scanner online. It will now contact the PROFIBUS network. After a few moments, the status display in the main window of the Configuration Tool changes to Online Program All OK. 15. The SF LED of the SIMATIC CPU is still lit, the BF LED flashes red. The scanner display changes to Data Con Closed, the COMM LED flickers green, the SYS LED is lit amber. The configuration of the PROFIBUS scanner is completed. However, bus faults still exist since the scanner only plays its role as a master on PROFIBUS when it is instructed by its CPU to establish the communication.
SST Profibus SCANNER

Data
COMM SYS OK

16.

V 1.0

Issue 10/01/06

53/82

Structure, Configuration and Operation of the Application Installation and Startup


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

No. 17.

Instruction Close and exit the SST Configuration Tool and remove the serial cable from the configuration interface of the scanner.

Comment

Table 7-7: Installation and download of the RSLogix project

No. 1.

Instruction Extract the file which includes the configuration using WinZip, FileZip or another compression utility. Connect the serial interface of your PG to the configuration interface of the CPU (top jack). Use a null modem cable. (For the wiring, refer to the Allen-Bradley documentation if necessary. 13) Start RSLinx either from the start menu (Programs Rockwell Software RSLinx RSLinx) or by doubleclicking the icon in the task bar. (This possibly requires clicking the icon in the task bar to display all icons.)

Comment

2.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

3.

4.

In RSLinx, select the Communications Configure Drivers... command to configure the communication between PG and ControlLogix CPU. In the subsequently displayed dialog box, select the RS-232 DF1 devices entry in the top list box and click the Add New... button.

13

See /6/, chapter 2 (rev. May 2005)

V 1.0

Issue 10/01/06

54/82

Structure, Configuration and Operation of the Application Installation and Startup


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

No. 5.

Instruction Configure the serial connection by selecting the interface used on the PG and the involved CPU. (In this application, this should be Device Logix 5500/CompactLogix.) Click the Auto-Configure button to have the fine tuning of the serial connection automatically negotiated between CPU and PG. After a few moments, the connection should have been successfully established. If this is not the case, check the correct fit and the correct wiring of the serial cable (notes on the wiring are included in the Allen-Bradley documentation) and the availability of the serial interface. Use the Communications RSWho command or the icon in the command bar to display the modules you can access via the currently selected path (i.e. the serial connection to the CPU).

Comment

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

6.

7.

Close RSLinx using the Exit command or leave it oven, however, do not terminate the program with the Exit and Shutdown command. Open your RSLogix application and dowload the configuration. (File Open...) Select the path via which RSLogix is to communicate with the CPU. (Communications Select Recent Path...) Select the path you also have configured via RSLinx. Click the Close button or go online with the following step.

8.

9.

V 1.0

Issue 10/01/06

55/82

Structure, Configuration and Operation of the Application Installation and Startup


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

No. 10.

Instruction Establish a connection to the CPU. This can be done as long as the Select Recent Communications Path dialog box is opened by clicking the Go Online button. As an alternative, you can use the Communications Go Online main menu command. A third option is the context menu, which can be opened using the left mouse button in the Offline box in the top left status section of the main window. (See figure) After a few moments, the connection has been established. The display in the status section of the main window changes (see figure) and the RS232 LED on the CPU starts flashing rapidly.

Comment

11.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Top: No connection established bottom: RSLogix is online.

12.

If the configuration of the CPU does not correspond to the configuration loaded in the PG (which is highly probable), this will be indicated by a warning message. Click the Download button to transfer the configuration from the PG to the CPU.

13.

To be able to download the configuration, ensure that the function type selector switch on the front of the CPU is set to REM (remote, see figure step 11 below) or PROG (programming, see figure on the right). The download starts and the progress is displayed in a dialog box.

14.

V 1.0

Issue 10/01/06

56/82

Structure, Configuration and Operation of the Application Installation and Startup


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

No. 15.

Instruction After completing the download, the I/O LED on the ControlLogix CPU is lit green. The message in the status window of the scanner changes to COPN (channel open, figure on the right) and the SYS LED on the scanner is still lit amber. The BF LED on the SIMATIC controller is extinguished. After completing the download, reset the CPU to RUN mode using the function type selector switch. (This can also be performed from RSLogix.) The SYS LED on the scanner is now lit green. When this occurs, the connection between the two CPUs has been established and the data exchange starts. In this case, the configuration has been successfully completed. If this is not the case, the scanner first has to be set to Run mode. To do this, use the left mouse button to open the context menu in the No Forces section and select the I/O Forcing Enable All I/O Forces command. This enables you to change the value of the individual operating variables during runtime.

Comment
SST Profibus SCANNER

COPN
COMM SYS OK

16.

17.
Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

SST Profibus SCANNER

COPN
COMM SYS OK

18.

V 1.0

Issue 10/01/06

57/82

Structure, Configuration and Operation of the Application Installation and Startup


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

No. 19.

Instruction Open the global variables table of the ControlLogix CPU by double-clicking the Controller ControlLogix Controller Tags entry in the left column of the screen.

Comment

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

20.

In the tree structure of the Controller Tags window, open Local:3:O Local:3:O.Data. If the values for the entries Local:3:O.Data[1] and Local:3:O.Data[0] are 0, the scanner is stopped.

21.

In this case, set the values for the entries Local:3:O.Data[1] and Local:3:O.Data[0] to 1 in this order and confirm both inputs by pressing Return. After completing these operations, the scanner establishes the connection via PROFIBUS.

22.

V 1.0

Issue 10/01/06

58/82

Structure, Configuration and Operation of the Application Installation and Startup


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Note

Please observe that steps 3 to 6 only have to be performed if you configure the system for the first time or if the hardware configuration has changed.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

V 1.0

Issue 10/01/06

59/82

Structure, Configuration and Operation of the Application Configuration


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Configuration
... how you can modify a configuration by means of which the communication between the CPUs can be established via PROFIBUS scanner. The instructions show you the essential steps you have to perform to create your own project and to make it executable or to adapt an existing project to your requirements.

You are provided with information on

8.1

Configuring the SIMATIC configuration

Inserting additional bus nodes (master scanners or slaves) Following the instructions below, you configure your slave CPU in such a way that it is prepared for the communication with other masters on PROFIBUS (in our case the SST PROFIBUS scanner).
Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Table 8-1: Method for inserting additional bus nodes (SIMATIC configuration)

No. 1.

Instruction Open the project and start the NetPro network configuration (Options Configure Network...)

Comment

2.

In the right part of the opened window, navigate to the Stations folder; select Other Station and use drag & drop to place an instance of it in the main window. If the catalog is not on your desktop, you can activate its display by selecting the View Catalog main menu command.

V 1.0

Issue 10/01/06

60/82

Structure, Configuration and Operation of the Application Configuration


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

No. 3.

Instruction Open the context menu of the station with a right mouse click and select the Object Properties... command.

Comment

4.

In the opening Properties dialog box, select the Interfaces tab and then the New... button.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

5.

Select PROFIBUS as interface type Type: and confirm with OK.

6.

In the opening Properties dialog box, select the Parameters tab. Select the PROFIBUS(1) entry and in Address:, select an address which has not already been assigned on the bus and which is in the permissible address range. Use the Properties... button to configure further details.

V 1.0

Issue 10/01/06

61/82

Structure, Configuration and Operation of the Application Configuration


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

No. 7.

Instruction In the second Properties dialog box, you can set further bus parameters in the Network Settings tab. Ensure that Transmission Rate and Profile correspond to the bus parameters of the other bus nodes.

Comment

8.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Select the Bus Parameters... button to display an additional dialog box in which you can read timing parameters of the bus. This is relevant for the integration of bus nodes which are not configured via the SIMATIC Manager. Incompatible timing parameters can cause a termination of the communication. With regard to the details of the PROFIBUS configuration, please refer to the corresponding documentation.

9.

Confirm your changes with OK. The new station is connected to PROFIBUS in NetPro.

V 1.0

Issue 10/01/06

62/82

Structure, Configuration and Operation of the Application Configuration


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

No. 10.

Instruction Compile the changed configuration (Network Save and Compile... menu command) and download it to the controller (select CPU in the main window, PLC Download to Current Project Selected Stations menu command, see figure on the right). To check whether your configuration is consistent, use the Network Check Consistency command.

Comment

Note
Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Please observe that the changes made here have to be adapted in the ControlLogix configuration!

Inserting additional data modules The data modules are the packets which are exchanged between master and slaves. The master exchanges one or several data modules with each slave; these modules can comprise a maximum of 32 bytes of data. The configuration of the modules must be matched to one another and performed in master and slave. Details on the principle of the exchange mechanism are described in chapter 4.1.

V 1.0

Issue 10/01/06

63/82

Structure, Configuration and Operation of the Application Configuration


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864
Table 8-2: Inserting additional data modules into the SIMATIC configuration

No. 1.

Instruction Use the SIMATIC Manager to open the project you want to edit. Double-click the Hardware entry in the main window to call the hardware configuration. 14 In the opened hardware configuration, select the entry of your DP module in the top or bottom part of the window, activate the context menu with the right mouse button and select the Object Properties... command.

Comment

2.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

3.

In the opening Properties dialog box, four tabs are available. In the General tab, you adjust general properties of the DP module such as the name or the interfacing to PROFIBUS (Properties... button).

4.

The Addresses tab allows setting the memory address under which the DP module provides diagnostic information such as the communication status. The configuration of the data modules does not require changes in this tab.

14

The data modules are considered as virtual I/O modules in the hardware configuration.

V 1.0

Issue 10/01/06

64/82

Structure, Configuration and Operation of the Application Configuration


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

No. 5.

Instruction In the Operating Mode tab, the communication mode must be set to DP slave. Test, commissioning, routing should not be selected. This option is only advisable if the other bus nodes are to be configured via the CPU. The reservation of this service functionality, however, causes a reduction of the bus performance. The default settings of the diagnostic addresses can be left as they are.

Comment

6.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

In the Configuration tab, existing data modules can be changed or deleted and new data modules can be created. Select an existing data module and click the Edit... button to configure this module or select the New... button to create a new module. In both cases a further dialog box opens with which you can parameterize the properties of the data module. For the details, see Table 8-3.

7.

8.

Confirm your changes with OK, close the dialog boxes, compile and save the changed configuration and download it to the CPU.

V 1.0

Issue 10/01/06

65/82

Structure, Configuration and Operation of the Application Configuration


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864
Table 8-3: Meaning of the parameters in the Properties dialog box of the data modules

Parameter Address type Address

Meaning Determines whether the module is an Input module (data are transferred from scanner to SIMATIC CPU) or an Output module (data are transferred from slave to scanner). 15 Determines the start address of the data module in the input or output range of the slaves process image. The value specified here is the lowest address from which is read or to which is written. The data modules must not overlap. Specifies the size of the data module in multiples of length and selected unit (see below). Determines the base quantity of the transferred data, which is either Byte or Word. 16 Decides whether the consistent transfer is ensured for each individual Unit (thus byte or word) or for the complete module (All).

Length Unit Consistency

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

The CPU can now access the data module in the input or output memory range under the value specified in Address.
Note

The address ranges assigned to the data modules must neither overlap with one another, nor with the addresses of the physically existing I/O modules since otherwise conflicts occur. Consistent transfer of data modules with a size of 3 or more than 4 bytes requires firmware version 3 or higher of the used CPU.

Note

8.2

Configuring the ControlLogix CPU


If further PROFIBUS scanners are to be inserted into the Allen Bradley rack or if an existing scanner module is to reconfigured, perform the following steps:

Please observe that an input module on the slave must correspond to an output module on the scanner and vice versa. 16 A value of 10 for Length and a selection of Word as Unit thus causes a size of the data module of 10 Units 2 Byte/Unit = 20 Bytes.

15

V 1.0

Issue 10/01/06

66/82

Structure, Configuration and Operation of the Application Configuration


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864
Table 8-4: Inserting further PROFIBUS scanners

No. 1.

Instruction Start the RSLogix configuration software and open the configuration you want to edit. In the structure overview in the left part of the window, select the I/O Configuration entry; use the right mouse button to call the context menu and select the New Module... command.

Comment

2.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

In the displayed dialog box, you see a list of all available hardware modules. You can filter the actually displayed modules with the aid of the settings at the bottom of the dialog box. Select the 1756 MODULE entry.

3.

In the opened dialog box, you must assign a name for the module (Name box) and you can perform the further basic configuration. In the Slot box, enter the slot in which you physically install the module. The Size boxes indicate the overall scope of the input or output and status ranges of all data modules. The relevant values are listed in the documentation of your PROFIBUS scanner. In the Connection tab, in the Requested Packet Interval (RPI) box, assign the spacing of the intervals within which the data modules are to be exchanged via PROFIBUS. This value must be between 200 s and 750 ms. Please observe that the value has to be identical with the value specified in Table 8-5, step 6, to ensure correct communication.

4.

V 1.0

Issue 10/01/06

67/82

Structure, Configuration and Operation of the Application Configuration


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

No. 5.

Instruction Confirm your changes with OK, save the updated configuration and download it to your CPU as usual.

Comment

Note

The actual parameterization of the scanner as a bus node and for the data exchange (i.e. the definition of the data modules) has to be performed on the actual scanner, see chapter 8.3.

8.3

Configuring the SST PROFIBUS scanner

Configuring an SST PROFIBUS scanner as a master


Table 8-5: Configuring the SST PROFIBUS scanner as a PROFIBUS master

No.
Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Instruction Start the SST PROFIBUS Configuration Tool.

Comment

1.

2.

Either open an already existing project from the main menu by selecting File Open... or create a new one with File New. In the first step of a new project, you define a master for your PROFIBUS which switches the communication between Allen-Bradley CPU and SIMATIC CPU. In the left window pane, navigate through the available modules and select the desired card. When you are using the SST PROFIBUS scanner, SST-PFB-CLX MASTER is the correct selection. 17

3.

17

PFB-CLX is the abbreviation of PROFIBUS-ControlLogix.

V 1.0

Issue 10/01/06

68/82

Structure, Configuration and Operation of the Application Configuration


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

No. 4.

Instruction A double-click opens a dialog box for the parameterization of the master. In the General tab, you assign a name, a description and a Station bus address . The master communicates on PROFIBUS under this address.

Comment

5.

In the Parameters tab, timing parameters for the bus communication can be set. In general, the default values can be used.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

6.

In the CLX Options tab, the parameters for the bus communication are defined. The Input Data Type or Output Data Type boxes determine the alignment of the data to be transferred at byte, word or doubleword limits in your data module. The alignment at larger units may result in the data module being prematurely occupied by filler bytes. In Requested Periodic Interval Rate, the interval between two updates of the data modules is specified. Please observe that this value has to be identical with the value specified in Table 8-4, step 4, to ensure correct communication. In the COM Channel tab, settings for the configuration interface are made via which the configuration is transferred to the scanner. Select the interface via which you connect the scanner to the PG.

7.

V 1.0

Issue 10/01/06

69/82

Structure, Configuration and Operation of the Application Configuration


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

No. 8.

Instruction Confirm your settings with OK and save the project.

Comment

9.

Follow Table 7-6 from step 4 to download the changed configuration to your scanner module.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Note

At this time, a functionality is not yet stored in the scanner. You first have to configure the slaves (Table 8-6) and the data modules to be transferred to the slaves (Table 8-7).

Configuring new slaves (SIMATIC CPUs)


Note

The configuration of a SIMATIC CPU as a slave requires a GSD file, which includes information on the CPUs communication capabilities. A GSD file for the CPU315-2DP is already included in the scope of this application; updated GSD files and files for other devices are available via the Siemens automation portal \2\.

Table 8-6: Configuration of the SST PROFIBUS scanner for the communication with several slaves

No. 1.

Instruction Start the SST PROFIBUS Configuration Tool and open a project in which you have already configured a scanner as a PROFIBUS master. (For the respective steps, refer to Table 8-5)

Comment

V 1.0

Issue 10/01/06

70/82

Structure, Configuration and Operation of the Application Configuration


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

No. 2.

Instruction In the main menu, select the Library Add GSD command. Once imported into the library, a GSD file is subsequently available to all projects you edit with the SST PROFIBUS Configuration Tool.

Comment

3.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

In the opening dialog box, navigate to the GSD file of the device you want to configure as a scanner and select the Open button. Each device is delivered with several different GSD files which support different user languages. They differ in the last letter of the file name extension.

4.

Subsequently, the CPU is available as a slave module in a Siemens folder in the configuration window of the configuration software (left window pane).

5.

Use drag & drop or a double-click on the CPU entry to insert it into the project as a slave. A configuration dialog box opens. Aside from the selection of a module name, the Station box is also important in the General tab. In Station, the PROFIBUS address is assigned via which the scanner will attempt to communicate with the slave.

V 1.0

Issue 10/01/06

71/82

Structure, Configuration and Operation of the Application Configuration


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

No. 6.

Instruction In the Module tab, you configure data modules for the communication with this slave. For the details of the configuration, follow the steps of Table 8-7 below. (The other tabs of the dialog box, from Address to Diagnostics, are usually not of importance.)

Comment

7.

After configuring the desired modules, save the project and download it to the PROFIBUS scanner. Compare Table 7-6 from step 4.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Communication via several data modules


Table 8-7: Configuration of the SST PROFIBUS scanner for the exchange of several data modules

No. 1.

Instruction After having performed the instructions of Table 8-6 up to and including step 6, click the Add button to generate a new data module. Select Remove to delete an existing module or Properties to edit an existing module. The bottom right section of the dialog box shows statistics indicating the remaining resources for the configuration of the scanner module. A sub-dialog box is displayed from which you can select the desired data modules. Please observe that it is first required to configure three modules with Kennung generell, which correspond to the slots in the SIMATIC rack physically occupied by the power supply and the actual CPU. Compare chapter 5.4 and the note on page 43.

Comment

2.

V 1.0

Issue 10/01/06

72/82

Structure, Configuration and Operation of the Application Configuration


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

No. 3.

Instruction After inserting the blank modules, you can select the actual data modules. In the default module description, data flow direction and data volume are encrypted, see Figure 8-1 (page. 74).

Comment

4.

After generating the data modules, select them in the Module dialog box and open a Properties dialog box by clicking the Properties button.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

5.

In the Properties dialog box, you can adapt name and description of the module (different from the default settings). In addition, you can specify the position of the range written to or read by the module in the slave in the Position box. (This is not a memory area address but the slot occupied by the module.) In the bottom right part of the dialog box, the size of the data module is indicated in input (Input) or output (Output) bytes. In the process image of the ControlLogix CPU, the data modules are stored in the order in which they are displayed in the Module Overview dialog box (step 4). The bytes 0-3 in the input or output range are reserved for the communication between CPU and scanner, the data modules are located from address 4. (Compare Table 3-3, page 30) If a different offset is to be used, this can be done in the Address tab of the module overview. You can select an offset (in bytes) for all data modules of the scanner by selecting the Module Offset checkboxes and entering a corresponding value.

6.

V 1.0

Issue 10/01/06

73/82

Structure, Configuration and Operation of the Application Configuration


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

No. 7.

Instruction Confirm your changes with OK, save the project and download it to the PROFIBUS scanner.

Comment

Description of the data modules (Table 8-7, step 3) The description of the data modules includes information on data flow, data volume and data consistency.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

V 1.0

Issue 10/01/06

74/82

Structure, Configuration and Operation of the Application Configuration


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864
Figure 8-1: Composition of the data module description (example)

Master_E Slave_A 16Wo Einheit


Data flow Volume Cons.

Data flow: Master_E Slave_A: Input on the scanner (master), output on the slave (SIMATIC) Master_A Slave_E: Output on the scanner (master), input on the slave (SIMATIC)


Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Volume: Quantity of the exchanged data in bytes (By) or words (Wo)

Consistency: Einheit [unit]: Consistency over the unit (byte or word) g.Laenge [overall length]: Consistency over the overall length of the module

Thus, the module in the above example reads 16 words from the slave into the inputs of the master. Consistency is only ensured over the individual words.

Note

You can also edit the data modules at any other time by selecting the SIMATIC CPU as a slave in the SST PROFIBUS Configuration Tool and calling the context menu using the right mouse button.

Use the Properties command to go to the configuration dialog box in which you can make the changes in the Modules tab as specified in Table 8-7.

V 1.0

Issue 10/01/06

75/82

Structure, Configuration and Operation of the Application Operation of the Application


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Operation of the Application


how to operate all functions of this application.

You are provided with information on

Overview There is no HMI configuration for the operation of the application. The task of the application is the cyclic exchange of two data packets of which one is sent from the Allen-Bradley CPU to the CPU 315 while the other packet takes the opposite way. Visible functionalities The following functionalities are visible to the user: 1. A cycle counter of the Allen-Bradley CPU is displayed in the low-order byte of the outputs of the output module in slot 2. The value is sent to the SIMATIC CPU and displayed in the output byte of the SM 374. 2. The switch states of the inputs of the SM 374 (bottom group) are displayed in the high-order output byte of the Allen-Bradley output module. The states of the inputs and outputs of the SM 374 are also displayed in their two LED bars. The incrementing counter contents have to be displayed as changing LEDs in both racks. Changes of the switch position of the SM 374 cause display changes on the Allen-Bradley output module.
Note

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Please observe that the mode selector switch on the front of the SM 374 must be set to the 8 Output, 8 Input position. (Red straight arrow, Figure 9-1)

V 1.0

Issue 10/01/06

76/82

Structure, Configuration and Operation of the Application Operation of the Application


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864
Figure 9-1: Functionality of the configuration
SM 374 IN/OUT 16
0 1 0 1 2 3 4 5 6 7
S M374

DC OUTPUT

ST 0 Fuse 0 ST 8 Fuse 8

1 1 9 9

2 2

3 3

4 4

5 5

6 6

7 7

10 11 12 13 14 15 10 11 12 13 14 15

ELECTRONIC FUSING

16 x Output 8x Output 8x Input 16 x Input

x 2 3 4

0 1 2 3 4 5 6 7

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

SIMATIC

Allen-Bradley

n: Transferring the counter content from Allen-Bradley to SIMATIC, o: transferring the switch positions (only bottom group of eight) from SIMATIC to Allen-Bradley Detailed real-time information on all exchanged data can be read in the SIMATIC variable table or the Controller Tag view of the RSLogix software. Further variables In addition, the states of the inputs of the input module in slot 1 of the AllenBradley rack and several status variables of the PROFIBUS scanner (see chapter 5.1) are transferred to a SIMATIC data block where they can be further processed. No direct operator controls and displays are available for these variables. Variable tables Variable tables as shown in Figure 9-2 provide the best impression of the actual communication sequence. The data block sent from the CPU 315 to the ControlLogix controller is displayed in orange, the block taking the opposite way is displayed in green. The left section of the screen displays the Controller Tags view of RSLogix, the right section shows the variable table of the S7 project.

V 1.0

Issue 10/01/06

77/82

Structure, Configuration and Operation of the Application Operation of the Application


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864
Figure 9-2: Screen shot of the variable tables in RSLogix (left) and SIMATIC (right)

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Details of the transfer mechanism become clear when the individual sections of the variable tables are arranged side by side:
Figure 9-3: Transfer path of the variables from the SIMATIC to the ControlLogix CPU

The arrangement of the variables in the data block of the S7 configuration is shown at the top right of the figure, a section of the RSLogix variable

V 1.0

Issue 10/01/06

78/82

Structure, Configuration and Operation of the Application Operation of the Application


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

table can be seen below. This section represents the input range into which the data module received by the S7 is mapped. (The representation is performed word by word, the words 0 and 1 are status variables of the connection, not net data!) At the top left of the figure, the user-defined data structure in the ControlLogix CPU is shown into which the data received by the S7 were copied. It becomes clear that the arrangement of the elements switches and status is reversed in the course of the transfer. These reversions occur when data types other than Int are transferred and are due to the nature of the different word arrangements of the two controllers (compare chapters 4.2 and 5.1). Ideally, you experiment with the individual variables by forcing them to take new values. Pay particular attention to the results of variables which consist of more or less than one word!

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

V 1.0

Issue 10/01/06

79/82

Appendix and Literature Troubleshooting


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Appendix and Literature


10 Troubleshooting
It is required that you have selected the correct configuration interface in the SIMATIC Manager. (Options Set PG/PC Interface...) Ensure that, e.g. after the general CPU reset, a connection via PROFIBUS is not possible, etc. A contacting via PROFIBUS no longer occurs after restarting the Allen-Bradley CPU. If a voltage cutoff occurs, the ControlLogix 5500 CPU stores its programming only with the aid of its battery. If no battery is installed or if it is dead (red BAT LED on the CPU is lit), the configuration no longer exists after a restart. Download the configuration once again. Either replace the battery or avoid a voltage cutoff on the CPU. A new configuration is not applied by the PROFIBUS scanner after downloading. (ControlLogix in RUN) The behavior on the bus does not change due to the download. The PROFIBUS scanner can only be reconfigured if the associated ControlLogix CPU is in STOP. This requires that the function type selector switch on the CPU front is in the REM (remote) or PROG (programming) position.
Note

The download of the S7 configuration to the SIMATIC CPU cannot be completed.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

When this problem occurs, the PROFIBUS Configuration Tool does not display an error message during the attempted download!

A new configuration is not applied by the PROFIBUS scanner after downloading. (ControlLogix in STOP). If the serial configuration interface of the scanner is open while the ControlLogix CPU is set to RUN, a permanent blocking of the configuration interface may occur. The interface is only enabled if the scanner is restarted. (Voltage cutoff on the rack.) Please note that the CPU configuration may be lost. (See above.)
Note

When this problem occurs, the PROFIBUS Configuration Tool does not display an error message during the attempted download!

V 1.0

Issue 10/01/06

80/82

Appendix and Literature Literature


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

I receive a cryptic error message when attempting to contact the PROFIBUS scanner (see below)
Figure 10-1

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

This is an error which is not correctly caught by the SST PROFIBUS Configuration software; it is caused by the attempt to contact the scanner although the CPU was in RUN. Interrupt the power supply of the Allen-Bradley rack at least until the display LEDs on the front are extinguished; subsequently, switch the devices on again. Then again try to establish a connection to the scanner. Since the interface was blocked by the attempted contacting, it is not sufficient to set the CPU to STOP!

11
11.1

Literature
Bibliographic references
This list is by no means complete and only provides a selection of appropriate sources.
Table 11-1: Literature on the application

Topic /1/ STEP7

Title Automating with STEP7 in STL and SCL Hans Berger Publicis MCD Verlag ISBN 3-89578-113-4 SST-PFB-CLX-RLL User Reference Guide, PROFIBUS scanner instruction manual, Allen-Bradley document # 715-0022 Application Kommunikation zwischen SIMATIC-CPUs und Allen-Bradley-Peripheriekomponenten mittels Anybus-Gateways [Communication between SIMATIC CPUs and Allen-Bradley I/O Components Using Anybus Gateways] (Entry ID 23902276, fall 2006) Configuration Communication with Automation Systems (Entry ID 20982954)

/2/

PROFIBUS scanner Communication via Anybus gateways

/3/

/4/

Basics SIMATIC communication

V 1.0

Issue 10/01/06

81/82

Appendix and Literature Literature


Comm. with Third-Party Contr. (Allen-Bradley) ID No.: 23809864

Topic /5/ CPU-CPU communication via PROFIBUS DP Allen-Bradley ControlLogix controllers manual Communication via Echochange gateways

Title Application Direct Data Exchange between separate DP Systems via DP Communication (Entry ID 20987807) Allen-Bradley ControlLogix Controllers User Manual, Publication ID 1756-UM001F-EN-P Selection aid INAT Echochange-Modul zur Verbindung von Allen-Bradley-Ethernet/IP-Netzen mit TCP/IP-Netzen [INAT Echochange Module for the Connection of Allen-Bradley Ethernet/IP Networks with TCP/IP Networks] (Entry ID 23901499, fall 2006)

/6/

/7/

11.2

Internet links
This list is by no means complete and only provides a selection of appropriate websites.

Copyright Siemens AG 2006 All rights reserved 23809864_AB_ProfibusScanner_DOKU_V10_e.doc

Table 11-2: Web links on the application

Topic \1\ \2\ \3\ \4\ Reference to the entry Siemens A&D Customer Support Allen-Bradley website Rockwell Automation website Woodhead website Anybus product description INAT GmbH website

Title http://support.automation.siemens.com/WW/view/en/23809864 http://www.ad.siemens.de/support http://www.ab.com http://www.rockwellautomation.com

\5\ \6\ \7\

http://www.woodhead.com http://www.hms-networks.de/Technologies/whatisanybus.shtml http://www.inat.de

V 1.0

Issue 10/01/06

82/82

You might also like