Data reading method and system

By determining the device address and register address of the slave in the communication box, and only reading the target data, the problem of long data interaction time and packet loss under the Modbus RTU protocol is solved, and efficient and reliable data transmission is achieved.

CN118642989APending Publication Date: 2024-09-13ARCTECH SOLAR HOLDING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410840746.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

In the communication box, when using the standard Modbus RTU data protocol for data interaction, it is necessary to read data from multiple consecutive register addresses, resulting in an increase in data interaction time. Especially when there are few data types, the message length is too long and may cause loss. package problem.

Method used

The host determines the device address number of the target slave and the register address information of each target data in the slave, generates a data read instruction and sends it to the slave. The slave only responds with the target data, and the host receives and verifies the response data. , ensure that the data exchange format is consistent and avoid reading of irrelevant data and excessive message length.

Benefits of technology

It reduces the data interaction time between the master and the slave, avoids the packet loss problem caused by too long message length, and improves the accuracy of data transmission and the reliability of interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118642989A
    Figure CN118642989A
Patent Text Reader

Abstract

The invention relates to the technical field of data communication, and relates to a data reading method and system. The method comprises the following steps: determining an equipment address number of a target slave and target data to be read through a host; determining register address information of the target data in the target slave through the host; generating a data reading instruction through the host and sending the data reading instruction to the slave, wherein the data reading instruction comprises an equipment address number of the target slave and register address information corresponding to each piece of target data; a data reading instruction is received through the target slave, a data response instruction is generated, and the data response instruction comprises target data corresponding to the register address information; and receiving the data response instruction through the host, and reading the target data in the data response instruction. The method comprises the following steps: determining an equipment address number of a target slave and register address information of each piece of target data in the target slave through a host; therefore, the host only needs to read the data of the related register and does not need to read the data of other irrelevant registers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data communication technology, and further to a data reading method and system. Background Art

[0002] At present, communication boxes collect tracker information and generally use the standard Modbus RTU data protocol for data exchange. In order to obtain the basic operation information of the tracker, it is necessary to read the data of multiple continuous register addresses, which increases the time of data exchange. Especially when the data type to be read is small, the continuous reading method leads to a longer message length, which affects the reading efficiency of the communication box. Summary of the invention

[0003] In order to solve the above technical problems, the present application provides a data reading method and system, which reduces the time of data interaction.

[0004] In a first aspect, the present application provides a data reading method, which is used for a host to read data from a target slave among slaves, the host communicates with the slaves through a communication protocol, and each of the slaves includes multiple registers, including: determining the device address number of the target slave and the target data to be read by the host; determining the register address information of the target data in the target slave by the host; generating a data read instruction by the host and sending it to the slave, the data read instruction including the device address number of the target slave and the register address information corresponding to each target data; receiving the data read instruction by the target slave and generating a data response instruction, the data response instruction including the target data corresponding to the register address information; receiving the data response instruction by the host, and reading the target data in the data response instruction.

[0005] The above data reading method determines the device address number of the target slave and the register address information of each target data in the target slave through the host. When the host reads the register data of the target slave, it only needs to read the data of the relevant register, without reading the data of other irrelevant registers, which reduces the time for data interaction between the host and the slave and avoids the packet loss problem caused by the long message length.

[0006] In one implementation, the communication protocol is used to determine the data exchange format between the host and the slave, so that the host reads the target data through the data read instruction, and the register address information in the data read instruction is non-continuous address information.

[0007] In one implementation, the data read instruction also includes quantity information of the target data to be read and a first read check code, and the data response instruction includes quantity information of data returned by the device address number of the target slave and a second read check code.

[0008] The above data reading method determines the data exchange format between the host and the slave, so that when the host reads the register data and the slave responds to the register data, it only needs to process the register data required by the user, which reduces the data interaction time and avoids the packet loss problem caused by the long message length. At the same time, the master and the slave interact through a specific data exchange format, which improves the reliability of the interaction between the master and the slave.

[0009] In one implementation, it also includes: obtaining the register address information of multiple target data from the communication protocol through the host, placing the multiple register address information at corresponding positions in the data read instruction, and sending the data read instruction to the slave; according to the arrangement order of the multiple register address information corresponding to the multiple target data in the data read instruction, controlling the slave to place each target data in the data response instruction in sequence, and sending the data response instruction to the host.

[0010] In one implementation, before the target slave receives the data read instruction and generates a data response instruction, it also includes: receiving the data read instruction through the slave, and performing a cyclic redundancy check on the data read instruction to generate a first response check code; determining whether the first response check code and the first read check code are the same, and if they are the same, it is the target slave.

[0011] In the above data reading method, each slave determines the target slave by comparing the first response verification code with the first read verification code. Then the target slave is controlled to place the target data of the corresponding register in the data response instruction so that the host can read it, thereby improving the accuracy of data transmission and the efficiency of data interaction between the host and the slave, and avoiding errors in the interaction between the host and the slave.

[0012] In one implementation, after the host receives the data response instruction, it also includes: the host performs a cyclic redundancy check on the received data response instruction to generate a second response verification code; the host determines whether the second response verification code and the second read verification code are the same; if they are the same, the data response instruction is determined to be legal.

[0013] In the second aspect, the present application also provides a data reading system, comprising: a host and a slave; the host communicates with the slave through a communication protocol, and each of the slaves includes multiple registers; the host is used to determine the device address number of the target slave and the target data to be read; the host is used to determine the register address information of the target data in the target slave; the host is controlled to generate a data read instruction and send it to the slave, the data read instruction includes the device address number of the target slave and the register address information corresponding to each target data; the target slave is controlled to receive the data read instruction and generate a data response instruction, the data response instruction includes the target data corresponding to the register address information; the host is controlled to receive the data response instruction and read the target data in the data response instruction.

[0014] In one implementation, the communication protocol is used to determine the data exchange format between the host and the slave, so that the host reads the target data through the data read instruction, and the register address information in the data read instruction is non-continuous address information, and also includes: controlling the host to obtain the register address information of multiple target data from the communication protocol, placing the multiple register address information at corresponding positions in the data read instruction, and sending the data read instruction to the slave; according to the arrangement order of the multiple register address information corresponding to the multiple target data in the data read instruction, controlling the slave to place each target data in the data response instruction in turn, and sending the data response instruction to the host.

[0015] In one implementation, the data read instruction also includes the quantity information of the target data to be read and a first read verification code, the data response instruction includes the data quantity information returned by the device address number of the target slave and a second read verification code, and also includes: controlling the slave to receive the data read instruction, and performing a cyclic redundancy check on the data read instruction to generate a first response verification code; the slave is used to determine whether the first response verification code and the first read verification code are the same, and if they are the same, controlling the slave to respond.

[0016] In one implementation, it also includes: controlling the host to perform a cyclic redundancy check on the received data response instruction to generate a second response verification code; the host is used to determine whether the second response verification code and the second read verification code are the same; if they are the same, the host determines that the data response instruction is legal.

[0017] Compared with the prior art, the present invention has at least one of the following beneficial effects:

[0018] 1. The host determines the device address number of the target slave and the register address information of each target data in the target slave, so that when the host reads the register data of the target slave, it only needs to read the data of the relevant register, without reading the data of other irrelevant registers, which reduces the time for data interaction between the host and the slave and avoids the packet loss problem caused by the long message length.

[0019] 2. By determining the data exchange format between the host and the slave, the host only needs to process the register data required by the user when reading the register data and the slave responds to the register data, which reduces the data interaction time and avoids the packet loss problem caused by the long message length. At the same time, the master and slave interact through a specific data exchange format, which improves the reliability of the interaction between the master and slave.

[0020] 3. Each slave determines the target slave by comparing the first response verification code with the first read verification code, and then controls the target slave to place the target data of the corresponding register in the data response instruction so that the host can read it, thereby improving the accuracy of data transmission and the efficiency of data interaction between the host and the slave, and avoiding errors in the interaction between the host and the slave. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The preferred implementation modes will be described below in a clear and understandable manner with reference to the accompanying drawings to further illustrate the above-mentioned characteristics, technical features, advantages and implementation methods of the present invention.

[0022] Figure 1 A flow chart of a data reading method provided by an embodiment of the present application is shown;

[0023] Figure 2 A flow chart for determining a target slave provided by an embodiment of the present application is shown;

[0024] Figure 3 A flowchart of a host determining whether a data response instruction is legal provided by an embodiment of the present application is shown;

[0025] Figure 4 A structural block diagram of a data reading system provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings and other implementation methods can be obtained based on these drawings without creative work.

[0027] In order to simplify the drawings, only the parts related to the invention are schematically shown in each figure, and they do not represent the actual structure of the product. In addition, in order to simplify the drawings and facilitate understanding, in some figures, only one of the parts with the same structure or function is schematically drawn or marked. In this article, "one" not only means "only one", but also means "more than one".

[0028] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0029] In this document, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0030] In addition, in the description of the present application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0031] It should be noted that the above embodiments can be freely combined as needed. The above are only preferred embodiments of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention.

[0032] The communication box is an integrated device in the photovoltaic tracking bracket system. It usually integrates the software and hardware functions of the data collector and supports multiple networking, installation methods, and electrical and environmental protection. It is used for communication collection of photovoltaic sub-arrays, can be connected to equipment such as box transformers, inverters, and environmental monitors, and can convert various communication protocols. As the communication hub of the photovoltaic tracking bracket system, the communication box is responsible for collecting data from the controller and other sensors and devices, monitoring the controller, and transmitting the data to the monitoring system or control center. Among them, the communication box includes intelligent communication boxes, photovoltaic network communication boxes, sub-array communication boxes, etc.

[0033] The communication box and the controller usually use the standard Modbus RTU data protocol for data exchange. In a photovoltaic sub-array, a communication box and multiple controllers are usually set up. A communication box can communicate with multiple controllers in a photovoltaic sub-array to obtain data information from the controller and send operation instructions to the controller. In each controller, there are multiple registers for storing various information, such as motor speed, voltage, current, bracket angle, wind speed, temperature, humidity information, etc. Different registers have different addresses, and registers with different addresses store different types of data. When the communication box needs to read multiple data information from the controller, it first needs to identify the corresponding starting register address and ending register address in the multiple data information, and then read the data of multiple continuous register addresses from the starting register address to the ending register address. The data of these continuous register addresses may include other data information in addition to the target data information that the communication box wants to read, which not only increases the time of data interaction, but also in areas with unstable communication quality, the longer message length may also cause packet loss problems.

[0034] In response to the above problems, an embodiment of the present application provides a data reading method, in which the host determines the device address number of the target slave and the register address information of each target data in the target slave, so that when the host reads the register data of the target slave, only the data of the relevant registers is read, and there is no need to read the data of other irrelevant registers, thereby reducing the time for data interaction between the host and the slave, and avoiding the packet loss problem caused by the excessive length of the message.

[0035] The following is a detailed description with reference to the accompanying drawings. Figure 1 , which shows a flow chart of a data reading method provided by an embodiment of the present application. Figure 1 As shown, including:

[0036] S100, determining the device address number of the target slave and the target data to be read by the host.

[0037] S110, determining register address information of target data in the target slave through the host.

[0038] S120, the host generates a data read instruction and sends it to the slave, where the data read instruction includes a device address number of the target slave and register address information corresponding to each target data.

[0039] S130, receiving a data read instruction through the target slave and generating a data response instruction, wherein the data response instruction includes target data corresponding to the register address information.

[0040] S140, receiving a data response instruction through the host, and reading target data in the data response instruction.

[0041] The host communicates with multiple slaves through a communication protocol, and the host determines the device address number of the target slave and the target data to be read, and determines the register address information corresponding to the target data in the target slave from the communication protocol. The host generates a data read instruction, and the communication module in the host places the device address number of the target slave and the register address information corresponding to each target data in the target slave in the corresponding position of the data read instruction according to the format of the data read instruction. After the slave receives the data read instruction sent by the host, it determines whether there is a slave with the same device address number as the target slave in the data read instruction among the device address numbers of the multiple slaves. If not, the multiple slaves do not respond. If there is a slave with the same device address number as the target slave in the data read instruction, it is determined that the slave is the target slave. At this time, the target slave responds to the host, and the other slaves do not respond. The target slave generates a data response instruction according to the data read instruction. The target slave also extracts the target data required by the host from the corresponding register according to the register address information corresponding to the target data in the data read instruction, and places the target data in the corresponding position in the data response instruction. After the data is placed, the host receives the data response instruction fed back by the target slave, reads the carried target data from the data response instruction, and sends the read target data to the SCADA background. The target slave can be all slaves, or one or more of all slaves. In the embodiment of the present application, the host can be a communication box, and the slave can be a controller.

[0042] In an embodiment of the present application, the host determines the device address number of the target slave and the register address information of each target data in the target slave, so that when the host reads the register data of the target slave, it only needs to read the data of the relevant registers, and there is no need to read the data of other irrelevant registers, thereby reducing the time for data interaction between the host and the slave, and avoiding the packet loss problem caused by the excessive length of the message.

[0043] In some embodiments of the present application, a communication protocol is used to determine a data exchange format between a host and a slave, so that the host reads target data through a data read instruction, and the register address information in the data read instruction is non-continuous address information.

[0044] The data read instruction also includes the quantity information of the target data to be read and a first read verification code, and the data response instruction includes the device address number of the target slave, the quantity information of the returned data and a second read verification code.

[0045] In the embodiment of the present application, before the host reads the target data from the target slave in the multiple slaves, it is necessary to determine the communication protocol between the host and the multiple slaves, that is, the agreed data exchange format between the host and the multiple slaves. To this end, the user can determine the data exchange format between the host and the slave in the communication protocol in the module of issuing instructions inside the host, and place the content of the data exchange format in the first instruction, and send it to the slave through the hardware communication interface. After each slave receives the first instruction, a cyclic redundancy check (CRC) is performed on the data carried by the first instruction, and the generated check code is compared with the check code carried in the first instruction. When the comparison result is consistent, the slave will place the register data of the corresponding address according to the register order carried in the first instruction, and will also agree on the data exchange format between the slave and the host. The slave generates a second instruction according to the placed register data, performs a cyclic redundancy check on the placed register data, places the generated check code in the last two digits of the second instruction, and then sends the second instruction to the host. After the host receives the second instruction, a cyclic redundancy check is performed on the content of the second instruction, and the generated check code is compared with the check code carried in the second instruction. If the comparison results are consistent, it is determined that the data exchange format between the host and the slave is successfully determined. At this time, the format of the data read instruction can be the device address number of the target slave, the function code, the quantity information of the target data (or the number of registers corresponding to the target data), the register address information corresponding to the target data, and the first read check code; the format of the data response instruction can be the device address number of the target slave, the function code, the returned data quantity information, the target data, and the second read check code.

[0046] By determining the data exchange format between the host and the slave, the host only needs to process the register data required by the user when reading the register data and the slave responds to the register data, which reduces the data interaction time and avoids the packet loss problem caused by the long message length. At the same time, the master and slave interact through a specific data exchange format, which improves the reliability of the interaction between the master and slave.

[0047] In some embodiments of the present application, it also includes: controlling the host to obtain register address information of multiple target data from the communication protocol, placing the multiple register address information at corresponding positions in the data read instruction, and sending the data read instruction to the slave.

[0048] According to the arrangement order of multiple register address information corresponding to multiple target data in the data read instruction, the slave is controlled to place each target data in the data response instruction in sequence, and send the data response instruction to the host.

[0049] For example, if the host needs to read 5 target data in the target slave, the data reading instruction can be 01Fun_Special 00050001000A 002300460064CRC1 CRC2. Among them, 01: represents the device address number of the target slave; Fun_Special: function code (the meaning of this function code is to read data); 0005: the number of target data (or the number of registers corresponding to the target data). 0001: the register address information of the first target data in the target slave; 000A: the register address information of the second target data in the target slave; 0023: the register address information of the third target data in the target slave; 0046: the register address information of the fourth target data in the target slave; 0064: the register address information of the fifth target data in the target slave. CRC1 CRC2: the first read checksum.

[0050] Furthermore, the data response instruction fed back by the target slave can be 01Fun_Special0A..............CRC1 CRC2. Among them, 01: represents the device address number of the target slave, which is consistent with the device address number of the target slave in the data read instruction; Fun_Special: function code, which is consistent with the function code in the data read instruction; 0A: the returned data quantity information, which is generally twice the number of registers corresponding to the target data, such as reading 5 registers, which requires 10 bytes of data; ..............: represents each target data, that is, according to the order of the register address information corresponding to each target data, the corresponding target data is placed in the data response instruction in sequence; CRC1CRC2: the second read check code.

[0051] Similarly, if the host needs to read more target data, it can determine the register address information corresponding to each target data in the target slave from the communication protocol, and place these register address information in the response position of the data read instruction in sequence. The target slave will place each target data in the data response instruction in sequence according to the order of the register address information, and send the data response instruction to the host for reading.

[0052] Reference Figure 2 , which shows a flow chart of determining a target slave provided by an embodiment of the present application, such as Figure 2 As shown, before receiving the data read instruction through the target slave and generating the data response instruction, it also includes:

[0053] S200, receiving a data read instruction from a slave, and performing a cyclic redundancy check on the data read instruction to generate a first response check code.

[0054] S210, determining whether the first response verification code and the first read verification code are the same, if they are the same, it is the target slave.

[0055] After receiving the data read instruction sent by the host, multiple slaves perform a cyclic redundancy check on the data in the data read instruction except the first read instruction, and generate a first response check code. Each slave compares the first response check code with the first read check code respectively. If the comparison results are inconsistent, each slave does not respond. If there is a slave with consistent comparison results among the slaves, the slave is determined as the target slave, and the target slave is controlled to respond to the host, and the remaining slaves do not respond. The target slave generates a data response instruction according to the data read instruction. The target slave also extracts the target data required by the host from the corresponding register according to the register address information corresponding to the target data in the data read instruction in the target slave, and places the device address number, function code, returned data quantity information and target data of the target slave in the corresponding position in the data response instruction, and controls the slave to perform a cyclic redundancy check on the placed data, generates a second read check code, and places the second read check code in the last two bytes of the data response instruction, and then sends the data response instruction to the host for reading.

[0056] In the embodiment of the present application, each slave determines the target slave by comparing the first response verification code with the first read verification code, and then controls the target slave to place the target data of the corresponding register in the data response instruction so that the host can read it, thereby improving the accuracy of data transmission and the efficiency of data interaction between the host and the slave, and avoiding errors in the interaction between the host and the slave.

[0057] Reference Figure 3 , which shows a flow chart of a host determining whether a data response instruction is legal provided by an embodiment of the present application, such as Figure 3 As shown, after receiving the data response instruction through the host, it also includes:

[0058] S300, the host performs a cyclic redundancy check on the received data response instruction to generate a second response check code.

[0059] S310, determining, by the host, whether the second response verification code is the same as the second read verification code.

[0060] S320: If they are the same, determine that the data response instruction is legal.

[0061] After receiving the data response instruction sent by the target slave, the host generates a second response check code by performing a cyclic redundancy check on the data in the data response instruction except the second read check code. The host determines whether the second response check code and the second read check code are responsive. If they are the same, the data response instruction is determined to be legal. The host extracts the target data from the data response instruction and sends the extracted target data to the SCADA background for processing.

[0062] Reference Figure 4 , which shows a structural block diagram of a data reading system provided in an embodiment of the present application, which is used to execute any of the above data reading methods, such as Figure 4 As shown, it includes: a host 100 and multiple slaves 200. The host 100 communicates with the slaves 200 through a communication protocol, and each slave 200 includes multiple registers; the host 100 is used to determine the device address number of the target slave and the target data to be read; the host 100 is used to determine the register address information of the target data in the target slave; the host 100 is controlled to generate a data read instruction and send it to the slave 200, the data read instruction includes the device address number of the target slave and the register address information corresponding to each target data; the target slave is controlled to receive the data read instruction and generate a data response instruction, the data response instruction includes the target data corresponding to the register address information; the host 100 is controlled to receive the data response instruction and read the target data in the data response instruction.

[0063] The host 100 may be one type or multiple types of the aforementioned communication box, and the multiple slaves 200 may be one type or multiple types of the aforementioned controller. Each of the multiple slaves 200 corresponds to a device address number, and different slaves 200 correspond to different device address numbers, so as to distinguish the multiple slaves 200, wherein the multiple slaves 200 each include multiple registers, and the register addresses of the multiple slaves 200 storing the same data type are the same. The host 100 and the slave 200 can use a variety of communication protocols for data exchange, such as but not limited to Modbus RTU data protocol, ModbusTCP data protocol, LoRaMesh data protocol, Zigbee data protocol, BLE Mesh data protocol, custom communication protocol and other industrial communication protocols.

[0064] The main features of the Modbus RTU protocol in the embodiment of the present application include: ensuring the reliability of data transmission through CRC check. Using function codes to define the interaction between master and slave devices, such as reading or writing registers. The message structure includes parts such as device address, function code, data and CRC check code.

[0065] In some embodiments of the present application, a communication protocol is used to determine the data exchange format between the host and the slave, so that the host reads the target data through a data read instruction, and the register address information in the data read instruction is non-continuous address information, and also includes: controlling the host to obtain the register address information of multiple target data from the communication protocol, placing the multiple register address information at corresponding positions in the data read instruction, and sending the data read instruction to the slave; according to the arrangement order of the multiple register address information corresponding to the multiple target data in the data read instruction, controlling the slave to place each target data in the data response instruction in sequence, and sending the data response instruction to the host.

[0066] In some embodiments of the present application, the data read instruction also includes the quantity information of the target data to be read and a first read verification code, the data response instruction includes the data quantity information returned by the device address number of the target slave and a second read verification code, and also includes: controlling the slave to receive the data read instruction, and performing a cyclic redundancy check on the data read instruction to generate a first response verification code; the slave is used to determine whether the first response verification code and the first read verification code are the same, and if they are the same, controlling the slave to respond.

[0067] In some embodiments of the present application, it also includes: controlling the host to perform a cyclic redundancy check on the received data response instruction to generate a second response verification code; the host is used to determine whether the second response verification code and the second read verification code are the same; if they are the same, the host determines that the data response instruction is legal.

[0068] An embodiment of the present application also provides a photovoltaic tracking system, including: a communication box and multiple controllers; the communication box and the multiple controllers are used to interact with the steps of the data reading method of any of the above embodiments.

[0069] It should be noted that the above embodiments can be freely combined as needed. The above are only preferred embodiments of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention.

Claims

1. A data reading method, characterized in that: The host is used to read data from a target slave among the slaves, the host communicates with the slaves through a communication protocol, and each of the slaves includes a plurality of registers, including: Determine the device address number of the target slave and the target data to be read by the host; Determine, by the host, register address information of the target data in the target slave; Generate a data read instruction by the host and send it to the slave, the data read instruction including the device address number of the target slave and the register address information corresponding to each target data; receiving the data read instruction through the target slave machine, and generating a data response instruction, wherein the data response instruction includes the target data corresponding to the register address information; The data response instruction is received by the host, and the target data in the data response instruction is read.

2. A data reading method according to claim 1, characterized in that: The communication protocol is used to determine the data exchange format between the host and the slave, so that the host reads the target data through the data read instruction, and the register address information in the data read instruction is non-continuous address information.

3. A data reading method according to claim 2, characterized in that: Also includes: Acquire the register address information of the plurality of target data from the communication protocol by the host, place the plurality of register address information at corresponding positions in the data read instruction, and send the data read instruction to the slave; According to the arrangement order of the multiple register address information corresponding to the multiple target data in the data read instruction, the slave is controlled to place each target data in the data response instruction in sequence, and send the data response instruction to the host.

4. The data reading method according to claim 1, characterized in that: The data read instruction also includes the quantity information of the target data to be read and a first read verification code, and the data response instruction includes the quantity information of the data returned by the device address number of the target slave and a second read verification code.

5. The data reading method according to claim 4, characterized in that: The method further includes: receiving the data read instruction through the target slave and generating a data response instruction; Receiving the data read instruction through the slave machine, and performing a cyclic redundancy check on the data read instruction to generate a first response check code; It is determined whether the first response verification code is the same as the first read verification code. If they are the same, it is the target slave.

6. The data reading method according to claim 4, characterized in that: After the host receives the data response instruction, the method further includes: Performing a cyclic redundancy check on the received data response instruction by the host to generate a second response check code; Determining, by the host, whether the second response verification code and the second read verification code are the same; If they are the same, the data response instruction is legal.

7. A data reading system, characterized in that: include: Master and slave; The host communicates with the slaves via a communication protocol, and each of the slaves includes a plurality of registers; The host is used to determine the device address number of the target slave and the target data to be read; The host is used to determine the register address information of the target data in the target slave; Control the host to generate a data read instruction and send it to the slave, wherein the data read instruction includes the device address number of the target slave and the register address information corresponding to each target data; Controlling the target slave to receive the data read instruction and generate a data response instruction, wherein the data response instruction includes the target data corresponding to the register address information; The host is controlled to receive the data response instruction and read the target data in the data response instruction.

8. The data reading system according to claim 7, characterized in that: The communication protocol is used to determine the data exchange format between the host and the slave, so that the host reads the target data through the data read instruction, and the register address information in the data read instruction is non-continuous address information, and also includes: Controlling the host to obtain the register address information of the plurality of target data from the communication protocol, placing the plurality of register address information at corresponding positions in the data read instruction, and sending the data read instruction to the slave; According to the arrangement order of the multiple register address information corresponding to the multiple target data in the data read instruction, the slave is controlled to place each target data in the data response instruction in sequence, and send the data response instruction to the host.

9. The data reading system according to claim 7, characterized in that: The data read instruction also includes the quantity information of the target data to be read and a first read check code, the data response instruction includes the quantity information of the data returned by the device address number of the target slave and a second read check code, and also includes: Controlling the slave to receive the data read instruction, and performing a cyclic redundancy check on the data read instruction to generate a first response check code; The slave is used to determine whether the first response verification code is the same as the first read verification code, and if they are the same, control the slave to respond.

10. The data reading system according to claim 9, characterized in that: Also includes: Controlling the host to perform a cyclic redundancy check on the received data response instruction to generate a second response check code; The host is used to determine whether the second response verification code is the same as the second read verification code; If they are the same, the host determines that the data response instruction is legal.