Profibus DP Basics: GSD Files and Configuration

The Profibus DP configuration process can be summarised in three steps: import the GSD file → hang the slave in the master configuration and set the station address → select the data module and assign I/O addresses. GSD (General Station Description) is the slave’s capability statement; the master uses it to know which baud rates the device supports, how many bytes of input data it can provide, and which optional modules and parameters it has. A GSD version mismatch, a wrong module selection and a duplicate station address are the three high-frequency Profibus site problems. This article corresponds to Series 195 Profibus; a cross-protocol comparison is in comparing the whole fieldbus range.

Profibus DP basics: GSD files and configuration
Profibus DP basics: GSD files and configuration

The basic mechanism of Profibus DP: master–slave polling

Unlike CANopen’s producer–consumer model, Profibus DP is strict master–slave polling: the master visits slaves one by one in a fixed order, and a slave answers only when it is called. This brings two characteristics:

  • The bus cycle is predictable. The time of one polling cycle is approximately the sum of the access times of all slaves; the more stations, the longer the cycle. Adding a slave therefore lengthens the refresh cycle linearly, and a multi-axis system needs the calculation in advance.
  • A slave cannot send data on its own initiative. The sensor cannot report a fault actively in the way a CANopen EMCY does; it can only take diagnostic information back when polled. The master needs to read diagnostics actively; see Profibus diagnostics and terminating resistors in practice.

The physical layer is RS-485 differential twisted pair, linear topology, with termination matching required at both ends of the segment. Profibus supports several baud-rate grades and the slave can auto-detect; the higher the rate, the shorter the allowed segment. Specific grades are those declared by the master configuration software and the GSD.

The GSD file: the slave’s capability statement

A GSD is a plain-text file that declares the slave’s key attributes to the master. For a displacement sensor the entries to watch include:

Key GSD contentRoleEffect at configuration
Vendor and device identifier (Ident_Number)The master checks that the hung slave matches the configurationA mismatch keeps the slave out of data exchange
Supported baud-rate listDeclares the rate grades the device can runA rate selected by the master that is not supported fails communication
Optional data modulesDefine input/output byte count and meaningWrong module → wrong data length, readings shifted
User parameters (User_Prm_Data)Configurable items such as resolution, counting direction and zeroDownloaded at configuration; no extra commissioning tool needed
Diagnostic-capability statementSupported diagnostic-telegram typesDetermines how fine a fault picture the master can read

Two hard rules apply to using a GSD. First, the GSD must match the actual device model and firmware version; do not make do with the file of another model in the same series — Ident_Number checking will keep the slave out of data exchange. Second, after importing the GSD the configuration must be recompiled and downloaded; updating the file without re-downloading leaves the master running the old configuration.

Configuration steps and station address

  1. Import the GSD: install the slave GSD in the hardware catalogue of the master engineering software; after installation the device appears in the catalogue tree.
  2. Hang the slave and set the station address: the Profibus station address is unique on the segment. It is set on the device by DIP switches or a configuration tool and must match the address filled in the configuration. Two devices with the same number make both unstable, and the error message often points at the wrong one.
  3. Select the data module: the position value of a displacement sensor is generally 32-bit data. If the model supports multi-magnet or an additional status word, the module list has options of different lengths. Select according to the actual need; the length must match the length read on the PLC side.
  4. Assign I/O addresses: the master assigns an input address for that slave in the process image; the PLC program reads the position value at this address.
  5. Set user parameters: resolution grade (one of 1 / 2 / 5 / 10 / 20 / 50 / 100 μm), counting direction, zero handling and similar items are downloaded once in the configuration phase.
  6. Compile, download and verify: observe the slave run indication and the master’s on-line status, then move the magnet by hand and check the direction and scaling of the reading change.

Byte order and value conversion: two sources of a reading that “looks wrong”

The position value is transferred as a 32-bit integer. When the PLC side reads it, two checks are mandatory. The first is byte order: Profibus-side data are arranged big-endian (high byte first). If the PLC program interprets little-endian, the reading presents huge, patternless jumps. A Siemens system can usually read it directly as a DWORD; a cross-brand master needs a measured confirmation. The second is resolution conversion: what is read back is a count; actual displacement = count × resolution step. A wrong factor looks like “the range is marked wrong”. The relation between resolution grade and accuracy indicators is given in the distinction among resolution, repeatability and non-linearity.

The sensor output is absolute position; after a power-loss restart, homing is unnecessary. The mechanism is given in absolute vs. incremental position. This is of clear value in retrofitting a Profibus brownfield line — the homing action of the original incremental scheme can be cancelled outright.

Physical layer: the part that must be right from the start

Physical-layer problems account for the bulk of site faults. Three points matter: linear topology, no star branches; terminating resistors ON at both ends of the segment, OFF on intermediate nodes; and the device that holds the plug with the terminating resistor must remain powered, because the Profibus termination network needs supply to bias correctly — if that device is powered off, matching of the whole segment fails. The principle of termination matching and the differences among buses are in terminating resistors and bus length: why it has to be 120 Ω; systematic practice for earthing and screening is in troubleshooting fieldbus interference: grounding, shielding, topology.

Product parameters and pin-out are in Series 195 Profibus explained; the general fieldbus connection flow is in the practical fieldbus guide.

Practical tips for engineers

  • The Series 19 analog programming tool can set the zero and end values anywhere within the nominal factory stroke range.
  • The Series 19 Profibus simulator can check sensor functions, read magnet positions and diagnostic data, and supports changing the slave address.

Frequently Asked Questions

Q: What is a GSD file for?

A GSD is the capability-description file of a Profibus slave. It declares to the master the device identifier, supported baud rates, optional data modules, user parameters and diagnostic capability. The master uses it to recognise the device and generate the configuration. If Ident_Number does not match, the slave cannot enter data exchange.

Q: Why does the GSD still not take effect after import?

Installing the GSD only adds the device to the hardware catalogue. The configuration must be recompiled and downloaded to the master before it takes effect. Updating the file without downloading leaves the master running the old configuration.

Q: Why is the Profibus displacement-sensor reading scrambled?

Check two items first: whether the 32-bit data are interpreted in the correct byte order — Profibus side is big-endian, and little-endian interpretation produces huge, patternless jumps; and whether the resolution factor is correct — what is read back is a count, which must be multiplied by the resolution step (one of 1/2/5/10/20/50/100 μm).

Q: How are Profibus terminating resistors set?

Termination matching is integrated in the DB9 plug. Plugs at both ends of the segment are set ON; all intermediate plugs are set OFF. Note in particular that the device holding an ON plug must remain powered, because the termination network includes bias resistors that need supply; powering that device off causes matching of the whole segment to fail.

Q: Does adding Profibus stations affect refresh speed?

Yes. Profibus DP is a master–slave polling mechanism. One polling cycle is approximately the sum of the access times of all slaves; the more stations, the longer the cycle. A multi-axis system must calculate the cycle at the design stage, not discover at commissioning that refresh is not fast enough.

← Back to News