Abstract:LinuxCNC is an open source real-time numerical control system, it can be applied to the servo control of robot. But it hasnt achieve any communication functions with the lower layer equipment on its own. So, if to use this system as the upper computer software as wanted, expand its communication module with lower computer is in need. A way was introduced of designing the EtherCAT master station by extending the HAL module of LinuxCNC, so that the upper computer and the lower computer of this system can communicate with each other. The functions and working principle of each module of the master station were expounded in detail, and its concrete implementation steps were elaborated. The result of the experiment shows that this method realized EtherCAT master can run stably and efficiently in the LinuxCNC system.