Communication address allocation method

By broadcasting the communication address in the Modbus communication system and triggering the confirmation allocation of slave devices, the problem of lack of physical correlation and operational complexity of slave device address allocation in the prior art is solved, and efficient and fast address allocation and conflict avoidance are achieved.

CN119996378APending Publication Date: 2025-05-13SCHNEIDER ELECTRIC IND SAS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311501920.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-10
Publication Date
2025-05-13

Smart Images

  • Figure CN119996378A_ABST
    Figure CN119996378A_ABST
Patent Text Reader

Abstract

The invention relates to a communication address allocation method. The method comprises the following steps: a master device broadcasts a first communication address in a plurality of to-be-allocated communication addresses to a plurality of slave devices; a first slave device in the plurality of slave devices obtains a trigger input; and the first slave device obtains the first communication address according to the trigger input.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a communication address allocation method. Background Art

[0002] In the fields of industrial control, power communication, intelligent instruments, etc., serial communication is usually used for data exchange. Schneider Electric has developed the Modbus bus protocol for industrial sites. The Modbus communication system includes a master device and multiple Modbus slave devices. Before the master device communicates with the slave device, the master device needs to assign a communication address to each slave device. In the prior art, the assignment of the communication address of the slave device in the Modbus communication system is usually based on the manual setting at the slave device, such as assigning the slave device communication address by knob dialing or screen input. The premise of this setting method is that the slave device can be easily accessed by the operator and set up. Another common communication address allocation method is random allocation, but the disadvantage of this allocation method is that there is no correlation between the communication address and the physical installation location of the slave device. Summary of the invention

[0003] The present disclosure provides a communication address allocation method, which is easy for an operator to perform and can establish an association between a communication address and a physical installation location of a slave device.

[0004] The present disclosure provides a communication address allocation method, which includes a master device broadcasting a first communication address among multiple communication addresses to be allocated to multiple slave devices; a first slave device among the multiple slave devices obtains a trigger input; and the first slave device obtains the first communication address according to the trigger input.

[0005] In an embodiment according to the present disclosure, the method further includes: the master device receiving the multiple communication addresses to be allocated input from the outside, wherein the multiple communication addresses to be allocated correspond one-to-one with the identity information of the multiple slave devices respectively.

[0006] In an embodiment according to the present disclosure, the method further includes: the master device obtaining confirmation information from the first slave device according to the first communication address to confirm that the first slave device successfully obtains the first communication address.

[0007] In an embodiment according to the present disclosure, when the master device fails to obtain confirmation information from any one of the plurality of slave devices for more than a predetermined time threshold, the master device determines that allocation of the first communication address has failed.

[0008] In an embodiment of the present disclosure, the method further includes, before the master device broadcasts a first communication address among a plurality of communication addresses to be assigned to the plurality of slave devices: the master device controls the plurality of slave devices to enter an address allocation mode, so that a slave device among the plurality of slave devices whose communication address can be changed has a temporary communication address, wherein the temporary communication address is different from the plurality of communication addresses to be assigned.

[0009] In an embodiment of the present disclosure, the method further includes, after the master device controls the multiple slave devices to enter an address allocation mode: the master device reads the communication addresses of the multiple slave devices to check whether the read communication address conflicts with any of the multiple communication addresses to be allocated.

[0010] In an embodiment according to the present disclosure, when the read communication address conflicts with any one of the plurality of communication addresses to be allocated, the master device outputs conflict prompt information.

[0011] In an embodiment according to the present disclosure, the broadcasting is performed multiple times.

[0012] In an embodiment according to the present disclosure, the method further includes: the master device checking whether the multiple slave devices are all assigned correct communication addresses based on the correspondence between the multiple communication addresses to be assigned and the identity information of the multiple slave devices.

[0013] In an embodiment according to the present disclosure, the trigger input includes a manual trigger operation at the first slave device.

[0014] According to the method disclosed in the present invention, communication addresses can be efficiently and quickly assigned to each slave device, and conflicts between the communication addresses of the slave devices are avoided. In addition, since the triggering operation is performed at the slave device, the physical location of the slave device is therefore known, and the communication address of the slave device can be associated with the physical location according to the method disclosed in the present invention. In addition, under the framework of the method disclosed in the present invention, it is not necessary for the operator to perform complex operations on the slave device to assign the slave device communication address. In the case where the slave devices are densely arranged, this is very friendly to the operator on site. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for describing the embodiments. The drawings described below are only exemplary embodiments of the present disclosure.

[0016] Figure 1 A schematic diagram showing the structure of a communication system according to an embodiment of the present disclosure is shown.

[0017] Figure 2A flow chart of a communication address allocation method according to an embodiment of the present disclosure is shown.

[0018] Figure 3 The correspondence between the communication address to be allocated and the identity information of the slave device is shown in a table.

[0019] Figure 4 A flow chart of a communication address allocation method according to another embodiment of the present disclosure is shown.

[0020] Figure 5 A flow chart showing a communication address allocation method according to another embodiment of the present disclosure is shown, and

[0021] Figure 6 A flow chart of a communication address allocation method according to another embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solution and advantages of the present disclosure more obvious, the exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described here.

[0023] In this specification and the accompanying drawings, substantially the same or similar steps and elements are represented by the same or similar reference numerals, and repeated descriptions of these steps and elements will be omitted. At the same time, in the description of the present disclosure, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance or ranking.

[0024] In this specification and the accompanying drawings, elements are described in singular or plural form, depending on the embodiment. However, the singular and plural forms are appropriately selected for the proposed situation only for the convenience of explanation and are not intended to limit the present disclosure to this. Therefore, the singular form may include the plural form, and the plural form may also include the singular form, unless the context clearly indicates otherwise. In the embodiments of the present disclosure, unless otherwise clearly stated, "connection" does not mean that it must be "directly connected" or "directly in contact", but only needs to be electrically connected.

[0025] Figure 1The structural diagram of the bus communication system 100 according to the embodiment of the present disclosure is shown. The bus communication system 100 has a master-slave communication structure, which includes a master device 110 and three slave devices 121, 122 and 123. The master device 110 and the slave devices 121, 122 and 123 are serially connected or connected in series through a bus. The slave devices 121, 122 and 123 are connected to the power devices 131, 132 and 133 respectively. The bus communication system 100 can realize the communication between the master device 110 and the slave devices 121, 122 and 123, and finally realize the control of the power devices 121, 122 and 123, such as turning on and off the power devices 121, 122 and 123. The three slave devices and power devices shown are shown only as examples, and the bus communication system 100 can also include any other number of slave devices and power devices. In addition, in an embodiment according to the present disclosure, a gateway 140 may also be arranged between the master device 110 and the slave devices 121, 122, and 123. In an embodiment according to the present disclosure, the slave device may be, for example, a communication module in a circuit breaker or a communication module attached to a circuit breaker. The slave device or the communication module supports bus communication, such as Modbus communication, especially Modbus RS485 communication. The switching on and off of each circuit breaker is used to control the power on and off of different electrical devices or circuits. The electrical devices 131, 132, and 133 may correspond to electrical devices such as lighting, motors, and air conditioners, for example.

[0026] Subsequently, in order to control the on and off of each electrical device through the master device 110, the master device 110 must establish a communication connection with the communication modules in each electrical device, that is, each slave device 121, 122 and 123. In the bus communication system, a prerequisite for establishing a communication connection is that the master device 110 assigns a communication address to each slave device 121, 122 and 123. Figure 2 The flowchart of the communication address allocation method 200 according to the embodiment of the present disclosure is shown. In the method 200, the master device broadcasts the first communication address among the multiple communication addresses to be allocated to the multiple slave devices (step S220); the first slave device among the multiple slave devices obtains a trigger input (step S230); and the first slave device obtains the first communication address according to the trigger input (step S240). In addition, in the embodiment according to the present disclosure, step S210 can be added to the method 200, which is Figure 2In the method step S210, the master device receives the multiple communication addresses to be assigned input from the outside, wherein the multiple communication addresses to be assigned correspond one to one with the identity information of the multiple slave devices. After executing step S240, the method 200 returns to step S220 to broadcast another communication address of the communication addresses to be assigned to the multiple slave devices, and repeats steps S220 to S240 until the master device broadcasts the last communication address to be assigned or until all the slave devices have obtained the communication addresses.

[0027] In an embodiment according to the present disclosure, a plurality of communication addresses to be allocated may be, for example, a series of numbers, in particular, continuous numbers, such as 17, 18, 19 ... These communication addresses to be allocated may be, for example, manually imported or entered into the master device 110 in step S210. In order to allocate these communication addresses to the slave devices 121, 122 and 123, the master device 110 first broadcasts one of the communication addresses to be allocated, such as communication address 17, to the slave devices 121, 122 and 123. The master device 110 may broadcast the communication address to the slave devices 121, 122 and 123 for multiple times to ensure that all the slave devices can receive the communication address. Subsequently, the slave device that wishes to obtain the communication address or plans to obtain the communication address obtains a trigger input. In an embodiment according to the present disclosure, the trigger input includes a manual trigger operation at the slave device, which may be implemented, for example, by manually operating the slave device by an operator, such as by pressing a button on the slave device. Subsequently, the slave device obtains the currently broadcasted communication address to be allocated, such as the communication address 17 mentioned in the above example, according to the trigger input.

[0028] According to the method disclosed in the present invention, communication addresses can be efficiently and quickly assigned to each slave device, and conflicts between the communication addresses of the slave devices are avoided. In addition, since the trigger input is performed at the slave device, the physical location of the slave device is therefore known, and the communication address of the slave device can be associated with the physical location according to the method disclosed in the present invention. In addition, under the framework of the method disclosed in the present invention, it is not necessary for the operator to perform complex operations on the slave device to assign the slave device communication address. In the case where the slave devices (such as the communication modules in the circuit breaker) are densely arranged, this is very friendly to the operators on site.

[0029] In an embodiment of the present disclosure, when the master device receives the multiple communication addresses to be assigned input from the outside (step S210), the multiple communication addresses to be assigned can correspond to the identity information of the multiple slave devices one by one, for example. The identity information of the slave device is assigned by the electric device associated with it, so the identity information of the slave device can be, for example, the name of the electric device associated with it. The above one-to-one correspondence indicates that the operator has pre-planned the correspondence between the communication address to be assigned and the slave device (or the electric device associated with the slave device). Figure 3 The correspondence between the communication address to be allocated and the identity information of the slave device is shown in a table form.

[0030] In the process of arranging and building the power supply lines of the electrical equipment, the staff already knows the location of the circuit breaker of the electrical equipment and which electrical equipment the circuit breaker is used to control. The name of the controlled electrical equipment is clearly indicated at the corresponding circuit breaker, for example, by a label. Therefore, the one-to-one correspondence between the communication address and the identity information of the slave device represents the planning of the allocation of the communication address. Figure 3 For example, the operator plans or expects to assign communication address 17 to lighting, communication address 18 to motors, and communication address 17 to air conditioners. Therefore, when performing steps S210 to S240 of the method according to the present disclosure based on the one-to-one correspondence between the communication addresses to be assigned and the identity information of the slave devices, the master device 110 can associate each communication address with the physical address of the slave device (or the circuit breaker associated with the slave device), and can also associate each communication address with the location information of the corresponding electrical device. In addition, this one-to-one correspondence also helps the master device to subsequently check whether the slave device has correctly obtained the planned communication address.

[0031] Figure 4 FIG. 4 is a flow chart of a communication address allocation method 400 according to another embodiment of the present disclosure. Figure 2In the method 200 shown in the figure, a method step S410 is added after step S240 in method 400, wherein the master device obtains confirmation information from the first slave device according to the first communication address to confirm that the first slave device successfully obtains the first communication address. The confirmation information may be, for example, a serial number of a circuit breaker or an electrical device associated with the first slave device, such as an SN code. Specifically, the master device 110 may send a read command to read the confirmation information according to the first communication address broadcasted in step S220. If, in step S230, the first slave device obtains a trigger input and thus obtains a first communication address, the master device 110 can find the slave device according to the first communication address and can successfully read the confirmation information of the first slave device. However, if any of the slave devices does not obtain a trigger input, the master device cannot find any slave device according to the first communication address and cannot successfully read the confirmation information.

[0032] In an embodiment according to the present disclosure, for example, when the master device does not obtain confirmation information from any of the multiple slave devices, the master device may determine that the allocation of the first communication address has failed. Here, the master device may also output prompt information, for example, when the allocation of communication address 17 fails, the master device outputs "communication address 17 is not allocated". In an embodiment according to the present disclosure, the master device 110 may then continue to perform step S220 to broadcast the next communication address to be allocated to all slave devices.

[0033] In an embodiment according to the present disclosure, a time threshold may be set for obtaining confirmation information. If the master device fails to obtain confirmation information from any of the multiple slave devices within a predetermined time threshold, the master device determines that the allocation of the first communication address has failed. The time threshold may be set to any value between 1s and 25s, for example. Within the time threshold, the master device 110 may send one or more read commands to read confirmation information from the slave device. If confirmation information, such as the serial number of a circuit breaker or power-consuming device associated with the slave device, is not read within the time threshold, it is determined that the current communication address allocation has failed, and the corresponding slave device has not obtained the communication address.

[0034] Figure 5 FIG. 5 is a flow chart of a communication address allocation method 500 according to another embodiment of the present disclosure. Figure 2In the method 200 shown in the figure, the method 500 adds a method step S510 between step S210 and step S220. In step S510, the master device controls the multiple slave devices to enter the address allocation mode, so that the slave devices whose communication addresses can be changed among the multiple slave devices have temporary communication addresses. The temporary communication address is different from the multiple communication addresses to be allocated. In an embodiment according to the present disclosure, the communication address to be allocated can be, for example, in the range of 1 to 99, and the temporary communication address can be, for example, set to a number outside the above range, such as 247.

[0035] Since some slave devices already have communication addresses, when the master device allocates communication addresses, the communication address to be allocated may overlap with the existing communication address of the slave device, or the communication address to be allocated to the slave device may conflict with the existing communication address of the slave device. In order to avoid the interference caused by such duplication and conflict, the address allocation mode and temporary communication address are introduced. In addition, the introduction of temporary communication addresses can comply with the existing specifications of Modbus communication to the greatest extent.

[0036] In the embodiment according to the present disclosure, the slave device can be divided into two categories, one of which is compatible with the communication address allocation method according to each embodiment of the present disclosure, and especially the slave device of the compatible method 500, hereinafter referred to as a compatible slave device. A compatible slave device is a slave device whose communication address can be changed, and it has a temporary communication address in the address allocation mode. The other is a slave device that is not compatible with the communication address allocation method according to each embodiment of the present disclosure, hereinafter referred to as an incompatible slave device. An incompatible slave device is a slave device whose communication address cannot be changed, and it will keep its original communication address unchanged in the address allocation mode. Therefore, when executing step S510, a compatible slave device can enter the address allocation mode and has a temporary communication address, and the communication address to be allocated will not conflict with the temporary communication address. However, the incompatible slave device still has its original communication address in step S510, and the original communication address may conflict with the communication address to be allocated. An incompatible slave device can especially be a slave device of an older model or a slave device produced by other manufacturers.

[0037] In order to discover and handle incompatible slave devices, Figure 6 FIG. 6 is a flowchart of a communication address allocation method 600 according to another embodiment of the present disclosure. Figure 5The method 500 shown, the method 600 adds a method step S610 after step S510. In step S610, the master device reads the communication addresses of the multiple slave devices to check whether the read communication address conflicts with any one of the multiple communication addresses to be assigned. If there is an incompatible slave device, its communication address will not be changed to a temporary communication address, such as 274, but will maintain its original communication address, such as a value in the range of 1 to 99. The original communication address may be consistent with one of the communication addresses to be assigned. In an embodiment according to the present disclosure, in the case where the read communication address conflicts with any one of the multiple communication addresses to be assigned, the master device outputs a conflict prompt message and exits the communication address allocation. Subsequently, the operator can re-enter and store the communication address to be assigned in the master device to exclude the communication address of the incompatible slave device, or the operator can manually modify its communication address at the incompatible slave device to distinguish it from the communication address to be assigned of the master device. If there is no communication address conflict, the master device can execute subsequent method steps.

[0038] In an embodiment according to the present disclosure, in methods 200, 400, 500 and 600 including step S210, the master device can, for example, check whether the multiple slave devices are all assigned correct communication addresses based on the corresponding relationship between the multiple communication addresses to be assigned and the identity information of the multiple slave devices. The reason for adding this additional step is that on the one hand, there may be untriggered slave devices, so that there are communication addresses that fail to be assigned. In this case, according to the corresponding relationship between the multiple communication addresses to be assigned and the identity information of the multiple slave devices, it can be found that there is a communication address assignment failure. The master device can then repeat steps S210 to S240 of method 200 until all communication addresses are successfully assigned.

[0039] On the other hand, false triggering may occur when triggering the slave device. Figure 3The master device plans to assign communication address 17 to the slave device associated with the lighting, but the slave device associated with the motor is triggered by mistake, and the slave device associated with the motor obtains communication address 17 at this time. Subsequently, when the master device assigns communication address 18 (which is planned to be assigned to the motor), the slave device associated with the motor is correctly triggered, and the slave device associated with the motor obtains communication address 18 at this time, which causes the original communication address 17 to lose the corresponding slave device. Therefore, when the master device assigns all communication addresses and checks, it will be found that there is a communication address 17 that has not been successfully assigned. In this case, after the master device obtains confirmation information from the corresponding slave device according to the communication address, the master device can check whether the multiple slave devices are all assigned the correct communication addresses according to the correspondence between the multiple communication addresses to be assigned and the identity information of the multiple slave devices. For example, the master device can also output the communication address to be assigned, the identity information of the slave device corresponding thereto, and the obtained confirmation information, such as the serial number of the electric device, in the form of a list. The master device can check whether the confirmation information, such as the serial number of the electric device, correctly indicates the identity information of the slave device, that is, the name of the electric device. If the indication of the confirmation information is wrong, the operator can then perform method steps S210 to S410 only for the communication addresses that are assigned incorrectly. In another embodiment, the master device can also output the total number of communication addresses to be assigned, the number of assigned communication addresses, and the number of unassigned / incorrectly assigned communication addresses after the check is completed, so as to intuitively inform the operator how many communication addresses need to be assigned later. The master device can then repeat steps S210 to S410 of method 400 until all communication addresses are successfully assigned.

[0040] The block diagrams of the circuits, units, devices, apparatuses, equipment, and systems involved in the present disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these circuits, units, devices, apparatuses, equipment, and systems may be connected, arranged, and configured in any manner as long as the desired purpose can be achieved. The circuits, units, devices, and apparatuses involved in the present disclosure may be implemented in any suitable manner, such as using a dedicated integrated circuit, a field programmable gate array (FPGA), etc., or a general-purpose processor in combination with a known program.

[0041] Those skilled in the art should understand that the above-mentioned specific embodiments are merely examples and not limitations, and various modifications, combinations, partial combinations and replacements may be made to the embodiments of the present disclosure according to design requirements and other factors. As long as they are within the scope of the attached claims or their equivalents, they belong to the scope of rights to be protected by the present disclosure.

Claims

1. A communication address allocation method, comprising: The master device broadcasts a first communication address among a plurality of communication addresses to be allocated to a plurality of slave devices; A first slave device among the plurality of slave devices obtains a trigger input; as well as The first slave device obtains the first communication address according to the trigger input.

2. The method according to claim 1, further comprising: The master device receives the plurality of communication addresses to be assigned input from the outside, The multiple communication addresses to be allocated correspond to the identity information of the multiple slave devices one by one.

3. The method according to claim 1, further comprising: The master device obtains confirmation information from the first slave device according to the first communication address to confirm that the first slave device successfully obtains the first communication address.

4. The method according to claim 1, wherein: In a case where the master device does not obtain confirmation information from any of the plurality of slave devices for more than a predetermined time threshold, the master device determines that allocation of the first communication address has failed.

5. The method according to claim 1, further comprising, before the master device broadcasts the first communication address among the plurality of communication addresses to be allocated to the plurality of slave devices: The master device controls the plurality of slave devices to enter an address allocation mode so that the slave devices whose communication addresses can be changed among the plurality of slave devices have temporary communication addresses. The temporary communication address is different from the multiple communication addresses to be allocated.

6. The method according to claim 5, further comprising, after the master device controls the plurality of slave devices to enter an address allocation mode: The master device reads the communication addresses of the plurality of slave devices to check whether the read communication address conflicts with any one of the plurality of communication addresses to be assigned.

7. The method according to claim 6, wherein: In the case that the read communication address conflicts with any one of the plurality of communication addresses to be allocated, the master device outputs conflict prompt information.

8. The method according to claim 1, wherein: The broadcasting is performed multiple times.

9. The method according to claim 2, further comprising: The master device checks whether the multiple slave devices are all assigned correct communication addresses according to the correspondence between the multiple communication addresses to be assigned and the identity information of the multiple slave devices.

10. The method according to claim 1, wherein: The trigger input comprises a manual trigger operation at the first slave device.