PLC simulation training system based on EtherCAT
By developing a PLC simulation training system based on EtherCAT, the problems of expensive and limited resources of traditional PLC training and teaching equipment are solved, and an efficient real-time communication and intuitive learning platform is realized, and students' practical operation ability and engineering literacy are improved.
Patent Information
- Application Number
- CN202411651548.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-02-18
AI Technical Summary
Traditional PLC training teaching is difficult to provide sufficient practical opportunities due to expensive equipment, complex maintenance and limited resources, which limits the improvement of teaching quality and students' engineering literacy.
Develop a PLC simulation training system based on EtherCAT. Through the virtualized experimental hardware platform, IgH EtherCAT Master and EtherCAT Slave Stack Code realize real-time communication between master and slave stations, and combine it with the OpenPLC environment for programming and simulation.
It realizes efficient real-time communication, reduces dependence on physical hardware, reduces teaching costs, provides an intuitive learning platform, and improves students' practical operation ability and engineering literacy.
Smart Images

Figure CN119472339A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of numerical control, and in particular relates to a PLC simulation training system based on EtherCAT. Background Art
[0002] With the rapid development of industrial automation, PLC (Programmable Logic Controller), as the core control equipment in the production process, plays an important role in the fields of manufacturing, energy, building automation, etc. In order to meet the industrial demand for efficient and stable control systems, enterprises need to cultivate engineering and technical personnel with practical operation and problem-solving capabilities. However, traditional PLC practical training teaching is difficult to provide sufficient practical opportunities due to expensive equipment, complex maintenance and limited resources, which limits the teaching quality and the improvement of students' engineering literacy. For this reason, the development of a digital simulation training system has become an effective way to improve the quality of practical training. Summary of the invention
[0003] In order to solve the above problems, the present invention provides a PLC simulation training system based on EtherCAT.
[0004] The technical solution of the present invention is implemented as follows: a PLC simulation training system based on EtherCAT, including an IgH EtherCAT Master module, an EtherCAT Slave Stack Code module, and a virtualized experimental hardware platform; the experimental platform includes a Linux system 1 and a Windows system 2, and uses a network card to achieve real-time communication, including the following steps: Step 1: Configure the Linux system master in the virtualized environment, install IgH EtherCAT Master, and implement the EtherCAT master function; Step 2: Configure the EtherCAT Slave Stack Code on the Windows system so that the slave supports real-time data exchange; Step 3: Connect the master station and the slave station through the FC1100 network card to establish a stable real-time communication channel; Step 4: Write and upload the PLC control program to the master station in the OpenPLC environment; Step 5: Perform data transmission test between the master station and the slave station to verify the real-time performance of the I / O signal and the system stability; Step 6: Simulate the actual industrial scenario in the simulation environment and complete the control test; Preferably, in step 1, the Linux system needs to perform a kernel real-time patch update to ensure the stability and accuracy of low-latency data transmission; Preferably, in step 2, the slave module of the Windows system uses EtherCAT Slave Stack Code to define I / O variables with the master station to ensure real-time communication between the master and slave stations; Preferably, in step 6, real-time simulation of the PLC control program is performed through the OpenPLC environment, including: a. Simulate industrial applications such as robot arm movement and equipment state switching; b. Real-time monitoring of I / O point feedback information to ensure the accuracy and real-time nature of data interaction; c. Use a graphical interface to record the simulation process and generate communication logs to facilitate system maintenance and performance analysis; Preferably, the configuration steps of the master station include: Download the IgH EtherCAT Master source code from the official website, install the Linux system real-time patch, compile and load the EtherCAT master module; Configure the EtherCAT master network parameters so that it can recognize and communicate with the FC1100 network card; Run the master application to send and receive data frames to achieve real-time data transmission; Preferably, the configuration step of the slave station includes: Download and install the EtherCAT Slave Stack Code and configure it to support the Windows platform; define the slave I / O variables according to the communication requirements and map them to the actual simulation application; Connect the master and slave and confirm that they exchange real-time data via PDO (Process Data Object).
[0005] The beneficial effects of the present invention are: 1. Efficient real-time communication. The present invention adopts the EtherCAT protocol and utilizes the IgH EtherCAT Master and EtherCAT Slave Stack Code to achieve real-time communication between the master and the slave, ensuring low latency and high stability of data transmission, effectively improving the system response speed, and meeting the high real-time requirements of industrial automation training.
[0006] 2. Intuitive learning platform. Through OpenPLC programming and simulation, students can intuitively observe the execution process of PLC programs, understand the working principle of PLC and the application of EtherCAT protocol, and improve students' practical operation ability.
[0007] 3. This EtherCAT-based training environment reduces the dependence on physical hardware while ensuring real-time performance, greatly reducing teaching costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 It is a module flow chart of the method of the present invention; Figure 2 This is a schematic diagram of the EtherCAT operating principle of the present invention; Figure 3 It is a schematic diagram of the experimental simulation animation of the present invention. DETAILED DESCRIPTION
[0009] The present invention will be further described in detail below in conjunction with the accompanying drawings.
[0010] like Figure 1 As shown, the present invention comprises the following steps: The following steps are involved: Through virtualization technology, two virtualization systems are created; Configure the Linux system and install IgH EtherCAT Master to realize the EtherCAT master function; Install EtherCAT Slave Stack Code on Windows system and configure it as a slave; Use FC1100 network card to connect the master station and slave station to establish stable real-time communication; Write the PLC control program in the OpenPLC programming environment and upload it to the master station; Perform data transmission tests between the master and slave stations to verify real-time I / O signal interaction and system stability; Simulate actual industrial scenarios to meet practical training needs, including robot arm movement, equipment status changes and process flow simulation to complete simulation testing.
[0011] The configuration steps of the master station include: Download the IgH EtherCAT Master source code from the official website, install the Linux system real-time patch, compile and load the EtherCAT master module; Configure the EtherCAT master network parameters so that it can recognize and communicate with the FC1100 network card; Run the master application to send and receive data frames to achieve real-time data transmission.
[0012] The configuration steps of the slave station include: Download and install the EtherCAT Slave Stack Code and configure it to support the Windows platform; define the slave I / O variables according to the communication requirements and map them to the actual simulation application; Connect the master and slave and confirm that they exchange real-time data via PDO (Process Data Object).
[0013] The simulation scenarios of the system include: Define a series of operations in the PLC control program, such as robot movement and status.
[0014] Real-time monitoring of feedback from each I / O point in master-slave communication to verify the real-time and accuracy of data transmission; Use the graphical interface to observe the simulation operation results and generate log files to record the communication and execution process.
[0015] The system initialization module creates Linux and Windows virtual systems on the virtualization host, which are used to configure the EtherCAT master and slave, respectively. The system runs the IgH EtherCATMaster protocol stack through the Linux system generated by the virtualization layer to implement the master station settings; the Windows system configures the EtherCAT Slave Stack Code to build the slave station configuration. The Linux and Windows systems achieve real-time communication connection through the network card to complete the communication establishment.
[0016] like Figure 2 The EtherCAT shown in the figure adopts a master-slave structure, in which a master station (Master) is responsible for controlling and synchronizing the slave stations (Slave) in the network. The master station sends control commands and data, and the slave station receives and executes these commands. In a communication cycle, the master station sends Ethernet data frames to each slave station. After the data frame arrives at the slave station, each slave station extracts the corresponding data from the data frame according to the addressing, and writes its feedback data into the data frame. When the data frame is sent to the last slave station, it returns and returns to the master station through the first slave station. It not only meets the data communication requirements, but also has advantages in real-time, reliability and stability that traditional field buses cannot match. The simulation control flow module uses the real-time feedback loop executed by the PLC control logic to achieve timely feedback of all input and output signals. While ensuring real-time feedback, the module recursively executes the PLC control logic to continuously update the simulation status. Figure 3 As shown in the simulation animation, through the real-time I / O point feedback, the PLC simulation animation accurately reflects the position changes and state changes of each point, verifying the efficient communication between the master station and the slave station.
[0017] System testing and verification uses methods such as delay testing and transmission rate checking to evaluate the real-time performance and stability of communications, ensuring that data transmission between master and slave stations meets real-time simulation requirements.
[0018] The system end module includes the operations of communication shutdown and system shutdown. It ensures the safety and stability of the simulation system by safely shutting down the EtherCAT master-slave communication.
[0019] EtherCAT (Ethernet for Control Automation Technology) is an efficient real-time industrial Ethernet protocol with advantages such as high performance, low latency and flexibility. It is an ideal choice for modern industrial control systems. Its master-slave architecture enables efficient data transmission and real-time control, and is widely used in industrial automation, robot control, CNC machining and other fields. The digital simulation training system built using the EtherCAT protocol can reduce dependence on physical equipment, provide a stable and reliable training environment, and help students understand complex industrial control processes.
[0020] This paper designs a PLC simulation training system based on the EtherCAT protocol. It uses OpenPLC for programming, combines two virtualized systems, runs the IgH EtherCAT Master on the Linux system as the master station, and configures the EtherCAT Slave Stack Code on the Windows system as the slave station, and uses the network card to achieve master-slave communication. The system provides a learning platform that simulates real industrial scenarios, allowing students to quickly verify the control program and deepen their understanding of the working principle of PLC and EtherCAT applications, which helps to improve the effect of experimental teaching and students' practical training ability.
[0021] The above description is only the best specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
[0022] The contents not described in detail in the specification of the present invention belong to the common knowledge of the professionals in this field.
Claims
1. A PLC simulation training system based on EtherCAT, including an IgH EtherCAT Master module, an EtherCAT Slave Stack Code module, and a virtualized experimental hardware platform; the experimental platform includes a Linux system 1 and a Windows system 2, and uses a network card to achieve real-time communication, characterized in that: The following steps are involved: Step 1: Configure the Linux system master in the virtualized environment, install IgH EtherCAT Master, and implement the EtherCAT master function; Step 2: Configure the EtherCAT Slave Stack Code on the Windows system so that the slave supports real-time data exchange; Step 3: Connect the master station and the slave station through the FC1100 network card to establish a stable real-time communication channel; Step 4: Write and upload the PLC control program to the master station in the OpenPLC environment; Step 5: Perform data transmission test between the master station and the slave station to verify the real-time performance of the I / O signal and the system stability; Step 6: Simulate the actual industrial scenario in the simulation environment and complete the control test.
2. The PLC simulation training system based on EtherCAT as claimed in claim 1, characterized in that: In step 1, the Linux system needs to perform a kernel real-time patch update to ensure the stability and accuracy of low-latency data transmission.
3. A PLC simulation training system based on EtherCAT as described in claim 1 or 2, characterized in that: In step 2, the slave module of the Windows system uses the EtherCAT Slave Stack Code to define I / O variables with the master station to ensure real-time communication between the master and slave stations.
4. A PLC simulation training system based on EtherCAT as described in claim 1 or 2, characterized in that: In step 6, the PLC control program is simulated in real time through the OpenPLC environment, including: a. Simulate industrial applications such as robot arm movement and equipment state switching; b. Real-time monitoring of I / O point feedback information to ensure the accuracy and real-time nature of data interaction; c. Use a graphical interface to record the simulation process and generate communication logs to facilitate system maintenance and performance analysis.
5. The PLC simulation training system based on EtherCAT as claimed in claim 1, characterized in that: The configuration steps of the master station include: Download the IgH EtherCAT Master source code from the official website, install the Linux system real-time patch, compile and load the EtherCAT master module; Configure the EtherCAT master network parameters so that it can recognize and communicate with the FC1100 network card; Run the master application to send and receive data frames to achieve real-time data transmission.
6. The PLC simulation training system based on EtherCAT as claimed in claim 1, characterized in that: The configuration steps of the slave station include: Download and install the EtherCAT Slave Stack Code and configure it to support the Windows platform; define the slave I / O variables according to the communication requirements and map them to the actual simulation application; Connect the master and slave and confirm that they exchange real-time data via PDO (Process Data Object).