Anti-collision method and system for double-gantry machine table and medium

By monitoring and controlling the machine position in real time on the motor drive controller, combined with limit photoelectric detection sensors and multi-layer anti-collision mechanisms, the problem of untimely response of the double gantry dispensing machine is solved, achieving a fast and safe anti-collision effect and improving work efficiency.

CN121048489APending Publication Date: 2025-12-02SHANGHAI JUTZE INTELLIGENCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511040557.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2025-12-02

AI Technical Summary

Technical Problem

The double-gantry dispensing machine has slow response to collision prevention, software control issues, and large hardware anti-collision blocks that affect the working area.

Method used

By monitoring the machine position and motion parameters in real time on the motor drive controller, it can determine whether interference may occur and control the machine to decelerate or stop when a potential collision is detected. This is combined with limit photoelectric detection sensors and a four-layer anti-collision mechanism, including software planning, motor drive level calculation and hardware limit protection.

Benefits of technology

It implements a fast-response anti-collision mechanism, reduces the burden of path planning on the host computer, extends the life of motor equipment, and improves work efficiency and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121048489A_ABST
    Figure CN121048489A_ABST
Patent Text Reader

Abstract

The invention discloses an anti-collision method and system for a double-gantry machine table and a medium, and is applied to a motion controller of a motor. The method comprises the steps that the current states and next-step moving instructions of the two machine tables are obtained respectively; when at least one machine table is responded to execute moving operation, whether the motion trail of the two end points, facing the other machine table, of one machine table possibly interferes with three side lines of the other machine table or not is judged; the three side lines of the other machine table are two side edge lines and a side line located between the two portal frames; and if the two machine tables may interfere with each other, the machine table executing the moving operation is controlled to decelerate until the machine table stops, and an alarm is given to the upper computer, so that the upper computer sends an avoidance instruction to the motion controller to control at least one machine table to move until the machine table leaves the interference area where interference may occur. A top software control system independent of an upper computer is arranged on a motor driving control layer and realizes quick response of an anti-collision mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automation technology, specifically to a collision prevention method, system, and medium for a double gantry crane. Background Technology

[0002] In industrial production, the dispensing mechanism is a commonly used mechanical component for dispensing adhesives. To meet the needs of modern production, a double-gantry dispensing machine has been designed for the production of large workpieces, such as simultaneous dispensing in two sections on two machines, or for precision workpieces that require different types of adhesives.

[0003] In actual operation, the collision problem between two gantry cranes can be addressed by software-based path planning and hardware-based anti-collision blocks. However, software control suffers from delayed response, and the anti-collision blocks are typically quite large, affecting the actual working area of ​​the cranes.

[0004] Therefore, how to improve the anti-collision mechanism of the double gantry dispensing machine has become an urgent problem to be solved. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a method, system and medium for preventing collisions in a double gantry dispensing machine, in order to solve the problem of untimely response in the prior art's anti-collision scheme for double gantry dispensing machines.

[0006] This invention provides an anti-collision method for a double gantry crane, applied to a motor drive controller, comprising:

[0007] Obtain the current status and next movement command for each of the two machines;

[0008] In response to at least one of the machines performing a movement operation, it is determined whether the movement trajectory of one machine toward the two endpoints of the other machine may interfere with the three side lines of the other machine; wherein the three side lines of the other machine are two side lines and the side line located between the two gantry frames;

[0009] If two machines may interfere with each other, the machine performing the movement operation is controlled to decelerate until it stops and a warning is sent to the host computer, so that the host computer sends an avoidance command to the motion controller to control at least one machine to move until it leaves the interference area where interference may occur.

[0010] Optionally, the two machines are designated as the first machine and the second machine.

[0011] Before obtaining the current status and next movement command of the first and second machines respectively, the process also includes:

[0012] Position the first and second machines at opposite corners of the double gantry machine's working area;

[0013] A calibration point is set in the center of the working area of ​​the double gantry crane;

[0014] The center of the first camera on the first machine and the center of the second camera on the second machine are respectively aligned with the calibration point;

[0015] The coordinate system range of the working area of ​​the double gantry machine is obtained based on the total lateral and longitudinal displacements of the first and second camera centers.

[0016] Optionally, it also includes:

[0017] At preset time intervals, the position and motion information of the two machines are monitored in real time by encoders installed on the motors, and the possibility of interference between the two machines is calculated and determined.

[0018] Optionally, the interference determination method for determining whether the motion trajectory of one machine towards the two endpoints of another machine may interfere with the three side lines of the other machine includes:

[0019] By installing three limit photoelectric detection sensors on the first edge of any machine, and setting collision thresholds for each limit photoelectric detection sensor;

[0020] If any limit photoelectric sensor lights up during the movement operation of at least one of the machines, it is determined that the two machines may be interfering.

[0021] The first limit photoelectric detection sensor is installed directly in front of the first side line of the first machine platform, the second limit photoelectric detection sensor is installed at the left end point of the first side line of the first machine platform at an angle of 45° to the left, and the third limit photoelectric detection sensor is installed at the right end point of the first side line of the first machine platform at an angle of 45° to the right.

[0022] Optionally, the interference determination method also includes:

[0023] If the first and second cameras are facing each other, and the difference in the longitudinal coordinates of the center of the first camera and the center of the second camera is less than or equal to the first longitudinal collision threshold, it is determined that the first and second cameras may interfere.

[0024] In the case of misalignment of the first and second cameras, if the difference between the vertical coordinates of the center of the first camera and the center of the second camera is greater than the second vertical collision threshold and less than the first vertical threshold, and if the first camera is located to the left of the second camera, and the difference between the horizontal coordinates of the center of the first camera and the center of the second camera is less than or equal to the left collision threshold, it is determined that the first and second cameras may interfere.

[0025] When the first and second cameras are misaligned, if the difference in the vertical coordinates of the center of the first camera and the center of the second camera is greater than the second vertical collision threshold but less than the first vertical threshold, and if the first camera is located to the right of the second camera, and the difference in the horizontal coordinates of the center of the first camera and the center of the second camera is less than or equal to the right-side collision threshold, it is determined that the first and second cameras may interfere.

[0026] Optionally, it also includes:

[0027] Move the first and second machines face to face to the position where the first limit photoelectric detection sensor turns from bright to dark, and obtain the first longitudinal collision threshold based on the coordinate information of the center of the first camera and the center of the second camera at this time and the range of the vertical coordinate of the coordinate system.

[0028] The first and second machines are moved to the position where the first limit photoelectric detection sensor turns from bright to dark. The second longitudinal collision threshold is obtained based on the coordinate information of the center of the first camera and the center of the second camera at this time and the range of the vertical coordinate of the coordinate system.

[0029] The first and second machines are moved to the position where the second or third limit photoelectric sensor turns from bright to dark. The left collision threshold and the right collision threshold are obtained based on the coordinate information of the center of the first camera and the center of the second camera and the range of the horizontal coordinate of the coordinate system at this time.

[0030] Optionally, based on the installation position of the camera on the first / second machine, the vertical distance from the camera center to the four edges of the machine, and the coordinates of the camera center in the working area of ​​the double gantry machine, the coordinates of the four endpoints of the first / second machine in the working area of ​​the double gantry machine are obtained.

[0031] Optionally, determining whether the movement paths of the second machine station towards the two endpoints of the first machine station interfere with the two sides of the first machine station and the edge line of the first machine station towards the second machine station includes:

[0032] Let E be the starting point and F be the ending point of the motion path of any endpoint of the second machine, and let GH be any sideline of the first machine.

[0033] Check whether the result of calculating the cross product vector GE of vector GH has the opposite sign to the first result of the cross product vector GF of vector GH.

[0034] Check whether the result of calculating the cross product vector FG of vector FE has the opposite sign to the second result of the cross product vector FH of vector FE.

[0035] If both the first and second results have opposite signs, then it is determined that the movement path of the second machine intersects the edge line of the first machine.

[0036] Calculate whether the motion paths of the second machine towards the two endpoints of the first machine intersect with the two side lines of the first machine and the side line towards the second machine. If any of them intersect, it is determined that the first machine and the second machine will interfere.

[0037] This invention also provides an anti-collision system for a double gantry crane, comprising:

[0038] Two motors are used to drive two machine tools, one for each.

[0039] Two drivers are connected to the two motors respectively;

[0040] Two encoders are mounted on the motor shafts of the two motors, respectively;

[0041] Two motion controllers are electrically connected to the two encoders and two drivers, respectively. The motion controllers acquire the position and motion information of the two machine tools through the encoders. The two motion controllers are configured as follows:

[0042] Obtain the current status and next movement command for each of the two machines;

[0043] In response to at least one of the machines performing a movement operation, it is determined whether the movement trajectory of one machine toward the two endpoints of the other machine may interfere with the three side lines of the other machine; wherein the three side lines of the other machine are two side lines and the side line located between the two gantry frames;

[0044] If two machines may interfere with each other, at least one motion controller sends a command to the corresponding driver to control the machine performing the movement to decelerate until it stops. At the same time, the motion controller sends a warning to the host computer so that the host computer sends an avoidance command to the motion controller to control at least one machine to move until it leaves the interference area where interference may occur.

[0045] This invention also provides a computer-readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the aforementioned anti-collision method for a double gantry machine.

[0046] The beneficial effects of this invention are:

[0047] 1. This embodiment provides a collision avoidance method for a double-gantry machine. An encoder acquires the measured position and motion parameters of the machines. A motion controller monitors and calculates in real time whether a collision is possible between the two machines. Specifically, it calculates whether the side coordinates of the stationary machine coincide with the interference area. If they coincide, it determines that continuing the motion operation may result in a collision. In this case, the moving machine decelerates to a stop and sends a warning to the host computer. The collision avoidance mechanism provided in this embodiment is independent of the host computer's top-level software control system, achieving rapid response at the motor drive level. Furthermore, when a potential collision is detected, a deceleration step is implemented instead of an emergency stop, which helps extend the lifespan of the motor equipment. Using the collision avoidance method for a double-gantry machine provided in this embodiment, a significant amount of collision avoidance calculations can be reduced in the path planning stage of the host computer software system, alleviating the computational burden on the host computer for path planning of the double-gantry machine. This ensures the safe operation of the double-gantry machine while improving its working efficiency.

[0048] 2. This embodiment also provides an anti-collision system for a double-gantry machine, which features four layers of anti-collision processing: The first layer determines whether the moving target's position and path will collide with the system from the top-level software control system of the host computer. The second layer determines whether a collision will occur at the current position through the bottom-level motor driver. The third layer achieves anti-collision through limit light detection protection. The fourth layer achieves hard limit impact protection by setting anti-collision blocks. Through this four-layer anti-collision mechanism, safe production of the double-gantry machine is achieved. Attached Figure Description

[0049] The features and advantages of the invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the invention in any way. In the drawings:

[0050] Figure 1 A flowchart of an anti-collision method for a double gantry crane according to an embodiment of the present invention is shown;

[0051] Figure 2 An example of motion path collision calculation for a double gantry crane is shown in an embodiment of the present invention;

[0052] Figure 3 This diagram illustrates the calibration of the coordinate system of the working area of ​​a double gantry crane according to an embodiment of the present invention.

[0053] Figure 4 This diagram illustrates a method for calibrating the collision threshold when two gantry cranes face each other, according to an embodiment of the present invention.

[0054] Figure 5 This diagram illustrates a method for calibrating the longitudinal collision threshold during misalignment of a double gantry crane according to an embodiment of the present invention.

[0055] Figure 6 This diagram illustrates a method for calibrating the left-side collision threshold of a double gantry crane in an embodiment of the present invention.

[0056] Figure 7 This diagram illustrates a method for calibrating the right-side collision threshold during misalignment calibration of a double gantry crane according to an embodiment of the present invention.

[0057] Figure 8 A schematic diagram of a double-gantry A-frame machine with the camera center as the reference is shown in an embodiment of the present invention;

[0058] Figure 9 A schematic diagram of a double-gantry B-type machine with the camera center as the reference is shown in an embodiment of the present invention;

[0059] Figure 10 This illustrates one of the simplified motion path scenarios of a double gantry crane with any endpoint and a sideline in an embodiment of the present invention;

[0060] Figure 11 This illustrates a second scenario of a simplified motion path for a double gantry crane with any endpoint and a sideline, according to an embodiment of the present invention.

[0061] Figure 12 A schematic diagram of an anti-collision system for a double gantry crane is shown in an embodiment of the present invention. Detailed Implementation

[0062] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0063] The gantry milling machine drive includes motor driver control and system software drive control. The encoder acquires the measured position and motion parameters, while the motion controller performs minor calculations based on the encoder data to directly control the motor's movement. This collaboration achieves precise and controllable motion. Compared to software control, motor drive control offers faster response times. However, the motion controller's computational capabilities do not allow for complex path planning. For example, for a specific workpiece, the dispensing position, dispensing sequence, and machine movement path planning are all determined by the upper-level software system. Typically, double gantry milling machines require simulating collisions between the two machines during path planning to arrive at a collision-free path. This computational load is significant, impacting production efficiency. Therefore, if… Figure 1As shown, this embodiment of the invention provides a collision avoidance method for a double gantry crane, applied to the motion controller of the motor. It does not rely entirely on path planning at the host computer software level to avoid collisions between the two cranes. The specific collision avoidance method includes:

[0064] Step S10: Obtain the current status and next movement command for each of the two machines.

[0065] In this embodiment, the two machines are designated as machine A and machine B (hereinafter referred to as machine A and machine B). The two motion controllers obtain the current status and motion parameters of the two machines through two encoders on the motors of the first and second machines, respectively. They receive the next movement command of the machines from the software control system of the host computer and then send it to the driver to realize the motion control of the two machines.

[0066] Step S20: In response to at least one of the machines performing a movement operation, determine whether the movement trajectory of one machine toward the two endpoints of the other machine may interfere with the three side lines of the other machine; wherein, the three side lines of the other machine are two side side lines and the side line located between the two gantry frames.

[0067] In this embodiment, as Figure 2 As shown, machine A is stationary, while machine B performs a movement operation. The motion controller calculates the starting and ending positions of the two endpoints of machine B facing machine A based on the movement path of machine B, obtaining the interference region information shown by the dashed line. The motion controller then calculates whether the two sides of machine A and the edge line facing machine B coincide with the interference region, that is, whether the coordinates of the three sides of machine A fall within the interference region.

[0068] In step S30, if the two machines may interfere with each other, the machine performing the movement operation is controlled to decelerate until it stops, and a warning is sent to the host computer so that the host computer sends an avoidance command to the motion controller to control at least one machine to move until it leaves the interference area where interference may occur.

[0069] In this embodiment, if the calculation result indicates that machine A and machine B will interfere, the motion controller corresponding to machine B sends a command to the driver, causing machine B to decelerate until it stops. Simultaneously, the motion controller sends a warning to the host computer that there is a risk of collision. In a specific embodiment, the host computer's interactive interface displays an operation interface, allowing the operator to select and control machine A to move in a certain direction until it leaves the interference area where interference may occur. After machine A leaves the interference area, the motion controller then controls machine B to move to the target position, achieving collision prevention for the dual gantry cranes.

[0070] This embodiment provides a collision avoidance method for a double-gantry machine. An encoder acquires the measured position and motion parameters of the machines. A motion controller monitors and calculates in real time whether a collision is possible between the two machines. Specifically, it calculates whether the side coordinates of the stationary machine coincide with the interference area. If they coincide, it determines that continuing the motion operation may result in a collision. Simultaneously, it controls the moving machine to decelerate to a stop and sends a warning to the host computer. The collision avoidance mechanism provided in this embodiment is independent of the host computer's top-level software control system, achieving rapid response at the motor drive level. Furthermore, when a potential collision is detected, a deceleration phase is implemented instead of an emergency stop, which helps extend the lifespan of the motor equipment. Using the collision avoidance method for a double-gantry machine provided in this embodiment, a significant amount of collision avoidance calculations can be reduced in the host computer software system's path planning stage for the double-gantry machine, alleviating the computational burden on the host computer and improving the working efficiency of the double-gantry machine while ensuring its safe operation.

[0071] Before step S10, the method further includes:

[0072] Position the first and second machines at opposite corners of the double gantry machine's working area;

[0073] A calibration point is set in the center of the working area of ​​the double gantry crane;

[0074] The center of the first camera on the first machine and the center of the second camera on the second machine are respectively aligned with the calibration point;

[0075] The coordinate system range of the working area of ​​the double gantry machine is obtained based on the total lateral and longitudinal displacements of the first and second camera centers.

[0076] In this embodiment, as Figure 3 As shown, place machine A and machine B at the upper right corner of the platform. Set a calibration point at the center of the platform's working area. Move machine A so that its camera is aligned with the center of the calibration point and record the displacement (x1, y1). Similarly, move machine B so that its camera is aligned with the calibration point and record the displacement (x2, y2). Then the range of the entire coordinate system is W = x1 + x2, L = y1 + y2.

[0077] As an optional implementation, the interference determination method for determining whether the motion trajectory of one machine towards the two endpoints of another machine may interfere with the three edge lines of the other machine further includes:

[0078] By installing three limit photoelectric detection sensors on the first edge of any machine, and setting collision thresholds for each limit photoelectric detection sensor;

[0079] If any limit photoelectric sensor lights up during the movement operation of at least one of the machines, it is determined that the two machines may be interfering.

[0080] The first limit photoelectric detection sensor is installed directly in front of the first side line of the first machine platform, the second limit photoelectric detection sensor is installed at the left end point of the first side line of the first machine platform at an angle of 45° to the left, and the third limit photoelectric detection sensor is installed at the right end point of the first side line of the first machine platform at an angle of 45° to the right.

[0081] In this embodiment, during the movement of the machine, the motion controller also responds in a timely manner to control the machine to stop moving by responding to the signal of the limit photoelectric detection sensor. That is, if the limit photoelectric detection sensor lights up during the movement of the two machines, the motion controller receives the signal and immediately controls the driver to stop driving the motor, so that the two machines stop moving. Then, through the instructions of the host computer, it controls one machine to leave the interference area and then controls the other machine to move to the target position, so as to realize the machine avoidance operation.

[0082] As an optional implementation method, the interference determination method further includes:

[0083] If the first and second cameras are facing each other, and the difference in the longitudinal coordinates of the center of the first camera and the center of the second camera is less than or equal to the first longitudinal collision threshold, it is determined that the first and second cameras may interfere.

[0084] In the case of misalignment of the first and second cameras, if the difference between the vertical coordinates of the center of the first camera and the center of the second camera is greater than the second vertical collision threshold and less than the first vertical threshold, and if the first camera is located to the left of the second camera, and the difference between the horizontal coordinates of the center of the first camera and the center of the second camera is less than or equal to the left collision threshold, it is determined that the first and second cameras may interfere.

[0085] When the first and second cameras are misaligned, if the difference in the vertical coordinates of the center of the first camera and the center of the second camera is greater than the second vertical collision threshold but less than the first vertical threshold, and if the first camera is located to the right of the second camera, and the difference in the horizontal coordinates of the center of the first camera and the center of the second camera is less than or equal to the right-side collision threshold, it is determined that the first and second cameras may interfere.

[0086] In this embodiment, when the drive controller calculates whether there is interference between the three sides of the stationary machine and the machine to be moved, it uses whether the limit photoelectric detection sensor installed on the machine illuminates as the standard. It should be noted that there is a slight difference between the collision threshold of the limit photoelectric detection sensor referenced by the motion controller during calibration and the collision threshold of the limit photoelectric detection sensor during actual operation. The collision threshold of the limit photoelectric detection sensor during calibration is about 5 mm longer than the collision threshold during actual production, which corresponds to the deceleration distance until stopping in step S30. In a specific embodiment, the collision threshold set for the limit photoelectric detection sensor is set to 2-3 cm.

[0087] As an optional implementation, it also includes:

[0088] The first and second machines are moved face-to-face to the position where the first limit photoelectric detection sensor turns from bright to dark. The first longitudinal collision threshold is obtained based on the coordinate information of the center of the first camera and the center of the second camera at this time and the range of the vertical coordinate of the coordinate system.

[0089] In this embodiment, a first longitudinal collision threshold is calibrated, i.e., the collision threshold in the y-axis direction. The initial positions of the two machines are kept within the collision threshold distance range of the limiting optical detector. The two machines are controlled to move away from each other. When machines A and B move face-to-face and the limiting optical detector in the y-axis direction changes from bright to dark, such as... Figure 4 As shown, at this time, the coordinate of A (x) A1 y A1 B coordinates (x) B2 y B2 The minimum threshold for face-to-face orientation along the y-axis is Ydirect = (Ly B2 )-y A1 .

[0090] The first and second machines are moved to the position where the first limit photoelectric detection sensor turns from bright to dark. The second longitudinal collision threshold is obtained based on the coordinate information of the center of the first camera and the center of the second camera at this time and the range of the vertical coordinate of the coordinate system.

[0091] In this embodiment, a second longitudinal collision threshold is calibrated. When the limit light detector of the AB machine is moved from the y-axis direction to a position where it changes from bright to dark, such as... Figure 5 As shown, at this time, the coordinate of A (x) A3 y A3 B coordinates (x) B4 y B4 The minimum threshold for y-axis misalignment is Ymisplace = (Ly B4 )-y A3 .

[0092] The first and second machines are moved to the position where the second or third limit photoelectric sensor turns from bright to dark. The left collision threshold and the right collision threshold are obtained based on the coordinate information of the center of the first camera and the center of the second camera and the range of the horizontal coordinate of the coordinate system at this time.

[0093] Calibrate the collision threshold in the x-axis direction: Move the A and B machines separately to the point where the limit light detector changes from bright to dark in the x-axis direction. For example... Figure 6 As shown, at this time, the coordinate of A (x) A5 y A5 B coordinates (x) B6 y B6 Left-side collision avoidance x-offset XhitLeft = x A5 -(Wx B6 Similarly, such as Figure 7 As shown, the coordinates of A (x) A7 y A7 B coordinates (x) B8 y B8 The right-side collision avoidance offset XhitRight = x A7 -(Wx B8 ).

[0094] Finally, we can conclude that a collision will occur at the position of the moving target:

[0095] (Ly B )-y A A collision will definitely occur when Ymisplace is less than or equal to 0.

[0096] Ymisplace≤(Ly B )-y A When ≤Ydirect, x A ≥(Wx B And x A -(Wx B )≤XhitLeft

[0097] A collision occurred.

[0098] Ymisplace≤(Ly B )-y A When ≤Ydirect, x A ≤(Wx B And (Wx) B )-x A ≤XhitRight

[0099] A collision occurred.

[0100] As an optional implementation, based on the installation position of the camera on the first / second machine platform, the vertical distance from the camera center to the four edges of the machine platform, and the coordinates of the camera center in the working area of ​​the double gantry machine platform, the coordinates of the four endpoints of the first / second machine platform in the working area of ​​the double gantry machine platform are obtained.

[0101] In this embodiment, as Figure 8 As shown, point O(A) is the center (X) of the camera on the platform. OA Y OA Using the camera center as a reference, calculate the expressions for each vertex and each line segment:

[0102] mo(A) = XhitLeft / 2;

[0103] no(A) = XhitRight / 2;

[0104] op(A) = Ydirect / 2;

[0105] ac(A) = Ydirect - Ymisplace.

[0106] The four endpoints of the rectangle representing the machine's outline can then be expressed by the following formula:

[0107] a(A): (X OA -XhitLeft / 2, Y OA +Ydirect / 2);

[0108] b(A): (X) OA +XhitRight / 2,Y OA +Ydirect / 2);

[0109] c(A):(X) OA -XhitLeft / 2;Y OA -Ydirect / 2-Ymisplace);

[0110] d(A):(X) OA +XhitRight / 2,Y OA -Ydirect / 2-Ymisplace).

[0111] Similarly, such as Figure 9 As shown, the coordinates of the two endpoints of machine B are:

[0112] c(B): (X OB +XhitLeft / 2, Y OB -Ydirect / 2);

[0113] d(B): (X) OB-XhitRight / 2,Y OB -Ydirect / 2).

[0114] In a specific implementation, assuming machine A is stationary and machine B is moving, then it is only necessary to calculate the movement paths of points c(B) and d(B) of machine B. Therefore, in this embodiment, only the coordinates of these two points are calculated.

[0115] As an optional implementation, determining whether the movement path of the second machine station towards the two endpoints of the first machine station interferes with the two sides of the first machine station and the edge line of the first machine station towards the second machine station includes:

[0116] Let E be the starting point and F be the ending point of the motion path of the second machine, and let GH be any sideline of the first machine.

[0117] Check whether the result of calculating the cross product vector GE of vector GH has the opposite sign to the first result of the cross product vector GF of vector GH.

[0118] Check whether the result of calculating the cross product vector FG of vector FE has the opposite sign to the second result of the cross product vector FH of vector FE.

[0119] If both the first and second results have opposite signs, then it is determined that the movement path of the second machine intersects the edge line of the first machine.

[0120] Calculate whether the motion paths of the second machine towards the two endpoints of the first machine intersect with the two side lines of the first machine and the side line towards the second machine. If any of them intersect, it is determined that the first machine and the second machine will interfere.

[0121] In this embodiment, Figure 10 This shows the case where the motion path intersects with the edge line. Figure 11 This illustrates the case where the motion path and the edge line do not intersect. If the two machines do not interfere with each other at the starting and target positions, but interference occurs during the motion, the motion path and the machine edge line are simplified to two line segments. It is then determined whether these two line segments intersect by calculating whether the two endpoints of one line segment are on opposite sides of the other line segment. If they intersect, a collision will occur during the motion.

[0122] If we consider the path of motion as a line segment, and also consider the side that does not collide as a line segment, we can simulate the intersection situation. If points E and F are both on both sides of GH, and the endpoints of G and H are both on both sides of EF, then EF intersects GH.

[0123] The cross product of vectors can determine whether they are on the same side. For example, if the cross product of vectors GH and GE has the opposite sign to the cross product of vectors GH and GF, then points E and F are on opposite sides of vector GH; otherwise, they are on the same side. If one cross product equals 0, then the endpoints are exactly on the line segment.

[0124] Whether line segments EF and GH intersect can be represented as:

[0125] M = [(X H -X G )*(Y G -Y E )-(Y H -Y G )*(X G -X E )]*[(X H -X G )*(Y G -Y F )-

[0126] (Y H -Y G )*(X G -X F When )]<0, the endpoints of E and F are on both sides of GH.

[0127] N = [(X F -X E )*(Y G -Y E )-(Y F -Y E )*(X G -X E )]*[(X F -X E )*(Y G -Y F )-

[0128] (Y H -Y G )*(X G -X F When )]<0, the endpoints of G and H are on both sides of EF.

[0129] When M < 0 and N < 0, line segment EF intersects line segment GH, as follows: Figure 10 As shown, the calculation results for EF and GH at this time are M<0 and N<0, respectively. Figure 11 The calculation results for EF and GH shown are M > 0 and N < 0.

[0130] In specific implementation methods, such as Figure 2 As shown, the two paths and the three sides of machine A are regarded as lines GH, and the movement path of machine B is regarded as line segment EF. By substituting the coordinates into the M and N calculation formulas in the previous embodiment to determine the intersection of the line segments, it can be determined whether the two machines will intersect when they move.

[0131] Similarly, if machine B is stationary, it is also necessary to perform collision calculations between the movement paths of the two endpoints of machine A and the three sides of machine B.

[0132] This embodiment also provides an anti-collision system for a double gantry crane, which, in conjunction with the aforementioned embodiments, incorporates four layers of anti-collision measures:

[0133] The first layer determines the position of the moving target and whether the movement path is in conflict, based on the top-level software control system of the host computer.

[0134] It should be noted that after the host computer software plans the path and sends the command to the motion controller, the machine tool enters the production state. During this process, the host computer software does not participate in collision avoidance calculations. Subsequently, the motion controller controls the driver to drive the motor, so that the machine tool can perform motion operations.

[0135] The second layer determines whether a collision has occurred at the current position through the underlying motor drive layer.

[0136] During the production process of the machine tool, the motor drive layer, namely the motion controller, calculates the positional relationship between the edge lines and endpoints of the two machine tools at intervals of 250 microseconds to determine whether a collision will occur next.

[0137] The third layer uses limit optical detection protection to prevent collisions.

[0138] Limiting optical detectors provide references for several collision thresholds during the calibration process. In actual production, limiting optical detectors serve as another layer of anti-collision mechanism.

[0139] The fourth layer uses anti-collision blocks to achieve hard-limit impact protection.

[0140] The above four-layer anti-collision mechanism ensures safe production of the double gantry machine.

[0141] When planning the path, the control system's software module determines that a collision will occur between the first and second machines. It then employs avoidance and waiting strategies to mitigate the collision. The control system's software module is configured as follows:

[0142] If the first machine is in production, control the second machine to wait until the first machine finishes production. After the first machine leaves the interference area of ​​the second machine's movement path, control the second machine to perform a movement operation.

[0143] If the first machine is not in production, a prompt will appear on the interactive interface before the second machine moves to allow the first machine to move and avoid it.

[0144] In this embodiment, software logic determines whether the position and path of the moving target will collide. If the software determines that the path is dangerous and a collision will occur, it will take measures to avoid the collision, such as yielding or waiting. During production, the waiting method is used. For example, if machine A is dispensing glue in an interference area, machine B will wait until machine A finishes dispensing glue and leaves the interference area before moving to dispense glue. Outside of production, the yielding method is used. After calculating the path danger, a prompt will appear asking whether another machine should move to yield.

[0145] like Figure 12 As shown, in order to achieve the above objectives, the present invention also provides an anti-collision system for a double gantry crane, the system comprising at least one processor 1; and a memory 2 communicatively connected to the at least one processor 1; wherein the memory 2 stores instructions executable by the at least one processor 1, the instructions being executed by the at least one processor 1 to enable the at least one processor 1 to perform the above-described anti-collision method for a double gantry crane.

[0146] In this configuration, memory 2 and processor 1 are connected via a bus. This bus can include any number of interconnecting buses and bridges, connecting various circuits of one or more processors 1 and memory 2. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well-known in the art and therefore will not be described further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by processor 1 is transmitted over a wireless medium via an antenna, which further receives data and transmits it to processor 1.

[0147] Processor 1 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory 2 can be used to store the data used by processor 1 during operation.

[0148] To achieve the above objectives, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor 1, implements the above-described anti-collision method for a double gantry machine.

[0149] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A collision prevention method for a double gantry crane, applied to the motion controller of the motor, characterized in that, include: Obtain the current status and next movement command for each of the two machines; In response to at least one of the machines performing a movement operation, it is determined whether the movement trajectory of one machine toward the two endpoints of the other machine may interfere with the three side lines of the other machine; wherein the three side lines of the other machine are two side lines and the side line located between the two gantry frames; If two machines may interfere with each other, the machine performing the movement operation is controlled to decelerate until it stops and a warning is sent to the host computer, so that the host computer sends an avoidance command to the motion controller to control at least one machine to move until it leaves the interference area where interference may occur.

2. The anti-collision method for a double gantry crane according to claim 1, characterized in that, The two machines are designated as the first machine and the second machine. Before acquiring the current status and next movement command of the first machine and the second machine respectively, the process also includes: Position the first machine and the second machine at two opposite corners of the working area of ​​the double gantry machine; A calibration point is set at the center of the working area of ​​the double gantry crane. The center of the first camera on the first machine and the center of the second camera on the second machine are respectively controlled to align with the calibration point; The coordinate system range of the working area of ​​the double gantry machine is obtained based on the total lateral and longitudinal displacements of the center of the first camera and the center of the second camera.

3. The anti-collision method for a double gantry crane according to claim 1, characterized in that, Also includes: At preset time intervals, the position and motion information of the two machine tools are monitored in real time by an encoder installed on the motor, and the possibility of interference between the two machine tools is calculated and determined.

4. The anti-collision method for a double gantry crane according to claim 2, characterized in that, The interference determination method for judging whether the motion trajectory of one machine towards the two endpoints of another machine may interfere with the three side lines of the other machine also includes: By installing three limit photoelectric detection sensors on the first sideline of any one of the machine tools, and setting collision thresholds for each limit photoelectric detection sensor; If any one of the limit photoelectric detection sensors lights up during the movement operation of at least one of the machines, it is determined that the two machines may interfere with each other. The first limiting photoelectric detection sensor is installed directly in front of the first side line of the first machine tool, the second limiting photoelectric detection sensor is installed at the left end point of the first side line of the first machine tool at a 45° angle to the left, and the third limiting photoelectric detection sensor is installed at the right end point of the first side line of the first machine tool at a 45° angle to the right.

5. The anti-collision method for a double gantry crane according to claim 4, characterized in that, The interference determination method further includes: If the first machine and the second machine are facing each other, and the difference in the vertical coordinates of the center of the first camera and the center of the second camera is less than or equal to the first vertical collision threshold, it is determined that the first machine and the second machine may interfere. In the case of misalignment between the first and second cameras, if the difference between the vertical coordinates of the center of the first camera and the center of the second camera is greater than the second vertical collision threshold and less than the first vertical threshold, and if the first camera is located to the left of the second camera, and the difference between the horizontal coordinates of the center of the first camera and the center of the second camera is less than or equal to the left collision threshold, it is determined that the first and second cameras may interfere. In the case of misalignment between the first and second cameras, if the difference in the vertical coordinates between the center of the first camera and the center of the second camera is greater than the second vertical collision threshold but less than the first vertical threshold, and if the first camera is located to the right of the second camera, and the difference in the horizontal coordinates between the center of the first camera and the center of the second camera is less than or equal to the right-side collision threshold, it is determined that the first and second cameras may interfere.

6. The anti-collision method for a double gantry crane according to claim 5, characterized in that, Also includes: Move the first machine and the second machine face to face to the position where the first limiting photoelectric detection sensor turns from bright to dark, and obtain the first longitudinal collision threshold based on the coordinate information of the center of the first camera and the center of the second camera at this time and the range of the vertical coordinate of the coordinate system. The first and second machines are moved to the position where the first limiting photoelectric detection sensor turns from bright to dark. The second longitudinal collision threshold is obtained based on the coordinate information of the center of the first camera and the center of the second camera at this time and the range of the vertical coordinate of the coordinate system. The first and second machines are moved to the position where the second or third limit photoelectric sensor turns from bright to dark. The left collision threshold and the right collision threshold are obtained based on the coordinate information of the center of the first camera and the center of the second camera and the range of the horizontal coordinate of the coordinate system at this time.

7. The anti-collision method for a double gantry crane according to claim 4, characterized in that, Based on the camera's installation position on the first / second machine platform, the vertical distance from the camera center to the four edges of the machine platform, and the coordinates of the camera center in the working area of ​​the double gantry machine platform, the coordinates of the four endpoints of the first / second machine platform in the working area of ​​the double gantry machine platform are obtained.

8. The anti-collision method for a double gantry crane according to claim 7, characterized in that, Determining whether the movement path of the second machine station towards the two endpoints of the first machine station interferes with the two sides of the first machine station and the edge line of the first machine station towards the second machine station includes: Let E be the starting point and F be the ending point of the motion path of any endpoint of the second machine, and let GH be any sideline of the first machine. Check whether the result of calculating the cross product vector GE of vector GH has the opposite sign to the first result of the cross product vector GF of vector GH. Check whether the result of calculating the cross product vector FG of vector FE has the opposite sign to the second result of the cross product vector FH of vector FE. If both the first and second results have opposite signs, then it is determined that the movement path of the second machine intersects the edge line of the first machine. Calculate whether the movement paths of the second machine towards the two endpoints of the first machine intersect with the two side lines of the first machine and the side line towards the second machine. If any of them intersect, it is determined that the first machine and the second machine will interfere.

9. A collision avoidance system for a double gantry crane, characterized in that, include: Two motors are used to drive two machine tools, one for each. Two drivers are connected to the two motors respectively; Two encoders are respectively installed on the motor shafts of the two motors; Two motion controllers are electrically connected to the two encoders and two drivers, respectively. The motion controllers acquire the position and motion information of the two machine tools through the encoders. The two motion controllers are configured as follows: Obtain the current status and next movement command for each of the two machines; In response to at least one of the machines performing a movement operation, it is determined whether the movement trajectory of one machine toward the two endpoints of the other machine may interfere with the three side lines of the other machine; wherein the three side lines of the other machine are two side lines and the side line located between the two gantry frames; If two machines may interfere with each other, at least one of the motion controllers sends a command to the corresponding driver to control the machine performing the movement to decelerate until it stops. At the same time, the motion controller sends a warning to the host computer so that the host computer sends an avoidance command to the motion controller to control at least one machine to move until it leaves the interference area where interference may occur.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the anti-collision method for a double gantry machine as described in any one of claims 1 to 8.