Automatic addressing address setting method, system, device, storage medium and program product
By using segmented random codes and multi-round polling, the problem of address conflicts in a large number of slave devices is solved, achieving efficient and reliable automatic address setting and supporting stable communication for a larger number of slave devices.
Patent Information
- Application Number
- CN202611548256.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-08
- Publication Date
- 2026-11-20
AI Technical Summary
Existing automatic addressing schemes have a high probability of address conflicts when a large number of slave devices are connected at the same time, which leads to the device being unable to recognize and control commands malfunctioning. Furthermore, they lack anti-duplicate settings, uniqueness verification, and loop termination mechanisms, which affect the stability and reliability of the system.
The system uses a random code of a preset number of bits, divided into M segments, each with N bits. It polls in M rounds, sending addresses from 0 to N in each round. It only responds and obtains the final address when the i-th segment of the random code matches, then stops polling. The temporary address is updated by combining the flag bit and the broadcast instruction to ensure uniqueness and loop termination.
It effectively reduces the probability of conflicts caused by the increase in the number of slave devices, changing the growth from exponential to linear, and supports more than 100 slave devices, improving the stability and reliability of the system without additional hardware costs.
Smart Images

Figure CN123145238A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and more specifically to an automatic address setting method, system, device, storage medium, and program product. Background Technology
[0002] In scenarios such as computer rooms and data centers, multiple wind turbines typically need to be connected in parallel and networked, communicating with a host computer via an industrial bus for centralized monitoring. In such systems, each wind turbine, acting as a slave device, must be configured with a unique communication address; otherwise, problems such as bus data conflicts, device inability to be recognized, and malfunctioning control commands will occur.
[0003] Currently, the mainstream slave address configuration schemes in the industry mainly include manual DIP switch schemes and automatic addressing schemes. Automatic addressing schemes mostly use a single-byte fixed temporary address or a single round of random address polling. Because the available range of a single-byte address is extremely limited, when a large number of slaves simultaneously request access, the probability of many slaves generating the same temporary address is very high. After a bus conflict occurs, the response message sent by the slave will be interfered with by the simultaneous responses of other slaves, making it impossible for the host computer to identify the slave's identity from the bus signals, thus leading to address setting failure and the slave device being missed. Summary of the Invention
[0004] The summary section introduces a series of simplified concepts, which will be further explained in detail in the detailed description section. This summary section is not intended to limit the key and essential technical features of the claimed technical solution, nor is it intended to determine the scope of protection of the claimed technical solution.
[0005] To address the existing problems, the first aspect of this application provides an automatic address setting method, applied to a host computer. Each slave device has a preset number of random codes, which are presented as M segments, each segment containing N random codes. The method includes: Execute the i-th round of polling, and send 0 to 10 ... The polling address, 1≤i≤M; The feedback frame sent by the target slave device when the i-th random code in the M-segment random code of the target slave device, corresponding to the i-th round of polling, matches the current polling address; The final address is sent to the target slave device based on the feedback frame, so that the target slave device sets the final address and stops responding to subsequent polling.
[0006] In one embodiment, it also includes: Before each round of polling, a broadcast command carrying the polling count is sent to the bus so that slave devices that have not set a final address can update their temporary addresses according to the polling count. The temporary address is a random code segment from M random code segments.
[0007] In one embodiment, it also includes: In response to the failure to set the final address of the target slave, the query continues from the next round of address queries.
[0008] In one embodiment, responding to the failure to set the final address of the target slave, continuing the query from the next polling address includes: If no response is received within a preset time after the final address is sent, the final address setting of the target slave device is deemed to have failed.
[0009] In one embodiment, it also includes: Obtain the number of slave devices participating in the network; Set the final address initial value to the unassigned slave count, which is initially equal to the number of slaves. After setting the final address of a slave device, the final address is updated to the value after decrementing the unassigned slave device count by one. The polling process terminates when the final address is zero.
[0010] In one embodiment, it also includes: The response in the i-th round of polling 0 to Once all polling addresses have been sent, set i = i + 1 and return to execute the i-th round of polling.
[0011] In one embodiment, it also includes: In response to the completion of M rounds of polling, the polling process terminates.
[0012] In one embodiment, it also includes: After terminating polling, output the number of slave devices that successfully set the address and the number of slave devices that failed to set the address.
[0013] In one embodiment, a prompt message is output in response to a greater than zero number of slave devices that have failed to set their addresses.
[0014] In one embodiment, the feedback frame includes a preset number of bits of random code from the target slave device, and the method further includes: The final address and a preset number of random codes for the target slave are sent via the bus, so that after the target slave successfully verifies the address using the received preset number of random codes, it sets the address based on the final address and stops responding to subsequent polling.
[0015] A second aspect of this application provides an automatic address setting method applied to a slave device. The slave device stores a random code of a preset number of bits, which is divided into M segments, each segment having N bits of random code. The method includes: Get the current polling count i from the host computer, 1≤i≤M; Read the i-th segment of random code corresponding to the number of polling from the preset number of random code segments, and use it as a temporary address; Receive the polling address in each frame of instructions sent by the host computer; In response to a match between the temporary address and the polling address, a feedback frame is sent to the host computer. Receive the final address sent by the host computer, write the final address to the local machine, and stop responding to subsequent polling.
[0016] In one embodiment, the slave device is configured with a flag to stop responding to subsequent polling, including: Set the flag to the first value.
[0017] In one embodiment, after receiving the polling address from each frame of instructions sent by the host computer, we have: When the flag is set to the first value, the polling command from the host computer will not be responded to. In response to the flag being set to the second value, the temporary address is matched against the polling address.
[0018] In one embodiment, obtaining the current polling count i of the host computer includes: Receive broadcast commands sent by the host computer, which carry the current polling count; Determine the current polling count from the broadcast command.
[0019] In one embodiment, the feedback frame includes a random code of a preset number of bits.
[0020] A third aspect of this application provides an automatic address setting system, comprising a host computer and multiple slave computers, wherein: The host computer is used to execute the automatic address setting method described in the first aspect above; Each slave device is used to execute the automatic address setting method described in the second aspect above.
[0021] The fourth aspect of this application provides an automatic addressing address setting apparatus, including a memory and a processor. The memory stores a computer program that is executed by the processor. When the computer program is executed by the processor, it causes the processor to perform the automatic addressing address setting method of the first aspect described above.
[0022] The fifth aspect of this application provides a storage medium storing a computer program executed by a processor. When the computer program is executed by the processor, it causes the processor to perform the automatic addressing and address setting method of the first aspect described above.
[0023] The sixth aspect of this application provides a computer program product that, when run by a processor, causes the processor to execute the automatic addressing method of the first aspect described above.
[0024] The automatic address setting method, system, device, storage medium, and program product of this application divide a random code of a preset number of bits into M segments, each segment being N bits. Simultaneously, the host computer performs polling in M rounds, sequentially sending 0 to N bits in each round. The polling address is determined by the number of bits. This ensures that in each round of polling, the slave device only participates in the matching with its i-th segment of random code. When the i-th segment of random code matches the current polling address, the slave device responds and obtains the final address, and then stops subsequent polling. Since each segment of random code has N bits, in any round of polling, only a few slave devices whose random code matches the current polling address will respond, thus avoiding message collisions caused by all slave devices responding simultaneously. Furthermore, the slave device immediately stops responding to subsequent polls after obtaining the final address, which also causes the number of slave devices to be assigned to decrease round by round, continuously reducing bus contention pressure. In addition, a preset number of bits is set for the random code of each slave device. The more bits preset, the more identity identifiers can be provided to the slave device, and the more slave devices can participate in the network simultaneously. This also reduces the probability of the same random code segment, significantly reducing the number of slave devices responding at the same time. Therefore, this application can reduce the probability of collisions caused by the increase in the number of slave devices from an exponential growth to a linear growth, increasing the number of slave devices supported by the system from the 20 level to over 100. Attached Figure Description
[0025] The following drawings, which are incorporated herein by reference and are used to understand this application, illustrate embodiments of the invention and their descriptions to explain the principles of the invention.
[0026] In the attached image: Figure 1 A flowchart illustrating an automatic address setting method according to a specific embodiment of this application is shown; Figure 2 A flowchart illustrating an automatic address setting method according to a specific embodiment of this application is shown; Figure 3 A system schematic diagram of an automatic address setting system according to a specific embodiment of this application is shown; Figure 4 A schematic structural block diagram of an automatic address setting device according to a specific embodiment of this application is shown. Detailed Implementation
[0027] The present application will now be described more fully with reference to the accompanying drawings, in which embodiments of the present application are illustrated. However, the present application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, providing these embodiments will make the disclosure thorough and complete, and will fully convey the scope of the present application to those skilled in the art. In the drawings, for clarity, the dimensions and relative dimensions of layers and regions may be exaggerated. The same reference numerals denote the same elements throughout.
[0028] It should be understood that when an element or layer is referred to as "on," "adjacent to," "connected to," or "coupled to" other elements or layers, it may be directly on, adjacent to, connected to, or coupled to other elements or layers, or there may be intervening elements or layers. Conversely, when an element is referred to as "directly on," "directly adjacent to," "directly connected to," or "directly coupled to" other elements or layers, there are no intervening elements or layers. It should be understood that although the terms first, second, third, etc., may be used to describe various elements, components, areas, layers, and / or portions, these elements, components, areas, layers, and / or portions should not be limited by these terms. These terms are only used to distinguish one element, component, area, layer, or portion from another element, component, area, layer, or portion. Therefore, without departing from the teachings of this application, the first element, component, area, layer, or portion discussed below may be referred to as the second element, component, area, layer, or portion.
[0029] Spatial relation terms such as “below,” “under,” “below,” “under,” “above,” “above,” etc., are used herein for convenience of description to describe the relationship between one element or feature shown in the figure and other elements or features. It should be understood that, in addition to the orientation shown in the figure, spatial relation terms are intended to also include different orientations of the device in use and operation. For example, if the device in the figure is flipped, then the element or feature described as “below” or “under” the other element or feature will be oriented “above” the other element or feature. Therefore, the exemplary terms “below” and “under” can include both upper and lower orientations. The device may be otherwise oriented (rotated 90 degrees or otherwise) and the spatial descriptive terms used herein will be interpreted accordingly.
[0030] Unless otherwise defined, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms as defined in commonly used dictionaries shall be interpreted as having a meaning consistent with their meaning in the relevant field and / or the context of this specification, and not as in an ideal or overly formal sense, unless expressly defined herein.
[0031] To fully understand this application, a detailed structure will be presented in the following description to illustrate the technical solutions proposed in this application. Preferred embodiments of this application are described in detail below; however, in addition to these detailed descriptions, this application may have other implementation methods.
[0032] In scenarios such as computer rooms and data centers, multiple wind turbines typically need to be connected in parallel and networked, communicating with a host computer via an industrial bus for centralized monitoring. In such systems, each wind turbine, acting as a slave device, must be configured with a unique communication address; otherwise, problems such as bus data conflicts, device inability to be recognized, and malfunctioning control commands will occur.
[0033] Currently, the mainstream slave address configuration schemes in the industry mainly include manual dialing schemes and automatic addressing schemes. Among them: The manual DIP switch solution involves manually setting the address of each device individually via DIP switches. On-site installation requires disassembling, DIP switching, and recording the settings for each device, resulting in a long installation period, high labor costs, and a high risk of address duplication and DIP errors when networking large numbers of slave devices. It also makes troubleshooting more difficult later on. Furthermore, DIP switches are prone to poor contact, leading to address invalidation. Therefore, the manual DIP switch solution is inefficient and has poor fault tolerance.
[0034] Most automatic addressing schemes use single-byte fixed temporary addresses or single-round random address polling. Since the available range of a single-byte address is relatively limited (1-255), when a large number of slave devices simultaneously request access, the probability of many slaves generating the same temporary address is high. After a bus collision occurs, the response messages sent by the slave device will be interfered with by the simultaneous responses of other slave devices, making it impossible for the host computer to identify the slave device from the bus signals. This leads to address setting and identification issues, and the slave device may be missed. Therefore, automatic addressing schemes are not suitable for network scenarios with more than 20 slave devices.
[0035] Besides the aforementioned shortcomings, current automatic addressing schemes are not yet perfect. For example: The automatic addressing scheme lacks mechanisms to prevent duplicate settings and accidental operations. Slave devices that have already completed address settings may still respond to bus addressing commands, which can easily lead to duplicate address overwriting and accidental modification, resulting in poor system stability. The automatic addressing scheme lacks a uniqueness verification mechanism, which makes it easier for multiple slave devices to be set to the same address, resulting in insufficient robustness of the addressing process.
[0036] The automatic addressing scheme lacks a clear loop termination mechanism, which can lead to bus dead loops in extreme cases, thus affecting normal system communication.
[0037] The automatic addressing scheme lacks a retry mechanism after a single round of polling failure, which makes it more likely that devices will be missed during setup. To solve this problem, manual intervention is still required.
[0038] Therefore, in view of the aforementioned technical problems, this application proposes an automatic address setting method, applied to a host computer, wherein each slave device has a preset number of random codes, the preset number of random codes being presented as M segments of random codes, each segment having N random codes, the method comprising: Execute the i-th round of polling, and send 0 to 10 ... The polling address, 1≤i≤M; The target slave device sends a feedback frame when the i-th random code in the M-segments of the target slave device, corresponding to the i-th round of polling, matches the current polling address; The final address is sent to the target slave device based on the feedback frame, so that the target slave device sets the final address and stops responding to subsequent polling.
[0039] The automatic address setting method of this application divides a preset number of random codes into M segments, each segment having N bits. Simultaneously, the host computer performs polling in M rounds, sending 0 to N bits sequentially in each round. The polling address is determined by the number of bits. This ensures that in each round of polling, the slave device only participates in the matching with its i-th segment of random code. When the i-th segment of random code matches the current polling address, the slave device responds and obtains the final address, and then stops subsequent polling. Since each segment of random code has N bits, in any round of polling, only a few slave devices whose random code matches the current polling address will respond, thus avoiding message collisions caused by all slave devices responding simultaneously. Furthermore, the slave device immediately stops responding to subsequent polls after obtaining the final address, which also causes the number of slave devices to be assigned to decrease round by round, continuously reducing bus contention pressure. In addition, a preset number of bits is set for the random code of each slave device. The more bits preset, the more identity identifiers can be provided to the slave device, and the more slave devices can participate in the network simultaneously. This also reduces the probability of the same random code segment, significantly reducing the number of slave devices responding at the same time. Therefore, this application can reduce the probability of collisions caused by the increase in the number of slave devices from an exponential growth to a linear growth, increasing the number of slave devices supported by the system from the 20 level to over 100.
[0040] Below, for referenceFigures 1 to 4 The automatic address setting method of this application is described in detail, wherein, Figure 1 A flowchart illustrating an automatic address setting method according to a specific embodiment of this application is shown; Figure 2 A flowchart illustrating an automatic address setting method according to a specific embodiment of this application is shown; Figure 3 A system schematic diagram of an automatic address setting system according to a specific embodiment of this application is shown; Figure 4 A schematic structural block diagram of an automatic address setting device according to a specific embodiment of this application is shown.
[0041] Before describing the automatic address setting method of this application in detail, it should first be noted that the automatic addressing scheme of this application is implemented through interaction between a host computer and multiple slave computers. In this process, the host computer and the multiple slave computers cooperate with each other. Therefore, the automatic address setting method will be introduced from the perspectives of both the host computer and the slave computers to fully describe the process of automatic addressing and address setting achieved through interaction. Specifically, this application uses an example of a host computer and multiple slave computers connected in parallel via an RS485 bus for illustration.
[0042] like Figure 1 and Figure 3 As shown, the automatic address setting method of this application is applied to the host computer 31. It is understood that, in order to better implement this method, the relevant hardware devices can be configured before implementation. For example, each slave device 32 has a random code of a preset number of bits. The random code of the preset number of bits is presented as M segments of random code, each segment containing N segments of random code.
[0043] The automatic address setting method of this application includes: Step S110: Perform the i-th round of polling, sequentially sending 0 to... The polling address, 1≤i≤M; Step S120: Receive a feedback frame sent by the target slave device when the i-th random code in the M-segments of the target slave device, corresponding to the i-th round of polling, matches the current polling address; Step S130: Send the final address to the target slave device based on the feedback frame, so that the target slave device sets the final address and stops responding to subsequent polling.
[0044] The preset number of bits in the random code is used to provide an identity identifier for slave device 32. A larger preset number of bits indicates more identity identifiers can be provided to slave device 32, allowing more slave devices 32 to participate in the network simultaneously. It also reduces the probability that different slave devices 32 will generate the same unique random code, thus lowering the probability of bus collisions. For example, the preset number of bits in the random code can be a 32-bit random code. A 32-bit random code can provide... Each identity identifier.
[0045] In some embodiments, a random code of a preset length can be generated by the MCU using a hardware random number generator. The preset length random code can be generated when the slave device 32 is first powered on. After generation, the preset length random code can be stored locally on the slave device 32.
[0046] After generating a random code of a preset length, it can be divided into M segments, each with N bits, i.e., M × N = preset length. The M segments are used for polling by the host computer 31 in different rounds, while the N-bit random code serves as the temporary address for slave devices 32 in these rounds. It should be understood that a larger preset length reduces the probability of multiple slave devices 32 having the same random code at the same location, significantly decreasing the number of slave devices responding simultaneously and reducing the probability of bus collisions. Furthermore, as the number of polling rounds increases, the number of slave devices obtaining a final address increases, while the number of slave devices without assigned addresses decreases. Therefore, when entering a new polling round, the reduced number of slave devices participating in address allocation decreases the probability of different slave devices 32 having the same temporary address, further reducing the number of slave devices responding simultaneously and thus lowering the probability of bus collisions.
[0047] In some embodiments, when splitting a random code of a preset number of bits, the value of N can be made as large as possible while ensuring that M is not equal to one. A larger value of M allows the host computer 31 to perform more polling operations; a larger value of N reduces the probability of duplicate temporary addresses in the slave device 32. For example, when the preset number of bits for the random code is 32 bits, M is 4 and N is 8, meaning the 32-bit random code is fixedly split into four consecutive 8-bit segments. These M segments of N-bit random code are also stored locally on the slave device 32.
[0048] In step S110, during any round of polling, the host computer 31 sequentially sends different polling addresses to the bus. In each round of polling, the host computer 31 initially sends a polling address of zero. Then, after sending a polling address of value j to the bus, the host computer 31 waits for a period of time, listening for any response from slave devices 32. If the host computer 31 does not receive a response from a slave device 32 during this period, it means that the current polling address has not matched a slave device 32, and the host computer 31 will continue sending a polling address of value j+1 to the bus. Conversely, if the host computer 31 receives a response from a slave device 32 during this period, it will pause polling and interact with the responding slave device 32 to set its final address. After completing the address setting process for the slave device 32, the host computer 31 will continue polling from the next polling address. As an example, the host computer 31 can wait for 200ms after sending the polling address to the bus. Of course, this waiting time can be adjusted adaptively according to the actual situation.
[0049] It should be understood that when the value j of the polling address that the host computer 31 is about to send to the bus is greater than... At this point, it can be assumed that all polling addresses have been sent in this round of polling. The host computer 31 completes the sequential sending of addresses 0 to 10 to the bus in one round of polling. The polling address means that the polling of any possible temporary address (i.e., N-bit random code) of slave 32 has been completed.
[0050] The response in the i-th round of polling 0 to Once all polling addresses have been sent, we can set i = i + 1 to return to the execution of the i-th round of polling, meaning the host computer 31 will begin the next round of polling. At this point, the host computer 31 will reset the polling addresses to be sent to the bus to zero.
[0051] Furthermore, when the number of polling rounds i to be performed by the host computer 31 is greater than M, it can be assumed that all available temporary addresses for each slave device 32 have participated in the polling process, and no temporary address that can identify the slave device 32 is available. Therefore, in response to the host computer 31 completing M rounds of polling, the host computer 31 can terminate the polling.
[0052] In some embodiments, the host computer 31 can broadcast the polling address by sending a query command to the bus and having the query command carry the polling address.
[0053] The following is a specific example to aid understanding.
[0054] In a specific example, each slave device 32 has a 32-bit random code with a preset number of bits. This 32-bit random code is divided into four 8-bit segments. The host computer 31 performs four rounds of polling when assigning addresses to these slave devices 32. In each round of polling, the host computer 31 sequentially sends polling addresses from 0 to 255 to the bus. After completing four rounds of polling, the host computer 31 terminates the polling process.
[0055] It should also be noted that, in the above process, before the host computer 31 executes each round of polling, the host computer 31 can send a broadcast command carrying the number of polling to the bus so that the slave 32, which has not been set with a final address, can update its temporary address according to the number of polling.
[0056] Specifically, each slave device 32 can have a pre-set correspondence between the number of polling attempts and each N-bit random code segment. When the slave device 32 obtains the number of polling attempts from the broadcast command, it can read the N-bit random code segment corresponding to the number of polling attempts from its local machine and use it as a temporary address, thereby updating the temporary address.
[0057] As an example, the correspondence between the number of polling iterations and each N-bit random code segment can be: When the number of polling is 1, the temporary address is the Mth segment of N-bit random code (i.e. the last segment of N-bit random code). When the number of polling iterations is 2, the temporary address is the (M-1)th segment of N-bit random code; ... When the number of polling is M, the temporary address is the first N-bit random code (i.e., the highest N-bit random code).
[0058] Based on this, when the slave device 32, whose address setting has not been completed, receives a broadcast command from the host computer 31, it can extract the polling count and update its local temporary address according to preset rules (such as the rules mentioned above). After completing the update of the temporary address, the slave device 32 enters a polling listening state to continuously listen for query commands sent by the host computer 31.
[0059] In some embodiments, the slave device 32 can identify whether it has completed the address setting by setting a flag bit.
[0060] In some embodiments, after sending a broadcast command to the bus, the host computer 31 may wait, for example, 100ms to ensure that all slave devices 32 complete updating their temporary addresses before starting polling. Of course, the waiting time can also be adjusted adaptively according to the actual situation.
[0061] The process of setting the final address of slave device 32 will be explained in detail below.
[0062] Step S120 occurs after the host computer 31 sends a polling address to the bus. After the host computer 31 sends a polling address to the bus, multiple slave devices 32 that have not yet completed address settings receive a query command from the host computer 31 via the bus, and extract the current polling address from the query command to match their respective temporary addresses with the current polling address. The temporary address is an N-bit random code corresponding to the current polling round from a preset number of bits of random code.
[0063] When the temporary address of slave device 32 does not match the current polling address, slave device 32 does not respond to the query command and continues to listen to the bus; conversely, when the temporary address of slave device 32 matches the current polling address, slave device 32 immediately responds to the query command.
[0064] In some embodiments, whether the temporary address of slave device 32 matches the current polling address can be determined by whether the temporary address of slave device 32 is consistent with the current polling address. If the temporary address of slave device 32 is consistent with the current polling address, it means that the temporary address of slave device 32 matches the current polling address; otherwise, if the temporary address of slave device 32 is inconsistent with the current polling address, it means that the temporary address of slave device 32 does not match the current polling address.
[0065] In this embodiment of the application, the slave devices 32 whose temporary addresses match the current polling address are referred to as target slave devices.
[0066] In some embodiments, when the temporary address of the target slave device matches the current polling address, the target slave device sends a feedback frame to the bus in response to the query command sent by the host computer 31. As an example, the feedback frame may include its own random code of a preset number of bits.
[0067] Understandably, due to potential communication failures between slave device 32 and host computer 31, host computer 31 may not be able to receive the feedback frame sent by the target slave device. For host computer 31, only upon receiving the feedback frame from the target slave device can it confirm a match. That is, upon receiving the complete random code (i.e., a random code of a preset number of bits) returned by the target slave device, host computer 31 immediately pauses polling and enters the address configuration process.
[0068] When the temporary address of the target slave device matches the current polling address, and the target slave device sends a feedback frame to the bus, if the host computer 31 fails to receive the feedback frame sent by the target slave device, then the host computer 31 will assume that no response was received within the waiting time after sending the query command, and there is no matching slave device 32. At this time, the host computer 31 will continue polling from the next polling address.
[0069] In step S130, after receiving the feedback frame, the host computer 31 can generate an address configuration instruction, which carries the final address. The host computer 31 sends the final address to the target slave device by sending the address configuration instruction to the bus. As an example, the final address can be an address with a certain order to ensure that it is assigned to the slave device 32 without duplication. For instance, the pre-set final addresses to be assigned to each slave device 32 can be a natural number sequence.
[0070] In some embodiments, considering that the host computer 31 and the slave device 32 communicate via a bus, in order to ensure that the target slave device can receive the final address, the address configuration instruction not only carries the final address but also carries the complete random code fed back by the target slave device, so that the target slave device can set the address and stop responding to subsequent polling. When all slave devices 32 receive the address configuration instruction and extract the target slave device's random code from the instruction, each slave device 32 verifies its identity by matching the target slave device's random code with its own random code. For slave devices 32 that fail to match, they determine that they are not the recipient of the instruction and therefore do not respond to the instruction, thereby avoiding incorrect address setting. The target slave device is verified successfully if it matches the random code in the instruction, thus correctly obtaining the final address assigned to it by the host computer 31.
[0071] Furthermore, after the target slave receives the final address, the target slave sets the final address.
[0072] It is understandable that when the target slave device sets the final address, the setting of the final address may succeed or fail.
[0073] In some embodiments, when the target slave device completes the final address setting, it can send an acknowledgment frame to the bus to indicate that the target slave device address setting was successful. When the host computer 31 receives the acknowledgment frame sent by the target slave device, the host computer 31 can confirm that the target slave device address setting was successful. At the same time, the host computer 31 will continue polling from the next polling address.
[0074] In some embodiments, the response frame may carry its final address and its own device number.
[0075] In some embodiments, in response to the failure to set the final address of the target slave, the host computer 31 continues to poll from the next polling address and does not repeatedly poll the current polling address.
[0076] For the host computer 31, it determines whether the final address setting of the target slave device was successful by whether it receives a response within a preset time after sending the final address. That is, the host computer 31 can send the final address to the bus and wait for a preset time to listen for the response from the slave device 32. If no response is received within the preset time after sending the final address, the host computer 31 determines that the final address setting of the target slave device has failed. As an example, the preset time can be 300ms, and its specific time can be adjusted adaptively according to the actual situation.
[0077] In some embodiments, after the target slave device completes the final address setting, it stops responding to subsequent polling, which can be achieved by setting a flag bit. In a specific example, after the target slave device completes the final address setting, it sends an acknowledge frame to the bus and simultaneously sets the flag bit, which was initially in the first state, to the second state, thereby permanently locking the address setting privileges and no longer responding to any automatic addressing related instructions, only responding to the service instructions corresponding to the final address. For example, the first state of the flag bit is 0, and its second state is 1.
[0078] Understandably, once the host computer 31 completes M rounds of polling, it will automatically terminate the polling process. Furthermore, the polling process will also automatically terminate when all slave devices 32 have completed setting their final addresses. Allowing the host computer 31 to automatically terminate the polling process makes the process controllable, thus preventing a bus dead loop.
[0079] In some embodiments, the automatic address setting method in this application may further include: First, obtain the number of slave devices participating in the network; Then, after setting the final address of a slave device, decrement the unassigned slave device count by one; Finally, in response to the unassigned slave count reaching zero, polling is terminated.
[0080] In some embodiments, the above process can be implemented in the following way: First, the initial value of the final address is set to the count of the unassigned slave 32, and the initial value of the count of the unassigned slave 32 is the number of slaves; Then, after setting the final address of a slave 32, the final address is updated to the value after decrementing the count of unassigned slave 32; The polling process terminates when the final address is zero.
[0081] The number of slave devices can be obtained, for example, by the total number of slave devices 32 whose addresses are to be set, as entered by the user in the host computer 31 interface.
[0082] After the host computer 31 obtains the number of slave devices, it needs to initialize the core parameters. For example, the initial value of the final address is set to the number of slave devices, which is also the initial value for counting unassigned slave devices 32; the polling round number is set to 1, and the polling address is set to 0. After the above parameters are initialized, the host computer 31 automatically starts the automatic addressing process.
[0083] In some embodiments, after setting the final address of a slave device 32, the specific implementation of updating the final address to the value after decrementing the count of unassigned slave devices 32 can be as follows: After the host computer 31 receives the response frame sent by the target slave device, the host computer 31 updates the final address to the value after decrementing the count of unassigned slave devices 32. The updated final address is the final address to be assigned to the next target wind turbine.
[0084] The host computer 31 assigns addresses to all slave computers 32 in the above manner. When the updated final address is zero, it means that all slave computers 32 have completed the final address setting. At this time, the host computer 31 can terminate the polling.
[0085] It is worth noting that addresses with a value of zero are usually broadcast addresses, so the final addresses assigned to slave 32 are all non-zero values.
[0086] In some embodiments, the automatic address setting method of this application further includes: After terminating polling, output the number of slave devices that successfully set the address and the number of slave devices that failed to set the address.
[0087] The number of slave devices whose addresses were successfully set and the number of slave devices whose addresses were not successfully set can both be determined by the core parameters set in the host computer 31.
[0088] In some embodiments, in response to the number of slave devices that have failed to set an address being greater than zero, the host computer 31 may also output a prompt message to prompt the user to troubleshoot bus hardware faults.
[0089] As an example, the number of slave devices whose addresses were successfully set, the number of slave devices whose addresses were not successfully set, and the prompt messages can all be displayed on the display device of the host computer 31.
[0090] In some embodiments, slave device 32 may be a fan.
[0091] This concludes the description of the automatic address setting method of this application. A complete automatic address setting method may include other steps, which will not be elaborated here.
[0092] In summary, the automatic address setting method of this application divides a preset number of random codes into M segments, each segment consisting of N bits. Simultaneously, the host computer performs polling in M rounds, sequentially sending numbers from 0 to N in each round. The polling address is determined by the number of bits. This ensures that in each round of polling, the slave device only participates in the matching with its i-th segment of random code. When the i-th segment of random code matches the current polling address, the slave device responds and obtains the final address, and then stops subsequent polling. Since each segment of random code has N bits, in any round of polling, only a few slave devices whose random code matches the current polling address will respond, thus avoiding message collisions caused by all slave devices responding simultaneously. Furthermore, the slave device immediately stops responding to subsequent polls after obtaining the final address, which also causes the number of slave devices to be assigned to decrease round by round, continuously reducing bus contention pressure. In addition, a preset number of bits is set for the random code of each slave device. The more bits preset, the more identity identifiers can be provided to the slave device, and the more slave devices can participate in the network simultaneously. This also reduces the probability of the same random code segment, significantly reducing the number of slave devices responding at the same time. Therefore, this application can reduce the probability of collisions caused by the increase in the number of slave devices from an exponential growth to a linear growth, increasing the number of slave devices supported by the system from the 20 level to over 100.
[0093] The automatic address setting method of this application embodiment requires no additional hardware cost. It can achieve automatic address allocation of a large number of wind turbines without manual intervention, without conflict, and with high reliability through software logic alone.
[0094] like Figure 2 and Figure 3 As shown, this application also provides an automatic address setting method applied to slave device 32. It is understood that, for better implementation of this method, the relevant hardware devices can be configured before implementation. For example, each slave device 32 stores a random code of a preset number of bits. The preset number of bits of random code is divided into M segments, each segment containing N random code segments.
[0095] The automatic address setting method of this application includes: Step S210: Obtain the current polling count i from the host computer, 1≤i≤M; Step S220: Read the i-th segment of random code corresponding to the number of polling from the preset number of random bits, and use it as a temporary address; Step S230: Receive the polling address from each frame of instructions sent by the host computer; Step S240: In response to the temporary address matching the polling address, a feedback frame is sent to the host computer; Step S250: Receive the final address sent by the host computer, write the final address into the local machine, and stop responding to subsequent polling.
[0096] It should be understood that the interaction process between the slave device 32 and the host computer 31 in this embodiment is the same as the interaction process between the host computer 31 and the slave device 32 in the previous embodiment. Therefore, this part will not be described again in this embodiment. In addition, the content that has been described in the previous embodiment will not be described again in this embodiment.
[0097] The preset number of bits in the random code is used to provide an identity identifier for slave device 32. A larger preset number of bits indicates more identity identifiers can be provided to slave device 32, allowing more slave devices 32 to participate in the network simultaneously. It also reduces the probability that different slave devices 32 will generate the same unique random code, thus lowering the probability of bus collisions. For example, the preset number of bits in the random code can be a 32-bit random code. A 32-bit random code can provide... Each identity identifier.
[0098] In some embodiments, a random code of a preset length can be generated by the MCU using a hardware random number generator. The preset length random code can be generated when the slave device 32 is first powered on. After generation, the preset length random code can be stored locally on the slave device 32.
[0099] After generating a random code of a preset length, it can be divided into M segments, each with N bits, i.e., M × N = preset length. The M segments are used for polling by the host computer 31 in different rounds, while the N-bit random code serves as the temporary address for slave devices 32 in these rounds. It should be understood that a larger preset length reduces the probability of multiple slave devices 32 having the same random code at the same location, significantly decreasing the number of slave devices responding simultaneously and reducing the probability of bus collisions. Furthermore, as the number of polling rounds increases, the number of slave devices obtaining a final address increases, while the number of slave devices without assigned addresses decreases. Therefore, when entering a new polling round, the reduced number of slave devices participating in address allocation decreases the probability of different slave devices 32 having the same temporary address, further reducing the number of slave devices responding simultaneously and thus lowering the probability of bus collisions.
[0100] In some embodiments, when splitting a random code of a preset number of bits, the value of N can be made as large as possible while ensuring that M is not equal to one. A larger value of M allows the host computer 31 to perform more polling operations; a larger value of N reduces the probability of duplicate temporary addresses in the slave device 32. For example, when the preset number of bits for the random code is 32 bits, M is 4 and N is 8, meaning the 32-bit random code is fixedly split into four consecutive 8-bit segments. These M segments of N-bit random code are also stored locally on the slave device 32.
[0101] In some embodiments, for step S210, the slave device 32 can obtain the current polling count of the host computer 31 by interacting with the host computer 31. Specifically, the slave device 32 receives a broadcast command sent by the host computer 31, wherein the broadcast command carries the current polling count. The slave device 32 can determine the current polling count from the broadcast command, thereby obtaining the current polling count.
[0102] In step S230, the slave device 32 receives the polling address sent by the host computer 31 by receiving the query command. Specifically, since the query command carries the polling address, the slave device 32 can extract the current polling address from the query command after receiving it.
[0103] Understandably, the polling address carried in each query command sent by the host computer 31 is different. Therefore, each time the slave computer 32 receives a query command from the host computer 31, it must match its temporary address with the obtained current polling address. If the temporary address of the slave computer 32 does not match the current polling address, the slave computer 32 will not respond to the query command and will continue to listen to the bus; conversely, if the temporary address of the slave computer 32 matches the current polling address, the slave computer 32 will immediately respond to the query command.
[0104] It should be noted that when the temporary address of slave device 32 matches the current polling address, it means that the host computer 31 is about to assign a final address to slave device 32. At this point, if slave device 32 obtains the final address and completes the final address setting, it will no longer respond to subsequent query commands sent by the host computer 31. Therefore, slave device 32 can determine whether to respond to query commands sent by the host computer 31 by confirming whether it has completed the final address setting.
[0105] In some embodiments, the slave device 32 can confirm whether it has completed setting the final address by setting a flag bit.
[0106] Specifically, after generating a random code of a preset length, slave device 32 can initialize its core parameters. These core parameters include, but are not limited to, flag bits, temporary address, and final communication address. The flag bits can be set to either a first value or a second value. The first value indicates that slave device 32 has completed setting the final address. The second value indicates that slave device 32 has not completed setting the final address. The initial value of the flag bits is set to the second value; for example, the first value can be 1 and the second value can be 0. The initial value of the temporary address is set to an invalid value; the initial value of the final communication address is also set to an invalid value.
[0107] Based on this, slave device 32 continuously monitors bus data after power-on. Upon receiving the polling address from each frame of instructions sent by host computer 31, it first performs permission checks based on the flag bits. As an example, the preset rules can be as follows: If the flag is the first value, it indicates that the slave device 32 has completed the final address setting and can be directly filtered. It will not respond to any automatic address setting related instructions sent by the host computer 31, but will only respond to the service control instructions corresponding to the final address. Among them, when the slave device 32 is a fan, the service control instructions may be, for example, fan speed, temperature monitoring, fault reporting, etc.
[0108] If the flag is the second value, it indicates that the slave device 32 has not completed the final address setting. At this time, the slave device 32 enters the instruction parsing state and responds to all automatic addressing related instructions.
[0109] Therefore, after receiving the polling address in each frame of instructions sent by the host computer, we can have: When the flag bit is set to the first value, the slave device will not respond to the polling commands from the host computer. In response to the flag being set to the second value, the slave device matches the temporary address with the polling address.
[0110] In step S240, when the temporary address of slave device 32 matches the current polling address, slave device 32 immediately responds to the query command. For example, slave device 32 can send a feedback frame to host computer 31 via the bus.
[0111] In some embodiments, the feedback frame may include a random code of a preset number of bits. By sending its complete random code to the host computer 31, the slave device 32 can facilitate the host computer 31 in verifying the final address, thus enabling the slave device 32 to accurately obtain its final address.
[0112] Regarding step S250, it is understood that since the slave device 32 and the host computer 31 communicate via a bus, all slave devices 32 can receive the instructions sent by the host computer 31 to the bus. As any one of the slave devices 32 that has not completed address setting, when it receives the address configuration instruction sent by the host computer 31, it can extract the complete random code and final address of the target wind turbine carried in the instruction.
[0113] At this point, slave device 32 compares the complete random code in the instruction with its own stored random code for verification. If the random code in the instruction does not match its stored random code, it means that slave device 32 is not the target slave device and will not respond to the instruction to avoid address missetting; if the random code in the instruction matches its stored random code, it means that slave device 32 is the target slave device, and the received final address is its final address. Slave device 32 can then set the final communication address as its final address.
[0114] In some embodiments, after the slave device 32 completes the setting of the final address, the slave device 32 stops responding to subsequent polling. This can be achieved through a flag bit. As an example, after the slave device 32 completes the setting of the final address, the slave device 32 can set the flag bit to a first value, thereby locking the address setting permission.
[0115] In some embodiments, slave device 32 may be a fan.
[0116] like Figure 3 As shown, this application also provides an automatic address setting system, which includes a host computer 31 and multiple slave computers 32. The host computer 31 can be used to execute the automatic address setting method in the first embodiment described above. Each slave computer 32 can be used to execute the automatic address setting method in the second embodiment described above. Since the host computer 31 applies the automatic address setting method in the first embodiment and the slave computers 32 apply the automatic address setting method in the second embodiment described above, this automatic address setting system has the same advantages as the aforementioned automatic address setting method.
[0117] The following is combined with Figure 4 The automatic address setting device 400 according to another aspect of this application is described. For example... Figure 4 As shown, the automatic addressing address setting device 400 may include a memory 410 and a processor 420. The memory 410 stores a computer program executed by the processor 420. When the computer program is executed, it causes the processor 420 to perform the aforementioned automatic addressing address setting method 100 according to the embodiments of this application. The automatic addressing address setting method 100 has been described in detail above. Those skilled in the art can understand the structure and operation of the automatic addressing address setting device 400 in conjunction with the foregoing description. For the sake of brevity, it will not be described again here.
[0118] Furthermore, according to embodiments of this application, a storage medium is also provided, on which program instructions are stored. When the program instructions are executed by a computer or processor, they are used to perform corresponding steps of the automatic address setting method 100 of this application. The storage medium may, for example, include a memory card of a smartphone, a storage component of a tablet computer, a hard disk of a personal computer, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disc read-only memory (CD-ROM), a USB memory, or any combination of the above storage media. A computer-readable storage medium may be any combination of one or more computer-readable storage media.
[0119] Furthermore, according to embodiments of this application, a computer program is also provided, which can be stored on a cloud or local storage medium. When this computer program is run by a computer or processor, it is used to perform the corresponding steps of the automatic address setting method 100 of this application embodiment.
[0120] Based on the above description, the automatic address setting method, system, device, storage medium, and program product of this application divide a random code of a preset number of bits into M segments, each segment of the random code being N bits, and simultaneously, the host computer performs polling in M rounds, sending 0 to N bits sequentially in each round. The polling address is determined by the number of bits. This ensures that in each round of polling, the slave device only participates in the matching with its i-th segment of random code. When the i-th segment of random code matches the current polling address, the slave device responds and obtains the final address, and then stops subsequent polling. Since each segment of random code has N bits, in any round of polling, only a few slave devices whose random code matches the current polling address will respond, thus avoiding message collisions caused by all slave devices responding simultaneously. Furthermore, the slave device immediately stops responding to subsequent polls after obtaining the final address, which also causes the number of slave devices to be assigned to decrease round by round, continuously reducing bus contention pressure. In addition, a preset number of bits is set for the random code of each slave device. The more bits preset, the more identity identifiers can be provided to the slave device, and the more slave devices can participate in the network simultaneously. This also reduces the probability of the same random code segment, significantly reducing the number of slave devices responding at the same time. Therefore, this application can reduce the probability of collisions caused by the increase in the number of slave devices from an exponential growth to a linear growth, increasing the number of slave devices supported by the system from the 20 level to over 100.
[0121] Although exemplary embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above exemplary embodiments are merely illustrative and are not intended to limit the scope of the invention. Various changes and modifications can be made therein by those skilled in the art without departing from the scope and spirit of the invention. All such changes and modifications are intended to be included within the scope of the invention as claimed in the appended claims.
[0122] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0123] In the several embodiments provided by this invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed.
[0124] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0125] Similarly, it should be understood that, in order to streamline the invention and aid in understanding one or more of the various aspects of the invention, features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the description of exemplary embodiments of the invention. However, the method of the invention should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the corresponding claims, its inventive point lies in solving the corresponding technical problem with fewer features than all of those in a single disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of the invention.
[0126] Those skilled in the art will understand that, apart from the mutual exclusion of features, all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or elements of any method or apparatus so disclosed may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0127] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments can be used in any combination.
[0128] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some modules in the article analysis device according to embodiments of the present invention. The present invention can also be implemented as an apparatus program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such programs implementing the present invention can be stored on a computer-readable medium or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
[0129] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.
[0130] Although several embodiments have been described herein, it should be understood that many other modifications and embodiments will arise in the mind of those skilled in the art, all of which will fall within the spirit and scope of the concept disclosed herein. More specifically, various modifications and changes may be made in terms of the arrangement and / or components of the subject matter within the scope of this disclosure, the drawings, and the appended claims. In addition to modifications and changes in the components and / or arrangement, the use of alternative methods will also be obvious to those skilled in the art.
Claims
1. An automatic address setting method, applied to a host computer, characterized in that, Each slave device has a preset number of random codes, which are presented as M segments of random codes, each segment having N bits of random code. The method includes: Execute the i-th round of polling, and send 0 to 10 ... The polling address, 1≤i≤M; The target slave device sends a feedback frame when the i-th random code in the M-segments of the target slave device, corresponding to the i-th round of polling, matches the current polling address; The final address is sent to the target slave device based on the feedback frame, so that the target slave device sets the final address and stops responding to subsequent polling.
2. The automatic address setting method as described in claim 1, characterized in that, Also includes: Before each round of polling, a broadcast command carrying the number of polling is sent to the bus so that slave devices that have not set the final address update their temporary addresses according to the number of polling. The temporary address is a segment of random code from the M segments of random code.
3. The automatic address setting method as described in claim 1, characterized in that, Also includes: In response to the failure to set the final address of the target slave, the query continues from the next round of address queries.
4. The automatic address setting method as described in claim 3, characterized in that, The response to the failure to set the final address of the target slave device, continuing the query from the next address, includes: If no response is received within a preset time after the final address is sent, the final address setting of the target slave device is deemed to have failed.
5. The automatic address setting method as described in claim 1, characterized in that, Also includes: Obtain the number of slave devices participating in the network; The initial value of the final address is set to the unallocated slave count, and the initial value of the unallocated slave count is the number of slaves; After setting the final address of a slave device, the final address is updated to the value of the unassigned slave device count minus one. The polling process terminates when the final address is zero.
6. The automatic addressing address setting method as described in claim 1, characterized in that, Also includes: In response to the i-th round of polling, 0 to Once all polling addresses have been sent, set i = i + 1 and return to execute the i-th round of polling.
7. The automatic addressing address setting method as described in claim 6, characterized in that, Also includes: In response to the completion of M rounds of polling, the polling process terminates.
8. The automatic address setting method as described in any one of claims 5 and 7, characterized in that, Also includes: After terminating polling, output the number of slave devices that successfully set the address and the number of slave devices that failed to set the address.
9. The automatic addressing address setting method as described in claim 8, characterized in that, If the number of slave devices that failed to set the address is greater than zero, an error message will be output.
10. The automatic address setting method as described in claim 1, characterized in that, The feedback frame includes a random code of a preset number of bits from the target slave device, and the method further includes: The final address and a preset number of random codes of the target slave are sent via the bus, so that after the target slave successfully verifies the address using the received preset number of random codes, it sets the address according to the final address and stops responding to subsequent polling.
11. An automatic address setting method, applied to a slave device, characterized in that, The slave device stores a random code of a preset number of bits, which is divided into M segments, each segment having N bits of random code. The method includes: Get the current polling count i from the host computer, 1≤i≤M; Read the i-th segment of random code corresponding to the number of polling from the preset number of random code segments, and use it as a temporary address; Receive the polling address in each frame of instruction sent by the host computer; In response to the temporary address matching the polling address, a feedback frame is sent to the host computer; Receive the final address sent by the host computer, write the final address into the local machine, and stop responding to subsequent polling.
12. The automatic addressing address setting method as described in claim 11, characterized in that, The slave device is equipped with a flag bit, and the step of stopping response to subsequent polling includes: Set the flag bit to the first value.
13. The automatic addressing address setting method as described in claim 12, characterized in that, After receiving the polling address from each frame of instructions sent by the host computer, we have: In response to the flag bit being of the first value, the polling command from the host computer will not be responded to; In response to the flag bit being a second value, the temporary address is matched with the polling address.
14. The automatic addressing address setting method as described in claim 11, characterized in that, The process of obtaining the current polling count i of the host computer includes: Receive broadcast commands sent by the host computer, which carry the current polling count; The current polling number is determined from the broadcast instruction.
15. The automatic addressing address setting method as described in claim 11, characterized in that, The feedback frame includes the preset number of random codes.
16. An automatic address setting system, characterized in that, It includes a host computer and multiple slave computers, among which: The host computer is used to execute the automatic address setting method as described in any one of claims 1 to 10; Each of the slave devices is used to execute the automatic address setting method as described in any one of claims 11 to 15.
17. An automatic address setting device, characterized in that, The apparatus includes a memory and a processor, the memory storing a computer program executed by the processor, the computer program, when executed by the processor, causing the processor to perform the automatic addressing address setting method according to any one of claims 1-10.
18. A storage medium, characterized in that, The storage medium stores a computer program that is executed by a processor, which, when executed by the processor, causes the processor to perform the automatic addressing address setting method according to any one of claims 1-10.
19. A computer program product, characterized in that, When the computer program product is run by a processor, the processor causes the processor to perform the automatic addressing address setting method according to any one of claims 1-10.
