Share this

A CNC special-purpose machine tool based on a motion control card

2026-04-06 07:20:32 · · #1
Abstract: This paper introduces the hardware composition, module structure, and key algorithms of a CNC system for grinding roller processing in rice processing machinery. The system is centered on an industrial computer, using VC++ to develop the underlying control program. The DMC-1842 four-axis motion control card is used to realize the control requirements of the drawing machine, meeting the safety, stability, and ease of operation requirements of this special-purpose machine tool. Keywords: Computer control; Motion control card; CNC machine tool; Interpolation; DDE The history of wheat processing into flour can be traced back thousands of years. With the progress of human society, power-driven milling emerged to replace manual labor. The advent of roller mills greatly improved processing efficiency, and the characteristics of the grinding rollers directly affect the quality of the finished flour. This paper aims to introduce a special-purpose machine tool for processing grinding rollers. 1. Process Requirements The surface of the grinding roller is uniformly distributed with transverse grooves, almost horizontally. A wire is formed between two grooves, with the number of wires in a revolution ranging from several hundred to one thousand. The grooves have a slight angle with the horizontal direction; therefore, the geometry of the grooves is strictly speaking a helical structure, resulting from the simultaneous horizontal and rotational movement of the grinding roller. This process is called wire drawing. When the wear of the grinding roller reaches a certain level, the grooves need to be reworked. Therefore, a grinding wheel is used to polish the roller first, removing the grooves; this is called the polishing process. Additionally, operators can adjust the number of wires per revolution by inputting parameters, and control the motor on-site, including starting and stopping, automatic power cut-off in case of malfunction, and emergency stop. 2. Design Analysis This process involves simultaneous movement of multiple axes. During wire drawing, the simultaneous horizontal and rotational movement of the grooves requires the linkage of two coordinate axes, also known as electronic gear motion. Traditional DI/DO-based boards do not have this function, and interpolation algorithms need to be added to the program to implement it, which makes the program more complicated. In addition, the main function of traditional DI/DO boards is based on digital quantity implementation. There are no ready-made algorithms for functions such as speed control and point-to-point control, which increases the workload of the software and the burden on the system, resulting in system instability. Therefore, we selected the DMC-1842 four-axis motion control card from the American company Galil [1]. Motion control cards have a wide range of applications in CNC machine tools, robot control and other fields [2][3]. At present, the main manufacturers are foreign companies. With the popularization and application of control cards, relevant research institutions in China are also developing their own control card products [4]. The DMC-1842 motion control card from Galil has a PCI bus structure and is designed by Galil in the United States for low-cost applications. It uses a 32-bit microprocessor and can control 1-4 axes. It has multi-axis linear interpolation, circular interpolation, contour control, electronic gear and electronic cam functions. The board has 2M flash erasable memory and 2M RAM, which can store user programs, quantities, arrays and control programs, and can run offline. The card provides C++ and VB programming interfaces. In addition, the card has 8 general inputs and outputs, which can be used for field motor control, emergency stop, fault alarm, etc. [5]. In addition, since the polishing operation requires high precision, and the machine tool itself has movement gaps due to mechanical reasons, the motion detection of the grinding wheel axis uses a grating ruler to generate a closed-loop feedback signal to ensure the polishing accuracy. 3 Structure of CNC wire drawing machine: The machine tool consists of four axes: Z, C, X1 and X2, as shown in Figure 1. The Z axis is used for the horizontal movement of the grinding roller, the C axis is used for the rotational movement of the grinding roller, the X1 axis is the tool axis, and the X2 axis is the grinding wheel axis, which is used to process the blank roller into a grinding roller that meets the requirements after rough grinding and fine grinding. [align=center]Figure 1 Machine Tool Structure[/align] 4 Control System Hardware Design The control system is based on an industrial control computer, using a four-axis control card from Galil Corporation (USA) to control the four axes. The lower-level control program is written in VC++, and the operation interface is developed in VB. Control commands are transmitted through DDE, improving the system's stability and intuitiveness, as shown in Figure 2. [align=center]Figure 2 Hardware Structure[/align] A standard industrial control computer is used. The operation panel functions include emergency stop, manual start/stop of the motor, etc., implemented using a touchscreen. The motion control card is the Galil DMC-18X2 motion control card, and the servo controller is a Panasonic product, providing encoder feedback signals to the control card. This encoder is 2500 pulses/revolution, which is quadrupled by the servo controller to 10000 pulses/revolution before being provided to the control card. The grating ruler is selected based on the machining accuracy requirements, using a 1000 pulses/mm product with a 200mm stroke. The interface card is a Galil product, providing wiring for buttons, encoders, emergency stop, fault indicators, etc. 5 Software Design The software platform uses a Windows operating system, with motion control programs developed in VC++ and the interface developed in VB. It consists of two main screens: wire drawing and polishing. Communication between VC and VB is achieved using DDE. Its functions include board initialization, power-on, determination of the start and end points of each axis's motion, wire alignment, wire drawing, and polishing. 5.1 Design of the Motion Control Module Considering the various functions and characteristics of the control card, the control program is written in VC++ with modular programming, improving system stability. The system block diagram is as follows: [align=center] Figure 3 System Block Diagram[/align] 5.1.1 The DDE module acts as the DDE Server, responsible for providing various status indicators to the interface, interpreting incoming commands, and promptly sending the coordinate data of each axis to VB. The module's timed scan cycle is 100 milliseconds. In practical applications, since the interface and control program belong to different programs, there is a synchronization issue between them. Therefore, we have established status indicator words in the control program to indicate and update the current motion status. Using the DDE's XTYP_EXECUTE session mode, the client sends commands to the server. Due to the large number of commands transmitted, we defined a data transmission format to distinguish between different commands. The first three digits (A, B, C) represent the command code, indicating the command type. The code starts from 001 and increments sequentially, separated by commas. Then comes the motion parameters for the command, such as different directions for a jog command. Some commands have more than one parameter, which can be expanded sequentially, ending with an asterisk (*). For example, the C-axis jog command has a command code of 016 and can move in two directions, so its command format is: 016, 0 *. 0 represents clockwise direction. 5.1.2 The command processing module is responsible for real-time monitoring of various commands transmitted from DDE and then executing different sub-modules, including jogging, wire drawing, polishing, motor start/stop, etc. This module is the core of the motion control program; all commands are executed through this program. The timing scan cycle is 100 milliseconds. 5.1.3 The coordinate update module monitors the feedback pulse values ​​of each axis in real time, calculates the coordinate position, and obtains parameters such as the direction of motion of the axis, updating the coordinate axis position accordingly. The update cycle is also 100 milliseconds. 5.1.4 The port scanning module periodically scans the digital input ports, including processing signals such as emergency stop, motor button, and servo controller faults. The update cycle is 100 milliseconds. 5.1.5 The fault diagnosis module includes status indications of the program's ongoing operations, a historical display of received DDE commands, and a record of commands sent to the control card, providing fault diagnosis information to the operator. 5.2 Key Algorithm Processing 5.2.1 Indexing of the Grinding Roller The surface of the grinding roller has hundreds of grooves distributed around its circumference, let's call them n. In practical applications, the number of pulses per revolution of the grinding roller is fixed, let's call it P. Of course, P/n generally won't be an integer, so let N = floor(P/n), meaning N is an integer not exceeding P/n, representing the number of pulses occupied by each groove. Let R = P – N*n, meaning R represents the extra pulses. The problem is transformed into how to handle R pulses. Generally, N>>1, and R>1, so the error generated by this method can be ignored. 5.2.2 Handling of Clearance Due to the mechanical reasons of the machine tool, clearance exists in the movement of the cutting tool, C-axis, etc. For example, during wire alignment, due to the opposite motion of the forward and reverse strokes, there is a clearance error in the position of the grinding roller on the C-axis. Therefore, before normal indexing, we add a reverse rotation of the C-axis by one index, and then a forward rotation by one index, thus successfully eliminating the clearance error. 5.2.3 Wire Drawing Process The wire drawing process involves the tool being fed to the contact position with the grinding roller and then remaining stationary. The grinding roller moves from the starting point to the ending point in the Z-axis positive stroke direction, while simultaneously rotating in the C-axis direction at an electronic gear ratio, machining a groove on the surface of the grinding roller. The grinding roller then reverses direction back to the starting point, rotating one indexing pulse, and the same motion is used to machine the second groove. This cycle continues until the last groove is machined, completing one revolution, as shown in Figure 4. 6 Conclusion The author's innovation lies in using a motion control card to achieve computer control of a wire drawing machine in the rice processing industry, achieving a leading level in the industry. Furthermore, the system's control algorithm, developed in VC++, features stable operation and high speed, while the upper-level interface, developed in VB, provides a good human-machine interface. This combined structure ensures system stability and provides a user-friendly operating environment. The system demonstrates stable performance, simple operation, and high precision in actual operation, improving processing efficiency and potentially bringing economic benefits of over 2 million yuan to rice processing and feed processing enterprises. References: 1. Sun Bin, Yang Ruqing, Research status and development trend of PC-based CNC system, Machine Tool & Hydraulics, 2001(4). 2. Xiong Xianfeng, Xing Jifeng, Zuo Hongbo, Zeng Xiaohua. Application of ordinary motion control card on LabVIEW platform [J]. Microcomputer Information, 2006, 11-1:139-141. 3. Chen Zhiguo, Xu Wenbo. Intelligent cutting system of robot based on motion control card [J]. Microcomputer Information, 2005, 8-3:95-97. 4. Liu Jinling, Wu Yongming, Liu Jianqun. Research and development of motion control card based on PCI 9052 [J]. Microcomputer Information, 2006, 5-1:143-145. 5. Galil motion control card datasheet (USA). About the author: Xu Zhipeng (1970-), male (Han nationality), from Linqing, Shandong, is a lecturer at the School of Physics Science and Information Engineering, Liaocheng University, and holds a PhD in Engineering. His main research and applications are in industrial automation, numerical control, and image processing.
Read next

CATDOLL Rosie Hard Silicone Head

The head made from hard silicone does not have a usable oral cavity. You can choose the skin tone, eye color, and wig, ...

Articles 2026-02-22