GPD315 Modbus RTU Technical Manual TM 4325
Page
13
The function code of this message is 08h (loop-back test).
The test code must be set to ‘0000’. This function specifies that the data passed in the command
message is to be returned (looped back) in the response message.
The data section contains arbitrary data values. These data values are used to verify that the
slave receives the correct data.
A CRC-16 value is generated from a calculation using the values of the address, function code,
test code, and data sections of the message. The procedure for calculating a CRC-16 is
described at the end of this chapter. When the slave receives the command message it
calculates a CRC-16 value and compares it to the one in CRC-16 field of the command
message. If these two CRC-16 values are the same the slave has received the proper command
message. If these two CRC-16 values are not the same the slave does not respond.
If the command message has a valid slave address, function code, test code, and data value,
the slave will respond with a normal response message. If the command message has an invalid
slave address, function code, test code, and/or data value the slave will respond with a fault
response message.
Loop Back Normal Response
Table 4-6 Loop Back Normal Response Message
Slave Address
01h
Function Code
08h
Upper
00h
Test Code
Lower
00h
Upper
A5h
Lower
37h
Data
Upper
ACh
Lower
Dah
CRC-16
Upper
8Dh
Loop Back Fault Response
Table 4-7 Loop Back Fault Response Message
Slave Address
01h
Function Code
88h
Error Code
01h
Lower
87h
CRC-16
Upper
C0h
The fault response message contains the same slave address as the command message,
indicating to the master which slave is responding.
The function code of a fault response message is actually a value of 80h plus the original
function code of 08h. This indicates to the master that the message is a fault response message,
instead of a normal response message.
The error code indicates where the error occurred in the command message. A complete listing
of the error codes is shown in Chapter 6, Troubleshooting and Error Codes.
Содержание GPD 315/V7
Страница 1: ...GPD 315 V7 Modbus RTU Technical Manual...