Intelligent detection method and system for operation of numerical control lathe
By using identity recognition and multi-dimensional detection modules, automated detection and feedback of CNC lathe operation are achieved, solving the problem of non-standard workpiece and tool clamping during student operation and improving the safety and efficiency of practical training.
Patent Information
- Application Number
- CN202511075197.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-01
- Publication Date
- 2025-11-25
AI Technical Summary
In CNC lathe operation training, students' improper workpiece and tool clamping, tool setting errors and other operations cannot be detected in time, leading to processing accidents and low efficiency, and there is also the phenomenon of substitution of operations.
It employs an identity recognition module, a workpiece clamping detection module, a tool clamping detection module, and a tool setting parameter verification module. By combining multi-dimensional data fusion and intelligent decision-making, it can realize operator identity verification, automated detection and real-time feedback of workpieces and tools, and control machine tool start-up through a safety interlock module.
It improves the safety and training efficiency of CNC lathe operation, reduces machining accidents, ensures standardized operation, avoids substitution of operators, and enhances the training effect.
Smart Images

Figure CN121010477A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of numerical control machine tool operation processing education and safety control, and particularly relates to a numerical control lathe operation intelligent detection method and system. BACKGROUND
[0002] Numerical control machine tool operation processing is a skill that engineering college students need to master during their school period. In the process of students operating numerical control lathes for processing training, the workpiece is clamped, the turning tool is installed, the tool offset value is calculated, the machine door is closed, and the part processing starts. Each step needs to be operated and executed in place. In the process of students' actual practice operation, because students are not clear about the installation specifications of workpieces and tools and the tool setting method, the workpiece and tool clamping are often not standardized before starting part processing, resulting in various operation processing accidents or scrapped parts.
[0003] In the current machine tool operation training process, the teacher checks the operation of the student operator one by one, and cannot accurately and timely find and solve the problems such as insufficient clamping force of the tool and workpiece, tool wear, and tool setting error. Also, the operation steps cannot be reminded according to the operation progress of each student operator, which affects the efficiency of student training. In the process of student training, the phenomenon of replacing operation also easily occurs, which is difficult to ensure that each student actually operates the machine tool and masters the skills of machine tool operation. SUMMARY
[0004] The purpose of the present application is to provide a numerical control lathe operation intelligent detection method and system, which realizes the automatic detection and real-time feedback of machine tool operator identification, workpiece clamping, tool clamping, tool setting parameter verification, and safety state, reduces the accident rate of teaching, and improves the operation standardization and training efficiency.
[0005] To achieve the above purpose, the present application provides the following technical scheme: a numerical control lathe operation intelligent detection method and system, comprising an identity recognition module: for identifying the identity of the operator, extracting the face features under the shielding condition through the improved RetinaFace model, and comparing with the pre-registered identity library;
[0006] A workpiece clamping detection module: integrating a piezoelectric film sensor, a laser ranging unit, and an industrial vision unit, for real-time detection of clamping force, workpiece extension length, and clamping length;
[0007] A tool clamping detection module: for identifying and detecting the type and state of the tool;
[0008] A tool setting parameter verification module: for determining the correctness of the tool setting parameters;
[0009] Safety interlock module: install inductive proximity switch on machine door frame, detect door closed state, only when workpiece clamping, tool clamping, tool alignment verification, all detection items pass and the door is closed, the system outputs the signal to unlock the machine tool start permission.
[0010] Preferably, the identity recognition module comprises the following steps:
[0011] Deploy a camera in front of the machine operator, and real-time snapshot the operator when the operator clamps the workpiece, clamps the tool, aligns the tool, and starts the processing;
[0012] Extract the face features under the occlusion condition (wearing a mask / goggles) through the improved RetinaFace model (including occlusion attention subnetwork), and compare them with the pre-registered identity library;
[0013] Generate a unique operator ID for each processing task, and bind the identity data of each stage with the task ID. When a substitute operation is detected in each stage, trigger the "substitute operation" alarm, lock the machine tool, and record the event. Upload the violation record (including timestamp, snapshot, and operation steps) and notify the teacher end.
[0014] Preferably, the workpiece clamping detection module comprises the following components:
[0015] Integrate piezoelectric film sensors, laser ranging units, and industrial vision units to real-time detect clamping force, workpiece extension length, and clamping length;
[0016] Clamping force detection: piezoelectric film sensors are embedded in the clamping surface of the chuck jaw, distributed in array form, and real-time collect clamping force F 工件 , eliminate vibration noise when clamping the workpiece through adaptive filtering algorithm, dynamically match threshold F min and F max (automatically set according to workpiece material library);
[0017] Dynamic threshold calculation:
[0018] ① According to the workpiece material library (preset steel, aluminum, copper, stainless steel, etc.), automatically match the material yield strength σ 屈服 and friction coefficient μ;
[0019] ② Calculate the minimum / maximum safe clamping force threshold:
[0020] F min =(πD 2 σ 屈服 ) / 4K1 F max =μ﹒F min ﹒K2
[0021] Where D is the workpiece diameter, K1 and K2 are safety factors.
[0022] Length detection:
[0023] Extension length: A high-precision laser displacement sensor is installed in the axial direction of the chuck to measure the distance L1 between the front end of the workpiece and the end face of the chuck jaw;
[0024] Clamping length: An industrial camera extracts the clamping area profile through an edge recognition algorithm, calculates L2, and compares it with the safe clamping length;
[0025] Workpiece clamping judgment logic:
[0026] ① If F min <F 工件 <F max and L2≥0.8D 工件 (D 工件 is the diameter of the workpiece), it is determined that the clamping is qualified;
[0027] ② If any condition is not met, the system touch screen displays and voice prompts the specific abnormal item (such as "insufficient clamping force" or "short clamping length"), and prohibits the machine tool from starting.
[0028] Preferably, the tool clamping detection module comprises the following components:
[0029] A high-resolution industrial camera is installed directly above the tool holder table to take images of the tool tip area, classify the tool type based on the improved YOLOv5 model, and match the preset parameter library;
[0030] The preset tool parameter library includes the shape features and geometric parameters of external turning tools, slotting tools, thread tools, and other types of turning tools, as well as clamping force thresholds;
[0031] Real-time matching logic: After identifying the tool type, the corresponding standard extension length and clamping force threshold are automatically called;
[0032] Tool wear detection: The image segmentation network extracts the tool rake face wear area and calculates the wear area ratio W%, if W%≥5%, an alarm is triggered and the operator is reminded that "the tool has been worn out and needs to be replaced";
[0033] W% = (number of worn pixels / number of rake face area pixels) × 100%;
[0034] Tool extension tool holder transverse and longitudinal length detection: The transverse length L4 of the tool extension tool holder and the transverse standard extension amount L 横向标准 deviation is not more than 10mm, the longitudinal length L3 and the longitudinal standard extension amount L 纵向标准 deviation is not more than 2mm, if L4 or L3 is out of tolerance, the system reminds the operator that "clamping is wrong, please re-clamp";
[0035] Clamping force detection: the clamping force of the tool is dynamically matched according to the tool type, and meets: F 刀具min <F 刀具 <F 刀具max ;
[0036] Wherein, F 刀具min is the minimum safe clamping force threshold of the tool, F 刀具max is the maximum safe clamping force threshold of the tool.
[0037] Preferably, the tool setting parameter verification module includes the following components when verifying whether the tool setting data is correct or not:
[0038] △ Z向 =|Z 偏置 -Z 理论 |;△ X向 =|X 偏置 -X 理论 |;
[0039] Wherein, △ Z向 is the error of the Z-direction tool offset value, △ X向 is the error of the X-direction tool offset value, Z 偏置 is the Z-direction tool offset value of the operator performing the tool setting operation, X 偏置 is the X-direction tool offset value of the operator performing the tool setting operation, Z 理论 is the theoretical Z-direction tool offset value, X 理论 is the theoretical X-direction tool offset value, and the calculation formula is:
[0040] Z 理论 =-(L Z向 -L1-L3);X 理论 =-2(L X向 -L4);
[0041] Wherein, L Z向 is the Z-direction distance from the reference point on the tool holder to the jaw end surface after the tool holder returns to the machine tool origin, and L X向 is the X-direction distance from the reference point on the tool holder to the center of the machine tool spindle after the tool holder returns to the machine tool origin.
[0042] If △ Z向 >0.5mm and / or △ X向 >0.5mm, the operator's tool setting operation has an error, the system locks the machine tool, and outputs the warning "tool setting error"; if △ Z向 ≤0.5mm and △ X向 ≤0.5mm, the operator's operation is accurate, and the machine tool starts the operation.
[0043] Preferably, the safety interlocking module system records all detection data and operation records during operation, and only when the workpiece is clamped, the tool is clamped, the tool setting parameter is verified, all detection items pass and the machine tool door is closed, the system outputs a signal to unlock the machine tool start permission.
[0044] In summary, the technical effects and advantages of the present application are:
[0045] The present application identifies the operator's identity through the camera, and confirms the operator's identity in four stages of the operator clamping the workpiece, the operator clamping the tool, the operator setting the tool, and the operator closing the machine tool door to start the machining, thereby avoiding the phenomenon of replacing the operation; through the workpiece clamping detection stage, the clamping force detection and length detection are carried out, the clamping force size and clamping length of the workpiece are obtained in real time, and the accuracy of the workpiece clamping is ensured; through the detection of the tool clamping detection stage, the accurate identification of the tool, the tool wear detection, the analysis of the tool clamping force size and the deviation reminder of the tool clamping are realized, and the accuracy of the tool clamping is ensured; by comparing the error between the tool offset value of the student setting tool operation and the theoretical tool offset value, it is judged whether the tool setting operation is accurate, and the phenomenon of over-difference of the size of the machined part or the machining accident of tool collision in the machining process is avoided. The detection system of the present application set identity recognition, workpiece clamping, tool clamping, tool setting and machining start multi-modal detection, and each detection stage is related to each other, saves operation records and generates evaluation reports, can detect the operation of the student in real time, reduces the dependence on the teacher inspection, and improves the efficiency and safety of the practical training. BRIEF DESCRIPTION OF DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0047] Fig. 1 The present application is a system architecture schematic diagram.
[0048] Fig. 2 The present application is a system implementation flowchart.
[0049] Fig. 3 The present application is a tool offset detection schematic diagram. DETAILED DESCRIPTION
[0050] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0051] In the description of this disclosure, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," "outer," "top," and "bottom," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this disclosure and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this disclosure. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0052] In this document, the term "comprising" is intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0053] Example: Reference Figs. 1-3 The CNC lathe operation intelligent detection method and system shown includes the following steps:
[0054] 1. Identify the machine tool operator's identity through a camera, and photograph the operator at four stages: when the operator clamps the workpiece, when the operator clamps the tool, when the operator sets the tool, and when the operator closes the machine tool door and starts processing. This will help identify whether the operator is the same person and check for any instances of operator substitution.
[0055] The specific implementation is as follows:
[0056] A camera is deployed in front of the operator. Upon the operator's first login, the camera captures facial images from multiple angles with varying degrees of occlusion as pre-stored features. A 128-dimensional feature vector is extracted to generate a unique task ID, forming a pre-registered identity database. When the operator logs into the machine tool again, the facial image captured by the camera is compared with the pre-registered identity database to identify the operator's identity. After confirming the operator's identity information, machine operation begins. The operator is filmed during four stages: workpiece clamping, tool clamping, tool setting, and closing the machine door to begin machining. This process verifies whether the operator is the same person and checks for any instances of operator substitution. Specifically, this includes:
[0057] During the workpiece clamping stage, the industrial camera detects the operator's hand entering the three-jaw chuck area. The camera captures three frames of the operator's face image at 0.5-second intervals. The images are input into the RetinaFace model containing the occlusion attention subnet, and the facial features under occlusion conditions are extracted and output. The features are compared with the pre-stored features, and the cosine similarity S1 is calculated. If S1 ≥ 0.9, the workpiece clamping stage is entered; otherwise, an "identity mismatch" alarm is triggered, and the teacher is notified.
[0058] During the tool clamping stage, the piezoelectric sensor of the tool holder detects the tool installation action. The camera captures 3 frames of the operator's facial image at 0.5-second intervals. The images are input into the RetinaFace model containing the occlusion attention subnet, and the facial features under occlusion conditions are extracted and output. The features are compared with the pre-stored features, and the cosine similarity S2 is calculated. If S2 ≥ 0.9, the tool clamping stage is entered; otherwise, an "identity mismatch" alarm is triggered, and the teacher is notified.
[0059] During the tool setting phase, the industrial camera detects the movement of the machine tool holder. The camera captures three frames of the operator's face image at 0.5-second intervals. The images are input into the RetinaFace model containing the occlusion attention subnet, and the facial features under occlusion conditions are extracted and output. The features are compared with the pre-stored features, and the cosine similarity S3 is calculated. If S3 ≥ 0.9, the tool setting phase begins; otherwise, an "identity mismatch" alarm is triggered, and the teacher is notified.
[0060] During the initial processing phase, an inductive proximity switch installed on the machine tool door frame detects the machine tool door closing. A camera captures three frames of the operator's face at 0.5-second intervals. These images are input into a RetinaFace model containing an occlusion attention subnet, extracting and outputting facial features under occlusion conditions. These features are then compared with pre-stored features, and a cosine similarity S4 is calculated. If S4 ≥ 0.9, the part processing phase begins; otherwise, an "identity mismatch" alarm is triggered, and the teacher is notified. The consistency between the task ID and the operator's identity is verified by calculating dynamic weights. The calculation formula is: S... 总 = 0.2S1 + 0.2S2 + 0.5S3 + 0.1S4;
[0061] If S 总 If the value is ≤0.85, the facial feature recognition is deemed unsatisfactory, the task ID does not match the operator's identity, triggering an "identity mismatch" alarm, locking the machine tool, and uploading the record of the violation of substituting for another operator; S 总 If the value is greater than 0.85, then the task ID matches the operator's identity.
[0062] During machine tool operation, operators must wear masks and goggles. Traditional RetinaFace models suffer from low recognition accuracy. This embodiment employs a RetinaFace model with an occlusion attention subnet, which improves facial recognition accuracy under occlusion conditions. Upon initial login, facial features are extracted to form a pre-registered identity database for operator identification when logging into the machine tool. Identity verification is performed at four stages during machine tool operation, effectively preventing operator substitutions and ensuring operators master machine tool operation skills.
[0063] 2. Workpiece clamping and inspection.
[0064] The system integrates a piezoelectric thin-film sensor, a laser ranging unit, and an industrial vision unit to detect clamping force, workpiece extension length, and workpiece clamping axial length in real time. The specific implementation is as follows:
[0065] The laser ranging unit detects the distance between the front end of the workpiece and the end face of the three-jaw chuck using a high-precision laser displacement sensor, i.e., the workpiece extension length L1. The high-precision laser displacement sensor is installed in the chuck axial direction away from the end face of the three-jaw chuck. The industrial vision unit acquires images of the clamping area using an industrial camera and calculates the workpiece diameter D in the jaw gripping area using an edge recognition algorithm. 工件 The axial length L2 of the workpiece clamping mechanism is compared with the safe clamping length. Piezoelectric thin-film sensors are installed inside the jaws, in contact with the workpiece, and distributed in an array to collect the force F exerted on the workpiece by the three-jaw chuck jaws in real time. 工件 Dynamic matching threshold F min and F max The dynamic threshold is matched based on the materials used in the workpiece, such as steel, aluminum, copper, and stainless steel, and the yield strength σ of the material is automatically matched based on the workpiece material library. 屈服 The friction coefficient μ. The formula for calculating the dynamic threshold of clamping force is:
[0066] F min =(πD) 2 σ 屈服 ) / 4K1 F max =μ﹒ F min K2
[0067] Among them, F min F is the minimum safe clamping force threshold for the workpiece. maxWhere is the maximum safe clamping force threshold for the workpiece, D is the diameter of the workpiece, and K1 and K2 are safety factors.
[0068] The workpiece clamping determination logic is used to determine whether the workpiece clamping is qualified. The workpiece clamping determination logic is as follows:
[0069] F min <F 工件 <F max And L2≥0.8D 工件 If any condition is not met, the workpiece clamping is deemed unqualified. The system touch screen and voice prompt the operator that the workpiece clamping is unqualified, the machine tool is prohibited from starting, and the machine tool cannot be operated. The operator must re-verify their identity before clamping the workpiece again.
[0070] The system monitors the workpiece clamping stage. If insufficient clamping force or excessively short clamping length is detected, real-time alerts are provided via the system's touchscreen display and voice prompts. The system promptly reports and adjusts the system, eliminating the need for instructors to manually check each operator's actions, thus improving training efficiency and ensuring workpiece clamping accuracy. Once the workpiece clamping operation is successful, the system's touchscreen and voice prompts will guide the user to the next step. The system controls the operation progress based on the operator's actual performance, enhancing the training effect.
[0071] 3. Tool clamping inspection.
[0072] The tool type, tool wear, tool mounting position, and tool clamping force are inspected, and the specific implementation is as follows:
[0073] A piezoelectric force sensor is embedded in the contact surface between the bottom of the tool and the tool holder to measure the clamping force F of the tool on the tool holder. 刀具 If F satisfies: 刀具min <F 刀具 <F 刀具max If the tool clamping force meets the machine tool's operational requirements, proceed to the next operation. 刀具 If the clamping force threshold of the tool is not met, the system touchscreen and voice prompts an error warning of clamping force, and the tool needs to be re-clamped.
[0074] Among them, F 刀具min F is the minimum safe clamping force threshold for the cutting tool. 刀具max This is the maximum safe clamping force threshold for the cutting tool, and the threshold is set according to the tool type.
[0075] The shape characteristics of various machine tool types, such as external turning tools, grooving tools, threading tools, and facing tools, along with geometric parameters like principal cutting edge angle, secondary cutting edge angle, and tool tip angle, are input into the detection system to form a preset tool parameter library. An industrial camera positioned directly above the tool holder table captures images of the tool tip area, which are then input into a YOLOv5 model integrated with an SE attention module for training. This model identifies the tool tip parameters, matches them against the preset tool parameter library, and identifies the type of tool clamped on the machine tool. After identifying the tool type, the system automatically retrieves the corresponding standard extension amount and clamping force threshold.
[0076] The wear area on the tool rake face is extracted using an image segmentation network (U-Net), and the wear area percentage (w%) is calculated using the following formula:
[0077] W% = (Number of worn pixels / Number of pixels in the rake face area) × 100%;
[0078] If w% < 5%, the tool can be used normally. If w% ≥ 5%, the tool wear is too great and the tool cannot be used anymore. The system touch screen and voice prompt will issue a tool wear alarm.
[0079] An industrial camera captures images of the tool clamping device. The Canny edge detection algorithm is used to obtain the tool contour, and OpenCV image processing is used to identify the coordinates of the tool tip. The longitudinal and lateral distances from the tool tip to the tool holder reference point are detected, i.e., the longitudinal length L3 and lateral length L4 of the tool extending beyond the tool holder. These are compared with the standard extension of the same type of tool in a preset tool parameter library. The deviation must satisfy the following condition: the lateral length L4 of the tool extending beyond the tool holder is less than or equal to the standard lateral extension L4. 横向标准 The deviation shall not exceed 10mm (the specific deviation value can be flexibly adjusted according to the specific situation in actual application), and the longitudinal length L3 and the longitudinal standard extension L 纵向标准 The deviation should not exceed 2mm (the specific deviation value can be flexibly adjusted according to the specific situation in actual application); otherwise, the system touch screen and voice prompt will alarm that the tool clamping is not qualified, and the identity must be re-verified before clamping the tool. If the tool clamping is qualified, the system touch screen and voice will prompt you to proceed to the next operation.
[0080] The tool clamping detection module detects tool type identification, tool wear, tool installation position, and tool clamping force. If any detection fails, the system's touchscreen and voice will issue real-time alarms to help operators promptly identify and correct errors during operation, preventing accidents such as tool throwing and chipping caused by incorrect tool clamping and improving the safety of practical training operations. Clamping parameters are recorded by a data processor for easy traceability of operational data.
[0081] The detection threshold is automatically matched based on the material of the workpiece and the type of cutting tool.
[0082] 4. Tool setting parameter verification and testing. Students operate the machine tool to perform tool setting operations and obtain the Z-axis tool offset value Z. 偏置 and X-axis tool offset value X 偏置 The error is then compared with the theoretical tool offset value, and the specific implementation is as follows:
[0083] △ Z向 =|Z 偏置 -Z 理论 |△ X向 =|X 偏置 -X 理论 |;
[0084] Among them, △ Z向 The error is the tool offset value in the Z direction, △ X向 For the X-axis tool offset error, Z 理论 X is the theoretical Z-axis tool offset value. 理论 The theoretical X-axis tool offset value is calculated using the following formula:
[0085] Z 理论 =-(L Z向 -L1-L3); X 理论 =-2(L X向 -L4);
[0086] Among them, L Z向 L is the Z-axis distance from the reference point on the tool post to the end face of the chuck after the tool post returns to the machine tool origin. X向 This is the X-axis distance from the reference point on the tool post to the center of the machine tool spindle after the tool post returns to the machine tool origin.
[0087] If △ Z向 >0.5mm and / or △ X向 If the error is greater than 0.5mm, the error between the operator's tool offset value and the theoretical tool offset value is too large, indicating inaccurate operation. This can lead to out-of-tolerance parts or tool collisions during machining. The system touchscreen and voice prompts a "tool setting error" warning, locks the machine, and requires re-verification of identity before resuming the tool setting operation. If △ Z向 ≤0.5mm, and △ X向 If the error is ≤0.5mm, the error between the operator's tool offset value and the theoretical tool offset value is small, indicating accurate operation, and the machine tool can be started. By comparing the actual tool offset value data detected by the system with the data input by the operator in real time, errors in tool setting or calculations can be detected promptly, preventing operational accidents. The above △ Z向 >0.5mm and / or △ X向 >0.5mm, where the value of 0.5mm can be flexibly adjusted according to the specific situation in actual application.
[0088] 5. The system controls the machine tool's start-up through safety interlock logic. After the operator completes workpiece clamping, tool clamping, and tool setting operations, and all checks pass, the system uses an inductive proximity switch mounted on the machine tool door frame to detect the machine tool door's closed status. If the machine tool door is not closed, the system's touchscreen and voice prompts an alarm indicating that the machine tool door is not closed. Once the machine tool door is confirmed to be closed, the operator can start the machine tool and begin machining the part. The safety interlock logic, integrated with workpiece clamping, tool clamping, and tool setting verification, forms a closed-loop protection system for machine tool operation.
[0089] This system significantly reduces the accident rate for first-time machine tool operators and reminds them whether each step of the operation is in place and what the next step should be. It greatly improves the efficiency of students' practical training and eliminates the phenomenon of substitutes doing exercises during the training process.
[0090] Finally, it should be noted that the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method and system for intelligent detection of CNC lathe operation, characterized in that: include: Identity recognition module: used to identify the operator, extract facial features under occlusion conditions using an improved RetinaFace model and compare them with a pre-registered identity database; Workpiece clamping and detection module: integrates piezoelectric thin film sensor, laser ranging unit and industrial vision unit to detect clamping force, workpiece extension length and clamping length in real time; Tool clamping and detection module: identifies and detects tool type and status; Tool setting parameter verification module: used to determine the correctness of tool setting parameters; Safety interlock module: An inductive proximity switch is installed on the machine tool door frame to detect the door closure status. Only when the workpiece is clamped, the tool is clamped, and the tool setting verification is completed, and all detection items are passed and the door is closed, will the system output a signal to unlock the machine tool start-up permission.
2. The intelligent detection method and system for CNC lathe operation according to claim 1, characterized in that: The identity recognition module includes the following steps: A camera is deployed in front of the machine tool operator to capture images of the operator in real time during the four stages of clamping the workpiece, clamping the tool, setting the tool, and starting the machining process. Facial features under occlusion conditions were extracted using an improved RetinaFace model and compared with a pre-registered identity database. Each processing task generates a unique operator ID, and the identity data at each stage is bound to the task ID. If a substitute operation is detected at any stage, an "substitute operation" alarm is triggered, the machine tool is locked and the event is recorded, the violation record is uploaded, and the teacher's terminal is notified.
3. The intelligent detection method and system for CNC lathe operation according to claim 1, characterized in that: The workpiece clamping and detection module comprises the following components: It integrates a piezoelectric thin film sensor, a laser ranging unit, and an industrial vision unit to detect clamping force, workpiece extension length, and clamping length in real time. Clamping force detection: The chuck jaws have built-in piezoelectric thin film sensors. Specifically, multiple sets of piezoelectric thin film sensors are embedded in the clamping surface of the chuck jaws and distributed in an array to collect the clamping force F in real time. 工件 Vibration noise during workpiece clamping is eliminated through an adaptive filtering algorithm, and the threshold F is dynamically matched. min With F max ; Dynamic threshold calculation: ① Automatically match the material yield strength σ based on the workpiece material library 屈服 With the coefficient of friction μ; ② Calculate the minimum / maximum safe clamping force threshold: F min =(πD 2 s 屈服 ) / 4K1 F max =μ﹒F min ﹒K2 Where D is the workpiece diameter, and K1 and K2 are safety factors; Length detection: Extension length: A high-precision laser displacement sensor is installed in the axial direction of the chuck to measure the distance L1 between the front end of the workpiece and the end face of the gripper; Clamping length: The industrial camera extracts the contour of the clamping area through an edge recognition algorithm, calculates L2, and compares it with the safe clamping length; Workpiece clamping determination logic: ① If F min <F 工件 <F max and L2 ≥ 0.8D 工件 , it is determined that the clamping is qualified; ② If any condition is not met, the system touchscreen will display and voice prompts for the specific abnormality, and the machine tool will be prohibited from starting.
4. The intelligent detection method and system for CNC lathe operation according to claim 1, characterized in that: The tool clamping and detection module comprises the following components: A high-resolution industrial camera is installed directly above the tool holder table to capture images of the tool tip area. The tool type is classified based on the improved YOLOv5 model and matched with a preset parameter library. The preset tool parameter library includes the shape features, geometric parameters, and clamping force thresholds of various types of turning tools such as external turning tools, grooving tools, and threading tools. Real-time matching logic: After identifying the tool type, automatically call the corresponding standard extension length and clamping force threshold; Tool wear detection: The image segmentation network extracts the wear area on the tool rake face and calculates the wear area percentage W%. If W% ≥ 5%, an alarm is triggered and the operator is reminded that "the tool is worn and needs to be replaced". W% = (Number of worn pixels / Number of pixels in the rake face area) × 100%; Tool extension length from the tool holder: Lateral extension length L4 of the tool from the tool holder and the standard lateral extension amount L. 横向标准 The deviation should not exceed 10mm, and the longitudinal length L3 should be equal to the longitudinal standard extension L. 纵向标准 The deviation should not exceed 2mm. If L4 or L3 exceeds the tolerance, the system will remind the operator that "clamping is incorrect and needs to be re-clamped". Clamping force detection: The tool clamping force is dynamically threshold-matched based on the tool type, satisfying the following: F 刀具min <F 刀具 <F 刀具max ; Among them, F 刀具min F is the minimum safe clamping force threshold for the cutting tool. 刀具max This is the maximum safe clamping force threshold for the cutting tool.
5. The intelligent detection method and system for CNC lathe operation according to claim 1, characterized in that: The tool setting parameter verification module compares the error between the tool offset value performed by the operator and the theoretical tool offset value. Specifically: △ Z向 =|Z 偏置 -Z 理论 |;△ X向 =|X 偏置 -X 理论 |; Among them, △ Z向 The error is the tool offset value in the Z direction, △ X向 For the X-axis tool offset error, Z 偏置 X is the Z-axis tool offset value for the operator to perform tool setting operations. 偏置 Z is the X-axis tool offset value for the operator to perform tool setting operations. 理论 X is the theoretical Z-axis tool offset value. 理论 The theoretical X-axis tool offset value is calculated using the following formula: Z 理论 =-(L Z向 -L1-L3);X 理论 =-2(L X向 -L4); Among them, L Z向 L is the Z-axis distance from the reference point on the tool post to the end face of the chuck after the tool post returns to the machine tool origin. X向 The distance in the X direction from the reference point on the tool post to the center of the machine tool spindle after the tool post returns to the machine tool origin; If △ Z向 >0.5mm and / or △ X向 If the error is greater than 0.5mm, the operator's tool setting operation has an error, the system will lock the machine tool and output a "tool setting error" warning; if △ Z向 ≤0.5mm, and △ X向 If the error is ≤0.5mm, the operator's operation is accurate, and the machine tool can be started.
6. The intelligent detection method and system for CNC lathe operation according to claim 1, characterized in that: During the operation of the safety interlock module system, all detection data and operation records are recorded. Only when the workpiece is clamped, the tool is clamped, the tool setting parameters are verified, all detection items are passed, and the machine tool door is closed, the system outputs a signal to unlock the machine tool start-up permission.