CN211630177U - Equipment data acquisition system - Google Patents

Equipment data acquisition system Download PDF

Info

Publication number
CN211630177U
CN211630177U CN201922285966.5U CN201922285966U CN211630177U CN 211630177 U CN211630177 U CN 211630177U CN 201922285966 U CN201922285966 U CN 201922285966U CN 211630177 U CN211630177 U CN 211630177U
Authority
CN
China
Prior art keywords
slave
equipment
master
range information
feedback frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201922285966.5U
Other languages
Chinese (zh)
Inventor
吴文豪
任鹏
陈进添
唐麒麟
叶王建
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN201922285966.5U priority Critical patent/CN211630177U/en
Application granted granted Critical
Publication of CN211630177U publication Critical patent/CN211630177U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The utility model provides an acquisition system of equipment data, wherein, this system includes: a master device, a plurality of slave devices; wherein the master device is connected with the plurality of slave devices; scanning the device address of the slave device through the master device; sending, by the master device, an inquiry frame to the slave device if the device address is not scanned by the master device; and receiving a feedback frame fed back by the slave equipment through the master equipment, and carrying out data acquisition on the slave equipment according to the range information of the readable and writable register carried in the feedback frame. Through the utility model discloses, solved among the correlation technique only dispose relevant agreement analysis in advance to the equipment on the bus and just can realize the problem that data are analytic and are forwardded.

Description

Equipment data acquisition system
Technical Field
The utility model relates to an intelligent equipment field particularly, relates to an equipment data's collection system.
Background
In the current industrial system, sensor devices such as an electric meter, a gas meter and a water meter mostly adopt a ModbusRTU communication mode. In order to remotely read the meter and read the data, a monitoring system is required to be built, and the information of the equipment instrument is collected and forwarded through a gateway.
The gateway is usually developed in a customized manner, and a device protocol on the bus is usually preset for the customized gateway, and data analysis and forwarding can be realized only if relevant protocol analysis is configured in advance. If the bus is accessed to a new Modbus device, the Modbus device can only be accessed by changing the program. In order to realize automatic network access of the slave station equipment, the slave station is identified by adopting a method of protocol analysis in advance and traversal, and finally the master station acquires data of the slave station. However, the device scan involved in this approach must be a device within the protocol for the system, and if a new Modbus device is accessed on the bus, automatic access cannot be achieved.
In view of the above problems in the related art, no effective solution exists at present.
SUMMERY OF THE UTILITY MODEL
The embodiment of the utility model provides an acquisition system of equipment data to only dispose relevant agreement analysis in advance and can realize the problem that data analysis and retransmission to the equipment on the bus in solving at least the correlation technique.
According to the utility model discloses an embodiment provides an acquisition system of equipment data, include: a master device, a plurality of slave devices; wherein the master device is connected with the plurality of slave devices; the master device scans the device address of the slave device; the master device sends a query frame to the slave device if the device address is not scanned by the master device; and the master equipment receives a feedback frame fed back by the slave equipment and carries out data acquisition on the slave equipment according to the range information of the readable and writable register carried in the feedback frame.
Optionally, when the device address has been scanned by the master device, the master device directly receives a feedback frame fed back by the slave device, and performs data acquisition on the slave device according to range information of a readable and writable register carried in the feedback frame.
Optionally, the master device compares whether the range information in the master device is consistent with the range information of the readable and writable register carried in the feedback frame; under the condition that the range information in the master device is consistent with the range information of the readable and writable register carried in the feedback frame, the master device carries out data acquisition on the slave device according to the range information of the readable and writable register carried in the feedback frame; and under the condition that the range information in the main equipment is inconsistent with the range information of the readable and writable register carried in the feedback frame, the main equipment determines that the feedback frame is an illegal frame.
Optionally, the range information of the readable and writable register includes at least one of: the number of registers accessed, the starting address of each register, and the amount of data accessible to each register.
Through the utility model discloses, scan the equipment address of slave unit through the master unit, if there is the equipment address that is not scanned by the master unit, then explain that the slave unit that this equipment address corresponds is newly-added, consequently, send the inquiry frame to the slave unit through the master unit, receive the feedback frame of slave unit feedback through the master unit, and carry out data acquisition to the slave unit according to the range information of the register that can read and write that carries in the feedback frame, that is to say, can send the range information that can read and write the register to the master unit through initiative to the slave unit of newly-added bus, so that the master unit can carry out data acquisition to the slave unit of newly-added, solved among the correlation technique only to the equipment on the bus have configurated relevant agreement analysis can realize data analysis and the problem of forwardding in advance, the effect of the equipment automatic scanning line has been realized.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without undue limitation to the invention. In the drawings:
fig. 1 is a schematic structural diagram of an apparatus data acquisition system according to an embodiment of the present invention;
fig. 2 is a flow chart of a method of collecting device data according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a scan frame according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a feedback frame according to an embodiment of the present invention.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Example 1
In this embodiment, a system for acquiring device data is provided, as shown in fig. 1, the system includes: a master device 11, a plurality of slave devices 12; wherein, the master device 11 is connected with a plurality of slave devices 12;
the master device scans the device address of the slave device; under the condition that the device address is not scanned by the master device, the master device sends a query frame to the slave device; and the master equipment receives the feedback frame fed back by the slave equipment and acquires data of the slave equipment according to the range information of the readable and writable register carried in the feedback frame.
Based on this, in the present embodiment, a method for acquiring device data is provided, and fig. 2 is a flowchart of a method for acquiring device data according to an embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S102, scanning the device address of the slave device through the master device;
step S104, sending a query frame to the slave device through the master device under the condition that the device address is not scanned by the master device;
and step S106, receiving the feedback frame fed back by the slave equipment through the master equipment, and carrying out data acquisition on the slave equipment according to the range information of the readable and writable register carried in the feedback frame.
According to the embodiment, the master device scans the device address of the slave device, and if the device address which is not scanned by the master device exists, it is indicated that the slave device corresponding to the device address is newly added, so that the master device sends an inquiry frame to the slave device, the master device receives a feedback frame fed back by the slave device, and performs data acquisition on the slave device according to the range information of the readable and writable register carried in the feedback frame, that is, the slave device newly added to the bus can send the range information of the readable and writable register to the master device through initiative, so that the master device can perform data acquisition on the newly added slave device, the problem that data analysis and forwarding can be realized only when the device on the bus is configured with relevant protocol analysis in advance in the related art is solved, and the effect of automatic scanning and online of the device is realized.
In an optional implementation manner of this embodiment, in a case that the device address has been scanned by the master device, the master device directly receives a feedback frame fed back by the slave device, and performs data acquisition on the slave device according to the range information of the readable and writable register carried in the feedback frame. That is to say, if the device address has been scanned by the master device, the master device does not need to send the query frame, but the slave device actively sends the feedback frame, so that the master device performs data acquisition on the slave device through the range information of the readable and writable register carried in the master device, and the efficiency of performing data acquisition on the slave device is improved.
In an optional implementation manner of this embodiment, a manner of performing data acquisition on the slave device according to the range information of the readable and writable register carried in the feedback frame, which is referred to in this embodiment, may further be:
step S11, comparing whether the range information in the main device is consistent with the range information of the readable and writable register carried in the feedback frame;
step S12, under the condition that the range information in the master device is consistent with the range information of the readable and writable register carried in the feedback frame, data acquisition is carried out on the slave device according to the range information of the readable and writable register carried in the feedback frame;
in step S13, when the range information in the master device is inconsistent with the range information of the readable and writable register carried in the feedback frame, the feedback frame is determined to be an illegal frame.
That is, when the master device receives a data frame, the format of the data frame is compared with the range information of the readable and writable register of the current slave device, and if the format of the data frame does not match the range information, the received data frame is considered to be an illegal frame, and the specific data content is not analyzed.
For example, during the scanning process, the current slave device feeds back how many sets of registers are accessible; at this time, the master device receives a data frame (sent by other devices), where the data frame includes a start address, a data length, and a check code, for example, the start address of a register to be read is 3, and 6 bytes are read. However, if the register start address of the slave is 3 at present, only 4 bytes can be read, and therefore the information does not match and is recognized as an illegal frame. The master device does not judge whether the specific content of the data frame is correct or not, and the slave device ensures the correctness of the data sent by the slave device. The master device is only a preliminary determination of the format to exclude illegal frames.
In an alternative embodiment of this embodiment, the query frame sent by the master device, as shown in fig. 3, has a format similar to the Modbus standard format, and consists of a device address, a function code, and a CRC check, and there is no valid data portion. For the feedback frame on line from the device, as shown in fig. 3, the format of the feedback frame is consistent with the Modbus standard format, and the feedback frame is composed of a device address, a function code, valid data and CRC check.
Specifically, as shown in fig. 4, the valid data includes: number of register (coil) sets that the device can access, assumed to be N; the initial address of the specific register (coil) group No. 1; the number of accessible data of a specific register (coil) group No. 1; and so on until the Nth;
in another optional implementation manner of the present application, the method steps of this embodiment may further include:
and step S108, after data acquisition is carried out on the slave equipment according to the range information of the readable and writable register carried in the feedback frame, the next equipment address of the equipment address is continuously scanned through the master equipment.
That is to say, the scanning of the device address by the master device is a cyclic scanning, and if the current device address is already scanned, the next device address is scanned until all the slave devices are online, so that the data scanning can be performed by the master device, and the effect of periodically scanning the slave devices is achieved.
It should be noted that the range information of the readable and writable register related in this embodiment includes at least one of the following: the number of registers accessed, the starting address of each register, and the amount of data accessible to each register. In addition, the master device and the slave device in this embodiment are applied to the Modbus protocol.
The present application will be illustrated with reference to alternative embodiments of the present embodiment;
this optional embodiment provides a method for automatically scanning an online device for a MODBUS-RTU, which mainly includes: the method comprises the following steps that the master device carries out online scanning on the slave station through an online inquiry frame, and feeds an online function frame back to the master station after the slave device receives the inquiry frame, and the method specifically comprises the following steps:
1) the master device judges the address of the device which needs to be scanned currently, judges whether the device is scanned or not, and if the device is scanned, frames a read function of a Modbus protocol according to the number, the initial address and the access number of register (coil) groups fed back by the slave station to realize data acquisition; after the query is finished, scanning whether the next address is scanned or not;
2) the main device judges the address of the current device to be scanned, whether the device is scanned or not is judged, if not, the main device issues an online inquiry frame, and then the main device judges whether the slave device feeds back, and if so, the feedback information is recorded and the next device is continuously scanned; if no feedback exists, the next device is scanned continuously;
by formulating a master station online query frame and a slave station online feedback frame, the master station can acquire range information of a register (coil) readable and writable by a slave station when scanning on a bus, so that the master station can automatically acquire a query method of the slave station, the slave station can automatically upload, and the slave station on the bus is not bound to protocol content any more, thereby realizing automatic scanning and online of equipment without changing a program.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solution of the present invention essentially or the portions contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), and includes a plurality of instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the method of the embodiments of the present invention.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes will occur to those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (4)

1. A system for acquiring device data, comprising: a master device, a plurality of slave devices; wherein the master device is connected with the plurality of slave devices;
the master device scans the device address of the slave device; the master device sends a query frame to the slave device if the device address is not scanned by the master device; and the master equipment receives a feedback frame fed back by the slave equipment and carries out data acquisition on the slave equipment according to the range information of the readable and writable register carried in the feedback frame.
2. The system of claim 1,
and under the condition that the equipment address is scanned by the master equipment, the master equipment directly receives a feedback frame fed back by the slave equipment, and carries out data acquisition on the slave equipment according to the range information of the readable and writable register carried in the feedback frame.
3. The system of claim 1,
the master equipment compares whether the range information in the master equipment is consistent with the range information of the readable and writable register carried in the feedback frame;
under the condition that the range information in the master device is consistent with the range information of the readable and writable register carried in the feedback frame, the master device carries out data acquisition on the slave device according to the range information of the readable and writable register carried in the feedback frame;
and under the condition that the range information in the main equipment is inconsistent with the range information of the readable and writable register carried in the feedback frame, the main equipment determines that the feedback frame is an illegal frame.
4. The system of claim 1 or 2, wherein the range information of the readable and writable register comprises at least one of: the number of registers accessed, the starting address of each register, and the amount of data accessible to each register.
CN201922285966.5U 2019-12-18 2019-12-18 Equipment data acquisition system Active CN211630177U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201922285966.5U CN211630177U (en) 2019-12-18 2019-12-18 Equipment data acquisition system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201922285966.5U CN211630177U (en) 2019-12-18 2019-12-18 Equipment data acquisition system

Publications (1)

Publication Number Publication Date
CN211630177U true CN211630177U (en) 2020-10-02

Family

ID=72630241

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201922285966.5U Active CN211630177U (en) 2019-12-18 2019-12-18 Equipment data acquisition system

Country Status (1)

Country Link
CN (1) CN211630177U (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115314370A (en) * 2022-06-29 2022-11-08 金茂云科技服务(北京)有限公司 Communication method, device, system, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115314370A (en) * 2022-06-29 2022-11-08 金茂云科技服务(北京)有限公司 Communication method, device, system, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN102469117B (en) Method and device for identifying abnormal access action
CN110798445B (en) Public gateway interface testing method and device, computer equipment and storage medium
CN101964813A (en) Method and system for detecting terminal information in GPRS network
CN111813622B (en) Equipment monitoring method and device
CN105052178A (en) System information processing method, apparatus and communication system
CN102222112B (en) Resource management device and resource management method
CN107368334B (en) Business plug-in interaction system and method
CN102857917A (en) Method for identifying internet access of mobile phone through personal computer (PC) based on signaling analysis
CN105072398A (en) Equipment upgrading method and equipment upgrading device
CN104683124A (en) Terminal type identification method and device
CN102571688B (en) Device, system and method for synchronizing browser bookmark
CN211630177U (en) Equipment data acquisition system
CN104301916B (en) Test optimization method, apparatus and system based on mobile intelligent terminal universal card
CN112689170B (en) Content playing method of display terminal, display terminal and readable storage medium
CN110768749B (en) Data transmission method and device and power peak shaving system
EP2456253A1 (en) Statistical method and device for bill information performance
CN104852785A (en) Data transmission method and data transmission device
EP1624642A3 (en) Apparatus, method and system for providing information in accordance with one of a plurality of protocols
CN111901813A (en) Network configuration method and equipment for customer premises equipment
CN107645597A (en) The synchronous method and terminal of application program
CN102075386B (en) Identification method and device
CN101212787A (en) Personalized information publishing method and system
CN114222284B (en) Terminal equipment identification method, device and readable storage medium
CN105743939A (en) Message push method and device
CN111162983A (en) Equipment data acquisition method and device, storage medium and electronic device

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant