Chapter 5 - Connection to a controller
Version EN-092019-1.21
33
5.1.4
Acyclic communication
The Modbus Gateway has a register-based communication interface for acyclic reading and writing of
PROFIBUS device parameters. There are 128 registers reserved per segment. The first 5 registers are
control registers which are used to process the command protocol. The remaining 123 registers are used
as data registers. The base register numbers for the segments are 9012, 9140, 9268 and 9396.
Note
The registers of the command interface can only be addressed as holding registers.
Acyclic reading
The controller initiates acyclic PROFIBUS reading by writing a specific command to the control registers of
the command interface (see table below). The command must be written by consistent multiple register
access.
Register
Value
base re 0
1
base re 1
station address of the PROFIBUS device
base re 2
slot number within the device
base re 3
parameter index within the slot
base re 4
Maximum number of data bytes to be read. The maximum value is 246.
The gateway responds immediately to the writing access. Depending on whether the values in the control
registers are valid writing access is granted or refused. If writing access is granted, the controller must read
the control registers of the command interface by consistent multiple register access. The gateway will
refuse reading access if the data which is to be read is not yet available. In this case the controller must
repeat the reading access until access is granted. The following table shows which values are available in
each register.
Register
Value
base re 0
2
base re 1
station address of the PROFIBUS device
base re 2
slot number within the device
base re 3
parameter index within the slot
base re 4
actual number of data bytes
The controller must now read the device data from the data registers of the command interface by
consistent multiple register access. The first data register which is read is always base re 5. The last
data register which is read depends on the length of the data the gateway provides in base re 4 and
results in base re 5 + (data length / 2). The following table shows the arrangement of the data
registers.
Register
Value
base re 5
first and second byte of the read data
base re 6
third and fourth byte of the read data
base re 7
fifth and sixth byte of the read data
...
The first, third, fifth, ... byte is located in the high byte of a register. The second, fourth, sixth .....byte is
located in the low byte of a register.