NEWS CENTER
Programming Skills for CNC Turning
Memo:1. Try to shorten the feed route as much as possible, reduce the empty tool travel, and improve production efficiency.(1) Skillfully use the starting point of the knife. In cyclic machining, according to the actual processing situation of the workpiece,
1. Try to shorten the feed route as much as possible, reduce the empty tool travel, and improve production efficiency.
(1) Skillfully use the starting point of the knife. In cyclic machining, according to the actual processing situation of the workpiece, the starting point and the tool setting point are separated. Under the premise of ensuring safety and meeting the needs of tool change, the starting point is kept as close as possible to the workpiece, reducing the idle tool travel, shortening the feed route, and saving execution time during the machining process.
(2) When programming complex contour machining programs, by reasonably arranging the "return to zero" route, the distance between the endpoint of the previous tool and the starting point of the subsequent tool should be as short as possible or zero, in order to shorten the feed route and improve production efficiency.
(3) When rough machining or semi precision machining, there is a large blank allowance, and appropriate cyclic machining methods should be adopted. While considering the rigidity and processing technology requirements of the processed parts, a short cutting feed route should be adopted to reduce idle travel time, improve production efficiency, and reduce tool wear.
2. Ensure the accuracy and surface roughness requirements of the processed parts.
(1) Reasonably select the starting point, entry point, and entry method to ensure a smooth and impactless entry process. To ensure the roughness requirements of the workpiece contour surface after processing, during precision machining, the final contour should be arranged for continuous machining in one pass after completion. Carefully consider the cutting and exit routes of the tool, and minimize tool stops at the contour to avoid sudden changes in cutting force causing elastic deformation and leaving tool marks. Generally, it is necessary to cut in and out along the tangential direction of the part surface, and try to avoid scratching the workpiece by entering or retracting the tool in the vertical direction of the workpiece contour.
(2) Choose a route where the workpiece undergoes minimal deformation after processing. For slender or thin sheet parts, the cutting process should be carried out several times to achieve the desired size, or the feeding route should be arranged using the symmetrical clearance method. When determining the axial movement size, the introduction length and exceeding length of the tool should be considered.
(3) For special parts, the processing process of "precision first and then coarse" is adopted. In some special cases, the processing process is not considered based on the principles of "near before far" and "coarse before fine", but rather a special treatment of "fine before coarse", which can better ensure the dimensional tolerance requirements of the workpiece.
3. Ensure the safety of the processing process
To avoid interference between the tool and the non machined surface, and to avoid collision between the tool and the workpiece. If there is a groove in the workpiece that needs to be processed, it should be noted during programming that the feed and retreat points should be perpendicular to the direction of the groove, and the feed speed cannot be used with the "G0" speed. The "G0" command should avoid using "X" and "Z" simultaneously when retracting the tool.
4. It is conducive to simplifying numerical calculations, reducing the number of program segments and programming workload
In actual production operations, it is common to encounter a fixed processing operation that repeats itself. This part of the operation can be written as a subroutine, stored in memory in advance, and called at any time as needed, making program writing simple and fast. For the programming of series parts with the same graphics, different sizes, or the same process path, but only different positional data, macro instruction programming can be used to reduce or even eliminate tedious numerical calculations during programming, and simplify the program volume.
Accurately grasp the processing characteristics of various cyclic cutting instructions and their impact on the machining accuracy of the workpiece, and make reasonable choices.
In the FANUC0-TD CNC system, the CNC lathe has more than ten types of cutting cycle processing instructions, each with its own processing characteristics. The machining accuracy of the workpiece after processing also varies, and their respective programming methods are also different. When choosing, we should carefully analyze and choose reasonably to strive to process high-precision parts. There are two machining instructions for thread cutting cycle machining: G92 straight cutting and G76 oblique cutting. Due to the different feeding methods of cutting tools, these two machining methods are different, and their programming methods are also different, resulting in different machining errors. The machining accuracy of thread segments after workpiece processing is also different. The G92 thread cutting cycle adopts a straight feed method for thread cutting. The pitch diameter error of the thread is relatively large. But the tooth shape accuracy is relatively high, and it is generally used for the processing of small pitch high-precision threads. The processing program is long and requires frequent measurement during processing; The G76 thread cutting cycle adopts a diagonal feed method for thread cutting. Poor tooth shape accuracy. But the craftsmanship is relatively reasonable and the programming efficiency is high. This machining method is generally applicable to the machining of large pitch and high-precision threads. In the case of low requirements for thread accuracy, this machining method is more simple and convenient. So, we need to grasp the processing characteristics and application range of each, and select these cutting cycle instructions correctly and flexibly based on the processing characteristics of the workpiece and the required accuracy of the workpiece. For example, if high-precision and large pitch threads need to be machined, a mixed method of G92 and G76 can be used, that is, first rough machining the threads with G76, and then fine machining with G92. It should be noted that the starting point of the cutting tool during rough and fine machining should be the same to prevent the occurrence of threads being twisted.
Flexible use of special G codes to ensure the processing quality and accuracy of parts
1. Return to reference points G28 and G29 instructions
The reference point is a fixed point on the machine tool, and the tool can easily move to this position by returning to the function through the reference point. The reference point is mainly used for automatic tool change or coordinate system setting. Whether the tool can accurately return to the reference point is an important indicator to measure its repeated positioning accuracy, and is also a prerequisite for ensuring dimensional consistency in CNC machining. In actual processing, cleverly utilizing the return reference point instruction can improve the accuracy of the product. For machine tools with high repeated positioning accuracy, in order to ensure the machining accuracy of the main dimensions, the tool can first return to the reference point and then run back to the machining position before machining the main dimensions. The purpose of doing so is actually to recheck the benchmark to determine the dimensional accuracy of the machining.
2. Delay G04 command
The delayed G04 instruction is used to artificially temporarily restrict the running of machining programs. In addition to common general usage situations, in actual CNC machining, the delayed G04 instruction can also be used for some special purposes:
(1) In the processing of parts with short processing time in large quantities, the start button is frequently used. To reduce operator fatigue or incorrect actions caused by frequent buttons, the G04 command is used to replace the start of the parts after the first piece. The delay time is set based on the loading and unloading time for completing one part. After the operator proficiently grasps the CNC machining program, the delay command time can be gradually shortened, but a certain safety time must be ensured. The part processing program is designed as a loop subroutine, and the G04 instruction is designed in the main program that calls the loop subroutine. If necessary, the design selects the planned stop M01 instruction as the end or check of the program.
(2) When tapping the center thread with a tap, it is necessary to use an elastic cylinder chuck to tap the thread to ensure that the tap does not break when tapping to the bottom of the thread. A G04 delay command is set at the bottom of the thread to allow the tap to perform non feed cutting processing. The delay time should ensure that the spindle stops completely, and after the spindle stops completely, it should be reversed at the original forward rotation speed, and the tap should retreat at the original lead.
(3) When there is a significant change in the spindle speed, the G04 command can be set. The purpose is to stabilize the spindle speed before cutting the parts to improve the surface quality of the parts.
3. Relative Programming G91 and Good Programming G90 Instructions
Relative programming is based on the position of the tool tip as the coordinate origin, and the tool tip is programmed with displacement relative to the coordinate origin. That is to say, the coordinate origin of relative programming is often changing, and the displacement is controlled based on the current tool tip point. Therefore, continuous displacement inevitably generates cumulative errors. Good programming has a relatively unified reference point, i.e. the coordinate origin, throughout the entire machining process, so its cumulative error is smaller than that of relative programming. When CNC turning, the accuracy of the radial dimensions of the workpiece is higher than that of the axial dimensions. Therefore, when programming, the radial dimensions should be well programmed. Considering the convenience of processing, the axial dimensions should be relatively programmed. However, for important axial dimensions, good programming can also be used. In addition, to ensure certain relative positions of the parts, relative programming and flexible use of programming should be carried out according to process requirements.
In short, with the rapid development of science and technology, CNC lathes have become increasingly widely used in the mechanical manufacturing industry due to their superior processing characteristics. In order to fully utilize the role of CNC lathes, we need to master certain skills in programming, develop reasonable and efficient processing programs, and ensure that qualified workpieces meet the requirements of the drawings are processed, At the same time, it can enable the reasonable application and full play of the functions of CNC lathes, enabling them to work safely, reliably, and efficiently.
(1) Skillfully use the starting point of the knife. In cyclic machining, according to the actual processing situation of the workpiece, the starting point and the tool setting point are separated. Under the premise of ensuring safety and meeting the needs of tool change, the starting point is kept as close as possible to the workpiece, reducing the idle tool travel, shortening the feed route, and saving execution time during the machining process.
(2) When programming complex contour machining programs, by reasonably arranging the "return to zero" route, the distance between the endpoint of the previous tool and the starting point of the subsequent tool should be as short as possible or zero, in order to shorten the feed route and improve production efficiency.
(3) When rough machining or semi precision machining, there is a large blank allowance, and appropriate cyclic machining methods should be adopted. While considering the rigidity and processing technology requirements of the processed parts, a short cutting feed route should be adopted to reduce idle travel time, improve production efficiency, and reduce tool wear.
2. Ensure the accuracy and surface roughness requirements of the processed parts.
(1) Reasonably select the starting point, entry point, and entry method to ensure a smooth and impactless entry process. To ensure the roughness requirements of the workpiece contour surface after processing, during precision machining, the final contour should be arranged for continuous machining in one pass after completion. Carefully consider the cutting and exit routes of the tool, and minimize tool stops at the contour to avoid sudden changes in cutting force causing elastic deformation and leaving tool marks. Generally, it is necessary to cut in and out along the tangential direction of the part surface, and try to avoid scratching the workpiece by entering or retracting the tool in the vertical direction of the workpiece contour.
(2) Choose a route where the workpiece undergoes minimal deformation after processing. For slender or thin sheet parts, the cutting process should be carried out several times to achieve the desired size, or the feeding route should be arranged using the symmetrical clearance method. When determining the axial movement size, the introduction length and exceeding length of the tool should be considered.
(3) For special parts, the processing process of "precision first and then coarse" is adopted. In some special cases, the processing process is not considered based on the principles of "near before far" and "coarse before fine", but rather a special treatment of "fine before coarse", which can better ensure the dimensional tolerance requirements of the workpiece.
3. Ensure the safety of the processing process
To avoid interference between the tool and the non machined surface, and to avoid collision between the tool and the workpiece. If there is a groove in the workpiece that needs to be processed, it should be noted during programming that the feed and retreat points should be perpendicular to the direction of the groove, and the feed speed cannot be used with the "G0" speed. The "G0" command should avoid using "X" and "Z" simultaneously when retracting the tool.
4. It is conducive to simplifying numerical calculations, reducing the number of program segments and programming workload
In actual production operations, it is common to encounter a fixed processing operation that repeats itself. This part of the operation can be written as a subroutine, stored in memory in advance, and called at any time as needed, making program writing simple and fast. For the programming of series parts with the same graphics, different sizes, or the same process path, but only different positional data, macro instruction programming can be used to reduce or even eliminate tedious numerical calculations during programming, and simplify the program volume.
Accurately grasp the processing characteristics of various cyclic cutting instructions and their impact on the machining accuracy of the workpiece, and make reasonable choices.
In the FANUC0-TD CNC system, the CNC lathe has more than ten types of cutting cycle processing instructions, each with its own processing characteristics. The machining accuracy of the workpiece after processing also varies, and their respective programming methods are also different. When choosing, we should carefully analyze and choose reasonably to strive to process high-precision parts. There are two machining instructions for thread cutting cycle machining: G92 straight cutting and G76 oblique cutting. Due to the different feeding methods of cutting tools, these two machining methods are different, and their programming methods are also different, resulting in different machining errors. The machining accuracy of thread segments after workpiece processing is also different. The G92 thread cutting cycle adopts a straight feed method for thread cutting. The pitch diameter error of the thread is relatively large. But the tooth shape accuracy is relatively high, and it is generally used for the processing of small pitch high-precision threads. The processing program is long and requires frequent measurement during processing; The G76 thread cutting cycle adopts a diagonal feed method for thread cutting. Poor tooth shape accuracy. But the craftsmanship is relatively reasonable and the programming efficiency is high. This machining method is generally applicable to the machining of large pitch and high-precision threads. In the case of low requirements for thread accuracy, this machining method is more simple and convenient. So, we need to grasp the processing characteristics and application range of each, and select these cutting cycle instructions correctly and flexibly based on the processing characteristics of the workpiece and the required accuracy of the workpiece. For example, if high-precision and large pitch threads need to be machined, a mixed method of G92 and G76 can be used, that is, first rough machining the threads with G76, and then fine machining with G92. It should be noted that the starting point of the cutting tool during rough and fine machining should be the same to prevent the occurrence of threads being twisted.
Flexible use of special G codes to ensure the processing quality and accuracy of parts
1. Return to reference points G28 and G29 instructions
The reference point is a fixed point on the machine tool, and the tool can easily move to this position by returning to the function through the reference point. The reference point is mainly used for automatic tool change or coordinate system setting. Whether the tool can accurately return to the reference point is an important indicator to measure its repeated positioning accuracy, and is also a prerequisite for ensuring dimensional consistency in CNC machining. In actual processing, cleverly utilizing the return reference point instruction can improve the accuracy of the product. For machine tools with high repeated positioning accuracy, in order to ensure the machining accuracy of the main dimensions, the tool can first return to the reference point and then run back to the machining position before machining the main dimensions. The purpose of doing so is actually to recheck the benchmark to determine the dimensional accuracy of the machining.
2. Delay G04 command
The delayed G04 instruction is used to artificially temporarily restrict the running of machining programs. In addition to common general usage situations, in actual CNC machining, the delayed G04 instruction can also be used for some special purposes:
(1) In the processing of parts with short processing time in large quantities, the start button is frequently used. To reduce operator fatigue or incorrect actions caused by frequent buttons, the G04 command is used to replace the start of the parts after the first piece. The delay time is set based on the loading and unloading time for completing one part. After the operator proficiently grasps the CNC machining program, the delay command time can be gradually shortened, but a certain safety time must be ensured. The part processing program is designed as a loop subroutine, and the G04 instruction is designed in the main program that calls the loop subroutine. If necessary, the design selects the planned stop M01 instruction as the end or check of the program.
(2) When tapping the center thread with a tap, it is necessary to use an elastic cylinder chuck to tap the thread to ensure that the tap does not break when tapping to the bottom of the thread. A G04 delay command is set at the bottom of the thread to allow the tap to perform non feed cutting processing. The delay time should ensure that the spindle stops completely, and after the spindle stops completely, it should be reversed at the original forward rotation speed, and the tap should retreat at the original lead.
(3) When there is a significant change in the spindle speed, the G04 command can be set. The purpose is to stabilize the spindle speed before cutting the parts to improve the surface quality of the parts.
3. Relative Programming G91 and Good Programming G90 Instructions
Relative programming is based on the position of the tool tip as the coordinate origin, and the tool tip is programmed with displacement relative to the coordinate origin. That is to say, the coordinate origin of relative programming is often changing, and the displacement is controlled based on the current tool tip point. Therefore, continuous displacement inevitably generates cumulative errors. Good programming has a relatively unified reference point, i.e. the coordinate origin, throughout the entire machining process, so its cumulative error is smaller than that of relative programming. When CNC turning, the accuracy of the radial dimensions of the workpiece is higher than that of the axial dimensions. Therefore, when programming, the radial dimensions should be well programmed. Considering the convenience of processing, the axial dimensions should be relatively programmed. However, for important axial dimensions, good programming can also be used. In addition, to ensure certain relative positions of the parts, relative programming and flexible use of programming should be carried out according to process requirements.
In short, with the rapid development of science and technology, CNC lathes have become increasingly widely used in the mechanical manufacturing industry due to their superior processing characteristics. In order to fully utilize the role of CNC lathes, we need to master certain skills in programming, develop reasonable and efficient processing programs, and ensure that qualified workpieces meet the requirements of the drawings are processed, At the same time, it can enable the reasonable application and full play of the functions of CNC lathes, enabling them to work safely, reliably, and efficiently.