Emsa HS500E Car Stereo System User Manual


 
CHAPTER 6: MODBUS TCP PROTOCOL
6.2.2 Modbus TCP Command, Response &
Handshaking Example
1
The Host issues an RFID command to the HS500E, writing the command
string to the holding registers for Device ID 1. An Overall Length value of
0x06 is written last to holding register 40001.
2
The HS500E recognizes that the Overall Length value at holding register
40001 for Device ID 1 has changed, indicating that it has data waiting to be
retrieved.
3
The HS500E retrieves the data and clears the Overall Length holding register
of Device ID 1 - setting it back to its default value of zero (0x00).
Note: when the value stored at register 40001 of Device ID 1 returns to 0x00, the
Host can assume that the command was at least received and execution was
attempted. The Host will also assume that it is now OK to write another
command to the holding registers of Device ID 1.
4
The HS500E, now having retrieved the pending data from the holding
registers for Device ID 1, executes the command accordingly.
5
As the HS500E finishes executing the given command, it generates a Host-
bound command response. Response data is written to the holding registers
for Device ID 33, the Overall Length value is, again, written last to holding
register 40001.
Note: Host-bound data is always written to Device ID 33 by the HS500E.
6
Because the holding register at 40001 (Overall Length value) of Device ID 33
now contains a non-zero length value, the Host recognizes that there is
response data from the HS500E waiting to be retrieved.
7
The Host imports the pending data from the holding registers of Device ID 33
and then clears (sets back to 0x00) the Overall Length value at register
40001.
Note: the clearing of register 40001 of Device ID 33 indicates to the HS500E that
the Host has indeed received the command response and that it is now OK to
write another response to the holding registers of Device ID 33.
This completes the Modbus TCP handshaking cycle.
HS500E – OPERATOR’S MANUAL P/N: 17-1305 REV02 (12-05)
PAGE 56 OF 82