CN111131533A - Automatic address allocation method for serial communication system - Google Patents

Automatic address allocation method for serial communication system Download PDF

Info

Publication number
CN111131533A
CN111131533A CN201911206132.9A CN201911206132A CN111131533A CN 111131533 A CN111131533 A CN 111131533A CN 201911206132 A CN201911206132 A CN 201911206132A CN 111131533 A CN111131533 A CN 111131533A
Authority
CN
China
Prior art keywords
substation
serial communication
address
station
sub
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.)
Pending
Application number
CN201911206132.9A
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.)
CCTEG Chongqing Research Institute Co Ltd
Original Assignee
CCTEG Chongqing Research Institute Co Ltd
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 CCTEG Chongqing Research Institute Co Ltd filed Critical CCTEG Chongqing Research Institute Co Ltd
Priority to CN201911206132.9A priority Critical patent/CN111131533A/en
Publication of CN111131533A publication Critical patent/CN111131533A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/403Bus networks with centralised control, e.g. polling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5076Update or notification mechanisms, e.g. DynDNS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5092Address allocation by self-assignment, e.g. picking addresses at random and testing if they are already in use

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses an automatic address allocation method for a serial communication system, which comprises the following steps: s1, storing the address of a main station to each substation; s2, the master station sends an initialization command containing a source address to the substation; s3, obtaining a local address of the substation according to the address of the master station and the source address; s4, determining a local address of a subordinate substation and updating an initialization command; s5, analogizing according to the step S4 until the initialization command reaches the last substation; and S6, the master station analyzes the response message to obtain the addresses of all the substations. The automatic address allocation method of the serial communication system does not need pre-allocation, field address setting, special address setting circuits and software, saves cost, has no limitation of the number and the types of serial communication equipment, and has high communication efficiency and strong field adaptability.

Description

Automatic address allocation method for serial communication system
Technical Field
The invention relates to the technical field of serial communication, in particular to an automatic address allocation method of a serial communication system.
Background
The serial communication is widely applied to industrial control, automobiles, environmental monitoring, building control and the like, the serial communication usually involves the allocation processing of node addresses, the node addresses of the existing serial bus must be allocated and set in advance, and the method comprises the following steps: (1) address setting circuits such as dial switches and the like and detection software are added, field manual setting is still needed, the hidden danger of communication conflict caused by manual wrong setting exists, and the positioning of wrong addresses is difficult when more devices are arranged; (2) each slave node on the serial bus is added with a switch control circuit, and the 1 st slave node is added with the bus and configured in sequence, so that the method can increase the design complexity of the node, and if a certain slave node switch control circuit fails, the following slave nodes and communication can not be set; (3) each node on the serial bus is added with a delay circuit, a clock line and a pulse signal line, and other nodes except the 1 st node calculate own addresses according to the time difference between the clock line and the pulse signal line, so that the method also increases the complexity of node design and increases the cost of communication cables; (4) each node on the serial bus is added with a conflict detection circuit and a software algorithm, and if data on the bus is found, the data is transmitted in a delayed manner, so that the complexity of circuit design is increased, and the real-time property of data transmission is sacrificed; (5) 1 address identification line is added on the serial bus, each node detects the state of the address identification line and an address configuration command sent by a preceding stage device through the bus to realize address configuration, the method increases the design complexity of the node and increases the cost of a communication cable; (6) each node on the RS485 bus monitors the state on the line, allocates the total number of time slots, acquires the chip ID calculation feature code and the initial time slot, and transmits and receives data in the time slot, but the method is not suitable for occasions with low transmission rate and more byte numbers.
Therefore, in order to solve the above problems, there is a need for an automatic address allocation method for a serial communication system, which does not require address allocation in advance or address setting on the site, reduces field application and program maintenance work, does not require a dedicated address setting circuit and software, does not require the limitation of the number and types of serial communication devices, has high communication efficiency, and has strong field adaptability.
Disclosure of Invention
In view of the above, an object of the present invention is to overcome the defects in the prior art, and provide an automatic address allocation method for a serial communication system, which does not require pre-allocation or field address setting, reduces field application and program maintenance work, does not require a dedicated address setting circuit and software, does not have limitations on the number and types of serial communication devices, and has high communication efficiency and strong field adaptability.
The invention relates to a serial communication system address automatic allocation method, which comprises the following steps:
s1, determining a main serial communication bus and a branch serial communication bus of a serial communication system, and storing a master station address of the serial communication system in a substation chain; the serial communication system comprises a main station and at least one substation chain, wherein the substation chain comprises a plurality of serially communicated substations, the main station and the substation chain form a tree structure, the main station is a root node, and the substation chain is a child node;
s2, the main station sends an initialization command containing a source address to a first-stage substation in the substation chain, and the first-stage substation sends a response message to the main station after receiving the initialization command;
s3, the first-stage substation of the substation chain obtains a local address of the first-stage substation according to the stored master station address and the received source address in the initialization command, and updates the source address in the initialization command to be the local address of the first-stage substation to obtain a new initialization command;
s4, the first-stage substation of the substation chain sends a new initialization command to a second-stage substation in the substation chain, wherein the second-stage substation is communicated with the first-stage substation, sends a response message to the first-stage substation, and determines the local address of the second-stage substation and updates the source address in the initialization command according to the mode of determining the local address of the first-stage substation in the step S3;
s5, according to the analogy of the step S4, the initialization command is sent downwards step by step along the substation chain until the last stage of the substation chain receives the initialization command;
and S6, the main station acquires response messages containing the sub-station addresses in all the sub-station chains, and analyzes the address of each sub-station in the sub-station chain according to the response messages.
Further, in step S6, the address structure of each slave station in the slave station chain includes: a local address, a serial communication bus number, and a sub-address; wherein the local address, serial communication bus number and sub-address all occupy one byte.
Further, in step S1, the trunk serial communication bus and the branch serial communication bus of the serial communication system are determined as follows:
when the substation in the substation chain only has one adjacent subordinate substation, the serial communication bus of the substation and the adjacent subordinate substation is used as a main serial communication bus;
when there are a plurality of adjacent subordinate substations in a substation chain, the serial communication bus of the substation and any one of the adjacent subordinate substations is used as a main serial communication bus, and the serial communication buses of the substation and the other adjacent subordinate substations are used as branch serial communication buses.
Furthermore, the local addresses of all substations on the trunk serial communication bus under the same substation in the substation chain are different; the local addresses of all the substations on the plurality of branched serial communication buses under the same substation in the substation chain are the same.
Further, the serial communication bus number of the trunk and the serial communication bus number of the branch under the same substation in the substation chain are different, and the serial communication bus number of each branch is different.
Further, the sub-addresses of all the substations on the main serial communication bus under the same substation in the substation chain are the same; the sub-addresses of all the substations on the same branch serial communication bus under the same substation in the substation chain are different.
Further, in step S2, the source address is the address of the master station.
Further, in step S3, if the address of the master station saved by the substation in the substation chain is the same as the source address in the initialization command, the local address of the substation is set to D; otherwise, setting the local address of the substation as the source address in the initialization command plus 1.
Further, in step S6, the response message specifically includes:
the sub-station in the sub-station chain on the main serial communication bus automatically generates the address of the sub-station, and the sub-station sends the response message containing the address of the sub-station upwards along the sub-station chain step by step and finally reaches the main station;
the sub-station in the sub-station chain on the branch serial communication bus is used for addressing the rest sub-stations by the first sub-station on the branch serial communication bus and generating a sub-station address list, and the first sub-station on the branch serial communication bus sends the response message containing the sub-station address list upwards step by step along the sub-station chain and finally reaches the main station.
Further, it is characterized in that: in step S6, the master station may further obtain the number and types of all the slave station devices by analyzing and processing the received response message.
The invention has the beneficial effects that: the invention discloses an automatic address allocation method for a serial communication system, which comprises the steps that an initialization command containing a source address is sent to a substation by a main station, the substation carries out analysis processing after receiving the initialization command and updates the local address of the substation, the local address is assembled to obtain the address of the substation, the substation feeds a response message containing the address of the substation back to the main station, and the main station updates an address list in the main station according to the address of the substation in the response message, so that the automatic address allocation of the serial communication system is realized.
Drawings
The invention is further described below with reference to the following figures and examples:
FIG. 1 is a schematic flow diagram of the process of the present invention;
FIG. 2 is a schematic diagram of a serial communication bus according to the present invention;
FIG. 3 is a schematic diagram of the subordinate level of the Master station and the subordinate level of the substation of the present invention;
fig. 4 is a schematic diagram of site address allocation of the serial communication system according to the present invention.
Detailed Description
The invention is further described with reference to the accompanying drawings, in which:
the invention relates to a serial communication system address automatic allocation method, which comprises the following steps:
s1, determining a main serial communication bus and a branch serial communication bus of a serial communication system, and storing a master station address of the serial communication system in a substation chain; the serial communication system comprises a main station and at least one substation chain, wherein the substation chain comprises a plurality of serially communicated substations, the main station and the substation chain form a tree structure, the main station is a root node, and the substation chain is a child node;
s2, the main station sends an initialization command containing a source address to a first-stage substation in the substation chain, and the first-stage substation sends a response message to the main station after receiving the initialization command;
s3, the first-stage substation of the substation chain obtains a local address of the first-stage substation according to the stored master station address and the received source address in the initialization command, and updates the source address in the initialization command to be the local address of the first-stage substation to obtain a new initialization command;
s4, the first-stage substation of the substation chain sends a new initialization command to a second-stage substation in the substation chain, wherein the second-stage substation is communicated with the first-stage substation, sends a response message to the first-stage substation, and determines the local address of the second-stage substation and updates the source address in the initialization command according to the mode of determining the local address of the first-stage substation in the step S3;
s5, according to the analogy of the step S4, the initialization command is sent downwards step by step along the substation chain until the last stage of the substation chain receives the initialization command;
and S6, the main station acquires response messages containing the sub-station addresses in all the sub-station chains, and analyzes the address of each sub-station in the sub-station chain according to the response messages.
In this embodiment, in step S1, the serial communication system includes: the substation chain comprises various substations, and the substations in the substation chain can be sequentially divided into: a sub-station (first level sub-station), a subordinate sub-station (second level, third level, fourth level, etc.), and a terminal (last level). The serial communication formed between the main station and the plurality of substations, between the substation and the plurality of subordinate substations, and between the subordinate substations and the plurality of terminals is called as a serial communication bus, the number of the serial communication buses is related to the number of the serial communication ports, namely, the number of the serial communication buses supported by the main station is more than or equal to the number of the serial ports of the main station, and the number of the communication buses supported by the substations is more than or equal to the number of the serial ports of the substations minus 1. The serial communication bus terminal sub-station is called a terminal, and the number of terminals in the serial communication system is equal to the number of serial communication buses (as shown in FIG. 2).
The serial ports between the main station and the sub station, between the sub station and the lower sub station and between the lower sub station and the terminal adopt a hand-in-hand cascade structure and are sequentially and directly connected to a serial communication bus, and the serial ports of the sub stations are respectively communicated with the upper station and the lower station. The upper level of the substation means: the substation or the master station adjacent to the substation and closer to the master station is the superior; the lower level of the substation means: the slave station adjacent to the slave station and distant from the master station is a slave station. There may be 1 or more master stations and subordinate stations of the slave station, and the master station has no superior station, the slave station has only 1 superior station, and the slave station as the terminal has no subordinate station (as shown in fig. 3).
There are two working modes of serial ports in serial communication systems: master mode, slave mode. Wherein, the main mode: firstly, sending a request message to a subordinate, and then receiving a response message of the subordinate; from the mode: firstly, receiving a request message of an upper level, and then sending a response message to the upper level; the default working mode of all serial ports after the substation is powered on is a slave mode, the serial port of the main station only has the master mode, the serial port of the substation has the master mode and the slave mode when working, and the substation serving as a terminal only has the slave mode.
In step S1, the initialization process for the serial communication system includes: 1. setting the address value of the master station, generally taking a larger value (for example: 5000) as the initial address of the master station or directly using the default address value of the master station device; 2. all the substations (including subordinate substations and terminals) obtain the address of the master station, and in general, the slave station device internally solidifies information such as the address of the master station, a default local address, a device type and the like.
In this embodiment, in step S1, the master station includes a plurality of slave stations, and the division processing is performed using the same rule for the serial communication bus in which each slave station is located:
when the substation only has one subordinate substation, the substation only has one physical serial communication port in the master mode to communicate with the subordinate substation, the physical serial communication port communicated with the subordinate substation is used as a main communication port, and a serial communication bus corresponding to the main communication port is a main serial communication bus.
When the substation has a plurality of subordinate substations, the substation has a plurality of physical serial communication ports in the master mode to communicate with the subordinate substations, one physical serial communication port communicated with the subordinate substations is arbitrarily selected as a main communication port, and a serial communication bus corresponding to the main communication port is a main serial communication bus; the ports of the sub-station for communicating with the other subordinate sub-stations are used as branch communication ports, and the serial communication bus corresponding to the branch communication ports is a branch serial communication bus.
In this embodiment, in step S2, the master station sends an initialization command to one or more slave stations through the serial communication port of the master mode, where the initialization command includes data information such as a source address, an address included in the initialization command sent by the master mode is referred to as a source address, and the source address in the initialization command of the master station is a master station address, and there is no need to add overhead to set a source address.
In this embodiment, in step S3, after receiving the initialization command sent by the master station, the slave station parses the initialization command to obtain a source address in the initialization command, where the source address is the master station address, and the master station address already stored in the slave station is the same as the source address, and the local address of the slave station is updated to 1 (here, the local address D of the slave station is instantiated to be 1).
In step S4, the substation modifies the received initialization command, that is, modifies the source address in the initialization command to the local address of the substation, and forwards the modified initialization command to the lower-level substation. After the slave station communicates with the subordinate slave station, the slave station communicates with the subordinate slave station at a predetermined frequency, that is, the slave station transmits a command to the subordinate slave station, and the subordinate slave station receives the command and transmits a response message to the slave station. The response message includes fields of address, length, data, check, etc.
In this embodiment, in step S5, the lower substation on the main serial communication bus analyzes the initialization command forwarded by the sub-station to obtain a source address in the initialization command; the subordinate substation compares a source address (substation local address) with a master station address stored in the subordinate substation, and since the source address is changed into the substation local address, the source address is not equal to the master station address, at the moment, the source address is added with 1 to be used as the local address of the subordinate substation, and meanwhile, the subordinate substation modifies the source address in the received initialization command into the local address of the subordinate substation and forwards the modified initialization command to the next-stage substation (site) (possibly a terminal or other non-terminal sites); similarly, the terminal on the main serial communication bus analyzes the initialization command forwarded by the station, and updates the local address of the terminal to be the local address of the station plus 1.
A subordinate station on a branched serial communication bus, whose local address remains the same as that of a parent station on a main serial communication bus, includes all stations (including terminals) on the branched serial communication bus.
In this embodiment, in step S6, the slave station, each lower-level slave station, and the terminal located at the end of the serial communication bus have the same address configuration. The address structure comprises three parameters, wherein each parameter occupies one byte, and the three parameters are specifically as follows: the local address of the station, the serial communication bus number where the station is located, and the sub-address of the station. As described in table 1:
TABLE 1
Figure BDA0002296964190000071
Wherein: k is a positive integer, K ranges from (1-255), and M, N is 255.
In this embodiment, in step S6, the master station in the serial communication system has one or more sub-stations, each sub-station has one or more subordinate sub-stations (or terminals), and each sub-station has a main serial communication bus or further has a plurality of branch serial communication buses. Numbering a plurality of serial communication buses under the substation to ensure that the serial communication bus number of a main trunk is different from the serial communication bus number of a branch, and the serial communication buses of each branch are different, for example, the serial communication bus number of the main trunk is set to be 0, and the serial communication buses of each branch are numbered according to a sequence from 1,2,3, … and N; and if the subordinate substation also has one or more subordinate stations, numbering the serial communication buses of the subordinate substation according to the numbering rule.
In this embodiment, in step S6, the sub-addresses of the stations on the plurality of serial communication buses under the sub-station are processed, the sub-addresses of the stations on the main serial communication bus are kept consistent, for example, set to 0 uniformly, the sub-addresses of the stations on different branch serial communication buses are different, and the sub-addresses may be set to 1,2,3, …, M sequentially from the upper stage to the lower stage.
When the sub-station receives the response message from the sub-station (or terminal) on the main serial communication bus, the sub-station sets the encoded address in the response message and transmits the encoded address to the sub-station, and the sub-station analyzes the response message and extracts the address of the sub-station. For example, if the local address of the lower slave station is X, the number of the main serial communication bus in which the lower slave station is located is 0, and the sub address corresponding to the lower slave station is 0, the address of the lower slave station is X00 (e.g., (K +1)00 in fig. 4), the lower slave station sets X00 in the response message and feeds back the response message to the slave station, and the slave station extracts X00 according to the preset rule and stores the extracted X00 in the address list of the slave station.
When the sub-station receives the response messages from the subordinate sub-stations (or terminals) on the branch serial communication buses, the sub-station directly carries out addressing processing on the subordinate sub-stations, the sub-station does not need to carry out addressing on the subordinate sub-stations, the sub-station can uniformly set the local addresses of the subordinate sub-stations as the local addresses of the sub-stations, and address information of the subordinate sub-stations is generated by combining serial communication numbers of the branches and sub-addresses of the subordinate sub-stations. For example, if the local address of the slave station is X, the serial communication bus number of a branch is 1, and the subaddress of the slave station is 1, the slave station addresses the slave station as X11 (see K11 in fig. 4) and stores the addressed slave station in the slave station address list.
The sub-station continuously receives the response message of the next sub-station and continuously analyzes the response message, and simultaneously, the sub-station carries out self addressing and stores the self address into an address list.
The slave station transmits a response message including the address of the slave station and the address information of the slave station to the master station.
In this embodiment, in step S7, the master station parses the received response message, extracts the subordinate slave stations (including the terminal) and addresses of the slave stations, and updates the address list stored in the master station. And when the master station finishes updating all the terminal addresses at the tail end of the serial communication bus, the master station does not send the initialization command any more.
The response message received by the main station also comprises the equipment type messages of the substation, the subordinate substations and the terminal, and the variety changes of all subordinate equipment can be counted by extracting the equipment type messages; the master station counts the number of all the subordinate devices by analyzing the address codes according to the transmitted address messages, for example, the terminal address on a trunk serial communication bus is M00, and the terminal address on a branch serial communication bus is X1M, so that the number of devices on two serial communication buses is (M + M), that is, 2M devices are obtained.
The serial communication system has the following communication processes:
A. communication initialization: the main station initiates an initialization command to activate serial communication between the main station and the sub-station, between the sub-station and the subordinate sub-station, and between the subordinate sub-station and the terminal. The main station continuously initiates an initialization command to the substation at a certain frequency and receives the response message from the substation, and the address and the number of all the substations (including subordinate substations and terminals) are obtained by analyzing the response message without sending the initialization command until the response message including the feedback of all the terminals is received.
B. Communication execution: after the initialization process is completed, the master station initiates a communication command, and the substation and the subordinate substation as well as the subordinate substation and the terminal can normally communicate with each other through the serial communication bus, wherein the two adjacent stations can independently communicate with each other, so that the master station only initiates the communication command once.
C. Communication fault processing: in step A, B, the master station and the slave station determine that communication with the slave station is faulty if they do not receive the slave response message or the slave error response message, and the communication fault information is included in the slave station's response message to the master station, and finally the master station acquires the communication fault information and updates the communication status table in the master station.
D. And (3) communication fault recovery processing: in step C, the sub-station or the master station continues to send request messages to the lower stage with the disconnection fault until a correct response message is received, and then communication recovery is judged, the communication recovery information is contained in the response message sent by the sub-station to the upper stage, and finally the master station obtains the communication recovery information and updates the communication state table in the master station.
Finally, the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all of them should be covered in the claims of the present invention.

Claims (10)

1. An automatic address allocation method for a serial communication system is characterized in that: the method comprises the following steps:
s1, determining a main serial communication bus and a branch serial communication bus of a serial communication system, and storing a master station address of the serial communication system in a substation chain; the serial communication system comprises a main station and at least one substation chain, wherein the substation chain comprises a plurality of serially communicated substations, the main station and the substation chain form a tree structure, the main station is a root node, and the substation chain is a child node;
s2, the main station sends an initialization command containing a source address to a first-stage substation in the substation chain, and the first-stage substation sends a response message to the main station after receiving the initialization command;
s3, the first-stage substation of the substation chain obtains a local address of the first-stage substation according to the stored master station address and the received source address in the initialization command, and updates the source address in the initialization command to be the local address of the first-stage substation to obtain a new initialization command;
s4, the first-stage substation of the substation chain sends a new initialization command to a second-stage substation in the substation chain, wherein the second-stage substation is communicated with the first-stage substation, sends a response message to the first-stage substation, and determines the local address of the second-stage substation and updates the source address in the initialization command according to the mode of determining the local address of the first-stage substation in the step S3;
s5, according to the analogy of the step S4, the initialization command is sent downwards step by step along the substation chain until the last stage of the substation chain receives the initialization command;
and S6, the main station acquires response messages containing the sub-station addresses in all the sub-station chains, and analyzes the address of each sub-station in the sub-station chain according to the response messages.
2. The serial communication system address automatic allocation method according to claim 1, characterized in that: in step S6, the address structure of each slave station in the slave station chain includes: a local address, a serial communication bus number, and a sub-address; wherein the local address, serial communication bus number and sub-address all occupy one byte.
3. The serial communication system address automatic allocation method according to claim 1, characterized in that: in step S1, the trunk serial communication bus and the branch serial communication bus of the serial communication system are determined as follows:
when the substation in the substation chain only has one adjacent subordinate substation, the serial communication bus of the substation and the adjacent subordinate substation is used as a main serial communication bus;
when there are a plurality of adjacent subordinate substations in a substation chain, the serial communication bus of the substation and any one of the adjacent subordinate substations is used as a main serial communication bus, and the serial communication buses of the substation and the other adjacent subordinate substations are used as branch serial communication buses.
4. The serial communication system address automatic allocation method according to claim 3, characterized in that: the local addresses of all substations on a trunk serial communication bus under the same substation in the substation chain are different; the local addresses of all the substations on the plurality of branched serial communication buses under the same substation in the substation chain are the same.
5. The serial communication system address automatic allocation method according to claim 3, characterized in that: the serial communication bus number of the trunk under the same substation in the substation chain is different from the serial communication bus number of the branch and the serial communication bus number of each branch is different.
6. The serial communication system address automatic allocation method according to claim 3, characterized in that: the sub-addresses of all substations on the main serial communication bus under the same substation in the substation chain are the same; the sub-addresses of all the substations on the same branch serial communication bus under the same substation in the substation chain are different.
7. The serial communication system address automatic allocation method according to claim 1, characterized in that: in step S2, the source address is a master address.
8. The serial communication system address automatic allocation method according to claim 1, characterized in that: in step S3, if the address of the master station saved by the substation in the substation chain is the same as the source address in the initialization command, setting the local address of the substation to D; otherwise, setting the local address of the substation as the source address in the initialization command plus 1.
9. The serial communication system address automatic allocation method according to claim 1, characterized in that: in step S6, the response message specifically includes:
the sub-station in the sub-station chain on the main serial communication bus automatically generates the address of the sub-station, and the sub-station sends the response message containing the address of the sub-station upwards along the sub-station chain step by step and finally reaches the main station;
the sub-station in the sub-station chain on the branch serial communication bus is used for addressing the rest sub-stations by the first sub-station on the branch serial communication bus and generating a sub-station address list, and the first sub-station on the branch serial communication bus sends the response message containing the sub-station address list upwards step by step along the sub-station chain and finally reaches the main station.
10. The serial communication system address automatic allocation method according to claim 1, characterized in that: in step S6, the master station may further obtain the number and types of all the slave station devices by analyzing and processing the received response message.
CN201911206132.9A 2019-11-29 2019-11-29 Automatic address allocation method for serial communication system Pending CN111131533A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911206132.9A CN111131533A (en) 2019-11-29 2019-11-29 Automatic address allocation method for serial communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911206132.9A CN111131533A (en) 2019-11-29 2019-11-29 Automatic address allocation method for serial communication system

Publications (1)

Publication Number Publication Date
CN111131533A true CN111131533A (en) 2020-05-08

Family

ID=70496438

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911206132.9A Pending CN111131533A (en) 2019-11-29 2019-11-29 Automatic address allocation method for serial communication system

Country Status (1)

Country Link
CN (1) CN111131533A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112682025A (en) * 2020-08-12 2021-04-20 山西天地煤机装备有限公司 Control method, device and system for drilling and anchoring equipment
CN112905508A (en) * 2021-02-01 2021-06-04 浙江中拓合控科技有限公司 Address allocation method, communication device and storage medium for serial communication equipment
CN112948299A (en) * 2021-02-01 2021-06-11 浙江中拓合控科技有限公司 Serial port communication system and communication method
CN113014691A (en) * 2021-03-16 2021-06-22 中国科学技术大学 Method and device for distributing node addresses
CN114039849A (en) * 2021-10-25 2022-02-11 深圳毅芯半导体有限公司 Equipment parameter modification method and device, electronic equipment and storage medium
CN115277295A (en) * 2022-07-29 2022-11-01 广东美的智能科技有限公司 Communication method of controller and controller

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002305522A (en) * 2001-04-04 2002-10-18 Yaskawa Electric Corp Communication system, and communication address acquisition method for communication system
CN1885776A (en) * 2006-06-02 2006-12-27 华为技术有限公司 Netting communication system and its node address distribution method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002305522A (en) * 2001-04-04 2002-10-18 Yaskawa Electric Corp Communication system, and communication address acquisition method for communication system
CN1885776A (en) * 2006-06-02 2006-12-27 华为技术有限公司 Netting communication system and its node address distribution method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李春龙等: "基于CAN总线的多机械手并行任务控制系统设计", 《制造业自动化》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112682025A (en) * 2020-08-12 2021-04-20 山西天地煤机装备有限公司 Control method, device and system for drilling and anchoring equipment
CN112905508A (en) * 2021-02-01 2021-06-04 浙江中拓合控科技有限公司 Address allocation method, communication device and storage medium for serial communication equipment
CN112948299A (en) * 2021-02-01 2021-06-11 浙江中拓合控科技有限公司 Serial port communication system and communication method
CN112905508B (en) * 2021-02-01 2021-08-20 浙江中拓合控科技有限公司 Address allocation method, communication device and storage medium for serial communication equipment
CN113014691A (en) * 2021-03-16 2021-06-22 中国科学技术大学 Method and device for distributing node addresses
CN114039849A (en) * 2021-10-25 2022-02-11 深圳毅芯半导体有限公司 Equipment parameter modification method and device, electronic equipment and storage medium
CN115277295A (en) * 2022-07-29 2022-11-01 广东美的智能科技有限公司 Communication method of controller and controller
CN115277295B (en) * 2022-07-29 2023-12-19 广东美的智能科技有限公司 Communication method of controller and controller

Similar Documents

Publication Publication Date Title
CN111131533A (en) Automatic address allocation method for serial communication system
CN112905508B (en) Address allocation method, communication device and storage medium for serial communication equipment
CN101610192B (en) Communication slave, bus cascading method and system
EP1470668B1 (en) Systems and methods for documenting networks with electronic modules included in ports and devices
CN112948299B (en) Serial port communication system and communication method
CN105389278A (en) CAN bus based serial communication method for master and slave machines
CN103856578A (en) Automatic slave station address acquisition method through Modbus RTU and slave station
US7076715B2 (en) Safety network using phantom address information
US7206882B2 (en) Triggered communication network for CANOpen networks
CN101146061A (en) A multi-protocol conversion system for city emergency command data networking
JPS63172589A (en) Inter-equipment communication control system
CN110995889A (en) Address allocation system and method
CN112751752B (en) Route convergence method, device, communication equipment and storage medium
CN116582506A (en) I/O data transmission method, target equipment, controller and system
CN115334041A (en) Method for automatically allocating addresses to communication equipment of master station and slave station, master station, slave station and system
CN101088269A (en) Method and circuit arrangement for carrying out initialisation or registration steps for a device, in particular a household appliance
CN210518417U (en) Address allocation system
CN204517854U (en) A kind of fieldbus node circuit based on Modbus agreement
CN107071076B (en) Equipment address configuration method, device and system in communication system
CN111431652B (en) Self-adaptive main clock competition method and system for multi-stage clock synchronization network
US5583493A (en) Process and apparatus for the remote polling of measuring points
RU2188511C2 (en) Computer-aided integrated digital communication system
CN108337143B (en) Communication structure, communication system, and communication method
CN110710165B (en) Method for determining data bus user equipment of local bus and local bus master control device
CN113115282A (en) Internet of things communication method and Internet of things communication system

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200508

RJ01 Rejection of invention patent application after publication