PROFIBUS Troubleshooting

Introduction

This Application Note, gives an overview about how to start troubleshooting when commissioning a PROFIBUS network.

It shows the most common issues, when configuring a PROFIBUS Master or Slave device, as well as the physical aspects.

PROFIBUS Master specific diagnosis

Counter

Receive and Transmit Frames

In the PROFIBUS Master diagnosis, the Receive and Transmit Frame counter can be used to find out if there is any transaction on the bus.

If both count up, there is a reachable slave device connected. If not, please first of all check your cabling and configured Station Addresses.

Configuration Request / Confirmation

If the Master Configuration fits to the slave configuration, there will only be one Configuration Request (Cfg Req.) sent by the Master and one Confirmation (Cfg Cnf.) received.

If both count up, there is an issue with both configurations. (See PROFIBUS Slave diagnosis → CheckconfiguredModules)

This does also affect Parameter Request and Confirmation.

Common State

The PROFIBUS Master diagnosis "PROFIBUS_APM → Common State", provides information about the current network state and provides current communication error codes.

The definition of all error codes can be found here:

Hilscher status and error codes

PROFIBUS Slave diagnosis

To open a diagnosis provided by the slave, connect to the PROFIBUS Slave in Sycon.net.

Please note that the full Diagnosis is only available for PROFIBUS Slaves, supporting DPV1 (more information: DP-V1).

Diagnosis

By opening the Slave diagnosis, some more information about the current communication will be available.

A "Configuration fault", often indicated an issue with the current module configuration.

Make sure that the configured Module combination does exactly fit the current slave. Do not twist IN and OUT, since the configuration is always made from the masters point of view.

Check configured Modules

The Slave Diagnosis also provides information about the current module state.

It shows if a module does fit the expected configuration and also shows the current value.


This Screenshot shows faulty modules. This could mean a wrong module configuration or a module in bad state (for example not reachable):


This Screenshot shows successfully configured and accepted modules. The current value is shown on the right side:

Automatic Network Scan

In case a manual configuration does not result in a working communication, an automatic configuration using the "Network Scan" can be used.

It can also be used to find out, if any Slave is available on the bus or if the imported GSD file fits to the connected device.

To start the network scan, please right click to the master device in Sycon.net and select "Network Scan...".

Please note that an "empty" configuration needs to be loaded to the device. If there has not been any configuration downloaded until now, first right click → Download.

Check for GSD File

If any PROFIBUS Slave device is reachable on the bus, it will be listed in the upcoming window.

A fitting GSD file (if the correct one is imported to Sycon.net), will automatically be assigned to the device, by comparing the Device Type ID (marked yellow):

If no fitting GSD file is available, the window shows the following:

In this case, please check the used GSD file. GSD-Files for each PROFIBUS Slaves are provided by the manufacturer.

Module Configuration

After clicking "Create Devices", the Slaves Module configuration will be read out automatically.

if there are no inconsistencies between the module configuration reported by the slave and the modules described in the GSD file, these are created automatically.

The following messages appears in the Output Window:

Marked in yellow, it shows the detected module configuration in Hex-format (Identifier).

When opening the Slave configuration, these Modules will be shown under "Configured Modules".

Some devices do not send clearly recognizable configuration data, for example if the same Identifier is used for several Modul types.

In this case the Module configuration needs to be set manually.

Slave specific configurations

Parameter settings

Some slave need special parameter settings, which can be changed in the "Parameter" area, for each slot.

A typical example is when configuring a Siemens ET 200 Slave, where the potential group needs to be set (dark or light one):

PROFIBUS Slave specific diagnosis

When configuring a Profibus Stand-Alone Slave, Sycon.net offers several diagnostic.

Therefore "right click to the device → Connect → Diagnosis".

General diagnosis

The general diagnosis shows the current communication state, as well as Communication error Codes.

The definition of all error codes can be found here:

Hilscher status and error codes


This Screenshot shows a fully working communication:

Busparameter

In "PROFIBUS_DL → Busparameter", you can check the currently used Station address.

If the Baudrate is set to "Automatically", the Baudrate on the bus will be shown.

If the Baudrate changes constantly, this indicates an issue with the profibus connection or a missing master. The slave can not determine the baudrate used on the bus.

In this case, please check the Cabling and whether the Master is already working correctly.

Counter

In the PROFIBUS Slave diagnosis, the Receive and Transmit Frame counter can be used to find out if there is any transaction on the bus.

If both count up, there is a reachable device connected to the bus. If not, please first of all check your cabling and Station Address.

Master/Slave Configuration

The most important part of a PROFIBUS configuration, is a fitting module configuration.

In case the master wants to establish a communication to a specific slave, it sends its current configuration (as a hex identifier-stream), to the Slave device.

The Slave device needs to check this hex-identifier and needs to confirm the configuration.

If there is any inconsistency, the slave will deny the communication establishment.


The Diagnosis "Config Data from master" and "Config Data from Slave" therefore need to be equal, as shown in the Screenshots below:

Cabling

Cable construction

  1. Outer Jacket
  2. Braid Shielding
  3. Foil Shielding
  4. Inner Jacket
  5. Isolation
    1. Red = RXD/TXD-P
    2. Green = RXD/TXD-N
  6. Copper


Do not Twist the Red and Green cable.

Maximum number of stations

Up to 32 stations (master and slave) can be interconnected in a segment.
If there are more than 32 stations, a repeater must be used to connect the individual bus segments.
This way, the bus can be expanded to up to 127 stations.


It is recommended not to connect more than 3 repeaters in series.

Termination resistors

Please ensure that termination resistors are installed on both ends of the cable.

These are used to avoid reflections on the bus.

If special PROFIBUS connectors are used, these resistors are often found inside the connector and need to be switched on.



Cable length / Baud rate

Baud rate (kBit/s)9,619,293,75187,550015003000600012000
Range / Segment (m)1200120012001000400200100100100


The information concerning the cable length relates to PROFIBUS certified cables (Type A) with the following electic data:

Impedance:135...165Ω
Capacity per units length:< 30pf/m
Loop resistance:110Ω/km
Wire diameter:0,64mm
Wire cross-section:> 0,34mm2

EMC protection

Always separate the cable routing from high-voltage cables.

When communicating with >500kBit/s, prevent stub lines.

Shielding

To prevent influences caused by EMC, please always use well shielded cables for PROFIBUS, like shown in the Cable construction.

The Braind Shield and Foil Shield should always be connected to PE across a large area.


PROFIBUS Functionalities

SYNC and FREEZE

If SYNC or FREEZE is activated in the Slave configuration, this needs to be handled by the PROFIBUS Master.

(When using for example a S7 PLC, the command SFC 11 (DPSYC_FR) is used to syncronize the DP Slaves)

Otherwise, this function needs to be deactivated.

Please also note the configuration of the SYCN/FREEZE groups in the Master configuration.

SYNC:

The Master uses the SYNC control command, to "freeze" the current output data from Slaves of a specific group.

The Outputdata will only be updated after every new SYNC control command. Only after a UNSYNC control command from the PROFIBUS Master, the Outputdata will be updated cyclically again.

FREEZE:

If a FREEZE control command is send by the Master to a specific group of slaves, it freezes the current state of Inputdata. It will be send to the master cyclically.

The Slaves Inputs will be updated after every new FREEZE control command and be frozen again.Only after an UNFREEZE control command from the PROFIBUS Master, the Inputdata will be updated cyclically again.


DP-V0 / DP-V1 / DP-V2

Over time, there have been some enhancements to the DP application layer.

The original DP protocol is inofficially called DP-V0. The extensions are called DP-V1 and DP-V2.

They offer the following functions:

DP-V0

Cyclical exchange of data and diagnostics.

DP-V1

Acyclic data exchange and alarm handling.

DP-V2

Isochronous data exchange, slave cross traffic and time synchronization.

DP-V2 is currently not supported by Hilscher devices.