Products Catalogue Home     |     About Us    |     Retrofit     |     Download     |     News     |     Tech Support     |     Contact Us     |     
ppr fittings-NF-4011-Newsun Industry Co., Ltd
Home > Tech Support >

How to improve macro programming by drawing

How to improve your programming skills?
The method is: drawing
What picture to draw?
Draw tool path diagram
Today I emphasize this big trick again from the aspect of milling:
Draw a tool path diagram
This big move is already a super big move. However, some people may say that this method is nothing, and they have heard of it a long time ago.
Yes, knowing does not mean it will be effective.
When you draw the tool path diagram, you can intuitively see the tool path trajectory, so you can look down on the part programming from the perspective of an eagle, and you can also study the details of each step of the tool with the eyes of a mouse.
So how is this trick applied in programming?
Give an example of number milling:
For the following parts, the inner hole with a diameter of D149.2 and a depth of 10 requires machining the bottom plane of the inner hole.
The tool path diagram is as follows: Use spiral interpolation to lower the tool, and then mill to the size from the inside to the outside circle by circle.
This tool path program consists of two parts:
1. Spiral interpolation cutting program
2. Milling inner hole bottom surface program
I have shared the programming ideas about spiral interpolation milling, so I won’t repeat them here.
The program of direct upward spiral interpolation milling is as follows:
G00 X#24 Y0
After the spiral cutting is completed, the tool Z=-10 has been spirally interpolated to the bottom plane of the hole. At this time, a full circle is milled, and then the inner hole is milled. The tool path is as shown in the figure below:
Mill a circle, then X moves by one step, and then mill a full circle, and so on to the final size of the drawing.
From the above tool path diagram, it is easy to see that the X value is constantly changing.
How does it change?
That is to move one step in the X direction, if the variable #2 is set to represent the step (the distance of each movement in the X direction, that is, the step).
If the moving distance is 80% of the tool diameter, then:
#2=#2+0.8 *#11
Remarks: #11 is the tool diameter variable I set arbitrarily when writing the spiral interpolation milling program.
In this way, the increment of variable #2 is used to move the step distance.
Since the set variable #2 represents the step distance, the movement of the step distance is realized through variable increment operation.
So what is the scope of #2? Or in other words, at which coordinate point does the variable #2 start to move, and at which point coordinate does the increment operation end?
Variables set in the tool path diagram above:
#24 Spiral interpolation cuts the tool to the bottom plane of the hole. At this time, milling a full circle is the variable coordinate in the X direction, which is the initial cutting point of #2.
So: #2=#24
The same as #2=#2+0.8 *#11 auto-increment, that is to say, variable #2 auto-increment operation to the size of 66.6, the circle is processed to size.
From this, it is easy to contact the macro statements that Jun brother has said before, such as WHILE []DO statements
With the above simple analysis, the low plane milling procedure is as follows:
Okay, let's share the small case I gave today.
Everyone must remember: the case is not important, the method I taught is very important.
Brother Jun, I still have many good methods and tricks, which I will talk about later.
Just the method of [drawing the tool path] taught today
There was once a master who used this method to optimize the tool path for mass-produced parts in the workshop. The cutting time of each part was saved by tens of seconds, and the annual output value of the factory was 100,000+
At the same time, he also figured out a way out for himself. From operating the machine before entering the technical department, then to the programming supervisor, everything in life is different.

—[Close]— —[ Back]— —[ Print]—