CN114006950B - Communication method, system, computer device and storage medium on arrow - Google Patents
Communication method, system, computer device and storage medium on arrow Download PDFInfo
- Publication number
- CN114006950B CN114006950B CN202111127568.6A CN202111127568A CN114006950B CN 114006950 B CN114006950 B CN 114006950B CN 202111127568 A CN202111127568 A CN 202111127568A CN 114006950 B CN114006950 B CN 114006950B
- Authority
- CN
- China
- Prior art keywords
- communication
- ethercat
- slave station
- target
- 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.)
- Active
Links
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 application provides an arrow communication method, an arrow communication 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 telemetry instruction set and the EtherCAT communication protocol; the EtherCAT communication master station sequentially transmits the target communication data frames to the EtherCAT communication slave station through a dual-redundancy communication channel; the EtherCAT communication slave station analyzes the target communication data frame to obtain a telemetry instruction matched with the EtherCAT communication slave station; the EtherCAT communication slave station executes the telemetry instruction and generates response data; the EtherCAT communication slave station replaces a telemetry instruction 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 application solves the problems of low transmission rate and small transmission data volume in the communication on the arrow in the prior art, and improves the transmission rate and the transmission data volume.
Description
Technical Field
The application relates to the technical field of communication on an arrow, in particular to a communication method, a communication system on an arrow, computer equipment and a storage medium.
Background
In the field of aerospace, along with the rapid progress of national defense aerospace technology, an arrow control system topology structure is gradually developed into a control system between multiple devices and multiple platforms from single control, and in order to meet the data communication system between spacecraft with complex topology structures, higher requirements are put on the diversity, reliability, instantaneity and high-speed transmission of data. However, the traditional field buses in the aerospace field, such as 1553B, RS485, RS232, CAN and the like, have the defects of high cost, low transmission rate, small transmission data volume, low rate required for long-distance transmission and the like.
Therefore, the on-arrow communication in the prior art has the problems of low transmission rate, small transmission data volume and the like.
Disclosure of Invention
Aiming at the defects existing in the prior art, the on-arrow communication method, the system, the computer equipment and the storage medium provided by the application solve the problems of low transmission rate and small transmission data volume in the on-arrow communication in the prior art, and a plurality of EtherCAT sub-messages are integrated in a data frame by adopting a lumped frame method, and one data frame can contain a plurality of sub-messages, so that the transmission rate and the transmission data volume are improved.
In a first aspect, the present application provides an on-arrow communication method, applied to an on-arrow communication system, where the communication system includes an EtherCAT communication master station and one or more EtherCAT communication slave stations, where 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 transmits the target communication data frames to the EtherCAT communication slave station through a dual-redundancy communication channel; the EtherCAT communication slave station analyzes the target communication data frame to obtain a telemetry instruction matched with the EtherCAT communication slave station; the EtherCAT communication slave station executes the telemetry instruction and generates response data; and the EtherCAT communication slave station replaces a telemetry instruction 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-messages, each sub-message includes a sub-message header, a custom data segment, and a count field.
Optionally, the sub-message header includes a slave station address, a current message number, a last associated message number and a next associated message number; the custom 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 them is an listening slave station, and the dual redundancy communication channel includes a first communication channel and a second communication channel, the EtherCAT communication master station sequentially transmitting the target communication data frame to the EtherCAT communication slave stations through the dual redundancy communication channel includes: the EtherCAT communication master station transmits 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 or not; 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 EtherCAT communication slave station parses the target communication data frame to obtain a telemetry instruction matched with the EtherCAT communication slave station, including: the EtherCAT communication slave station acquires all sub-message heads 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 own station address; and if the address of the slave station in the current sub-message head is the same as the address of the slave station, the EtherCAT communication slave station acquires the data of the data area in the current sub-message to obtain a telemetry instruction matched with the EtherCAT communication slave station.
Optionally, the EtherCAT communication slave station executes the telemetry instruction and generates response data, including: the EtherCAT communication slave station judges whether the last associated message number is empty or not; when the last associated message number is not null and response data sent by a first target EtherCAT communication slave station is received, the EtherCAT communication slave station executes the telemetry instruction and generates response data; the first target EtherCAT communication slave station is an EtherCAT communication slave station matched with a first target sub-message, the sub-message number of the first target sub-message is the last associated message number, and the response data are generated by the first target EtherCAT communication slave station executing a telemetry instruction 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 number of the next associated message is empty or not; when the number of the next associated message is not empty, the response data is sent to a second target EtherCAT communication slave station, so that the second target EtherCAT communication slave station receives the response data and then executes a matched telemetry instruction; the second target EtherCAT communication slave station is an EtherCAT communication slave station matched in a 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: one or more EtherCAT communication slave stations of EtherCAT communication master station, said EtherCAT communication master station and said one or more EtherCAT communication slave stations connect sequentially into the communication network; the EtherCAT communication master station is used for generating a target communication data frame according to a current telemetry instruction set and an EtherCAT communication protocol, and is also used for sequentially transmitting 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 telemetry instruction matched with the EtherCAT communication slave station, executing the telemetry instruction and generating response data, replacing the telemetry instruction in the target communication data frame with the response data to obtain a target response data frame, and transmitting 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 transmits the target communication data frames to the EtherCAT communication slave station through a dual-redundancy communication channel; the EtherCAT communication slave station analyzes the target communication data frame to obtain a telemetry instruction matched with the EtherCAT communication slave station; the EtherCAT communication slave station executes the telemetry instruction and generates response data; and the EtherCAT communication slave station replaces a telemetry instruction 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 performs 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 transmits the target communication data frames to the EtherCAT communication slave station through a dual-redundancy communication channel; the EtherCAT communication slave station analyzes the target communication data frame to obtain a telemetry instruction matched with the EtherCAT communication slave station; the EtherCAT communication slave station executes the telemetry instruction and generates response data; and the EtherCAT communication slave station replaces a telemetry instruction 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 application has the beneficial effects that:
the application generates the self-defined communication data frame format based on the EtherCAT communication protocol, thereby improving the compatibility of EtherCAT communication in the aerospace field; a plurality of EtherCAT sub-messages are integrated in a data frame by adopting a lumped frame method, and one data frame can contain a plurality of sub-messages, so that the transmission rate and the transmission data quantity are improved; the reliability of communication transmission is improved by the dual redundant communication channels.
Drawings
Fig. 1 is a schematic flow chart of an on-arrow communication method according to an embodiment of the present application;
fig. 2 shows a frame structure of a target communication data frame according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an on-arrow communication system according to an embodiment of the present application;
fig. 4 is an application scenario diagram of an on-arrow communication system according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Fig. 1 is a schematic flow chart of an on-arrow communication method according to an embodiment of the present application; as shown in fig. 1, the method is applied to an on-arrow communication system, the communication system comprises 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 into a communication network, and the on-arrow communication method specifically comprises the following steps:
and step S101, 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 protocol is based on ethernet, and transmits standard ethernet data frames. Each data frame sent by the EtherCAT master passes through all nodes, and during the downstream transmission of the data frame, each node reads the data addressed to that node and writes its feedback data into the data frame. This transmission improves bandwidth utilization such that one data frame per cycle is typically sufficient to enable data communication, while the network no longer requires the use of switches and hubs. The transmission delay of a data frame depends only on the hardware transmission delay, and when the last node on a certain network segment or branch detects an open port (no next slave station), the full duplex characteristic of the ethernet technology is used to return the message to the master station.
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 last associated message number and a next associated message number; the custom 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, data type and reserved bits. In this embodiment, the sub-packet structure in the EtherCAT communication protocol standard data frame is customized to obtain the target communication data frame, and each telemetry instruction is encapsulated into the data area in each sub-packet.
And step S102, the EtherCAT communication master station sequentially transmits the target communication data frames to the EtherCAT communication slave station through a dual-redundancy communication channel.
In this embodiment, when the EtherCAT communication slave stations are at least two and at least one of them is a listening slave station, and the dual redundancy communication channel includes a first communication channel and a second communication channel, the EtherCAT communication master station sequentially transmitting the target communication data frame to the EtherCAT communication slave stations through the dual redundancy communication channel includes: the EtherCAT communication master station transmits 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 or not; 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 of the communication system, the embodiment adopts dual redundancy communication channels for communication, as shown in fig. 3, phy_a and phy_b are a first communication channel and a second communication channel, and a slave station 1 connected with an EtherCAT communication master station through the first communication channel and the second communication channel is used as the listening slave station, where the listening slave station has a screening function of the same target communication data frame besides a function of the EtherCAT communication slave station, and the specific screening steps include: 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 the monitoring database, when the frame check sequence exists in the monitoring database, 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 a frame check sequence in the current frame into the monitoring database, analyzing the target communication data frame, and sequentially sending the target communication data frame to other communication slave stations; when the EtherCAT communication master station transmits 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 telemetry instruction matched with the EtherCAT communication slave station.
In this embodiment, the EtherCAT communication slave station parses the target communication data frame to obtain a telemetry instruction matched with the EtherCAT communication slave station, including: the EtherCAT communication slave station acquires all sub-message heads 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 own station address; and if the address of the slave station in the current sub-message head is the same as the address of the slave station, the EtherCAT communication slave station acquires the data of the data area in the current sub-message to obtain a telemetry instruction matched with the EtherCAT communication slave station.
If the address of the slave station in the current sub-message header is different from the address of the slave station, the EtherCAT communication slave station discards the data in the data area in the current sub-message, and continues to judge the address of the slave station in the next sub-message header, and loops in turn until all the sub-messages in the target communication data frame are traversed.
And step S104, the EtherCAT communication slave station executes the telemetry instruction and generates response data.
In this embodiment, the EtherCAT communication slave station executes the telemetry instruction and generates response data, including: the EtherCAT communication slave station judges whether the last associated message number is empty or not; when the last associated message number is not null and response data sent by a first target EtherCAT communication slave station is received, the EtherCAT communication slave station executes the telemetry instruction and generates response data; the first target EtherCAT communication slave station is an EtherCAT communication slave station matched with a first target sub-message, the sub-message number of the first target sub-message is the last associated message number, and the response data are generated by the first target EtherCAT communication slave station executing a telemetry instruction 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 number of the next associated message is empty or not; when the number of the next associated message is not empty, the response data is sent to a second target EtherCAT communication slave station, so that the second target EtherCAT communication slave station receives the response data and then executes a matched telemetry instruction; the second target EtherCAT communication slave station is an EtherCAT communication slave station matched in a 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 finishes executing the first telemetry instruction, the slave station 2 re-instructs the second telemetry instruction, and in this embodiment, each sub-packet header is set with a current packet number, a last association packet number and a next association packet number field, so as to associate the execution sequence of the instructions of each EtherCAT communication slave station, and the specific judging 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 a first target EtherCAT communication slave station is received, executing the telemetry instruction by the EtherCAT communication slave station and generating the response data, and when the next associated message number is not empty, sending the response data to a second target EtherCAT communication slave station, so that the second target EtherCAT communication slave station receives the response data and then executes the matched telemetry instruction.
And step S105, the EtherCAT communication slave station replaces the telemetry instruction 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 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 redundancy communication channel, so as to implement closed loop feedback of communication data.
Compared with the prior art, the application has the beneficial effects that:
the application generates the self-defined communication data frame format based on the EtherCAT communication protocol, thereby improving the compatibility of EtherCAT communication in the aerospace field; a plurality of EtherCAT sub-messages are integrated in a data frame by adopting a lumped frame method, and one data frame can contain a plurality of sub-messages, so that the transmission rate and the transmission data quantity are improved; the reliability of communication transmission is improved by the dual redundant communication channels.
As shown in fig. 3, the present embodiment provides an on-arrow communication system, which includes: one or more EtherCAT communication slave stations of EtherCAT communication master station, said EtherCAT communication master station and said one or more EtherCAT communication slave stations connect sequentially into the communication network; the EtherCAT communication master station is used for generating a target communication data frame according to a current telemetry instruction set and an EtherCAT communication protocol, and is also used for sequentially transmitting 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 telemetry instruction matched with the EtherCAT communication slave station, executing the telemetry instruction and generating response data, replacing the telemetry instruction in the target communication data frame with the response data to obtain a target response data frame, and transmitting 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, and the EtherCAT communication slave station is a slave station based on DSP F28335 and FPGA, and a ruggedized 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 driving module and an EtherCAT master station application layer protocol module. According to standard and custom communication protocol, sending EtherCAT protocol frame, sending control command to slave station and receiving information fed back by slave station, and processing according to information fed back by slave station to form closed loop control processing. The EtherCAT Ethernet driving module is used for sending and receiving data with EtherCAT communication data frame format. The EtherCAT master station application layer protocol module consists of a real-time operating system UcosII, an open source master station library SOME and a custom protocol, obtains EtherCAT data from the EtherCAT Ethernet driving module, then analyzes and processes according to the master station application layer protocol, and then performs closed loop feedback 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 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 into a storage memory corresponding to the communication module. And the EtherCAT slave station application layer protocol module acquires data from the storage memory of the EtherCAT bottom layer communication module, analyzes the data according to the slave station application layer protocol, and performs closed loop feedback after the data are processed. The application layer protocol comprises a custom communication protocol or an EtherCAT standard protocol. The custom communication data frame is an EtherCAT data frame compatible with the aerospace field and designed by the application. The dual redundancy system architecture refers to a communication link consisting of PHY_A and PHY_B, wherein the two links are mutually redundant, 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 (100 Mbit/s), full duplex communication; 2) The communication instantaneity is good; 3) The wiring between devices is flexible, etherCAT supports various network topological structures, the wiring is simple, and the distance limitation is almost avoided; 4) The lumped frame isochronous bit technique is very suitable for the control field in the spacecraft, can improve the control accuracy; 5) The dual redundancy system greatly improves the reliability of communication transmission; 6) The custom 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 part of the EtherCAT master station controller based on the DSP C6678 is composed of the DSP C6678, the ethernet controller EMAC, the PHY chip, the RJ-45 network interface and the dual redundancy system, and the software part is composed of the UcosII real-time operating system, the EtherCAT open source master station library SOEM, the custom protocol module and the 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 application layer of the master station processes the data, the data to be sent is transmitted to the SOEM or the custom protocol layer, then the data is sent 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 consists of the DSP F28335 and an FPGA, wherein two paths of PHY interfaces and an IP-Core for processing EtherCAT frames are integrated in the FPGA, and the custom data frames are contained in the EtherCAT data frames (refer to figure 3), so that the slave station application layer can also analyze 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 EtherCAT frames sent by a master station and EtherCAT frames returning processing results of the slave stations. The processing flow is that after the application layer of the slave station processes 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 double redundancy system is characterized in that two paths of PHY transmission hardware are formed by using PHY_A and PHY_B, the two paths of PHY transmission hardware are mutually backed up, the same frame of EtherCAT data frame is transmitted, and if a slave station receives the same data of the two frames, one frame is discarded through a slave station protocol. The protocol in which the slave discards redundant data can be controlled by the frame count in the EtherCAT protocol. If the same frame count is received a second time, the frame is discarded. The custom protocol is used as a supplement to the 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, and in order to adapt to communication among SOME devices in the aerospace field, the custom protocol is additionally used, protocol interaction content is defined by a user, and the application provides a custom data frame transmission method.
As shown in fig. 2, the custom data frame is compatible with the EtherCAT data frame, and the custom data segment is a data segment of a sub-packet in the EtherCAT data frame. The custom data segment is defined in detail as follows, the custom data segment is divided into six fields and is endowed with meaning to each field, wherein the six fields comprise a message header, 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 the global application requirement, and configuring data content for each field to obtain first serial data; judging whether the received first serial data meets the preset receiving condition or not, specifically: judging whether the first serial data meets a HEAD value or not; 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 checksum calculation on the buffered first serial data, and performing consistency comparison on the calculated checksum; if the consistency comparison of the checksums is consistent, judging whether the MSG_ID meets the application requirement; judging whether MSG_ID meets global application requirements; if the MSG_ID meets the global application requirement, judging whether SEQ is updated or not; judging whether SEQ is updated or not; if the received first serial data meets the preset receiving condition, executing preset operation on the first serial data at the receiving end, wherein the preset operation specifically comprises the following steps: 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 application, 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 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 transmits the target communication data frames to the EtherCAT communication slave station through a dual-redundancy communication channel; the EtherCAT communication slave station analyzes the target communication data frame to obtain a telemetry instruction matched with the EtherCAT communication slave station; the EtherCAT communication slave station executes the telemetry instruction and generates response data; and the EtherCAT communication slave station replaces a telemetry instruction 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 yet another embodiment of the present application, there is provided a readable storage medium having stored thereon a computer program which when executed by a processor performs 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 transmits the target communication data frames to the EtherCAT communication slave station through a dual-redundancy communication channel; the EtherCAT communication slave station analyzes the target communication data frame to obtain a telemetry instruction matched with the EtherCAT communication slave station; the EtherCAT communication slave station executes the telemetry instruction and generates response data; and the EtherCAT communication slave station replaces a telemetry instruction 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.
Those skilled in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a non-volatile computer readable storage medium, and where the program, when executed, may include processes in the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile 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), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It should be noted that in this document, relational terms such as "first" and "second" and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Claims (7)
1. The communication method on the arrow is characterized by being applied to a communication system on the arrow, wherein the communication system comprises an EtherCAT communication master station, at least one monitoring slave station and at least one EtherCAT communication slave station, the EtherCAT communication master station and the at least one monitoring slave station are sequentially connected into a communication network, and the at least one monitoring slave station comprises the function of the EtherCAT communication slave station and the screening function with the same target communication data frame; 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 target communication data frame comprises EtherCAT data consisting of a plurality of sub-messages, each sub-message comprises a sub-message header, and the sub-message header comprises a slave station address, a current message number, a last associated message number and a next associated message number;
the EtherCAT communication master station transmits the target communication data frame to the monitoring slave station through a first communication channel or/and a 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 or not; 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; wherein the first communication channel and the second communication channel form a dual redundancy communication channel;
the EtherCAT communication slave station analyzes the target communication data frame to obtain a telemetry instruction matched with the EtherCAT communication slave station;
the EtherCAT communication slave station judges whether the last associated message number is empty or not; when the last associated message number is not null and response data sent by a first target EtherCAT communication slave station is received, the EtherCAT communication slave station executes the telemetry instruction and generates response data; the first target EtherCAT communication slave station is an EtherCAT communication slave station matched with a first target sub-message, the sub-message number of the first target sub-message is the last associated message number, and the response data are generated by the first target EtherCAT communication slave station executing a telemetry instruction in the first target sub-message;
the EtherCAT communication slave station judges whether the number of the next associated message is empty or not; when the number of the next associated message is not empty, the response data is sent to a second target EtherCAT communication slave station, so that the second target EtherCAT communication slave station receives the response data and then executes a matched telemetry instruction; the second target EtherCAT communication slave station is an 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;
and the EtherCAT communication slave station replaces a telemetry instruction 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 of on-arrow communication of claim 1, wherein the target communication data frame further comprises an ethernet frame header, an EtherCAT frame header, a frame check sequence, each sub-message further comprising a custom data segment and a count field.
3. The arrow-based communication method of claim 2, wherein the custom data segment includes a message header, a message transmission sequence, a data field, and a check field.
4. The arrow communication method according to claim 3, wherein the EtherCAT communication slave station parses the target communication data frame to obtain a telemetry command matched with the EtherCAT communication slave station, and the method comprises:
the EtherCAT communication slave station acquires all sub-message heads 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 own station address;
and if the address of the slave station in the current sub-message head is the same as the address of the slave station, the EtherCAT communication slave station acquires the data of the data area in the current sub-message to obtain a telemetry instruction matched with the EtherCAT communication slave station.
5. An on-arrow communication system implementing the on-arrow communication method of claim 1, the system comprising:
one or more EtherCAT communication slave stations of EtherCAT communication master station, said EtherCAT communication master station and said one or more EtherCAT communication slave stations connect sequentially into the communication network;
the EtherCAT communication master station is used for generating a target communication data frame according to a current telemetry instruction set and an EtherCAT communication protocol, and is also used for sequentially transmitting 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 telemetry instruction matched with the EtherCAT communication slave station, executing the telemetry instruction and generating response data, replacing the telemetry instruction in the target communication data frame with the response data to obtain a target response data frame, and transmitting the target response data frame to the EtherCAT communication master station.
6. 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 processor implements the steps of the method of any one of claims 1 to 4 when the computer program is executed.
7. A readable storage medium having stored thereon a computer program, characterized in that the computer program, when executed by a processor, realizes the steps of the method of any of claims 1 to 4.
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 CN114006950A (en) | 2022-02-01 |
CN114006950B true 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 |
---|---|
CN114006950A (en) | 2022-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105991462B (en) | Sending method, sending device and the system of transmission control protocol TCP data packet | |
CN112104538B (en) | DDS middleware communication method based on CAN bus data transmission | |
CN113452591B (en) | Loop control method and device based on CAN bus continuous data frame | |
US20170134299A1 (en) | Method and apparatus for controlling message over heterogeneous network | |
CN101667959B (en) | Method and device for transmitting data in physical layer and data transmission system | |
CN111245831B (en) | FTP data transmission method and device, and information interaction system of server and client | |
CN114006950B (en) | Communication method, system, computer device and storage medium on arrow | |
CN112769939A (en) | Big data reliable transmission method for real-time communication | |
CN113676386B (en) | FC-AE-1553 bus protocol message communication system | |
CN110798479A (en) | Interoperation device and method for dynamically reconfigurable high-speed serial bus and Ethernet | |
US20220234865A1 (en) | Method and data network for communicating data content, in particular in an elevator system | |
JP3791265B2 (en) | Management station, node, and processing method in node | |
CN111614741A (en) | Multi-robot communication method and device based on ROS system | |
CN116827854A (en) | Vehicle-mounted communication system and method based on redundant information feedback | |
CN115080080A (en) | Device, system and method for firmware upgrading of multi-path CANopen network | |
WO2005006123A2 (en) | Sparse and non-sparse data management method and system | |
CN112019491B (en) | Message processing method and system | |
CN106385418B (en) | A kind of method and device for transmitting private data | |
CN114124611B (en) | Vehicle data transmission method and device | |
JP5320571B2 (en) | Internode data response system | |
CN112134773B (en) | MVB bus redundancy communication method and device | |
CN117909098A (en) | Data transmission method and device | |
CN109005200B (en) | Hidden file transmission method under WiFi physical isolation environment | |
KR100260900B1 (en) | Segmentation apparatus and method in atm communication system | |
CN114650194B (en) | Data communication method, device, electronic equipment and storage medium |
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 |