Communication protocols and services

In PROFIBUS DP systems a master (PLC, PC, etc.) usually communicates with many slaves (I/Os, drives, etc.); only the master actively accesses the bus (by sending unsolicited telegrams), while a DP slave only sends telegrams when requested by the master.

PROFIBUS DP

  • DP-StartUp
    Before the master and the slave exchange data cyclically, parameter and configuration data are transferred from the master to the slaves during the DP startup. Once the parameter and configuration data have been sent, the master queries the diagnostic data of the slave until the slave indicates its readiness for data exchange. This process can take several seconds, depending on the scope of the calculations, which the slave has to carry out based on the parameter and configuration data it has received.
  • Parameter data
    The master sends the parameter data to the slaves with the SetPrmLock request telegram. The SetPrmLock response telegram contains no data and only consists of one byte, which represents a short acknowledgement. The parameter data consist of DP parameters (e.g. the DP watchdog and the ID number), the DPV1/DPV2 parameters and application-specific parameters, which only have to be transferred once during startup. If an error is found in the parameter data, this is indicated in the diagnostic data, and the slave either remains in or enters the WAIT-PRM state.
  • Configuration data
    The master sends the configuration data to the slaves with the ChkCfg request telegram. The ChkCfg response telegram contains no data and only consists of one byte, which represents a short acknowledgement. The configuration data describes the assignment of the DP modules to the cyclic I/O data that is to be exchanged between the master and slave via the Data_Exchange telegram in the cyclic data exchange phase. The order of the DP modules attached to a slave determines the order of the corresponding I/O data in the data exchange telegram.
  • Diagnostic data
    The master requests the diagnostic data with a SlaveDiag request telegram. The slave sends the diagnostic data with a SlaveDiag response telegram. The diagnostic data consist of the standard DP diagnostic data (e.g. state of the slave, ID number) and application-specific diagnostic data.
  • Cyclic data exchange
    At the core of the PROFIBUS DP protocol is the cyclic data exchange, during which the master exchanges I/O data with each slave within a PROFIBUS DP cycle. The master sends the outputs to each slave with a DataExchange request telegram. The slave returns the inputs in a DataExchange response telegram. This means that all the output and/or input data is transmitted in one telegram, in which the DP configuration (the sequence of DP modules) specifies the assignment of the output and/or input data to the slave's actual process data.
  • Diagnosis during cyclic data exchange
    A slave can send a diagnostics signal to the master during cyclic data exchange. In this case, the slave sets a flag in the DataExchange response telegram, whereby the master recognizes that there is new diagnostic data at the slave. The master then fetches these data with a SlaveDiag telegram. The diagnostic data is therefore not available at the same time as the cyclic I/O data, but always delayed by at least one DP cycle.
  • Synchronisation with Sync and Freeze
    The Sync and Freeze commands in the GlobalControl request telegram allow the master to synchronise the activation of the outputs (Sync) or the reading of the inputs (Freeze) in a number of slaves.
    If sync commands are used, the slaves are initially switched to sync mode (this is acknowledged in the diagnostic data). The I/O data are then exchanged sequentially exchanged with the slaves via DataExchange telegrams. When the sync command is sent in the GlobalControl telegram, the slaves issue the last received outputs. In Freeze operation a Freeze command is first sent in the GlobalControl telegram, in response to which all the slaves latch their inputs. These are then fetched sequentially by the master in the DataExchange telegram.
  • States in the master
    The master distinguishes between the CLEAR state (all outputs are set to the Fail_Safe value) and the OPERATE state (all outputs have the process value). The Master is usually switched into the CLEAR mode when, for instance, the PLC enters STOP.
  • Class 1 and Class 2 DP Masters
    The Class 1 master refers to the controller that carries out cyclic I/O data exchange with the slaves, while a Class 2 master is a B&B device that generally only has read access to the slaves' I/O data.

 

PROFIBUS DPV1

PROFIBUS DPV1 refers primarily to the acyclic read and write telegrams, with which data sets in the slave are acyclically accessed. A distinction between a Class 1 and a Class 2 master is also made for DPV1.

  • Class 1 (C1)
    The acyclic C1 connection is established with the DP startup during cyclic DP operation. Acyclic DPV1 C1 read and write telegrams can be sent from the master to the slave from the state WAIT-CFG of the slave.
  • Class 2 (C2)
    In the case of C2, a second C2 master usually establishes a separate connection, independent of the cyclic DP connection, so that a manufacturer-specific project planning and diagnostic tool can access the slave data, for example.
    If two masters are used, please note that they share the bus access, and the temporal conditions are therefore less favorable compared with a single master.