| Intelligent manufacturing promotes the development of industrial control system to the direction of digitization and networking.High-speed and high-real-time EtherCAT field bus is widely used in various fields of industrial control systems.The continuous improvement of the level of industrial automation has put forward higher requirements for the easy operation and development agility of industrial control system.Embedded system with high cost performance and short development cycle has been gradually applied in the field of industrial control.This paper aims to develop a set of EtherCAT communication system for servo-driven field data transmission.The communication system consists of an EtherCAT master station based on embedded platform and EtherCAT slave station based on ZYNQ on-chip system.The main research contents of this paper are as follows:Firstly,this paper analyzes the message structure,addressing mode and distributed clock principle of EtherCAT communication protocol in detail.Combined with the requirements,the overall design of EtherCAT bus communication scheme was proposed,including the selection of master hardware core,master protocol stack,slave protocol processing chip and process data interface.Secondly,the SOEM open source protocol stack was proposed to realize the function development of EtherCAT,and the SOEM protocol stack was transplanted to the ARM platform.Aiming at the real-time problem of embedded platform,this paper proposes a method to optimize the real-time performance of embedded master station by using Pend SV exception transaction.By using the characteristics of Pend SV’s deferred execution,it can not only not affect the trigger of other important interrupts,but also make the priority of the program with the highest real-time requirement in Pend SV interrupt higher than the ordinary function.Thus,the real-time optimization of the specific program is realized.Then,the slave implementation based on ZYNQ7020 processor and AX58100 protocol processing chip is proposed.The ZYNQ7020 includes ARM and FPGA cores,which takes full advantage of the powerful floating point operation ability of ARM core and the parallel computing ability of FPGA core,and can process a large amount of data faster than traditional processors.Fpgas can process input data in real time,which is a great advantage in applications that require real-time responses.The requirement of high speed and real time communication is realized.Finally,an experimental test platform was built to test the function,performance and multi-slave station control of the master station.The protocol function,data accuracy and real-time performance of the slave station were tested.The experimental results show that the EtherCAT communication system designed in this paper not only realizes a relatively complete function,but also has good real-time performance. |