Design and Real Time Improvement Research of EtherCAT Master Station Based on LinuxCNC
To address the stringent requirements for high real-time performance and low communication jitter in precision machining, this paper proposes a cost-effective real-time control solution through deep integration of open-source LinuxCNC and the IgH EtherCAT Master. Targeting the inherent real-time limitations of conventional Linux systems, the architecture employs an industrial PC as the upper computer, leveraging the Preempt-RT real-time kernel. Key optimizations include kernel preemption refinement, priority scheduling (SCHED_FIFO), and CPU core affinity binding for critical real-time tasks, collectively reducing task preemption latency by 87% and scheduling jitter by 73% compared to baseline configurations. At the EtherCAT communication layer, three synergistic enhancements are implemented: 1) Replacement of legacy sleep mechanisms with clock_nanosleep-based absolute timing (20ns resolution); 2) Memory locking via mlockall to eliminate paging-induced jitter; 3) Adoption of TSC clock source (drift <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$<0.05 \text{ppm}$</tex>). Experimental validation on a five-axis servo control platform—deploying LinuxCNC-Preempt-RT and IgH Master on a low-cost industrial computer—demonstrated deterministic performance: Wireshark analysis of <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$\mathbf{5 0, 0 0 0}$</tex> EtherCAT frames revealed maximum cycle jitter reduction from <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$512 \mu$</tex> s to <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$63 \mu$</tex> s, with mean jitter stabilized at <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$22 \mu$</tex> s under 1 ms communication intervals. This study provides a high-performance-to-cost ratio solution for industrial motion control applications, achieving sub- <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$100 \mu$</tex> s temporal precision without specialized hardware acceleration.
Authors
- Tiancheng Liu (ORCID: https://orcid.org/0000-0002-9969-0122)
- Tian Chen (ORCID: https://orcid.org/0000-0001-5423-2059)
Institutions
- Shanghai Dianji University (CN)
Publication Details
- Published
- 2025-04-25
- DOI
- https://doi.org/10.1109/iccea65460.2025.11103102
- Primary Topic
- Advanced Sensor and Control Systems
- Type
- article
- Field-Weighted Citation Impact
- 0.00