This paper analyzes the current state of manufacturing in discrete manufacturing enterprises, focusing on scenarios suitable for implementing error-proofing technology in CNC machining. Using Siemens CNC systems as a case study, it examines the specific development and application of error-proofing programs. Practical verification shows that error-proofing technology effectively reduces human error during CNC program operations, highlighting its potential for widespread adoption.
01 Introduction
The CNC machining process involves two key stages: CNC program compilation and its application. While proper compilation of the CNC program is essential for ensuring product quality, the quality of the final product also hinges on the correct execution of the program. CNC program operation is typically carried out by CNC machine operators, who must complete several manual configuration steps. These include setting up the coordinate system, configuring tool parameters, and adjusting custom variables. Errors at any of these stages can result in quality issues, such as machine collisions and product overcutting, leading to significant financial losses for the company.
This challenge is particularly evident in discrete manufacturing companies that produce a wide variety of products in small batches. Unlike mass production, which allows for thorough debugging of NC programs and the possibility of unmanned automated processing, discrete manufacturing requires active participation from machine operators. They often need to perform setup and debugging tasks manually.
To mitigate the quality issues arising from manual setup errors in NC programs used in discrete manufacturing, research is ongoing into error-proofing technologies aimed at reducing quality risks.
02 Overview of Error-Proofing Technology
To minimize human errors, particularly setting errors during CNC program execution, there are generally two approaches. The first is full automation, where all processes are programmed, and the entire operation is completed through computer recognition and judgment. This model represents a fully automated production line. However, it has significant limitations regarding the types of products it can produce and is not suitable for the small-batch production model commonly used by discrete manufacturing companies.
The second approach is to implement error-proofing technology to prevent operator mistakes. However, since humans possess subjective thoughts and consciousness, it is impossible to completely eliminate errors. Therefore, finding ways to reduce the likelihood of errors and manage their probability is a key concern for most technical personnel in manufacturing companies.
CNC program error-proofing technology involves using pre-set programs, parameters, and algorithms to predict and control errors during custom CNC machining. The CNC machining error-proofing process is illustrated in Figure 1. There is typically significant risk involved in directly applying parameter settings for CNC machining, as any incorrect settings can lead to quality issues. With the implementation of error-proofing technology, error-proofing instructions are added to the CNC program. The CNC machine tool verifies the parameters set by the operator against preset logical judgment conditions. If any settings exceed the predetermined conditions and are deemed incorrect, the CNC program instructs the machine tool to refrain from processing and alerts the operator with a setting error message.
Implementing error-proofing technology allows for effective interception of human errors at minimal cost. Thus, it becomes a highly efficient and budget-friendly solution for preventing product quality issues stemming from human error.
03 Application Scenarios of Error-Proofing Technology
The key to error-proofing technology in CNC machining is to design CNC programs that incorporate logical judgment conditions. The operator’s input values are compared with the theoretical values. If the values fall within the specified tolerance range, the cutting program segment is allowed to execute. If not, the cutting program segment is prevented from executing, and an error message is displayed. While error-proofing technology in CNC machining cannot completely eliminate all types of errors, it can effectively address specific processes that meet certain criteria. Common errors can generally be categorized as coordinate system setup errors, tool parameter setting errors, custom variable input errors, and other occasional errors. Error-proofing technology can effectively tackle issues related to workpiece coordinate systems, tool parameters, and custom variable settings.
3.1 Workpiece Coordinate System Setup Error-Proofing
Before operating a CNC machine tool, it is essential to set the workpiece coordinate system. This can be accomplished either manually or automatically.
Manually setting the workpiece coordinate system involves a few steps: first, the tool must be manually positioned, then the coordinates of the tool point in the workpiece coordinate system are calculated, and finally, the zero offset values for the corresponding coordinate system are entered manually.
On the other hand, automatically setting the workpiece coordinate system utilizes the on-machine measurement function, which measures the tool reference with a probe. The NC program will then automatically calculate and adjust the zero offset values for the corresponding coordinate system.
There are risks associated with both methods. Manual setting can lead to calculation and entry errors, while automatic setting may encounter measurement anomalies. These risks could result in incorrect workpiece coordinate system settings and negatively impact machining quality.
To effectively error-proof the workpiece coordinate system, it is crucial to know its position within the machine tool coordinate system beforehand. Therefore, error-proofing can only be applied to workpiece coordinate systems that meet these specific requirements. This applies to the following situations:
1) The workpiece coordinate system is set at the worktable rotary center, such as on a boring machine or machining center.
2) In batch part processing, the workpiece is always located at a fixed position relative to the machine tool.
3) The workpiece is located at a known height relative to the worktable or at a known height relative to the worktable.
4) When the angular reference is determined by specifying features, such as determining the angular zero point by a hole or a plane.
3.2 Tool Parameter Setting
Due to manufacturing errors, wear during use, and various other factors, tool parameters often deviate from their theoretical values. Quality issues frequently occur during CNC machining as a result of incorrect tool parameter settings. Research into technologies for preventing tool parameter setting errors can significantly reduce the occurrence of these problems.
Prevention of tool parameter setting errors can be categorized into two main areas: verifying correct tool assignment and ensuring that the tool parameters meet the machining accuracy control requirements. This mainly involves the following scenarios:
1) Determining whether the tool is correctly assigned based on the tool diameter parameter.
2) Determining whether the tool is correctly assigned based on the tool T and D codes.
3) Controlling contour accuracy through tool radius compensation.
4) Controlling dimensional accuracy along the tool axis through the tool length parameter.
3.3 Custom Variable Setting
During CNC programming, parametric programs are often created using custom variables to enhance flexibility and versatility. These custom variables can be modified during actual machining to control the program’s trajectory, allowing for more adaptable machining processes. However, while custom variables provide this flexibility, they can also introduce safety risks. Incorrect assignments of custom variables may lead to machining quality issues. Therefore, research is needed to develop error-proofing methods for custom variable settings.
To address this, the program automatically determines the range of acceptable values for each variable. If a value exceeds the predefined range, the program will not execute, and an alert will be sent to the operator to confirm the variable assignment. This error-proofing technology for custom variables is essential in CNC programming, ensuring safe and effective variable management. Common application scenarios include the following:
1) Controlling the finishing trajectory using coordinate system offsets.
2) Controlling layered machining using custom variables.
3) Controlling the number of features to be machined in an array using custom variables.
4) Integrating measurement and machining, using measurement results for machining.
04 Error-Proofing Programming Methods
Using the Siemens CNC system as an example, this section explains how to create error-proof CNC programs for various applications. Other CNC systems can adopt this method for developing error-proof programs.
4.1 Workpiece Coordinate System Setting Error-Proofing Programming Methods
The main difference between CNC programs with error-proofing for setting the CNC turned components coordinate system and conventional CNC programs is that machining does not start immediately after the coordinate system is set. Instead, the program first goes through a series of error-proofing instructions. Machining will only proceed to the next step if all the machining conditions are met. If the conditions are not met, machining is aborted, and an error message is displayed. The workflow for workpiece coordinate system error-proofing is illustrated in Figure 2.
As illustrated in Figure 2, the workpiece coordinate system error prevention instruction primarily assesses whether the deviation between the “set value” and the “theoretical value” of each axis’s zero point in the workpiece coordinate system falls within the allowable range. Since the conditional judgment statement relies on the coordinate system zero point offset value, it should be placed after the coordinate system instruction and before the cutting program segment. Additionally, the alarm statement should be positioned at the end of the program. The format of the workpiece coordinate system error prevention program is presented in Table 1.
4.2 Tool Parameter Setting Error-Proofing Program Compilation Method
The format of the tool parameter setting error-proofing program is similar to that of the workpiece coordinate system setting error-proofing program. The process is shown in Figure 3.
Typically, tool parameters are measured and established before machining begins. When adjustments to tool parameters are necessary for compensation, machining is carried out only after these adjustments have been made. Previously, the process of determining tool parameters and using them for machining relied on manual verification, which lacked automated technology. Tool parameter error-proofing technology effectively addresses this issue.
The introduction of tool parameter error-proofing instructions adds an intelligent error-proofing step to the tool usage process. If the actual tool parameters do not match the theoretical parameters or exceed the allowed deviation range, the program automatically halts machining and displays an error message.
As illustrated in Figure 3, the main components of the tool parameter error-proofing instructions include a conditional statement that checks whether the deviation between the actual and theoretical tool parameter values falls within the specified range, along with an alarm statement. Because the conditional statement requires the input of tool parameters, it should be written after the tool call instructions (T and D) and before the cutting block. The alarm statement is typically positioned at the end of the program. The format of the tool parameter error-proofing program is outlined in Table 2.
4.3 Custom Variable Setting Error Prevention Programming Method
The custom variable setting error prevention program verifies whether the custom variables are correctly configured. The process is illustrated in Figure 4. A checking step for the CNC machine tool is incorporated between the setting of the custom variables and their use. Only those variables that meet the specified conditions are permitted for processing. If a variable does not meet the conditions, an error message will be displayed, prompting corrections and a subsequent recheck of the variables.
The main components of the custom variable setting error prevention program include a conditional statement that checks whether the deviation between the custom variable’s “actual value” and “theoretical value” falls within a specified range. Additionally, there is an alarm prompt statement.
Since the conditional statement requires the current value of the custom variable, it should be placed after the variable assignment and before the cutting program segment. The alarm prompt statement is typically located at the end of the program.
The format of the custom variable setting error prevention program is outlined in Table 3.
05 Application of Error-Proofing Technology
A batch of rotary parts was processed using a vertical five-axis machining center equipped with a Siemens CNC system. The process requirements stipulated that the rotational center of the workpiece must align with the rotational center of the machine table. During the finish machining of these parts, the machining coordinate system was established at the workpiece’s rotational center. A φ40 mm milling cutter was employed to ensure machining accuracy by adjusting the tool radius compensation.
In prior practices, after clamping and calibrating the workpiece, the machine operator would manually set the tool to align with the workpiece coordinate system. During finish machining, a trial cut was performed to allow for machining allowance. Based on the results measured, the tool radius compensation value was adjusted before the final finishing stage. Throughout the entire machining process, critical steps in maintaining product quality—specifically setting the workpiece coordinate system and adjusting the tool radius compensation—relied heavily on the machine operator. Any misconfiguration could lead to quality issues.
For this machining scenario, implementing CNC machining error-proofing technology can effectively resolve these concerns. Analysis has confirmed that it is suitable for error-proofing both the workpiece coordinate system and the tool parameter settings. A CNC program that incorporates error-proofing functionality has been developed (refer to Table 4). Before programming, the theoretical coordinates of the rotation center of the machine tool’s worktable were determined to be X = 1584.280 and Y = 988.445. As shown in Table 4, four conditional statements are defined for the workpiece coordinate system, along with one conditional statement for the tool radius compensation value. If none of these conditions are fulfilled, the cutting block is executed; otherwise, the program will skip to the prompt message at the end without executing the cutting block.
During the debugging of the NC program, we simulated a real machining error scenario and set the X-axis zero offset for the G55 coordinate system to 1584.20. This value differs by 0.08 from the theoretical value of 1584.28, which exceeds the allowable deviation range. As a result, the conditional statement was triggered, and the verification of the CNC custom machining error-proofing program is illustrated in Figure 5. Upon executing the program, it immediately displays a prompt message, and the machine tool window indicates the error message: “G55 IS INCORRECT, PLEASE CHECK.” By adjusting the X-axis zero offset to fall within the acceptable range and re-running the program, we were able to execute the cutting program normally and successfully complete the machining process.
By adding error-proofing instructions for coordinate system and tool parameter settings to this case, we can effectively prevent operator errors during setup, ensuring product quality.
06 Conclusion
In response to the recurring quality issues in CNC programs caused by operator setting errors, this study explores error-proofing technology. It outlines the application scenarios for this technology and clarifies the methods for creating CNC programs with built-in error-proofing features.
Field commissioning tests of the error-proofing CNC program revealed that when an operator makes a setting error, the program effectively identifies the mistake. During its execution, the program skips the machining process and directly jumps to the error-reporting section. The error then appears on the machine tool panel, successfully achieving its intended purpose.
If you want to know more or inquiry, please feel free to contact info@anebon.com
At Anebon, we believe in the values of innovation, excellence, and reliability. These principles are the foundation of our success as a mid-sized business that provides customized CNC components, metal stamping products, and die casting parts for various industries such as non-standard devices, medical, electronics, auto accessories, and camera lenses.