CN117614940B - Method and system for automatic configuration of serial communication equipment address - Google Patents
Method and system for automatic configuration of serial communication equipment address Download PDFInfo
- Publication number
- CN117614940B CN117614940B CN202410097563.0A CN202410097563A CN117614940B CN 117614940 B CN117614940 B CN 117614940B CN 202410097563 A CN202410097563 A CN 202410097563A CN 117614940 B CN117614940 B CN 117614940B
- Authority
- CN
- China
- Prior art keywords
- address
- slave
- information
- host
- signal port
- 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
Links
- 238000004891 communication Methods 0.000 title claims abstract description 106
- 238000000034 method Methods 0.000 title claims abstract description 36
- 230000008569 process Effects 0.000 claims abstract description 6
- 238000012163 sequencing technique Methods 0.000 claims description 39
- 238000011144 upstream manufacturing Methods 0.000 claims description 25
- 238000013507 mapping Methods 0.000 claims description 7
- 238000012545 processing Methods 0.000 claims description 2
- 230000008859 change Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000005856 abnormality Effects 0.000 description 2
- 230000007423 decrease Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5038—Address allocation for local use, e.g. in LAN or USB networks, or in a controller area network [CAN]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5046—Resolving address allocation conflicts; Testing of addresses
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
Abstract
The embodiment of the invention discloses a method and a system for automatically configuring an address of serial communication equipment. The embodiment of the invention can automatically configure the communication address of the slave machines connected on the same bus according to the sequence from the near to the far from the host machine and the given address list sequence, the communication address of the slave machine after configuration has uniqueness on the bus, and the communication address of the slave machine using the fixed address is not changed in the configuration process.
Description
Technical Field
The embodiment of the invention relates to the technical field of serial communication, in particular to a method and a system for automatically configuring an address of serial communication equipment.
Background
In the application field of the internet of things, many sensor devices are connected with a host computer in an RS485 or RS422 bus communication mode, and the sensor devices are called slave devices. According to the serial communication principle, each slave device on the bus is required to have a unique communication address. Meanwhile, in some application occasions, communication addresses are required to be allocated according to the installation distance with the host in sequence, so that the relative positions of the slave devices can be conveniently corresponding through the addresses.
The conventional method is to plan the address of the slave machine in advance, and then configure the communication address of the slave machine by adopting a manual configuration mode through an address dialer, an interactive interface or tool software on the slave machine. This approach is prone to human error, resulting in address conflicts or sequence errors.
There are also methods that provide for the technical implementation of automatic configuration of slave addresses from near to far from the host on the bus. It is common practice to add signal lines to slaves, to communicate between slaves via the signal lines, and to obtain address information from the upstream slaves.
The existing method generally takes address '1' as a starting address, and allocates the address with a fixed step length, and the address lacks flexibility:
1) When the number of the slaves exceeds the loading capacity of the master, the slaves can still obtain addresses and join in communication, so that communication abnormality on the whole bus is caused;
2) When a part of the slave machines must use a fixed address, the part of the addresses are automatically allocated, so that the addresses of the slave machines are changed;
3) When the number of slaves increases or decreases or part of slaves change positions, the order of communication addresses will be disturbed.
Disclosure of Invention
Therefore, the embodiment of the invention provides a method and a system for automatically configuring an address of serial communication equipment, which are used for solving the technical problems that an address table cannot be flexibly set by distributing according to a fixed address stepping length and a fixed address cannot be reserved by distributing according to the address table in the prior art.
In order to achieve the above object, the embodiment of the present invention provides the following technical solutions:
according to an embodiment of the present invention, there is provided a method for automatically configuring an address of a serial communication device, including:
s1, each slave device generates own sequencing information X (n, fx, tx), wherein X is a device identification code, n is a device sequencing number, fx is a current communication address of the device, tx is an address allocation mode, tx=0 represents an automatic allocation mode, and Tx=1 represents a fixed allocation mode;
s2, a terminal slave A on a communication bus sends sequencing sequence information A (1, fa, ta) from a first uplink signal port to an upstream device B;
s3, after receiving the information, the equipment B judges whether the equipment B is a host, and if the equipment B is the host, the step S4 is executed; if the device B is a slave, the device B sets own ordering information as B (2, fb, tb), and sends ordering sequence information A (1, fa, ta) +B (2, fb, tb) to the upstream device C from an upstream signal port; repeating the step S3 until all the slave devices add own sequencing information into the sequencing sequence information;
s4, the host receives ordering sequence information which is sent by downstream equipment and comprises N pieces of equipment from a downstream signal port, and performs reverse ordering on all Tx=0 pieces of equipment, namely, the slave equipment N is at the forefront, the terminal slave equipment A is at the last, and a slave equipment list with sequence is generated;
s5, the host sequentially performs one-to-one correspondence between the addresses of the preset allocatable address table in the host and the devices in the slave device list according to the sequence to form a slave device address corresponding table, which is expressed as X (a) x ) Wherein X is a device identification code, a x The communication address is allocated, and a slave device address corresponding table is sent to a downstream slave from a second downstream signal port;
s6, after receiving the address corresponding table information of the slave device, if the address allocation information of the slave device exists, setting the communication address of the slave device as the allocation address in the address allocation information, and transmitting the address corresponding table information of the slave device from a downlink signal port to a slave device at the downstream; and repeating the step S6 until the end slave A finishes execution.
Further, the method further comprises:
the host judges whether the number of the slave devices exceeds the maximum number of the slave devices allowed by the host according to the received sequencing sequence information, and if the number of the slave devices exceeds the maximum number of the slave devices allowed by the host, an alarm is sent and an address allocation program is stopped;
the host performs address conflict check, if all the devices with Tx=1 have the same communication address, the address allocation program is stopped, and an alarm is sent;
the host processes the allocatable address table, and if the device communication addresses with Tx=1 are the same as the addresses in the allocatable address table, the addresses are deleted from the allocatable address table;
the host checks the allocatable address table, and if the number of addresses in the allocatable address table is less than the number of slave devices in the slave device list, stops the address allocation program and gives an alarm.
Further, the method further comprises the step that the slave equipment compares whether the address of the slave equipment is consistent with the address allocation information, and the method comprises the following steps:
judging whether the address of the user is consistent with the address allocation information;
if the address of the slave device is consistent with the address allocation information, the slave device address mapping table information is sent to a slave device at the downstream from the downstream signal port;
if the self address is inconsistent with the address allocation information, the self address is modified into the address in the address allocation information, and the slave device address corresponding table information is sent to the slave device at the downstream from the downstream signal port.
Further, the method further comprises:
each slave device periodically transmits inquiry information to downstream devices and judges whether feedback information is received or not;
if the feedback information is received, setting the self as intermediate slave equipment;
if the feedback information is not received, the terminal slave device is set as the terminal slave device.
According to a second aspect of the embodiment of the present invention, there is provided an address auto-configuration system for a serial communication device, wherein the system includes a host, a plurality of slaves, a plurality of signal lines and a communication bus, the slaves are provided with a first uplink signal port (1), a first downlink signal port (2) and a first serial communication port (3), and the host is provided with a second downlink signal port (4) and a second serial communication port (5); the master machine and the first slave machine are connected through a second downlink signal port (4) of the master machine and a first uplink signal port (1) of the slave machine by a signal line, an upstream slave machine is connected with a first uplink signal port (1) of a downstream slave machine by a first downlink signal port (2), and second serial communication ports (5) of the master machine are respectively connected with first serial communication ports (3) of all the slave machines by a communication bus;
the device comprises a sequencing information generation module, a sequencing information generation module and a data processing module, wherein the sequencing information generation module is used for enabling each slave device to generate own sequencing information X (n, fx, tx), wherein X is a device identification code, n is a sequencing number of the device, fx is a current communication address of the device, tx is an address allocation mode, tx=0 represents an automatic allocation mode, and Tx=1 represents a fixed allocation mode;
a sequencing sequence information sending module, configured to send sequencing sequence information a (1, fa, ta) from a first upstream signal port to an upstream device B at a terminal slave a on a communication bus;
the master/slave judging module is used for judging whether the equipment B is a host or not after the equipment B receives the information, and executing step S4 if the equipment B is the host; if the device B is a slave, the device B sets own ordering information as B (2, fb, tb), and sends ordering sequence information A (1, fa, ta) +B (2, fb, tb) to the upstream device C from an upstream signal port; repeating the step S3 until all the slave devices add own sequencing information into the sequencing sequence information;
the slave device list generating module is used for receiving the ordering sequence information comprising N devices sent by the downstream device from the downstream signal port by the host, and carrying out reverse ordering on all the devices with Tx=0, namely the slave device N is at the forefront, the terminal slave device A is at the last, and generating a slave device list with sequence;
the slave device address corresponding table generating module is used for sequentially carrying out one-to-one correspondence between the addresses of the allocable address tables preset in the host and the devices in the slave device list by the host to form a slave device address corresponding table, and the slave device address corresponding table is expressed as X (a x ) Wherein X is a device identification code, a x The communication address is allocated, and a slave device address corresponding table is sent to a downstream slave from a second downstream signal port;
the address allocation module is used for setting the communication address of the slave machine as an allocation address in the address allocation information if the address allocation information of the slave machine is available after the slave machine receives the address mapping table information of the slave machine, and sending the address mapping table information of the slave machine from the downlink signal port to the slave machine at the downstream; and repeating the step S6 until the end slave A finishes execution.
Further, the system further comprises: the signal line communication mode between each uplink signal port and each downlink signal port is a single bus communication mode.
Further, the single bus protocol uses the HDQ protocol.
Further, the serial communication mode is an RS485 or RS422 communication mode.
The embodiment of the invention has the following advantages:
the invention is provided with an uplink signal port 1, a downlink signal port 2 and a serial communication port 3 on a slave machine, and a downlink signal port 4 and a serial communication port 5 on a host machine. The master and the first slave are connected through a downstream signal port 4 of the master and an upstream signal port 1 of the slave through a signal line, and the upstream slave is connected with an upstream signal port 1 of the downstream slave through a downstream signal port 2. The serial communication port 5 of the master is connected with the serial communication ports 3 of all slaves through a communication bus. The embodiment of the invention can automatically configure the communication address of the slave machines connected on the same bus according to the sequence from the near to the far from the host machine and the given address list sequence, the communication address of the slave machine after configuration has uniqueness on the bus, and the communication address of the slave machine with the fixed address is not changed in the configuration process.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It will be apparent to those of ordinary skill in the art that the drawings in the following description are exemplary only and that other implementations can be obtained from the extensions of the drawings provided without inventive effort.
The structures, proportions, sizes, etc. shown in the present specification are shown only for the purposes of illustration and description, and are not intended to limit the scope of the invention, which is defined by the claims, so that any structural modifications, changes in proportions, or adjustments of sizes, which do not affect the efficacy or the achievement of the present invention, should fall within the ambit of the technical disclosure.
Fig. 1 is a schematic logic structure diagram of a system for automatic address configuration of a serial communication device according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an application principle of a system for automatic address configuration of a serial communication device according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for automatically configuring an address of a serial communication device according to an embodiment of the present invention.
Detailed Description
Other advantages and advantages of the present invention will become apparent to those skilled in the art from the following detailed description, which, by way of illustration, is to be read in connection with certain specific embodiments, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The existing method generally takes address '1' as a starting address, and allocates the address with a fixed step length, and the address lacks flexibility:
1) When the number of the slaves exceeds the loading capacity of the master, the slaves can still obtain addresses and join in communication, so that communication abnormality on the whole bus is caused;
2) When a part of the slave machines must use a fixed address, the part of the addresses are automatically allocated, so that the addresses of the slave machines are changed;
3) When the number of slaves increases or decreases or part of slaves change positions, the order of communication addresses will be disturbed.
The invention can solve the technical problems that the prior art can not flexibly set an address table when the address table is allocated according to the fixed address stepping length and can not reserve the fixed address when the address table is allocated.
Referring to fig. 1, the embodiment of the invention discloses an automatic address configuration system of a serial communication device, which is characterized by comprising a host, a plurality of slaves, a plurality of signal lines and a communication bus, wherein the slaves are provided with a first uplink signal port (1), a first downlink signal port (2) and a first serial communication port (3), and the host is provided with a second downlink signal port (4) and a second serial communication port (5); the master machine and the first slave machine are connected through a second downlink signal port (4) of the master machine and a first uplink signal port (1) of the slave machine through signal lines, an upstream slave machine is connected with a first uplink signal port (1) of a downstream slave machine through a first downlink signal port (2), and second serial communication ports (5) of the master machine are respectively connected with first serial communication ports (3) of all the slave machines through communication buses.
Further, the signal line communication method between each uplink signal port and each downlink signal port is a single bus communication method.
Further, the single bus protocol uses the HDQ protocol.
The HDQ protocol is also called as HDQ communication protocol, is a single-wire communication protocol of Texas instruments in the United states, and adopts single-bus two-way communication and an open-drain output interface.
Further, the serial communication mode is an RS485 or RS422 communication mode.
Corresponding to the automatic serial communication equipment address configuration system disclosed above, the embodiment of the invention also discloses an automatic serial communication equipment address configuration method. The following describes in detail a serial communication device address auto-configuration method disclosed in the embodiment of the present invention in connection with a serial communication device address auto-configuration system described above.
Referring to fig. 2, the invention discloses a method for automatically configuring an address of a serial communication device, which is characterized in that the method comprises the following steps:
s1, each slave device generates own sequencing information X (n, fx, tx), wherein X is a device identification code, n is a device sequencing number, fx is a current communication address of the device, and Tx is an address allocation mode;
where tx=0 denotes an automatic allocation method, and tx=1 denotes a fixed allocation method.
S2, the terminal slave A transmits sequencing sequence information A (1, fa, ta) from a first uplink signal port to the upstream equipment B;
s3, after receiving the information, the equipment B judges whether the equipment B is a host, and if the equipment B is the host, the step S4 is executed; if the device B is a slave, the device B sets own ordering information as B (2, fb, tb), and sends ordering sequence information A (1, fa, ta) +B (2, fb, tb) to the upstream device C from an upstream signal port; repeating the step S3 until all the slave devices add own sequencing information into the sequencing sequence information;
s4, the host receives sequencing sequence information A (1, fa, ta) +B (2, fb, tb) +C (3, fc, tc) + … … +N (N, fn, tn) which is sent by downstream equipment and comprises N pieces of equipment from a downstream signal port, and performs reverse sequencing on all pieces of equipment with Tx=0, namely the slave equipment N is at the forefront, the end slave equipment A is at the last, and a slave equipment list with sequence is generated;
s5, the host sequentially performs one-to-one correspondence between the addresses of the preset allocatable address table in the host and the devices in the slave device list according to the sequence to form a slave device address corresponding table, which is expressed as X (a) x ) Wherein X is a device identification code, a x The communication address is allocated, and a slave device address corresponding table is sent to a downstream slave from a second downstream signal port;
the preset allocable address table is shown in the following table:
sequence number | Address of |
1 | a 1 |
2 | a 2 |
…… | …… |
n | a n |
…… | …… |
x | a x |
The slave device address correspondence table is shown in the following table:
slave machine | Address of |
N | a 1 |
…… | |
C | a n-2 |
B | a n-1 |
A | a n |
S6, after receiving the address corresponding table information of the slave device, if the address allocation information of the slave device exists, setting the communication address of the slave device as the allocation address in the address allocation information, and transmitting the address corresponding table information of the slave device from a downlink signal port to a slave device at the downstream; and repeating the step S6 until the end slave A finishes execution.
Further, referring to fig. 3, the method further includes:
the host judges whether the number of the slave devices exceeds the maximum number of the slave devices allowed by the host according to the received sequencing sequence information, and if the number of the slave devices exceeds the maximum number of the slave devices allowed by the host, an alarm is sent and an address allocation program is stopped;
the host performs address conflict check, if all the devices with Tx=1 have the same communication address, the address allocation program is stopped, and an alarm is sent;
the host processes the allocatable address table, and if the device communication addresses with Tx=1 are the same as the addresses in the allocatable address table, the addresses are deleted from the allocatable address table;
the host checks the allocatable address table, and if the number of addresses in the allocatable address table is less than the number of slave devices in the slave device list, stops the address allocation program and gives an alarm.
Further, the method further comprises the step that the slave equipment compares whether the address of the slave equipment is consistent with the address allocation information, and the method comprises the following steps:
judging whether the address of the user is consistent with the address allocation information;
if the address of the slave device is consistent with the address allocation information, the slave device address mapping table information is sent to a slave device at the downstream from the downstream signal port;
if the self address is inconsistent with the address allocation information, the self address is modified into the address in the address allocation information, and the slave device address corresponding table information is sent to the slave device at the downstream from the downstream signal port.
Further, the method further comprises:
each slave device periodically transmits inquiry information to downstream devices and judges whether feedback information is received or not;
if the feedback information is received, setting the self as intermediate slave equipment;
if the feedback information is not received, the terminal slave device is set as the terminal slave device.
The slave addresses in the embodiment of the invention are from near to far from the host according to the sequence of the allocable address table, so that the address allocation can be carried out according to the sequence of the allocable address table, the address change of fixed address equipment can be effectively avoided, the terminal slave on the bus can be identified, the number of the slave equipment on the bus is prevented from exceeding the allowable maximum number of the host, the operations of increasing and decreasing the slave on the bus, changing the slave, changing the sequence and the like can be carried out, and the address can be automatically reconfigured.
While the invention has been described in detail in the foregoing general description and specific examples, it will be apparent to those skilled in the art that modifications and improvements can be made thereto. Accordingly, such modifications or improvements may be made without departing from the spirit of the invention and are intended to be within the scope of the invention as claimed.
Claims (7)
1. A method for automatic configuration of serial communication device addresses, the method comprising:
s1, each slave device generates own sequencing information X (n, fx, tx), wherein X is a device identification code, n is a device sequencing number, fx is a current communication address of the device, tx is an address allocation mode, tx=0 represents an automatic allocation mode, and Tx=1 represents a fixed allocation mode;
s2, a terminal slave A on a communication bus sends sequencing sequence information A (1, fa, ta) from a first uplink signal port to an upstream device B;
s3, after receiving the information, the equipment B judges whether the equipment B is a host, and if the equipment B is the host, the step S4 is executed; if the device B is a slave, the device B sets own ordering information as B (2, fb, tb), and sends ordering sequence information A (1, fa, ta) +B (2, fb, tb) to the upstream device C from an upstream signal port; repeating the step S3 until all the slave devices add own sequencing information into the sequencing sequence information;
s4, the host receives ordering sequence information which is sent by downstream equipment and comprises N pieces of equipment from a downstream signal port, and performs reverse ordering on all Tx=0 pieces of equipment, namely, the slave equipment N is at the forefront, the terminal slave equipment A is at the last, and a slave equipment list with sequence is generated;
s5, the host sequentially performs one-to-one correspondence between the addresses of the preset allocatable address table in the host and the devices in the slave device list according to the sequence to form a slave device address corresponding table, which is expressed as X (a) x ) Wherein X is a device identification code, a x The communication address is allocated, and a slave device address corresponding table is sent to a downstream slave from a second downstream signal port;
s6, after receiving the address corresponding table information of the slave device, if the address allocation information of the slave device exists, setting the communication address of the slave device as the allocation address in the address allocation information, and transmitting the address corresponding table information of the slave device from a downlink signal port to a slave device at the downstream; repeating the step S6 until the execution of the terminal slave A is completed;
the host judges whether the number of the slave devices exceeds the maximum number of the slave devices allowed by the host according to the received sequencing sequence information, and if the number of the slave devices exceeds the maximum number of the slave devices allowed by the host, an alarm is sent and an address allocation program is stopped;
the host performs address conflict check, if all the devices with Tx=1 have the same communication address, the address allocation program is stopped, and an alarm is sent;
the host processes the allocatable address table, and if the device communication addresses with Tx=1 are the same as the addresses in the allocatable address table, the addresses are deleted from the allocatable address table;
the host checks the allocatable address table, and if the number of addresses in the allocatable address table is less than the number of slave devices in the slave device list, stops the address allocation program and gives an alarm.
2. The method for automatic address configuration of a serial communication device according to claim 1, wherein the slave device compares whether the own address coincides with the address assignment information, comprising:
judging whether the address of the user is consistent with the address allocation information;
if the address of the slave device is consistent with the address allocation information, the slave device address mapping table information is sent to a slave device at the downstream from the downstream signal port;
if the self address is inconsistent with the address allocation information, the self address is modified into the address in the address allocation information, and the slave device address corresponding table information is sent to the slave device at the downstream from the downstream signal port.
3. The method for automatic configuration of serial communication device addresses of claim 1, further comprising:
each slave device periodically transmits inquiry information to downstream devices and judges whether feedback information is received or not;
if the feedback information is received, setting the self as intermediate slave equipment;
if the feedback information is not received, the terminal slave device is set as the terminal slave device.
4. The automatic serial communication equipment address configuration system is characterized by comprising a host, a plurality of slaves, a plurality of signal lines and a communication bus, wherein a first uplink signal port (1), a first downlink signal port (2) and a first serial communication port (3) are arranged on the slaves, and a second downlink signal port (4) and a second serial communication port (5) are arranged on the host; the master machine and the first slave machine are connected through a second downlink signal port (4) of the master machine and a first uplink signal port (1) of the slave machine by a signal line, an upstream slave machine is connected with a first uplink signal port (1) of a downstream slave machine by a first downlink signal port (2), and second serial communication ports (5) of the master machine are respectively connected with first serial communication ports (3) of all the slave machines by a communication bus;
the device comprises a sequencing information generation module, a sequencing information generation module and a data processing module, wherein the sequencing information generation module is used for enabling each slave device to generate own sequencing information X (n, fx, tx), wherein X is a device identification code, n is a sequencing number of the device, fx is a current communication address of the device, tx is an address allocation mode, tx=0 represents an automatic allocation mode, and Tx=1 represents a fixed allocation mode;
a sequencing sequence information sending module, configured to send sequencing sequence information a (1, fa, ta) from a first upstream signal port to an upstream device B at a terminal slave a on a communication bus;
the master/slave judging module is used for judging whether the equipment B is a host or not after the equipment B receives the information, and executing step S4 if the equipment B is the host; if the device B is a slave, the device B sets own ordering information as B (2, fb, tb), and sends ordering sequence information A (1, fa, ta) +B (2, fb, tb) to the upstream device C from an upstream signal port; repeating the step S3 until all the slave devices add own sequencing information into the sequencing sequence information;
the slave device list generating module is used for receiving the ordering sequence information comprising N devices sent by the downstream device from the downstream signal port by the host, and carrying out reverse ordering on all the devices with Tx=0, namely the slave device N is at the forefront, the terminal slave device A is at the last, and generating a slave device list with sequence;
the slave device address corresponding table generating module is used for sequentially carrying out one-to-one correspondence between the addresses of the allocable address tables preset in the host and the devices in the slave device list by the host to form a slave device address corresponding table, and the slave device address corresponding table is expressed as X (a x ) Wherein X is a device identification code, a x The communication address is allocated, and a slave device address corresponding table is sent to a downstream slave from a second downstream signal port;
the address allocation module is used for setting the communication address of the slave machine as an allocation address in the address allocation information if the address allocation information of the slave machine is available after the slave machine receives the address mapping table information of the slave machine, and sending the address mapping table information of the slave machine from the downlink signal port to the slave machine at the downstream; repeating the step S6 until the execution of the terminal slave A is completed;
the host judges whether the number of the slave devices exceeds the maximum number of the slave devices allowed by the host according to the received sequencing sequence information, and if the number of the slave devices exceeds the maximum number of the slave devices allowed by the host, an alarm is sent and an address allocation program is stopped;
the host performs address conflict check, if all the devices with Tx=1 have the same communication address, the address allocation program is stopped, and an alarm is sent;
the host processes the allocatable address table, and if the device communication addresses with Tx=1 are the same as the addresses in the allocatable address table, the addresses are deleted from the allocatable address table;
the host checks the allocatable address table, and if the number of addresses in the allocatable address table is less than the number of slave devices in the slave device list, stops the address allocation program and gives an alarm.
5. The automatic serial communication device address configuration system of claim 4, wherein the signal line communication between each upstream signal port and each downstream signal port is a single bus communication.
6. The automatic serial communication device address configuration system of claim 5, wherein the single bus protocol uses HDQ protocol.
7. The automatic serial communication device address configuration system of claim 6, wherein the serial communication mode is an RS485 or an RS422 communication mode.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410097563.0A CN117614940B (en) | 2024-01-24 | 2024-01-24 | Method and system for automatic configuration of serial communication equipment address |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410097563.0A CN117614940B (en) | 2024-01-24 | 2024-01-24 | Method and system for automatic configuration of serial communication equipment address |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117614940A CN117614940A (en) | 2024-02-27 |
CN117614940B true CN117614940B (en) | 2024-04-09 |
Family
ID=89948347
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410097563.0A Active CN117614940B (en) | 2024-01-24 | 2024-01-24 | Method and system for automatic configuration of serial communication equipment address |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117614940B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1622039A1 (en) * | 2004-07-30 | 2006-02-01 | SICK MAIHAK GmbH | Method and apparatus for assigning addresses to users of a bus system |
CN101355482A (en) * | 2008-09-04 | 2009-01-28 | 中兴通讯股份有限公司 | Equipment, method and system for implementing identification of embedded device address sequence |
CN105045742A (en) * | 2015-06-30 | 2015-11-11 | 深圳市茁迩科技发展有限公司 | Cascade communication method and cascade system |
JP2017005364A (en) * | 2015-06-05 | 2017-01-05 | 株式会社東芝 | Serial communication system and communication setting method |
CN108965448A (en) * | 2018-07-27 | 2018-12-07 | 东莞铭普光磁股份有限公司 | A kind of message transfer system and method |
CN112055096A (en) * | 2020-08-07 | 2020-12-08 | 深圳市克莱沃电子有限公司 | Method and device for automatically setting communication address of equipment |
CN115587065A (en) * | 2021-07-05 | 2023-01-10 | 青岛海尔生物医疗科技有限公司 | Master-slave machine control method, master-slave machine control system and blood cabinet |
CN115801494A (en) * | 2023-02-08 | 2023-03-14 | 浙江正泰物联技术有限公司 | Communication system and networking method for communication system |
-
2024
- 2024-01-24 CN CN202410097563.0A patent/CN117614940B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1622039A1 (en) * | 2004-07-30 | 2006-02-01 | SICK MAIHAK GmbH | Method and apparatus for assigning addresses to users of a bus system |
CN101355482A (en) * | 2008-09-04 | 2009-01-28 | 中兴通讯股份有限公司 | Equipment, method and system for implementing identification of embedded device address sequence |
JP2017005364A (en) * | 2015-06-05 | 2017-01-05 | 株式会社東芝 | Serial communication system and communication setting method |
CN105045742A (en) * | 2015-06-30 | 2015-11-11 | 深圳市茁迩科技发展有限公司 | Cascade communication method and cascade system |
CN108965448A (en) * | 2018-07-27 | 2018-12-07 | 东莞铭普光磁股份有限公司 | A kind of message transfer system and method |
CN112055096A (en) * | 2020-08-07 | 2020-12-08 | 深圳市克莱沃电子有限公司 | Method and device for automatically setting communication address of equipment |
CN115587065A (en) * | 2021-07-05 | 2023-01-10 | 青岛海尔生物医疗科技有限公司 | Master-slave machine control method, master-slave machine control system and blood cabinet |
CN115801494A (en) * | 2023-02-08 | 2023-03-14 | 浙江正泰物联技术有限公司 | Communication system and networking method for communication system |
Also Published As
Publication number | Publication date |
---|---|
CN117614940A (en) | 2024-02-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11723836B2 (en) | System and method for dynamic device discovery and address assignment | |
CN100524119C (en) | Interface of programmable logic controller and expansion module | |
CN104079677A (en) | Automatic allocation method of RS485 communication port address | |
CN105743757A (en) | Free networking method of RS485 communication terminal | |
CN114500472B (en) | Method for automatically distributing RS485 communication address | |
CN107734082B (en) | Address allocation method and system | |
US8793417B2 (en) | Integration of field devices in a distributed system | |
EP1701271A1 (en) | Electronic apparatus system with master node and slave node | |
CN113852699B (en) | System and method for automatically distributing bus address | |
CN117614940B (en) | Method and system for automatic configuration of serial communication equipment address | |
CN110995889A (en) | Address allocation system and method | |
CN111752210B (en) | Automatic address negotiation system and method for PLC (programmable logic controller) expansion module | |
CN116684389A (en) | Address automatic allocation method and host, slave and communication equipment with same | |
CN116578519A (en) | Communication method, device, equipment and medium | |
JPH10154988A (en) | Method for assigning dynamic channel | |
CN116319680B (en) | Method for dynamically distributing addresses, coupler and backboard | |
CN113946369A (en) | Automatic adding method, device, system, equipment and storage medium of equipment | |
CN113204187B (en) | Control system and control method thereof | |
CN114039950B (en) | Method for automatically distributing address of RS485 bus slave device | |
US12144780B2 (en) | System and method for dynamic device discovery and address assignment | |
CN113949628B (en) | Automatic equipment adding method and system | |
CN111147612B (en) | Fan group control address automatic allocation method based on position information | |
CN118487888A (en) | Node allocation method, device, system and storage medium | |
CN117743225A (en) | Method for distributing backboard bus address | |
CN116737469A (en) | Method, device, medium and server for isolating data transmission faults |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |