开放型MODBUS-TCP规范(英文版)

MODBUS/TCP 是一种用于工业自动化设备间通信的协议,它基于 TCP/IP 协议,提供了连接导向性和数据编码规范。该规范详细介绍了不同功能代码,如读取/写入多个寄存器、读取/写入输入和输出状态等,并分为不同的符合性类别。MODBUS/TCP 使用 'big-endian' 数据编码,允许通过参考号码访问不同表格中的数据。协议结构中,请求和响应都包含交易标识符、协议标识符和长度字段,且MODBUS的CRC校验在MODBUS/TCP中不再使用,依赖于TCP/IP的校验机制。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

导读:
   OPEN Modbus /TCP SPECIFICATION
  Release 1.0, 29 March 1999
  Andy Swales
  Schneider Electric
  aswales@modicon.com
  
   Contents
  Contents............ 2
  1. Status of this specification...... 3
  2. Overview........ 3
  2.1 Connection-oriented.............. 3
  2.2 Data encoding........ 4
  2.3 Interpretation of reference numbers......... 4
  2.4 Implied length philosophy.... 5
  3. Conformance class summary... 5
  3.1 Class 0...... 5
  3.2 Class 1...... 5
  3.3 Class 2...... 6
  3.4 Machine/vendor/network specific functions....... 7
  4. Protocol structure............. 7
  5. Protocol reference by conformance class.................... 8
  5.1 Class 0 commands detail............... 9
  5.1.1 Read multiple registers (FC 3)................ 9
  5.1.2 Write multiple registers (FC 16).............. 9
  5.2 Class 1 commands detail............. 10
  5.2.1 Read coils (FC 1).................. 10
  5.2.2 Read input discretes (FC 2).............. 10
  5.2.3 Read input registers (FC 4).............. 11
  5.2.4 Write coil (FC 5) 11
  5.2.5 Write single register (FC 6).................. 12
  5.2.6 Read exception status (FC 7).................. 12
  5.3 Class 2 commands detail............. 13
  5.3.1 Force multiple coils (FC 15)..... 13
  5.3.2 Read general reference (FC 20)..... 14
  5.3.3 Write general reference (FC 21)..... 15
  5.3.4 Mask write register (FC 22)..... 16
  5.3.5 Read/write registers (FC 23)............ 16
  5.3.6 Read FIFO queue (FC 24)..... 17
  6. Exception codes................ 17
  Appendices..... 19
  A. Client and Server Implementation Guidance.......... 19
  A.1 Client design.......... 19
  A.2 Server design.......... 20
  A.2.1 Multithreaded server... 20
  A.2.2 Single-threaded server 21
  A.3 Required and expected performance 22
  B. Data Encoding for non-word data........................... 23
  B.1 Bit numbers within a word...................... 23
  B.2 Multi-word quantities..... 24
  B.2.1 984 Data Types.................. 24
  B.2.2 IEC-1131 data types 25
  
   1. Status of this specification
  
  Initial release 3 Sept 1997
  
  Draft for public review.
  
  Re-release 29 March 1999 at Revision 1.0.
  
  No technical changes, clarifications only.
  Added Appendices A and B in response to common implementation questions.
  
  
  This specification of Modbus/TCP is being published by being publicly visible on the World Wide Web. It is intended for the benefit of developers wishing to use MODBUS/TCP as an interoperability standard in the field of industrial automation.
  
  Since MODBUS and MODBUS/TCP are in reality ‘de-facto’ standards, in that many vendors and products implement it already, this specification primarily explains the specific encoding of MODBUS messages over the TCP communication protocol universally available on the Internet.
  
  
   2. Overview
  
  MODBUS/TCP is a variant of the MODBUS family of simple, vendor-neutral communication protocols intended for supervision and control of automation equipment. Specifically, it covers the use of MODBUS messaging in an ‘Intranet’ or ‘Internet’ environment using the TCP/IP protocols. The most common use of the protocols at this time are for Ethernet attachment of PLC’s, I/O modules, and ‘gateways’ to other simple field buses or I/O networks.
  
  The MODBUS/TCP protocol is being published as a (‘de-facto’) automation standard. Since MODBUS is already widely known, there should be little information in this document which could not be obtained elsewhere. However, an attempt has been made to clarify which functions within MODBUS have value for interoperability of general automation equipment, and which parts are ‘baggage’ from the alternate use of MODBUS as a programming protocol for PLC’s.
  
  This is done below by grouping supported message types into ‘conformance classes’ which differentiate between those messages which are universally implemented and those which are optional, particularly those specific to devices such as PLC’s.
  
   2.1 Connection-oriented
  
  In MODBUS, data transactions are traditionally stateless, making them highly resistant to disruption from noise and yet requiring minimal
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值