Double-coordinate system asynchronous machining control method based on double CPUs and DPRAM
Through the asynchronous machining control method of dual-coordinate system with dual CPU and DPRAM, the problem of low efficiency and low information sharing of single CPU is solved, and efficient coordinated work and path collision avoidance of dual-coordinate system are realized. Significantly improves processing efficiency.
Patent Information
- Application Number
- CN202411531361.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2024-11-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing dual-coordinate system control technology, it is difficult for a single CPU to effectively handle the motion control algorithm of two independent coordinate systems, resulting in limited processing speed and low real-time sharing of key information, which affects system stability and collision avoidance.
Using the asynchronous machining control method of dual coordinate system based on dual CPU and DPRAM, by obtaining processing image data, analyzing the central axis and interference lines, segmenting the data and sending it to each CPU, comparing the boundary data in real time, and calling obstacle avoidance strategies when there is interference. Continuous interpolation processing is carried out when there is interference to ensure efficient and coordinated work of the processing head.
It realizes the secure real-time sharing of data of the two coordinate systems, improves processing efficiency, and ensures real-time avoidance of path collisions. It improves processing efficiency exponentially compared to single-head machines, and is suitable for large graphics, large batches, and high-efficiency processing tasks.
Smart Images

Figure CN119045416A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of laser processing and vibration knife processing, and more specifically, to a dual-coordinate system asynchronous processing control method based on dual CPUs and DPRAMs. Background Art
[0002] In the processing fields of laser engraving, cutting, vibration knife, etc., if a dual coordinate system is used, the two heads can be started at the same time in two completely independent coordinate systems, asynchronous processing, and the processing trajectories can be different. This allows the two heads to work simultaneously for various graphics and jointly complete the processing tasks. For single-head work, the processing efficiency is multiplied.
[0003] In the current dual-coordinate system control technology, there is a control method completed by a single CPU. Under the control of an embedded single CPU, to realize the control algorithm of two coordinate systems completely independently, the calculation load of the algorithm is too large for the CPU, and the processing speed in each coordinate system will be affected. There is also a control method in which two controllers each control a coordinate system. This method realizes the sharing of real-time data or information of the two controllers through transmission methods such as serial ports or networks. The defect of this method is that the real-time sharing of key information of the two controllers is not high, which is not conducive to the collision avoidance algorithm of the two coordinate systems. In addition, this external transmission of key information also has an adverse effect on the stability of the system.
[0004] Aiming at the above problems, a dual-coordinate asynchronous machining control method based on dual CPU + DPRAM (dual-port RAM) was developed. Summary of the invention
[0005] In view of the above problems, the purpose of the present invention is to provide a dual-coordinate system asynchronous processing control method based on dual CPU and DPRAM. The present invention is used on a laser machine / vibrating knife machine with an independent dual coordinate system to control the synchronous start of the dual coordinate system and asynchronous processing. It can solve the problem of the CPU calculating the motion control algorithm in two independent coordinate systems, and the key data in the two coordinate systems can be safely and quickly shared in real time, so that the processing speed of the two processing heads can be completely equivalent to that of the single-head machine, and the two processing heads can avoid the path collision problem in real time. Compared with the single-head machine, in the final use, the processing efficiency is indeed doubled. It provides a perfect solution for large-graphic, large-volume, high-efficiency dual-head asynchronous processing tasks in the clothing, leather, cloth and other processing industries.
[0006] The present invention provides a dual-coordinate system asynchronous machining control method based on dual CPUs and DPRAM, comprising: Acquire processed image data; Analyzing the processed image data to determine a central axis and two interference lines, and determining an area between the two interference lines as an interference area; The processed image data is segmented according to the central axis and the two interference lines to obtain a plurality of block data; The plurality of block data are sent to a corresponding CPU; the CPU is used to control the processing of the processing head; the CPU includes CPU1 and CPU2; During the processing, the boundary data of the block data in the current CPU and another CPU are compared to determine whether there is interference between the block data processed by the two CPUs; If there is interference, the obstacle avoidance strategy is called to avoid the obstacle; If there is no interference, the current block data is continuously interpolated and processed by a preset processing strategy; the current block data is the block data that the CPU is processing or about to process; When the processing of the current block data is completed, the next block data is processed, and after all the processed image data are processed, the processing head is returned to the origin of the corresponding coordinate system.
[0007] In this solution, analyzing the processed image data to determine the central axis and two interference lines, and determining the area between the two interference lines as the interference area, includes: Assign tasks based on the trajectory weight of processed image data and determine the central axis; Determine two interference lines according to the central axis and a preset safety distance; The area between the two interference lines is determined as the interference area.
[0008] In this solution, the processing image data is segmented according to the central axis and the two interference lines to obtain a plurality of block data, including: Segmenting the processed image data based on the central axis to obtain segmented image data; The graphics in the segmented image data are segmented based on the interference lines to obtain a plurality of block data.
[0009] This plan also includes: Generate key data according to the boundary data of the block data and the real-time processing data; the key data at least includes the current coordinates, current speed, current speed direction, target coordinates, and path data of the processing head; The critical data is uploaded to DPRAM.
[0010] In this solution, during the processing, the boundary data of the block data in the current CPU and another CPU are compared to determine whether there is interference between the block data processed by the two CPUs, including: The current CPU reads the boundary data of the first block data through the local file to determine the first boundary data, and obtains the boundary data of the second block data from another CPU through the DPRAM to determine the second boundary data; the first block data is the block data that the processing head corresponding to the current CPU is processing or is about to process; the second block data is the block data that the processing head corresponding to the other CPU is processing or is about to process; Calculate the minimum boundary distance between the first boundary data and the second boundary data; When the minimum boundary distance is less than the preset safety distance, it is determined that interference exists; Otherwise, there is no interference, and it is determined whether the current CPU has called the obstacle avoidance strategy; If so, restore the processing logic scene; otherwise, do nothing.
[0011] In this solution, the invoking of the obstacle avoidance strategy to perform obstacle avoidance processing includes: The first block data and the second block data are analyzed based on the processing time, and when the first block data and the second block data all enter the interference area, an obstacle avoidance strategy is executed to determine the processing line segment of the current interpolation cycle; Analyze the processing line segment of the current interpolation cycle, and when the processing line segment of the current interpolation cycle moves away from the center line, perform interpolation movement according to a preset processing strategy; Otherwise, an analysis is performed based on the preset safety distance, the first boundary data, and the second boundary data to determine whether a distance can be interpolated in the current interpolation cycle; If so, the preset machining strategy is adjusted, and the current interpolation cycle is interpolated according to the adjusted machining strategy; If not, the avoidance coordinates are determined according to the first boundary data and the second boundary data, and the current machining head is controlled to perform forced avoidance.
[0012] In this solution, the preset machining strategy is adjusted, and the current interpolation cycle is interpolated according to the adjusted machining strategy, including: According to the current position coordinates, current speed and speed vector direction of the two machining heads in DPRAM, the processable distance of the remaining line segments in the current interpolation cycle is calculated; When the processable distance is greater than a preset distance threshold, the processing speed of the processing head is adjusted based on preset restriction conditions to determine the maximum tolerable speed; the preset restriction conditions at least include not exceeding the original planned speed and reserving a sufficient deceleration distance to prevent the processing head from colliding; The original planned speed in the preset processing strategy is replaced according to the maximum tolerable speed, and the processing head is controlled to perform processing; When the processable distance is less than or equal to a preset distance threshold, processing is stopped and the processing head retreats to avoid the problem.
[0013] This plan also includes: When any processing head leaves the interference area or the current block data processing is completed, the obstacle avoidance process ends.
[0014] The present invention discloses a dual-coordinate asynchronous processing control method based on dual CPU and DPRAM, the method comprising: obtaining processing image data; analyzing the processing image data to determine the central axis, interference line and interference area; segmenting the processing image data according to the central axis and interference line to obtain multiple block data, and sending them to the CPU; comparing the boundary data of the block data in the two CPUs to determine whether there is interference; if there is interference, calling the obstacle avoidance strategy to perform obstacle avoidance processing; if there is no interference, performing continuous interpolation processing on the current block data through the preset processing strategy; when the current block data is processed, the next block data is processed, until all the processing of the processing image data is completed, and the processing head is returned to the origin of the corresponding coordinate system. The present invention can solve the problem of the motion control algorithm of the CPU calculation under two independent coordinate systems and improve the processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A flow chart of a dual-coordinate system asynchronous machining control method based on dual CPUs and DPRAM provided by the present invention is shown; Figure 2 A flow chart showing a method for determining a central axis, an interference line and an interference area provided by the present invention is shown; Figure 3 A flow chart of a method for performing obstacle avoidance processing by calling an obstacle avoidance strategy provided by the present invention is shown; Figure 4 A schematic diagram of a dual coordinate system and graphic allocation provided by the present invention is shown; Figure 5 The dual CPU+DPRAM architecture diagram provided by the present invention is shown; Figure 6 A schematic diagram of the dual coordinate system provided by the present invention after exchange is shown. DETAILED DESCRIPTION
[0016] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0017] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0018] Figure 1 The flowchart of the dual-coordinate asynchronous machining control method based on dual CPU and DPRAM provided by the present invention is shown.
[0019] like Figure 1 As shown, the present invention discloses a dual-coordinate system asynchronous machining control method based on dual CPU and DPRAM, comprising: S102, obtaining processed image data; S104, analyzing the processed image data, determining the central axis and two interference lines, and determining the area between the two interference lines as the interference area; S106, dividing the processed image data according to the central axis and the interference line to obtain a plurality of block data; S108, sending the multiple block data to the corresponding CPU; the CPU is used to control the processing of the processing head; the CPU includes CPU1 and CPU2; S110, during the processing, comparing the boundary data of the block data in the current CPU and another CPU to determine whether there is interference between the block data processed by the two CPUs; S112, if there is interference, calling the obstacle avoidance strategy to perform obstacle avoidance processing; S114, if there is no interference, the current block data is continuously interpolated and processed by a preset processing strategy; the current block data is the block data that the CPU is processing or about to process; S116, when the current block data is processed, the next block data is processed until all the processed image data are processed, and then the processing head is returned to the corresponding coordinate system origin.
[0020] According to an embodiment of the present invention, Figure 4As shown, a dual coordinate system is established according to the position of the processing head. The origin O1 of coordinate system 1 is in the lower left corner, the positive direction of X1 points to the right, and the positive direction of Y1 points to the top; the origin O2 of coordinate system 2 is in the upper left corner, the positive direction of X2 points to the right, and the positive direction of Y2 points to the bottom. Coordinate system 1 controls the up, down, left, and right movements of processing head 1, and coordinate system 2 controls the up, down, left, and right movements of processing head 2. There are a total of 4 motion axes in the two groups of XY, which are driven by four groups of motors respectively. When the two processing heads process a graphic at the same time, the left and right movements of the two processing heads are free, but the vertical movement of the two heads may cause the two heads to collide. The system (controller) will set a preset safety distance for the two heads. If the two heads process outside the safety distance, they will not interfere with each other; if the two heads are within the safety distance, the double-head processing may cause interference in the vertical direction, and the two heads are in danger of collision. Therefore, it is necessary to distribute tasks through the trajectory weights of the processed image data, determine the central axis, and translate the central axis to both sides based on the preset safety distance, determine the two interference lines on both sides of the central axis, and determine the area between the two interference lines as the interference area. The processed image data is divided according to the central axis and the interference lines to obtain multiple block data. Taking the central axis as the reference, the block data above the central axis is sent to CPU1, and the block data below the central axis is sent to CPU2, that is, the block data above the central axis is processed by CPU1, and the block data below the central axis is processed by CPU2. In the header structure of each block data, the upper and lower edge line coordinates of the block data are placed. This edge line coordinate refers to the nearest and farthest edge lines that the trajectory data of this block can reach, followed by the processing trajectory data.
[0021] When analyzing the block data of CPU1, CPU1 is the current CPU and CPU2 is another CPU. Similarly, when analyzing the block data of CPU2, CPU2 is the current CPU and CPU1 is another CPU.
[0022] Taking CPU1 processing as an example, during the processing, CPU1 reads the boundary data (including target coordinates, path data, etc.) of the block data being processed or to be processed from the local file (processing task assigned by the system), updates the current coordinates, current speed, current speed direction, etc. of the processing head in real time, generates key data, and uploads the key data to DPRAM. Since the data in DPRAM can be shared, CPU2 can read the key data uploaded by CPU1 in real time. CPU1 obtains the boundary data of the block data currently processed (or to be processed) by CPU2 through DPRAM, and combines the boundary data of the block data to be processed or being processed by itself to determine whether the block data processed by the two CPUs interfere with each other; if there is no interference, the block data is processed according to the preset processing strategy (the preset processing strategy is generated by the system based on the continuous trajectory planning algorithm of the XY plane); if there is interference, the obstacle avoidance strategy is called for obstacle avoidance processing, and the block data to be processed or being processed by the two CPUs are analyzed, and the processing is continued for a distance or the corresponding processing head of CPU1 is controlled to retreat for obstacle avoidance processing. When the processing of the current block data is completed, determine whether all the data in the local file of CPU1 has been processed. If not, read the next processing block data and continue the entire logical process. If the current file has been processed, return the processing head coordinates to the origin of the current coordinate system so that the processing head does not interfere with the other processing head. CPU1 has completed processing.
[0023] In addition, when the collision logic of the machine structure changes, the coordinate system diagram is as follows Figure 6 As shown in the figure, for this structure, the collision logic of the processing head is reversed, so when the PC software plans the data, the meaning of the central axis and the interference line are also reversed. Similarly, the controller is free when moving vertically, but when moving left and right, the two processing heads may collide and interfere. The algorithm becomes an anti-collision algorithm for left and right movement. The basic principle of this algorithm is the same as Figure 4 The algorithm principle of the structure shown is the same.
[0024] Figure 2 A flow chart of the method for determining the central axis, interference line and interference area provided by the present invention is shown.
[0025] like Figure 2 As shown, according to an embodiment of the present invention, the processed image data is analyzed to determine the central axis and two interference lines, and the area between the two interference lines is determined as the interference area, including: S202, performing task allocation according to the trajectory weight of the processed image data and determining the central axis; S204, determining two interference lines according to the central axis and a preset safety distance; S206: Determine the area between the two interference lines as the interference area.
[0026] It should be noted that if Figure 4 As shown in the figure, the system first extracts the processing trajectory of the entire processed image data, and determines the trajectory weight of the processed image data according to the importance and priority of different trajectory points and trajectory segments in the processing trajectory. Then, according to the trajectory weight of the entire processed image data, the processing tasks corresponding to the processed image data are evenly distributed, and the graphics in the processed image data are segmented so that the overall processing time of each processing head is roughly the same, and the segmentation baseline is determined as the central axis of the total trajectory.
[0027] At the same time, since the beam that controls the movement of the processing head has a certain volume, a collision will occur when it gets too close. Therefore, the system sets a preset safety distance based on the specifications of the beam to ensure that the processing head does not cause a collision between the two beams during operation. The initial value of the preset safety distance is 100mm, and technical personnel in this field can adjust it according to actual needs. Based on the preset safety distance, the central axis is translated up and down respectively to determine the upper and lower interference lines (the distance between the central axis and the upper and lower interference lines is the preset safety distance), and the area between the two interference lines is determined as the interference area.
[0028] According to an embodiment of the present invention, the processed image data is segmented according to the central axis and the two interference lines to obtain a plurality of block data, including: Segmenting the processed image data based on the central axis to obtain segmented image data; The graphics in the segmented image data are segmented based on the interference lines to obtain a plurality of block data.
[0029] It should be noted that the processing tasks corresponding to the processed image data can be evenly distributed to the two processing heads for data processing through the central axis. The overall processing time of each processing head is roughly the same, thereby ensuring the maximum simultaneous processing of the two heads to improve processing efficiency. At the same time, the processing task of each graphic will be divided into multiple block data by the system. Using the interference line as the segmentation standard, the part of the graphic within the interference area is taken as a block data, and the part of the graphic outside the interference area is taken as a block data, so as to facilitate the controller to simplify the anti-collision algorithm of vertical movement.
[0030] According to an embodiment of the present invention, it also includes: Generate key data based on the boundary data of the block data and the real-time processing data; the key data at least includes the current coordinates, current speed, current speed direction, target coordinates, and path data of the processing head; Upload critical data to DPRAM.
[0031] It should be noted that if Figure 5As shown, the main architecture of the controller dual CPU + DPRAM, wherein the DPRAM is built into the FPGA chip, and the two CPUs access the FPGA and then access the internal DPRAM, thereby achieving data sharing of key data of the two CPUs.
[0032] During the processing, the CPU reads the local file (the processing task assigned by the system), reads the boundary data of the block data being processed or to be processed from the local file, determines the target coordinates, path data and other data, and generates key data by combining the current coordinates, current speed, current speed direction and other data of the processing head. At the same time, the key data is updated according to the real-time processing status of the block data and the real-time status of the processing head. Among them, the boundary data of the block data includes the upper and lower boundaries of a closed figure in the interference area, that is, the maximum and minimum values of the absolute Y direction of the block data in this coordinate system.
[0033] According to an embodiment of the present invention, during the processing, comparing the boundary data of the block data in the current CPU and another CPU to determine whether there is interference between the block data processed by the two CPUs includes: The current CPU reads the boundary data of the first block data through the local file to determine the first boundary data, and obtains the boundary data of the second block data from another CPU through the DPRAM to determine the second boundary data; the first block data is the block data that the processing head corresponding to the current CPU is processing or is about to process; the second block data is the block data that the processing head corresponding to the other CPU is processing or is about to process; Calculate the minimum boundary distance between the first boundary data and the second boundary data; When the minimum boundary distance is less than the preset safety distance, it is determined that there is interference; Otherwise, there is no interference, and it is determined whether the current CPU has called the obstacle avoidance strategy; If so, restore the processing logic scene; otherwise, do nothing.
[0034] It should be noted that the first block data and the second block data can be the same graphic or two different graphics. When the processing head completes processing the current graphic and is about to process the next graphic, the first boundary data is obtained through the local data of the current CPU, and the second boundary data of the block data that the processing head corresponding to another CPU is processing or about to process is obtained through DPRAM, and the absolute values of the block boundaries of the first boundary data and the second boundary data are respectively parsed. Among them, the absolute value of the block boundary includes the absolute value of the upper boundary and the absolute value of the lower boundary. Based on the coordinate data of the first boundary data and the second boundary data, the absolute value of the lower boundary of the upper block data and the absolute value of the upper boundary of the lower block data are compared, and combined with the preset safety distance, it is determined whether there is interference between the two processing heads (that is, whether there is a possibility of collision). When the coordinate difference between the absolute value of the lower boundary of the upper block data and the absolute value of the upper boundary of the lower block data is less than the preset safety distance, it is determined that there is interference, and the processing adjustment is performed through the obstacle avoidance strategy preset by the system; otherwise, it is determined that there is no interference, and no obstacle avoidance processing is required. In addition, before processing, it is necessary to determine whether the obstacle avoidance strategy has been called in the previous working process of the processing head. If the obstacle avoidance strategy has not been called before, it means that the current block data and the previous block data can be processed freely and continuously, and this step no longer requires special processing; if the retract obstacle avoidance strategy has been called during the processing of the previous block data, the processing logic scene needs to be restored, including clearing the blocking mark, restoring the position of the XY axis to the coordinates before retracting, and other operations.
[0035] Figure 3 A flow chart of a method for performing obstacle avoidance processing by calling an obstacle avoidance strategy provided by the present invention is shown; like Figure 3 As shown, according to an embodiment of the present invention, calling an obstacle avoidance strategy to perform obstacle avoidance processing includes: S302, analyzing the first block data and the second block data based on the processing time, and when the first block data and the second block data all enter the interference area, executing the obstacle avoidance strategy to determine the processing line segment of the current interpolation cycle; S304, analyzing the processing line segment of the current interpolation cycle, and when the processing line segment of the current interpolation cycle moves away from the center line, performing interpolation movement according to a preset processing strategy; S306, on the contrary, analyzing according to the preset safety distance, the first boundary data and the second boundary data to determine whether a distance can be interpolated in the current interpolation cycle; S308, if yes, then adjust the preset processing strategy, and interpolate the current interpolation cycle according to the adjusted processing strategy; S310: If not, determine the avoidance coordinates according to the first boundary data and the second boundary data, and control the current machining head to perform forced avoidance.
[0036] It should be noted that when the first block data and the second block data all enter the interference area, it is determined that there is a collision risk, and the obstacle avoidance strategy is executed, and the processing line segment of the current interpolation cycle is determined according to the processing trajectory of the first block data. It is judged whether the processing line segment of the current interpolation cycle moves away from the center line. For example, for coordinate system 1, whether the processing line segment is a line segment that tends to move in the negative direction of the Y axis as a whole. If so, it moves away from the center line; otherwise, it moves close to the center line.
[0037] The preset processing strategy is a speed strategy formulated by the system according to graphics or line segments of different shapes and specifications. If the processing line segment of the current interpolation cycle moves away from the center line, the controller does not perform other special processing and interpolates the current interpolation cycle according to the preset processing strategy planned in advance by the system; if the processing line segment of the current interpolation cycle moves close to (not away from) the center line, the key information in the DPRAM is read, such as the current coordinates, current speed, target position, and preset safety distance of the two processing heads, and the processable distance of the remaining line segments in the current interpolation cycle is calculated. The processable distance is compared with the preset distance threshold to determine whether a distance can be interpolated in the current interpolation cycle. If so, the preset processing strategy is adjusted according to the processable distance of the remaining line segments in the current interpolation cycle, and the interpolation speed of the current interpolation cycle is adjusted by the adjusted preset processing strategy; if not, the target position and path data of another processing head are obtained through DPRAM, and the avoidance coordinates of the current processing head are determined in combination with the current position and path data of the current processing head, and the current processing head is controlled to avoid based on the avoidance coordinates.
[0038] According to an embodiment of the present invention, the preset machining strategy is adjusted, and the current interpolation cycle is interpolated according to the adjusted machining strategy, including: According to the current position coordinates, current speed and speed vector direction of the two machining heads in DPRAM, the processable distance of the remaining line segments in the current interpolation cycle is calculated; When the processable distance is greater than the preset distance threshold, the processing speed of the processing head is adjusted based on the preset restriction conditions to determine the maximum tolerable speed; the preset restriction conditions at least include not exceeding the original planned speed and reserving sufficient deceleration distance to prevent the processing head from colliding; The original planned speed in the preset processing strategy is replaced according to the maximum acceptable speed, and the processing head is controlled to perform processing; When the processable distance is less than or equal to the preset distance threshold, processing is stopped and the processing head retreats to avoid the problem.
[0039] It should be noted that the two processing heads are controlled to perform simulated processing according to the current position coordinates, current speed and speed vector direction of the two processing heads in the DPRAM, and the interval distance between the two processing heads in the Y-axis direction during the simulated processing is calculated. When the interval distance is equal to the preset safety distance, the simulated processing is stopped, and the path data between the current position coordinates of the current processing head and the position coordinates of the current processing head when the simulated processing stops is determined as the processable distance of the remaining line segments in the current interpolation cycle. The processable distance is compared with the preset distance threshold. When the processable distance is greater than the preset distance threshold, the controller re-calculates the maximum bearing speed according to the current position, current speed, and speed vector direction (speed direction) of the two processing heads in the DPRAM, combined with the preset restriction conditions, and re-plans the preset processing strategy based on the maximum bearing speed. The processing head is controlled to perform processing according to the re-planned preset processing strategy, and the current interpolation cycle is interpolated. When the processable distance is less than or equal to the preset distance threshold, the interpolation condition is not met, the processing is stopped, and the retreat is performed.
[0040] According to an embodiment of the present invention, it also includes: When any processing head leaves the interference area or the current block data processing is completed, the obstacle avoidance process ends.
[0041] It should be noted that when any processing head (the current processing head or another processing head) leaves the interference area, it means that there is no collision interference between the two processing heads during the processing process, and no obstacle avoidance processing is required. Similarly, when the current block data corresponding to any CPU is processed, the processing head controlled by the CPU will not interfere with the processing head controlled by another CPU, and no obstacle avoidance processing is required.
[0042] The information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals (including but not limited to signals transmitted between user terminals and other devices, etc.) involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions. For example, the "processed image data" involved in this disclosure are all obtained with full authorization.
[0043] The present invention discloses a dual-coordinate asynchronous processing control method based on dual CPU and DPRAM, the method comprising: obtaining processing image data; analyzing the processing image data to determine the central axis, interference line and interference area; segmenting the processing image data according to the central axis and interference line to obtain multiple block data, and sending them to the CPU; comparing the boundary data of the block data in the two CPUs to determine whether there is interference; if there is interference, calling the obstacle avoidance strategy to perform obstacle avoidance processing; if there is no interference, performing continuous interpolation processing on the current block data through the preset processing strategy; when the current block data is processed, the next block data is processed, until all the processing of the processing image data is completed, and the processing head is returned to the origin of the corresponding coordinate system. The present invention can solve the problem of the motion control algorithm of the CPU calculation under two independent coordinate systems and improve the processing efficiency.
[0044] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0045] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0046] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0047] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: a mobile storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0048] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
Claims
1. A dual-coordinate asynchronous machining control method based on dual CPU and DPRAM, characterized in that: include: Acquire processed image data; Analyzing the processed image data to determine a central axis and two interference lines, and determining an area between the two interference lines as an interference area; The processed image data is segmented according to the central axis and the two interference lines to obtain a plurality of block data; The plurality of block data are sent to a corresponding CPU; the CPU is used to control the processing of the processing head; the CPU includes CPU1 and CPU2; During the processing, the boundary data of the block data in the current CPU and another CPU are compared to determine whether there is interference between the block data processed by the two CPUs; If there is interference, the obstacle avoidance strategy is called to avoid the obstacle; If there is no interference, the current block data is continuously interpolated and processed by a preset processing strategy; the current block data is the block data that the current CPU is processing or about to process; When the processing of the current block data is completed, the next block data is processed, and after all the processed image data are processed, the processing head is returned to the origin of the corresponding coordinate system.
2. The dual-coordinate asynchronous machining control method based on dual CPU and DPRAM according to claim 1, characterized in that: The step of analyzing the processed image data to determine the central axis and two interference lines, and determining the area between the two interference lines as the interference area, comprises: Assign tasks based on the trajectory weight of processed image data and determine the central axis; Determine two interference lines according to the central axis and a preset safety distance; The area between the two interference lines is determined as the interference area.
3. The dual-coordinate asynchronous machining control method based on dual CPU and DPRAM according to claim 1, characterized in that: The processing image data is segmented according to the central axis and the two interference lines to obtain a plurality of block data, including: Segmenting the processed image data based on the central axis to obtain segmented image data; The graphics in the segmented image data are segmented based on the interference lines to obtain a plurality of block data.
4. The dual-coordinate asynchronous machining control method based on dual CPU and DPRAM according to claim 1, characterized in that: Also includes: Generate key data according to the boundary data of the block data and the real-time processing data; the key data at least includes the current coordinates, current speed, current speed direction, target coordinates, and path data of the processing head; The critical data is uploaded to DPRAM.
5. The dual-coordinate asynchronous machining control method based on dual CPU and DPRAM according to claim 1, characterized in that: During the processing, comparing the boundary data of the block data in the current CPU and another CPU to determine whether the block data processed by the two CPUs interfere with each other includes: The current CPU reads the boundary data of the first block data through the local file to determine the first boundary data, and obtains the boundary data of the second block data from another CPU through the DPRAM to determine the second boundary data; the first block data is the block data that the processing head corresponding to the current CPU is processing or is about to process; the second block data is the block data that the processing head corresponding to the other CPU is processing or is about to process; Calculate the minimum boundary distance between the first boundary data and the second boundary data; When the minimum boundary distance is less than the preset safety distance, it is determined that interference exists; Otherwise, there is no interference, and it is determined whether the current CPU has called the obstacle avoidance strategy; If so, restore the processing logic scene; otherwise, do nothing.
6. The dual-coordinate asynchronous machining control method based on dual CPU and DPRAM according to claim 5, characterized in that: The calling of the obstacle avoidance strategy to perform obstacle avoidance processing includes: The first block data and the second block data are analyzed based on the processing time, and when the first block data and the second block data all enter the interference area, an obstacle avoidance strategy is executed to determine the processing line segment of the current interpolation cycle; Analyze the processing line segment of the current interpolation cycle, and when the processing line segment of the current interpolation cycle moves away from the center line, perform interpolation movement according to a preset processing strategy; Otherwise, an analysis is performed based on the preset safety distance, the first boundary data, and the second boundary data to determine whether a distance can be interpolated in the current interpolation cycle; If so, the preset machining strategy is adjusted, and the current interpolation cycle is interpolated according to the adjusted machining strategy; If not, the avoidance coordinates are determined according to the first boundary data and the second boundary data, and the current machining head is controlled to perform forced avoidance.
7. The dual-coordinate asynchronous machining control method based on dual CPU and DPRAM according to claim 6, characterized in that: The step of adjusting the preset machining strategy and interpolating the current interpolation cycle according to the adjusted machining strategy includes: According to the current position coordinates, current speed and speed vector direction of the two machining heads in DPRAM, the processable distance of the remaining line segments in the current interpolation cycle is calculated; When the processable distance is greater than a preset distance threshold, the processing speed of the processing head is adjusted based on preset restriction conditions to determine the maximum tolerable speed; the preset restriction conditions at least include not exceeding the original planned speed and reserving a sufficient deceleration distance to prevent the processing head from colliding; The original planned speed in the preset processing strategy is replaced according to the maximum tolerable speed, and the processing head is controlled to perform processing; When the processable distance is less than or equal to a preset distance threshold, processing is stopped and the processing head retreats to avoid the problem.
8. The dual-coordinate asynchronous machining control method based on dual CPU and DPRAM according to claim 7, characterized in that: Also includes: When any processing head leaves the interference area or the current block data processing is completed, the obstacle avoidance process ends.
Citation Information
Patent Citations
Target object machining method and related equipment
CN113878240A
Double-robot gantry welding method, system and equipment
CN115255738A
Tool replacement method and equipment and computer storage medium
CN118650471A
Processing control method, device and equipment and storage medium
CN118672171A
Copper bar welding control method, system and equipment
CN118720498A
