Modbus Protocol Specification


How This Information is Organized in Your Guide



tải về 0.61 Mb.
Chế độ xem pdf
trang22/35
Chuyển đổi dữ liệu14.05.2023
Kích0.61 Mb.
#54683
1   ...   18   19   20   21   22   23   24   25   ...   35
modbus protocol

How This Information is Organized in Your Guide
An example diagnostics query and response are shown on the opposite page. These show the
location of the function code, subfunction code, and data field within the messages.
A list of subfunction codes supported by the controllers is shown on the pages after the example
response. Each subfunction code is then listed with an example of the data field contents that
would apply for that diagnostic.
Query
Here is an example of a request to slave device 17 to Return Query Data. This uses a
subfunction 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).
http://www.modicon.com/techpubs/diag7.html (2 of 16) [1/11/2000 10:43:10 PM]


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.

tải về 0.61 Mb.

Chia sẻ với bạn bè của bạn:
1   ...   18   19   20   21   22   23   24   25   ...   35




Cơ sở dữ liệu được bảo vệ bởi bản quyền ©hocday.com 2024
được sử dụng cho việc quản lý

    Quê hương