Method for optimizing modbus protocol to read data

A technology for reading data and protocols, applied in the field of data reading, it can solve the problems of not providing one-time batch reading, difficult to verify data, and high time overhead, so as to achieve low overhead, performance improvement, and load and overhead reduction. Effect

Active Publication Date: 2022-07-01
WUXI XUELANG DIGITAL TECH CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the traditional Modbus protocol does not provide a method to read multiple discrete points (discrete points) in batches at one time, so that when reading a large number of discrete points, only a single point can be read. The efficiency of obtaining data is extremely low, and the time overhead is very high; and sometimes it is difficult to verify whether the data is abnormal only through the data check code in Modbus, especially when there is packet loss in high-speed data, or there is Abnormal data attack

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 for optimizing modbus protocol to read data
  • Method for optimizing modbus protocol to read data
  • Method for optimizing modbus protocol to read data

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0049]In order to further illustrate the various embodiments, the present invention provides accompanying drawings, which are part of the disclosure of the present invention, and are mainly used to illustrate the embodiments, and can be used in conjunction with the relevant descriptions in the specification to explain the operation principles of the embodiments. For these, those of ordinary skill in the art will understand other possible implementations and the advantages of the present invention. Components in the figures are not drawn to scale, and similar component symbols are generally used to represent similar components.

[0050] According to an embodiment of the present invention, a method for optimizing the read data of the modbus protocol is provided.

[0051] The present invention will now be further described with reference to the accompanying drawings and specific embodiments, such as Figure 1-3 shown, where figure 2 and image 3 ① in represents the connection ...

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 optimizing modbus protocol to read data. The method comprises the following steps: determining a grid size G based on X register addresses of which data needs to be read; applying for a continuous space of which the size is Y, and establishing a corresponding mapping relation between a memory address and a register address; judging whether the memory of the address A + G exceeds the range of the continuous space Y or not; judging whether point locations needing to be read exist in the addresses from A to (A + G-1) or not; reading the data in the A-(A + G-1) addresses in batches, and judging whether the data read in batches succeeds or not; storing the read data into a memory space corresponding to the register address; and extracting numerical values corresponding to the X register addresses of which the data needs to be read from the corresponding memory space addresses. According to the method, when a large number of discrete point locations are read, the performance can be improved by 20-50 times, the load and overhead caused to a PLC are greatly reduced, and the safety and accuracy of data are ensured through a dual verification mode of matching degree analysis of a check code and a preset sequence feature library.

Description

technical field [0001] The invention relates to the technical field of data reading, in particular, to a method for optimizing modbus protocol reading data. Background technique [0002] Modbus protocol is a balanced response communication protocol widely used in the field of industrial automation, and has become a general industrial standard. The Modbus protocol supports traditional serial ports (RS-232, RS-422, RS-485) and Ethernet devices. Modbus communication uses the master (Master, also known as the master station)-slave (Slave, also known as the slave station) technology, that is, at the same time, only one master station device can initialize the transmission (query, also called request, and the sequential query is called polling ), the slave device responds accordingly according to the data provided by the master device query. The master station device can communicate with the slave station devices individually, and can also communicate with all the slave station ...

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 Applications(China)
IPC IPC(8): G06F12/06G06F12/0817H04L12/40
CPCG06F12/06G06F12/0817G06F12/0646H04L12/40H04L2012/40228Y02D10/00Y02P90/02
Inventor 王峰李行洲
Owner WUXI XUELANG DIGITAL TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products