由於網路系統的複雜性不斷增加,多個任務必須即時協調對共享資源的存取,延遲、同步和資源爭用的挑戰變得至關重要,但仍須保持精準的運動表現。為了應對這些挑戰,該研究透過即時作業系統 Xenomai 將 EtherCAT 與基於訊號量的即時調度方法整合,使用PID方法控制網絡上的馬達,提出了一種綜合解決方案進行多軸開源控制。這種方法增強了運動控制任務的反應能力,同時管理多任務環境中的資源分配。實驗與模擬結果表明,單軸控制在 30 rev/s 時的最小延遲為 1 微秒,相對速度誤差為 1.47%。在多軸場景中,即使軸數量增加,系統也能以最小的偏移量保持可預測的同步。在 3 個設備時,基於信號量的調度方法使較低的優先級的設備任務執行次數提高32%,使多設備時,較高優先級的設備能夠維持良好的資源實用效率,同時較低的優先級的設備相比傳統排程方式也可以獲得不錯的資源分配。這一研究成果為工業自動化和機器人技術提供了新的解決思路,有助於推動相關領域的進一步發展。
As the complexity of networked systems increases, multiple tasks need to coordinate access to shared resources in real time. The challenges of latency, synchronization, and resource contention become critical while still maintaining accurate motion performance. To address these challenges, this research integrates EtherCAT with a semaphore-based real-time scheduling method through the real-time operating system Xenomai, uses the PID control method to control motors on the network, and proposes a comprehensive solution for multi-axis open-source control. This approach enhances responsiveness in motor control tasks while managing resource allocation in a multi-tasking environment. Experimental and simulation results show that the minimum delay of single-axis control is 1 microsecond at 30 rev/s, and the relative speed error is 1.47%. In multi-axis situation, the system maintains predictable synchronization with minimal offset, even as the number of axes increases. When there are 3 devices, the semaphore-based scheduling method increases the number of task executions of lower-priority devices by 32%, so that when there are multiple devices, higher-priority devices can maintain good resource utilization efficiency while lowering the Compared with traditional scheduling methods, devices with higher priority can also obtain better resource allocation. These results provide new solutions for industrial automation and robotics, and helps promote further development in related fields.