CN114006950A - On-arrow communication method, system, computer device and storage medium - Google Patents
On-arrow communication method, system, computer device and storage medium Download PDFInfo
- Publication number
- CN114006950A CN114006950A CN202111127568.6A CN202111127568A CN114006950A CN 114006950 A CN114006950 A CN 114006950A CN 202111127568 A CN202111127568 A CN 202111127568A CN 114006950 A CN114006950 A CN 114006950A
- Authority
- CN
- China
- Prior art keywords
- communication
- ethercat
- target
- slave station
- data frame
- 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.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/06—Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/22—Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability
-
- 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/26—Special purpose or proprietary protocols or architectures
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- Computer Security & Cryptography (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Selective Calling Equipment (AREA)
- Communication Control (AREA)
Abstract
The invention provides an on-arrow communication method, a system, computer equipment and a storage medium, wherein the method comprises the following steps: the EtherCAT communication master station generates a target communication data frame according to the current telemetering instruction set and the EtherCAT communication protocol; the EtherCAT communication master station sequentially sends the target communication data frames to the EtherCAT communication slave station through a dual redundant communication channel; the EtherCAT communication slave station analyzes the target communication data frame to obtain a telemetering instruction matched with the EtherCAT communication slave station; the EtherCAT communication slave station executes the telemetry command and generates response data; the EtherCAT communication slave station replaces the telemetry command in the target communication data frame with the response data to obtain a target response data frame, and sends the target response data frame to the EtherCAT communication master station; the method and the device solve the problems of low transmission rate and small transmission data volume in the arrow communication in the prior art, and improve the transmission rate and the transmission data volume.
Description
Technical Field
The invention relates to the technical field of on-arrow communication, in particular to an on-arrow communication method, an on-arrow communication system, computer equipment and a storage medium.
Background
In the aerospace field, with the rapid progress of the national defense aerospace technology, the topological structure of the rocket-mounted control system is gradually developed into a control system among multiple devices and multiple platforms from single control, and in order to meet the requirement of a data communication system among spacecrafts with complex topological structures, higher requirements are provided for the diversity, reliability, instantaneity and high-speed transmission of data. However, the conventional field bus in the aerospace field, such as 1553B, RS485, RS232, CAN and the like, has the disadvantages of high cost, low transmission rate, small transmission data volume, reduced rate required for long-distance transmission and the like.
Therefore, the problems of low transmission rate, small transmission data volume and the like exist in arrow communication in the prior art.
Disclosure of Invention
Aiming at the defects in the prior art, the method, the system, the computer equipment and the storage medium for communication on the arrow provided by the invention solve the problems of low transmission rate and small transmission data volume in the communication on the arrow in the prior art, a plurality of EtherCAT sub-messages are collected in a data frame by adopting a method of collecting a total frame, one data frame can contain a plurality of sub-messages, and the transmission rate and the transmission data volume are improved.
In a first aspect, the present invention provides an arrow communication method, which is applied to an arrow communication system, where the communication system includes an EtherCAT communication master station and one or more EtherCAT communication slave stations, and the EtherCAT communication master station and the one or more EtherCAT communication slave stations are sequentially connected to form a communication network, and the method includes: the EtherCAT communication master station generates a target communication data frame according to the current telemetry instruction set and the EtherCAT communication protocol; the EtherCAT communication master station sequentially sends the target communication data frames to the EtherCAT communication slave station through a dual redundant communication channel; the EtherCAT communication slave station analyzes the target communication data frame to obtain a telemetering instruction matched with the EtherCAT communication slave station; the EtherCAT communication slave station executes the telemetry command and generates response data; and the EtherCAT communication slave station replaces the telemetry command in the target communication data frame with the response data to obtain a target response data frame, and sends the target response data frame to the EtherCAT communication master station.
Optionally, the target communication data frame includes an ethernet frame header, an EtherCAT frame header, a frame check sequence, and EtherCAT data composed of a plurality of sub-packets, where each sub-packet includes a sub-packet header, a custom data segment, and a count field.
Optionally, the sub-packet header includes a slave station address, a current packet number, a previous associated packet number, and a next associated packet number; the self-defined data segment comprises a message header, a message sending sequence, a data area and a check field.
Optionally, when the EtherCAT communication slave stations are at least two and at least one of the EtherCAT communication slave stations is a monitoring slave station, and the dual redundant communication channels include a first communication channel and a second communication channel, the EtherCAT communication master station sequentially sends the target communication data frame to the EtherCAT communication slave stations through the dual redundant communication channels includes: the EtherCAT communication master station sends the target communication data frame to the monitoring slave station through the first communication channel or/and the second communication channel; the monitoring slave station judges whether a frame check sequence in a currently received target communication data frame exists in a monitoring database; and if the target communication data frame does not exist in the monitoring database, the monitoring slave station writes the frame check sequence in the target communication data frame into the monitoring database, and sequentially sends the target communication data frame to the rest EtherCAT communication slave stations.
Optionally, the parsing, by the EtherCAT communication slave station, the target communication data frame to obtain a telemetry instruction matched with the EtherCAT communication slave station includes: the EtherCAT communication slave station acquires all sub-message headers in the target communication data frame; the EtherCAT communication slave station judges whether the slave station address in each sub-message header is the same as the address of the local station; and if the slave station address in the current sub-message header is the same as the address of the local station, the EtherCAT communication slave station acquires the data of the data area in the current sub-message and obtains the telemetering instruction matched with the EtherCAT communication slave station.
Optionally, the EtherCAT communication slave station executes the telemetry command and generates response data, including: the EtherCAT communication slave station judges whether the number of the last associated message is empty; when the number of the last associated message is not null and response data sent by the first target EtherCAT communication slave station is received, the EtherCAT communication slave station executes the telemetry command and generates response data; the first target EtherCAT communication slave station is a matched EtherCAT communication slave station in a first target sub-message, the number of the sub-message of the first target sub-message is the number of the last associated message, and the response data is response data generated by the first target EtherCAT communication slave station executing the telemetry command in the first target sub-message.
Optionally, after the EtherCAT communication slave station executes the telemetry instruction and generates response data, the method further comprises: the EtherCAT communication slave station judges whether the serial number of the next associated message is empty; when the next associated message number is not empty, the response data is sent to a second target EtherCAT communication slave station, and the second target EtherCAT communication slave station executes a matched telemetering instruction after receiving the response data; and the second target EtherCAT communication slave station is the EtherCAT communication slave station matched with the second target sub-message, and the sub-message number of the second target sub-message is the next associated message number.
In a second aspect, the present application provides an on-arrow communication system, the system comprising: the EtherCAT communication master station and the one or more EtherCAT communication slave stations are sequentially connected into a communication network; the EtherCAT communication master station is used for generating a target communication data frame according to the current telemetry instruction set and the EtherCAT communication protocol and is also used for sequentially sending the target communication data frame to the EtherCAT communication slave station through a dual-redundancy communication channel; the EtherCAT communication slave station is used for analyzing the target communication data frame to obtain a telemetering instruction matched with the EtherCAT communication slave station, executing the telemetering instruction to generate response data, replacing the telemetering instruction in the target communication data frame with the response data to obtain a target response data frame, and sending the target response data frame to the EtherCAT communication master station.
In a third aspect, the present application provides a computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: the EtherCAT communication master station generates a target communication data frame according to the current telemetry instruction set and the EtherCAT communication protocol; the EtherCAT communication master station sequentially sends the target communication data frames to the EtherCAT communication slave station through a dual redundant communication channel; the EtherCAT communication slave station analyzes the target communication data frame to obtain a telemetering instruction matched with the EtherCAT communication slave station; the EtherCAT communication slave station executes the telemetry command and generates response data; and the EtherCAT communication slave station replaces the telemetry command in the target communication data frame with the response data to obtain a target response data frame, and sends the target response data frame to the EtherCAT communication master station.
In a fourth aspect, the present application provides a readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of: the EtherCAT communication master station generates a target communication data frame according to the current telemetry instruction set and the EtherCAT communication protocol; the EtherCAT communication master station sequentially sends the target communication data frames to the EtherCAT communication slave station through a dual redundant communication channel; the EtherCAT communication slave station analyzes the target communication data frame to obtain a telemetering instruction matched with the EtherCAT communication slave station; the EtherCAT communication slave station executes the telemetry command and generates response data; and the EtherCAT communication slave station replaces the telemetry command in the target communication data frame with the response data to obtain a target response data frame, and sends the target response data frame to the EtherCAT communication master station.
Compared with the prior art, the invention has the beneficial effects that:
the invention generates the self-defined communication data frame format based on the EtherCAT communication protocol, thereby improving the compatibility of the EtherCAT communication in the aerospace field; a plurality of EtherCAT sub-messages are collected in a data frame by adopting a method of collecting a frame, and one data frame can contain a plurality of sub-messages, so that the transmission rate and the transmission data volume are improved; the reliability of communication transmission is improved through the dual redundant communication channels.
Drawings
FIG. 1 is a schematic flow chart of a method for communication on an arrow according to an embodiment of the present invention;
fig. 2 is a frame structure of a target communication data frame according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an on-arrow communication system according to an embodiment of the present invention;
fig. 4 is an application scenario diagram of an archery communication system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
FIG. 1 is a schematic flow chart of a method for communication on an arrow according to an embodiment of the present invention; as shown in fig. 1, the method is applied to an arrow communication system, the communication system includes an EtherCAT communication master station and one or more EtherCAT communication slave stations, the EtherCAT communication master station and the one or more EtherCAT communication slave stations are sequentially connected to form a communication network, and the arrow communication method specifically includes the following steps:
and S101, the EtherCAT communication master station generates a target communication data frame according to the current telemetry instruction set and the EtherCAT communication protocol.
It should be noted that the EtherCAT communication protocol is based on ethernet and transmits standard ethernet data frames. Each data frame sent by the EtherCAT master station passes through all the nodes, and in the process of transmitting the data frame downstream, each node reads data addressed to the node and writes feedback data of the node into the data frame. This transmission improves bandwidth utilization such that one data frame per cycle is typically sufficient for data communication, while the network no longer requires the use of switches and hubs. The transmission delay of the data frame only depends on the hardware transmission delay, and when the last node on a certain network segment or branch detects an open port (without a next slave station), the message is returned to the master station by utilizing the full duplex characteristic of the Ethernet technology.
As shown in fig. 2, in this embodiment, the target communication data frame includes an ethernet frame header, an EtherCAT frame header, a frame check sequence, and EtherCAT data composed of a plurality of sub-packets, where each sub-packet includes a sub-packet header, a custom data segment, and a count field. The sub-message header comprises a slave station address, a current message number, a previous associated message number and a next associated message number; the user-defined data segment comprises a message header, a message sending sequence, a data area and a check field; the Ethernet frame header comprises a destination address, a source address and a frame type, and the EtherCAT frame header comprises EtherCAT data length, a data type and a reserved bit. In this embodiment, a sub-message structure in an EtherCAT communication protocol standard data frame is customized to obtain a target communication data frame, and each telemetry command is encapsulated in a data area in each sub-message.
And step S102, the EtherCAT communication master station sequentially sends the target communication data frames to the EtherCAT communication slave station through dual redundant communication channels.
In this embodiment, when the EtherCAT communication slave stations are at least two and at least one of the EtherCAT communication slave stations is a monitoring slave station, and the dual redundant communication channels include a first communication channel and a second communication channel, the EtherCAT communication master station sequentially sends the target communication data frame to the EtherCAT communication slave stations through the dual redundant communication channels includes: the EtherCAT communication master station sends the target communication data frame to the monitoring slave station through the first communication channel or/and the second communication channel; the monitoring slave station judges whether a frame check sequence in a currently received target communication data frame exists in a monitoring database; and if the target communication data frame does not exist in the monitoring database, the monitoring slave station writes the frame check sequence in the target communication data frame into the monitoring database, and sequentially sends the target communication data frame to the rest EtherCAT communication slave stations.
It should be noted that, in order to improve the reliability of data transmission in the communication system, in this embodiment, dual redundant communication channels are used for communication, as shown in fig. 3, PHY _ a and PHY _ B are respectively a first communication channel and a second communication channel, and the slave station 1 connected to the EtherCAT communication master station through the first communication channel and the second communication channel is used as the monitoring slave station, where the monitoring slave station includes the functions of the EtherCAT communication slave station and also has the function of screening the same target communication data frames, and the specific screening step includes: the monitoring slave station judges whether a frame check sequence of a target communication data frame currently received from the first communication channel and/or the second communication channel exists in a monitoring database, and if the frame check sequence of the target communication data frame currently received from the first communication channel and/or the second communication channel exists in the monitoring database, the frame check sequence indicates that the same target communication data frame is received, and the current frame is discarded; when the target communication data frame does not exist in the monitoring database, writing the frame check sequence in the current frame into the monitoring database, analyzing the target communication data frame and then sequentially transmitting the target communication data frame to other communication slave stations; when the EtherCAT communication master station sends different target communication data frames, the frame check sequences in each frame of target communication data frame are different.
And step S103, the EtherCAT communication slave station analyzes the target communication data frame to obtain a telemetering instruction matched with the EtherCAT communication slave station.
In this embodiment, the parsing, by the EtherCAT communication slave station, the target communication data frame to obtain a telemetry instruction matched with the EtherCAT communication slave station includes: the EtherCAT communication slave station acquires all sub-message headers in the target communication data frame; the EtherCAT communication slave station judges whether the slave station address in each sub-message header is the same as the address of the local station; and if the slave station address in the current sub-message header is the same as the address of the local station, the EtherCAT communication slave station acquires the data of the data area in the current sub-message and obtains the telemetering instruction matched with the EtherCAT communication slave station.
It should be noted that, if the slave station address in the current sub-packet header is different from the own station address, the EtherCAT communication slave station discards the data in the data area in the current sub-packet, continues to determine the slave station address in the next sub-packet header, and sequentially circulates until all the sub-packets in the target communication data frame are traversed.
And step S104, the EtherCAT communication slave station executes the telemetry command and generates response data.
In this embodiment, the EtherCAT communication slave station executes the telemetry command and generates response data, including: the EtherCAT communication slave station judges whether the number of the last associated message is empty; when the number of the last associated message is not null and response data sent by the first target EtherCAT communication slave station is received, the EtherCAT communication slave station executes the telemetry command and generates response data; the first target EtherCAT communication slave station is a matched EtherCAT communication slave station in a first target sub-message, the number of the sub-message of the first target sub-message is the number of the last associated message, and the response data is response data generated by the first target EtherCAT communication slave station executing the telemetry command in the first target sub-message.
Optionally, after the EtherCAT communication slave station executes the telemetry instruction and generates response data, the method further comprises: the EtherCAT communication slave station judges whether the serial number of the next associated message is empty; when the next associated message number is not empty, the response data is sent to a second target EtherCAT communication slave station, and the second target EtherCAT communication slave station executes a matched telemetering instruction after receiving the response data; and the second target EtherCAT communication slave station is the EtherCAT communication slave station matched with the second target sub-message, and the sub-message number of the second target sub-message is the next associated message number.
It should be noted that, when there is an association instruction in the telemetry instruction set of the communication system, for example, when the slave station 1 executes the first telemetry instruction, the slave station 2 instructs the second telemetry instruction again, in this embodiment, by setting a current packet number, a previous association packet number, and a next association packet number field in each sub packet header, associating the instruction execution sequence of each EtherCAT communication slave station, and the specific determination process includes: judging whether the last associated message number and the next associated message number in the current sub-message header are empty, when the last associated message number is not empty and response data sent by the first target EtherCAT communication slave station are received, executing the telemetering instruction by the EtherCAT communication slave station to generate response data, and when the next associated message number is not empty, sending the response data to the second target EtherCAT communication slave station to enable the second target EtherCAT communication slave station to execute the matched telemetering instruction after receiving the response data.
And step S105, replacing the telemetry command in the target communication data frame by the response data by the EtherCAT communication slave station to obtain a target response data frame, and sending the target response data frame to the EtherCAT communication master station.
It should be noted that, in this embodiment, each EtherCAT communication slave station replaces the corresponding telemetry instruction in the target communication data frame with the obtained response data to obtain a target response data frame, and then sends the target response data frame to the EtherCAT communication master station through the dual redundant communication channel to implement closed-loop feedback of the communication data.
Compared with the prior art, the invention has the beneficial effects that:
the invention generates the self-defined communication data frame format based on the EtherCAT communication protocol, thereby improving the compatibility of the EtherCAT communication in the aerospace field; a plurality of EtherCAT sub-messages are collected in a data frame by adopting a method of collecting a frame, and one data frame can contain a plurality of sub-messages, so that the transmission rate and the transmission data volume are improved; the reliability of communication transmission is improved through the dual redundant communication channels.
As shown in fig. 3, the present embodiment provides an arrow communication system, including: the EtherCAT communication master station and the one or more EtherCAT communication slave stations are sequentially connected into a communication network; the EtherCAT communication master station is used for generating a target communication data frame according to the current telemetry instruction set and the EtherCAT communication protocol and is also used for sequentially sending the target communication data frame to the EtherCAT communication slave station through a dual-redundancy communication channel;
the EtherCAT communication slave station is used for analyzing the target communication data frame to obtain a telemetering instruction matched with the EtherCAT communication slave station, executing the telemetering instruction to generate response data, replacing the telemetering instruction in the target communication data frame with the response data to obtain a target response data frame, and sending the target response data frame to the EtherCAT communication master station.
In this embodiment, the EtherCAT communication master station is a master station based on DSP C6678, the EtherCAT communication slave station is a slave station based on DSP F28335 and FPGA, and a reinforced RJ45 network cable is used between the master station and the slave station; the EtherCAT communication master station based on the DSP comprises an EtherCAT Ethernet drive module and an EtherCAT master station application layer protocol module. And sending an EtherCAT protocol frame according to a standard and self-defined communication protocol, sending a control command to the slave station, receiving information fed back by the slave station, and processing according to the information fed back by the slave station to form closed-loop control processing. The EtherCAT Ethernet driver module is used for sending and receiving data with the EtherCAT communication data frame format. The EtherCAT main station application layer protocol module consists of a real-time operating system UcosII, an open source main station library SOME and a custom protocol, EtherCAT data are obtained from the EtherCAT Ethernet drive module, then analysis processing is carried out according to the main station application layer protocol, and closed loop feedback is carried out after the processing is finished. The EtherCAT slave station based on the DSP comprises an EtherCAT bottom layer communication module and an EtherCAT slave station application layer protocol analysis module which are sequentially connected, and the EtherCAT slave station is in communication connection with the EtherCAT master station. The EtherCAT bottom layer communication module is used for sending and receiving EtherCAT communication data frames, processing and analyzing the EtherCAT data frames according to protocol regulations and user configuration, and storing data required by the protocol to a storage memory corresponding to the communication module. The EtherCAT slave station application layer protocol module acquires data from a storage memory of the EtherCAT bottom layer communication module, performs analysis processing according to the slave station application layer protocol, and performs closed loop feedback after the processing. The application layer protocol comprises a custom communication protocol or an EtherCAT standard protocol. The self-defined communication data frame is an EtherCAT data frame compatible with the aerospace field and designed by the invention. The dual-redundancy system architecture is characterized in that a communication link consists of PHY _ A and PHY _ B, and the two links are redundant with each other, so that the reliability of system communication transmission is improved. Compared with the prior art, the embodiment has the following advantages: 1) high communication rate (100Mbit/s), full duplex communication; 2) the communication real-time performance is good; 3) the wiring between the devices is flexible, the EtherCAT supports various network topological structures, the wiring is simple, and the distance limitation is almost avoided; 4) the integrated frame isochronous communication technology is very suitable for the control field in the spacecraft, and can improve the control precision; 5) the dual redundancy system greatly improves the reliability of communication transmission; 6) and a self-defined communication data frame format is adopted, so that the compatibility of EtherCAT communication in the aerospace field is made up.
In this embodiment, the hardware portion of the EtherCAT master controller based on the DSP C6678 is composed of the DSP C6678, an ethernet controller EMAC, a PHY chip, an RJ-45 network interface, and a dual redundancy system, and the software portion is composed of a ucos ii real-time operating system, an EtherCAT open source master station library SOEM, a custom protocol module, and an ethernet device driver. The EtherCAT master station controller based on the DSP C6678 is a control core of the whole communication network and is responsible for sending EtherCAT frames of the control slave stations and receiving EtherCAT frames returned by the processing slave stations. The processing flow is that after the master station application layer finishes processing data, the data to be sent is transmitted into the SOEM or the custom protocol layer, then the data is transmitted to the EtherCAT Ethernet driver to be sent, and the processing flow is opposite when the data is received. The hardware part of the EtherCAT slave station controller based on the DSP F28335 is composed of the DSP F28335 and the FPGA, wherein the FPGA is integrated with two PHY interfaces and an IP-Core for processing an EtherCAT frame, and since the custom data frame is included in the EtherCAT data frame (refer to fig. 3), the slave station application layer can also parse the custom protocol data. The EtherCAT slave station controller based on the DSP F28335 is a control subsystem of the whole communication network and is responsible for receiving the EtherCAT frame sent by the master station and returning the EtherCAT frame of the slave station processing result. And the processing flow is that after the slave station application layer finishes processing the data, the data to be returned is transmitted into the IP-Core, then the data is returned to the master station, and the processing flow is opposite when the data is received. The dual redundancy system is characterized in that PHY _ A and PHY _ B are used to form two paths of PHY transmission hardware which are mutually backup and transmit the same frame of EtherCAT data frame, and if the slave station receives the same data of the two frames, one frame of the EtherCAT data frame is discarded through the slave station protocol. The protocol of discarding redundant data from the slave station can be controlled by frame counting in the EtherCAT protocol. If the same frame count is received a second time, the frame is discarded. The self-defined protocol is used as a supplement of an SOME protocol, the traditional SOME comprises CoE, FoE, EoE and other protocol protocols, wherein CoE is a motion control protocol for controlling servo, FoE is a file transmission protocol, EoE is an Ethernet frame transmission protocol, in order to adapt to communication among SOME devices in the aerospace field, the self-defined protocol is additionally used, protocol interactive contents are defined by a user, and the invention provides a data frame for transmitting self-defined data frames.
As shown in fig. 2, the custom data frame is compatible with the EtherCAT data frame, and the custom data segment is located in the data segment of the sub-packet in the EtherCAT data frame. The self-defined data segment is defined in detail as follows, and is divided into six fields and each field is endowed with significance, wherein the six fields comprise a message header HEAD, an effective data length LEN, a message sending sequence SEQ, a message unique ID number MSG _ ID, an effective data area PAYLOAD and a message check area CRC; determining the length of each field according to global application requirements, and configuring data content for each field to obtain first serial data; judging whether the received first serial data meets a preset receiving condition, specifically: judging whether the first serial data meets an HEAD value; if the first serial data meets the HEAD value, reading the content of LEN in the first serial data, and caching the content of the rest part; performing CRC (cyclic redundancy check) checksum calculation on the cached first serial data, and performing consistency comparison on the calculated checksum; if the consistency comparison of the checksums is consistent, whether the MSG _ ID meets the application requirement is judged; judging whether the MSG _ ID meets the global application requirement or not; if the MSG _ ID is judged to meet the global application requirement, whether the SEQ is updated or not is judged; judging whether SEQ is updated; if the received first serial data is judged to meet the preset receiving condition, executing a preset operation on the first serial data at a receiving end, specifically comprising: and if the SEQ is judged to be updated, executing the operation that the first serial data is valid at the receiving end.
In another embodiment of the present invention, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: the EtherCAT communication master station generates a target communication data frame according to the current telemetry instruction set and the EtherCAT communication protocol; the EtherCAT communication master station sequentially sends the target communication data frames to the EtherCAT communication slave station through a dual redundant communication channel; the EtherCAT communication slave station analyzes the target communication data frame to obtain a telemetering instruction matched with the EtherCAT communication slave station; the EtherCAT communication slave station executes the telemetry command and generates response data; and the EtherCAT communication slave station replaces the telemetry command in the target communication data frame with the response data to obtain a target response data frame, and sends the target response data frame to the EtherCAT communication master station.
In a further embodiment of the invention, a readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, realizes the following steps: the EtherCAT communication master station generates a target communication data frame according to the current telemetry instruction set and the EtherCAT communication protocol; the EtherCAT communication master station sequentially sends the target communication data frames to the EtherCAT communication slave station through a dual redundant communication channel; the EtherCAT communication slave station analyzes the target communication data frame to obtain a telemetering instruction matched with the EtherCAT communication slave station; the EtherCAT communication slave station executes the telemetry command and generates response data; and the EtherCAT communication slave station replaces the telemetry command in the target communication data frame with the response data to obtain a target response data frame, and sends the target response data frame to the EtherCAT communication master station.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Claims (10)
1. An arrow communication method is applied to an arrow communication system, the communication system comprises an EtherCAT communication master station and one or more EtherCAT communication slave stations, and the EtherCAT communication master station and the one or more EtherCAT communication slave stations are sequentially connected into a communication network, and the method comprises the following steps:
the EtherCAT communication master station generates a target communication data frame according to the current telemetry instruction set and the EtherCAT communication protocol;
the EtherCAT communication master station sequentially sends the target communication data frames to the EtherCAT communication slave station through a dual redundant communication channel;
the EtherCAT communication slave station analyzes the target communication data frame to obtain a telemetering instruction matched with the EtherCAT communication slave station;
the EtherCAT communication slave station executes the telemetry command and generates response data;
and the EtherCAT communication slave station replaces the telemetry command in the target communication data frame with the response data to obtain a target response data frame, and sends the target response data frame to the EtherCAT communication master station.
2. The method according to claim 1, wherein the target communication data frame comprises an ethernet frame header, an EtherCAT frame header, a frame check sequence, and EtherCAT data consisting of a plurality of sub-packets, each sub-packet comprising a sub-packet header, a custom data segment, and a count field.
3. The on-arrow communication method according to claim 2, wherein the sub-packet header includes a slave station address, a current packet number, a previous associated packet number, and a next associated packet number; the self-defined data segment comprises a message header, a message sending sequence, a data area and a check field.
4. The on-arrow communication method of claim 2, wherein when the EtherCAT communication slave stations are at least two and at least one of the EtherCAT communication slave stations is a monitoring slave station, and the dual redundant communication channels comprise a first communication channel and a second communication channel, the EtherCAT communication master station sequentially sends the target communication data frame to the EtherCAT communication slave stations through the dual redundant communication channels comprises:
the EtherCAT communication master station sends the target communication data frame to the monitoring slave station through the first communication channel or/and the second communication channel;
the monitoring slave station judges whether a frame check sequence in a currently received target communication data frame exists in a monitoring database;
and if the target communication data frame does not exist in the monitoring database, the monitoring slave station writes the frame check sequence in the target communication data frame into the monitoring database, and sequentially sends the target communication data frame to the rest EtherCAT communication slave stations.
5. The on-arrow communication method of claim 3, wherein the step of parsing the target communication data frame by the slave EtherCAT communication station to obtain the telemetry command matched with the slave EtherCAT communication station comprises the steps of:
the EtherCAT communication slave station acquires all sub-message headers in the target communication data frame;
the EtherCAT communication slave station judges whether the slave station address in each sub-message header is the same as the address of the local station;
and if the slave station address in the current sub-message header is the same as the address of the local station, the EtherCAT communication slave station acquires the data of the data area in the current sub-message and obtains the telemetering instruction matched with the EtherCAT communication slave station.
6. The on-arrow communication method of claim 5, wherein the EtherCAT communication slave station executing the telemetry instructions and generating response data comprises:
the EtherCAT communication slave station judges whether the number of the last associated message is empty;
when the number of the last associated message is not null and response data sent by the first target EtherCAT communication slave station is received, the EtherCAT communication slave station executes the telemetry command and generates response data;
the first target EtherCAT communication slave station is a matched EtherCAT communication slave station in a first target sub-message, the number of the sub-message of the first target sub-message is the number of the last associated message, and the response data is response data generated by the first target EtherCAT communication slave station executing the telemetry command in the first target sub-message.
7. The on-arrow communication method of claim 6, wherein after the EtherCAT communication slave station executes the telemetry instructions and generates response data, the method further comprises:
the EtherCAT communication slave station judges whether the serial number of the next associated message is empty;
when the next associated message number is not empty, the response data is sent to a second target EtherCAT communication slave station, and the second target EtherCAT communication slave station executes a matched telemetering instruction after receiving the response data;
and the second target EtherCAT communication slave station is the EtherCAT communication slave station matched with the second target sub-message, and the sub-message number of the second target sub-message is the next associated message number.
8. An on-arrow communication system, the system comprising:
the EtherCAT communication master station and the one or more EtherCAT communication slave stations are sequentially connected into a communication network;
the EtherCAT communication master station is used for generating a target communication data frame according to the current telemetry instruction set and the EtherCAT communication protocol and is also used for sequentially sending the target communication data frame to the EtherCAT communication slave station through a dual-redundancy communication channel;
the EtherCAT communication slave station is used for analyzing the target communication data frame to obtain a telemetering instruction matched with the EtherCAT communication slave station, executing the telemetering instruction to generate response data, replacing the telemetering instruction in the target communication data frame with the response data to obtain a target response data frame, and sending the target response data frame to the EtherCAT communication master station.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented by the processor when executing the computer program.
10. A readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111127568.6A CN114006950B (en) | 2021-09-26 | 2021-09-26 | Communication method, system, computer device and storage medium on arrow |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111127568.6A CN114006950B (en) | 2021-09-26 | 2021-09-26 | Communication method, system, computer device and storage medium on arrow |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114006950A true CN114006950A (en) | 2022-02-01 |
CN114006950B CN114006950B (en) | 2023-10-20 |
Family
ID=79921643
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111127568.6A Active CN114006950B (en) | 2021-09-26 | 2021-09-26 | Communication method, system, computer device and storage medium on arrow |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114006950B (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05211512A (en) * | 1990-10-29 | 1993-08-20 | Yaskawa Electric Corp | Communication system |
CN101917316A (en) * | 2010-09-13 | 2010-12-15 | 北京航空航天大学 | Communication method and device for high-speed real-time industrial Ethernet |
CN104702474A (en) * | 2015-03-11 | 2015-06-10 | 华中科技大学 | FPGA (Field Programmable Gate Array)-based EtherCAT (Ethernet Control Automation Technology) main station device |
CN105187283A (en) * | 2015-08-21 | 2015-12-23 | 中国科学院计算技术研究所 | Industrial control network slave station communication method and device based on EtherCAT protocol |
CN107276711A (en) * | 2017-07-21 | 2017-10-20 | 上海新时达机器人有限公司 | EtherCAT master station devices |
CN107347027A (en) * | 2017-06-08 | 2017-11-14 | 中国电子信息产业集团有限公司第六研究所 | A kind of link redundancy communication system based on EtherCAT |
WO2018188070A1 (en) * | 2017-04-14 | 2018-10-18 | 深圳配天智能技术研究院有限公司 | Conversion apparatus and control system |
CN110177013A (en) * | 2019-05-16 | 2019-08-27 | 浙江理工大学 | A kind of EtherCAT master-salve station design and implementation methods based on FPGA |
CN111901356A (en) * | 2020-08-05 | 2020-11-06 | 湖南能创科技有限责任公司 | Intelligent substation process layer network storm suppression method and device and electronic equipment |
CN113093658A (en) * | 2021-03-25 | 2021-07-09 | 中国科学院光电技术研究所 | Multi-axis servo system architecture design method based on EtherCAT |
-
2021
- 2021-09-26 CN CN202111127568.6A patent/CN114006950B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05211512A (en) * | 1990-10-29 | 1993-08-20 | Yaskawa Electric Corp | Communication system |
CN101917316A (en) * | 2010-09-13 | 2010-12-15 | 北京航空航天大学 | Communication method and device for high-speed real-time industrial Ethernet |
CN104702474A (en) * | 2015-03-11 | 2015-06-10 | 华中科技大学 | FPGA (Field Programmable Gate Array)-based EtherCAT (Ethernet Control Automation Technology) main station device |
CN105187283A (en) * | 2015-08-21 | 2015-12-23 | 中国科学院计算技术研究所 | Industrial control network slave station communication method and device based on EtherCAT protocol |
WO2018188070A1 (en) * | 2017-04-14 | 2018-10-18 | 深圳配天智能技术研究院有限公司 | Conversion apparatus and control system |
CN107347027A (en) * | 2017-06-08 | 2017-11-14 | 中国电子信息产业集团有限公司第六研究所 | A kind of link redundancy communication system based on EtherCAT |
CN107276711A (en) * | 2017-07-21 | 2017-10-20 | 上海新时达机器人有限公司 | EtherCAT master station devices |
CN110177013A (en) * | 2019-05-16 | 2019-08-27 | 浙江理工大学 | A kind of EtherCAT master-salve station design and implementation methods based on FPGA |
CN111901356A (en) * | 2020-08-05 | 2020-11-06 | 湖南能创科技有限责任公司 | Intelligent substation process layer network storm suppression method and device and electronic equipment |
CN113093658A (en) * | 2021-03-25 | 2021-07-09 | 中国科学院光电技术研究所 | Multi-axis servo system architecture design method based on EtherCAT |
Also Published As
Publication number | Publication date |
---|---|
CN114006950B (en) | 2023-10-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105991462B (en) | Sending method, sending device and the system of transmission control protocol TCP data packet | |
EP3840311B1 (en) | Traffic scheduling method, device, and system | |
US5924112A (en) | Bridge device | |
CN110505123B (en) | Packet loss rate calculation method, server and computer-readable storage medium | |
US20150124839A1 (en) | Method of Packaging and Unpackaging Packet and Appartuses Using the Same | |
CN108848025B (en) | Data processing method, intelligent gateway and Internet of things system | |
CN112104538B (en) | DDS middleware communication method based on CAN bus data transmission | |
US9515940B2 (en) | Method for transmitting data in a packet-oriented communications network and correspondingly configured user terminal in said communications network | |
CN101305583A (en) | Session relay device and session relay method | |
EP1032165A1 (en) | Method of assembling segmented frames of data transmitted over a backbone | |
CN101488912A (en) | Method and apparatus for IP fragmentation | |
CN111756861A (en) | System for realizing internal and external network data exchange based on configuration file | |
CN112738229B (en) | Communication method for realizing automatic data continuous transmission | |
US10230656B2 (en) | Method and apparatus for controlling message over heterogeneous network | |
CN115766860A (en) | Data transmission method, TSN node and computer readable storage medium | |
CN113079074A (en) | Protocol stack communication method, device and storage medium based on CAN bus | |
CN115022205A (en) | Cross-network data transmission method applied to high-concurrency scene of massive terminals | |
US7853706B2 (en) | Method, interface and network for cyclical sending of Ethernet telegrams | |
AU2020310454B2 (en) | Method and data network for communicating data content, in particular in an elevator system | |
CN114006950A (en) | On-arrow communication method, system, computer device and storage medium | |
JP3791265B2 (en) | Management station, node, and processing method in node | |
US7010548B2 (en) | Sparse and non-sparse data management method and system | |
CN115080080A (en) | Device, system and method for firmware upgrading of multi-path CANopen network | |
CN109005200B (en) | Hidden file transmission method under WiFi physical isolation environment | |
CN114124611B (en) | Vehicle data transmission method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |