00 return query data, Example and state diagram – ProSoft Technology MVI71-MNET User Manual
Page 93

Reference MVI71-MNET
♦ PLC Platform
User Manual
Modbus TCP/IP Interface Module
ProSoft Technology, Inc.
Page 93 of 109
June 23, 2009
A server device can, however, be forced into 'Listen Only Mode' in which it will
monitor the messages on the communications system but not respond to them.
This can affect the outcome of your application program if it depends upon any
further exchange of data with the remote device. Generally, the mode is forced to
remove a malfunctioning remote device from the communications system.
The following diagnostic functions are dedicated to serial line devices.
The normal response to the Return Query Data request is to loopback the same
data. The function code and sub-function codes are also echoed.
Request
Function code
1 Byte
0x08
Sub-function 2
Bytes
Data
N x 2 Bytes
Response
Function code
1 Byte
0x08
Sub-function 2
Bytes
Data
N x 2 Bytes
Error
Error code
1 Byte
0x88
Exception code
1 Byte
01 or 03 or 04
Sub-function codes supported by the serial line devices
Only Sub-functions 00 is supported by the MVI71-MNET module.
00 Return Query Data
The data passed in the request data field is to be returned (looped back) in the
response. The entire response message should be identical to the request.
Sub-function
Data Field (Request)
Data Field (Response)
00 00
Any
Echo Request Data
Example and state diagram
Here is an example of a request to remote device to Return Query Data. This
uses a sub-function code of zero (00 00 hex in the two-byte field). The data to be
returned is sent in the two-byte data field (A5 37 hex).
Request
Response
Field Name
(Hex)
Field Name
(Hex)
Function 08
Function 08
Sub-function Hi
00
Sub-function Hi
00
Sub-function Lo
00
Sub-function Lo
00
Data Hi
A5
Data Hi
A5
Data Lo
37
Data Lo
27