Đối với các ứng dụng điều khiển máy phay CNC dựa trên nền tảng máy tính thì GRBL là một firmware mạnh mẽ, mã nguồn mở, chạy trực tiếp trên các bo mạch Arduino và hỗ trợ các máy phay CNC 3 trục. Có rất nhiều giao diện hoạt động với GRBL giúp người dùng dễ dàng lập trình G-code và vận hành máy phay CNC. Tuy các giao diện này đã đáp ứng tốt nhu cầu lập trình, vận hành, điều khiển máy CNC nhưng do đã được đóng gói sẵn nên người dùng khó có thể xây dựng thêm các module bổ sung, cụ thể ở dây là module kết nối ra bên ngoài nhằm mục đích trao đổi dữ liệu trong ứng dụng bộ đôi số. Bài báo này sẽ trình bày một giải pháp xây dựng giao diện điều khiển máy CNC định hướng bộ đôi số, ngoài việc có các chức cần thiết để lập trình, điều khiển máy CNC như các phím JOG, đặt gốc tọa độ làm việc, lập trình G-code, hiện thịtọa độ đường dụng cụ cắt,… giao diện sẽ có thêm khả năng kết nối, trao đổi dữ liệu với MQTT Server, hiện thị tiếng Việt, cùng với đó là trực quan hóa các dữ liệu vị trí các trục, feedrate để phục vụ tốt hơn cho mục đích điều khiển, giám sát và cung cấp các dịch vụ cho máy CNC theo định hướng bộ đôi số.In computer-based CNC milling machine controller applications, GRBL is a powerful, open-source firmware that runs on a straight Arduino board and supports 3-axis CNC milling machines. There are many operating interfaces with GRBL that make it easy for users to program G-code and operate CNC milling machines. Although these interfaces have met the needs of programming, operating, and controlling CNC machines well, because they are prepackaged, it is difficult for users to build additional modules, specifically the connection module. to the outside for the purpose of data exchange in the digital twin application. This article will present a solution to build a digital twin-oriented CNC milling machine interface, in addition to having the necessary functions to program and control the CNC machine such as JOG control, set the work coordinates, G-code programming, display the coordinates of the tool path,... the interface will have the ability to connect and exchange data with the digital model via MQTT Server, display Vietnamese, and visualize the data of the axes position and feedrate to serve better for the purpose of controlling, monitoring and providing services for digital twin-oriented CNC milling machine.