A circuit matching method, system and intelligent cabinet

By adding query commands to the communication protocol of the smart cabinet, the problem of complex configuration of the smart cabinet circuit board and multi-serial processor is solved, real-time update and simplified matching of circuit parameters is realized, design complexity and cost are reduced, and the design complexity and cost are improved. Test efficiency.

CN118709644BActive Publication Date: 2024-11-08SUZHOU YONGFENG INTELLIGENT EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411181696.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-11-08
Estimated Expiration
2044-08-27

AI Technical Summary

Technical Problem

The parameters of the smart cabinet circuit board are complex and require multiple serial port processors, which leads to increased design difficulty and cost, and low manual testing efficiency and error-prone.

Method used

By adding query commands to the communication protocol, the cabinet sends query commands to all circuit boards when the whole machine is powered on. After waiting for 2 seconds, the circuit boards at each level update the link link status, generate a device list, realize parameter matching of series circuits, and simplify Circuit design, avoid using multi-serial processors.

Benefits of technology

Real-time update and simplified matching of circuit parameters are realized, reducing circuit design complexity and cost, improving testing efficiency, and reducing the probability of manual errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118709644B_ABST
    Figure CN118709644B_ABST
Patent Text Reader

Abstract

The present application discloses a circuit matching method, system and smart cabinet, which relate to the technical field of equipment matching, and are used to solve the problem that the processor of the smart cabinet is difficult to support and thus requires circuit matching with multiple serial ports. The method comprises: receiving a query instruction; according to the query instruction, circuit board one generates a communication frame, including identification information of circuit board one; according to the timing instruction, starting a timer to determine whether the running time of the timer is within a predetermined threshold; when the running time exceeds the predetermined threshold, determining whether data frame one is received, data frame one including identification information of circuit board two; when data frame one is not received, generating data frame two, data frame two including identification information of circuit board one; when data frame one is received, generating communication frame two, communication frame two including data frame three, data frame three including identification information of circuit board two and identification information of circuit board one in sequence; sending data frame three to circuit board three, circuit board three being the upper level of circuit board one.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of equipment circuit matching, and in particular to a circuit matching method, system and intelligent cabinet. Background Art

[0002] When the smart cabinet is produced, its circuit board needs to be fully tested, including dozens of circuit boards forming a whole, to test whether it is running normally and whether it can complete the corresponding functions. Since the circuit board of the smart cabinet is relatively complex, when the circuit board is inspected, if each board is manually tested, the efficiency will be very low, and the probability of manual testing errors is relatively high;

[0003] The existing processing methods mostly use a local area network built through a network cable, assign an IP address to each circuit board with a processor, distinguish different circuit boards through IP addresses, and use the TCP / IP protocol for communication. Although this method can adapt to this complex hierarchical matching relationship and can communicate effectively, it is still necessary to formulate the relationship rules between the cabinet layering and the IP address in advance, and then manually assign static IP addresses to each mainboard according to the rules; if a processor that supports multiple serial ports is used, it is still necessary to implement multiple serial ports through complex circuit design, which increases the difficulty and cost of product design.

[0004] Therefore, a new circuit matching method, system and smart cabinet are needed to solve the problem that the circuit matching parameter configuration of the smart cabinet is complex and the processor requires multiple serial ports. Summary of the invention

[0005] The purpose of the application is to provide a new circuit matching method, system and smart cabinet, which can solve the problem that the circuit matching parameter configuration of the smart cabinet is complex and the processor requires multiple serial ports.

[0006] To achieve the above objectives, the present application embodiment adopts the following technical solutions:

[0007] Receive a query instruction, which is sent by processor one to circuit board one; according to the query instruction, circuit board one generates a communication frame, which includes the identification information of circuit board one; circuit board one sends a communication frame and a timing instruction, which is sent to circuit board two, which is the next level of circuit board one, and the timing instruction is sent to the timer; according to the timing instruction, start the timer to determine whether the running time of the timer is within a predetermined threshold; when the running time exceeds the predetermined threshold, determine whether data frame one is received, which includes the identification information of circuit board two; when data frame one is not received, generate data frame two, which includes the identification information of circuit board one, and send data frame two to circuit board three, which is the previous level of circuit board one; when data frame one is received, generate data frame three, which includes the identification information of circuit board two and the identification information of circuit board one in sequence, and send data frame three to circuit board three.

[0008] Furthermore, in an embodiment of the present invention, the frame data length of data frame one, data frame two and data frame three may be 2 bytes, and the frame data length may be at most more than 6500 bytes to meet application scenarios.

[0009] Furthermore, in an embodiment of the present invention, the identification information includes a sequence number and an index number.

[0010] Further, in the embodiment of the present invention, the index number can be generated as a unique index number by using a unique ID number inside the corresponding processor.

[0011] Furthermore, circuit board three, processor one, circuit board one and circuit board two are arranged in series.

[0012] Furthermore, in an embodiment of the present invention, the step of sending data frame three to circuit board three also includes: sending data frame three to circuit board three through the serial port of processor one, and the identification information of circuit board two and the identification information of circuit board one are arranged in sequence at the end of data frame three.

[0013] Furthermore, in an embodiment of the present invention, data frame three includes a device list, and the device list includes a correspondence between the serial number and index number of the linked processor one and circuit board one and circuit board two.

[0014] Furthermore, in an embodiment of the present invention, the query instruction is a link number query command, and the object is all circuit boards.

[0015] The embodiment of the present application further discloses a circuit matching system, which is used to execute the above circuit matching method, including:

[0016] A receiving module, used for receiving a query instruction, the query instruction is sent from processor one to circuit board one;

[0017] A generating module, used for generating a communication frame for the circuit board 1 according to the query instruction, wherein the communication frame includes identification information of the circuit board 1;

[0018] A sending module is used for the circuit board 1 to send a communication frame and a timing instruction. The communication frame is sent to the circuit board 2, which is the next level of the circuit board 1, and the timing instruction is sent to the timer;

[0019] A timing module, used to start a timer according to a timing instruction and determine whether the running time of the timer is within a predetermined threshold;

[0020] A judgment module, used for judging whether to receive data frame 1 when the running time exceeds a predetermined threshold, wherein the data frame 1 includes identification information of circuit board 2;

[0021] Update module 1, used for generating data frame 2 when data frame 1 is not received, data frame 2 including identification information of circuit board 1, and sending data frame 2 to circuit board 3, circuit board 3 being the upper level of circuit board 1;

[0022] Update module two is used to generate data frame three when receiving data frame one, data frame three includes identification information of circuit board two and identification information of circuit board one in sequence, and send data frame three to circuit board three.

[0023] The embodiment of the present application also discloses a smart cabinet, which is applied to any of the above-mentioned circuit matching methods, and / or the above-mentioned circuit matching system.

[0024] Compared with the prior art, the present invention has the following technical effects:

[0025] In the above technical solution, a query command is added to the communication protocol; when the whole machine is powered on, the cabinet control mainboard sends a query command to all circuit boards; after waiting for 2 seconds, the circuit boards at each level will update the link status of their upper and lower links, thereby completing the parameter matching of the series circuit and being able to update it in real time, parsing the device list on the entire series circuit, only needing to ensure that the cables are connected correctly, and at the same time, no processor with a particularly large number of serial ports is required, and the circuit design is simplified, thereby achieving the effect of not using a processor with multiple serial ports and simplifying the matching circuit. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a schematic diagram of the structure of the intelligent cabinet of the present invention.

[0027] Figure 2 The present invention provides execution steps of the circuit matching method. DETAILED DESCRIPTION

[0028] In order to make the purpose and technical solution of the present invention clearly and completely described, and the advantages more clearly understood, the embodiments of the present invention are further described in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are part of the embodiments of the present invention, rather than all of the embodiments, and are only used to explain the embodiments of the present invention, and are not used to limit the embodiments of the present invention. All other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0029] In the description of the present invention, it should be noted that the terms "center", "middle", "upper", "lower", "left", "right", "inner", "outer", "top", "bottom", "side", "vertical", "horizontal" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "one", "first", "second", "third", "fourth", "fifth", "sixth" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0030] In the description of the present invention, 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.

[0031] For the purpose of simplicity and illustration, the principles of the embodiments are mainly described by reference to examples. In the following description, many specific details are proposed to provide a thorough understanding of the embodiments. However, it is obvious that for those of ordinary skill in the art, these embodiments may not be limited to these specific details in practice. In some instances, known methods and structures are not described in detail to avoid making these embodiments unnecessarily difficult to understand. In addition, all embodiments can be used in combination with each other. Example 1

[0032] like Figure 1 , Figure 2 As shown, in this embodiment, the above-mentioned intelligent cabinet does not need a processor with particularly many serial ports, and the method of simplifying the circuit design includes the following steps:

[0033] Receive a query instruction, which is sent by processor one to circuit board one; according to the query instruction, circuit board one generates a communication frame, which includes the identification information of circuit board one; circuit board one sends a communication frame and a timing instruction, which is sent to circuit board two, which is the next level of circuit board one, and the timing instruction is sent to the timer; according to the timing instruction, start the timer to determine whether the running time of the timer is within a predetermined threshold; when the running time exceeds the predetermined threshold, determine whether data frame one is received, which includes the identification information of circuit board two; when data frame one is not received, generate data frame two, which includes the identification information of circuit board one, and send data frame two to circuit board three, which is the previous level of circuit board one; when data frame one is received, generate data frame three, which includes the identification information of circuit board two and the identification information of circuit board one in sequence, and send data frame three to circuit board three.

[0034] Specifically, the predetermined threshold of the running time is preferably 2 seconds.

[0035] In the above technical solution, a query command is added to the communication protocol; when the whole machine is powered on, the cabinet control mainboard sends a query command to all circuit boards; after waiting for 2 seconds, the circuit boards at each level will update the link status of their upper and lower links, thereby completing the parameter matching of the series circuit and being able to update it in real time, parsing the device list on the entire series circuit, only needing to ensure that the cables are connected correctly, and at the same time, no processor with a particularly large number of serial ports is required, and the circuit design is simplified, thereby achieving the effect of not using a processor with multiple serial ports and simplifying the matching circuit.

[0036] Specifically, in the actual application scenario, there are a maximum of 20 circuit boards in this series circuit. A circuit board serial number, circuit board type and circuit board index number are at most 10 bytes, so the actual frame length of 400 bytes is sufficient for overhead. The frame data length of the data frame can be 2 bytes, and the frame data length can be up to more than 6500 bytes, which is used to meet the application scenario and complete the link status of the upper and lower level links.

[0037] Specifically, the identification information includes a serial number and an index number of the corresponding circuit board, and the index number can be generated as a unique index number by using a unique ID number inside the processor.

[0038] Specifically, the circuit board three, the processor one, the circuit board one and the circuit board two are arranged in series, that is, the first-layer control board and all the internal circuit boards, and the second-layer control board and all the internal circuit boards are arranged in series, that is, the first-layer control board has processor one, and the second-layer control board also has processor one.

[0039] Specifically, the step of sending data frame three to circuit board three includes sending data frame three to circuit board three through the serial port of processor one, and the identification information of circuit board two and the identification information of circuit board one are arranged in sequence at the end of data frame three; the step of sending data frame three to circuit board three also includes sending data frame three to the upper level through the serial port of the upper-level circuit board, and arranging the identification information of circuit board two and the identification information of circuit board one at the end of data frame three.

[0040] Specifically, data frame three includes a device list, including the correspondence between the serial number and index number of the linked processor one and circuit board one and circuit board two. Even if the device list includes the correspondence between the serial number and index number of the linked processor one and all corresponding circuit boards, the query instruction is a link serial number query command, and the object is all circuit boards. It is used to obtain the connection status of the previous and next level links and update the device information list of the series circuit, so that the list can be dynamically maintained.

[0041] Previous processing methods include: the first method is to use CAN bus or other buses to communicate, or to build a local area network through network cables, assign an IP address to each circuit board with a processor, distinguish different circuit boards through IP addresses, and use TCP / IP protocol to communicate. The advantage is that it can adapt to this complex hierarchical matching relationship and can communicate effectively. The disadvantage is that it is necessary to formulate the relationship rules between cabinet layers and IP addresses in advance, and then manually assign static IP addresses to each mainboard according to the rules; the cabinet control mainboard and each layer of control board need to determine which circuit board sends the data based on the IP address. Both parties rely on the accuracy of the IP address to send data. This disadvantage will bring many operational problems to production and equipment after-sales. The IP addresses need to be configured correctly. After the circuit board is replaced, the configuration parameters need to be updated synchronously. In actual operation, production and after-sales personnel often make mistakes;

[0042] The second way is to buy a processor that supports multiple serial ports. Each circuit board is assigned a fixed serial port for communication. The first layer in the program is fixed to the first serial port number, the second layer is fixed to the second serial port number, the third layer is fixed to the third serial port number, and so on. The static IP address allocation is replaced by fixed serial port numbers. The advantage is that the network configuration can be simplified. There is no need to worry about network parameters. You only need to ensure that the serial number and serial port number of the cabinet motherboard correspond to each other. The disadvantage is that there are very few processors on the market that support 8 or more than 10 serial ports. Complex circuit design is required to achieve multiple serial ports, which increases the difficulty and cost of product design. If the IP address is dynamically allocated, the IP address will be messed up. Although communication can be carried out, errors will occur when sending data. For example, data that you want to send to the first-layer control board will be sent to the second-layer control motherboard.

[0043] In this embodiment, the first-layer circuit control board (with processor) and all internal circuit boards, as well as the second-layer control board (with processor) and all internal circuit boards are connected in series. Only two serial ports are required for the processor. Most processors on the market currently meet this requirement, so there are many alternative models, which can reduce the cost of the solution. In addition, a "link number query" command is added to the communication protocol. When the whole machine is powered on, the cabinet control mainboard sends a "link number query" command to all circuit boards. After waiting for 2 seconds, the circuit boards at each level will update the link status of their upper and lower links, so that they can self-discover and adapt, thereby achieving the effect of not using a processor with multiple serial ports and simplifying circuit matching. Example 2

[0044] Furthermore, based on the above circuit matching method, the data frame and execution steps of the specific series circuit include:

[0045] 1) The number of circuit boards is fixed as 0, which is used to indicate that when the first circuit board in the series circuit sends data to the subsequent link interface, the cumulative number of circuit boards is unknown;

[0046] 2) The circuit board serial number value in the data frame is 0, and the circuit board type is 0, which is used to indicate that it is the first circuit board to send. The circuit board index number is the unique ID number inside the CPU;

[0047] 3) Fill in the value of the data length byte and calculate the CRC data;

[0048] 4) Send it out through the serial port of the subsequent link interface, and monitor the serial port data of the subsequent link interface at the same time;

[0049] 5) Start a 3-second timer.

[0050] Specifically, when the next-level circuit board processor receives a "link number query" command sent by the previous level, the specific execution steps include:

[0051] 1) First check the byte information of the number of circuit boards. If it is 0, it means that it is the second circuit board in the entire link. If it is not 0, it means that it is not the second circuit board, but the (number of circuit boards + 1)th circuit board. Add 1 to the value of "number of circuit boards" and fill it into the byte of the number of circuit boards.

[0052] 2) Add the circuit board serial number byte, circuit board type byte and circuit board index number byte after the circuit board serial number and circuit board index number in the original data frame;

[0053] 3) The circuit board serial number byte value is derived based on the previous circuit board serial number value. Add 1 to the previous circuit board serial number value to get the value of the circuit board in the entire link. The circuit board index number is the unique ID number inside the CPU.

[0054] 4) Modify the value of the data length byte and recalculate the CRC data;

[0055] 5) Send it out through the serial port of the subsequent link interface, and monitor the serial port data of the subsequent interface at the same time;

[0056] 6) Start a timer of "3-(number of circuit boards * 100ms)" seconds, which should be n 100ms less than the timer of the first circuit board. This is used to ensure that the data returned by the next circuit board can be received before the timer of the previous circuit board times out.

[0057] Specifically, after determining that the timer has timed out, the data received by the subsequent serial port is analyzed.

[0058] Specifically, the timeout value of the timer may be a variable, which is adjusted according to the operating speed of the processor.

[0059] Specifically, when it is determined that there is data, it is marked that there is a circuit board connected to the next stage; conversely, when it is determined that there is no data in the next stage, it is marked that it is the last circuit board in the series circuit.

[0060] Specifically, the length of all circuit board serial numbers is fixed to 1 byte, the circuit board type is 1 byte, and the index number is fixed to 8 bytes.

[0061] The byte value of the number of circuit boards indicates how many circuit boards are in the entire series circuit. Then, according to the relationship between the serial number, type, and index value of a circuit board (which is 10 bytes long), the device list in the entire series circuit is parsed to form a device information list for the subsequent circuit. After the information list is obtained, when receiving other commands sent by the previous level in the future, it is only necessary to check whether there is a corresponding circuit board index value in the device information list maintained by the local machine, so as to know whether it is necessary to forward this command to the next level, thereby completing the function of frame data distribution. When the device is idle, the processor of the previous level can periodically send a "link number query" command to update the device information list of the next level, so that the list can be dynamically maintained, allowing production and after-sales personnel to get rid of tedious parameter configuration steps. They only need to ensure that the cables are connected correctly. At the same time, a processor with a lot of serial ports is not required to simplify the circuit design of the smart cabinet. Example 3

[0062] Based on the same concept as the circuit matching method in the aforementioned embodiment, in the smart cabinet, the present application also provides a circuit matching system, which includes:

[0063] A receiving module, used for receiving a query instruction, the query instruction is sent from processor one to circuit board one;

[0064] A generating module, used for enabling the circuit board 1 to generate a communication frame according to the query instruction, wherein the communication frame includes identification information of the circuit board 1;

[0065] A sending module is used for the circuit board 1 to send a communication frame and a timing instruction. The communication frame is sent to the circuit board 2, which is the next level of the circuit board 1, and the timing instruction is sent to the timer;

[0066] A timing module, used to start a timer according to a timing instruction and determine whether the running time of the timer is within a predetermined threshold;

[0067] A judgment module, used for judging whether to receive data frame 1 when the running time exceeds a predetermined threshold, wherein the data frame 1 includes identification information of circuit board 2;

[0068] Update module 1, used for generating data frame 2 when data frame 1 is not received, data frame 2 including identification information of circuit board 1, and sending data frame 2 to circuit board 3, circuit board 3 being the upper level of circuit board 1;

[0069] Update module two is used to generate data frame three when receiving data frame one, data frame three includes identification information of circuit board two and identification information of circuit board one in sequence, and send data frame three to circuit board three.

[0070] Although the above describes the illustrative specific implementation methods of the present application so that technicians in this technical field can understand the present application, the present application is not limited to the scope of the specific implementation methods. For ordinary technicians in this technical field, as long as various changes are within the spirit and scope of the present application defined and determined by the attached claims, all application creations using the concept of the present application are protected.

Claims

1. A circuit matching method, characterized in that: include: receiving a query instruction, wherein the query instruction is sent by processor one to circuit board one; According to the query instruction, the circuit board 1 generates a communication frame, and the communication frame includes identification information of the circuit board 1; The circuit board 1 sends the communication frame and the timing instruction, the communication frame is sent to the circuit board 2, the circuit board 2 is the next level of the circuit board 1, and the timing instruction is sent to the timer; According to the timing instruction, start the timer, and determine whether the running time of the timer is within a predetermined threshold; In the case where the running time exceeds the predetermined threshold, determining whether data frame 1 is received, wherein the data frame 1 includes identification information of circuit board 2; In the case where the data frame 1 is not received, a data frame 2 is generated, the data frame 2 includes the identification information of the circuit board 1, and the data frame 2 is sent to the circuit board 3, the circuit board 3 is the upper level of the circuit board 1; When the data frame one is received, a data frame three is generated, wherein the data frame three includes the identification information of the circuit board two and the identification information of the circuit board one in sequence, and the data frame three is sent to the circuit board three.

2. A circuit matching method according to claim 1, characterized in that: The frame data length of the data frame 1, the data frame 2 and the data frame 3 is 2 bytes.

3. A circuit matching method according to claim 1, characterized in that: The identification information 1 includes a sequence number and an index number.

4. A circuit matching method according to claim 3, characterized in that: The index number is a unique index number generated by the internal unique ID number of the processor one.

5. The circuit matching method according to claim 1, characterized in that: The circuit board three, the processor one, the circuit board one and the circuit board two are arranged in series.

6. A circuit matching method according to claim 5, characterized in that: The step of sending the data frame three to circuit board three includes: sending the data frame three to circuit board three through the serial port of the processor one, and the identification information of the circuit board two and the identification information of the circuit board one are arranged in sequence at the end of the data frame three.

7. A circuit matching method according to claim 6, characterized in that: The data frame three includes a device list, and the device list includes the correspondence between the serial number and index number of the linked processor one and the circuit board one and the circuit board two.

8. The circuit matching method according to claim 1, characterized in that: The query instruction is a link sequence number query command, and the query objects are all of the circuit board one, the circuit board two, and the circuit board three.

9. A circuit matching system, characterized in that: A method for implementing the circuit collocation according to any one of claims 1 to 8, comprising: A receiving module, used for receiving a query instruction, wherein the query instruction is sent from processor 1 to circuit board 1; A generating module, configured to generate a communication frame by the circuit board 1 according to the query instruction, wherein the communication frame includes identification information of the circuit board 1; A sending module, used for the circuit board 1 to send the communication frame and the timing instruction, the communication frame is sent to the circuit board 2, the circuit board 2 is the next level of the circuit board 1, and the timing instruction is sent to the timer; A timing module, used to start a timer according to the timing instruction, and determine whether the running time of the timer is within a predetermined threshold; A judging module, configured to judge whether to receive data frame 1 when the running time exceeds the predetermined threshold, wherein the data frame 1 includes identification information of the circuit board 2; Update module 1, used for generating data frame 2 without receiving data frame 1, wherein data frame 2 includes identification information of circuit board 1, and sending data frame 2 to circuit board 3, wherein circuit board 3 is an upper level of circuit board 1; Update module two is used to generate data frame three when receiving data frame one, wherein data frame three includes identification information of circuit board two and identification information of circuit board one in sequence, and send data frame three to circuit board three.

10. A smart cabinet, characterized in that: A circuit matching method applied to any one of claims 1 to 8, or a circuit matching system as described in claim 9.