CN112968822A - One-master multi-slave real-time communication system and method based on Ethernet PHY - Google Patents
One-master multi-slave real-time communication system and method based on Ethernet PHY Download PDFInfo
- Publication number
- CN112968822A CN112968822A CN202110278016.9A CN202110278016A CN112968822A CN 112968822 A CN112968822 A CN 112968822A CN 202110278016 A CN202110278016 A CN 202110278016A CN 112968822 A CN112968822 A CN 112968822A
- Authority
- CN
- China
- Prior art keywords
- slave
- network
- port
- node
- master
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Small-Scale Networks (AREA)
Abstract
The present invention relates to a motion control real-time communication system and method, and more particularly, to a one-master multi-slave real-time communication system and method based on an ethernet PHY. The system comprises a main node and a slave node, wherein the main node comprises an industrial control computer and an NIC network card unit, and the slave node comprises an FPGA main control unit, a PHY unit, a network transformer unit and an RJ45 network port. The main node connects the NIC to the input port of the slave node through the network cable, the output port of the slave node is connected to the input port of the next slave node, and a main multi-slave communication network is formed in sequence. By means of a physical layer communication link provided by a gigabit Ethernet PHY and by writing FPGA control logic, data transmission with strong real-time performance, large throughput and high reliability can be realized; the method has the advantages of simple implementation mode, multi-node communication, high reliability, high real-time performance and capability of realizing data transmission with strong real-time performance, large throughput and high reliability.
Description
Technical Field
The present invention relates to a motion control real-time communication system and method, and more particularly, to a one-master multi-slave real-time communication system and method based on an ethernet PHY.
Background
In the field of industrial motion control, data interaction between devices is often required to be performed in real time at high speed. When the distance between the devices is long, RS485, CAN, Ethernet and other transmission media CAN be adopted, and the reliability of data interaction is ensured by combining with upper-layer protocols. RS485 and CAN buses are generally suitable for occasions with small data volume and low requirements on refresh cycles; and the common Ethernet communication has no real-time performance and can not be directly used in the occasions with strict requirements on the real-time performance of industrial communication, such as robots, motion control systems and the like.
Some communication protocols, such as EtherCAT, Powerlink, PROFINET, etc., have been derived based on ethernet transmission media. On one hand, such protocols are generally complex and have certain requirements on hardware, which increases the difficulty of application. On the other hand, the Ethernet technology has specificity and closure, and a certain royalty needs to be paid to the Ethernet technology during application. However, in the field of partial motion control, a complete routing mechanism and flow control are not needed, but a high real-time data interaction mode is needed.
Disclosure of Invention
The present invention provides a primary-multi-slave real-time communication system and method based on ethernet PHY, which has the advantages of high reliability, high real-time performance, and multi-node communication.
In order to solve the technical problems, the invention adopts the technical scheme that: a one-master multi-slave real-time communication system based on an Ethernet PHY comprises a master node and slave nodes; the main node comprises an industrial control computer and an NIC network card unit; the slave node comprises an FPGA main control chip, a first physical layer PHY chip, a second physical layer PHY chip, a first network transformer, a second network transformer, a first RJ45 network port and a second RJ45 network port; the industrial control computer is connected with the NIC network card through a PCI or PCIe bus; the FPGA main control chip is electrically connected with one end of a first physical layer PHY chip, the other end of the first physical layer PHY chip is electrically connected with one end of a first network transformer, and the other end of the first network transformer is electrically connected with a first RJ45 network port; the FPGA main control chip is also electrically connected with one end of a second physical layer PHY chip, the other end of the second physical layer PHY chip is electrically connected with one end of a second network transformer, and the other end of the second network transformer is electrically connected with a second RJ45 network port; the master node and the slave node are connected through a network cable.
In one embodiment, the host node further includes a NIC driving unit and a first data exchange format defining unit; the slave node also comprises a slave node control unit and a second data exchange format definition unit; the NIC driving unit and the first data exchange format defining unit are respectively in communication connection with the industrial personal computer; and the slave node control unit and the second data exchange format definition unit are respectively in communication connection with the FPGA main control chip.
In one embodiment, the FPGA master control chip is connected to the first physical layer PHY chip and the second physical layer PHY chip through RMII interfaces, respectively.
In one embodiment, the first RJ45 port and the second RJ45 port are full duplex, and the communication rate is 100Mbps or 1000 Mbps.
In one embodiment, the network card unit of the master node NIC is communicatively connected to the first RJ45 network port of the slave node through a network cable.
In one embodiment, the slave nodes are provided with a plurality of groups, and the plurality of groups of slave nodes are connected in series through a network cable.
In one embodiment, the second RJ45 port of a slave node is communicatively connected to the first RJ45 port of another slave node via a network cable.
In one embodiment, the number of the slave nodes is less than or equal to 65535, and the distance between two adjacent slave nodes is less than or equal to 100 meters.
In one embodiment, the first RJ45 port is an input port; the second RJ45 port is an output port.
The invention also provides a master-slave real-time communication method based on the Ethernet PHY, which uses the master-slave real-time communication system based on the Ethernet PHY and specifically comprises the following steps: when a data updating period comes, the NIC driving unit packages data to be sent into a package according to the definition of an agreed data exchange format, the NIC driving unit fills the data sending buffer area, and the data is sent to an input network port of a first slave node through a network transformer; and the slave node FPGA main control chip receives data flow from the input network port, defines, analyzes and secondarily packages the data flow according to an agreed data exchange format, then sends the data flow to the input network port of the next slave node from the slave node output network port, and so on until the data exchange of all the nodes in the network is completed.
Compared with the prior art, the beneficial effects are: according to the one-master multi-slave real-time communication system and method based on the Ethernet PHY, provided by the invention, by means of a physical layer communication link provided by the gigabit Ethernet PHY, the FPGA control logic is compiled, so that the data transmission with strong real-time performance, large throughput and high reliability can be realized; the invention has simple realization mode, multi-node communication, high reliability and real-time performance, and can realize data transmission with strong real-time performance, large throughput and high reliability.
Drawings
FIG. 1 is a schematic diagram of the system of the present invention.
Fig. 2 is a block diagram of a slave node communication unit of the present invention.
Fig. 3 is a flow chart of real-time communication data interaction according to the present invention.
Detailed Description
The drawings are for illustration purposes only and are not to be construed as limiting the invention; for the purpose of better illustrating the embodiments, certain features of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product; it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted. The positional relationships depicted in the drawings are for illustrative purposes only and are not to be construed as limiting the invention.
Example 1
The embodiment provides a master-slave real-time communication system based on an Ethernet PHY, which comprises a master node and slave nodes; the main node comprises an industrial control computer and an NIC network card unit; the slave node comprises an FPGA main control chip, a first physical layer PHY chip, a second physical layer PHY chip, a first network transformer, a second network transformer, a first RJ45 network port and a second RJ45 network port; the industrial control computer is connected with the NIC network card through a PCI or PCIe bus; the FPGA main control chip is electrically connected with one end of the first physical layer PHY chip, the other end of the first physical layer PHY chip is electrically connected with one end of the first network transformer, and the other end of the first network transformer is electrically connected with the first RJ45 port; the FPGA main control chip is also electrically connected with one end of a second physical layer PHY chip, the other end of the second physical layer PHY chip is electrically connected with one end of a second network transformer, and the other end of the second network transformer is electrically connected with a second RJ45 network port; the master node and the slave node are connected through a network cable.
In one embodiment, the master node further includes a NIC driving unit and a first data exchange format defining unit; the slave node further comprises a slave node control unit and a second data exchange format definition unit; the NIC driving unit and the first data exchange format defining unit are respectively in communication connection with the industrial personal computer; and the slave node control unit and the second data exchange format definition unit are respectively in communication connection with the FPGA main control chip.
In one embodiment, the FPGA master control chip is connected to the first physical layer PHY chip and the second physical layer PHY chip through RMII interfaces, respectively.
In one embodiment, the first RJ45 port and the second RJ45 port are full duplex, and the communication rate is 100Mbps or 1000 Mbps.
In one embodiment, the network card unit of the master node NIC is communicatively connected to the first RJ45 network port of the slave node through a network cable.
In one embodiment, the slave nodes are provided with a plurality of groups, and the plurality of groups of slave nodes are connected in series through the network cable.
In one embodiment, the second RJ45 port of a slave node is communicatively connected to the first RJ45 port of another slave node via a network cable.
In one embodiment, the number of the slave nodes is less than or equal to 65535, and the distance between two adjacent slave nodes is less than or equal to 100 meters.
In one embodiment, the first RJ45 port is an input port; the second RJ45 port is an output port.
Example 2
The embodiment provides a master-slave real-time communication method based on an ethernet PHY, and the method for implementing the master-slave real-time communication system based on the ethernet PHY in embodiment 1 specifically includes the following steps: when a data updating period comes, the NIC driving unit packages data to be sent into a package according to the definition of an agreed data exchange format, the NIC driving unit fills the data sending buffer area, and the data is sent to an input network port of a first slave node through a network transformer; and the slave node FPGA main control chip receives data flow from the input network port, defines, analyzes and secondarily packages the data flow according to an agreed data exchange format, then sends the data flow to the input network port of the next slave node from the slave node output network port, and so on until the data exchange of all the nodes in the network is completed.
The NIC driving unit works in a kernel mode and performs data interaction with the real-time task layer in a memory sharing mode; the NIC driving unit removes an interface interacted with an upper layer protocol stack and increases an interaction interface with a real-time task layer; the NIC driving unit turns off the functions of power management, dormancy and the like so as to enhance the real-time performance; the NIC driving unit comprises a hardware initialization function, a cache initialization function, a data sending processing function, a data receiving processing function, a state updating function and a data packaging and analyzing function; the data transmission flow is that a data encapsulation and analysis function encapsulates data transmitted by a real-time task layer in a shared memory mode according to a data exchange format, then a descriptor is assigned and transmitted according to skb through a data transmission processing function, and then a hardware transmission register is enabled to directly transmit the data out; the data receiving process comprises the steps that an interrupt mechanism is set by an initialization function to receive a data packet, when the interrupt is received, a data receiving processing function copies data from a receiving descriptor according to skb, and then a data analysis function is called to transmit effective data to a real-time task layer in a shared memory mode; the state update function in the NIC driving unit may report the number of the transceiving packets, the network connection state, the number of the slave nodes, the transmission and reception rates, and the like to the user layer.
The slave node FPGA main control chip is configured with control programs including PYH initialization functions, data transceiving processing functions, data packaging and analyzing functions; the PHY initialization function comprises auto-negotiation mode configuration, rate configuration, RMII reset and RMII enabling; the slave nodes can automatically arrange address codes according to the physical connection sequence in the network; the data receiving and transmitting processing function receives the data stream from the first network port and carries out CRC (cyclic redundancy check) check; the slave node reads data from the corresponding data segment according to the address code of the slave node, inserts new data to be sent, accumulates the counter in the data packet by 1, performs integral CRC (cyclic redundancy check) on the new data packet, and fills the new check data into the data packet; the slave nodes send out the newly processed data packets from the second network port according to the bit stream until the data packets processed by the last node in the network are returned to the master node one by one through each slave node; as shown in fig. 3, the whole communication process is operated in a full-duplex mode, and each slave node implements update processing on a data packet in a pure hardware manner.
The data exchange format protocol unit comprises an Ethernet lead code, a frame start delimiter, a slave node address code, data length, user data, a data packet counter, a synchronous clock, data verification and the like; the preamble is 7 bytes 0x55, a series of 1 and 0 interval data streams, which represents signal synchronization; the start of frame delimiter is 1 byte 0xD5, indicating the start of valid data; the slave node address code is 2 bytes and is automatically filled according to the position of the slave node in the network; the data length is 2 bytes; the data packet counter is 2 bytes, represents the number of times of the present data packet is processed, is used for the network communication to diagnose; the synchronous clock is 4 bytes and represents the time sequence synchronization of each slave node; the data is checked for 4 bytes and the CRC32 checks all data from the start delimiter of the frame to the last byte of the sync clock and fills in the end of the packet.
In the description of the present invention, it is to be understood that the terms "central," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," "circumferential," and the like are used in the orientations and positional relationships indicated in the drawings for convenience in describing the invention and to simplify the description, and are not intended to indicate or imply that the referenced device or element must have a particular orientation, be constructed and operated in a particular orientation, and are not to be considered limiting of the invention.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; they may be directly connected or indirectly connected through intervening media, or they may be connected internally or in any other suitable relationship, unless expressly stated otherwise. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless otherwise expressly stated or limited, the first feature "on" or "under" the second feature may be directly contacting the first and second features or indirectly contacting the first and second features through an intermediate. Also, a first feature "on," "over," and "above" a second feature may be directly or diagonally above the second feature, or may simply indicate that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature may be directly under or obliquely under the first feature, or may simply mean that the first feature is at a lesser elevation than the second feature.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.
It should be understood that the above-described embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the claims of the present invention.
Claims (10)
1. A one-master multi-slave real-time communication system based on an Ethernet PHY is characterized by comprising a master node and slave nodes; the main node comprises an industrial control computer and an NIC network card unit; the slave node comprises an FPGA main control chip, a first physical layer PHY chip, a second physical layer PHY chip, a first network transformer, a second network transformer, a first RJ45 network port and a second RJ45 network port; the industrial control computer is connected with the NIC network card through a PCI or PCIe bus; the FPGA main control chip is electrically connected with one end of a first physical layer PHY chip, the other end of the first physical layer PHY chip is electrically connected with one end of a first network transformer, and the other end of the first network transformer is electrically connected with a first RJ45 network port; the FPGA main control chip is also electrically connected with one end of a second physical layer PHY chip, the other end of the second physical layer PHY chip is electrically connected with one end of a second network transformer, and the other end of the second network transformer is electrically connected with a second RJ45 network port; the master node and the slave node are connected through a network cable.
2. The ethernet PHY-based one-master multi-slave real-time communication system of claim 1, wherein the master node further comprises a NIC driving unit and a first data exchange format defining unit; the slave node also comprises a slave node control unit and a second data exchange format definition unit; the NIC driving unit and the first data exchange format defining unit are respectively in communication connection with the industrial personal computer; and the slave node control unit and the second data exchange format definition unit are respectively in communication connection with the FPGA main control chip.
3. The Ethernet PHY-based one-master multi-slave real-time communication system of claim 1, wherein the FPGA master control chip is connected to the first PHY chip and the second PHY chip via RMII interfaces respectively.
4. The ethernet PHY based master-slave real-time communication system of claim 1, wherein the first RJ45 port and the second RJ45 port are full duplex and have a communication rate of 100Mbps or 1000 Mbps.
5. The ethernet PHY based one-master multi-slave real-time communication system of claim 1, wherein the master node NIC network card unit is communicatively connected to the first RJ45 port of the slave node via a network cable.
6. An Ethernet PHY-based master-slave real-time communication system according to any of claims 1 to 4, wherein a plurality of slave nodes are provided, and the plurality of slave nodes are connected in series via a network cable.
7. The Ethernet PHY-based master-slave real-time communication system of claim 6, wherein the second RJ45 port of a slave node is communicatively coupled to the first RJ45 port of another slave node via a network cable.
8. The Ethernet PHY-based one-master-multiple-slave real-time communication system of claim 7, wherein the number of the slave nodes is 65535 or less, and the distance between two adjacent slave nodes is 100 meters or less.
9. The ethernet PHY based master-slave real-time communication system according to claim 7, wherein the first RJ45 port is the input port; the second RJ45 port is an output port.
10. A master-slave real-time communication method based on ethernet PHY, wherein the ethernet-PHY based master-slave real-time communication system of any one of claims 2 to 9 is used, and the method comprises the following steps: when a data updating period comes, the NIC driving unit packages data to be sent into a package according to the definition of an agreed data exchange format, the NIC driving unit fills the data sending buffer area, and the data is sent to an input network port of a first slave node through a network transformer; and the slave node FPGA main control chip receives data flow from the input network port, defines, analyzes and secondarily packages the data flow according to an agreed data exchange format, then sends the data flow to the input network port of the next slave node from the slave node output network port, and so on until the data exchange of all the nodes in the network is completed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110278016.9A CN112968822A (en) | 2021-03-15 | 2021-03-15 | One-master multi-slave real-time communication system and method based on Ethernet PHY |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110278016.9A CN112968822A (en) | 2021-03-15 | 2021-03-15 | One-master multi-slave real-time communication system and method based on Ethernet PHY |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112968822A true CN112968822A (en) | 2021-06-15 |
Family
ID=76279364
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110278016.9A Pending CN112968822A (en) | 2021-03-15 | 2021-03-15 | One-master multi-slave real-time communication system and method based on Ethernet PHY |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112968822A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113589744A (en) * | 2021-08-24 | 2021-11-02 | 无锡信捷电气股份有限公司 | PLC remote control system and method based on EtherCAT communication |
CN114889081A (en) * | 2022-03-01 | 2022-08-12 | 苏州正田美佳电子科技有限公司 | Communication address allocation method applied to hot runner temperature control system |
CN115284268A (en) * | 2022-08-01 | 2022-11-04 | 法奥意威(苏州)机器人系统有限公司 | Data verification method and device, robot system, electronic device and storage medium |
-
2021
- 2021-03-15 CN CN202110278016.9A patent/CN112968822A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113589744A (en) * | 2021-08-24 | 2021-11-02 | 无锡信捷电气股份有限公司 | PLC remote control system and method based on EtherCAT communication |
CN114889081A (en) * | 2022-03-01 | 2022-08-12 | 苏州正田美佳电子科技有限公司 | Communication address allocation method applied to hot runner temperature control system |
CN114889081B (en) * | 2022-03-01 | 2024-05-24 | 苏州正田美佳电子科技有限公司 | Communication address allocation method applied to hot runner temperature control system |
CN115284268A (en) * | 2022-08-01 | 2022-11-04 | 法奥意威(苏州)机器人系统有限公司 | Data verification method and device, robot system, electronic device and storage medium |
CN115284268B (en) * | 2022-08-01 | 2023-11-21 | 法奥意威(苏州)机器人系统有限公司 | Data verification method, device, robot system, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Birrittella et al. | Intel® omni-path architecture: Enabling scalable, high performance fabrics | |
CN112968822A (en) | One-master multi-slave real-time communication system and method based on Ethernet PHY | |
US4939724A (en) | Cluster link interface for a local area network | |
US5041963A (en) | Local area network with an active star topology comprising ring controllers having ring monitor logic function | |
US5247626A (en) | Fddi controller having flexible buffer management | |
US11343117B2 (en) | Method for transmitting data via a serial communication bus, correspondingly designed bus interface, and correspondingly designed computer program | |
US5896383A (en) | System and method for encoding instruction fields within data packets | |
US6438128B1 (en) | Alternate use of data packet fields to convey information | |
US7519076B2 (en) | Method and node for using a communication network in parallel for real-time applications and non-real-time applications | |
EP2003823B1 (en) | Autonegotiation over an interface for which no autonegotiation standard exists | |
EP1775884B1 (en) | Apparatus and method of remote physical layer auto-negotiation | |
GB2332128A (en) | Arrangement for transmitting packet data segments from a media access controller across multiple physical links | |
CN106953853B (en) | Network-on-chip gigabit Ethernet resource node and working method thereof | |
WO2019036217A1 (en) | Heterogeneous packet-based transport | |
CN102185833B (en) | Fiber channel (FC) input/output (I/O) parallel processing method based on field programmable gate array (FPGA) | |
EP1216564A1 (en) | Reduced hardware network adapter and communication method | |
WO2020038191A1 (en) | Time delay measuring method and network device | |
EP3136633B1 (en) | Network module for sending and/or receiving of data packages from a network arrangement and method | |
US7644194B2 (en) | Method and system for addressing a plurality of Ethernet controllers integrated into a single chip which utilizes a single bus interface | |
CN108021525B (en) | A kind of redundancy exchange system based on the more primary interconnects of PCIE bus | |
US11973826B2 (en) | Data transmission method and automation communication network | |
CN101106504A (en) | Distributed communication system for intelligent independent robot based on CAN bus | |
CN108228521A (en) | A kind of Serial Communication at High Speed on MS network | |
JP2986798B2 (en) | Data transmission control method and data communication device | |
CN214627012U (en) | One-master multi-slave real-time communication system based on Ethernet PHY |
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 |