Design and Development of an Embedded Motion Controller System
2026-04-06 06:37:02··#1
Abstract: This paper comprehensively utilizes embedded system technology and motion control technology, adopting the PC104 of the x86 architecture as the core central processing unit. It details the hardware design of the embedded motion controller and how to use the Windows CE Platform Builder development platform to customize and tailor the Windows CE operating system platform for software design. Keywords: Embedded system, motion controller, automatic control 1 Introduction Currently, embedded technology has become a development direction for communication, control, and consumer products. Embedded systems mainly consist of embedded processors, related supporting hardware, embedded operating systems, and application software systems. Its development and application have been included in the national key science and technology development plan. Due to its advantages of small size, powerful functions, and low price, it is increasingly widely used and has become a trend in industrial automation applications. Motion controller technology comprehensively applies automatic control, computer control, and other related technologies to control and manage the position and speed of motors in mechanical transmission devices in real time, enabling moving parts to complete corresponding actions according to the expected trajectory and specified motion parameters. Embedded motion controllers embed a computer into the motion controller, enabling independent operation. The communication between it and the computer uses a reliable bus connection method (using pin connectors), making it more suitable for industrial applications. 2 System Hardware Platform Design The embedded motion controller mainly consists of two parts: an embedded CPU motherboard and a motion control module [1][2][3][12]. The motion control module can use the high-performance motion control board from Googol Technology Co., Ltd. Based on the high-performance motion module, there are strict requirements for the embedded processor, such as: strong support for real-time multitasking, able to complete multitasking and have a short interrupt response time; strong memory area protection function; scalable processor structure, able to quickly develop embedded microprocessors that meet various application performance requirements; low power consumption, etc. [align=center] Figure 1 PC104 module[/align] Optional solutions include: 1) Based on a microcontroller, suitable for field control with small data volume, low speed and simple function, but unable to meet the requirements of high-speed and high-precision motion controllers. 2) Based on ARM architecture or other microcontrollers, the advantage lies in simple design and efficient instruction set, but the compatibility with existing general software is not ideal at present, and specialized software personnel must be trained. 3) The PC104 uses an x86 architecture CPU, primarily from Intel, but also includes compatible CPUs from AMD, VIA, ICOP (Zhaoying Technology), and other companies. The PC104 bus connects the x86 PC motherboard to the motion control board, forming an embedded motion controller. Based on mature motion control board technology, this type of embedded motion controller is simple to implement and has a short development time. Therefore, the ICOP-6070 embedded motherboard was chosen as the system core; the specific interface is shown in Figure 1. Besides the core control module, there is the motion control module, which executes the specific actions. The embedded PC104 motherboard is directly plugged into the motion control card. The motion control card has two DB62 sockets that connect to the terminal board, which then provides the control motor signals. Because the motion controller and computer module use pin-type connections, they are independent of each other. Both the motion controller and the PC board can function as independent modules, making production upgrades easy, maintenance convenient, and reliability relatively high. Figure 2 shows a schematic diagram of the mechanical connection between the embedded PC104 motherboard and the motion control card. [align=center] Figure 2 Connection diagram of core module and motion control module[/align] The complete construction process of the system is as follows: (1) Connect the ICOP-6070 embedded motherboard and the Googol motion control card together through the PC104 interface. (2) Then connect the external input and output devices to the embedded motherboard. (3) Next, connect the Googol IO terminal board and the Googol control card together through two 62-pin data lines. Finally, input the 24V input signal to the Googol IO terminal board and the embedded motherboard. 3 Software platform design The main indicators of industrial embedded systems are: real-time performance, high efficiency, safety, stability and reliability, as well as compact structure, easy customization and good openness. There are many graphical operating systems available for embedded applications, such as Windows CE and Palm OS, while Palm OS is generally only used on handheld devices. There are currently several systems suitable for industrial environment application (process) standards, such as Windows CE and Linux. WinCE is a multi-tasking embedded operating system developed by Microsoft. It is modular and scalable, has good real-time performance, strong communication capabilities, and supports many types of embedded CPUs (including X86, ARM, etc.). The main considerations for choosing Windows CE .net embedded operating system as the operating platform of this embedded motion control system are its simple and practical operation, multi-tasking operation, powerful functions, stable performance, and the ease of porting Windows programs. People familiar with Windows program development can quickly master the development of Windows CE .net programs, while reducing the difficulty for program developers. 3.1 Operating System Platform Design In order to be able to use the Windows CE .net operating system, a customized Windows CE .net operating system platform must be made. The platform can be generated using the Windows CE .net tool Platform Builder 4.2. The main steps for generating the platform are as follows: (1) Install the Windows CE .net 4.2 operating platform into the PC. (2) Install the ICOP 6070 BSP program into the PC. (3) Execute "Platform Builder", enter the platform creation wizard dialog box, and click the "NEXT" button. In this dialog box, you need to select the “ICOP_VORTEX86” BSP program for the ICOP motherboard. (4) Continue to click the “NEXT” button. In the dialog box, you can select the “Industrial Controller” function. After the embedded platform is successfully created, you need to configure the compilation settings for this platform. After a platform is generated using the platform creation wizard, there may be unnecessary file information or missing related files. Therefore, you need to delete or add related files and configure related compilation information for this platform. (1) Manually add support for storage hard disks and FAT file systems. First, find the “ATAPI PCI/IDE Storage Block Driver” information in “Device Drivers” -> “Storage Devices” -> “Storage Devices” in the directory display area. Right-click on this column and select “Add to platform” in the pop-up dialog box. At this time, this related information will be added to the platform project. Using the same method, find the "FAT File System" information in "Core OS" -> "Display based devices" -> "File Systems and Data Store" -> "Store Manager" in the directory display area. Right-click on this column and select "Add to platform" in the pop-up dialog box. The relevant information will be added to the platform project. (2) Support for Windows SDK and MFC class library needs to be added to the platform project. MFC class library support is found in "Core OS" -> "Display based devices" -> "Applications and Services Development" -> "Microsoft Foundation Classes (MFC)" in the directory display area. (3) After the basic functions of the embedded platform project are added, the platform can be compiled. Before compiling the platform, the platform settings should be configured. In the "Platform Settings" dialog box, select the option "Enable Images Larger than 32MB" and save the changes. (4) Compile the platform to generate the image file NK.bin of the Windows CE .NET operating system. (5) The embedded platform project is completed. NK.bin can be downloaded to the motherboard for operation, or it can be downloaded to the embedded motherboard via the network for operation. 3.2 Embedded Motion Controller Driver Before using the motion controller, the motion controller driver must be installed first so that the motion controller can be used correctly. The steps to add this driver are as follows: (1) Copy the motion controller driver file GooGolDriver.dll to the Release directory of the platform. (2) Open the project.reg file in the project in the platform editing environment and copy the following text content into this file. [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\GooGolDriver] "Dll"="GooGolDriver.dll" "Order"=dword:0 "Index"=dword:1 "Prefix"="GOL" (3) Open the project.bib file in the project in the platform editing environment and copy the following text content into this file. GooGolDriver.dll $(_FLATRELEASEDIR)\GooGolDriver.dll NK SH (4) The above operation can be used to register the driver and package the driver GooGolDriver.dll into the image NK.bin. The driver file GooGolDriver.dll exports ten functions for system calls, which are as follows: GOL_Close, GOL_Deinit, GOL_Init, GOL_IOControl, GOL_Open, GOL_PowerDown, GOL_PowerUp, GOL_Read, GOL_Seek, GOL_Write. These ten functions cannot be called directly. Windows CE .NET has dedicated API functions to call them. 3.3 Installation of motion controller dynamic link library: Before using the motion controller, the motion controller dynamic link library must be installed first so that the motion controller can be used correctly. The dynamic link library contains motion function instructions for the motion controller, such as linear motion instruction GT_LnXYZ, circular motion instruction GT_ArcXY, etc. The steps to add this driver are as follows: (1) Copy the file gtdll.dll to the Release directory of the platform. (2) Open the project.bib file in the project in the platform editing environment and copy the following text content into this file. gtdll.dll $(_FLATRELEASEDIR)\gtdll.dll NK SH (3) The above operations can be used to register the driver and package the driver GooGolDriver.dll into the image NK.bin. 4 Design of Control Software After building the system software, it is also necessary to develop and design the application software. There are many development platforms for embedded software. The most common development platform is eMbedded Visual C++, which is very similar to the Visual C++ development environment under the Windows operating system. Therefore, people who are familiar with the Visual C++ development environment under the Windows operating system can quickly master eMbedded Visual C++. Before using eMbedded Visual C++ for development, the SDK of the embedded operating platform must be installed first, otherwise eMbedded Visual C++ cannot be opened. The SDK construction process for the embedded operating platform is as follows: (1) In the Platform Builder development environment, click “Project” -> “Configure SDK” to configure the SDK to be generated. In the configuration dialog box, you can modify the file name of the exported SDK and its storage directory and related information. The SDK file name is ICOP6072_SDK.msi. (2) After configuring the relevant information for the SDK export, click “Project” -> “Build SDK”. In this dialog box, you can export an SDK and create a file ICOP6072_SDK.msi in the configuration file settings directory. (3) Double-click the ICOP6072_SDK.msi file in the Windows operating system to install the SDK for the embedded system of Icop 5072. (4) At this point, the SDK for the embedded system is installed, and eMbedded Visual C++ can develop programs based on this SDK. The main function of this software is to realize the use of the motion controller by calling the motion command of the motion controller to meet the control process in specific applications. Industrial control software is the software component of an industrial control system used to control industrial production, and its safety and reliability requirements are extremely high. In addition to the basic characteristics of industrial control software, this control software also needs to have the following characteristics: long-term stable operation of the system software; real-time control software; and practicality and simplicity of operation. Based on the characteristics of industrial control software, this software does not have a rich graphical display interface; it focuses primarily on functional implementation, software stability, real-time control, and ease of operation. This program is written with the aim of perfectly demonstrating its functions. Before operating the embedded motion controller, it must first be initialized. To better reflect the current processing status, the actual position of the machine tool must be read in real time, and based on this position information, the actual processing situation is displayed in a simple 3D graphic. 5. Summary Traditional PC-based motion controllers, using software-implemented control methods, cannot meet the increasingly high-speed and high-precision requirements, no matter how much performance is improved. The research on embedded motion controllers is a systematic process; to ensure stable performance and reliability, a comprehensive understanding of hardware and software design is essential. The PC104 design scheme proposed in this paper addresses the current strong market demand for embedded motion controllers. The research content of this paper will provide some guidance for future research. 6. Conclusion This system is a powerful, stable, small-sized, low-cost motion control system developed by Googol Technology Co., Ltd. in the field of embedded motion control. It is suitable for industrial control and represents a significant innovation based on traditional PC-based motion controllers. The innovations of this paper are: while there is considerable discussion of the applications of embedded controllers, the core R&D technologies have not been explored; furthermore, the research on the Windows CE operating system platform for embedded systems allows customers to easily port their existing Windows-compiled application software to CE, reducing development cycles, lowering development costs, and quickly generating benefits. References [1] Zhao Mingfu, Bus technology and its application in embedded systems, Microcomputer Information, 2005, 21 (06Z). -42-44,3 [2] Yu Zhangguo, Li Zhongli, Li Leimin, Embedded motion controller based on ARM and MCX314A, Microcomputer Information, 2005, 16 [3] Wang Tianmiao, Embedded system design and example development. Tsinghua University Press, 2002: 36~44 [4] Ju Xiaomi, Zhang Zhongneng, Application of embedded database in data-intensive software, Computer Engineering. 2003, 11: 186~189 [5] Zhang Dongsheng, Application of data acquisition device based on embedded technology in communication monitoring system. Master's thesis of Harbin Institute of Technology. 2003: 8~14 [6] Jiang Yaqun, Zhang Chunyuan, ARM microprocessor architecture and its embedded SOC, Computer Engineering, 2002, 28 (11): 4~6 [7] Zhang Lianming, Huo Yinghui, Design and Development of Embedded Systems. Foreign Electronic Components. 2004, (1): 20-21 [8] Hu Anping. Application of PC104 in Engineering. Electronic Products World. 2002, (8): 60-61 [9] Wei Zhong, Cai Yong, Lei Hongwei. Detailed Explanation of Embedded Development. Electronic Industry Press, 2003: 30-56 [10] Abraham Silberschatz, Peter Galvin, Greg Gagne. Applied operating system concepts. John Wiley & Sons, Inc, 2000: 100-125 [11] Jack Ganssle. Changes in Embedded Design Methodology. Embedded System Programming. 1999, 9: 35-40 [12] JECoolirg. Software design for real-time Systems. Chapman and Hall World Publishing Crop, 1998: 200-221 Design and Development of an Embedded Motion Controller System