A dispensing control method and device, electronic equipment, storage medium and product
By adjusting the vertical axis position of the dispensing needle in real time in the dispensing equipment, and utilizing a laser displacement sensor and PID control algorithm, the problem of insufficient needle height control precision in existing technologies is solved, achieving high-precision, stable, and consistent dispensing results, and adapting to the needs of multi-variety, small-batch production.
Patent Information
- Application Number
- CN202610240395.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-28
- Publication Date
- 2026-05-29
AI Technical Summary
Existing dispensing equipment suffers from insufficient needle height control precision, poor anti-interference ability, and weak adaptability, making it unable to meet the high-precision dispensing requirements of uneven workpieces such as irregularly shaped parts and curved surfaces. In particular, it is cumbersome to debug and difficult to ensure the consistency of height control in multi-variety, small-batch production.
By determining the initial deviation and target height of the dispensing needle, and combining the vertical axis position control command, the height is measured in real time using a laser displacement sensor. The proportional-integral-derivative control algorithm is used to calculate the control increment and dynamically adjust the vertical axis position of the dispensing needle to ensure that the needle and the workpiece surface maintain a stable and consistent target height.
It achieves precise matching of the dispensing needle height with the workpiece surface, improves dispensing accuracy, avoids the risk of needle collision, enhances the operational reliability and adaptability of the equipment, and adapts to high-speed production cycles.
Smart Images

Figure CN122098906A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of dispensing technology, and more particularly to a dispensing control method, apparatus, electronic device, storage medium, and product. Background Technology
[0002] Dispensing technology is an indispensable core process in fields such as electronics manufacturing, precision machinery, new energy, and automotive parts. It mainly uses dispensing equipment to apply adhesives, sealants, conductive adhesives, and other adhesives to designated positions on workpieces according to preset paths and quantities, thereby achieving functions such as bonding, sealing, conductivity, and fixation of the workpieces. The consistency and accuracy of dispensing quality directly determine the assembly precision, sealing performance, and service life of the final product.
[0003] As the manufacturing industry moves towards higher precision, automation, and intelligence, the market demands increasingly higher precision in workpiece processing. The application scenarios for uneven workpieces such as irregularly shaped parts, curved surfaces, and thin-walled parts are becoming increasingly widespread. These workpieces place stringent requirements on the diameter, shape, and uniformity of adhesive dots during the dispensing process. The core key to achieving this is ensuring that the dispensing needle maintains a constant optimal working distance from the workpiece surface throughout the dispensing process. Traditional dispensing equipment often uses simple on / off control or pure proportional control for needle height control. On / off control can only achieve fixed-height raising and lowering of the needle, unable to continuously adjust according to minute height changes on the workpiece surface. Pure proportional control only outputs adjustment proportionally to the height deviation, making it difficult to eliminate steady-state errors and easily causing the actual distance between the dispensing needle and the workpiece surface to deviate from the preset value. Furthermore, during XY axis movement, vibration and external disturbances can cause height control instability, resulting in poor anti-interference capabilities. Moreover, the height controllers of traditional dispensing equipment are designed with fixed parameters, which are often determined based on specific workpieces, adhesives, and production speeds, only adaptable to a single working condition. In actual production, the materials and surface morphologies of workpieces vary significantly across different industries, and the viscosity and flowability of adhesives differ. Furthermore, adjustments to the production cycle and changes in the dispensing trajectory all affect the height control requirements. Controllers with fixed parameters cannot adaptively adjust to changes in operating conditions. Changing workpieces, adhesives, or adjusting production speeds requires manual readjustment of the controller parameters, which is cumbersome and relies heavily on human experience for accuracy. This not only reduces production efficiency but also makes it difficult to ensure consistent height control under different operating conditions, failing to meet the flexible production needs of multi-variety, small-batch production. Therefore, how to automate and accurately adjust the height of the dispensing needle has become an urgent problem to be solved. Summary of the Invention
[0004] This invention provides a dispensing control method, device, electronic device, storage medium, and product to solve the problems of insufficient control accuracy of dispensing needle height, poor anti-interference ability, and weak adaptability in the prior art.
[0005] According to one aspect of the present invention, a dispensing control method is provided, wherein the method includes: Determine the initial deviation of the dispensing needle and the target height of the dispensing needle; According to the vertical axis position control command, the dispensing needle is controlled to match the dispensing position of the target workpiece according to the target trajectory, and the measured height between the dispensing needle and the target workpiece at the dispensing position is obtained. The current actual height is determined according to the measured height and the initial deviation. The current height error is determined based on the current actual height and the target height, the historical height error is obtained, and the control increment is determined based on the target rule according to the current height error and the historical height error; The target vertical axis position control command is determined based on the control increment and the vertical axis position control command. The target vertical axis position control command is used as the new vertical axis position control command to control the dispensing needle to continue matching the dispensing position according to the target trajectory, and the vertical axis position control command is updated until the target trajectory is completed.
[0006] According to another aspect of the present invention, a dispensing control device is provided, wherein the device comprises: The deviation determination module is used to determine the initial deviation of the dispensing needle and the target height of the dispensing needle. The height determination module is used to control the dispensing needle to match the dispensing position of the target workpiece according to the target trajectory based on the vertical axis position control command, obtain the measured height between the dispensing needle and the target workpiece at the dispensing position, and determine the current actual height based on the measured height and the initial deviation; The incremental determination module is used to determine the current height error based on the current actual height and the target height, obtain the historical height error, and determine the control increment based on the target rule according to the current height error and the historical height error; The dispensing control module is used to determine a target vertical axis position control command based on the control increment and the vertical axis position control command, use the target vertical axis position control command as a new vertical axis position control command to control the dispensing needle to continue matching the position to be dispensed according to the target trajectory, update the vertical axis position control command, until the target trajectory is completed.
[0007] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the dispensing control method according to any embodiment of the present invention.
[0008] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the dispensing control method according to any embodiment of the present invention.
[0009] According to another aspect of the present invention, embodiments of the present invention also provide a computer program product, the computer program product including a computer program, which, when executed by a processor, implements the dispensing control method of any embodiment of the present invention.
[0010] The technical solution of this invention determines the initial deviation and target height of the dispensing needle, controls the dispensing needle to match the dispensing position of the target workpiece according to the target trajectory based on the vertical axis position control command, obtains the measured height between the dispensing needle and the target workpiece at the dispensing position, and determines the current actual height based on the measured height and the initial deviation to ensure the accuracy of the current actual height; determines the current height error based on the current actual height and the target height, obtains the historical height error, determines the control increment based on the target rule according to the current height error and the historical height error, determines the target vertical axis position control command based on the control increment and the vertical axis position control command, uses the target vertical axis position control command as the new vertical axis position control command to control the dispensing needle to continue matching the dispensing position according to the target trajectory, updates the vertical axis position control command until the target trajectory is completed, realizes the precise adjustment of the vertical axis position of the dispensing needle, realizes rapid and accurate compensation for the height deviation caused by the surface undulation of the target workpiece, keeps the dispensing needle and the workpiece surface at a stable and consistent target height, significantly improves dispensing accuracy, avoids the risk of needle collision, and improves the reliability and adaptability of equipment operation.
[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1This is a flowchart of a dispensing control method provided in Embodiment 1 of the present invention; Figure 2 This is a flowchart of a dispensing control method provided in Embodiment 2 of the present invention; Figure 3 This is a flowchart of a dispensing control method provided in Embodiment 3 of the present invention; Figure 4 This is a schematic diagram of the structure of a dispensing platform according to Embodiment 3 of the present invention; Figure 5 This is a schematic diagram of the structure of a dispensing control device according to Embodiment 4 of the present invention; Figure 6 This is a schematic diagram of the structure of an electronic device that implements the dispensing control method of this invention. Detailed Implementation
[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0016] Example 1 Figure 1 This is a flowchart of a dispensing control method according to Embodiment 1 of the present invention. This embodiment is applicable to situations where the height of the dispensing needle is dynamically and in real-time adjusted to complete the dispensing process on the target workpiece. This method can be executed by a dispensing control device, which can be implemented in hardware and / or software and can be configured in electronic equipment, such as a dispensing platform. Figure 1 As shown, the method includes: S110. Determine the initial deviation of the dispensing needle and the target height of the dispensing needle.
[0017] The dispensing needle refers to the end-effector of the dispensing equipment, a core component for achieving precise glue extrusion and completing the dispensing operation. Generally, dispensing equipment may include, but is not limited to, a three-axis dispensing platform (XYZ dispensing platform). Initial deviation can be understood as the installation deviation between the laser displacement sensor associated with the dispensing needle and the dispensing needle in the vertical axis (Z-axis) direction. Typically, the initial deviation is a fixed compensation value obtained through calibration using a flat calibration block, used to correct the hardware positional deviation between the measured height of the laser displacement sensor and the actual height of the needle. Target height can be understood as the optimal working distance between the dispensing needle and the target workpiece surface, preset according to the dispensing process requirements. For example, the target height may include, but is not limited to, 0.5mm, 1mm, etc.
[0018] In this embodiment, the initial deviation of the dispensing needle can be determined by calibration, and a pre-set target height for the dispensing needle can be determined. In actual operation, a calibration block can be used to assist in determining the initial deviation. The calibration block is placed on the worktable, and the dispensing needle is controlled to contact the surface of the calibration block. The vertical axis position of the dispensing needle and the measurement value of the laser displacement sensor are recorded at this time. The difference between the vertical axis position of the dispensing needle and the measurement value of the laser displacement sensor is taken as the initial deviation.
[0019] S120. According to the vertical axis position control command, control the dispensing needle to match the dispensing position of the target workpiece according to the target trajectory, obtain the measured height between the dispensing needle and the target workpiece at the dispensing position, and determine the current actual height according to the measured height and the initial deviation.
[0020] The vertical axis position control command can be understood as the instruction information sent to the device that drives the dispensing needle to move vertically. In actual operation, the dispensing needle can be driven to move vertically by a Z-axis servo driver. The target workpiece refers to the workpiece for which dispensing operation is required. The target trajectory refers to the planar dispensing path of the target workpiece. Generally, the target trajectory for each target workpiece is a pre-planned dispensing coordinate trajectory, and the dispensing needle can move along the target trajectory in a plane. The dispensing position refers to the location on the surface of the target workpiece where the dispensing operation needs to be performed. In practical applications, the dispensing position for each target workpiece can be pre-set, and the target trajectory can pass through each dispensing position sequentially. The measured height refers to the height of the dispensing needle and the target workpiece surface collected by the laser displacement sensor at the dispensing position. The current actual height refers to the true height between the dispensing needle and the target workpiece.
[0021] In this embodiment, upon receiving a vertical axis position control command, the dispensing needle can be driven to adjust to the vertical axis position corresponding to the command. Then, the dispensing needle is controlled to move along the target trajectory plane to identify the dispensing position on the target workpiece. Once the dispensing needle reaches the dispensing position, the height between the dispensing needle and the workpiece surface can be collected by the laser displacement sensor corresponding to the needle as the measured height. The sum of the measured height and the initial deviation is then determined as the current actual height between the dispensing needle and the target workpiece at the dispensing position.
[0022] S130. Determine the current altitude error based on the current actual altitude and the target altitude, obtain the historical altitude error, and determine the control increment based on the target rule according to the current altitude error and the historical altitude error.
[0023] The current height error refers to the difference between the target height and the current actual height. The historical height error refers to the difference between the current actual height and the target height at a historical moment; generally, it can be the height error corresponding to a previously matched dispensing position. In actual operation, the historical height error can be the height error between the two most recent moments, without limitation. The target rule refers to the rule used to determine the control increment by judging the changing trends of the current height error and the historical height error. In practical applications, the target rule can be a Proportional-Integral-Derivative (PID) control algorithm. The control increment refers to the distance the dispensing needle needs to rise or fall in the vertical direction, calculated using the target rule, and is used to update the vertical axis position control command. Generally, when the control increment is positive, the dispensing needle needs to rise; when the control increment is negative, the dispensing needle needs to fall.
[0024] In this embodiment, the difference between the target height and the current actual height can be determined as the current height error, and the height errors of the previous two moments before the dispensing position can be extracted as historical height errors. The current height error and historical height error are then substituted into the PID formula to calculate the control increment. In actual operation, an incremental PID formula can be used to calculate the control increment.
[0025] S140. Determine the target vertical axis position control command based on the control increment and the vertical axis position control command. Use the target vertical axis position control command as the new vertical axis position control command to control the dispensing needle to continue matching the dispensing position according to the target trajectory, update the vertical axis position control command, until the target trajectory is completed.
[0026] The target vertical axis position control command refers to the vertical axis position control command obtained through the current vertical axis position control command and the control increment update. It is the latest command for controlling the raising and lowering of the dispensing needle. In actual operation, when the dispensing needle is raised and lowered by the Z-axis servo driver, the target vertical axis position control command is the latest execution command sent to the Z-axis servo driver to adjust the position of the vertical axis of the dispensing needle.
[0027] In this embodiment, the vertical axis position of the dispensing needle in the vertical axis position control command can be determined. The sum of the vertical axis position of the dispensing needle and the control increment is calculated as the new vertical axis position of the dispensing needle. A vertical axis position control command is generated according to the new vertical axis position of the dispensing needle as the target vertical axis position control command. The target vertical axis position control command is used as the new vertical axis position control command. The dispensing needle is controlled to match the next target workpiece to be dispensed according to the target trajectory. The measured height between the dispensing needle and the target workpiece at the next to be dispensed position is obtained. The current actual height at the next to be dispensed position is determined according to the measured height and the initial deviation. The current height error is determined according to the current actual height and the target height. The historical height error is obtained. The control increment is determined according to the target rule based on the current height error and the historical height error. The target vertical axis position control command is updated and generated again until the target trajectory is completed.
[0028] In this embodiment of the invention, by determining the initial deviation and target height of the dispensing needle, the dispensing needle is controlled according to the vertical axis position control command to match the dispensing position of the target workpiece along the target trajectory. The measured height between the dispensing needle and the target workpiece at the dispensing position is obtained. The current actual height is determined based on the measured height and the initial deviation to ensure the accuracy of the current actual height. The current height error is determined based on the current actual height and the target height, and the historical height error is obtained. Based on the target rule, the control increment is determined according to the current height error and the historical height error. The target vertical axis position control command is determined according to the control increment and the vertical axis position control command. The target vertical axis position control command is used as the new vertical axis position control command to control the dispensing needle to continue matching the dispensing position along the target trajectory. The vertical axis position control command is updated until the target trajectory is completed. This achieves precise adjustment of the vertical axis position of the dispensing needle, enabling rapid and accurate compensation for the height deviation caused by the surface undulations of the target workpiece. This ensures that the dispensing needle and the workpiece surface always maintain a stable and consistent target height, significantly improving dispensing accuracy, avoiding the risk of needle collision, and enhancing the reliability and adaptability of equipment operation.
[0029] In one embodiment, after the target trajectory is completed, the method further includes: Adjust the vertical axis position of the dispensing needle to the initial height position.
[0030] The initial height position can be understood as the height position of the dispensing needle when it is not in operation. In this embodiment, once the target trajectory is completed, the dispensing operation on the target workpiece is finished. At this point, the vertical axis position of the dispensing needle can be adjusted back to the initial height position to reset it for the next dispensing operation.
[0031] Example 2 Figure 2 This is a flowchart of a dispensing control method according to Embodiment 2 of the present invention. This embodiment is a further optimization and extension based on the above embodiments, and can be combined with various optional technical solutions in the above embodiments. Figure 2 As shown, the method includes: S210. Determine the installation deviation of the laser displacement sensor corresponding to the dispensing needle in the vertical direction as the initial deviation, and extract the pre-set target height of the dispensing needle.
[0032] In this embodiment, the installation deviation between the laser displacement sensor corresponding to the dispensing needle and the dispensing needle in the vertical axis direction can be determined by calibration. The installation deviation is used as the initial deviation, and the pre-set target height of the dispensing needle is extracted.
[0033] S220: Receive the vertical axis position control command and update the vertical axis position of the dispensing needle according to the vertical axis position of the dispensing needle in the vertical axis position control command.
[0034] The vertical axis position of the dispensing needle refers to the position that controls the vertical height of the dispensing needle.
[0035] In this embodiment, a vertical axis position control command can be received, the vertical axis position of the dispensing needle can be extracted from the vertical axis position control command, and the vertical axis position of the dispensing needle can be updated according to the vertical axis position.
[0036] S230: Control the dispensing needle to move along the target trajectory and identify the position of the target workpiece to be dispensed. The height between the dispensing needle and the target workpiece when the dispensing needle is at the position to be dispensed is collected by the laser displacement sensor corresponding to the dispensing and used as the measurement height.
[0037] In this embodiment, after the vertical axis position of the dispensing needle is updated, the servo mechanism can be driven to move the dispensing needle along a preset target trajectory. It can then be identified whether the dispensing position on the target trajectory has been reached. When the dispensing needle reaches the dispensing position, the laser displacement sensor can collect the height between the dispensing needle and the surface of the target workpiece at that position in real time as the measurement height.
[0038] S240. Determine the sum of the measured height and the initial deviation as the current actual height.
[0039] In one embodiment, the sum of the measured height and the initial deviation can be determined and used as the current actual height.
[0040] S250. Determine the difference between the target altitude and the current actual altitude as the current altitude error, and extract the current altitude error of the pre-stored historical moment as the historical altitude error.
[0041] In this embodiment, the difference between the target altitude and the current actual altitude can be calculated, and this difference can be used as the current altitude error. Furthermore, the current altitude error from historical moments can be extracted as the historical altitude error. In actual operation, the altitude errors from the two most recent moments can be extracted as the historical altitude error.
[0042] S260: Based on the proportional-integral-derivative control algorithm, the control increment is determined according to the current altitude error and the historical altitude error.
[0043] Among them, the proportional-integral-derivative (PID) control algorithm is a closed-loop control algorithm. The PID control algorithm includes proportional gain, integral gain and derivative gain. In actual operation, a set of proportional gain, integral gain and derivative gain that can make the Z-axis response fast and without overshoot / oscillation can be determined by Ziegler-Nichols method or experimental method.
[0044] In this embodiment, the current altitude error and historical altitude error can be input into the proportional-integral-derivative (PID) control algorithm to obtain the control increment. In actual operation, the PID control algorithm can be: ;in, To control the increment; For proportional gain; This is the integral gain; This is the differential gain; is the sampling period; e(k) is the current high error; e(k-1) is the historical height error of the previous moment; e(k-2) is the historical height error of the two moments before.
[0045] S270. Determine the sum of the vertical axis position of the dispensing needle and the control increment in the vertical axis position control command as the new vertical axis position of the dispensing needle, and generate a vertical axis position control command according to the new vertical axis position of the dispensing needle as the target vertical axis position control command.
[0046] In this embodiment, the sum of the vertical axis position of the dispensing needle and the control increment in the vertical axis position control command can be determined, and the sum can be used as the new vertical axis position of the dispensing needle. Then, a vertical axis position control command can be generated based on the new vertical axis position of the dispensing needle as the target vertical axis position control command.
[0047] S280: Use the target vertical axis position control command as the new vertical axis position control command to control the dispensing needle to continue matching the position to be dispensed according to the target trajectory, update the vertical axis position control command, until the target trajectory is completed.
[0048] In this embodiment of the invention, the installation deviation of the laser displacement sensor corresponding to the dispensing needle in the vertical axis direction is determined as the initial deviation. A pre-set target height for the dispensing needle is extracted. A vertical axis position control command is received, and the vertical axis position of the dispensing needle is updated according to the command. The dispensing needle is controlled to move along the target trajectory and identify the dispensing position on the target workpiece. The height between the dispensing needle and the target workpiece when the laser displacement sensor is at the dispensing position is collected as the measured height. The sum of the measured height and the initial deviation is determined as the current actual height. The difference between the target height and the current actual height is determined as the current height error. The current height error from pre-stored historical moments is extracted as the historical height error. Based on the proportional-integral-derivative control algorithm, the current height is determined according to the current... The control increment is determined by the previous height error and historical height error. The sum of the vertical axis position of the dispensing needle and the control increment in the vertical axis position control command is used as the new vertical axis position of the dispensing needle. A vertical axis position control command is generated according to the new vertical axis position of the dispensing needle as the target vertical axis position control command. The target vertical axis position control command is then used as the new vertical axis position control command to control the dispensing needle to continue matching the dispensing position according to the target trajectory, updating the vertical axis position control command until the target trajectory is completed. This achieves real-time compensation for height changes through PID closed-loop control, ensuring extremely high consistency in the diameter and shape of the glue dots and improving product yield. Simultaneously, it enables the Z-axis to smoothly and quickly track surface contours, adapting to high-speed production cycles. Furthermore, the laser ranging is non-contact, avoiding the wear and scratch risks associated with contact measurement. The system can detect protrusions in advance and command the Z-axis to rise, effectively preventing needle collision accidents.
[0049] Example 3 Figure 3 This is a flowchart of a dispensing control method according to Embodiment 3 of the present invention. This embodiment, based on the above embodiments, uses an XYZ dispensing platform as an example to further illustrate a dispensing control method. In one embodiment, Figure 4 This is a schematic diagram of a dispensing platform according to Embodiment 3 of the present invention. Figure 4 As shown, the purple part is the workpiece stage, used to fix the target workpiece to be dispensed, and moves with the XY platform to the designated dispensing position; the green part is the drive module, which provides power to the XY platform; the blue part is the dispensing head assembly, installed at the end of the Z-axis slide, which includes a dispensing valve, dispensing needle, and laser displacement sensor (not separately marked, integrated near the dispensing head), responsible for adhesive extrusion and real-time height detection; the dark blue part is the base, which is the load-bearing and installation foundation of the equipment; and the gray part is the main frame of the equipment.
[0050] This method requires an XYZ dispensing platform, a laser height sensor, a high-precision charge-coupled device (CCD) positioning camera, and a high-performance motion controller. The CCD positions the workpiece, ensuring consistent product orientation and identical laser sensor sampling positions. A target height is taught before dispensing begins. During the dispensing process, the laser sensor provides real-time feedback on the needle height. Combined with a PID control algorithm, this drives the Z-axis motion mechanism in real-time and with precision, ensuring the dispensing needle maintains a constant preset height above the workpiece surface throughout its movement, thus guaranteeing the stability and consistency of dispensing quality.
[0051] like Figure 3 As shown, the method includes: Step S1: System initialization and calibration.
[0052] Start the system and initialize all hardware. Calibrate the installation deviation (initial deviation) ΔZoffset: Place a flat calibration block on the worktable and control the Z-axis to descend until the dispensing needle lightly touches the surface of the calibration block. Record the Z-axis encoder position Zneedle at this point. Then read the measured value Dcal of the laser sensor. The installation deviation (initial deviation) ΔZoffset = Zneedle - Dcal. When the needle and sensor are perfectly aligned in the Z-direction, ΔZoffset is 0. Set the target height Htarget. Generally, this can be set according to process requirements, determining the optimal working distance between the dispensing needle and the workpiece surface. Tune the PID parameters. Using the Ziegler-Nichols method or experimental methods, determine a set of proportional gains that allows for a fast Z-axis response without overshoot / oscillation. Integral gain and differential gain .
[0053] Step S2: Path planning and motion initiation.
[0054] The main controller loads the path file of the workpiece to be glued and controls the XY motion platform to carry the workpiece and begin moving along the target trajectory. At the same time, the laser displacement sensor is activated for continuous measurement.
[0055] Step S3: Real-time PID dynamic adjustment.
[0056] When the dispensing needle moves to coordinates (Xp, Yp), the main controller retrieves the earliest stored measurement data (Draw) corresponding to that position from the head of the queue. The current actual height is then calculated using a formula. ;in, This refers to the current actual altitude; For measuring height; This is the initial deviation. Calculate the current high error. Extract the historical altitude error e(k-1) from the previous moment and the historical altitude error e(k-2) from the two moments before. Substitute e(k), e(k-1), and e(k-2) into the incremental PID formula to calculate the control increment Δu(k). ;in, To control the increment; For proportional gain; This is the integral gain; This is the differential gain; The sampling period is defined as follows. Update the Z-axis target position: Zcommand(k) = Zcommand(k-1) + Δu(k). Where Zcommand(k-1) is the vertical axis position of the dispensing needle in the vertical axis position control command, and Zcommand(k) is the vertical axis position of the dispensing needle in the target vertical axis position control command. Send Zcommand(k) to the Z-axis servo driver to drive the dispensing mechanism.
[0057] Step S4: Simultaneous dispensing of adhesive.
[0058] The dispensing controller receives instructions from the main controller and opens the dispensing valve to dispense adhesive when the dispensing needle moves to the adhesive dot on the preset path. Since the dispensing height remains constant throughout step S3, the shape and size of the adhesive dot remain consistent.
[0059] Step S5: Loop and End.
[0060] Repeat steps S3 to S4 until the entire dispensing path is complete. Stop the motion, return the Z-axis to zero, and the process ends.
[0061] In this embodiment, PID closed-loop control compensates for height changes in real time, ensuring extremely high consistency in the diameter and shape of adhesive dots, improving product yield, and achieving high consistency. The laser ranging has a fast response, and combined with feedforward-feedback composite control, the Z-axis can smoothly and quickly track surface contours, adapting to high-speed production cycles, achieving both high speed and high precision. Laser ranging is non-contact, avoiding the wear and scratches on workpieces associated with contact measurements. Compared to vision-based solutions, laser is less affected by ambient light and adhesive reflections, resulting in higher reliability. The system can detect protrusions in advance and instruct the Z-axis to rise, effectively preventing collision accidents.
[0062] Example 4 Figure 5 This is a schematic diagram of a dispensing control device according to Embodiment 4 of the present invention. Figure 5 As shown, the device includes: a deviation determination module 51, a height determination module 52, an increment determination module 53, and a dispensing control module 54.
[0063] The deviation determination module 51 is used to determine the initial deviation of the dispensing needle and the target height of the dispensing needle.
[0064] The height determination module 52 is used to control the dispensing needle to match the dispensing position of the target workpiece according to the target trajectory based on the vertical axis position control command, obtain the measured height between the dispensing needle and the target workpiece at the dispensing position, and determine the current actual height based on the measured height and the initial deviation.
[0065] The incremental determination module 53 is used to determine the current height error based on the current actual height and the target height, obtain the historical height error, and determine the control increment based on the target rule according to the current height error and the historical height error.
[0066] The dispensing control module 54 is used to determine the target vertical axis position control command based on the control increment and the vertical axis position control command, use the target vertical axis position control command as the new vertical axis position control command to control the dispensing needle to continue matching the position to be dispensed according to the target trajectory, update the vertical axis position control command, until the target trajectory is completed.
[0067] The technical solution of this invention involves a deviation determination module that determines the initial deviation and target height of the dispensing needle. A height determination module, based on a vertical axis position control command, controls the dispensing needle to match the dispensing position on the target workpiece according to the target trajectory, acquiring the measured height between the dispensing needle and the target workpiece at the dispensing position. The current actual height is determined based on the measured height and the initial deviation, ensuring the accuracy of the current actual height. An incremental determination module determines the current height error based on the current actual height and the target height, acquires historical height errors, and, based on target rules, determines the current height error according to the current height error and historical height error. The dispensing control module determines the target vertical axis position control command based on the control increment and the vertical axis position control command. This target command is then used as the new command to control the dispensing needle to continue matching the dispensing position along the target trajectory. The vertical axis position control command is updated until the target trajectory is completed, enabling precise adjustment of the dispensing needle's vertical axis position. This allows for rapid and accurate compensation for height deviations caused by surface undulations on the workpiece, ensuring the dispensing needle and workpiece surface maintain a stable and consistent target height. This significantly improves dispensing accuracy, avoids the risk of needle collision, and enhances equipment reliability and adaptability to different operating conditions.
[0068] In one embodiment, the deviation determination module 51 includes: The deviation determination unit is used to determine the installation deviation of the laser displacement sensor corresponding to the dispensing needle in the vertical axis direction as the initial deviation, and to extract the pre-set target height of the dispensing needle.
[0069] In one embodiment, the height determination module 52 includes: The vertical axis position update unit is used to receive the vertical axis position control command and update the vertical axis position of the dispensing needle according to the vertical axis position of the dispensing needle in the vertical axis position control command; The height measurement unit is used to control the dispensing needle to move along the target trajectory and identify the dispensing position of the target workpiece. The height between the dispensing needle and the target workpiece when the dispensing needle is at the dispensing position is collected by the laser displacement sensor corresponding to the dispensing and used as the measurement height. The actual height determination unit is used to determine the sum of the measured height and the initial deviation as the current actual height.
[0070] In one embodiment, the incremental determination module 53 includes: The altitude error determination unit is used to determine the difference between the target altitude and the current actual altitude as the current altitude error, and to extract the current altitude error of a pre-stored historical moment as the historical altitude error. The incremental determination unit is used to determine the control increment based on the proportional-integral-derivative control algorithm according to the current altitude error and the historical altitude error.
[0071] In one embodiment, the dispensing control module 54 includes: The dispensing control unit is used to determine the sum of the vertical axis position of the dispensing needle and the control increment in the vertical axis position control command as the new vertical axis position of the dispensing needle, and generate a vertical axis position control command according to the new vertical axis position of the dispensing needle as the target vertical axis position control command.
[0072] In one embodiment, the dispensing control device further includes: The needle reset module is used to adjust the vertical axis position of the dispensing needle to the initial height position.
[0073] The dispensing control device provided in the embodiments of the present invention can execute the dispensing control method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method.
[0074] Example 5 Figure 6 This is a schematic diagram of the structure of an electronic device implementing the dispensing control method of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0075] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0076] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0077] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as dispensing control methods.
[0078] In some embodiments, the dispensing control method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the dispensing control method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the dispensing control method by any other suitable means (e.g., by means of firmware).
[0079] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0080] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0081] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0082] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0083] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0084] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0085] In one embodiment, the present invention further includes a computer program product, which includes a computer program that, when executed by a processor, implements the dispensing control method of any embodiment of the present invention.
[0086] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0087] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0088] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for controlling dispensing, characterized in that, include: Determine the initial deviation of the dispensing needle and the target height of the dispensing needle; According to the vertical axis position control command, the dispensing needle is controlled to match the dispensing position of the target workpiece according to the target trajectory, and the measured height between the dispensing needle and the target workpiece at the dispensing position is obtained. The current actual height is determined according to the measured height and the initial deviation. The current height error is determined based on the current actual height and the target height, the historical height error is obtained, and the control increment is determined based on the target rule according to the current height error and the historical height error; The target vertical axis position control command is determined based on the control increment and the vertical axis position control command. The target vertical axis position control command is used as the new vertical axis position control command to control the dispensing needle to continue matching the dispensing position according to the target trajectory, and the vertical axis position control command is updated until the target trajectory is completed.
2. The method according to claim 1, characterized in that, Determining the initial deviation of the dispensing needle and the target height of the dispensing needle includes: The installation deviation of the laser displacement sensor corresponding to the dispensing needle in the vertical direction is determined as the initial deviation, and the target height of the dispensing needle is extracted in advance.
3. The method according to claim 1, characterized in that, The process of controlling the dispensing needle according to the vertical axis position control command to match the dispensing position of the target workpiece according to the target trajectory, obtaining the measured height between the dispensing needle and the target workpiece at the dispensing position, and determining the current actual height based on the measured height and the initial deviation includes: Receive vertical axis position control command, and update the vertical axis position of the dispensing needle according to the vertical axis position of the dispensing needle in the vertical axis position control command; The dispensing needle is controlled to move along the target trajectory and the position of the target workpiece to be dispensed is identified. The height between the dispensing needle and the target workpiece when the dispensing needle is at the position to be dispensed is collected by the laser displacement sensor corresponding to the dispensing and used as the measurement height. The sum of the measured height and the initial deviation is determined as the current actual height.
4. The method according to claim 1, characterized in that, The step of determining the current height error based on the current actual height and the target height, obtaining historical height errors, and determining the control increment based on the target rule according to the current height error and the historical height error includes: The difference between the target altitude and the current actual altitude is determined as the current altitude error, and the current altitude error of the pre-stored historical time is extracted as the historical altitude error; The control increment is determined based on the proportional-integral-derivative control algorithm, using the current altitude error and historical altitude error.
5. The method according to claim 1, characterized in that, The step of determining the target vertical axis position control command based on the control increment and the vertical axis position control command includes: The sum of the vertical axis position of the dispensing needle and the control increment in the vertical axis position control command is determined as the new vertical axis position of the dispensing needle. The vertical axis position control command is then generated according to the new vertical axis position of the dispensing needle as the target vertical axis position control command.
6. The method according to claim 1, characterized in that, After completing the target trajectory, it also includes: Adjust the vertical axis position of the dispensing needle to the initial height position.
7. A dispensing control device, characterized in that, include: The deviation determination module is used to determine the initial deviation of the dispensing needle and the target height of the dispensing needle. The height determination module is used to control the dispensing needle to match the dispensing position of the target workpiece according to the target trajectory based on the vertical axis position control command, obtain the measured height between the dispensing needle and the target workpiece at the dispensing position, and determine the current actual height based on the measured height and the initial deviation; The incremental determination module is used to determine the current height error based on the current actual height and the target height, obtain the historical height error, and determine the control increment based on the target rule according to the current height error and the historical height error; The dispensing control module is used to determine a target vertical axis position control command based on the control increment and the vertical axis position control command, use the target vertical axis position control command as a new vertical axis position control command to control the dispensing needle to continue matching the position to be dispensed according to the target trajectory, update the vertical axis position control command, until the target trajectory is completed.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the dispensing control method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the dispensing control method according to any one of claims 1-6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the dispensing control method according to any one of claims 1-6.