Dynamic weighing equipment
By adopting Ethernet and time synchronization protocols in dynamic weighing equipment, time synchronization and data packaging and transmission of weighing sensor networks are realized, which solves the problem of unreliable data in high-speed dynamic weighing equipment and improves the accuracy of weighing data and transmission rates enhance network reliability.
Patent Information
- Application Number
- CN201911023945.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-25
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2039-10-25
AI Technical Summary
Among the existing dynamic weighing equipment, especially the high-speed dynamic weighing equipment, the weighing detection data is unreliable, mainly due to poor sampling synchronization and unreliable data transmission. The existing clock synchronization device increases the cost and is unreliable, and the transmission rate is not enough to meet the needs of the Dynamic weighing requirements.
Adopt Ethernet and time synchronization protocols to synchronize time with the master node and other weighing sensors, reduce the number of data packets, and use PTP and NTP protocols to achieve high-precision time synchronization. The election mechanism selects the master node and the secondary node to ensure the reliability of data transmission. and accuracy.
It improves the sampling reliability and transmission rate of weighing data, ensures the accuracy of weighing data at each moment, avoids network congestion, and enhances the reliability of the entire weighing sensor network and the reliability of data transmission.
Smart Images

Figure CN112710377B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a dynamic weighing device, in particular to a high-speed dynamic weighing device. Background Art
[0002] At present, the weighing detection data of dynamic weighing equipment, especially high-speed dynamic weighing equipment, is unreliable. On the one hand, it is because the sampling synchronization is poor; on the other hand, it is because the sampling data cannot be transmitted effectively. Especially at high-speed sampling, the reliability of large-scale data transmission cannot be guaranteed.
[0003] In the prior art, in order to solve the problem of clock synchronization, a clock calibration device is generally required outside the system, such as GPS (Global Positioning System) clock synchronization, or network timing mode, etc. If these synchronization devices or methods are used, the production cost is significantly increased, and in actual use, their reliability is average. For example, GPS signals are difficult to meet the use requirements indoors or in metal shielding environments.
[0004] In addition, the existing weighing technology usually uses CAN bus (Controller Area Network) or RS485 / RS422 (a type of bus) for data transmission. These buses have slow data transmission rates and lack clock synchronization, so the synchronization accuracy of the weighing data depends on the weight sampling rate (this rate is within 100Hz), which cannot meet the requirements of dynamic weighing applications.
[0005] In addition, even if Ethernet is used in weighing technology, although the bandwidth of Ethernet can theoretically meet the requirements of dynamic weighing and even high-speed dynamic weighing, in fact, due to the large number of data packets generated by each node in the network, congestion will inevitably be induced when transmitting information, causing unreliable weighing equipment or systems, and it is actually unable to meet the data packet transmission rate requirements required for dynamic weighing. Summary of the invention
[0006] The technical problem to be solved by the present invention is: in order to overcome the problem of unreliable synchronization and effective transmission of data in dynamic weighing in the prior art, a dynamic weighing device is provided, which utilizes the Ethernet network information synchronization protocol and a method of reducing the number of data packets so that Ethernet can be used to improve the reliability of sampling and data transmission of dynamic weighing.
[0007] The present invention solves the above technical problems through the following technical solutions:
[0008] A dynamic weighing device is provided, which is characterized in that it includes a plurality of weighing sensors, and the weighing sensors form a weighing sensor network through Ethernet;
[0009] A weighing sensor in the weighing sensor network serves as a master node, the master node synchronizes time with other nodes in the weighing sensor network through a time synchronization protocol, or the time offset between the synchronization of other nodes in the weighing sensor network and the time of the master node;
[0010] Each weighing sensor continuously packages a plurality of continuous weighing information and sends them to a terminal device;
[0011] The terminal device calculates the weighing weight result of the dynamic weighing device at the same time according to the time information in the weighing information obtained by unpacking.
[0012] This solution uses the time synchronization protocol in the Ethernet network to synchronize the time of the weighing sensor in the network with the weighing sensor as the master node, so that the weighing weight result calculated by the terminal through the weighing information obtained at the same time is reliable. The weighing weight result is the result calculated by the weighing data obtained by each weighing sensor in the weighing network, which can represent the weight of the weighed object.
[0013] Moreover, the method of sending multiple data in batches reduces the number of data packets transmitted in the Ethernet network, avoids congestion in network transmission, and improves the transmission rate.
[0014] Furthermore, the master node synchronizes time with other nodes in the weighing sensor network through PTP or NTP.
[0015] The PTP is a Precision Timing Protocol, and the NTP is a Network Time Protocol. These two time synchronization protocols can well achieve high-precision time synchronization.
[0016] Furthermore, the master node performs time synchronization with other weighing sensors in the network at preset time intervals; or
[0017] Other weighing sensors synchronize time with the master node at preset time intervals, or check time with the master node. The weighing sensors whose time errors exceed the error threshold synchronize time with the master node.
[0018] Furthermore, the master node sends a time synchronization broadcast to other weighing sensors;
[0019] Other weighing sensors synchronize time with the master node, or other weighing sensors check time with the master node, and the weighing sensors whose time error exceeds the error threshold synchronize time with the master node.
[0020] In the above scheme, the time synchronization between the master node and other weighing sensors can be initiated by the master node or by other weighing sensors.
[0021] When other weighing sensors are synchronized with the master node, if the time error of some weighing sensors does not exceed the threshold, these weighing sensors do not update the time, and other weighing sensors that exceed the threshold need to update the time and synchronize with the master node.
[0022] Further, the master node synchronizes time with other weighing sensors in the network at preset time intervals, and updates the time offset between the time of other weighing sensors and the time of the master node; or,
[0023] Other weighing sensors check the time with the master node at preset time intervals, and update the time offset between the time of other weighing sensors and the time of the master node.
[0024] In this scheme, when synchronizing the time between the master node and other weighing sensors, the time of other weighing sensors is not updated to the time of the master node, but the difference between the time of other weighing sensors and the time of the master node, that is, the time offset, is recorded. In this scheme, the clock function or clock circuit in the weighing sensor does not need to have the function of updating the time. The stored time offset is used to conveniently complete the time synchronization of all weighing sensors in the entire network.
[0025] Furthermore, when the data length of the weighing information continuously output by each weighing sensor reaches a threshold or the waiting time for packaging exceeds a threshold, the continuously output weighing information is packaged and sent.
[0026] In this solution, in addition to processing the data length and using it as a judgment condition for packaging and sending, the waiting packaging time is also used to avoid sending the weighing data too late, which causes the terminal to wait for the weighing data for a specific time and cannot calculate the weighing weight in time.
[0027] Furthermore, the terminal device calculates the weighing weight result of the dynamic weighing device at the same time according to the time of the main node and the time and time offset of other weighing sensors in the unpacked weighing information.
[0028] Furthermore, the weighing sensor network selects a weighing sensor as a master node through an election mechanism; or
[0029] The weighing sensor network selects one weighing sensor as a master node and one weighing sensor as a slave node through an election mechanism. When the master node fails, the slave node becomes the master node.
[0030] Furthermore, when a secondary node becomes a primary node, the weighing sensor network selects a new secondary node through an election mechanism.
[0031] In the above scheme, the node election mechanism in the existing network technology is used to select the master node and the slave node in the network composed of the weighing sensor. By using the election mechanism and the master and slave nodes, as long as there are a necessary number of nodes in the weighing sensor network, the data transmission function of the entire network will not be lost. The disadvantage of the setting of specific master and slave nodes in the traditional weighing sensor network, in which the failure of the master node causes the failure of the entire weighing sensor network, is avoided.
[0032] The positive effects of the above scheme are:
[0033] In a weighing sensor network, by synchronizing the time between sensors, when a terminal, such as an instrument, processes weighing data, the weighing data at each moment is accurate, thereby improving the reliability of sampling.
[0034] In addition, the weighing sensor network uses a method of sending multiple segments of data in a package to reduce the amount of weighing data transmitted in the network, thereby improving the reliability of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 The topology diagram of a weighing sensor network according to an embodiment of the present invention. DETAILED DESCRIPTION
[0036] The present invention is further described below by way of examples, but the present invention is not limited to the scope of the examples.
[0037] In the present invention, all weighing sensors in the device are networked, and the time of the weighing sensor as the master node in the network is used as a reference to synchronize the time of all weighing sensors to the time used as the reference. Therefore, the time information in the weighing information output by each weighing sensor is completely synchronized, so that during the weighing weight calculation process of the terminal, the weight of the object loaded by the weighing device at any specific moment can be accurately calculated. In other words, a timestamp is added to the weighing data output by each weighing sensor, so that the weighing data output by each weighing sensor at the same time can always be accurately obtained at the terminal.
[0038] Moreover, each weighing sensor packages multiple output weighing data to avoid the risk of network transmission congestion caused by a large amount of data burst.
[0039] The following embodiments are used to illustrate the implementation of the present invention.
[0040] In the high-speed dynamic checkweigher of this embodiment, the whole scale includes 8 weighing sensors. During the initialization of the checkweigher, the 8 weighing sensors use the election mechanism to select weighing sensor No. 3 as the master node. At this time, the other 7 weighing sensors and weighing sensor No. 3 form the following Figure 1 The star topology shown in the figure. And the time synchronization between load cell No. 3 and other load cells is achieved by using the PTP protocol.
[0041] In this embodiment, weighing sensor No. 3 sends a time synchronization broadcast to the other 7 weighing sensors every 10 seconds. After the weighing sensor receives the broadcast, it sends a request to complete time synchronization with weighing sensor No. 3 using the PTP protocol.
[0042] In another embodiment, the other seven weighing sensors respectively initiate synchronization requests to weighing sensor No. 3 at intervals of 10 seconds. After receiving the request, weighing sensor No. 3 completes time synchronization with the corresponding weighing sensor using the PTP protocol.
[0043] In another embodiment, other weighing sensors and weighing sensor No. 3 send time verification requests, and weighing sensor No. 3 compares the time of other weighing sensors with the time of weighing sensor No. 3 itself. If the time error of weighing sensors No. 1, 2, and 4 exceeds 1ms, weighing sensor No. 3 directly initiates time synchronization with weighing sensors No. 1, 2, and 4. In another variant, weighing sensors No. 1, 2, and 4 find that there is a time error, and initiate a synchronization request to weighing sensor No. 3. After weighing sensor No. 3 receives the request, it completes time synchronization. The time error of weighing sensors No. 5-8 does not exceed the threshold value of 1ms, and no time synchronization operation is performed.
[0044] The time synchronization in the above embodiments is to synchronize the time of other weighing sensors to the same time as weighing sensor No. 3, which requires that each weighing sensor has the ability to correct the time of the clock module after the internal circuit of the sensor.
[0045] In another embodiment, when weighing sensor No. 3 is time-synchronized with the other seven weighing sensors, the time difference between the other weighing sensors and weighing sensor No. 3 is stored in the corresponding weighing sensor. For example, there is a -2ms difference between the time of weighing sensor No. 7 and the time of weighing sensor No. 3. At this time, the -2ms difference is stored in weighing sensor No. 7, and when weighing sensor No. 7 outputs time information, it includes the -2ms time difference, so that the final output time is consistent with the time of weighing sensor No. 3. In this way, each weighing sensor only needs to record the time difference with the master node, and include this difference in the subsequent time calculation to get the same time, and it is no longer necessary for the clock function in the weighing sensor to have the ability to calibrate and update.
[0046] The time synchronization operation in the weighing sensor network of this embodiment is continuously performed so that the time information output by all weighing sensors in the entire network remains consistent.
[0047] While the network is constantly synchronizing the time, if the high-speed dynamic checkweigher is continuously loaded with objects to be cooled, weighing sensors 1-8 are continuously outputting weighing data. In this embodiment, when the byte sum of the weighing data output by each weighing sensor reaches 100 bytes, the weighing data is packaged and sent to the meter. If the byte sum of the weighing data output does not reach 100 bytes, but the waiting time exceeds 1ms, the collected weighing data is forcibly packaged and sent to the meter.
[0048] After receiving the weighing data sent by 8 weighing sensors in packages, the instrument unpacks the data packets, calculates the weighing data with the timestamp of the weighing data from the 8 weighing sensors at the same moment, and obtains the weighing weight of the object to be weighed on the high-speed dynamic checkweigher at this moment.
[0049] In another embodiment, except for weighing sensor No. 3, other weighing sensors store time differences. When the instrument screens the weighing data at the same time, the timestamps of the other 7 weighing sensors should include the time difference, so that the weighing data at the real same time can be screened out.
[0050] In another embodiment, after the network selects weighing sensor No. 3 as the master node, it uses the election mechanism to select weighing sensor No. 7 as the slave node. In this embodiment, only when weighing sensor No. 3 fails, weighing sensor No. 7 in the network is automatically upgraded to the master node, and the election mechanism is used again to select a new slave node from the remaining valid weighing sensors. In this embodiment, node backup is used to improve the reliability of the weighing sensor network.
[0051] Although the specific embodiments of the present invention are described above, those skilled in the art should understand that these are only examples, and the protection scope of the present invention is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, but these changes and modifications all fall within the protection scope of the present invention.
Claims
1. A dynamic weighing device, characterized in that: include: A plurality of weighing sensors, wherein the weighing sensors form a weighing sensor network via Ethernet; A weighing sensor in the weighing sensor network serves as a master node, the master node synchronizes time with other nodes in the weighing sensor network through a time synchronization protocol, or the time offset between the synchronization of other nodes in the weighing sensor network and the time of the master node; Each weighing sensor continuously packages a plurality of continuous weighing information and sends them to a terminal device; The terminal device calculates the weighing weight result of the dynamic weighing device at the same time according to the time information in the weighing information obtained by unpacking; The master node synchronizes time with other weighing sensors in the network at preset time intervals, and updates the time offset between the time of other weighing sensors and the master node; or, Other weighing sensors check the time with the master node at preset time intervals, and update the time offset between the time of other weighing sensors and the time of the master node.
2. The dynamic weighing device according to claim 1, characterized in that: The master node synchronizes time with other nodes in the weighing sensor network through PTP or NTP.
3. The dynamic weighing device according to claim 1, characterized in that: The master node performs time synchronization with other weighing sensors in the network at preset time intervals; or Other weighing sensors synchronize time with the master node at preset time intervals, or check time with the master node. The weighing sensors whose time errors exceed the error threshold synchronize time with the master node.
4. The dynamic weighing device according to claim 1, characterized in that: The master node sends a time synchronization broadcast to other weighing sensors; Other weighing sensors synchronize time with the master node, or other weighing sensors check time with the master node, and the weighing sensors whose time error exceeds the error threshold synchronize time with the master node.
5. The dynamic weighing device according to claim 1, characterized in that: When the data length of the weighing information continuously output by each weighing sensor reaches a threshold or the waiting time for packaging exceeds a threshold, the continuously output weighing information is packaged and sent.
6. The dynamic weighing device according to claim 4, characterized in that: The terminal device calculates the weighing weight result of the dynamic weighing device at the same time according to the time of the main node and the time and time offset of other weighing sensors in the weighing information obtained by unpacking.
7. The dynamic weighing device according to claim 1, characterized in that: The weighing sensor network selects a weighing sensor as a master node through an election mechanism; or The weighing sensor network selects one weighing sensor as a master node and one weighing sensor as a slave node through an election mechanism. When the master node fails, the slave node becomes the master node.
8. The dynamic weighing device according to claim 7, characterized in that: When the secondary node becomes the primary node, the weighing sensor network selects a new secondary node through an election mechanism.
