Research on Open CNC System Based on Windows CE.net
2026-04-06 05:08:15··#1
This paper introduces the background, characteristics, and current status of software and hardware platforms of open CNC systems. It then describes the development of an open CNC system based on the Windows CE.net platform and its implementation scheme. 1. Introduction Since the successful development of the first CNC machine tool at MIT in 1952, the functions of CNC systems have been greatly expanded with the rapid development of computer technology. With rapid changes in technology, market, and production structure, users have placed higher demands on CNC systems: they hope to quickly, efficiently, and economically construct customer-oriented control systems according to different processing requirements; gradually reduce manufacturers' high dependence on control systems; significantly reduce maintenance and training costs; change the closed design mode of past CNC systems; and adapt to the task- and order-oriented production mode of future workshops, making the underlying production control system simpler and more effective. Against this backdrop, open CNC systems have emerged. Their main purpose is to resolve the contradiction between today's complex and changing needs and the fixed and specialized nature of past control systems, making CNC systems flexible, compact, and inexpensive. 2. Definition and Characteristics of Open CNC Systems According to the IEEE definition of an open system, an open system possesses the following capabilities: properly implemented applications can run on multiple platforms from different vendors; it can interoperate with applications from other systems; and it provides a consistent human-machine interface. This definition pertains to openness in information technology. As an open system, the core of an open CNC system is to establish an architecture and standards open to CNC system software and hardware developers, machine tool manufacturers, and end users, enabling the CNC system to be independent of specific vendors and achieving interconnectivity, interoperability, reconfigurability, and interchangeability. According to the requirements of an open CNC system, in addition to its hardware adopting a modular design based on a standard bus, its software should also adopt platform technology and unified standard specifications (such as standard operating systems, communication mechanisms, and language interfaces). An open CNC system should have the following five basic characteristics: (1) It consists of a series of logically independent components; (2) It provides complete specifications and standards for the interfaces between the various components of the system and the system, and components from different manufacturers that conform to the specifications can form a complete CNC system; (3) It can dynamically change the topology of the system; (4) It can achieve interoperability with other automation systems and software modules; (5) It can provide a consistent human-machine interface. Therefore, choosing a general system platform is an important prerequisite for realizing the openness of CNC systems. Industrial PCs have been widely used in the control field due to their mature technology and stable performance. The open architecture of PCs also provides a good open hardware platform for CNC systems. It has become a consensus to develop CNC systems based on industrial PCs. However, no consensus has been reached on the choice of software platform. 3 Current Status of Software Platforms for Open CNC Systems The software platform of an open CNC system largely determines the working mode, working efficiency and openness of the CNC system. The software of the CNC system is the integration of different functional modules on the basis of the software platform, and the real-time multi-task control of the CNC system is realized through time-sharing or interrupt technology. Currently, most PC-based CNC systems use DOS as their software platform, while a few use Windows 9x, Windows NT, Windows 2000, etc. Given the weaknesses of these operating systems, they cannot fully meet the requirements of open CNC systems. This paper proposes using Microsoft's embedded operating system Windows CE.net as the software platform for open CNC systems. 3.1 Introduction to Windows CE.net Since Microsoft launched the embedded operating system Windows CE 3.0 in 1999, it has captured a portion of the embedded operating system market due to significant technological advancements. Following this, in April 2002, the company launched Windows CE.net, which further improved performance, such as support for Bluetooth technology, TCP/IPv6, and improvements to the dedicated development tool Platform Builder, attracting even greater attention and achieving successful applications in the field of real-time multi-tasking control. [IMG=Figure 1 Windows CE Architecture]/uploadpic/THESIS/2007/11/2007111414455833205Z.jpg[/IMG] Figure 1 Windows CE Architecture [IMG=Table 1 Windows CE.net Interrupt Delay Data Table]/uploadpic/THESIS/2007/11/2007111414475662490D.jpg[/IMG] Table 1 Windows CE.net Interrupt Delay Data Table Windows CE.net is not a part or a scaled-down version of Windows 9x/NT/2000, but a modular (customizable), real-time, powerful communication-enabled, preemptive multitasking 32-bit embedded operating system newly designed and developed by Microsoft. It can run on CPUs of various architectures and has embedded support for various communication protocols and multimedia features. It can be used as a control system for wireless devices, consumer electronics, and industrial automation equipment. A Windows CE-based... The .net platform mainly consists of the following parts: kernel module, object storage/file system module, network and communication module, and GWES module (graphics, window, event subsystem). In addition, there are 3 important components: driver, device manager, and OAL (OEM Adaptation Layer). Figure 1 shows the architecture of a Windows CE-based platform. 3.2 Features of Windows CE.net Windows CE.net has the following features, making it suitable as a software platform for rapid development of open CNC systems: (1) Windows CE.net meets the real-time requirements of open CNC systems. Although some previous versions of the Windows CE.net operating system provided some RTOS (real-time operating system) functions, since Windows CE.net, many major changes to the kernel have greatly improved the real-time performance of Windows CE. The real-time performance of Windows CE.net is primarily achieved through the following technologies: support for nested interrupts, with interrupt handling divided into Interrupt Service Routine (ISR) and Interrupt Service Thread (IST); high-priority interrupts (ISTs) do not need to wait for low-priority ISRs to complete; 256 thread priorities allow for flexible scheduling of tasks in embedded systems; thread response time is improved by fixing the maximum scheduling latency of high-priority interrupt service threads (1STs); the number of threads in the operating system can be modified using the API functions CeSet Thread Quantum and CeGet Thread Quantum; interrupt service subroutines have very short response times; and semaphores are supported. Windows CE.net is designed to meet the requirements of 95% of hard real-time systems. Its 1ms timing cycle error is approximately 100µs, reaching 501µs on a 200MHz x86 system. Considering other factors such as CPU type, clock frequency, and bus speed, many practical applications based on the Windows CE.net platform have even shorter response times. Therefore, Windows CE.net can fully meet the requirements for high real-time threads such as interpolation and position control with a task cycle of 4ms in CNC systems. Another interrupt indicator of real-time capability is interrupt latency. Table 1 lists the interrupt latency data measured by Microsoft on the reference platform. (2) Windows CE.net meets the requirements of modularity and functional flexibility of open CNC systems. The modular design of Windows CE.net enables developers of open CNC systems and application systems to customize their own dedicated operating systems according to different product needs. It can customize a minimal operating system with only the kernel and a size of only a few hundred kilobytes, or a maximum operating system including all components. Windows CE.net provides a good development method, which can easily add or remove kernels. It fully meets the requirements of modularity and functional flexibility of open CNC systems. (3) Windows CE.net is compatible with a large number of software and hardware resources on the market and has powerful network communication functions. Windows CE.net supports most hardware devices on the market, which greatly facilitates the hardware selection of open CNC systems. Windows CE.net uses the same programming model as Windows 9x/2000. Its API is a subset of the Win32 API, with approximately 600 API functions, enabling the implementation of all embedded applications. Windows CE.net also supports popular software technologies and runtime libraries such as MFC, ATL, and COM. Win32 compatibility allows for easy porting of existing Windows applications to Windows CE. Many developers are proficient in Windows programming and can develop Windows CE.net applications with minimal learning. Windows CE.net boasts powerful communication capabilities, widely supporting various communication hardware, LAN connections, and dial-up connections. It provides connectivity to PCs, intranets, and the Internet, including device-to-device interconnection for application-level data transfer. It fully meets the networking requirements of open CNC systems, especially Internet connectivity, enabling networked manufacturing at the workshop and equipment levels. These features of Windows CE.net make developing CNC systems based on it advantageous, improving system performance and reliability, facilitating modularization, openness, and networking, providing a user-friendly interface and window-based working environment, and offering cost-effectiveness. Therefore, researching an open CNC system based on Windows CE.net aligns with the development trend of CNC systems and has significant practical implications. 4. Implementation Scheme of an Open CNC System Based on Windows CE.net The entire system consists of a Windows CE.net-based host (Lenovo IPC 800A industrial PC) plus several functional modules. Windows CE.net supports a wide range of hardware platforms and external devices, making it relatively easy to build a hardware platform based on Windows CE.net for an open CNC system. The CNC system utilizes various CNC modules and interface modules plugged into bus slots to complete system functions. Software-wise, this typically involves periodically writing or reading data to or from a specific address of a CNC module. The author uses the PMAC (programmable multi-axis controller) multi-axis motion control card from Delta Tau Data Systems, Inc. The system hardware composition is shown in Figure 2. The software development of an open CNC system mainly includes two parts: the development of the CNC system application program and the development of device drivers (mainly the drivers for the CNC modules). Since the Windows CE.net development tool Platform Builder 4.2 only provides some basic device drivers, the drivers for various boards in the open CNC system must be developed by ourselves. All Windows CE.net device drivers are dynamic link libraries (DLLs) and can be implemented using the standard Windows CE API. Windows CE.net provides two driver models: stream interface drivers and local drivers. After research, it is believed that the drivers for CNC system hardware boards conform to the basic characteristics of stream interface drivers and can be developed using Platform Builder 4.2. The CNC system is a typical real-time multi-tasking system. There are many tasks in the system application, such as position control, interpolation calculation, PLC tasks, program interpretation, user interface, etc. Each task has real-time requirements to varying degrees. From the perspective of the real-time requirements of each task, combined with the multi-tasking implementation method of Windows CE.net, they can be divided into: (1) Real-time burst tasks: The characteristics of these tasks are that the occurrence of tasks is random and bursty, and they often have strong real-time requirements. They mainly include fault interruptions (emergency stop, mechanical limit, hardware failure, etc.), machine tool PLC interruptions, etc. (2) Real-time periodic tasks: These tasks occur precisely at certain time intervals. They mainly include interpolation calculations and position control during the machining process. To ensure machining accuracy and the continuity of the machining process, the real-time nature of these tasks is crucial. During the execution of these tasks, they cannot be interrupted by other tasks except in the event of a system failure. (3) Weak real-time tasks: These tasks have relatively weak real-time requirements; they only need to be able to run within a certain period of time. These tasks mainly include human-machine interface management and program interpretation. [IMG=Figure 2 Hardware Composition Diagram of Open CNC System]/uploadpic/THESIS/2007/11/2007111414525972324C.jpg[/IMG] Figure 2 Hardware Composition Diagram of Open CNC System [IMG=Figure 3 Software Structure Diagram of Windows CE.net-based Open CNC System]/uploadpic/THESIS/2007/11/2007111414551555010Q.jpg[/IMG] Figure 3 Software Structure Diagram of Windows CE.net-based Open CNC System Figure 3 shows the software structure diagram of an open CNC system based on Windows CE.net. For the CNC system application, the main functions are interpolation calculation, program interpretation, user interface, and dynamic display. eMbedded Visual C++ 4.0 can be used to develop the application. By fully utilizing the multi-threading capabilities of Windows CE.net, the various functional modules of the application are divided into several main threads, which are allocated with different priorities according to different real-time requirements and uniformly managed and coordinated by the kernel. 5. Conclusion: The Windows CE.net kernel is compact, flexible, reliable, and has strong real-time performance, meeting the needs of open CNC systems. Furthermore, it possesses abundant hardware and software resources, strong network communication capabilities, and easily facilitates system openness and networking. Therefore, the research and development of open CNC systems based on Windows CE.net has significant practical implications. (Proceedings of the 2nd Servo and Motion Control Forum; Proceedings of the 3rd Servo and Motion Control Forum)