Automatic circulation machining method and system for numerical control roll lathe, terminal and medium
By using industrial cameras for image analysis during the automatic cycle processing of CNC roll truck, the problems of robot signal feedback reliability and residual foreign matter in the material trough area are solved, and automatic cycle processing with high precision and high reliability is achieved.
Patent Information
- Application Number
- CN202510219477.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-07-22
AI Technical Summary
During the automatic cycle processing of existing CNC rolling trucks, the signal feedback reliability and safety of the robot and CNC console are poor, and the residual foreign matter in the trough area before loading may cause the material processing to be insufficiently accurate.
After the mechanical loading and loading, the working area image is taken and image analysis is performed using an industrial camera to verify whether the loading is completed and whether the loading is correct, including pre-treatment, Otsu algorithm adaptive binarization and edge detection, to ensure that there are no residual materials and materials in the trough area correctly placed.
It improves the processing accuracy and reliability of automatic cycling processing, ensures the accuracy of each discharge and loading, avoids unqualified processing caused by residual foreign matter or incorrect loading, and improves production efficiency and product quality.
Smart Images

Figure CN120347231A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of numerical control machining, and particularly relates to an automatic cyclic machining method, system, terminal and medium for a numerical control roll lathe. Background Art
[0002] Ultra-large numerical control roll lathes are mainly used for machining ultra-large workpieces such as rolls, shafts, forgings, etc., and are widely used in heavy industries such as manufacturing, metallurgy, and shipbuilding. They have strong machining capabilities and can meet the machining requirements of various complex rolls. Since the machined workpieces are relatively large, it is difficult to load and unload the workpieces, and external equipment has to be used for loading and unloading. The traditional operation process is that after the workpiece is machined, the worker uses a traveling crane device to lift the workpiece away, and then lifts the blank workpiece in the loading area, installs it on the machine tool and then returns to the machine tool operation console to operate, and then starts machining. This method has low machining efficiency and cannot achieve automatic cyclic machining.
[0003] The prior art realizes the automatic cyclic machining of a numerical control roll lathe through a manipulator for loading and unloading. The manipulator communicates with the numerical control console, and realizes cyclic machining through a processing flow and signal transmission. During the process, after the machining is completed, the numerical control console sends a material changing instruction to the manipulator. After the manipulator completes the material change, it feeds back the material change completion signal to the numerical control console, and then the numerical control console performs machining again. In this process, the numerical control console responds to the feedback signal of the manipulator to execute the next machining, and the reliability and safety are poor. For example, if there are residual foreign objects in the material tank area before loading, it may cause inaccurate machining of the material. Summary of the Invention
[0004] To solve the above problems, the present invention provides an automatic cyclic machining method, system, terminal and medium for a numerical control roll lathe, which detects the loading and unloading states of the material tank area through image after the manipulator unloads and loads materials, ensures the machining accuracy of automatic cyclic machining, and improves the reliability and safety.
[0005] In a first aspect, the technical solution of the present invention provides an automatic cyclic machining method for a numerical control roll lathe, including the following steps: When the machining of the current material is completed, it is detected whether the tailstock is tightly clamped through the tailstock tight-in-place induction switch, and it is detected whether the roll lathe is in a safe position in the material changing area through the safety position switches of the X-axis and Z-axis; If the tailstock is tightly clamped and the roll lathe is in a safe position in the material changing area, the unloading instruction is transmitted to the manipulator through the gateway; When receiving the unloading completion signal fed back by the manipulator, control an industrial camera to capture a first image of the working area, and analyze the first image of the working area to verify whether the unloading is completed; If the result of verifying that the unloading is completed passes, the loading instruction is transmitted to the manipulator through the gateway; When receiving the signal indicating that the feeding by the manipulator is completed, control the industrial camera to capture the second image of the working area, and analyze the second image of the working area to verify whether the feeding is completed and whether the feeding material is correct; If the result of verifying that the feeding is completed and the material is correct passes, start the next processing.
[0006] In an alternative embodiment, analyze the first image of the working area to verify whether the discharging is completed, specifically including: Preprocess the first image, including grayscale processing, Gaussian filtering processing, and histogram equalization to enhance the contrast; Segment the chute area ROI from the first image according to the pre-defined chute area position; Adaptive binarization through the Otsu algorithm to separate the foreground and background of the chute area ROI, expressed as,
[0007] where, is the optimal grayscale threshold determined by the Otsu algorithm, is the coordinate at the grayscale value, is the value at the coordinate after binarization; Statistical foreground pixel ratio in the chute area ROI, expressed as,
[0008] If the foreground pixel ratio is greater than the preset ratio threshold, it indicates that there is residual material in the chute area, and the verification of discharging completion fails; otherwise, it indicates that there is no residual material in the chute area, and the verification of discharging completion passes.
[0009] In an alternative embodiment, analyze the second image of the working area to verify whether the feeding is completed and whether the feeding material is correct, specifically including: Preprocess the second image, including grayscale processing, Gaussian filtering processing, and histogram equalization to enhance the contrast; Align the second image with the preset template through the affine transformation alignment method to eliminate the perspective deviation; Segment the chute area ROI from the second image according to the pre-defined chute area position; Calculate the edge pixel density of the chute area ROI through the following formula ,
[0010] where, The result of the binary image obtained by edge detection using the Canny algorithm; If the edge pixel density is greater than the preset threshold, it is determined that the feeding is completed; Extract the direction gradient histogram features of the material, compare them with the template material, and calculate the similarity, expressed as
[0011] where, is the -dimensional feature value of the current material, is the -dimensional feature value of the template material; If the similarity is greater than the preset similarity threshold, it means that the feeding material is correct.
[0012] In an alternative embodiment, if the result of verifying that the feeding is completed and the material is correct is passed, the next processing is started, specifically including: If the result of verifying that the feeding is completed and the material is correct is passed, check whether the tailstock is tightened in place through the tailstock tightening in-place induction switch, and detect whether the liquid level of the headstock is not lower than the threshold through the headstock liquid level sensor; If the tailstock is tightened in place and the liquid level of the headstock is not lower than the threshold, start the next processing.
[0013] In an alternative embodiment, the method further includes When transmitting the unloading instruction to the manipulator through the gateway, control the preparation for material change indicator light to turn on; If the result of verifying that the unloading is completed and the material is correct is passed, control the material change completed indicator light to turn on.
[0014] In a second aspect, the technical solution of the present invention provides a numerically controlled roll lathe automatic cycle processing system, including An unloading condition detection module, used to detect whether the tailstock is tightened in place through the tailstock tightening in-place induction switch when the processing of the current material is completed, and detect whether the roll lathe is in a safe position in the material change area through the safety position switches of the X-axis and Z-axis; An unloading instruction issuing module, used to transmit the unloading instruction to the manipulator through the gateway if the tailstock is tightened in place and the roll lathe is in a safe position in the material change area; An unloading detection module, used to control the industrial camera to take the first image of the working area when receiving the unloading completion signal fed back by the manipulator, and analyze the first image of the working area to verify whether the unloading is completed; A loading instruction issuing module, used to transmit the loading instruction to the manipulator through the gateway if the result of verifying that the unloading is completed is passed; The loading detection module is used to control an industrial camera to capture a second image of the working area when receiving the signal indicating that the loading is completed fed back by the manipulator, and analyze the second image of the working area to verify whether the loading is completed and whether the loaded material is correct; The processing start module is used to start the next processing if the result of verifying that the loading is completed and the material is correct passes.
[0015] In a third aspect, the technical solution of the present invention provides a terminal, including: A memory for storing the automatic cyclic processing program of the numerically controlled roll lathe; A processor, which is respectively connected to the memory, the tailstock clamping in-place induction switch, the X-axis safety position switch, the Z-axis safety position switch, and the industrial camera, and is connected to the manipulator through a gateway, and is used to implement the steps of the automatic cyclic processing method of the numerically controlled roll lathe as described in any one of the above when executing the automatic cyclic processing program of the numerically controlled roll lathe.
[0016] In an optional embodiment, the processor is also connected to the spindle box liquid level sensor.
[0017] In an optional embodiment, the processor is connected with a ready-to-change-material indicator light and a material-change-completed indicator light.
[0018] In a fourth aspect, the technical solution of the present invention provides a computer-readable storage medium, on which an automatic cyclic processing program of the numerically controlled roll lathe is stored, and when the automatic cyclic processing program of the numerically controlled roll lathe is executed by a processor, the steps of the automatic cyclic processing method of the numerically controlled roll lathe as described in any one of the above are implemented.
[0019] An automatic cyclic processing method, system, terminal and medium of a numerically controlled roll lathe provided by the present invention, compared with the prior art, has the following beneficial effects: when receiving the signal indicating that the unloading is completed fed back by the manipulator, an industrial camera is used to capture an image of the working area and analyze it to verify whether the unloading is completed, that is, whether there are residual foreign objects after unloading, etc., and verify whether the loading is completed and the material is correct, ensuring the processing accuracy of the automatic cyclic processing, and improving the reliability and safety. When detecting the unloading, the first image is further preprocessed and adaptively binarized by the Otsu algorithm, and whether there is residual material is judged by counting the proportion of foreground pixels in the chute area, which can timely detect and eliminate factors affecting the processing accuracy such as residual foreign objects and incorrect materials in the chute, ensuring that the processed roll meets the quality standard and improving the product quality; when detecting the loading, whether the loading is completed is further judged by calculating the edge pixel density of the chute area, and the similarity is calculated by extracting the histogram of oriented gradients features of the material and comparing it with the template material to judge whether the material is correct, further ensuring the accuracy of the processing and avoiding wasting resources. Description of the Drawings To more clearly illustrate the technical solution of the present invention, the accompanying drawings required in the description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0020] Figure 1 It is a schematic flow chart of an automatic cyclic machining method for a numerically controlled roll lathe provided by an embodiment of the present invention.
[0021] Figure 2 It is a schematic block diagram of the structure of an automatic cyclic machining system for a numerically controlled roll lathe provided by an embodiment of the present invention.
[0022] Figure 3 It is a schematic diagram of the structure of a terminal provided by an embodiment of the present invention. Detailed implementation manners
[0023] To make the objectives, features, and advantages of the present invention more obvious and understandable, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the specific embodiments of the present invention. Obviously, the embodiments described below are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of this application.
[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs. The terms used in the description of the present invention in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0025] Figure 1 It is a schematic flow chart of an automatic cyclic machining method for a numerically controlled roll lathe provided by an embodiment of the present invention. Among them, Figure 1 The execution subject can be an automatic cyclic machining system for a numerically controlled roll lathe. The automatic cyclic machining method for a numerically controlled roll lathe provided by the embodiment of the present invention is executed by a computer device. Correspondingly, the automatic cyclic machining system for a numerically controlled roll lathe runs in the computer device. According to different requirements, the order of the steps in this flow chart can be changed, and some can be omitted.
[0026] As Figure 1 shown, the method includes the following steps.
[0027] S1, when the current material machining is completed, it is detected whether the tailstock is tightly clamped through the tailstock tight-in-place induction switch, and it is detected whether the roll lathe is in the safe position of the material change area through the safety position switches of the X-axis and Z-axis.
[0028] This step realizes the detection of the initial conditions for discharging materials after the processing of the current material is completed, including detecting the tailstock clamping state and the position of the manipulator. Specifically, a tailstock clamping in-place induction switch is used to determine whether the tailstock has been clamped in place, ensuring that the tailstock is tightly clamped to prevent the workpiece from loosening and displacing during the material loading and unloading process, avoiding machining accuracy deviation or equipment damage caused by workpiece shaking. At the same time, with the help of the safety position switches on the X-axis and Z-axis, it is detected whether the roll lathe is in a safe position in the material change interval to avoid collisions between the manipulator and other components of the equipment, ensuring the safety of the equipment and operators.
[0029] It should be noted that when the processing of the current material is completed, the CNC system processor sends a component replacement request signal, and the CNC system processor responds to this signal to detect whether the tailstock is clamped in place through the tailstock clamping in-place induction switch, and detects whether the roll lathe is in a safe position in the material change interval through the safety position switches on the X-axis and Z-axis.
[0030] S2. If the tailstock is clamped in place and the roll lathe is in a safe position in the material change interval, the discharging instruction is transmitted to the manipulator through the gateway.
[0031] This step realizes sending a discharging instruction to the manipulator when specific conditions are met. The discharging instruction is issued only after the states of the tailstock and the manipulator meet the safety requirements, ensuring that the discharging operation is carried out at a safe and appropriate time and preventing the accidental triggering of the discharging instruction.
[0032] S3. When the discharging completion signal fed back by the manipulator is received, control the industrial camera to take the first image of the working area and analyze the first image of the working area to verify whether the discharging is completed.
[0033] This step realizes the verification of discharging completion. On the one hand, it ensures that the material is definitely removed, and on the other hand, it ensures that there are no other foreign objects in the chute area to ensure the accurate execution of subsequent feeding and processing. After receiving the discharging completion signal fed back by the manipulator, control the industrial camera to take the first image of the working area. Analyze the first image to verify the discharging state, including performing gray processing, Gaussian filtering processing, and histogram equalization to enhance the contrast on the image in sequence, and then segment the chute area ROI according to the pre-defined position of the chute area. Then, perform adaptive binarization through the Otsu algorithm to separate the foreground and background of the chute area ROI, and count the proportion of foreground pixels in the chute area ROI. If the proportion of foreground pixels is greater than the preset proportion threshold, it indicates that there is residual material in the chute area and the verification of discharging completion fails; otherwise, it indicates that there is no residual material in the chute area and the verification of discharging completion passes. The analysis of the first image will be explained in detail later and will not be elaborated here.
[0034] In this embodiment, an industrial camera is used to capture images and perform a series of image processing and analysis operations, such as grayscale processing, Gaussian filtering, histogram equalization, Otsu algorithm adaptive binarization, etc., to accurately determine whether there is residual material in the hopper area. If there is residual material, it is detected and processed in a timely manner to avoid the influence of residual material on the subsequent feeding accuracy and processing quality, and ensure that the state of the hopper meets the requirements before each processing. At the same time, a stable and reliable feeding verification mechanism ensures the consistency and accuracy of each feeding operation, eliminates the processing quality fluctuation factors caused by incomplete feeding, and provides guarantee for subsequent stable and high-quality processing.
[0035] S4. If the result of verifying the completion of feeding is passed, the feeding instruction is transmitted to the manipulator through the gateway.
[0036] This step realizes the issuance of the feeding instruction. If the result of verifying the completion of feeding is passed, the system transmits the feeding instruction to the manipulator through the gateway to start the feeding process. In this embodiment, the feeding instruction is only issued after the feeding verification is passed, which can ensure that the feeding operation is carried out on the basis of successful feeding, maintain the coherence of the entire processing flow, and at the same time avoid feeding when the feeding is not completed or there are problems with the feeding, preventing abnormal situations such as material accumulation and equipment failure.
[0037] S5. When the signal indicating the completion of feeding feedback by the manipulator is received, control the industrial camera to capture the second image of the working area, and analyze the second image of the working area to verify whether the feeding is completed and the feeding material is correct.
[0038] This step realizes the verification of the completion of feeding and the correctness of the material. After receiving the feeding completion feedback, analyze by taking pictures with the industrial camera to confirm that the feeding is completed and the material is correct. The second image analysis process includes preprocessing, aligning the second image with a preset template through an affine transformation alignment method to eliminate the perspective deviation, and then segmenting the hopper area ROI from the second image according to the pre-defined position of the hopper area. Calculate the edge pixel density of the hopper area ROI through a specific formula. If the edge pixel density is greater than the preset threshold, it is determined that the feeding is completed. At the same time, extract the histogram of oriented gradients features of the material and compare it with the template material to calculate the similarity. If the similarity is greater than the preset similarity threshold, it means that the feeding material is correct. The analysis of the second image will be introduced in detail later and will not be elaborated here.
[0039] In this embodiment, operations such as preprocessing the second image, image alignment, and calculating the edge pixel density are performed to determine whether the feeding is completed. At the same time, the feature of the material direction gradient histogram is extracted and compared with the template material to calculate the similarity, so as to determine whether the feeding material is correct. The integrity of feeding and the accuracy of the material are ensured from multiple dimensions of verification, avoiding the generation of defective or waste products caused by insufficient feeding or incorrect materials. Accurate feeding verification can timely detect feeding problems and correct them, reduce material waste and repeated processing costs caused by incorrect feeding, and improve production efficiency.
[0040] S6. If the result of verifying that the feeding is completed and the material is correct passes, start the next processing.
[0041] When both the discharging and feeding verifications pass, start the next processing. In some alternative embodiments, if the result of verifying that the feeding is completed and the material is correct passes, the tailstock is detected again by the tailstock tightening in-place induction switch to determine whether the tailstock is tightened in place, and the liquid level of the headstock is detected by the headstock liquid level sensor to determine whether the liquid level of the headstock is not lower than the threshold. If the tailstock is tightened in place and the liquid level of the headstock is not lower than the threshold, start the next processing. In this way, before starting the next processing, the tailstock tightening state and the liquid level of the headstock are detected again to ensure that the equipment starts processing in a good operating state. The tight tailstock ensures the stability of the workpiece during processing, and the liquid level of the headstock not being lower than the threshold ensures the normal operation of the lubrication, cooling and other systems of the equipment, avoiding problems such as decreased processing accuracy and equipment damage caused by poor equipment state.
[0042] In some alternative embodiments, in step S3, the first image of the working area is analyzed to verify whether the discharging is completed, which specifically includes the following steps.
[0043] S3.1. Preprocess the first image, including grayscale processing, Gaussian filtering processing, and histogram equalization to enhance the contrast.
[0044] Eliminate noise through Gaussian filtering to improve the image quality. The Gaussian filtering function is
[0045] Enhance the contrast through histogram equalization to highlight the difference between the material and the background.
[0046] S3.2. According to the pre-defined position of the chute area, segment the chute area ROI from the first image.
[0047] The chute area ROI is represented by pixel coordinates, denoted as .
[0048] S3.3. Perform adaptive binarization through the Otsu algorithm to separate the foreground and background of the chute area ROI, denoted as
[0049] Among them, is the optimal gray threshold determined by the Otsu algorithm, is the coordinate at the gray value, is the value at the coordinate after binarization.
[0050] The Otsu algorithm, namely the large law algorithm, determines the optimal threshold by maximizing the between-class variance.
[0051] S3.4. Statistically calculate the proportion of foreground pixels in the ROI of the feed trough area , expressed as,
[0052] S3.5. If the proportion of foreground pixels is greater than the preset proportion threshold, it indicates that there is residual material in the feed trough area, and the verification of the completion of material feeding fails. Otherwise, it indicates that there is no residual material in the feed trough area, and the verification of the completion of material feeding passes.
[0053] In some alternative embodiments, in step S5, the second image of the working area is analyzed to verify whether the material feeding is completed and whether the fed material is correct. Specifically, it includes the following steps.
[0054] S5.1. Preprocess the second image, including gray processing, Gaussian filtering processing, and histogram equalization to enhance the contrast.
[0055] It is the same as step S3.1 and will not be elaborated here.
[0056] S5.2. Align the second image with the preset template through the affine transformation alignment method to eliminate the perspective deviation.
[0057] When obtaining the second image of the working area, due to factors such as the installation position and angle of the industrial camera and the possible jitter during the shooting process, there are often differences in the perspectives between the captured image and the preset template. By aligning the second image with the preset template through the affine transformation alignment method, these perspective deviations can be eliminated, ensuring that subsequent image-based analysis and judgment are carried out under a unified perspective.
[0058] It should be noted that the preset template is made according to the standard material state and position. Only by keeping the perspective of the actually captured second image consistent with the preset template can the features corresponding to the preset template be accurately extracted from the second image. For example, when calculating the edge pixel density and extracting the material direction gradient histogram features later, it is ensured that the extracted features are comparable, providing a basis for accurately judging whether the material feeding is completed and whether the material is correct.
[0059] S5.3. Segment the chute region ROI from the second image according to the pre-defined position of the chute region.
[0060] This step is the same as step S3.2 and will not be elaborated here.
[0061] S5.4. Calculate the edge pixel density of the chute region ROI through the following formula ,
[0062] where is the binarized image result obtained by edge detection using the Canny algorithm.
[0063] The binarized image result is obtained by edge detection using the Canny algorithm as follows.
[0064] Step 1. Calculate the gradient magnitude and gradient direction of the pre-processed second pixels.
[0065] The gradient assignment uses the Sobel operator to calculate the horizontal and vertical gradients , and then calculate the gradient magnitude , and the gradient direction .
[0066] Step 2. Use the non-maximum suppression algorithm to refine the edges and retain the pixels with the maximum gradient magnitude.
[0067] Discretize the gradient direction into 4 main directions (0°, 45°, 90°, 135°), and check whether the gradient magnitude of the current pixel is the local maximum in its direction. Specifically, if the gradient magnitude of the current pixel is greater than or equal to the magnitude along the gradient direction of the adjacent pixels, then the current pixel is the local maximum, otherwise the current pixel is set to 0.
[0068] Step 3. Perform double-threshold detection to distinguish strong edges, weak edges, and non-edges.
[0069] The classification rule is
[0070] Step 4. Connect the weak edges to the strong edges to form continuous edges.
[0071] If a weak edge pixel (value 1) is adjacent to a strong edge pixel (value 2), then it is marked as an edge (set to 1), otherwise it is removed (set to 0).
[0072] Step 5. Output the binarized edge image.
[0073]
[0074] S5.5, if the edge pixel density is greater than the preset threshold, it is determined that the feeding is completed.
[0075] It should be noted that assuming that after the feeding is completed, the material should be correctly placed in the specified area, and its edge should be clearly visible in the image. Therefore, if the material is correctly placed, the edge pixel density of this area should be relatively high; on the contrary, if it is not correctly placed or not placed, the edge pixel density may be relatively low.
[0076] S5.6, extract the orientation gradient histogram features of the material, compare them with the template material, and calculate the similarity, expressed as
[0077] where is the -dimensional feature value of the current material, is the -dimensional feature value of the template material; S5.7, if the similarity is greater than the preset similarity threshold, it indicates that the feeding material is correct.
[0078] It should be noted that the template material is stored in advance, and the corresponding template material is extracted according to the material of the order.
[0079] In the above text, an embodiment of a numerical control roll lathe automatic cyclic machining method has been described in detail. Based on the numerical control roll lathe automatic cyclic machining method described in the above embodiment, an embodiment of the present invention also provides a numerical control roll lathe automatic cyclic machining system corresponding to this method.
[0080] Figure 2 FIG. is a schematic block diagram of the structure of a numerical control roll lathe automatic cyclic machining system provided by an embodiment of the present invention. The numerical control roll lathe automatic cyclic machining system can be divided into multiple functional modules according to the functions it performs. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, and are stored in the memory.
[0081] The blanking condition detection module is used to detect whether the tailstock is tightly clamped in place through the tailstock tight-in-place induction switch when the current material processing is completed, and detect whether the roll lathe is in the safe position of the material change interval through the safety position switches of the X-axis and Z-axis.
[0082] The blanking instruction issuing module is used to transmit the blanking instruction to the manipulator through the gateway if the tailstock is tightly clamped in place and the roll lathe is in the safe position of the material change interval.
[0083] The blanking detection module is used to control an industrial camera to capture a first image of the working area and analyze the first image of the working area to verify whether blanking is completed when receiving a blanking completion signal fed back by the manipulator.
[0084] The loading instruction issuing module is used to transmit a loading instruction to the manipulator through the gateway if the result of verifying the completion of blanking passes.
[0085] The loading detection module is used to control an industrial camera to capture a second image of the working area and analyze the second image of the working area to verify whether loading is completed and whether the loaded material is correct when receiving a loading completion signal fed back by the manipulator.
[0086] The processing start module is used to start the next processing if the result of verifying the completion of loading and the correct material passes.
[0087] The automatic cyclic machining system of the numerically controlled roll lathe in this embodiment is used to implement the foregoing automatic cyclic machining method of the numerically controlled roll lathe. Therefore, the specific implementation manners in this system can be seen in the embodiment part of the automatic cyclic machining method of the numerically controlled roll lathe in the foregoing text. Therefore, its specific implementation manners can be referred to the descriptions of the corresponding various part embodiments and will not be elaborated here.
[0088] In addition, since the automatic cyclic machining system of the numerically controlled roll lathe in this embodiment is used to implement the foregoing automatic cyclic machining method of the numerically controlled roll lathe, its functions correspond to those of the above method and will not be elaborated here.
[0089] Figure 3 It is a schematic structural diagram of a terminal provided by an embodiment of the present invention, including a processor and a memory. The processor is respectively connected to the memory, the tailstock clamping in-place induction switch, the X-axis safety position switch, the Z-axis safety position switch, and the industrial camera, and is connected to the manipulator through the gateway. When the processor is used to implement the numerically controlled roll lathe automatic cyclic machining program saved in the memory, the following steps are implemented: When the machining of the current material is completed, detect whether the tailstock is clamped in place through the tailstock clamping in-place induction switch, and detect whether the roll lathe is in a safe position in the material change interval through the safety position switches of the X-axis and Z-axis; If the tailstock is clamped in place and the roll lathe is in a safe position in the material change interval, transmit a blanking instruction to the manipulator through the gateway; When receiving a blanking completion signal fed back by the manipulator, control the industrial camera to capture a first image of the working area and analyze the first image of the working area to verify whether blanking is completed; If the result of verifying the completion of blanking passes, transmit a loading instruction to the manipulator through the gateway; When receiving the signal indicating that the loading by the manipulator is completed, control the industrial camera to capture the second image of the working area, and analyze the second image of the working area to verify whether the loading is completed and whether the loaded material is correct. If the result of verifying that the loading is completed and the material is correct passes, start the next processing.
[0090] The processor is also connected to the liquid level sensor of the headstock. If the result of verifying that the unloading is completed and the material is correct passes, check whether the tailstock is tightly clamped through the tailstock tight-in-place induction switch, and detect whether the liquid level of the headstock is not lower than the threshold through the liquid level sensor of the headstock; if the tailstock is tightly clamped and the liquid level of the headstock is not lower than the threshold, start the next processing.
[0091] The processor is connected to a ready-to-change-material indicator light and a material-change-completed indicator light. When transmitting the unloading instruction to the manipulator through the gateway, control the ready-to-change-material indicator light to turn on; if the result of verifying that the unloading is completed and the material is correct passes, control the material-change-completed indicator light to turn on.
[0092] The present invention also provides a computer storage medium. The storage medium mentioned here can be a magnetic disk, an optical disc, a read-only memory (abbreviation: ROM for short), a random access memory (abbreviation: RAM for short), etc.
[0093] The computer storage medium stores an automatic cyclic processing program for a numerically controlled roll lathe. When the automatic cyclic processing program for the numerically controlled roll lathe is executed by the processor, the following steps are implemented: When the processing of the current material is completed, detect whether the tailstock is tightly clamped through the tailstock tight-in-place induction switch, and detect whether the roll lathe is at a safe position in the material-changing area through the safety position switches of the X-axis and Z-axis; If the tailstock is tightly clamped and the roll lathe is at a safe position in the material-changing area, transmit the unloading instruction to the manipulator through the gateway; When receiving the signal indicating that the unloading by the manipulator is completed, control the industrial camera to capture the first image of the working area, and analyze the first image of the working area to verify whether the unloading is completed; If the result of verifying that the unloading is completed passes, transmit the loading instruction to the manipulator through the gateway; When receiving the signal indicating that the loading by the manipulator is completed, control the industrial camera to capture the second image of the working area, and analyze the second image of the working area to verify whether the loading is completed and whether the loaded material is correct. If the result of verifying that the loading is completed and the material is correct passes, start the next processing.
[0094] In addition, in each embodiment of the present invention, each functional unit may be integrated into one processing unit, may exist separately as individual physical units, or two or more units may be integrated into one unit.
[0095] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for automatic cyclic machining of numerically controlled roll lathes, characterized in that, It includes the following steps: When the current material processing is completed, it is detected whether the tailstock is tightened in place through the tailstock tightening in-place induction switch, and it is detected whether the roll lathe is in the safe position of the material change interval through the safety position switches of the X-axis and Z-axis; If the tailstock is tightened in place and the roll lathe is in the safe position of the material change interval, the blanking instruction is transmitted to the manipulator through the gateway; When receiving the blanking completion signal fed back by the manipulator, control the industrial camera to take the first image of the working area, and analyze the first image of the working area to verify whether the blanking is completed; If the result of verifying that the blanking is completed passes, the feeding instruction is transmitted to the manipulator through the gateway; When receiving the feeding completion signal fed back by the manipulator, control the industrial camera to take the second image of the working area, and analyze the second image of the working area to verify whether the feeding is completed and the feeding material is correct; If the result of verifying that the feeding is completed and the material is correct passes, start the next processing.
2. The automatic cyclic machining method of a numerically controlled roll lathe according to claim 1, wherein, Analyze the first image of the working area to verify whether the blanking is completed, specifically including: Preprocess the first image, including grayscale processing, Gaussian filtering processing, and histogram equalization to enhance the contrast; Segment the chute area ROI from the first image according to the pre-defined chute area position; Adaptive binarization through the Otsu algorithm to separate the foreground and background of the chute area ROI, expressed as Among them, is the optimal gray threshold determined by the Otsu algorithm, is the coordinate and the gray value at this coordinate is After binarization, the value at the coordinate is Statistical proportion of foreground pixels in the ROI of the feeding trough area , expressed as If the proportion of foreground pixels is greater than the preset proportion threshold, it indicates that there is residual material in the feeding trough area, and the verification of the completion of material feeding fails. Otherwise, it indicates that there is no residual material in the feeding trough area, and the verification of the completion of material feeding passes.
3. The automatic cyclic machining method of a numerically controlled roll lathe according to claim 2, wherein, Analyze the second image of the working area to verify whether the feeding is completed and the feeding material is correct, specifically including: Preprocess the second image, including grayscale processing, Gaussian filtering processing, and histogram equalization to enhance the contrast; Align the second image with the preset template through the affine transformation alignment method to eliminate the perspective deviation; Segment the chute area ROI from the second image according to the pre-defined chute area position; Calculate the edge pixel density of the feeding trough area ROI through the following formula , Among them, is the binarized image result obtained by edge detection using the Canny algorithm; If the edge pixel density is greater than a preset threshold, it is determined that the feeding is completed; Extract the histogram of oriented gradients features of the material and compare it with the template material, and calculate the similarity, expressed as Among them, is the -dimensional eigenvalue of the current material, is the -dimensional eigenvalue of the template material; If the similarity is greater than the preset similarity threshold, it means that the feeding material is correct.
4. The automatic cyclic machining method of a numerically controlled roll lathe according to any one of claims 1-3, characterized in that, If the result of verifying that the feeding is completed and the material is correct passes, start the next processing, specifically including: If the result of verifying that the feeding is completed and the material is correct passes, detect whether the tailstock is tightened in place through the tailstock tightening in-place induction switch, and detect whether the liquid level of the headstock is not lower than the threshold through the headstock liquid level sensor; If the tailstock is tightened in place and the liquid level of the headstock is not lower than the threshold, start the next processing.
5. The automatic cyclic machining method of a numerically controlled roll lathe according to any one of claims 1 to 3, characterized in that, This method also includes When transmitting the blanking instruction to the manipulator through the gateway, control the preparation for material change indicator light to turn on; If the result of verifying that the blanking is completed and the material is correct passes, control the material change completion indicator light to turn on.
6. A numerically controlled roll lathe automatic cycle machining system, characterized in that, It includes The blanking condition detection module is used to detect whether the tailstock is tightened in place through the tailstock tightening in-place induction switch when the current material processing is completed, and detect whether the roll lathe is in the safe position of the material change interval through the safety position switches of the X-axis and Z-axis; The blanking instruction issuing module is used to transmit the blanking instruction to the manipulator through the gateway if the tailstock is tightened in place and the roll lathe is in the safe position of the material change interval; The blanking detection module is used to control an industrial camera to capture a first image of the working area and analyze the first image of the working area to verify whether blanking is completed when receiving a blanking completion signal fed back by a manipulator; The feeding instruction issuing module is used to transmit a feeding instruction to the manipulator through a gateway if the result of verifying the completion of blanking passes; The feeding detection module is used to control an industrial camera to capture a second image of the working area and analyze the second image of the working area to verify whether feeding is completed and whether the feeding material is correct when receiving a feeding completion signal fed back by the manipulator; The processing start module is used to start the next processing if the result of verifying the completion of feeding and the correctness of the material passes.
7. A terminal, characterized in that, It includes: A memory for storing a numerical control roll lathe automatic cycle processing program; A processor, which is respectively connected to the memory, the tailstock tightening in-place induction switch, the X-axis safety position switch, the Z-axis safety position switch, the industrial camera, and is connected to the manipulator through a gateway, and is used to implement the steps of the numerical control roll lathe automatic cycle processing method according to any one of claims 1-5 when executing the numerical control roll lathe automatic cycle processing program.
8. The terminal according to claim 7, wherein The processor is also connected to the spindle box liquid level sensor.
9. The terminal according to claim 8, wherein The processor is connected with a ready-to-change-material indicator light and a change-material completion indicator light.
10. A computer-readable storage medium, characterized in that, The numerical control roll lathe automatic cycle processing program is stored on the readable storage medium, and when the numerical control roll lathe automatic cycle processing program is executed by the processor, the steps of the numerical control roll lathe automatic cycle processing method according to any one of claims 1-5 are implemented.