Справочник Пользователя для EMSA HS500E

Скачать
Страница из 82
C H A P T E R   6 :   M O D B U S   T C P   P R O T O C O L  
6 . 2 . 2   M o d b u s  
T C P  
C o m m a n d ,   R e s p o n s e   &  
H a n d s h a k i n g   E x a m p l e  
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. 
 
H S 5 0 0 E   –   O P E R A T O R ’ S   M A N U A L                                          
P / N :   1 7 - 1 3 0 5   R E V 0 2   ( 1 2 - 0 5 )  
P A G E   5 6   O F   8 2