41
5. Gateway Initialization and Diagnostics
5.2.2. Gateway Status Word
The input word located at addresses 16#0000 (MSB) and 16#0001 (LSB) in the gateway’s input memory
constitutes the gateway’s status word. Its structure is described below:
Bits Description
15
ABC_HS_SEND: New gateway diagnostic
(See description of bit 15 of the Profibus-DP master command word, FB_HS_CONFIRM.)
14
ABC_HS_CONFIRM: Acknowledgement bit of a Profibus-DP master command
(See description of bit 14 of the Profibus-DP master command word, FB_HS_SEND.)
13
ABC_DU: Modbus exchanges activated
The gateway activates this bit to tell the Profibus-DP master that the Modbus data located in its input
memory area have all been updated at least once since the last activation of FB_DU (“ABC_DU”
means “ABC – Data Updated”). These Modbus input data include every data in responses from all
Modbus slaves, for both periodic commands and aperiodic commands.
This bit is deactivated by the gateway when the FB_DU bit is deactivated, that is to say when the
Profibus-DP master demands a shutdown of Modbus exchanges.
N.B. Once it is active, this bit is not deactivated if there are any communication errors with the
Modbus slaves. To signal this type of error, the gateway uses bit 12 of its status word.
12
Periodicity of Modbus exchanges
The gateway activates this bit provided that it is periodically communicating with all of the Modbus
slaves. It deactivates it as soon as it loses communication with one of them.
The “Reconnect time (10ms)”, “Retries” and “Timeout time (10ms)” elements of each of the Modbus
queries (see chapter 6.11.2.2 Configuring the Query, page 72) are used to determine whether
communication is lost, then restored.
N.B. If a number of periodic exchanges are configured for the same Modbus slave, only one of them
needs to remain active for the periodic communications with this slave to be declared active.
8-11
EC: Error code associated with the Modbus network
Code of the error detected on the Modbus network by the gateway and transmitted to the Profibus-
DP master.
0-07
ED: Error data item associated with the Modbus network
Data item associated with the EC error code.
The correct use of this status word by the Profibus-DP master, to read a diagnostic generated by the gateway,
goes through the following steps:
• Checking of (ABC_HS_SEND ≠ FB_HS_CONFIRM).
• Reading of the value of ABC_DU to determine whether all of the Modbus input data are up-to-date.
• Reading of the value of the bit 12 to determine whether the periodicity of the Modbus communications
has been maintained.
• Reading of the values of EC and ED to check for any error detected by the gateway on the Modbus
network (see table on the next page).
• Copying of the value of the ABC_HS_SEND bit to the FB_HS_CONFIRM bit.
This last step is essential because it allows the gateway to transmit a future diagnostic in order
not to “loose” any further error reporting! Even if you do not wish to read the content of the
gateway’s status word, it is preferable to automate this step in your Profibus-DP master
software.