Abstract: This paper introduces a new method for spindle positioning based on the Mitsubishi E60 CNC system. This method uses macro programs and multi-point indexing positioning instructions to achieve non-synchronous encoder positioning of non-directly connected spindles, which is of practical significance for machine tools with special requirements.
Keywords: CNC machine tool; spindle positioning; macro program; multi-point indexing instruction
1. Problem Statement
A customer's vertical special-purpose milling machine is equipped with a Mitsubishi E60 CNC system.
Its spindle drive model: MDS-B-SPJ2-75;
Spindle motor model: SJ-PF-7.5;
The spindle and spindle motor are connected by a synchronous gear belt with a reduction ratio of 2:1.
The spindle must be able to be positioned.
The Mitsubishi CNC system (E60) has the following limitations regarding spindle positioning:
(1) The spindle and spindle motor are connected 1:1, and the spindle can be directly positioned using the built-in encoder (PLG);
(2) When the spindle and spindle motor are not connected in a 1:1 ratio, the spindle built-in encoder (PLG) cannot be used for direct positioning. It is required to install an encoder (ENC) on the spindle to detect the actual position of the spindle. The signal of the encoder (ENC) is input to the "Synchronous Encoder Interface" of "Basic I/O" and positioning is achieved by using the synchronous encoder.
However, the customer's mechanical design and manufacturing were already completed, leaving no space to install a "synchronous encoder," and the machine tool still needed to implement spindle positioning to complete the retraction action after precision boring.
Given the customer's specific requirements, is it possible to achieve spindle positioning without using a "synchronous encoder"?
2. Brief Analysis of Spindle Positioning
Spindle positioning involves the control system detecting a "Z-axis pulse" from the spindle motor encoder (PLG) and stopping at the "Z-axis pulse" position. The spindle motor encoder emits one "Z-axis pulse" per revolution. When the spindle and spindle motor are connected in a 1:1 ratio, the spindle can be positioned at the "Z-axis pulse position." However, when the spindle and spindle motor are connected in a 2:1 ratio, the spindle may stop at two positions (referred to as "position 1" and "position 2"), which differ by 180°. The control system itself cannot determine which position it is positioned at. Therefore, the problem is not that the system cannot position itself, but rather that it needs to determine the positioning position. If the system cannot determine this internally, it can be done through external signal detection.
Assuming the required positioning position for machining is "position 1", if the positioning position is not in position 1 but in position 2, since the current position of the spindle is "position 1", a reference is available. Therefore, the "multi-point indexing positioning function" of the control system can be used to reposition the spindle to position "position 1".
Alternatively, by detecting its positioning and changing the subsequent processing flow, its processing requirements can also be met.
3. A new solution for spindle positioning
After communicating with the client, the following solution was decided:
1. Install a detection switch on the upper part of the spindle and use the detection signal to detect the actual position of the spindle positioning.
2. The problem of "secondary positioning" is solved by processing the PLC program and macro program.
4. Program processing in automatic and manual modes;
4.1 Macro Program Processing in Automatic Mode
In automatic machining mode, a positioning command is issued using M19. If the positioning is not in "position 1", it must be repositioned to reach "position 1".
For this kind of work requirement, it is more convenient to use macro programs:
The macro program is written as follows:
9100 --- Macro program number
N10M6 ------- Issues a "first positioning command"
N20IF[#1032EQ10]GOTO100----Location and position determination.
If the location is complete, proceed to the program termination step.
N30M11--------Set positioning values;
N40M16 --------- issues "indexing and positioning command";
N50M14---------Positioning value reset
N100M99-----Program ends;
Figure 1 shows the PLC program corresponding to the positioning macro program in automatic mode.
The PLC program corresponding to macro program 9100 is shown in Figure 1:
In the PLC program shown in Figure 1:
(1) X246 is a “positioning complete” signal issued internally by the system. The system issues this signal every time the “spindle motor” completes positioning. However, X246 is not the actual positioning completion signal of the “spindle”.
Steps 24-27 in the program are the "actual positioning completion signal - M280" and "positioning incomplete signal - M282" designed by the author;
(2) Steps 30-33 in the program transmit the positioning position judgment signal to file register R72. R72 is the interface between the PLC program and the macro program, corresponding to variable #1032 in the macro program.
(3) Step 36 of the program: When the positioning is not completed, use “positioning not completed signal ----- M282” to cut off the self-holding of Y2D6 (Y2D6---spindle positioning interface), and the “one-time positioning” command function issued by M6 ends.
(4) The macro program issues “positioning data setting command----M11” and “indexing positioning command----M16”.
The "indexing positioning command" allows the spindle motor to be positioned at any position within 360° (positioning accuracy 360/4096=0.09°), but "positioning data" must be set. The "positioning data" must be set in file register R149 in advance. Therefore, M11 must be issued before the M16 command is issued.
Step 42 of the program is to set data for R149.
Step 45 of the program issues the "Indication Positioning Command - Drive Y2D4"
Note that the driver for the Y2D4 interface should use pulse-type instructions, so that different positions can be located when different data is set.
4.2 PLC Programming in Manual Mode
The spindle positioning function must also be present in manual mode. This is to facilitate the operator in adjusting the tool position. The PLC program for manual spindle positioning is shown in Figure 2:
In the PLC program shown in Figure 2:
(1) Steps 0-6 are the same as in automatic mode;
(2) In step 9 of the program, when the positioning is not completed, a “gradient positioning command---M285” is issued using the “positioning incomplete signal---M282”.
The indexing positioning command allows the spindle motor to be positioned at any position within 360°, but the "positioning data" must be set in advance in the file register R149.
Step 17 of the program is to set data for R149 and issue the "indexing and positioning command - drive Y2D4".
5. Conclusion: This newly developed spindle positioning method fully meets the customer's requirements when used on the customer's machine tool.
The newly developed spindle positioning method has the following characteristics:
(1) The hardware configuration is simple and cost-saving. An encoder costs around 1,000 yuan, while a proximity switch costs less than 100 yuan.
(2) Easy to install, especially suitable for machine tools with very little space in the spindle section. The proximity switch only needs to be fixed with a simple mechanical bracket, while the encoder needs to be connected to the spindle through a coupling.
(3) High reliability. Proximity switches have only one input signal, while encoders have multiple signals, requiring the fabrication of dedicated cables. In particular, encoders are susceptible to interference from external signals (frequency converters, welding power supplies).
(4) Limited applicability: This method is only suitable for situations where the reduction ratio is an integer and the spindle is only required for positioning. It is not suitable for situations requiring rigid tapping, thread turning, or synchronous operation.
-------------over-------------------------
About the Author: Li Yongxiang, male, born in 1963, is an engineer. He has long been engaged in the applied research of industrial automation technology and CNC technology. He has published numerous papers on CNC application technology.