Response
The normal response to the Return Query Data request is to loopback the same data. The
function code and subfunction code are also echoed.
The data fields in responses to other kinds of queries could contain error counts or other
information requested by the subfunction code.
3.2 Diagnostic Codes Supported by Controllers
Subfunction
codes are listed in decimal; Y indicates that the subfunction is supported, and N
indicates that it is not supported.
http://www.modicon.com/techpubs/diag7.html (3 of 16) [1/11/2000 10:43:10 PM]
3.2.1 00 Return Query Data
The data passed in the query data field is to be returned (looped back) in the response. The
entire response message should be identical to the query.
3.2.2 01 Restart Communications Option
The slave's peripheral port is to be initialized and restarted, and all of its communications event
counters are to be cleared. If the port is
currently in Listen Only Mode, no response is returned.
This function is the only one that brings the port out of Listen Only Mode. If the port is not
currently in Listen Only Mode, a normal response is returned. This
occurs before the restart is
executed.
When the slave receives the query, it attempts a restart and executes its power-up confidence
tests. Successful completion of the tests will bring the port online.
http://www.modicon.com/techpubs/diag7.html (4 of 16) [1/11/2000 10:43:10 PM]
A query data field contents of FF 00 hex causes the port's Communications
Event Log to be
cleared also. Contents of 00 00 leave the log as it was prior to the restart.
Chia sẻ với bạn bè của bạn: