Unlock instant, AI-driven research and patent intelligence for your innovation.

Method of applying modbus RTU protocol on tcp/ip network

An IP network and protocol technology, applied in the bus network, data exchange through path configuration, electrical components, etc., can solve the problems of distinguishing two frames, difficult to implement Modbus RTU protocol application, unable to use time gap, etc., to achieve stable application effect. Effect

Inactive Publication Date: 2016-08-17
上海爱控自动化设备有限公司
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, due to the characteristics of the TCP / IP network itself, it is impossible to use the time gap to distinguish two frames, and Modbus RTU is not designed for the TCP / IP network. In the field of the protocol itself, there is not enough explicit information available in the TCP / IP network. Identify the end of a frame
Therefore, it is currently difficult to implement the application of the Modbus RTU protocol on the TCP / IP network

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method of applying modbus RTU protocol on tcp/ip network
  • Method of applying modbus RTU protocol on tcp/ip network
  • Method of applying modbus RTU protocol on tcp/ip network

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0039] like figure 1 As shown, the method for applying the Modbus RTU protocol on a TCP / IP network, which includes a client and a server in the TCP / IP network, includes the following steps:

[0040] In step S0, the server starts monitoring on a socket port, and the client establishes a connection to the socket port to start communication.

[0041] Step S1, the client sends a request to the server, the request includes several request frames, and waits for the server to respond.

[0042] Step S2, the server side receives the request frames sequentially, for each request frame:

[0043] The server reads the first byte of the current request frame and obtains the address of the slave station;

[0044] The server reads the next byte of the current request frame to obtain the function code;

[0045] Judge the byte length of the data area of ​​the current request frame according to the function code; if the byte length of the data area of ​​the request frame is N, the server read...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method for applying the Modbus RTU protocol on a TCP / IP network. The TCP / IP network includes a client and a server, including the following steps: for each request frame: first read the first two bytes , according to the function code to judge the byte length of the data area of ​​the current request frame, the server side obtains the content of the data area; the server side reads the next two bytes of the current request frame to obtain the CRC check code; for each response frame: First read the first two bytes, judge the byte length of the data area of ​​the current response frame according to the function code, and the client obtains the content of the data area; the client reads the next two bytes of the current response frame to obtain the CRC check code. The present invention has the following beneficial effects: the application of the Modbus RTU protocol on the TCP / IP network is realized, and the application effect is stable; the byte size of the frame can be inferred according to the function code in each frame of the Modbus RTU protocol, and each frame can be accurately judged. The size of a frame, effectively identifying the end of each frame.

Description

technical field [0001] The invention belongs to the technical field of communication, and in particular relates to a method for applying the ModbusRTU protocol on a TCP / IP network. Background technique [0002] The industrial standard Modbus protocol is widely used in the communication mode of the industrial field. The Modbus protocol has two formats, namely: Modbus RTU and Modbus TCP / IP. The former is used in scenarios such as 485 serial bus, and the latter is used in a TCP / IP network environment. However, due to special requirements, in some cases it is necessary to apply the protocol data in the Modbus RTU format under the TCP / IP network. However, because the Modbus RTU format and the TCP / IP network have their own characteristics and cannot be compatible with each other, the Modbus RTU protocol has not been implemented at present. An effective method applied under TCP / IP network. [0003] Modbus is a communication protocol in units of frames, where the format of each fr...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): H04L29/06H04L12/40
Inventor 杨新宇邓刚蔡志康赵瑞胡献
Owner 上海爱控自动化设备有限公司