5. Gateway Initialization and Diagnostics
Bits Description
14FB_HS_SEND: New command from the DeviceNet master
Before changing the value of FB_DU, the DeviceNet master must compare the values of FB_HS_SEND and ABC_HS_CONFIRM (bit 14 of the gateway’s status word). If these two values are different, this means that the gateway has not yet acknowledged the previous DeviceNet master command. Else, the DeviceNet master can issue a new command, updating the FB_DU bit according to the nature of its command (shutdown or activation of Modbus exchanges), then toggling the value of the FB_HS_SEND bit to inform the gateway that it has sent it a new command.
Summary:
•If ( FB_HS_SEND ≠ ABC_HS_CONFIRM ) Æ The DeviceNet master command word still contains a command which has not yet been acknowledged by the gateway. So the DeviceNet master cannot use this word to place a new command in it.
•Else Æ The previous command of the DeviceNet master has been acknowledged by the gateway, which allows it to transmit a new command. In this case, it changes the value of the FB_DU bit, then toggles the value of the FB_HS_SEND bit.
13FB_DU: Modbus exchange startup
The setting of this bit to one by the DeviceNet master allows communications between the gateway and the Modbus slaves. Resetting it to zero is used to inhibit them.
When the DeviceNet master sets this bit to one, it is preferable for all of the output data it has placed in the gateway’s output memory to be
Due to the inversion of the LSB and the MSB for this register between the gateway and the DeviceNet master, the structure of the corresponding output word (“O:1.1” in the case of the default configuration) is as follows:
Bits | Description |
Reserved. | |
7 | FB_HS_CONFIRM: Acknowledgement bit of a gateway diagnostic |
6 | FB_HS_SEND: New DeviceNet master command word |
5 | FB_DU: Modbus exchange startup |
Reserved. |
e.g. If the O:1.1 output word is set to 16#00A0, the DeviceNet master command word will be set to 16#A000.
The correct use of this command word by the DeviceNet master, to transmit a new command to the gateway, goes through the following steps:
•Checking of (FB_HS_SEND = ABC_HS_CONFIRM).
• The command, that is to say the value of the FB_DU bit, is updated.
• The value of the FB_HS_SEND bit is inverted.
N.B. It is possible to simplify this use as follows:
•The FB_DU and FB_HS_SEND bits are set to one to activate the Modbus communications.
•The FB_DU and FB_HS_SEND bits are reset to halt Modbus communications.
On the other hand, do not write directly in
34