First, the benefits of ramping milling
Benefit 1: Improve processing efficiency
When milling keyways in solid materials, most of them are first drilled with a drill, and then milled in layers. In ramp milling, the tool directly enters the solid material to remove material, which reduces the tool change time and improves efficiency.
Benefit 2: Improve tool life.
In the processing of difficult materials, work hardening is prone to occur, resulting in old wear of a certain part of the blade.
So how to solve this problem? For Qingfeng, I gave a simple solution: adjust the depth of cut (Ap) in the processing parameters, that is, don't always let the blade contact with the hardened skin in one place. And the tool path of ramping and milling is exactly in line with this.
Second, why use macro programs?
The ramping and milling program is very simple, and we can easily handle it with ordinary programming by hand. Why do we need to use macro programs?
Benefit 1: Streamlined procedures
If the slot is deep, no matter the program processed by the software or your manual ordinary programming, the program is too long, while the macro program is short and concise.
Benefit 2: It is convenient for workers to debug on site
I know that the correct program written by the programmer will have more or less problems during on-site debugging, such as the unreasonable depth of cut and the need to reduce the depth of cut on the slope, then the macro program can be completed only by assigning values to variables. However, many values of ordinary programs need to be modified.
Benefit 3: Good program versatility
The biggest feature of the macro program is its good versatility. For example, there may be N many parts in the workshop, with similar shapes and different sizes, so writing a program can satisfy N many products.
Third, how to write the program of [Ramping and Milling]?
1. Calculate the cutting depth of each knife #30
As shown in the above diagram, according to the Pythagorean Theorem TAN[#2]=#30/#7
The depth of each knife can be calculated #30=#7*TAN[#2]
2. Calculate the number of tool passes #31
The total depth is #11, then the number of tool passes can be calculated, that is, #31=#11/#30, that is, the total depth divided by the depth of each tool.
Here comes the problem, if the result of the division has decimals, such as 5.6 times, such as 5.1 times, etc., then the number of knife passes must be calculated as 6 times.
So #31=FUP[#11/#30]
Remark:
FUP means to turn the fractional part into an integer 1 and add it to the integer part.
For example, #31=5.06 The value after FUP[#31] operation is 6.
#31=0.01 Then the value after FUP[#31] operation is 1.
3. Calculate the actual cutting depth #32
When calculating the number of passes, the decimal part is taken as an integer. If it is calculated according to #30, then there will be overcut. How to calculate the actual depth of cut #32 per knife?
The answer is: the total depth divided by the number of passes is the actual depth of cut. i.e. #32=#11/ #31
4. Set knife point #24, #25
#24 The X coordinate value of the cutting center in the workpiece coordinate system
#25 The Y coordinate value of the cutting center in the workpiece coordinate system
Fifth, why do you need to calculate these variables in the first four steps?
For example, calculate the depth of cut per knife #30, with the depth of cut per knife, I can divide the total depth #11 by the depth of each knife to calculate the number of processing.
With the number of processing times, we can use the macro program statement to set the conditions, so that the program will continue to cycle processing until the processing reaches the size.
However, we rounded up the decimal part of the calculated number of processing times. If An is calculated according to the depth of cut per knife #30, then there will be overcutting, so the actual cutting per knife is calculated by dividing the total depth by the number of times of processing. depth.
The procedure is as follows:
%
#24=0
#25=0
#11=30
#2=5
#7=60
G0X#24Y#25 (the cutting point of the tool rapid traverse)
Z2.0
G01Z0.F200
#30=TAN[#2]*#7 (cutting depth each time)
#31=FUP[#11/#30] (divide the total depth by each cutting depth to calculate the number of cycles, [round up])
#32=#11/#31 (actual cutting depth each time)
#33=0 (count variable, this value starts counting from 0)
N10#33=#33+1 (the variable is incremented automatically, and the count value is increased by 1 each time the operation is performed)
G91G01X#7Z-#32F#9
X-#7
IF[#33LT#31]GOTO10 (when the value of the counting variable is less than the processing times, jump to the N10 block)
G0Z150.
M30
%
The program simulation is as follows:
picture
Well, let’s share so much, I hope to give you some inspiration, so that you can study in depth and improve your problem-solving ability.
Brother Jun's programming courses are not high-level, but difficult. Everything starts from practical work, allowing you to systematically learn my most practical programming skills, improve your professional technical level, and help you get a salary increase and promotion!





