A multifunctional communication method
Through the design of data packets without station number addresses and appropriate communication physical layer selection, combined with data reliability verification and communication relay stations, the problems of high long-distance communication costs and difficulty in maintenance in industrial communication systems are solved, achieving low-cost, fast , Reliable multi-machine communication improves channel utilization and anti-interference.
Patent Information
- Application Number
- CN202411000634.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-07-25
AI Technical Summary
Existing industrial communication systems have problems such as high long-distance communication costs and inconvenient maintenance. Especially in industrial automation machinery and logistics sorting, traditional communication buses are complex and costly and cannot meet the needs of high-speed communication.
Adopt a data packet design without station number address, select a suitable communication physical layer, and implement data reliability verification. It is divided into general communication and status communication. Communication relay stations are introduced for diagnosis and maintenance. The data structure and physical layer are designed to achieve fast, Reliable multi-machine communication.
It achieves low-cost, fast and reliable long-distance communication, reduces structural complexity and maintenance difficulty, improves channel utilization, supports high baud rate and anti-interference, and does not require complex controllers.
Smart Images

Figure CN118523980B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of communication systems, and in particular to a multifunctional communication method. Background Art
[0002] Industrial automation machinery is usually equipped with a large number of sensors, electromagnets, air valves, stepper motors, temperature control and servo motors. Although many communication buses have emerged in the industrial field to reduce wiring harnesses, there are still many problems such as complex and large wiring harnesses and inconvenient wiring maintenance. This is because the general communication speed cannot meet the demand, and it costs a very high cost to achieve high speed.
[0003] In addition, in logistics sorting, there are often 50 to 500 motors that need to communicate in real time, some using EtherCAT communication, and some with infrared communication. For example, due to the size limitation of the sample refrigerator, there are many sensors, and the wiring harness takes up a lot of space, making maintenance difficult.
[0004] Reliable, stable, low-cost and fast multi-machine communication has always been the goal pursued by industrial electronics. To this end, various industrial buses have emerged, such as Modbus485 bus, CC-LINK, CAN bus, ProfiNet and EtherCAT. Among them, EtherCAT has the advantages of 100M baud rate, low latency and precise synchronization, but it also has disadvantages such as complexity and high cost, and requires high-performance and expensive MCU to process data. In many practical situations, a low-cost, multi-site and fast long-distance communication solution is needed. Summary of the invention
[0005] The purpose of the present invention is to propose a multifunctional communication method to solve the problems of high cost and difficult maintenance of existing long-distance communication in the background technology.
[0006] The technical solution of the present invention is a multifunctional communication method, comprising:
[0007] Data structure integration, using data packet design without station number address, integrating ring topology and linear topology data structures;
[0008] Select the communication physical layer according to the communication baud rate and the maximum communication length between sites, and design one communication port to complete the work of two communication interfaces;
[0009] Data reliability check, choose to add the check to the end of the data string or the data packet. There is feedback read data in the timing to communicate the reliability of the bus;
[0010] Communication classification: bus communication is divided into general communication and status communication. General communication includes parameter communication and real-time communication. The switching of different communication types is achieved by switching communication. Status communication is used to determine the number of stations, end stations, and communication types. The master station calculates the number of stations based on the feedback status data string, and the station determines whether it is the end station by whether it receives data.
[0011] Diagnosis and maintenance: introduce communication relay stations and include them in the site scope. By setting site communication lights, the bus can be diagnosed and maintained.
[0012] Optionally, in the data structure integration, each site is designed to have a write data packet NRn and a read data packet NWn (feedback data packet); NRn, NWn≥1;
[0013] The data is sent in reverse order of the first and last station numbers. The station sends data backward, first sending the data on the station and then sending the subsequent data received. The subsequent data is the data after the tail data of the station is truncated.
[0014] Optionally, in the selection of the communication physical layer, one communication port completing the work of two communication interfaces specifically includes:
[0015] Monitor two communication ports at the same time, control the sending and receiving of the communication ports respectively, and latch the status of the communication ports.
[0016] Optionally, the data reliability check specifically includes:
[0017] Add data checksum, design a selective data checksum scheme and add it to the end of the data string or into the data packet;
[0018] The data utilization rate of adding verification to the end of the data string is high, and additional verification hardware is required to meet the real-time requirements of communication.
[0019] Optionally, verification is added to the data packet. It is rare to solve the verification through software.
[0020] Optionally, the reliability communication further includes a bus reliability unit, which adopts a timed internal feedback reading data and designs the bus to be duplex.
[0021] Optionally, in the communication classification, the communication is switched to state communication in the form of incoming communication, and the process of the incoming communication is as follows:
[0022] When the length of the written data string received by the general communication station is greater than 1, and the length of the written data string received by the station is 1, the station exits the original communication mode and enters the status communication mode initialization, and feedbacks the status data;
[0023] Status communication: The length of the written data string is 1, and the read data is the feedback status data.
[0024] Optionally, in the incoming communication, the feedback status data is designed to include:
[0025] Allow time gaps between data in the feedback status data string, increase the interval between data strings, analyze the relationship between data and data strings, and the length of the site feedback status data is 1;
[0026] The length of the site feedback status data is 2, the first one is status data, and the second one is useless data. When the data of this site is sent earlier than the data of the later site, the first data needs to wait for the receiving data of the later site to be sent after the sending is completed, resulting in the interruption of the data string and the second useless data is filled. When the data of this site is sent later than the data of the later site, the data of the later site can cover the second useless data.
[0027] Optionally, when the master station does not know the number of stations on the bus and the station does not know whether it is the last station, it is initialized through the status communication mode, and the number of stations is calculated based on the feedback status data string. Whether the station receives data determines whether it is the last station. If it has not received any data during transmission, it is the last station.
[0028] Optionally, the status communication is switched to general communication, which is represented by out-state communication. In the status communication mode, the host data string length is 1. When the site receives a write data string length greater than 1 (out-state data encoding), it feeds back status data, and the status communication automatically exits and switches to general communication.
[0029] The timing feedback data time is calculated based on the number of stations after the station and the length of the data packet. The entry mode is used to determine the station position, and the timing feedback data time is zero.
[0030] Compared with the prior art, the present invention has the following beneficial technical effects:
[0031] The communication solution of the present invention has low cost, simple structure and low complexity, can realize long-distance communication without site address, has no data gap in the data string, and the gap between data strings is tiny, and has high channel utilization rate.
[0032] The communication system of the present invention implements a complete four-layer protocol, the physical layer is not limited to one, the data link layer uses the site as a data packet, and the network layer takes the data packet in the order of the size of the data packet. The transport layer includes multiple sending modes of the site and multiple site states.
[0033] The communication system of the present invention realizes automatic processing of network faults, regularly feeds back data packets, can query site locations, and facilitates network diagnosis.
[0034] The present invention can realize fast multi-machine communication, which is reliable, stable and low-cost. It provides a communication solution with simple structure, low cost, long communication distance, high baud rate, strong anti-interference and feedback function. It does not require a complex controller and only needs a simple physical layer to realize fast and long-distance communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a ring topology data diagram;
[0036] Figure 2 It is a linear topological structure data diagram;
[0037] Figure 3 Complete data flow graph for ring topology;
[0038] Figure 4 This is the schematic diagram of SCBU-SUART;
[0039] Figure 5 The schematic diagram of the data flow for the linear topology;
[0040] Figure 6 It is the principle diagram of the breakpoint ring data flow;
[0041] Figure 7 Schematic diagram of data flow for breakpoint linear topology;
[0042] Figure 8 To convert to the state communication mode schematic diagram;
[0043] Fig. 9 This is the state communication principle diagram. DETAILED DESCRIPTION
[0044] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and specific embodiments.
[0045] Example
[0046] Reference Figure 1-Figure 9, analyze real-time data (consistent data frame objects each time), in bytes, 1 byte is 8 bits. In order to access each site, the station address can be absent in the data string (maximize data utilization), and each site is designed to have a write data packet NRn (command data packet) and a read data packet NWn (feedback data packet); NRn, NWn ≥ 1, 1Rn = 5, indicating that the reading packet of site 1 is 5 bytes. Improve communication distance, baud rate and anti-interference, and use serial communication (parallel communication, address is required when reading data, the total length is affected by the baud rate, and anti-interference is affected by the number of sites. Serial communication does not have these disadvantages. The disadvantage of serial communication is that each site cannot have problems, otherwise the bus will be broken, and two communication interfaces are required). Maximize channel utilization, there is no time interval between data strings, and the time interval t between data strings is as small as possible (from the master station to see the data string, 1 bit or 2 bits + hardware delay), the site receives and sends synchronously, and the site writes and reads data at the same time (when NRn ≥ 1). In order to meet the above conditions, the following data structure is conceived: data is sent in reverse order of the number of first and last stations, and when a station sends data backward, it sends the data on the station first and then the subsequent data received (the data after the tail data of the station is truncated), as shown in the ring topology data diagram.
[0047] In this embodiment, there are N stations, each NWn, NRn is n bytes, and at pM baud rate, T hardware is the time interval between data strings, and the general bus data throughput is ,
[0048] Assume V = 2*N*n, data throughput
[0049] ,
[0050] From the topology diagram, we can analyze the data throughput K up to
[0051] ,
[0052] The improvement is two times. This is the effect of the station writing data and reading data at the same time, which can only be achieved in a ring structure. Consider the communication situation of another structure of serial communication---linear structure (serial communication only has two structures---ring structure and linear structure). The linear structure cannot form a loop, and the bus realizes reading and writing. First of all, the read and write data cannot be processed at the same time. The bus requires two-way transmission corresponding to reading and writing respectively. The analysis station can still synchronize the reception and transmission. In order to meet the conditions, the following data structure is conceived: the first station sends data in reverse order of the last station number, and the station sends subsequent data backward (the data after the tail of the station data is cut off). When returning data (read data), the station sends the data of the station first and then the received data.
[0053] Among them, considering the data compatibility of the ring structure and the linear structure, simplifying the data structure, integrating the topological data structure, and conceiving the following data structure: Linear structure write data string length , linear structure read data string length , length of ring structure data string , let NWRn=max(NWn,NRn), the length of the data string passing through the site remains unchanged (useless data 0 can be uploaded, and the received useless data can be ignored), the data is sent in reverse order of the number of first and last sites, the data writing site sends data backward by sending the data on the site first and then the subsequent data received (the data after the tail data of this site is truncated), the data returning (reading data) site sends the data of this site first and then the received data, and the data length remains consistent, such as the entire data flow diagram of the ring topology structure, with the first one sending and the last one truncating.
[0054] In addition, from the above analysis of the communication physical layer, as long as the serial type is available, synchronous asynchronous, full-duplex, and half-duplex are all available. Asynchronous is relatively simple, and half-duplex wiring is even simpler, generally with two differential signal lines, which are relatively fast compared to full-duplex, and the synchronous speed can be even faster. For the design of the communication physical layer, the communication physical layer is selected based on the communication baud rate and the maximum communication length between sites. For example, if a 10Mb baud rate is required and the maximum communication length between sites is 10 meters, RS422 can be used for communication. To further reduce the cost of the physical layer, the design is as follows: design a communication port to complete the work of two communication interfaces: monitor two communication ports at the same time, control the transmission and reception of the communication ports respectively, and latch the communication port status. For example, the universal asynchronous receiver and transmitter SUART commonly used in single-chip microcomputers is used for communication. The principle design is shown in the principle SCBS--SUART diagram.
[0055] It is worth mentioning that considering the design reliability, the design is carried out from the data reliability and bus reliability. Data reliability design, adding data check, this scheme adopts a selective data check scheme---it can be added to the end of the data string or added to the data packet. The check added to the end of the data string has a high data utilization rate, but it requires additional check hardware to meet the real-time requirements of communication. The data packets are equivalent to a serial relationship. If there is interference in the data packets, the entire data string loses its usefulness. Many buses are generally of this type. It is rare to add check to the data packet, and the data utilization rate is low, but it also has its characteristics. The software can solve the problem that the check does not affect the real-time requirements of communication. The data packets are equivalent to a parallel relationship. If there is interference in the data packets, other data packets in the entire data string are not affected. It is particularly suitable for low-cost requirements. The main design point of the bus reliability design is that when the breakpoint exists, the bus continues to work as much as possible. If there is a fault point on the bus, the bus is not completely paralyzed, and the data is read with feedback in the timing. The bus is designed to be duplex. When the bus has a breakpoint, the design analysis shows that the master station and the stations in the ring topology still exist, and each station can continue to communicate. The data string structure is modified. The subsequent stations in the linear topology cannot communicate after the breakpoint, but the stations before the breakpoint can continue to communicate, and the data string structure needs to be modified as well. The data string structure design is modified as follows: In the ring topology, the two interfaces of the master station send and receive data alternately, and when one station receives data, the other sends data at the same time. Timing starts when the station receives the write data, and the length of time is the time required for the subsequent station to read the data (TxRn is the sending time of the read data uploaded by the x station, and the waiting time of the i station is , N is the last station number). If the data of the successor station is not received before the timing, the data of this station and useless data are sent. The data length of this i station TXiRn is the length of the read data of all stations used from the first station to this station (xRn is the length of the read data uploaded by the y station, and the waiting time of the i station is ), as shown in the figure, the linear structure of the breakpoints is used to adjust the data flow. Similarly, the breakpoints of the ring structure are used to adjust the data flow. The master station can remove the write data of the station that cannot communicate after the breakpoint at any time according to the feedback of the read data, and continue to communicate with the stations that can communicate. If there is a problem with a station, it is similar to the bus breakpoint, and the design meets these conditions.
[0056] Furthermore, for the station bus communication, there is no parameter setting for a small communication network, but for a large communication network, bus parameters are often required. Bus communication is divided into two types of communication: parameter communication (ensuring data reliability and large data volume, including real-time communication settings) and real-time communication (ensuring real-time performance, small data volume, also called control data). Parameter communication generally requires a data address, while real-time communication generally does not have a data address. The design is as follows: general communication has parameter communication and real-time communication, requiring the minimum length of the bus data string to be 2, and the communication format is consistent with the above introduction. The communication type is changed to two basic communications, general communication (parameter communication, real-time communication) and status communication. A special communication is used for switching between general communication and status communication, called switching communication. Switching communication is divided into two types: general communication switching to status communication is referred to as input communication, and status communication switching to general communication is referred to as output communication. The input communication process is as follows: when the length of the written data string received by the general communication station is greater than 1, and the length of the written data string received by the station is 1 (no data format requirement), the station exits the original communication mode and enters the status communication mode initialization, and feedbacks the status data. Status communication, the length of the written data string is 1, and the read data is the feedback status data. The data string format is as follows Figure 8 Status communication. In the state communication, two ways of feedback status data are designed: 1. Allow time gaps between the data of the feedback status data string, increase the interval gap between data strings, analyze the relationship between data and data strings, and the length of the station feedback status data is 1. 2. The length of the station feedback status data is 2, the first one is the status data, and the second one is useless data (not in the status data encoding). When the data of this station is sent earlier than the data of the next station, the first data needs to wait for the receiving data of the next station to be sent after the data is sent, resulting in the interruption of the data string (here it means that there is a short time interval between data and data, which is not completely continuous). With the second useless data, it can be filled. When the data of this station is sent later than the data of the next station, the data of the next station can cover the second useless data. The two ways of feedback status data can be selected or used together according to the actual situation. The master station does not know the number of stations on the bus, and the station does not know whether it is the end station. It is initialized through the status communication mode, and the number of stations is calculated according to the feedback status data string. Whether the station receives data determines whether it is the end station (in the process of sending, if it has not received data, it is the end station). Outgoing communication, in the status communication mode, the host data string length is 1, when the station receives a written data string length greater than 1 (outgoing data encoding), the status data is fed back, and the status communication automatically exits and changes to general communication. The time for timing feedback data is calculated based on the number of stations after the station and the length of the data packet. The incoming mode is used to determine the station position, and the time for timing feedback data is zero.
[0057] If the bus has a breakpoint or the station is not working, there will be subsequent diagnostic maintenance work. In order to increase the maximum communication distance between stations, a communication relay station may be added. For diagnostic design, the communication relay station is included in the station scope, and the station communication light is designed.
[0058] The present invention analyzes real-time data and designs each site to have a write data packet NRn (command data packet) and a read data packet NWn (feedback data packet), NRn, NWn ≥ 1;
[0059] In order to improve the communication distance, baud rate and anti-interference, serial communication is adopted;
[0060] To maximize the channel utilization, there is no time interval between data strings, and the site writes and reads data at the same time. Considering the data compatibility of the ring topology and the linear topology, a structure is designed in which one communication port completes the work of two communication interfaces, further reducing the physical layer cost.
[0061] Add data verification to improve data reliability. Add timed feedback to read data to improve bus reliability and prevent the bus from being completely paralyzed.
[0062] According to the actual situation, select the status data with time gaps to feedback the status data, or send useless data filling signals.
[0063] The present invention has low cost, multi-site, fast and long-distance communication;
[0064] The existing communication equipment has low data utilization: the present invention improves the channel utilization by two times, which is the effect of the station writing data and reading data processing at the same time, which is only possible in the ring structure;
[0065] The existing industrial bus has shortcomings such as insufficient baud rate or insufficient communication distance, and few stations. Series communication can improve communication distance, baud rate and anti-interference performance.
[0066] Under the requirement of low cost, the real-time performance of many buses cannot be guaranteed. The data packets of the present invention are equivalent to a parallel relationship. If there is interference in a data packet, other data packets in the entire data string will not be affected. It is particularly suitable for those requiring low cost.
[0067] To sum up, the present invention belongs to the type of series asynchronous serial communication, and the main technical problem it solves is fast multi-machine communication that is reliable, stable and low-cost. Compared with the prior art, the present invention realizes a communication solution with simple structure, low cost, long communication distance, high baud rate, strong anti-interference and feedback function. It does not require a complex controller, and only a simple physical layer is required to achieve fast and long-distance communication.
[0068] The above specific embodiments are only several optional embodiments of the present invention. Based on the technical solutions of the present invention and the relevant inspirations of the above embodiments, those skilled in the art can make various alternative improvements and combinations to the above specific embodiments.
Claims
1. A multifunctional communication method, characterized in that: include: Data structure integration, using data packet design without station number address, by integrating ring topology and linear topology data structures; In the data structure integration, each site is designed to have a write data packet NRn and a read data packet NWn; NRn, NWn ≥ 1; the number of first and last sites sends data in reverse order of the number of first and last sites, and the site sends data backward, first sending the data on the site, and then sending the subsequent data received, and the subsequent data is the data after the tail data of the site is cut off; Select the communication physical layer according to the communication baud rate and the maximum communication length between sites, and design one communication port to complete the work of two communication interfaces; Data reliability check, choose to add the check to the end of the data string or the data packet, and set feedback read data in the timing to communicate the reliability of the bus; Communication classification, bus communication is divided into general communication and status communication. General communication includes parameter communication and real-time communication. Switching of different communication types is achieved by switching communication. Status communication is used to determine the number of sites, end sites and communication types. The master station calculates the number of sites based on the feedback status data string, and the site determines whether it is the end site by whether it receives data. In the communication classification, the communication is switched to state communication in the form of input communication. The input communication process is as follows: when the length of the written data string received by the general communication site is greater than 1 and the length of the written data string received by the site is 1, the site exits the original communication mode and enters the state communication mode initialization, and feedbacks the status data; Status communication: the length of the written data string is 1, and the read data is the feedback status data; In the input communication, the design of the feedback status data includes: allowing time gaps between the data of the feedback status data string, increasing the interval between data strings, analyzing the relationship between data and data strings, and the length of the site feedback status data is 1; The length of the site feedback status data is 2, the first one is status data, and the second one is useless data. When the data of this site is sent earlier than the data of the next site, the first data needs to wait for the receiving data of the next site to be sent after sending, resulting in the interruption of the data string, and the second useless data is filled. When the data of this site is sent later than the data of the next site, the data of the next site covers the second useless data. Diagnosis and maintenance: introduce communication relay stations and include them in the site scope. By setting site communication lights, the bus can be diagnosed and maintained.
2. A multifunctional communication method according to claim 1, characterized in that: In the selection of the communication physical layer, one communication port completes the work of two communication interfaces, specifically including: Monitor two communication ports at the same time, control the sending and receiving of the communication ports respectively, and latch the status of the communication ports.
3. A multifunctional communication method according to claim 1, characterized in that: The data reliability check specifically includes: Add data checksum, design a selective data checksum solution to add to the end of the data string or to the data packet; The data utilization rate of adding verification to the end of the data string is high, and additional verification hardware is required to meet the real-time requirements of communication.
4. A multifunctional communication method according to claim 3, characterized in that: The reliability communication also includes a bus reliability unit. The bus reliability unit uses timing with feedback to read data and the bus is designed to be duplex.
5. A multifunctional communication method according to claim 1, characterized in that: When the master station does not know the number of stations on the bus, and the station does not know whether it is the last station, it is initialized through the status communication mode, and the number of stations is calculated based on the feedback status data string. Whether the station receives data determines whether it is the last station. If it has not received data during transmission, it is the last station.
6. A multifunctional communication method according to claim 5, characterized in that: The switching of the state communication to general communication is indicated as outgoing state communication. In the state communication mode, the host data string length is 1. When the station receives a written data string length greater than 1, it feeds back the state data, and the state communication automatically exits and changes to general communication. The timing feedback data time is calculated based on the number of stations after the station and the length of the data packet. The entry mode is used to determine the station position, and the timing feedback data time is zero.
Citation Information
Patent Citations
Wireless packet communication method and wireless packet communication apparatus
CA2513346A1
Wireless subway door communication bus detection device and method
CN115051937A
