CNC system for riveting machine based on Mitsubishi motion control unit
2026-04-06 06:21:45··#1
Abstract: This paper discusses the methods and key technologies for developing a CNC system for a riveting machine using the FX2N-20GM motion control unit, PLC, and F940GOT graphical operation terminal from Mitsubishi Corporation of Japan. A cost-effective and highly reliable CNC system was developed and successfully applied to our developed CNC riveting machine. Keywords: CNC system, motion control unit, riveting machine 0 Introduction Riveting technology, utilizing oscillating rolling, is widely used in the manufacturing of computer peripherals, office equipment, home appliances, and automobiles. It offers stable and reliable riveting quality and a smooth, impact-free riveting process, making it an ideal riveting process. With the development of China's economy and technology, some well-known printer and copier manufacturers have transferred parts processing to China. However, many factories producing these parts still use manually operated riveting machines, resulting in low efficiency, high labor intensity, and unstable quality. There is an urgent need to improve efficiency and quality by using automatic riveting machines. Due to large production batches and the large number of riveting machines used in factories, there is a high demand for the economic efficiency of automatic riveting machines, but suitable ready-made automatic riveting machines are not yet available on the market. Therefore, developing an automatic riveting machine with high efficiency, good quality, and good economy is of significant economic and technical importance. Due to the high cost control requirements for automatic riveting machines, and the fact that the CNC system accounts for a large proportion of the cost, developing a CNC system with good economy, high quality, and high reliability has become crucial for developing such an automatic riveting machine. 1. Main Functions of the CNC System The basic structure of the CNC riveting machine is shown in Figure 1, mainly composed of a riveting head and an XY CNC worktable. The spindle of the riveting head is driven by a motor to rotate and moves up and down under the drive of a cylinder. The axis of the riveting head forms a certain angle with the axis of the spindle. The riveting head revolves around the axis of the spindle (oscillation and nutation) on one hand, and rolls on the surface of the workpiece on the other hand, forming a rotation around its own axis. Under the pressure of the cylinder, the end of the pin is subjected to localized pressure, resulting in continuous plastic deformation. After a certain processing time, the pin and the support frame are firmly riveted together (Figure 1(A)). [align=center]Figure 1 Basic Structure of CNC Riveting Machine[/align] In the gear transmission systems of equipment such as printers and copiers, multiple parallel transmission pins often need to be riveted together with support frames. When processing with a conventional riveting machine, each riveting point is moved one by one to the riveting head by manually moving the mold, which is inefficient, labor-intensive, and limits the number of riveting points per process, making it difficult to guarantee parallelism and resulting in unstable quality. The basic process of riveting such parts using a CNC riveting machine is as follows: First, the CNC worktable moves the mold to the loading and unloading station, places the pins and support frames on the corresponding positioning surface of the mold, and holds the support frames in place by electromagnets. Then, the CNC worktable moves each riveting point to the riveting head in sequence according to the programmed coordinate positions. The control system controls the riveting head to press down, and the riveting head rivets the workpiece. After the set riveting time, the processing of that part is completed. After all the pins are riveted, the machine returns to the loading and unloading station, and the unloading cylinder lifts the riveted workpiece for unloading. Therefore, the main task of the CNC system of the riveting machine is to realize the motion control of the XY worktable. Since the workpiece (transmission support) has already been stamped and bent before riveting, the XY worktable needs to have linear or circular interpolation functions to avoid the bent parts of the workpiece. Simultaneously, the CNC system must also control the lifting and lowering of the riveting head, the start and stop of the spindle, the action of the unloading cylinder and clamping electromagnet, and perform corresponding human-machine interaction, such as inputting and editing the machining program, and displaying the working status of the equipment. 2. Structure and Key Technologies of the CNC System Due to the high economic requirements of the CNC riveting machine, it cannot use PC-based general-purpose CNC or other general-purpose CNC systems. We comprehensively considered factors such as economy, reliability, ease of development, and development cycle, especially ensuring reliable operation in the factory production site. Therefore, we decided to use the Mitsubishi FX2N-20GM motion control module, the FX2N series PLC, and the F940GOT graphical operation terminal to develop the CNC system for the riveting machine. The basic structure of the control system is shown in Figure 2. [align=center] Figure 2 Basic Structure of the Control System[/align] The motion control unit FX2N-20GM has simultaneous linear and circular interpolation on two axes, with an output frequency of up to 100kHz during interpolation, and basic motion control functions such as processing of positive and directional limit signals, near-point signals, zero-point signals, manual pulse input, manual control, and machine origin return. The motion signal output by FX2N-20GM is a pulse signal, which can be used with a pulse-input type AC servo driver. Therefore, the motion control unit FX2N-20GM is well-suited for motion control of riveting machines. 2.1 Transfer of Machining Program As a motion control module, FX2N-20GM itself does not have an interface for CNC program editing and input. While the SWOD5-FXVPS-E software provided by Mitsubishi can transmit motion trajectories to the FX2N-20GM via a computer serial port after RS232 to RS422 conversion, this is only suitable for inputting fixed motion trajectories into the FX2N-20GM and is not suitable for use as a program input tool in production. Because Mitsubishi has not publicly disclosed the compiled instruction format or the relevant communication protocol with the FX2N-20GM, a similar method of transmitting motion trajectory data using serial communication cannot be used. Therefore, the primary problem to be solved when building a CNC system based on the FX2N-20GM is how to transmit machining programs for different parts to the FX2N-20GM for execution. The FX2N-20GM uses its own unique control and interpolation instructions. In its interpolation instructions, data registers can be used as coordinate parameters for linear and circular interpolation. Leveraging this, when writing its motion control program, general-purpose data registers are used as coordinate variables for the motion trajectory in the interpolation instructions. The PLC then sends the motion parameters to these general-purpose registers, and the FX2N-20GM completes the corresponding interpolation motion based on these parameters. For example, in linear interpolation, 32-bit data registers DD100 and DD102 are used as the endpoint coordinates, and DD104 is used as the motion speed. The interpolation instruction can be written as: 0020: cod01 (LIN) xDD100 yDD102 fDD104 ; LD M8000 DTO K0 K100 D201 K2 DTO K0 K104 D500 K1 …… In the system, we can use the FX2N-20GM as an expansion module of the PLC, and the machining programs for different parts are stored in the PLC. During the machining process, the PLC continuously sends process parameters such as the coordinates of the motion trajectory, motion speed, riveting time at each point, and the number of riveting points to the relevant registers DD100, DD102, and DD104 of the FX2N-20GM via the 32-bit transfer instruction DTO. This allows control over the execution of corresponding instructions on the FX2N-20GM. The corresponding PLC program is as follows: In the above PLC program, data registers D201~D202 and D203~D204 in the PLC store the X and Y coordinates of the endpoint of the straight trajectory. The DTO instruction transfers the X and Y coordinates to DD100 and DD102 of the FX2N-20GM. The BFM numbers corresponding to DD100 and DD102 of the FX2N-20GM are #100~#103, and the BFM number corresponding to DD104 is #104. 2.2 Acquisition of Current Coordinates and Operating Status On the other hand, parameters such as the system's current coordinates and the servo system's status are read back from the FX2N-20GM using the PLC's FROM instruction. The BFM number of the current X-coordinate register in the FX2N-20GM is #9004 (32-bit), and the BFM number of the Y-coordinate register is #9014 (32-bit). The operating status of the FX2N-20GM, such as ready/busy, positioning completed, and homing completed, is stored in auxiliary relays M9048 to M9096, with corresponding BFM numbers #23, #24, #25, and #26. Therefore, through the PLC's FROM instruction, the values of the current X and Y coordinate registers are read back to the PLC's data registers D110 to D111 and D112 to D113, and the values of the FX2N-20GM's operating status registers are read into the PLC's M100 to M131 registers for PLC control and displayed on the illustrated operation terminal. The corresponding PLC program is as follows: LD M8000 DFROM K0 K9004 D110 K1 DFROM K0 K9014 D112 K1 FROM K0 K23 K2M100 K1 FROM K0 K25 K2M108 K1 FORM K0 K24 K2M116 K1 FROM K0 K26 K2M124 K1 …… 2.3 Implementation of File Functionality Another important issue to be addressed in establishing a CNC system using FX2N-20GM and PLC modules is the file functionality for inputting, editing, and saving machining programs. Based on the characteristics of riveting, in the developed CNC riveting machine, we do not use G-code to represent the machining program. Instead, we input data related to the machining program in tabular form in the graphical operation terminal, such as the sequence, coordinates, and riveting time of each riveting point. This data is then saved as a file to the PLC's power-off data retention unit. Machining data for different parts can be saved in different files. When machining different parts, the corresponding files can be easily retrieved and used. Based on actual production needs, 100 machining programs need to be saved, each program file can store 24 points of machining data. To realize the file function, three file-related sections are first established in the PLC's data unit: the first is the file saving area, the second is the file editing area, and the third is the running file area. The first section is the 7K power-off retention unit starting from D1000, divided into 100 segments, each segment storing one machining program. The second section, D120~D191, serves as the file editing area. When editing a machining program, the corresponding file data is copied from the file area to the temporary file area using the block move instruction via index V2. Then, the machining program is edited through the graphical operation terminal. When the edited file is finished and the modified file needs to be saved, the block move instruction is used again to save the edited machining program file from the temporary file area back to the corresponding file area. Establishing a dedicated file editing area avoids directly modifying the file in the file saving area before editing and saving the file. The third section is the currently running program file area, D400~D471. When a machining program needs to be run, the corresponding file data is copied from the file area to the running file area using the block move instruction via the index V. During machining, the PLC program retrieves machining parameters such as X and Y coordinates, speed, and riveting time from this section and sends them to the FX2N-20GM to control the movement of the riveting machine's worktable. 2.4 Implementation of Human-Machine Interaction Function The human-machine interaction is implemented using Mitsubishi's graphical operation terminal F940GOT. The machining program is programmed through the graphical operation terminal. Depending on the part, the coordinates of each riveting point, the riveting time of each point, and the movement speed are input. At the same time, the working status of the CNC riveting machine, such as the current coordinates, servo system status, riveting head status, ejection, clamping, and output, can be displayed in real time on the graphical operation terminal. 3 Conclusion This paper introduces the CNC system of the riveting machine developed by us using Mitsubishi motion control unit FX2N-20GM, PLC and graphic operation terminal, etc. It has the characteristics of good economy, high reliability and stable quality. It has been used on multiple CNC riveting machines developed by us for a factory in Shenzhen that specializes in producing copier and printer parts for well-known brands. These CNC riveting machines have been put into production for more than two years. Compared with the manually operated riveting machine, the productivity has increased by 5 to 7 times and the quality has also been greatly improved. References [1] Liu Jun. Correct design of swing cold riveting machine [J]. Mechanical Design and Manufacturing, 1995.5:36-41. [2] FX2N-10GM and FX2N-20GM hardware programming manual [M]. Mitsubishi Corporation, Japan, 2000.2 [3] FX series programmable controller programming manual [M]. Mitsubishi Corporation, Japan, 2000.8 [4] F940GOT graphic operation terminal operation manual [M]. Mitsubishi Corporation, Japan, 2000.8 [5] Peng Yanwu, ed. Computer Numerical Control Systems [M]. Northwestern Polytechnical University Press, 1988.5