Professional Documents
Culture Documents
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
Figure index
Table index
Index
Profibus Getting Started User's Manual V 1.00 3
Table of contents
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
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
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.
10
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.
11
12
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.
13
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.
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)".
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
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"
15
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.
The following image shows the CPU315-2DP on slot 2 and the newly created PROFIBUS(1) network connection.
16
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.
17
SIMATIC Manager Installing the GSD file Selection window for GSD files to be imported:
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.
18
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.
19
Information:
Both X67 and X20 Profibus DP bus controllers only take on the newly assigned node numbers after a restart!
On the X67BC6321 the left node number switch should be multiplied by 16. After a successful integration, the configuration should like this:
20
21
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
23
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
25
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.
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.
26
27
After selecting the master (3IF766.9), the configuration will look like this:
28
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.
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
29
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.
Hardware parameter
30
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.
31
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!
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).
32
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
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.
33
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
The "Module" button takes you to a list of modules (if multiple modules are configured) for configuring the individual modules.
35
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.
The following image shows the configuration of a temperature module (not part of the example configuration).
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
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.
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.
37
38
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.
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.
39
40
The B&R Software\ Automation Runtime I/O management\ Bus systems and configuration\ Fieldbus\ Profibus DP\ DP Master Library\ FBK Description
41
B&R Fieldbus Configurator Project configuration in Automation Studio 5.5.1 Initialization Module initialization procedure:
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
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.
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
43
44
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
45
Figure index
Figure index
46
Table index Table 1: Table 2: Table 3: Manual history ....................................................................................................... 7 X20 Profibus DP bus controller ............................................................................. 8 X67 Profibus DP bus controller ............................................................................. 9
47
Table index
Table index
48
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
49
Index
Index
50