CN210518417U - Address allocation system - Google Patents

Address allocation system Download PDF

Info

Publication number
CN210518417U
CN210518417U CN201922482970.0U CN201922482970U CN210518417U CN 210518417 U CN210518417 U CN 210518417U CN 201922482970 U CN201922482970 U CN 201922482970U CN 210518417 U CN210518417 U CN 210518417U
Authority
CN
China
Prior art keywords
slave device
address information
address
master device
ith
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201922482970.0U
Other languages
Chinese (zh)
Inventor
吴文豪
任鹏
叶王建
唐麒麟
张文辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN201922482970.0U priority Critical patent/CN210518417U/en
Application granted granted Critical
Publication of CN210518417U publication Critical patent/CN210518417U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The present disclosure provides an address assignment system. The address allocation system comprises a master device and N slave devices, wherein the master device and the N slave devices are connected in series, each slave device comprises an input port and an output port, the input port of the 1 st slave device is electrically connected with the master device, the output port of each slave device is connected with the input port of the next adjacent slave device, and the output port of the Nth slave device is suspended; each slave device sets its own input port and output port to off state in the case of not receiving address information from the master device, stores the address information locally in the case of receiving the address information from the master device for the first time, and sets its own input port and output port to on state. The method and the device can determine the logistics connection position of the device while realizing automatic allocation of the device address, and meanwhile, the device deployment cannot be limited by space.

Description

Address allocation system
Technical Field
The present disclosure relates to the field of control, and in particular, to an address assignment system.
Background
Currently, in industrial equipment applications, there are three main scenarios for automatic allocation of equipment addresses:
1. the method is applied to the masterless communication, for example, the Controller Area Network (CAN) communication is adopted, a Media Access Control (MAC) address chip is integrated in the device as a unique mark, a central processing unit acquires and sequences MAC address information for the device, and finally the central processing unit allocates an address for the device;
2. the device is applied to master-slave communication, such as RS485, an input signal port is integrated in the device, when the input signal port detects a signal, the address configuration of a master module is responded, and the input signal is output by the master module or is output by a configured superior slave module, so that the address allocation is realized;
3. through structure and hardware design, address information is preset on the wiring board, and when a module is inserted into the wiring board, the module acquires an equipment address through the wiring board.
SUMMERY OF THE UTILITY MODEL
The inventors have noted that there are corresponding drawbacks in terms of automatic assignment of device addresses, whether for master-slave or for masterless communication. For example, in the above-described automatic assignment scheme for setting addresses 1, since the physical connection location of the device cannot be known, it is necessary to manually confirm which device the address of each device corresponds to. In the above-described 2 nd automatic address allocation scheme, although the physical connection location of the devices can be known definitely, the devices cannot be spaced too far apart due to the need for signal output, which limits the locations where the devices are arranged. In the above 3 rd automatic address allocation scheme, since a line bank needs to be used, the arrangement position of the devices and the number of the devices to be used are limited.
Therefore, the address allocation scheme is provided, the logistics connection position of the equipment can be determined while the automatic allocation of the equipment address is realized, and meanwhile, the problem of space limitation is avoided in equipment deployment.
According to a first aspect of embodiments of the present disclosure, there is provided an address allocation system, comprising a master device and N slave devices, the master device and the N slave devices being connected in series, wherein: each slave device comprises an input port and an output port, wherein the input port of the 1 st slave device is electrically connected with the master device, the output port of each slave device is connected with the input port of the next adjacent slave device, and the output port of the Nth slave device is suspended; each slave device sets its own input port and output port to be in an off state when not receiving address information from the master device, stores the address information locally when receiving the address information from the master device for the first time, and sets its own input port and output port to be in an on state.
In some embodiments, each slave device further includes a communication module and a switch module, wherein in each slave device, the switch module is electrically connected to the communication module, the input port, and the output port, respectively, and the switch module, in a case where address information from the master device is first received through the input port, transmits the received address information to the communication module, and sets the input port and the output port to a conductive state.
In some embodiments, the communication module in each slave device feeds back configuration confirmation information to the master device through the input port upon receiving address information from the master device.
In some embodiments, after sending address information to the ith slave device, the master device determines whether configuration confirmation information fed back by the ith slave device is received within a predetermined time, and if the configuration confirmation information fed back by the ith slave device is received within the predetermined time and the ith slave device is not the nth device, continues to send address information to the (i + 1) th slave device, where i is greater than or equal to 1 and is less than or equal to N.
In some embodiments, the master device receives the configuration confirmation information fed back by the ith slave device within a predetermined time, and stops sending address information if the ith slave device is the nth device, so as to enable the N slave devices to enter the operating mode.
In some embodiments, after sending address information to the ith slave device, if configuration confirmation information fed back by the ith slave device cannot be received within a predetermined time, the master device repeatedly executes an operation of sending address information to the ith slave device, and if configuration confirmation information fed back by the ith slave device cannot be received within a predetermined time after the operation is repeatedly executed for a predetermined number of times, performs fault alarm processing.
In some embodiments, after sending address information to the ith slave device, if the configuration confirmation information fed back by the ith slave device cannot be received within a predetermined time after the master device sends address information to the ith slave device, the master device repeatedly executes the operation of sending address information to the ith slave device, and if the configuration confirmation information fed back by the ith slave device cannot be received within the predetermined time after the operation is repeatedly executed for a predetermined time, the master device stops sending address information, so that the slave device which successfully receives address information enters an operating mode.
In some embodiments, the master device and the N slave devices communicate using a CAN bus or an RS485 bus.
Other features of the present disclosure and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and for those skilled in the art, other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a schematic diagram of an address assignment system according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of an address allocation system according to another embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
The relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
Fig. 1 is a schematic structural diagram of an address allocation system according to an embodiment of the present disclosure. As shown in fig. 1, the address allocation system includes a master device 1 and N slave devices 21-2N, N being a natural number. The master device 1 and the N slave devices 21-2N are connected in series.
In some embodiments, master 1 and N slaves communicate using a CAN bus or an RS485 bus.
As shown in fig. 1, the master device 1 includes an output port 11. Each slave device includes an input port and an output port. The input port 211 of the 1 st slave device 21 is electrically connected to the output port 11 of the master device, and the output port 212 of the 1 st slave device 21 is electrically connected to the input port 221 of the 2 nd slave device 22. Output port 222 of the 2 nd slave device 22 is electrically connected to the input port of the 3 rd slave device, and so on. The input port 2N1 of the nth slave device 2N is electrically connected to the output port of the N-1 th slave device, and the output port 2N2 of the nth slave device 2N is floating.
Each slave device sets its own input port and output port to off state when not receiving address information from the master device, stores the address information locally when receiving the address information from the master device for the first time, and sets its own input port and output port to on state.
In the address allocation system provided in the above embodiment of the present disclosure, the slave device sets its own input port and output port to the disconnected state without receiving address information from the master device. When the slave device receives the address information from the master device for the first time, the slave device sets its input port and output port to the on state. So that after the slave device receives the address information from the master device again, the slave device does not process the address information because the slave device already obtains the address information sent by the master device. At the same time, since the input port and the output port are already on, the address information can be transmitted to the next cluster device connected in series. Since the slave device at the next level can obtain the address information only after the slave device at the previous level obtains the address information, the master device can determine the physical location between the slave devices. Further, since the installation position of each slave device is determined by the communication line, the installation position of each slave device can be flexibly adjusted as necessary. For example, RS485 and CAN communications CAN reach distances of several hundred meters to 1 kilometer.
Fig. 2 is a schematic structural diagram of an address allocation system according to another embodiment of the present disclosure. Fig. 2 differs from fig. 1 in that in the embodiment shown in fig. 2 each slave device comprises, in addition to an input port and an output port, a communication module and a switch module. In each slave device, the switch module is electrically connected with the communication module, the input port and the output port respectively. In the case where the switch module does not receive address information from the host device through the input port, the input port and the output port are in an off state. If the switch module receives the address information from the main device for the first time through the input port, the switch module sends the received address information to the communication module, and sets the input port and the output port to be in a conducting state. If the switch module receives the address information from the master device again, the address information is not processed, and the input port and the output port are in a conducting state, so that the address information can be transmitted to the next slave device.
For example, as shown in fig. 2, the master device 1 transmits the first address information to the slave device 21 through the output port 11. The switch module 213 in the slave device 21 receives the address information for the first time, and sends the first address information to the communication module 214 for configuration. The switch module 213 furthermore controls the input port 211 and the output port 212 to be conductive. Next, the master device 1 transmits second address information to the slave device 22 through the output port 11. After the second address information reaches the switch module 213 of the slave device 21, the communication module 214 configures the address information, and therefore the switch module 213 does not process the second address information. Meanwhile, the second address information is transmitted to the switch module 223 of the slave 22 due to the input port 211 and the output port 212. Based on the same processing as the slave device 21, the switch module 223 will send the second address information to the communication module 224 for configuration, and will input the port 221 and output the port 222. By analogy, the master device 1 finally sends the nth address information to the switch module 2N3 in the slave device N, and the switch module 2N3 sends the nth address information to the communication module 2N4 for configuration. Since the slave N is the last slave, the switch module 2N3 still keeps the input port 2N21 and the output port 2N2 in the open state.
In some embodiments, as shown in fig. 2, in each slave device, the communication module feeds back configuration confirmation information to the master device through the input port in the case of receiving address information from the master device. For example, the communication module 224 in the slave device 22 sends configuration confirmation information to the master device 1 through the input port 221 after receiving the address information. The configuration confirmation information reaches the master device 1 through the input port 221 of the slave device 22, the output port 212 of the slave device 21, the input port 211, and the output port 11 of the master device 1. After receiving the configuration confirmation information sent by the communication module 224, the master device 1 continues to send address information to the next slave device.
In some embodiments, after sending the address information to the ith slave device, the master device 1 determines whether the configuration acknowledgement information fed back by the ith slave device is received within a predetermined time, and if the configuration acknowledgement information fed back by the ith slave device is received within the predetermined time and the ith slave device is not the nth device, continues to send the address information to the (i + 1) th slave device, where i is greater than or equal to 1 and is less than or equal to N.
In addition, if the master device 1 receives the configuration confirmation information fed back by the ith slave device within the predetermined time and the ith slave device is the nth device, the transmission of the address information is stopped so as to enable the N slave devices to enter the working mode. That is, if all the N slave devices complete the address configuration, the configuration process is ended, so that the slave devices enter the operating mode.
In some embodiments, after sending the address information to the ith slave device, if the configuration confirmation information fed back by the ith slave device is not received within the predetermined time, the master device 1 repeatedly executes the operation of sending the address information to the ith slave device, and if the configuration confirmation information fed back by the ith slave device is still not received within the predetermined time after repeatedly executing the operation for the predetermined times, performs the fault alarm processing.
For example, the master device 1 sends the address information to the 7 th slave device after receiving the configuration confirmation information sent by the 6 th slave device, but receives the configuration confirmation information fed back by the 7 th slave device within a predetermined time. The configuration confirmation information fed back by the 7 th slave device cannot be effectively received even if the configuration confirmation information is repeatedly sent for 3 times. In this case, the configuration process is stopped, and a failure alarm process is performed, so that the worker performs failure detection on the 7 th slave device.
In other embodiments, after sending the address information to the ith slave device, if the configuration acknowledgement information fed back by the ith slave device is not received within the predetermined time after the master device 1 repeatedly executes the operation of sending the address information to the ith slave device, and if the configuration acknowledgement information fed back by the ith slave device is still not received within the predetermined time after the operation is repeatedly executed for the predetermined times, the master device 1 stops sending the address information, so that the slave device which successfully receives the address information enters the operating mode.
For example, the master device 1 sends the address information to the 7 th slave device after receiving the configuration confirmation information sent by the 6 th slave device, but receives the configuration confirmation information fed back by the 7 th slave device within a predetermined time. The configuration confirmation information fed back by the 7 th slave device cannot be effectively received even if the configuration confirmation information is repeatedly sent for 3 times. In this case, the configuration process is stopped, so that the first 6 slave devices enter the working mode, thereby improving the working efficiency of the system.
By implementing the present disclosure, the data stream is cut off by using the communication port inside the device, so that only one slave device can respond to the address configuration information, and the physical position between the slave devices can be determined because the communication signal input of the slave device at the next level is determined by the slave device at the previous level. In addition, because the mode of intercepting communication is adopted, the installation position of each device is determined by a communication line, such as RS485 and CAN communication, the interval between hundreds of meters and 1 kilometer CAN be reached, and the positions of the master device and the slave device CAN be flexibly set.
The description of the present disclosure has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the disclosure in the form disclosed. Many modifications and variations will be apparent to practitioners skilled in this art. The embodiment was chosen and described in order to best explain the principles of the disclosure and the practical application, and to enable others of ordinary skill in the art to understand the disclosure for various embodiments with various modifications as are suited to the particular use contemplated.

Claims (8)

1. An address allocation system comprising a master device and N slave devices, the master device and the N slave devices being connected in series, wherein:
each slave device comprises an input port and an output port, wherein the input port of the 1 st slave device is electrically connected with the master device, the output port of each slave device is connected with the input port of the next adjacent slave device, and the output port of the Nth slave device is suspended;
each slave device sets its own input port and output port to off state when not receiving address information from the master device, stores the address information locally when first receiving the address information from the master device, and sets its own input port and output port to on state.
2. The address assignment system of claim 1,
each slave device further comprises a communication module and a switch module, wherein in each slave device, the switch module is electrically connected with the communication module, the input port and the output port respectively, and the switch module sends the received address information to the communication module and sets the input port and the output port to be in a conducting state when the switch module receives the address information from the master device for the first time through the input port.
3. The address allocation system of claim 2,
and the communication module in each slave device feeds back configuration confirmation information to the master device through the input port under the condition of receiving the address information from the master device.
4. The address allocation system of claim 3,
after sending address information to the ith slave device, the master device judges whether configuration confirmation information fed back by the ith slave device is received within a preset time, if the configuration confirmation information fed back by the ith slave device is received within the preset time and the ith slave device is not the Nth device, the master device continues to send the address information to the (i + 1) th slave device, and i is more than or equal to 1 and less than or equal to N.
5. The address allocation system of claim 4,
and the master device receives the configuration confirmation information fed back by the ith slave device within the preset time, and stops sending the address information under the condition that the ith slave device is the Nth device, so that the N slave devices enter the working mode.
6. The address allocation system of claim 4,
after sending address information to the ith slave device, if configuration confirmation information fed back by the ith slave device cannot be received within preset time after the master device sends the address information to the ith slave device, the master device repeatedly executes the operation of sending the address information to the ith slave device, and if the configuration confirmation information fed back by the ith slave device cannot be received within the preset time after the operation is repeatedly executed for preset times, fault alarm processing is carried out.
7. The address allocation system of claim 4,
after sending address information to the ith slave device, if configuration confirmation information fed back by the ith slave device cannot be received within preset time after the master device sends the address information to the ith slave device, the operation of sending the address information to the ith slave device is repeatedly executed, and if the configuration confirmation information fed back by the ith slave device cannot be received within the preset time after the operation is repeatedly executed for preset times, the sending of the address information is stopped, so that the slave device which successfully receives the address information enters an operating mode.
8. Address assignment system according to one of claims 1 to 7,
and the master device and the N slave devices realize communication by utilizing a CAN bus or an RS485 bus.
CN201922482970.0U 2019-12-30 2019-12-30 Address allocation system Active CN210518417U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201922482970.0U CN210518417U (en) 2019-12-30 2019-12-30 Address allocation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201922482970.0U CN210518417U (en) 2019-12-30 2019-12-30 Address allocation system

Publications (1)

Publication Number Publication Date
CN210518417U true CN210518417U (en) 2020-05-12

Family

ID=70575668

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201922482970.0U Active CN210518417U (en) 2019-12-30 2019-12-30 Address allocation system

Country Status (1)

Country Link
CN (1) CN210518417U (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039950A (en) * 2021-10-26 2022-02-11 东莞市步控电子科技有限公司 Method for automatically allocating addresses to RS485 bus slave devices

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039950A (en) * 2021-10-26 2022-02-11 东莞市步控电子科技有限公司 Method for automatically allocating addresses to RS485 bus slave devices
CN114039950B (en) * 2021-10-26 2023-09-22 东莞市步控电子科技有限公司 Method for automatically distributing address of RS485 bus slave device

Similar Documents

Publication Publication Date Title
US4628437A (en) Telecontrol system
CN105677608B (en) A kind of how main RS485 bus arbitration method and system
CN100477670C (en) Automatic distributing and setting up address method based on master-slave communication mode
KR20010022555A (en) Method and system for automatic address allocation and telecommunication stations which can be inserted into the bus system or within the framework of said method
CN104079677A (en) Automatic allocation method of RS485 communication port address
CN110995889A (en) Address allocation system and method
CN108800446A (en) Communication means in air-conditioning system and air-conditioning system between unit
CN103186440B (en) Detect subcard method, apparatus and system in place
CN109361585A (en) A kind of method that child node baud rate and address is arranged in host node automatically
CN210518417U (en) Address allocation system
CN106130857A (en) Two-wire power supply and communication system and method
US20090240859A1 (en) Automatic address setting system
CN112165422B (en) Automatic address matching method for one-master multi-slave temperature control system
CN109947689A (en) A kind of method of automobile-used lithium ion battery case automatic numbering
CN102347878A (en) Multi-point communication system, method and equipment
JP2005277978A (en) Method and device for automatically setting identification number
CN110456705B (en) Network control device capable of dynamically expanding interface and building automatic control system
CN102611600A (en) Method and device for locating short circuit position of CAN (Controller Area Network) network
CN110663226B (en) Data bus user device
CN101281510B (en) Double-I2C bus setting method and double I2C bus system
CN102739489A (en) Method for quickly querying equipment state of synchronous bus
CN101159641B (en) Can bus extension method
US8566630B2 (en) Apparatus, methods and computer program products supporting automatic network identification for power supplies
CN107071076B (en) Equipment address configuration method, device and system in communication system
CN102609388B (en) Slave node circuit, communication method and communication device

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant