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 |
15ABC_HS_SEND: New gateway diagnostic
(See description of bit 15 of the
14ABC_HS_CONFIRM: Acknowledgement bit of a
13ABC_DU: Modbus exchanges activated
The gateway activates this bit to tell the
This bit is deactivated by the gateway when the FB_DU bit is deactivated, that is to say when the
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.
12Periodicity 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- 7 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
•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
• 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
41