Load addressing method and apparatus, home appliance, and storage medium
By sending query data frames and receiving response data frames on the communication bus between the main control unit and the load unit, the unaddressed target load unit is identified and addressed, solving the problem that the electrical main control board cannot adapt to different communication buses in the prior art, and realizing effective control of the load.
Patent Information
- Application Number
- CN202211239123.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-10
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2042-10-10
AI Technical Summary
In the existing technology, the main control board of electrical appliances cannot effectively adapt to different communication buses, resulting in the inability to effectively control the load on different communication buses.
The main control unit and multiple load units are connected to the communication bus respectively. The system sends query data frames to the communication bus based on a preset query interval, receives response data frames, determines the unaddressed target load unit, and addresses it.
It enables timely addressing of each load on the communication bus, ensuring effective control and improving the efficiency and accuracy of load addressing.
Smart Images

Figure CN117914641B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a load addressing method, apparatus, household appliance, and storage medium. Background Technology
[0002] With social progress and the development of science and technology, electrical appliances have gradually become more and more common in people's lives, and their functions are becoming increasingly diverse. Different functions of electrical appliances correspond to different loads. In the current technology, the main control board of electrical appliances has poor expandability and cannot effectively adapt to different communication buses, resulting in the inability to effectively control the loads on different communication buses.
[0003] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main objective of this invention is to provide a load addressing method, apparatus, household appliance, and storage medium, aiming to solve the technical problem that the prior art cannot effectively adapt to different communication buses, resulting in the inability to effectively control the load on different communication buses.
[0005] To achieve the above objectives, the present invention provides a load addressing method, wherein the load addressing method is applied to a main control unit, and the main control unit and multiple load units are respectively connected to a communication bus;
[0006] The load addressing method includes:
[0007] Based on a preset query interval, query data frames are sent to each load unit connected to the communication bus, so that each load unit can send back response data frames based on the query data frames.
[0008] Based on the received response data frames, determine the unaddressed target load units in each load unit, and then address the target load units.
[0009] Optionally, the load unit includes a load driver board and a load; the step of sending query data frames to each load unit connected to the communication bus based on a preset query interval includes:
[0010] Obtain the load type of each load unit connected to the communication bus;
[0011] Generate query data frames corresponding to each load unit according to the load type and preset frame format;
[0012] The query data frame is sent to each load unit connected to the communication bus based on a preset query interval.
[0013] Optionally, generating a query data frame based on the load type and preset frame format includes:
[0014] Based on the load type, the instruction code corresponding to each load unit is determined by querying a preset instruction mapping table;
[0015] Generate a query data frame based on the instruction code and the preset frame format.
[0016] Optionally, determining the unaddressed target load unit among each load unit based on the received response data frame includes:
[0017] Parse the received response data frame;
[0018] Determine whether the response data frame carries an unaddressed instruction based on the parsing results;
[0019] Based on the judgment results, determine the unaddressed target load units in each load unit.
[0020] Optionally, before determining whether the response data frame carries an unaddressed instruction based on the parsing result, the method further includes:
[0021] The information of the frame to be verified in the response data frame is obtained based on the parsing results;
[0022] Obtain the standard frame information from the query data frame;
[0023] The frame information to be verified is verified according to the standard frame information, and the frame information to be verified is determined to be consistent with the standard frame information based on the verification result.
[0024] If the frame information to be verified is consistent with the standard frame information, then the step of determining whether the response data frame carries an unaddressed instruction based on the parsing result is executed.
[0025] Optionally, if the frame information to be verified is consistent with the standard frame information, then the step of determining whether the response data frame carries an unaddressed instruction based on the parsing result is performed, including:
[0026] If the information of the frame to be verified is consistent with the information of the standard frame, then the instruction to be verified in the response data frame is obtained according to the parsing result;
[0027] Obtain the query instruction from the query data frame;
[0028] The query instruction is used to verify the instruction to be verified, and the verification result is used to determine whether the instruction to be verified is consistent with the query instruction.
[0029] If the instruction to be verified is consistent with the query instruction, then the step of determining whether the response data frame carries an unaddressed instruction based on the parsing result is executed.
[0030] Optionally, the step of determining the unaddressed target load units in each load unit based on the received response data frame, and addressing the target load units, includes:
[0031] The unaddressed target load cells in each load cell are determined based on the received response data frames.
[0032] Obtain the target load type of the target load unit;
[0033] Determine the target load address of the target load unit based on the target load type;
[0034] An addressing data frame is generated based on the target load address and a preset frame format, and the addressing data frame is sent to the target load unit to achieve addressing of the target load unit.
[0035] Furthermore, to achieve the above objectives, the present invention also proposes a load addressing device, the load addressing device comprising:
[0036] The data frame sending module is used to send query data frames to each load unit connected to the communication bus based on a preset query interval, so that each load unit can send back response data frames based on the query data frames.
[0037] The load addressing module is used to determine the unaddressed target load units in each load unit according to the received response data frame, and to address the target load units.
[0038] Furthermore, to achieve the above objectives, the present invention also proposes a home appliance comprising: a memory, a processor, and a load addressing program stored in the memory and executable on the processor, the load addressing program being configured to implement the steps of the load addressing method as described above.
[0039] In addition, to achieve the above objectives, the present invention also proposes a storage medium storing a load addressing program, which, when executed by a processor, implements the steps of the load addressing method as described above.
[0040] This invention connects a main control unit and multiple load units to a communication bus. The main control unit sends query data frames to each load unit connected to the communication bus at a preset query interval, so that each load unit responds with a response data frame based on the query data frame. Based on the received response data frames, the unaddressed target load unit is determined among the load units, and the target load unit is addressed. Because this invention continuously broadcasts query data frames to each load unit connected to the communication bus at a preset query interval, and determines the unaddressed target load unit based on the response data frames fed back by the load units, it can promptly address the unaddressed load units, ensuring effective control of each load on the communication bus. Attached Figure Description
[0041] Figure 1 This is a schematic diagram of the structure of a home appliance in the hardware operating environment involved in the embodiments of the present invention;
[0042] Figure 2 This is a flowchart illustrating the first embodiment of the load addressing method of the present invention;
[0043] Figure 3 This is a schematic diagram of the bus communication system structure of the first embodiment of the load addressing method of the present invention;
[0044] Figure 4 This is a schematic diagram of the structure of a query data frame in the first embodiment of the load addressing method of the present invention;
[0045] Figure 5 This is a schematic diagram of the structure of the response data frame in the first embodiment of the load addressing method of the present invention;
[0046] Figure 6 This is a flowchart illustrating the second embodiment of the load addressing method of the present invention;
[0047] Figure 7 This is a flowchart illustrating the third embodiment of the load addressing method of the present invention;
[0048] Figure 8 This is a structural block diagram of the first embodiment of the load addressing device of the present invention.
[0049] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0050] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0051] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of a home appliance in the hardware operating environment involved in the embodiments of the present invention.
[0052] like Figure 1 As shown, the home appliance may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0053] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the appliance and may include more or fewer parts than shown, or combine certain parts, or have different arrangements of parts.
[0054] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a load addressing program.
[0055] exist Figure 1 In the home appliance shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the home appliance of the present invention can be set in the home appliance, and the home appliance calls the load addressing program stored in the memory 1005 through the processor 1001 and executes the load addressing method provided in the embodiment of the present invention.
[0056] This invention provides a load addressing method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating a first embodiment of a load addressing method according to the present invention.
[0057] In this embodiment, the load fault detection method is applied to the main control unit, which and multiple load units are respectively connected to a communication bus. The load fault detection method includes the following steps:
[0058] Step S10: Send query data frames to each load unit connected to the communication bus based on a preset query interval, so that each load unit can send back response data frames based on the query data frames.
[0059] It should be understood that the execution subject of the method in this embodiment may be a main control unit with data processing, network communication and program running functions, including but not limited to a main control board or communication board, or other devices or equipment that can achieve the same or similar functions. The above-mentioned main control unit is used as an example for explanation here.
[0060] It should be noted that the main control unit can be the main control unit in a bus communication system, as shown in the reference. Figure 3 , Figure 3 This is a schematic diagram of a bus communication system. The bus communication system includes: one or more adapter boards, a main control unit, and at least one load unit. The main control unit and the load unit are respectively connected to the communication bus through the adapter board to establish a connection between the main control unit and the load unit.
[0061] The main control unit includes a main control board, which is connected to the adapter board via a first asynchronous transceiver. The load unit includes a load and a load driver board corresponding to the load. The load is connected to the load driver board, and the load driver board is connected to the adapter board via a second asynchronous transceiver. For example, the load may include a fan, damper, and electric valve, etc., and the load driver board may include a fan driver board, damper driver board, and electric valve driver board, etc. The first, second, and third asynchronous transceivers may be Universal Asynchronous Receiver / Transmitter (UART).
[0062] It should be understood that the aforementioned bus communication system adopts a single-bus structure, with both the main control board and the loads (e.g., fans, dampers, lighting fixtures, electric valves, etc.) connected to the communication bus. A master-slave communication mode is used, with the main control board as the master and the loads as slaves. The main control board communicates with the adapter board via a UART, and then is connected to the communication bus via a single wire. Each load is driven by a corresponding load driver board, which communicates with the adapter board via a UART port, and then achieves single-wire communication with the communication bus through the adapter board. Each load transmits its own operating information feedback signals to the load driver board, thereby improving the communication efficiency between the main control unit and the loads and enabling the effective transmission of load fault information.
[0063] It should be noted that the aforementioned query data frame can be a data frame used to query whether each load unit on the communication bus has been addressed, as shown in the reference. Figure 4 , Figure 4This is a schematic diagram of the structure of a query data frame. The query data frame may include a frame header, frame length, instruction, and checksum. The above instruction can be a pre-set load query instruction. Different load units correspond to different load query instructions. For example, a fan is 0x02 and a lighting lamp is 0x03.
[0064] The aforementioned response data frame can be a data frame in which the load unit responds based on the query data frame, as shown in the reference. Figure 5 , Figure 5 The structure of the response data frame is shown in the diagram. The response data frame may include a frame header, frame length, receive instruction, data, and checksum. The receive instruction may be a load query instruction extracted by the load unit from the query data frame. The data may be the specific content of the load unit's response. For example, if the press drive board replies with 0x0001 after receiving the load query instruction 0x0001, it means that there is no addressing.
[0065] Step S20: Determine the unaddressed target load units in each load unit based on the received response data frames, and address the target load units.
[0066] It should be noted that the target load unit can be any load unit that has not been addressed among all load units connected to the communication bus to which the main control unit is connected.
[0067] It should be understood that the main control unit communicates and interacts with each load unit through the communication bus. Specifically, the main control unit periodically broadcasts a query data frame to each load unit through the communication bus. After receiving the query data frame, the load driver board of each load unit connected to the communication bus parses the query data frame and extracts the load query instruction from it. Since the load of a load unit does not have an address in its initial state, if the load is in its initial state, the load driver board corresponding to the load will reply to the main control unit through the communication bus with a response data frame carrying an unaddressed instruction. After receiving the response data frame, the main control unit parses it and determines whether it carries an unaddressed instruction. If so, it sends an addressed data frame carrying the address corresponding to the load to the load driver board to address the load unit.
[0068] In the implementation, the main control unit periodically broadcasts a query command frame via the communication bus (e.g., every second) to sequentially query each load unit connected to the communication bus. Based on the response data frames from each load unit, it determines the unaddressed target load unit connected to the communication bus, assigns a unique address to the target load unit, and then queries the next unaddressed load unit. This process is repeated until all query data frames have been sent and the load is confirmed to be complete. Afterward, the load is controlled based on the address. Both the main control unit and the load driver board of the load unit write the new addressing information to a electrically erasable programmable read-only memory (EEPROM) to prevent the addressing information from being lost due to power failure.
[0069] In this embodiment, query data frames are continuously broadcast to each load unit connected to the communication bus based on a preset query interval. The unaddressed target load unit is determined according to the response data frames fed back by the load unit, thereby enabling timely addressing of the unaddressed load unit and ensuring effective control of each load on the communication bus.
[0070] refer to Figure 6 , Figure 6 This is a flowchart illustrating a second embodiment of a load addressing method according to the present invention.
[0071] Based on the first embodiment described above, in this embodiment, step S10 includes:
[0072] Step S101: Obtain the load type of each load unit connected to the communication bus.
[0073] It should be noted that the load type can be the type of load of each load unit connected to the communication bus, such as a compressor, fan, lighting, or electric valve.
[0074] It should be understood that since different types of loads correspond to different load query command codes, the main control unit obtains the load type of each load unit connected to the communication bus and determines the load query command code based on the load type.
[0075] Step S102: Generate query data frames corresponding to each load unit according to the load type and preset frame format.
[0076] It should be noted that the preset frame format can be a pre-set format for the frame structure and frame information used to generate data frames. For example, the main control unit sets the frame header of the data frame to be fixed at 0xAA and the frame length to one byte.
[0077] It should be understood that the main control unit determines the data frame header and data frame length according to the preset frame format, generates a blank data frame according to the frame header and data frame length, determines the load query instruction code to be queried according to the load type, writes the load query instruction code into the blank data frame, and obtains the query data frame.
[0078] In a specific implementation, the main control unit queries a preset instruction mapping table based on the load type to determine the instruction code corresponding to that load type. The instruction code can be a load query instruction code, and the preset instruction mapping table can be a relationship mapping table pre-constructed based on the correspondence between each load type and each load query instruction code.
[0079] Step S103: Send the query data frame to each load unit connected to the communication bus based on the preset query interval.
[0080] In practice, the main control unit will periodically broadcast a query command via the communication bus (e.g., once every 1 second) to query each load unit connected to the communication bus in sequence. Based on the response data frames fed back by each load unit, the unaddressed target load unit connected to the communication bus is determined, and then a unique address is assigned to the target load unit. Then, the next unaddressed load unit is queried, and so on, until all query data frames are sent. After confirming that the load is completed, the load is then controlled according to the address.
[0081] For example, the main control unit determines the load query instruction for the fan as 0x02 based on the load type of the load unit to be queried as a fan. The main control unit sets the frame header of the data frame to be fixed at 0xAA according to the preset frame format, and the frame length is one byte. The main control unit generates the query data frame corresponding to the fan based on the frame length, frame header and load query instruction.
[0082] This embodiment obtains the load type of each load unit connected to the communication bus, generates a query data frame corresponding to each load unit according to each load type and a preset frame format, and then sends the query data frame to each load unit connected to the communication bus via broadcast based on a preset query interval. This achieves the accuracy of broadcasting query data frames to each load unit, ensuring that each load unit connected to the communication bus can receive the corresponding query data frame, thereby improving the efficiency of load addressing.
[0083] refer to Figure 7 , Figure 7 This is a flowchart illustrating a third embodiment of a load addressing method according to the present invention.
[0084] Based on the first embodiment described above, in this embodiment, step S20 includes:
[0085] Step S201: Parse the received response data frame.
[0086] It should be noted that when the main control unit receives the response data frame sent by the target load driver board, it parses the response data frame, obtains the frame header, frame length and checksum in the response data frame based on the parsing result, and then checks the frame header, frame length and checksum in the response data frame against the previously sent query data frames to determine whether the frame header, frame length and checksum in the response data frame are consistent with the frame header, frame length and checksum in the query data frame.
[0087] Step S202: Determine whether the response data frame carries an unaddressed instruction based on the parsing result.
[0088] It should be understood that the main control unit parses the query data frame, then verifies the frame header and load address of the query data frame. After the verification is successful, it extracts the fault query instruction from the query data frame, then obtains the current fault status information of the target load according to the fault query instruction, generates a response data frame based on the current fault status information, and feeds the response data frame back to the main control unit.
[0089] In the specific implementation, the main control unit obtains the frame header, frame length, and checksum to be verified in the response data frame based on the parsing result of the query data frame. It then performs a consistency check on the frame header, frame length, and checksum to be verified in the response data frame based on the previously sent query data frames to ensure the security of the response data frame. That is, the main control unit verifies the frame header, frame length, and checksum in the response data frame based on the frame header, frame length, and checksum in the query data frame to determine whether they are consistent. If they are consistent, the main control unit obtains the instruction to be verified in the response data frame based on the parsing result, verifies the instruction to be verified based on the query instruction in the query data frame, and determines whether the instruction to be verified is consistent with the query instruction, thereby achieving the security verification of the response data frame.
[0090] It should be noted that before determining whether the response data frame carries an unaddressed instruction, the main control unit needs to verify the response data frame to ensure its security and accuracy. When the main control unit receives the response data frame sent by the target load driver board, it parses the response data frame and obtains the frame header, frame length, and checksum from the parsing result. Then, it checks the frame header, frame length, and checksum in the response data frame against the previously sent query data frames to determine whether the frame header, frame length, and checksum in the response data frame are consistent with those in the query data frame.
[0091] Step S203: Determine the unaddressed target load units in each load unit based on the judgment result.
[0092] In the implementation, the main control unit periodically broadcasts a query command frame via the communication bus (e.g., every second) to sequentially query each load unit connected to the communication bus. Based on the response data frames from each load unit, it determines the unaddressed target load unit connected to the communication bus, assigns a unique address to the target load unit, and then queries the next unaddressed load unit. This process is repeated until all query data frames have been sent and the load is confirmed to be complete. Afterward, the load is controlled based on the address. Both the main control unit and the load driver board of the load unit write the new addressing information to a electrically erasable programmable read-only memory (EEPROM) to prevent the addressing information from being lost due to power failure.
[0093] This embodiment parses the received response data frames, extracts the response content from the response data frames based on the parsing results, and determines whether there are any unwritten instructions in the response data frames based on the response content. This allows for the selection of unaddressed target load units from each load unit, thereby achieving accurate selection of unaddressed target load units on the communication bus. This ensures that all load units are addressed, improving the control efficiency of subsequent load units.
[0094] Furthermore, embodiments of the present invention also propose a storage medium storing a load addressing program, wherein the load addressing program, when executed by a processor, implements the steps of the load addressing method as described above.
[0095] Since this storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be repeated here.
[0096] Reference Figure 8 , Figure 8 This is a structural block diagram of the first embodiment of the load addressing device of the present invention.
[0097] like Figure 8 As shown, the load addressing apparatus proposed in this embodiment of the invention includes:
[0098] The data frame sending module 10 is used to send query data frames to each load unit connected to the communication bus based on a preset query interval, so that each load unit can send back response data frames based on the query data frames.
[0099] It should be noted that the main control unit can be the main control unit in a bus communication system, as shown in the reference. Figure 3 , Figure 3This is a schematic diagram of a bus communication system. The bus communication system includes: one or more adapter boards, a main control unit, and at least one load unit. The main control unit and the load unit are respectively connected to the communication bus through the adapter board to establish a connection between the main control unit and the load unit.
[0100] The main control unit includes a main control board, which is connected to the adapter board via a first asynchronous transceiver. The load unit includes a load and a load driver board corresponding to the load. The load is connected to the load driver board, and the load driver board is connected to the adapter board via a second asynchronous transceiver. For example, the load may include a fan, damper, and electric valve, etc., and the load driver board may include a fan driver board, damper driver board, and electric valve driver board, etc. The first, second, and third asynchronous transceivers may be Universal Asynchronous Receiver / Transmitter (UART).
[0101] It should be understood that the aforementioned bus communication system adopts a single-bus structure, with both the main control board and the loads (e.g., fans, dampers, lighting fixtures, electric valves, etc.) connected to the communication bus. A master-slave communication mode is used, with the main control board as the master and the loads as slaves. The main control board communicates with the adapter board via a UART, and then is connected to the communication bus via a single wire. Each load is driven by a corresponding load driver board, which communicates with the adapter board via a UART port, and then achieves single-wire communication with the communication bus through the adapter board. Each load transmits its own operating information feedback signals to the load driver board, thereby improving the communication efficiency between the main control unit and the loads and enabling the effective transmission of load fault information.
[0102] It should be noted that the aforementioned query data frame can be a data frame used to query whether each load unit on the communication bus has been addressed, as shown in the reference. Figure 4 , Figure 4 This is a schematic diagram of the structure of a query data frame. The query data frame may include a frame header, frame length, instruction, and checksum. The above instruction can be a pre-set load query instruction. Different load units correspond to different load query instructions. For example, a fan is 0x02 and a lighting lamp is 0x03.
[0103] The aforementioned response data frame can be a data frame in which the load unit responds based on the query data frame, as shown in the reference. Figure 5 , Figure 5The structure of the response data frame is shown in the diagram. The response data frame may include a frame header, frame length, receive instruction, data, and checksum. The receive instruction may be a load query instruction extracted by the load unit from the query data frame. The data may be the specific content of the load unit's response. For example, if the press drive board replies with 0x0001 after receiving the load query instruction 0x0001, it means that there is no addressing.
[0104] It should be noted that the load type can be the type of load of each load unit connected to the communication bus, such as a compressor, fan, lighting, or electric valve.
[0105] It should be understood that since different types of loads correspond to different load query command codes, the main control unit obtains the load type of each load unit connected to the communication bus and determines the load query command code based on the load type.
[0106] It should be noted that the preset frame format can be a pre-set format for the frame structure and frame information used to generate data frames. For example, the main control unit sets the frame header of the data frame to be fixed at 0xAA and the frame length to one byte.
[0107] It should be understood that the main control unit determines the data frame header and data frame length according to the preset frame format, generates a blank data frame according to the frame header and data frame length, determines the load query instruction code to be queried according to the load type, writes the load query instruction code into the blank data frame, and obtains the query data frame.
[0108] In a specific implementation, the main control unit queries a preset instruction mapping table based on the load type to determine the instruction code corresponding to that load type. The instruction code can be a load query instruction code, and the preset instruction mapping table can be a relationship mapping table pre-constructed based on the correspondence between each load type and each load query instruction code.
[0109] In practice, the main control unit will periodically broadcast a query command via the communication bus (e.g., once every 1 second) to query each load unit connected to the communication bus in sequence. Based on the response data frames fed back by each load unit, the unaddressed target load unit connected to the communication bus is determined, and then a unique address is assigned to the target load unit. Then, the next unaddressed load unit is queried, and so on, until all query data frames are sent. After confirming that the load is completed, the load is then controlled according to the address.
[0110] For example, the main control unit determines the load query instruction for the fan as 0x02 based on the load type of the load unit to be queried as a fan. The main control unit sets the frame header of the data frame to be fixed at 0xAA according to the preset frame format, and the frame length is one byte. The main control unit generates the query data frame corresponding to the fan based on the frame length, frame header and load query instruction.
[0111] The load addressing module 20 is used to determine the unaddressed target load units in each load unit according to the received response data frame, and to address the target load units.
[0112] It should be noted that the target load unit can be any load unit that has not been addressed among all load units connected to the communication bus to which the main control unit is connected.
[0113] It should be understood that the main control unit communicates and interacts with each load unit through the communication bus. Specifically, the main control unit periodically broadcasts a query data frame to each load unit through the communication bus. After receiving the query data frame, the load driver board of each load unit connected to the communication bus parses the query data frame and extracts the load query instruction from it. Since the load of a load unit does not have an address in its initial state, if the load is in its initial state, the load driver board corresponding to the load will reply to the main control unit through the communication bus with a response data frame carrying an unaddressed instruction. After receiving the response data frame, the main control unit parses it and determines whether it carries an unaddressed instruction. If so, it sends an addressed data frame carrying the address corresponding to the load to the load driver board to address the load unit.
[0114] In the implementation, the main control unit periodically broadcasts a query command frame via the communication bus (e.g., every second) to sequentially query each load unit connected to the communication bus. Based on the response data frames from each load unit, it determines the unaddressed target load unit connected to the communication bus, assigns a unique address to the target load unit, and then queries the next unaddressed load unit. This process is repeated until all query data frames have been sent and the load is confirmed to be complete. Afterward, the load is controlled based on the address. Both the main control unit and the load driver board of the load unit write the new addressing information to a electrically erasable programmable read-only memory (EEPROM) to prevent the addressing information from being lost due to power failure.
[0115] It should be noted that when the main control unit receives the response data frame sent by the target load driver board, it parses the response data frame, obtains the frame header, frame length and checksum in the response data frame based on the parsing result, and then checks the frame header, frame length and checksum in the response data frame against the previously sent query data frames to determine whether the frame header, frame length and checksum in the response data frame are consistent with the frame header, frame length and checksum in the query data frame.
[0116] It should be understood that the main control unit parses the query data frame, then verifies the frame header and load address of the query data frame. After the verification is successful, it extracts the fault query instruction from the query data frame, then obtains the current fault status information of the target load according to the fault query instruction, generates a response data frame based on the current fault status information, and feeds the response data frame back to the main control unit.
[0117] In the specific implementation, the main control unit obtains the frame header, frame length, and checksum to be verified in the response data frame based on the parsing result of the query data frame. It then performs a consistency check on the frame header, frame length, and checksum to be verified in the response data frame based on the previously sent query data frames to ensure the security of the response data frame. That is, the main control unit verifies the frame header, frame length, and checksum in the response data frame based on the frame header, frame length, and checksum in the query data frame to determine whether they are consistent. If they are consistent, the main control unit obtains the instruction to be verified in the response data frame based on the parsing result, verifies the instruction to be verified based on the query instruction in the query data frame, and determines whether the instruction to be verified is consistent with the query instruction, thereby achieving the security verification of the response data frame.
[0118] It should be noted that before determining whether the response data frame carries an unaddressed instruction, the main control unit needs to verify the response data frame to ensure its security and accuracy. When the main control unit receives the response data frame sent by the target load driver board, it parses the response data frame and obtains the frame header, frame length, and checksum from the parsing result. Then, it checks the frame header, frame length, and checksum in the response data frame against the previously sent query data frames to determine whether the frame header, frame length, and checksum in the response data frame are consistent with those in the query data frame.
[0119] In this embodiment, query data frames are continuously broadcast to each load unit connected to the communication bus based on a preset query interval. The unaddressed target load unit is determined according to the response data frames fed back by the load unit, thereby enabling timely addressing of the unaddressed load unit and ensuring effective control of each load on the communication bus.
[0120] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solutions of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any restrictions on this.
[0121] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.
[0122] In addition, for technical details not described in detail in this embodiment, please refer to the load addressing method provided in any embodiment of the present invention, which will not be repeated here.
[0123] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0124] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0125] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0126] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A load addressing method, characterized in that, The load addressing method is applied to the main control unit, which is connected to the communication bus via an adapter board. Each load unit is connected to the communication bus via an adapter board, so that a connection is established between the main control unit and the load unit. The communication bus adopts a single-bus structure. The main control unit includes a main control board, which is connected to the adapter board through a first asynchronous transceiver. The load unit includes a load and a load driver board corresponding to the load. The load is connected to the corresponding load driver board, and the load driver board is connected to the adapter board through a second asynchronous transceiver to realize single-line communication with the communication bus. The load addressing method includes: Based on a preset query interval, query data frames are sent to each load unit connected to the communication bus, so that each load unit can send back response data frames based on the query data frames. Based on the received response data frames, determine the unaddressed target load units in each load unit, and address the target load units. The step of determining the unaddressed target load unit in each load unit based on the received response data frame includes: Parse the received response data frame; Based on the parsing results, determine whether the response data frame carries an unaddressed instruction. In the case where the load of the load unit has no address, the data response frame carries an unaddressed instruction. Based on the judgment results, determine the unaddressed target load units in each load unit.
2. The load addressing method as described in claim 1, characterized in that, The load unit includes a load driver board and a load; the step of sending query data frames to each load unit connected to the communication bus based on a preset query interval includes: Obtain the load type of each load unit connected to the communication bus; Generate query data frames corresponding to each load unit according to the load type and preset frame format; The query data frame is sent to each load unit connected to the communication bus based on a preset query interval.
3. The load addressing method as described in claim 2, characterized in that, The step of generating a query data frame based on the load type and preset frame format includes: Based on the load type, the instruction code corresponding to each load unit is determined by querying a preset instruction mapping table; Generate a query data frame based on the instruction code and the preset frame format.
4. The load addressing method as described in claim 1, characterized in that, Before determining whether the response data frame carries an unaddressed instruction based on the parsing result, the method further includes: The information of the frame to be verified in the response data frame is obtained based on the parsing results; Obtain the standard frame information from the query data frame; The frame information to be verified is verified according to the standard frame information, and the frame information to be verified is determined to be consistent with the standard frame information based on the verification result. If the frame information to be verified is consistent with the standard frame information, then the step of determining whether the response data frame carries an unaddressed instruction based on the parsing result is executed.
5. The load addressing method as described in claim 4, characterized in that, If the frame information to be verified is consistent with the standard frame information, then the step of determining whether the response data frame carries an unaddressed instruction based on the parsing result is performed, including: If the information of the frame to be verified is consistent with the information of the standard frame, then the instruction to be verified in the response data frame is obtained according to the parsing result; Obtain the query instruction from the query data frame; The query instruction is used to verify the instruction to be verified, and the verification result is used to determine whether the instruction to be verified is consistent with the query instruction. If the instruction to be verified is consistent with the query instruction, then the step of determining whether the response data frame carries an unaddressed instruction based on the parsing result is executed.
6. The load addressing method according to any one of claims 1 to 3, characterized in that, The step of determining the unaddressed target load units in each load unit based on the received response data frame, and addressing the target load units, includes: The unaddressed target load cells in each load cell are determined based on the received response data frames. Obtain the target load type of the target load unit; Determine the target load address of the target load unit based on the target load type; An addressing data frame is generated based on the target load address and a preset frame format, and the addressing data frame is sent to the target load unit to achieve addressing of the target load unit.
7. A load addressing device, characterized in that, It is applied to the main control unit, which is connected to the communication bus through an adapter board, and each load unit is connected to the communication bus through an adapter board, so as to establish a connection between the main control unit and the load unit; The communication bus adopts a single-bus structure. The main control unit includes a main control board, which is connected to the adapter board through a first asynchronous transceiver. The load unit includes a load and a load driver board corresponding to the load. The load is connected to the corresponding load driver board, and the load driver board is connected to the adapter board through a second asynchronous transceiver to realize single-line communication with the communication bus. The load addressing device includes: The data frame sending module is used to send query data frames to each load unit connected to the communication bus based on a preset query interval, so that each load unit can send back response data frames based on the query data frames. The load addressing module is used to determine the unaddressed target load units in each load unit according to the received response data frame, and to address the target load units. The load addressing module is further configured to parse the received response data frame; determine whether the response data frame carries an unaddressed instruction based on the parsing result, wherein the data response frame carries an unaddressed instruction when the load of the load unit has no address; and determine the unaddressed target load unit in each load unit based on the determination result.
8. A household appliance, characterized in that, The home appliance includes: a memory, a processor, and a load addressing program stored on the memory and executable on the processor, the load addressing program being configured to implement the load addressing method as described in any one of claims 1 to 6.
9. A storage medium, characterized in that, The storage medium stores a load addressing program, which, when executed by a processor, implements the load addressing method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Dynamic networking method and communication method based on RS-485
CN104410557A
Bus communication method and device, communication board, household appliance and storage medium
CN114500689A
System bus addressing device
CN208061195U
