You are on page 1of 50

Profibus Getting Started User's Manual

Version: Model No.: 1.00 (July 2006) MAPBGETST-ENG

We reserve the right to change the contents of this manual without warning. The information contained herein is believed to be accurate as of the date of publication; however, Bernecker + Rainer Industrie-Elektronik Ges.m.b.H. makes no warranty, expressed or implied, with regards to the products or the documentation contained within this book. In addition, Bernecker + Rainer Industrie-Elektronik Ges.m.b.H. shall not be liable in the event of incidental or consequential damages in connection with or resulting from the furnishing, performance, or use of these products. The software names, hardware names, and trademarks used in this document are registered by the respective companies. Profibus Getting Started User's Manual V 1.00 1

Profibus Getting Started User's Manual V 1.00

Chapter 1: General information

Chapter 2: SIMATIC Manager

Chapter 3: B&R Fieldbus Configurator

Figure index

Table index

Index
Profibus Getting Started User's Manual V 1.00 3

Profibus Getting Started User's Manual V 1.00

Table of contents

Chapter 1: General information ....................................................... 7


1. Manual history ...................................................................................................................... 7 2. Integration of Profibus DP bus controllers ............................................................................ 8 2.1 X20 Profibus DP bus controller ....................................................................................... 8 2.2 X67 Profibus DP bus controller ....................................................................................... 8 3. GSD file ................................................................................................................................ 9 4. B&R BC Profibus GSD User's Manual ................................................................................ 10 5. B&R BC Profibus Design Tool ............................................................................................ 10

Chapter 2: SIMATIC Manager ........................................................ 13


1. Siemens SIMATIC software ................................................................................................ 2. Requirements ..................................................................................................................... 2.1 Software ........................................................................................................................ 2.2 Hardware ....................................................................................................................... 2.3 Project environment ...................................................................................................... 2.3.1 Creating a new project manually ............................................................................. 3. Installing the GSD file ......................................................................................................... 4. Integration of Profibus DP bus controllers .......................................................................... 5. X2X Link extension ............................................................................................................. 5.1 Configuring the I/O modules .......................................................................................... 5.2 Variable assignments .................................................................................................... 6. Downloading the Configuration ........................................................................................... 7. Controlling the modules ...................................................................................................... 13 13 13 13 13 14 17 19 21 22 23 23 23

Chapter 3: B&R Fieldbus Configurator ......................................... 25


1. Introduction ......................................................................................................................... 2. Integrating the GSD file ...................................................................................................... 2.1 User interface ................................................................................................................ 2.2 Directory structure ......................................................................................................... 2.3 Viewing the GSD file ..................................................................................................... 3. Creating a Profibus DP configuration ................................................................................. 3.1 Inserting a master .......................................................................................................... 3.1.1 Master configuration ............................................................................................... 3.2 Bus parameters ............................................................................................................. 3.3 Inserting a slave ............................................................................................................ 3.3.1 Slave Configuration ................................................................................................. 3.3.2 Parameter data ....................................................................................................... 3.3.3 DPV1 parameter ..................................................................................................... 4. Online connection ............................................................................................................... 4.1 Downloading the created configuration ......................................................................... 4.2 Result of the configuration ............................................................................................. 4.3 Controlling the modules ................................................................................................. 5. Project configuration in Automation Studio ......................................................................... 5.1 Requirements in Automation Studio .............................................................................. 5.2 Communication profile ................................................................................................... 25 25 25 25 26 28 28 29 31 31 33 34 36 37 38 38 38 39 39 39

Profibus - Getting Started User's Manual V 1.00

Table of contents 5.3 Creating a BR module ................................................................................................... 5.4 Inserting a BR module ................................................................................................... 5.5 Configuration of a B&R Profibus DP bus controller ....................................................... 5.5.1 Initialization ............................................................................................................. 5.5.2 I/O data traffic ......................................................................................................... 5.6 Transferring project to controller ................................................................................... 40 41 41 42 43 44

Profibus - Getting Started User's Manual V 1.00

General information Manual history Chapter 1 General information 7

Chapter 1 General information


1. Manual history
Version 1.00 Date July 2006 Comment First version

Table 1: Manual history

Profibus - Getting Started User's Manual V 1.00

General information Integration of Profibus DP bus controllers

2. Integration of Profibus DP bus controllers


The purpose of this Getting Started document is to describe the integration of B&R Profibus DP bus controllers as slaves in Profibus master systems. This includes integrating them in a Siemens SIMATIC environment as well as an example project created with the B&R Fieldbus Configurator. The range of B&R Profibus DP bus controllers includes modules from the X67 and X20 systems. All B&R Profibus DP bus controllers support X2X Link. The main goal here is to decentralize the backplane of a rack system. The cable replaces the backplane that connects all of the modules. Directly connected X20, X67 and XV modules can be arranged in intervals of up to 100 m past the confines of the switching cabinet.

2.1 X20 Profibus DP bus controller


The X20 Profibus DP bus controller X20BC0063 makes it possible to connect X2X Link I/O nodes to the Profibus DP. It supports Profibus DP with all of its options and other additional properties. In addition to the device diagnostics, module diagnostics, and channel diagnostics provided with the Profibus standard, it is also possible, for example, to switch to the slot diagnostics option in S7 format. X20 or other modules that are based on X2X Link can be connected to the bus controller. For a detailed description of the X20BC0063, including a list of required accessories, refer to the User's Manual for that particular module. Technical details are listed in the corresponding data sheet.
Model number X20BC0063 Short description X20 bus controller fieldbus interface, 1 Profibus DP interface, status indicator LEDs, 9-pin DSUB connection Image

Table 2: X20 Profibus DP bus controller

2.2 X67 Profibus DP bus controller


In addition to the characteristics already named in reference to the X20 bus controllers, the X67 Profibus DP bus controller X67BC6321 has an additional latch function for very fast events that can be scanned using digital mixed modules. The two additional variants of the X67BC6321 module, identified by the extension at the end of the name (X67BC6321.L08 and X67BC6321.L12), differ with regard to the number of digital channels and type of connections. For more detailed information regarding the product and its configuration options, refer to the User's Manual or data sheet for the module.

Profibus - Getting Started User's Manual V 1.00

General information GSD file Chapter 1 General information 9 The following table presents an overview of the various X67 Profibus DP bus controllers.
Model number X67BC6321 Short description X67 Profibus DP bus controller, X2X Link supply 3 W, 8 digital channels can be configured as input or output, 24 VDC, 0.5 A, configurable input filter, 2 event counters 20 kHz, LED status indicators Image

X67BC6321.L08

Profibus DP bus controller, X2X Link supply 15 W, 16 digital channels can be configured as inputs or outputs, 24 VDC, 0.5 A, configurable input filter, 2 event counters 50 kHz, M8 connectors, LED status indicators

X67BC6321.L12

Profibus DP bus controller, X2X Link supply 15 W, 16 digital channels can be configured as inputs or outputs, 24 VDC, 0.5 A, configurable input filter, 2 event counters 50 kHz, M12 connectors, LED status indicators

Table 3: X67 Profibus DP bus controller

The following refers to Profibus DP bus controllers in general. The variants are only discussed with respect to actual variations in the creation of the project.

3. GSD file
For successful integration of a B&R Profibus DP bus controller in the Engineering Tool, the corresponding GSD file must be imported. The GSD files for the modules listed above are available on the B&R homepage (www.brautomation.com) Entering a model number or serial number under "Product Search" brings up the corresponding product information. The download area for each module has a link to the GSD Package. This contains a number of graphic files, the "B&R BC Profibus GSD User's Manual", and the "B&R BC Profibus Design Tool", in addition to the necessary GSD file. Before you download the file, you can select a version number (e.g. V2.18). When integrating a Profibus controller in another engineering tool for the first time, it is recommended to use the highest available version. Profibus - Getting Started User's Manual V 1.00

General information B&R BC Profibus GSD User's Manual It is not necessary to update a previously integrated GSD file, since using a newer GSD file might require the latest firmware. A firmware update cannot be performed by the user. After extracting the compressed file, the GSD file can be found in the "Import" folder.

Figure 1: Downloading the GSD file

4. B&R BC Profibus GSD User's Manual


The B&R BC Profibus GSD User's Manual contains more detailed information about GSD files. This includes a more in-depth explanation of the above mentioned version dependencies and firmware versions. In addition to instructions for installing the GSD file, it also contains instructions for configuring the bus controller and I/O modules. Furthermore, the manual also contains explanations of various diagnostic options and detailed register descriptions.

5. B&R BC Profibus Design Tool


The B&R BC Profibus Design Tool makes it possible to test the feasibility of potential bus configurations. After selecting the bus controller, the local I/O, and the X2X cycle time, all conceivable variations of the connected I/O modules can be configured. If the combination entered is technically feasible, the status indicator will read "Ok". The total number of modules selected is listed in parentheses. The bus controller itself is counted automatically, so at least one module is always configured. If there are conflicts in the configuration, the status indicator reads "Parameter frame too big (Profibus DP Standard)". The X2X cycle time input field has a selection of times from 200 s to 1 ms. The desired number of I/O modules can be entered in the gray "Used" column. The order of I/O modules on the bus is irrelevant here; only data related to power is relevant. X67 supply modules (X67PS1300) cannot be configured, and do not need to be, since as purely electronic modules for power supply they do not carry any I/O data traffic. All other modules

10

Profibus - Getting Started User's Manual V 1.00

General information B&R BC Profibus Design Tool Chapter 1 General information require an entry. To make the configuration process as simple as possible, the "Available" column lists the maximum possible number of each module. It is dynamic, and is automatically updated after every entry. When you have selected the X20BC0063, the only local I/O available is the required X20PS9400. This is not the case with the X67 bus controllers. For these modules, there are several local I/Os to select from. They are are identified by the extension "-CO1, -CO2,..." at the end of their name. This describes the register assignment in the module, and is described in the B&R BC Profibus GSD User's Manual. If no selection is made here, the value suggested by the Design Tool can be used. The following image shows a section of the B&R BC Profibus Design Tool.

Figure 2: Section of the B&R BC Profibus Design Tool

Profibus - Getting Started User's Manual V 1.00

11

General information B&R BC Profibus Design Tool

12

Profibus - Getting Started User's Manual V 1.00

SIMATIC Manager Siemens SIMATIC software

Chapter 2 SIMATIC Manager


1. Siemens SIMATIC software
Much of the following information can also be found in the manual "SIMATIC, Configure Hardware and Connections with STEP 7" for the SIMATIC STEP 7 software from Siemens. This is available free from the documentation area under the address http://www.automation.siemens.com. The screen shots seen here were also created using the SIMATIC software from Siemens.

2. Requirements
2.1 Software
For an engineering tool, the SIMATIC STEP7 V5.4 software package from SIEMENS is used. The following screen shots are taken from this version. The B&R Profibus DP bus controllers can also be used with older software versions without problems, however. There may be differences in the layout of the user interface, but the menu structure has mainly been kept the same. There should be no problems integrating the bus controllers using this document as a reference.

2.2 Hardware
A Profibus master is required in order to use any of the B&R Profibus DP bus controllers. For an example configuration, we selected a SIMATIC S7-300 station with the CPU315-2DP. It takes the role of the Profibus master, and serves as the starting point for the integration. In order to program the CPU and access it for diagnostics, an online connection is required. Configuration options for the programming interface, like using a PC adapter for example, can be found in the Online Help for the SIMATIC Manager as well as in the appropriate User's Manual.

2.3 Project environment


A new GSD file can only be added to an open project. Either an existing project can be opened or a new one can be created. This is done using the "New Project Wizard" or entered manually.

Profibus - Getting Started User's Manual V 1.00

13

Chapter 2 SIMATIC Manager

SIMATIC Manager Requirements 2.3.1 Creating a new project manually A new project can be created in the SIMATIC Manager from the menu under: File->New. Under the "User Projects" tab, you can assign a project name (in this case "test") and choose where to save the project. Select "Project" as the project type. No settings need to be made under the "Libraries" and "Multiprojects" tabs.

Figure 3: Creating a new project

Once the project is created, the hardware must be configured. In the menu, under Insert->SIMATIC 300 Station, you can add a SIMATIC 300 station. The user can choose a name for the station. Here we used the name "SIMATIC 300(1)".

Figure 4: Selecting the SIMATIC 300 station

The selected SIMATIC 300 station is then listed in the project folder "test". When you select the SIMATIC 300(1) station, an icon appears in the right window for configuring the hardware. A double click opens the hardware configuration window. 14 Profibus - Getting Started User's Manual V 1.00

SIMATIC Manager Requirements

Figure 5: Inserted SIMATIC 300 station

Figure 6: Hardware configuration window

A mounting rail is used as a foundation for further configuration (SIMATIC300/Rack-300/Rail). The CPU315-2DP is then added to this (SIMATIC300/CPU-300/CPU315-2DP). This is only possible on slot 2, since slot 1 is reserved for the supply voltage. After it is added, a configuration window opens for the fieldbus connection. If the project does not yet have a Profibus connection, a new one can be created using the "New" button. The engineering tool automatically suggests a name (PROFIBUS(1)) as well as the Subnet ID. The Subnet ID is a combination of the project number and the subnet number. It is important if you want to go online with a programming device and no corresponding project exists. If no other entries are known, the values suggested by the engineering tool can be used. No settings need to be made under the "Network Settings" tab. The automatically entered values are the standard Profibus configuration. This also applies to the "Options" and "Bus Parameters"

Profibus - Getting Started User's Manual V 1.00

15

Chapter 2 SIMATIC Manager

In order to add the desired components, the hardware catalog must be made visible under View->Catalog. Alternatively, components can be added via Insert->Insert Object .

SIMATIC Manager Requirements settings. The baud rate can be set between 9.6 kBits/s and 12,000 kBits/s. Both the X20BC0063 and the X67BC6321 have automatic baud rate detection and support the entire available range of baud rates.

Figure 7: Creating a Profibus network

The following image shows the CPU315-2DP on slot 2 and the newly created PROFIBUS(1) network connection.

Figure 8: Profibus connection

16

Profibus - Getting Started User's Manual V 1.00

SIMATIC Manager Installing the GSD file

3. Installing the GSD file


The GSD file can only be imported using the hardware configuration window. This can be opened by clicking once on the "SIMATIC 300(1)" station, and then double-clicking on "Hardware".

Figure 9: Selecting hardware configuration

Select "Install GSD file" from the "Options" menu.

Figure 10: Installing new GSD files

In the window that opens, you can choose to install the GSD file from a Step 7 project or from another directory. Use the "Browse" function to select the appropriate path. The GSD files to insert are listed in the lower area of the window. With the "Install" button, the GSD files can be inserted in the hardware catalog. Please keep in mind that the installation of a new GSD file cannot be undone. A successful installation is confirmed with a message window.

Profibus - Getting Started User's Manual V 1.00

17

Chapter 2 SIMATIC Manager

SIMATIC Manager Installing the GSD file Selection window for GSD files to be imported:

Figure 11: Importing the GSD file

After selection and installation of the GSD file, the imported B&R Profibus DP bus controllers are found in the folder Profibus DP/Additional Field Devices/I/O/B&R. They are now completely integrated and can be configured with all the corresponding I/O modules.

Figure 12: Integrated GSD files in the hardware catalog

18

Profibus - Getting Started User's Manual V 1.00

SIMATIC Manager Integration of Profibus DP bus controllers

4. Integration of Profibus DP bus controllers


B&R Profibus DP bus controllers are added in the network connection view "Connections". This can be opened when CPU315-2DP is selected.

Figure 13: Selecting the network connections view

For the Profibus DP bus controller to be connected successfully, the DP interface of the SIMATIC 300(1) station on the CPU315-2DP must be active. When active, is it is highlighted (see image below). After integrating the bus controller, a configuration window opens. The only thing to configure is the address. All other settings can be left as they are. Important: the selected addresses must match the node numbers set on the bus controller.

Figure 14: Integrating the bus controllers

Profibus - Getting Started User's Manual V 1.00

19

Chapter 2 SIMATIC Manager

SIMATIC Manager Integration of Profibus DP bus controllers

Information:
Both X67 and X20 Profibus DP bus controllers only take on the newly assigned node numbers after a restart!

Figure 15: X20BC0063 - node number switches

Figure 16: X67BC6321 - node number switches

On the X67BC6321 the left node number switch should be multiplied by 16. After a successful integration, the configuration should like this:

Figure 17: Integrated X67 bus controller

20

Profibus - Getting Started User's Manual V 1.00

SIMATIC Manager X2X Link extension

5. X2X Link extension


Open the hardware configuration by double-clicking on the B&R bus controller symbol in the network connections view. The desired I/O modules can be added to the bus controller from the hardware catalog. Unlike with the B&R BC Design Tool, the order of modules does play an important role here. The positions/slot numbers of the I/O modules must match the actual physical structure. Since the Profibus DP bus controller X67BC6321 includes the X67DM1321 module, this is automatically positioned at slot 1. In configurations with the X20 bus controller X20BC0063, the required power supply module X20PS9400 is positioned at slot 1. All other slot assignments can be chosen freely. In the example, an X67DO1332-C01 and an X67DI1371-C01 are connected to the X2X Link. The engineering tool automatically assigns the I/O addresses, and this can be ignored for now.

Figure 18: X2X Link extension

Profibus - Getting Started User's Manual V 1.00

21

Chapter 2 SIMATIC Manager

SIMATIC Manager X2X Link extension

5.1 Configuring the I/O modules


Right-click and select "Object Properties" to configure the various I/O modules.

Figure 19: Configuring the I/O modules

Under the "Address/ID" tab you can assign addresses manually. In the "Parameter Assignment" section, in the "Device-specific parameters" folder, it is possible, for example, to manually set the digital channels of the X67DM1321 module as inputs or outputs. The values provided in the "Hex parameter assignment" folder should not be changed. These hex number combinations are automatically generated from the selected configuration. If a particular I/O module does not require configuration, then no "Device-specific parameters" folder is displayed.

22

Profibus - Getting Started User's Manual V 1.00

SIMATIC Manager Downloading the Configuration

5.2 Variable assignments


Variable names can be assigned in the "Edit Symbols" window. Right-clicking on an I/O module opens the configuration window for that module. Every channel can be assigned symbolic names and detailed comments.

Figure 20: Variable assignments

6. Downloading the Configuration


After making the desired configurations and module assignments as well as the corresponding software configuration, the configuration is transferred to the controller (CPU315-2DP). To begin the transfer process, the project must be saved and compiled. In the hardware or network connections views, this can be done using the menu option Station/Network->Save and Compile. Control data is downloaded using the Download button, or using the menu option PLC->Download (Download to Current Project) while the SIMATIC station is selected. A project can also be downloaded in the hardware or network connections views. After selecting the controller onto which the new project is to be transferred, the necessary interface can be configured. Use "View" to see a list of all available stations. In order to program the controller, it must be temporarily set to "STOP". This message should also be acknowledged with "OK". After the download is complete, the CPU will restart after asking for confirmation.

7. Controlling the modules


In order to quickly and simply test, for example, a module's outputs, there is the "Monitor/Modify" function. This can be called up when in hardware view by right-clicking on a module. The modified values can be entered and then assigned by selecting "Modify". The "Monitor" function monitors the inputs and outputs and displays their current status.

Profibus - Getting Started User's Manual V 1.00

23

Chapter 2 SIMATIC Manager

SIMATIC Manager Controlling the modules

Figure 21: Monitor/Modify function

In the above screenshot, the outputs Q1.0 and Q1.1 of the X67DO1332 output module were set to TRUE and visually represented using the "Monitor" function. Active outputs can also be identified by the corresponding LEDs on the module.

24

Profibus - Getting Started User's Manual V 1.00

B&R Fieldbus Configurator Introduction

Chapter 3 B&R Fieldbus Configurator


1. Introduction
The B&R Fieldbus Configurator makes it possible create a uniform configuration for the most popular fieldbus systems, such as Profibus, CANopen, and DeviceNet. Standardized configuration files (GSD, ESD files) are used to configure the various bus stations. A graphic editor is used to configure the bus and the corresponding bus stations. Additionally, the B&R Fieldbus Configurator can create BR files (with the ending ".br"). These are needed to configure the stations in the Profibus network for a project using Automation Studio.

2. Integrating the GSD file


When the program starts, the B&R Fieldbus Configurator automatically reads all GSD files which are stored in its GSD directory. The device names are recorded in an internal list. The device specific data is read from the GSD file during the configuration. If a DP slave device is required that does not yet appear in the selection list, it must be added. There are two ways to do this. Either via the user interface itself or within the directory structure of the B&R Fieldbus Configurator.

2.1 User interface


New GSD files can be integrated via the menu under File->Copy GSD. In the window that opens, the source path of the desired GSD file (".gsd") can be entered. A copy of the selected file is saved in the GSD folder of the B&R Fieldbus Configurator. Be sure that the files you are importing are not write protected. In addition to the GSD file, the graphic files needed to display the module in the Configurator are also imported. A message box will appear to acknowledge the successful copy of the GSD file and the corresponding bitmap files.

2.2 Directory structure


All GSD files imported into the Configurator are saved in one folder. This folder is found here: BrAutomationTools\BRFBCfg\Fieldbus\PROFIBUS\GSD. GSD files to be added can be placed in this folder. To ensure a successful integration, the files must have the format "*.gsd". The Configurator's GSD folder can be moved anywhere in the directory structure. It is also possible to create a new folder.

Profibus - Getting Started User's Manual V 1.00

25

Chapter 3 B&R Fieldbus Configurator

B&R Fieldbus Configurator Integrating the GSD file

Figure 22: GSD folder

It is important to remember, however, that the B&R Fieldbus Configurator can only use one folder as a reference for the GSD database. All necessary GSD files must therefore be stored in this folder. The path for the GSD folder can be set in the menu under: Settings\Path.

Figure 23: Path of the GSD folder

In the field "GSD File Directory", you can enter the path for the folder containing the GSD files. There is also the option of setting both the "Extension" of the GSD files to be imported as well as the "Project File Directory". If you do not wish to change them, the default values can be used. For the Configurator to apply the changes you have made, the software must be restarted. GSD files specified by the PNO (PROFIBUS user organization) for PROFIBUS FMS are not supported by the B&R Fieldbus Configurator.

2.3 Viewing the GSD file


Using the viewing window Tools->GSD Viewer you can display more detailed information about the selected GSD file. In addition to general information such as module name and ID number, you can also display the revision number and supported baud rates. All values listed in the GSD Viewer are read-only, and cannot be changed. By clicking on "More", you can see notes regarding, for example, the maximum length of inputs and outputs. All graphic files for the module are listed in the "Layout" selection. The "Identifier" button reveals addressing information about each of the integrated modules.

26

Profibus - Getting Started User's Manual V 1.00

B&R Fieldbus Configurator Integrating the GSD file

Figure 24: GSD file information

Profibus - Getting Started User's Manual V 1.00

27

Chapter 3 B&R Fieldbus Configurator

B&R Fieldbus Configurator Creating a Profibus DP configuration

3. Creating a Profibus DP configuration


Select File->New to create a new configuration. All installed fieldbus systems are shown in a list. In this example, "PROFIBUS" should be selected as the fieldbus. The name of the newly created project can be assigned at the end or with the function File->Save As.

3.1 Inserting a master


A master can be inserted using the menu option Insert->Master. This can be also be done using the appropriate icon. A selection window opens, which lists all available masters on the left side. Here you have the chance to assign masters a station address and a description. These can be edited at any time when configuring the individual masters. In the example below, the aPCI interface module 3IF766.9 is selected (Profibus DP master).

Figure 25: Master selection

After selecting the master (3IF766.9), the configuration will look like this:

Figure 26: Selecting a DP master - 3IF766.9

28

Profibus - Getting Started User's Manual V 1.00

B&R Fieldbus Configurator Creating a Profibus DP configuration 3.1.1 Master configuration By placing the focus on the master and selecting the menu option Settings->Master Settings, double-clicking on the master, or via the right-click menu, you can open the master configuration window. The following settings are possible: Station address of master (Symbolic) description of the master Selection of the master as the current master (e.g. to execute a download)

For Profibus DP there are additional setting options: To open the DP Master Settings window To activate/deactivate auto addressing

When auto addressing is deactivated, the user must enter the addresses for the slaves manually.

Figure 27: Master configuration window

After clicking on the "DP Master Settings" button, the following settings can be made for the master: Startup behavior after system initialization

If "Automatic release of the communication by the device" is selected, the master device starts with the data exchange on the bus immediately after the initialization has completed. When "Controlled release of the communication by the application program" is selected, data exchange on the bus is initialized by the application program. This option guarantees that no

Profibus - Getting Started User's Manual V 1.00

29

Chapter 3 B&R Fieldbus Configurator

Auto addressing means that: The addresses are assigned starting at 0 and increasing according to the entry order of the slaves. They can be displayed and checked under the menu option View->Address table. The information is updated when you save the configuration, view the address table, or before you download.

B&R Fieldbus Configurator Creating a Profibus DP configuration unwanted states reach the outputs, since the application program has complete control over the I/O data traffic. However, this requires systematic control of the modules by the application program. The following example configuration is executed using Automation Studio. User program monitoring

The watchdog time determines how long the device waits for the software watchdog to be triggered by the application program until it sets the outputs of the slave device to zero. This action does not start automatically and must be enabled by the application program. Addressing mode

The addressing mode for the process data determines how the process data addresses (offsets) are interpreted. Byte addressing and word addressing are both possible. Storage format (word module)

The storage format determines how the data words are stored in the process image. For the word format, you can switch between Big or Little Endian addressing. Handshake of the process data

This is for setting the handshake process of the process data between the application and the master. This selection is important for the correct data exchange between the application program and the device. The handshake selected must be supported by the application program. This is the case, for example, for "buffered, host controlled" and for "bus synchronous, host controlled". The option "no consistence, uncontrolled" is useful for quick, simple diagnostics.

Figure 28: Master settings

Hardware parameter

30

Profibus - Getting Started User's Manual V 1.00

B&R Fieldbus Configurator Creating a Profibus DP configuration The size of the hardware's dual port memory is specified with this parameter. The value increases or decreases the valid address range for the process data addresses. This is only a static display of the value. It cannot be changed. For the following example, the settings should be made to match those in the above screenshot.

3.2 Bus parameters


Using menu option Settings->Bus Parameter, the baud rate can be set between 9.6 kBits/s and 12,000 kBits/s. Both the X20BC0063 and the X67BC6321 have automatic baud rate detection and support the entire available range of baud rates.

3.3 Inserting a slave


A Profibus DP slave can be inserted into the configuration via menu option Insert->Slave , or by clicking on the appropriate icon. All slave devices which have GSD files stored in the GSD directory are available for selection and displayed in the list on the left. A filter can be used to limit the selection list to certain slave types (I/O slave, PLC, etc.) or vendors. Additional information regarding the individual slaves can be found below the "Available slaves" selection list if they have been selected.. The slave appears in the list on the right by double clicking or by clicking on the Add button. All devices in the list on the right are assigned to the current master, which is also displayed in this window.

Figure 29: Slave selection window

Profibus - Getting Started User's Manual V 1.00

31

Chapter 3 B&R Fieldbus Configurator

B&R Fieldbus Configurator Creating a Profibus DP configuration The station address automatically increases by one with each slave added to the list on the right. The station address and the slave name can be changed at any time in the slave configuration window.

Information:
Both X67 and X20 Profibus DP bus controllers only take on the newly assigned node numbers after a restart!

Figure 30: X20BC0063 - node number switches

Figure 31: X67BC6321 - node number switches

Note: A slave can be selected more than once. However, each slave must have its own unique station address to tell it apart from other slaves on the network. Important: the station addresses entered must match the node numbers set on the bus controller. In the example configuration, the Profibus DP bus controller X67BC6321 is selected as slave. It connects the Profibus DP network with the X2X Link. If multiple masters are configured in a project, it is important to ensure that when the slaves are inserted they are assigned to their corresponding masters (this can be selected in the top right of the "Init Slave" window or in the slave configuration).

Figure 32: Master - Slave example configuration

32

Profibus - Getting Started User's Manual V 1.00

B&R Fieldbus Configurator Creating a Profibus DP configuration 3.3.1 Slave Configuration The slave configuration window opens with a double-click on the desired slave or via the menu option Settings->Slave Configuration. In this window, modules and their addresses are assigned in the process image memory of the master. Important: The addresses entered must match the ones in the PC application.

General settings

Module selection

Configured modules

Figure 33: X67BC6321 - slave configuration window

The general settings of the slave configuration include station address and slave name. Depending on whether the "Activate device in actual configuration" field is selected, the slave can be activated or deactivated in the current fieldbus configuration. If this is deactivated, process memory is used in the master for this slave, however no data exchange occurs from the master to this slave. A deactivated slave is crossed out in the graphic view. The "Enable watchdog control" function activates communication monitoring. This is used by the slaves to identify communication errors to the corresponding DP master. If the DP slave determines an interruption in its communication with the master, defined by the monitoring time, then the slave independently resets and sets the outputs to a safe state. If this function is deactivated and the master fails during the communication, the slave outputs are not reset. This may result in dangerous situations! Think carefully, therefore, before turning off the watchdog monitoring.

Profibus - Getting Started User's Manual V 1.00

33

Chapter 3 B&R Fieldbus Configurator

B&R Fieldbus Configurator Creating a Profibus DP configuration Another feature of the general setting area is information about the slave configuration. The information includes the maximum number of connected modules and the actual current number of connected modules. The information about the maximum data lengths for input and output data compared to the actually configured lengths can be helpful for address management. In the middle section there is a display window with the current module selection. All modules that are integrated and available for selection are listed here. For each module there is information about the required input and output bytes. The lower section lists the already configured modules. This list can be adjusted by removing or adding modules from the module selection. Be sure that the slot assignments match the actual physical structure! Since the Profibus DP bus controller X67BC6321 includes the X67DM1321 module, it must always be positioned at slot 1. All other slot assignments can be chosen freely. With configurations using the X20 bus controller X20BC0063, remember that slot 1 must always be reserved for the power supply module X20PS9400. All other slot assignments can be chosen freely. I/O addresses can be entered by the user or automatically assigned using the B&R Fieldbus Configurator. This is done using the "auto addressing" function, which can be activated in the master configuration. Offset address specifications apply to data addressing in the master. Address specifications do not apply to data addressing in the slave. The slave organizes its own data addressing. Input and output data from the slave is transferred on the bus directly to dual port memory. Offset addresses refer to the master. There are two types of slaves: a simple slave has a fixed data length. A modular slave has a data length which can be configured. A modular slave is basically a combination of simple slaves with one station address. Clicking on the "Symbolic Names" button, you can assign symbolic names to the modules and individual bits. Previously defined and saved modules can be added to the configuration using the "Predefined Modules" button. 3.3.2 Parameter data Clicking on the "Parameter Data" button in the slave configuration or by selecting menu option Settings->Parameter Data with the slave selected opens the window for editing parameter data. This data is generated based on the number of modules used and their configuration and should not be altered.

34

Profibus - Getting Started User's Manual V 1.00

B&R Fieldbus Configurator Creating a Profibus DP configuration

Figure 34: Parameter data

Figure 35: General parameters

The "Module" button takes you to a list of modules (if multiple modules are configured) for configuring the individual modules.

Figure 36: List of modules for configuration

Profibus - Getting Started User's Manual V 1.00

35

Chapter 3 B&R Fieldbus Configurator

Clicking on the "Common" button brings up general information about the data format being used and the X2X cycle time.

B&R Fieldbus Configurator Creating a Profibus DP configuration For the X67DM6321 all digital channels have been set as outputs.

Figure 37: Digital channels set as outputs

The following image shows the configuration of a temperature module (not part of the example configuration).

Figure 38: Configuration of a temperature module

3.3.3 DPV1 parameter Clicking on the "DPV1 settings" button in the slave configuration opens the editing window for the DPV1 parameter. DPV1 is used for non-cyclic data exchange and is used for read, write and alarm editing functions. Note: Neither X20 nor X67 Profibus DP bus controllers support DPV1!

36

Profibus - Getting Started User's Manual V 1.00

B&R Fieldbus Configurator Online connection

4. Online connection
An online connection is required to load the newly created configuration to the Profibus DP master. To select this and start the download, select menu option Online->Download. A window opens with a list of available interfaces. In this example, the serial interface will be used. To do this, select "CIF Serial Driver". Similarly, one could use the TCP/IP interface, for example. Information about the configuration options can be found in the online help for the B&R Fieldbus Configurator.

Figure 39: Interface selection

The serial interface selected on the programming device (PC) can be connected using the "Connect COM x" button. If the connection attempt fails, the appropriate error number is returned (see online help for the error codes). Only when the returned error value is "0" can the interface be used for communication. The following image shows a connection to the COM 2 interface.

Figure 40: Selection - COM interface

Profibus - Getting Started User's Manual V 1.00

37

Chapter 3 B&R Fieldbus Configurator

B&R Fieldbus Configurator Online connection

4.1 Downloading the created configuration


If a connection has been established via the serial interface, the configuration can be transferred. If bus data traffic is already in progress, a message appears stating that both the master and the slave will be stopped for the attempted download.

4.2 Result of the configuration


If in the master configuration the start up behavior after system initialization was set to "Automatic release of the communication by the device", then the Profibus DP slaves (in this case the B&R Profibus DP bus controllers) start automatically and should be in RUN mode, just like the master. When "Controlled release of the communication by the application program" is selected, the slave waits for the application program to initialize the start. This can be observed on the status LEDs. The status of the bus controllers is "Wait for Config" (X67BC6321: Status Indicator 1: Green/On, Red/Blinking) (X20BC0063: STATUS/On, ERROR/Blinking). The bus controllers are not switched to RUN mode until the the configuration is started in the application program.

4.3 Controlling the modules


The network connections view is a quick and simple interface for controlling the module outputs. It can be opened with the menu option Window->Network View. The left column contains the logical network view, which shows both the master and the corresponding slaves. In the middle is a tag list, and to the right is the I/O watch window. Pulling selected bus elements from the left side into this window lets you monitor input and output data and assign the provided values. To do this, right-click on the desired element and choose "Start".

Figure 41: Network view

38

Profibus - Getting Started User's Manual V 1.00

B&R Fieldbus Configurator Project configuration in Automation Studio All selected modules are listed in a table view. For the X67DM1321 all digital channels have been set as outputs. The output values are also listed, since they are read back over the input channels. The output LEDs on the module should light up according to the value entered in the "Value" field.

Figure 42: I/O watch

Note: This is only possible with the "No consistence, uncontrolled" handshake. Otherwise the I/O master data are always overwritten by the I/O buffer.

5. Project configuration in Automation Studio


To configure the Profibus DP slaves in Automation Studio, they must first be integrated. They cannot simply be inserted in the hardware tree as usual. A BR module must therefore be created using the B&R Fieldbus Configurator that contains the entire network configuration. This can then be inserted as a "System Object". Chapter 3 B&R Fieldbus Configurator

5.1 Requirements in Automation Studio


In addition to the necessary BR files, the "DPMaster" library must be integrated in the library manager. This can be opened via Open->Library Manager. The "Insert Library" icon opens a selection window. In the "Add Library" section the "DPMaster" library can be selected and inserted.

5.2 Communication profile


The settings in the B&R Fieldbus Configurator must be different than in the previous example to prevent unwanted states at the outputs. In the master configuration, the communication profile must be switched to "Controlled release of the communication by the application program" and the data traffic must be switched to "Buffered, host controlled". All other settings can be used as they are.

Profibus - Getting Started User's Manual V 1.00

39

B&R Fieldbus Configurator Project configuration in Automation Studio

5.3 Creating a BR module


If you are satisfied with your configuration and all modules are set up, then a BR module can be created via menu option Tool->B&R->Generate DBM/BR Module. To do this the focus must be on the master in the graphic view. The creation of the BR module runs in the background. The the created files are stored in the project folder. A subfolder is created, with the same name as the master, which contains the entire configuration. If the project contains multiple masters, a subfolder is made for each one that contains the created files. These folders have the same names as the respective masters. The created BR files are named as follows: "dpm_xxx.br". Where "xxx" stands for the station number that was entered for the master. In addition to the ".br" file, a ".dpm" and a ".bak" file are also created. The following image shows two saved projects ("test00", "test01"). The project "test01" contains two masters ("Station_1" and "Station_5"). Since for "Station_5" the station number "5" was entered, the created files are named "dpm_005.***".

Figure 43: BR module folder

40

Profibus - Getting Started User's Manual V 1.00

B&R Fieldbus Configurator Project configuration in Automation Studio

5.4 Inserting a BR module


Created BR modules can be inserted in an open Automation Studio project. A "System Object" can be inserted under the menu option Insert->New Object. The desired BR file can be selected and integrated. The inserted BR module can be found in the list of data objects. A project may look like this:

Figure 44: Inserted BR module

5.5 Configuration of a B&R Profibus DP bus controller


Integrating the BR module lays the foundation for the integration of the slave modules, yet these must still be initialized, started/stopped, and configured. The following example will describe a simple control of the outputs. A more detailed description of all FBKs used can be found in the in the Automation Studio online help under:

The B&R Software\ Automation Runtime I/O management\ Bus systems and configuration\ Fieldbus\ Profibus DP\ DP Master Library\ FBK Description

Profibus - Getting Started User's Manual V 1.00

41

Chapter 3 B&R Fieldbus Configurator

B&R Fieldbus Configurator Project configuration in Automation Studio 5.5.1 Initialization Module initialization procedure:

Figure 45: Module initialization

DPMInit

When this function is called, the module specified by "DPMInit_0.Device" is initialized. In this case it is the interface module 3IF766.9 (SS1) with the PROFIBUS DP interface (IF2). DPMConfig

The "DPMConfig_0.DevIdent" parameter specifies the module on which a download should occur. Data is supplied by the "DPMInit" function. The "DPMConfig_0.ConfModulName" pointer specifies the name of the configuration module which should be loaded to this card. The previously created "dpm_000" from the configuration with the X67BC6321 (all channels set as outputs), the X67DO1332 and the X67DI1371 has been selected here.

42

Profibus - Getting Started User's Manual V 1.00

B&R Fieldbus Configurator Project configuration in Automation Studio 5.5.2 I/O data traffic In this example application, the outputs of the X67DM1321 and the X67DO1332 should be controlled. A variable is used to count upwards and send the result to the digital outputs. If an overrun occurs, it resets to 0 and starts again.

Figure 46: Controlling the outputs

DMPStart

The "DPMStart_0.DevIdent" parameter specifies which master should be started. Data is supplied by the DPMInit function. DPMio

This function block is attached to the previously selected buffered, master controlled communication profile. I/O data transfer is buffered by cyclically calling the FBKs from a task class and by the configured communication mode. The "DPMio_0.DevIdent" parameter specifies which B&R card the I/O data should copy. Data is supplied by the DPMInit function. This FBK copies the input and output data areas between the DPMaster and the specified buffers. Possible process data transfer procedures: Buffered, host controlled Bus synchronous, host controlled

Profibus - Getting Started User's Manual V 1.00

43

Chapter 3 B&R Fieldbus Configurator

B&R Fieldbus Configurator Project configuration in Automation Studio

5.6 Transferring project to controller


After the newly created project has been successfully compiled (Project->Build All) it can be transferred to the controller. (Project->Transfer to Target). To start the CPU, execute a warm restart (Project->Services->WarmRestart).

44

Profibus - Getting Started User's Manual V 1.00

Figure index Figure 1: Figure 2: Figure 3: Figure 4: Figure 5: Figure 6: Figure 7: Figure 8: Figure 9: Figure 10: Figure 11: Figure 12: Figure 13: Figure 14: Figure 15: Figure 16: Figure 17: Figure 18: Figure 19: Figure 20: Figure 21: Figure 22: Figure 23: Figure 24: Figure 25: Figure 26: Figure 27: Figure 28: Figure 29: Figure 30: Figure 31: Figure 32: Figure 33: Figure 34: Figure 35: Figure 36: Figure 37: Figure 38: Figure 39: Figure 40: Figure 41: Figure 42: Figure 43: Figure 44: Figure 45: Figure 46: Downloading the GSD file .............................................................................. Section of the B&R BC Profibus Design Tool................................................. Creating a new project ................................................................................... Selecting the SIMATIC 300 station ................................................................ Inserted SIMATIC 300 station ........................................................................ Hardware configuration window ..................................................................... Creating a Profibus network ........................................................................... Profibus connection........................................................................................ Selecting hardware configuration ................................................................... Installing new GSD files ................................................................................. Importing the GSD file .................................................................................... Integrated GSD files in the hardware catalog................................................. Selecting the network connections view......................................................... Integrating the bus controllers ........................................................................ X20BC0063 - node number switches............................................................. X67BC6321 - node number switches............................................................. Integrated X67 bus controller ......................................................................... X2X Link extension......................................................................................... Configuring the I/O modules........................................................................... Variable assignments ..................................................................................... Monitor/Modify function .................................................................................. GSD folder...................................................................................................... Path of the GSD folder ................................................................................... GSD file information ....................................................................................... Master selection ............................................................................................. Selecting a DP master - 3IF766.9 .................................................................. Master configuration window.......................................................................... Master settings ............................................................................................... Slave selection window .................................................................................. X20BC0063 - node number switches............................................................. X67BC6321 - node number switches............................................................. Master - Slave example configuration ............................................................ X67BC6321 - slave configuration window...................................................... Parameter data............................................................................................... General parameters ....................................................................................... List of modules for configuration .................................................................... Digital channels set as outputs....................................................................... Configuration of a temperature module.......................................................... Interface selection .......................................................................................... Selection - COM interface .............................................................................. Network view .................................................................................................. I/O watch ........................................................................................................ BR module folder............................................................................................ Inserted BR module........................................................................................ Module initialization ........................................................................................ Controlling the outputs ................................................................................... 10 11 14 14 15 15 16 16 17 17 18 18 19 19 20 20 20 21 22 23 24 26 26 27 28 28 29 30 31 32 32 32 33 35 35 35 36 36 37 37 38 39 40 41 42 43

Profibus - Getting Started User's Manual V 1.00

45

Figure index

Figure index

46

Profibus - Getting Started User's Manual V 1.00

Table index Table 1: Table 2: Table 3: Manual history ....................................................................................................... 7 X20 Profibus DP bus controller ............................................................................. 8 X67 Profibus DP bus controller ............................................................................. 9

Profibus - Getting Started User's Manual V 1.00

47

Table index

Table index

48

Profibus - Getting Started User's Manual V 1.00

Index

B
B&R Fieldbus Configurator ........................25

P
Profibus Design Tool ................................. 10

G
GSD file .......................................................9 GSD file download .......................................9 GSD file version ...........................................9 GSD User's Manual ...................................10

S
SIMATIC Step 7 ......................................... 13

X
X20BC0063 ................................................. 8 X2X cycle time ........................................... 10 X2X Link ...................................................... 8 X67BC6321 ................................................. 8 X67BC6321.L08 .......................................... 8 X67BC6321.L12 .......................................... 8

M
Manual history .............................................7

N
Node number switches ........................20, 32

Profibus - Getting Started User's Manual V 1.00

49

Index

Index

50

Profibus - Getting Started User's Manual V 1.00