A method, system, apparatus, and medium for controlling the motion of a hole punch machine
By parsing PLT files to obtain a set of circles and performing shortest path planning, and using a PLC controller to control the hole-drilling machine, the problems of human error and low operating efficiency in large-scale hole processing are solved, achieving automated control and efficient processing.
Patent Information
- Application Number
- CN202511376325.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-25
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-09-25
AI Technical Summary
Existing technologies suffer from production errors and low operational efficiency due to human error in large-scale circular hole machining. Furthermore, existing solutions increase the barriers to equipment use and hinder convenient production.
By parsing the PLT file to obtain a set of circles, the radius and center coordinates are obtained, the shortest path is planned, and the PLC controller is used to send displacement pulse commands to control the hole-punching machine, thus achieving automated control.
It significantly reduces idle travel time during drilling and milling, improves production efficiency, reduces operational difficulty, avoids errors and stoppages caused by manual intervention, and improves machining quality.
Smart Images

Figure CN120871733B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of light industrial technology, and in particular to a method, system, device and medium for controlling the movement of a hole-punching machine. Background Technology
[0002] In the industrial production process, the drilling of round holes is a basic process in fields such as machinery manufacturing and sheet metal processing. It plays a key supporting role in the assembly accuracy and structural stability of products and is widely used in scenarios such as parts forming and mold manufacturing.
[0003] Currently, existing technologies have significant limitations in meeting the production needs of machining multiple circular holes and planning path control for motion mechanisms. Conventional methods rely on manually analyzing drawing files, such as CAD files, to obtain coordinate information and manually planning machining paths including straight lines, arcs, and complex curves. While this allows for flexible path adjustments through manual intervention in small-batch, low-frequency point machining, manual operation is inefficient for large-scale circular hole machining, and human error can easily lead to missed or incorrect selections, resulting in production errors. Some solutions utilize dedicated PC software to analyze drawing information and plan paths before sending them to the hole-drilling machine. However, this adds an extra step to the PC operation, demands stringent software skills from workers, raises the barrier to equipment use, and hinders convenient production. Summary of the Invention
[0004] The main objective of this application is to provide a method, system, device, and medium for controlling the movement of a round hole punching machine, aiming to achieve automated control of the round hole punching machine, improve production efficiency, and reduce operational difficulty.
[0005] To achieve the above objectives, a first aspect of this application provides a method for controlling the movement of a hole-punching machine, the method comprising:
[0006] The PLT file is obtained using an interactive device, and the PLT file is parsed to obtain a set of circles;
[0007] Obtain the radii and center coordinates of all circles in the set of circles;
[0008] The set of circles is classified according to the radius of all the circles to obtain a set of circles with multiple radii.
[0009] Based on the center coordinates, shortest path planning is performed on each set of the radius circles to obtain a target path information set for the set of multiple types of radius circles;
[0010] The target path information set is stored in the register of the interactive device;
[0011] The target path information set is sent to the PLC controller via a serial port using the interactive device.
[0012] The PLC controller sends a displacement pulse command to the hole-drilling machine based on the target path information set, thereby controlling the hole-drilling machine to perform the drilling operation corresponding to the displacement pulse command.
[0013] The method provided in the first aspect, by performing shortest path planning and sorting for the set of circles of each radius, can significantly reduce the idle travel time during the drilling and milling process, enabling the round hole drilling machine to operate continuously along the optimal path, thereby improving production efficiency. Furthermore, the calculation results are directly transmitted to the PLC to control the round hole drilling machine, achieving fully automated execution of the entire process, avoiding errors and stoppages caused by manual intervention, and improving processing quality. At the same time, operators do not need to manually calculate paths or frequently adjust parameters; they only need to input basic parameters through an interactive device to start the operation, greatly reducing the difficulty of operation.
[0014] In one possible implementation, the step of acquiring a PLT file using an interactive device and parsing the PLT file to obtain a set of circles includes:
[0015] The PLT file is obtained using an interactive device, and the PLT file is read to obtain status instructions;
[0016] Multiple sets of circular trajectories are extracted according to the state instructions. The multiple sets of circular trajectories constitute the set of circles, wherein each set of circular trajectories consists of multiple points.
[0017] In one possible implementation, obtaining the radii and center coordinates of all circles in the set of circles includes:
[0018] Traverse the trajectory of all circles in the set of circles to obtain multiple points of each group of the circle trajectory. Extract the start point and midpoint from the multiple points of each group of the circle trajectory, and obtain the radius and center coordinates of each group of the circle trajectory based on the start point and the midpoint, until the radius and center coordinates of all circles in the set of circles are obtained.
[0019] In one possible implementation, the shortest path planning based on the center coordinates of each set of circles of radius to obtain a target path information set for the set of multiple sets of circles of radius includes:
[0020] Based on the coordinates of all the center points of the circles in the set of circles of each type, determine the center point with the largest x-coordinate and the largest y-coordinate as the current coordinate, and take the circle corresponding to the current coordinate as the current circle;
[0021] Based on the current coordinates and the current circle, all circles in the set of each type of radius circle are traversed according to preset rules to perform shortest path planning, thereby obtaining the target path information of each type of radius circle set. Among them, multiple target path information constitute the target path information set of multiple types of radius circle sets.
[0022] In one possible implementation, the step of traversing all circles in the set of circles of each radius according to a preset rule based on the current coordinates and the current circle to perform shortest path planning, and obtaining the target path information for the set of circles of each radius, includes:
[0023] Determine the number of circle center coordinates that are closest to the current coordinates, read the number, and if the number is equal to 1, update the circle center coordinate with the closest distance to the current coordinates and update the circle corresponding to the circle with the closest distance to the current circle. If the number is greater than 1, compare the angle between the line connecting each circle center coordinate with the closest distance to the current coordinates and the positive direction of the horizontal axis, update the circle center coordinate with the smallest angle to the current coordinates, and update the circle corresponding to the circle with the smallest angle to the current circle, until all circles in the set of circles of each type of radius are traversed to obtain the target path information of the set of circles of each type of radius.
[0024] In one possible implementation, the step of using the PLC controller to send a displacement pulse command to the hole-drilling machine based on the target path information set, in order to control the hole-drilling machine to perform a drilling operation corresponding to the displacement pulse command, includes:
[0025] The PLC controller sends a displacement pulse command to the hole-punching machine based on the target path information set.
[0026] The hole-drilling machine obtains the corresponding target path information and the radius of the circle based on the displacement pulse command, switches the corresponding tool according to the radius of the circle, and uses the tool to drill multiple times according to the target path information. The PLC controller then feeds back the drilling status of each hole to the interactive module.
[0027] In one possible implementation, after the PLC controller provides feedback on each drilling status to the interaction module, the process further includes:
[0028] The interaction module is used to select un-drilled points based on each drilling situation;
[0029] The interaction module is used to obtain the radius and center coordinates of the circle corresponding to the point where no hole is drilled, and a drilling instruction is generated based on the radius and center coordinates of the circle corresponding to the point where no hole is drilled, and then sent to the PLC controller.
[0030] The PLC controller is used to control the hole-drilling machine to perform the drilling operation corresponding to the supplementary drilling instruction.
[0031] To achieve the above objectives, a second aspect of this application provides a system for controlling the movement of a hole-punching machine, the system comprising:
[0032] Parsing module: used to obtain PLT files using an interactive device, and to parse the PLT files to obtain a set of circles;
[0033] Information acquisition module: used to acquire the radii and center coordinates of all circles in the set of circles;
[0034] Classification module: used to classify the set of circles according to the radius of all the circles, and obtain a set of circles with multiple radii;
[0035] Path planning module: used to perform shortest path planning for each type of radius circle set based on the circle center coordinates, so as to obtain the target path information set of multiple types of radius circle sets;
[0036] Storage module: used to store the target path information set in the registers of the interactive device;
[0037] Data transmission module: used to send the target path information set to the PLC controller via a serial port using the interactive device;
[0038] Drilling module: Used by the PLC controller to send displacement pulse commands to the hole-making machine based on the target path information set, so as to control the hole-making machine to perform the drilling operation corresponding to the displacement pulse command.
[0039] The system provided in the second aspect significantly reduces idle travel time during drilling and milling by planning and sorting the shortest paths for the set of circles of each radius. This allows the hole-drilling machine to operate continuously along the optimal path, improving production efficiency. Furthermore, the calculation results are directly transmitted to the PLC to control the hole-drilling machine, achieving fully automated execution of the entire process. This avoids errors and interruptions caused by manual intervention, improving processing quality. At the same time, operators do not need to manually calculate paths or frequently adjust parameters; they only need to input basic parameters through an interactive device to start the operation, greatly reducing the difficulty of operation.
[0040] Thirdly, an electronic device is provided, the electronic device including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement a method for controlling the movement of a hole-punching machine as described in any possible implementation of the first aspect.
[0041] Fourthly, a computer-readable storage medium is provided, the storage medium storing a computer program that, when executed by a processor, implements a method for controlling the movement of a hole-punching machine as described in any possible implementation of the first aspect. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in one or more embodiments or prior art of this specification, the accompanying drawings used in the description of one or more embodiments or prior art will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This is a flowchart illustrating the method for controlling the movement of a hole-punching machine according to an embodiment of this application.
[0044] Figure 2 This is provided by the embodiments of this application. Figure 1 A flowchart of the method included in step S101;
[0045] Figure 3 This is provided by the embodiments of this application. Figure 1 A flowchart of the method included in step S104;
[0046] Figure 4 This is provided by the embodiments of this application. Figure 1 A flowchart of the method included in step S107;
[0047] Figure 5 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0048] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described one or more embodiments are merely some embodiments of this specification, and not all embodiments. All other embodiments obtained by those skilled in the art based on one or more embodiments of this specification without creative effort should fall within the protection scope of this document.
[0049] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0051] Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other. The embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0052] Figure 1 This is an optional flowchart of a method for controlling the movement of a hole-punching machine provided in an embodiment of this application. Figure 1 The method may include, but is not limited to, steps S101 to S107.
[0053] Firstly, such as Figure 1 As shown, to achieve the above objective, a method for controlling the movement of a hole-punching machine is provided, the method comprising:
[0054] S101. Use an interactive device to obtain a PLT file, and parse the PLT file to obtain a set of circles.
[0055] It should be noted that the interactive device obtains and views PLT files through a USB drive list, imports the obtained PLT files into the interactive device's internal storage, selects the corresponding PLT file from the internal storage, opens it, and parses it to obtain a set of circles. The interactive device can directly read PLT files, avoiding manual input of circle parameters. PLT files are a commonly used vector graphics format in the industrial field, completely recording the vector information of the original graphic. The parsing process faithfully restores the various attributes of the circles, avoiding information loss caused by graphic format conversion or manual interpretation. The resulting set of circles can directly provide data support for subsequent path planning, PLC control, motion control drive, and other processes without secondary format conversion or parameter adjustment, ensuring the continuity from graphic data to actual processing and reducing process integration costs.
[0056] S102. Obtain the radius and center coordinates of all circles in the set of circles.
[0057] S103. Classify the set of circles according to their radii to obtain a set of circles with multiple radii.
[0058] It's important to note that the first step is to obtain the radii of all circles in the set. Then, the set is categorized by these radii, resulting in sets of circles with different radii. Since circles with different radii typically require specific cutting tools, categorizing them by radius allows for centralized processing of circles with the same radius. This reduces the frequency of tool changes, minimizing time and equipment wear caused by frequent tool changes, and avoiding machining errors caused by using the wrong tool. Furthermore, the machining parameters for circles with the same radius are often consistent, eliminating the need to repeatedly adjust the motion trajectory between circles with different radii, thus enabling more efficient shortest path planning.
[0059] S104. Based on the center coordinates, perform shortest path planning for the set of circles of each radius to obtain the target path information set for the set of circles of multiple radii.
[0060] It should be noted that shortest path planning is performed on the set of circles of each radius based on the center coordinates to obtain the target path information set for the set of circles of multiple radii. Since circles of the same radius can be continuously processed using the same tool, the shortest path planning combined with the center coordinates can minimize the idle travel distance of the hole-making machine between different holes, avoiding wasted time due to ineffective movements, thereby shortening the overall processing cycle. At the same time, this path planning method allows the equipment to run smoothly along the optimal trajectory, reducing mechanical wear and vibration caused by frequent changes in direction and starts and stops, reducing tool wear rate, and extending equipment life. In addition, the regular path can reduce the complexity of motion control, making the PLC controller's instructions to the hole-making machine simpler and more precise, reducing control errors, and ensuring the consistency of processing accuracy. Especially when processing a large number of holes of the same radius, the orderly path arrangement can avoid repeated movements or path intersections, further improving the stability of the production rhythm.
[0061] S105. Store the target path information set in the register of the interactive device.
[0062] It should be noted that the target path information set is saved into the word register inside the interactive device according to specified rules. For example, the target path information is stored in the area starting from the LW0 register: LW0 and LW1 represent the radius and number of the first type of circle; LW2 and LW3 represent the radius and number of the second type of circle; LW4 and LW5 represent the radius and number of the third type of circle; ...; LW14 and LW15 represent the radius and number of the eighth type of circle, sorted in ascending order of diameter and path planning order.
[0063] S106. Use an interactive device to send the target path information set to the PLC controller via a serial port.
[0064] S107. The PLC controller sends a displacement pulse command to the hole-drilling machine based on the target path information set, so as to control the hole-drilling machine to perform the drilling operation corresponding to the displacement pulse command.
[0065] It should be noted that the interactive device sends the target path information set to the PLC controller via the 485 serial port. The PLC controller sends displacement pulse commands to the drilling machine based on the target path information set, thereby controlling the drilling machine to perform the drilling operation corresponding to the displacement pulse commands. The PLC controller is the core equipment of industrial control, with extremely high reliability and anti-interference capabilities. It can operate stably under the complex electromagnetic environment and temperature fluctuations in the workshop, ensuring that the drilling process is continuous and uninterrupted, reducing production stoppages caused by equipment failures. Its precise logic control capability can strictly execute drilling actions according to the preset program, including positioning, feed, and speed adjustment, so that the drilling depth and hole diameter accuracy remain consistent, avoiding dimensional deviations caused by experience differences during manual operation, and significantly improving the product qualification rate.
[0066] The method provided in the first aspect, by performing shortest path planning and sorting for the set of circles of each radius, can significantly reduce the idle travel time during the drilling and milling process, enabling the round hole drilling machine to operate continuously along the optimal path, thereby improving production efficiency. Furthermore, the calculation results are directly transmitted to the PLC to control the round hole drilling machine, achieving fully automated execution of the entire process, avoiding errors and stoppages caused by manual intervention, and improving processing quality. At the same time, operators do not need to manually calculate paths or frequently adjust parameters; they only need to input basic parameters through an interactive device to start the operation, greatly reducing the difficulty of operation.
[0067] In one possible implementation, such as Figure 2 As shown, the step of obtaining a PLT file using an interactive device and parsing the PLT file to obtain a set of circles includes steps S201 to S202:
[0068] S201. Use the interactive device to obtain the PLT file, read the PLT file, and obtain the status instructions.
[0069] S202. Extract the trajectories of multiple circles according to the status instructions. The trajectories of multiple circles constitute a set of circles, where the trajectory of each circle is composed of multiple points.
[0070] It should be noted that the interactive device obtains and views the PLT file through the USB flash drive list, imports the obtained PLT file into the interactive device's internal storage space, and then opens the corresponding PLT file from the internal storage space. The interactive device will parse the contents of the PLT file to obtain status commands. Specifically, it reads the PLT file line by line to obtain status commands starting with "PU" and "PD". Based on the status commands, it extracts the trajectories of multiple circles. The trajectories of multiple circles form a set of circles. Each set of circle trajectories consists of multiple points. For example, based on the status commands starting with "PU" and "PD", 16 points are extracted sequentially. These 16 points form the trajectory of a circle. It can be understood that there is no limit to the number of points of the circle extracted.
[0071] In one possible implementation, obtaining the radius and center coordinates of all circles in the set of circles includes: traversing the trajectory of all circles in the set of circles to obtain multiple points of each group of the trajectory of circles, extracting the start point and midpoint from the multiple points of each group of the trajectory of circles, and obtaining the radius and center coordinates of each group of the trajectory of circles based on the start point and the midpoint, until the radius and center coordinates of all circles in the set of circles are obtained.
[0072] It should be noted that the specific steps for obtaining the radii and center coordinates of all circles in a set of circles are as follows: traverse the trajectory of all circles in the set to obtain multiple points for each group of circles' trajectories. Extract the start point and midpoint from these multiple points for each group of circles' trajectories, and then obtain the radius and center coordinates of each group of circles' trajectories based on the start point and midpoint, until the radius and center coordinates of all circles in the set of circles are obtained. For example, when the number of points in each group of circles' trajectories is 16, extract the first point of one group of circles' trajectories as the start point, extract the ninth point of the trajectories as the midpoint, and use the other points for verification. The line connecting the start point and the midpoint yields the radius of the circle, and the midpoint of the line connecting the start point and the midpoint yields the center coordinates of the circle, until the radius and center coordinates of all circles in the set of circles are obtained. The parameters calculated based on the point set can completely restore the geometric features of the circle, ensuring the accuracy of the obtained radius and center coordinate data.
[0073] In one possible implementation, such as Figure 3 As shown, the step of performing shortest path planning on each set of radii of circles based on the center coordinates to obtain a target path information set for multiple sets of radii of circles includes steps S301 to S302:
[0074] S301. Based on the coordinates of all the center points of the set of circles of each radius, determine the center point with the largest x-coordinate and the largest y-coordinate as the current coordinate, and take the circle corresponding to the current coordinate as the current circle.
[0075] S302. Based on the current coordinates and the current circle, traverse all circles in the set of circles of each radius according to preset rules to perform shortest path planning, and obtain the target path information of the set of circles of each radius. Among them, multiple target path information constitute the target path information set of the set of circles of multiple radii.
[0076] It should be noted that shortest path planning based on center coordinates for each type of radius circle set is used to obtain the target path information set. Specifically, for circles of the same radius, the center coordinate of the first circle in the upper right corner is selected as the current coordinate, that is, the center coordinate of the circle with the largest horizontal coordinate and the largest vertical coordinate is determined as the current coordinate, and the circle corresponding to the current coordinate is taken as the current circle. Then, the remaining circles are traversed according to preset rules to plan the shortest path, thereby obtaining the target path information for each type of radius circle set. Multiple target path information constitutes the target path information set for multiple types of radius circle sets. The shortest path planning combined with center coordinates can minimize the idle travel distance of the hole punching machine between different holes, avoid the time waste caused by invalid movement, and thus shorten the overall processing cycle.
[0077] In one possible implementation, the step of traversing all circles in the set of radii of each type based on the current coordinates and the current circle, according to a preset rule, to perform shortest path planning and obtain the target path information for the set of radii of each type includes: determining the number of circle center coordinates with the smallest distance from the current coordinates; reading the number; if the number is equal to 1, updating the circle center coordinate with the smallest distance to the current coordinates and updating the circle corresponding to the circle center coordinate with the smallest distance to the current circle; if the number is greater than 1, comparing the angle between the line connecting each circle center coordinate with the smallest distance and the current coordinate and the positive direction of the horizontal axis, updating the circle center coordinate with the smallest angle to the current coordinates and updating the circle corresponding to the circle center coordinate with the smallest angle to the current circle, until all circles in the set of radii of each type are traversed to obtain the target path information for the set of radii of each type.
[0078] It should be noted that, according to preset rules, traversing the remaining circles to plan the shortest path, and thus obtaining the target path information for the set of circles of each radius, specifically involves determining the number of circle center coordinates with the smallest distance from the current coordinate. This number is read; if the number equals 1, meaning only one circle center coordinate has the smallest distance from the current coordinate, then that circle center coordinate is updated to the current coordinate, and the circle corresponding to that circle center coordinate is updated to the current circle. If the number is greater than 1, meaning two or more circle center coordinates have the smallest distance from the current coordinate, then the angle between the line connecting each circle center coordinate to the current coordinate and the positive direction of the horizontal axis needs to be compared. The circle center coordinate with the smallest angle is updated to the current coordinate, and the circle corresponding to the circle with the smallest angle is updated to the current circle, and so on, until all circles in the set of circles of each radius are traversed, thus obtaining the target path information for the set of circles of each radius.
[0079] In one possible implementation, such as Figure 4 As shown, the step of using the PLC controller to send a displacement pulse command to the hole-drilling machine based on the target path information set to control the hole-drilling machine to perform the drilling operation corresponding to the displacement pulse command includes steps S401 to S402:
[0080] S401. The PLC controller sends displacement pulse commands to the hole punching machine based on the target path information set.
[0081] S402, the circular hole drilling machine obtains the corresponding target path information and the radius of the circle based on the displacement pulse command, switches the corresponding tool according to the radius of the circle, and uses the tool to drill multiple times according to the target path information. The PLC controller feeds back the drilling status of each drilling to the interactive module.
[0082] In some embodiments, it should be noted that the PLC controller sends a displacement pulse command to the round hole drilling machine based on the target path information set. The round hole drilling machine obtains the corresponding target path information and the radius of the circle based on the displacement pulse command, and then switches the corresponding tool according to the radius of the circle. The tool performs multiple drilling operations according to the target path information, and the PLC controller provides feedback on the drilling status of each drilling operation to the interactive module. The machine autonomously completes the precise switching of tools and drilling operations without the need for manual intervention to adjust tools or set processing paths, which greatly reduces the time cost and error risk of manual operation and avoids production stoppages or workpiece scrap due to tool change delays or incorrect parameter settings.
[0083] In one possible implementation, after the PLC controller provides feedback on each drilling status to the interaction module, the method further includes: using the interaction module to select un-drilled points based on each drilling status; using the interaction module to obtain the radius and center coordinates of the circle corresponding to the un-drilled point, and generating a supplementary drilling instruction based on the radius and center coordinates of the circle corresponding to the un-drilled point, and sending it to the PLC controller; and using the PLC controller to control the circular hole drilling machine to perform the drilling operation corresponding to the supplementary drilling instruction.
[0084] It should be noted that after the PLC controller reports the drilling status to the interactive module, the operator can use the interactive module to select the un-drilled points (i.e., missed points) based on each drilling result. The operator then obtains the radius and center coordinates of the corresponding circle, generates a re-drilling instruction, and resends it to the PLC controller to complete the re-drilling process, filling in all missed circles and finishing the current workpiece. This method can promptly identify and correct omissions during processing, avoiding workpiece scrap due to missed drilling, significantly reducing material waste and rework costs. The re-drilling operation is completed directly through HMI interaction, without requiring machine downtime to reload the complete machining file or manual programming, reducing time spent handling anomalies, ensuring production continuity, and improving equipment utilization.
[0085] To achieve the above objectives, a second aspect of this application provides a system for controlling the movement of a hole-punching machine, the system comprising:
[0086] Parsing module: Used to obtain PLT files using an interactive device, and to parse the PLT files to obtain a set of circles.
[0087] It should be noted that the interactive device obtains and views PLT files through a USB drive list, imports the obtained PLT files into the interactive device's internal storage, selects the corresponding PLT file from the internal storage, opens it, and parses it to obtain a set of circles. The interactive device can directly read PLT files, avoiding manual input of circle parameters. PLT files are a commonly used vector graphics format in the industrial field, completely recording the vector information of the original graphic. The parsing process faithfully restores the various attributes of the circles, avoiding information loss caused by graphic format conversion or manual interpretation. The resulting set of circles can directly provide data support for subsequent path planning, PLC control, motion control drive, and other processes without secondary format conversion or parameter adjustment, ensuring the continuity from graphic data to actual processing and reducing process integration costs.
[0088] Information acquisition module: used to acquire the radius and center coordinates of all circles in the set of circles.
[0089] Classification module: used to classify the set of circles according to the radius of all the circles, and obtain a set of circles with multiple radii.
[0090] It's important to note that the first step is to obtain the radii of all circles in the set. Then, the set is categorized by these radii, resulting in sets of circles with different radii. Since circles with different radii typically require specific cutting tools, categorizing them by radius allows for centralized processing of circles with the same radius. This reduces the frequency of tool changes, minimizing time and equipment wear caused by frequent tool changes, and avoiding machining errors caused by using the wrong tool. Furthermore, the machining parameters for circles with the same radius are often consistent, eliminating the need to repeatedly adjust the motion trajectory between circles with different radii, thus enabling more efficient shortest path planning.
[0091] Path planning module: used to perform shortest path planning for each type of radius circle set based on the circle center coordinates, so as to obtain the target path information set of multiple types of radius circle sets.
[0092] It should be noted that shortest path planning is performed on the set of circles of each radius based on the center coordinates to obtain the target path information set for the set of circles of multiple radii. Since circles of the same radius can be continuously processed using the same tool, the shortest path planning combined with the center coordinates can minimize the idle travel distance of the hole-making machine between different holes, avoiding wasted time due to ineffective movements, thereby shortening the overall processing cycle. At the same time, this path planning method allows the equipment to run smoothly along the optimal trajectory, reducing mechanical wear and vibration caused by frequent changes in direction and starts and stops, reducing tool wear rate, and extending equipment life. In addition, the regular path can reduce the complexity of motion control, making the PLC controller's instructions to the hole-making machine simpler and more precise, reducing control errors, and ensuring the consistency of processing accuracy. Especially when processing a large number of holes of the same radius, the orderly path arrangement can avoid repeated movements or path intersections, further improving the stability of the production rhythm.
[0093] Storage module: Used to store the target path information set in the register of the interactive device.
[0094] It should be noted that the target path information set is saved into the word register inside the interactive device according to specified rules. For example, the target path information is stored in the area starting from the LW0 register: LW0 and LW1 represent the radius and number of the first type of circle; LW2 and LW3 represent the radius and number of the second type of circle; LW4 and LW5 represent the radius and number of the third type of circle; ...; LW14 and LW15 represent the radius and number of the eighth type of circle, sorted in ascending order of diameter and path planning order.
[0095] Data transmission module: used to send the target path information set to the PLC controller via serial port using the interactive device.
[0096] Drilling module: Used by the PLC controller to send displacement pulse commands to the hole-making machine based on the target path information set, so as to control the hole-making machine to perform the drilling operation corresponding to the displacement pulse command.
[0097] It should be noted that the interactive device sends the target path information set to the PLC controller via the 485 serial port. The PLC controller sends displacement pulse commands to the drilling machine based on the target path information set, thereby controlling the drilling machine to perform the drilling operation corresponding to the displacement pulse commands. The PLC controller is the core equipment of industrial control, with extremely high reliability and anti-interference capabilities. It can operate stably under the complex electromagnetic environment and temperature fluctuations in the workshop, ensuring that the drilling process is continuous and uninterrupted, reducing production stoppages caused by equipment failures. Its precise logic control capability can strictly execute drilling actions according to the preset program, including positioning, feed, and speed adjustment, so that the drilling depth and hole diameter accuracy remain consistent, avoiding dimensional deviations caused by experience differences during manual operation, and significantly improving the product qualification rate.
[0098] The system provided in the second aspect significantly reduces idle travel time during drilling and milling by planning and sorting the shortest paths for the set of circles of each radius. This allows the hole-drilling machine to operate continuously along the optimal path, improving production efficiency. Furthermore, the calculation results are directly transmitted to the PLC to control the hole-drilling machine, achieving fully automated execution of the entire process. This avoids errors and interruptions caused by manual intervention, improving processing quality. At the same time, operators do not need to manually calculate paths or frequently adjust parameters; they only need to input basic parameters through an interactive device to start the operation, greatly reducing the difficulty of operation.
[0099] This application also provides an electronic device, such as... Figure 5 As shown, the electronic device 1400 includes:
[0100] One or more processors 1410;
[0101] The memory 1420 stores one or more programs that, when executed by one or more processors 1410, enable the one or more processors 1410 to implement the method for controlling the movement of a hole-punching machine provided in any embodiment of this application.
[0102] Memory 1420, as a non-transitory network system, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory 1420 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 1420 may optionally include remotely located memories 1420 relative to processor 1410, which can be connected to processor 1410 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0103] The memory 1420 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1420 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1420 and is called and executed by the processor 1410.
[0104] The processor 1410 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
[0105] In some embodiments, the electronic device further includes:
[0106] Input / output interfaces are used to implement information input and output;
[0107] The communication interface is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0108] The bus transmits information between various components of the device (e.g., processor 1410, memory 1420, input / output interfaces, and communication interfaces);
[0109] The processor 1410, memory 1420, input / output interface, and communication interface can communicate with each other within the device via a bus.
[0110] One embodiment of this application also provides a computer-readable storage medium storing computer-executable instructions for executing a method for controlling the movement of a hole-punching machine provided in any embodiment of this application.
[0111] An embodiment of this application also provides a computer program product, including a computer program or computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer program or computer instructions from the computer-readable storage medium and executes the computer program or computer instructions, causing the computer device to perform the method for controlling the movement of a hole-punching machine provided in any embodiment of this application.
[0112] The system architecture and application scenarios described in this application are intended to more clearly illustrate the technical solutions of this application and do not constitute a limitation on the technical solutions provided in this application. Those skilled in the art will understand that as system architectures evolve and new application scenarios emerge, the technical solutions provided in this application are also applicable to similar technical problems.
[0113] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0114] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0115] The above description, with reference to the accompanying drawings, illustrates some embodiments of this application, but does not limit the scope of the invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and spirit of this invention should be considered within the scope of this application.
[0116] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0117] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0118] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0119] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0120] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0121] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A method for controlling the movement of a machine for drilling round holes, characterized in that, The method includes: The PLT file is obtained using an interactive device, and the PLT file is parsed to obtain a set of circles; Obtain the radii and center coordinates of all circles in the set of circles; The set of circles is classified according to the radius of all the circles to obtain a set of circles with multiple radii. Based on the coordinates of all the center points of the circles in the set of circles of each type, determine the center point with the largest x-coordinate and the largest y-coordinate as the current coordinate, and take the circle corresponding to the current coordinate as the current circle; Based on the current coordinates and the current circle, all circles in the set of each type of radius circle are traversed according to preset rules to perform shortest path planning, and target path information of each type of radius circle set is obtained, wherein multiple target path information constitute a target path information set of multiple types of radius circle sets; The target path information set is stored in the register of the interactive device; The target path information set is sent to the PLC controller via a serial port using the interactive device. The PLC controller sends a displacement pulse command to the hole-drilling machine based on the target path information set, thereby controlling the hole-drilling machine to perform the drilling operation corresponding to the displacement pulse command.
2. The method according to claim 1, characterized in that, The process of acquiring a PLT file using an interactive device and parsing the PLT file to obtain a set of circles includes: The PLT file is obtained using an interactive device, and the PLT file is read to obtain status instructions; Multiple sets of circular trajectories are extracted according to the state instructions. The multiple sets of circular trajectories constitute the set of circles, wherein each set of circular trajectories consists of multiple points.
3. The method according to claim 2, characterized in that, Obtaining the radii and center coordinates of all circles in the set of circles includes: Traverse the trajectory of all circles in the set of circles to obtain multiple points of each group of the circle trajectory. Extract the start point and midpoint from the multiple points of each group of the circle trajectory, and obtain the radius and center coordinates of each group of the circle trajectory based on the start point and the midpoint, until the radius and center coordinates of all circles in the set of circles are obtained.
4. The method according to claim 1, characterized in that, The step of traversing all circles in the set of circles of each radius according to preset rules based on the current coordinates and the current circle to perform shortest path planning, and obtaining the target path information of the set of circles of each radius includes: Determine the number of circle center coordinates that are closest to the current coordinates, read the number, and if the number is equal to 1, update the circle center coordinate with the closest distance to the current coordinates and update the circle corresponding to the circle with the closest distance to the current circle. If the number is greater than 1, compare the angle between the line connecting each circle center coordinate with the closest distance to the current coordinates and the positive direction of the horizontal axis, update the circle center coordinate with the smallest angle to the current coordinates, and update the circle corresponding to the circle with the smallest angle to the current circle, until all circles in the set of circles of each type of radius are traversed to obtain the target path information of the set of circles of each type of radius.
5. The method according to claim 1, characterized in that, The step of using the PLC controller to send a displacement pulse command to the hole-drilling machine based on the target path information set, so as to control the hole-drilling machine to perform the drilling operation corresponding to the displacement pulse command, includes: The PLC controller sends a displacement pulse command to the hole-punching machine based on the target path information set. The hole-drilling machine obtains the corresponding target path information and the radius of the circle based on the displacement pulse command, switches the corresponding tool according to the radius of the circle, and uses the tool to drill multiple times according to the target path information. The PLC controller then feeds back the drilling status of each hole to the interactive module.
6. The method according to claim 5, characterized in that, After the PLC controller feeds back the drilling status to the interaction module, it also includes: The interaction module is used to select un-drilled points based on each drilling situation; The interaction module is used to obtain the radius and center coordinates of the circle corresponding to the point where no hole is drilled, and a drilling instruction is generated based on the radius and center coordinates of the circle corresponding to the point where no hole is drilled, and then sent to the PLC controller. The PLC controller is used to control the hole-drilling machine to perform the drilling operation corresponding to the supplementary drilling instruction.
7. A system for controlling the movement of a hole-punching machine, characterized in that, The system includes: Parsing module: used to obtain PLT files using an interactive device, and to parse the PLT files to obtain a set of circles; Information acquisition module: used to acquire the radii and center coordinates of all circles in the set of circles; Classification module: used to classify the set of circles according to the radius of all the circles, and obtain a set of circles with multiple radii; Path planning module: Based on the center coordinates of all the circles in the set of circles of each type, determine the center coordinate of the circle with the largest x-coordinate and the largest y-coordinate as the current coordinate, and take the circle corresponding to the current coordinate as the current circle; based on the current coordinate and the current circle, traverse all circles in the set of circles of each type according to preset rules to perform shortest path planning, and obtain the target path information of the set of circles of each type, wherein multiple target path information constitute the target path information set of multiple types of circles of each type; Storage module: used to store the target path information set in the registers of the interactive device; Data transmission module: used to send the target path information set to the PLC controller via a serial port using the interactive device; Drilling module: Used by the PLC controller to send displacement pulse commands to the hole-making machine based on the target path information set, so as to control the hole-making machine to perform the drilling operation corresponding to the displacement pulse command.
8. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method for controlling the movement of a hole-punching machine as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the method of controlling the movement of a hole-punching machine as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Traversal disorder finite point set path optimization method and system for laser-beam drilling machine
CN114971087A
Round hole feature recognition processing method based on 3D model
CN115618530A