10
Operation
Cyclic Operation
Usually, PROFIBUS-DP communication is cyclical.- This means
that the data is transmitted between the master and the slave in a
special, permanently repeated rhythm.- The number of bytes
transmitted from the master to the slave (output data) or from the
slave to the master (input data) is the same for every transfer
action. - However, the volume of the input data is different from
that of the output data.
This situation can only be changed through reconfiguration, or
through redefinition of parameters. --
When PROFIBUS-DP communication was defined, a maximum
size was fixed for the data blocks that can be transmitted from the
master to the slave and vice versa. - The exact number of bytes
that can be transferred in the respective direction is specified in
the device database file (GSD file) of every device designed for
PROFIBUS-DP communication.- With controllers, usually 224
input data bytes and 64 output data bytes can be transmitted. -
However, up to 2000 different data are available for reading/writing
with most of these devices. Therefore, the user must define in an
application-specific description the data that are to be
communicated in the input or output data. ---
This application-specific description is written into the
slave-specific parameter data set ("User_Prm_Data") of the
master. - Up to 224 bytes can be entered here. The first 4 bytes
are already predefined. This means that 220 bytes are available
for definition.
Usually, indices in 16-bit integer format are used to define which
data is to be read/written cyclically.---- Please refer to section
"Addressing the Data" for details about index assignment to the
variables and online parameters in both decimal and hexadecimal
format.--- Up to 110 variables and online parameters can be
defined in the 220 available bytes.-
Reading Values (Cyclically)
The description for cyclic reading of one or more values can be
defined in the "User_Prm_Data" data of the respective slave
through several subsequent indices. - The order is very important.
The input data are transmitted from the master to the slave in the
same order in which they are defined in the "User_Prm_Data".---
Example
The measuring values from the four analog inputs of the first
module are to be read cyclically in the order .AE11, .AE12, .AE13,
and .AE14.
Variable
Data type
PROFIBUS-DP index (decimal)
.AE11
REAL
5
.AE12
REAL
7
.AE13
REAL
9
.AE14
REAL
11
From this results for "User_Prm_Data":
User_Prm_Data = .., .., .., .., 5, 7, 9, 11 End_User_Prm_Data
The 4 bytes at the beginning of the slave-specific parameter data
(.., .., .., ..,) are predefined and must not be used for defining
variables. - Refer to section "Peculiarities of "User_Prm_Data"" for
details. -
As a result, the slave will return 16 bytes to the master. - The first
4 bytes contain the value of variable .AE11 in REAL format. - The
second 4 bytes contain the value of variable .AE12 in REAL
format, and so on. -
This example assumes that the necessary configuration
information for the bus system has been provided without errors in
the slave-specific data of the master, and has been accepted by
the addressed slave. ---
Refer to section "Addressing the Data" for the assignment of the
indices to the variables and online parameters.-