Penicillin bottle cap opening method and system for automatic dispensing machine

By setting up an XYZ three-dimensional coordinate system and using visual recognition technology, the position of the robotic arm gripper is corrected by calculating compensation values. This solves the problem that fixed-parameter mechanical capping devices cannot adapt to vials of different sizes, and enables efficient and accurate capping operation of the automatic dispensing machine.

CN121247702AInactive Publication Date: 2026-01-02美蓝(杭州)医药科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511722565.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-21
Publication Date
2026-01-02
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the existing technology, mechanical capping devices with fixed parameters cannot adapt to vials of different sizes, resulting in capping failure or inaccuracy, which affects the efficiency and accuracy of automatic dispensing machines.

Method used

By setting up an XYZ three-dimensional spatial coordinate system, the size of the vial is obtained through visual recognition, the compensation value is calculated and the center position of the gripper of the robotic arm is corrected, so as to achieve accurate opening of vials of different sizes.

Benefits of technology

It improves the opening efficiency and accuracy of automatic dispensing machines, reduces human operation errors and risks, and adapts to the opening needs of vials of different sizes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121247702A_ABST
    Figure CN121247702A_ABST
Patent Text Reader

Abstract

The invention relates to the field of automatic operation of dispensing equipment, in particular to a penicillin bottle uncapping method and system for an automatic dispensing machine, and the method comprises the steps: firstly setting a mechanical arm movement XYZ three-dimensional space coordinate system, calibrating a reference coordinate, and setting a slope and an intercept calculation target value in a segmented manner according to the diameter of a bottle body; the bottle body diameter and the bottle body total height of the penicillin bottle are obtained through visual recognition, a compensation value is calculated, the actual in-place coordinate point of the center position of the front-end clamping jaw is corrected, and the mechanical arm pose parameters and the actual in-place coordinate point are input into a mechanical arm control system to control the mechanical arm to execute uncapping operation; the uncovering system comprises a visual identification module, an uncovering mechanism, a mechanical arm control system, a front-end clamping jaw and the like. The technical effects that the position of the mechanical arm can be accurately corrected according to the diameters of different bottle bodies, and precise uncovering operation on the penicillin bottles is achieved are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of automatic operation of dispensing equipment, in particular to a method and system for opening a vial of an automatic dispensing machine. BACKGROUND

[0002] In the medical field, the application of automatic dispensing machines has brought great value to improve the efficiency and accuracy of dispensing. With the continuous development of medical technology, the requirements for the function and performance of automatic dispensing machines are increasingly improved. Automatic dispensing machines can reduce errors and pollution risks in the process of manual dispensing, and ensure the safety and effectiveness of patient medication. In the dispensing process, the opening operation of the vial is a key link, and its efficiency and accuracy directly affect the smooth progress of the entire dispensing process. In the opening operation of the vial of the automatic dispensing machine, there are many conventional means. One common way is manual opening by the operator, who uses simple tools such as tweezers, pliers, etc. to open the vial. Although this method can complete the opening task to some extent, it is low in efficiency and is easily affected by individual differences of the operator, resulting in unstable opening effect. Another way is to use a mechanical opening device with fixed parameters, which opens the vial according to the preset parameters without considering the size difference of the vial. This method has a certain efficiency when dealing with vials of uniform size, but for vials of different sizes, it often cannot accurately open the vial. The defects of the prior art are that manual opening is low in efficiency and difficult to meet the needs of large-scale dispensing, and is prone to human error, increasing the risk in the dispensing process. The mechanical opening device with fixed parameters cannot adapt to vials of different sizes, and when encountering vials with large size difference, it may not accurately clamp and open the vial, affecting the overall performance of the automatic dispensing machine and the accuracy of dispensing. SUMMARY The present application solves the problem that the mechanical opening device with fixed parameters cannot adapt to vials of different sizes, and proposes a method and system for opening a vial of an automatic dispensing machine, which uses a method of correcting the opening position according to the size of the vial, so as to adapt to vials of different sizes for opening operation and improve the efficiency and accuracy of opening.

[0003] To achieve the above object, the following technical scheme is proposed: A method for opening a vial of an automatic dispensing machine, suitable for a front-end gripper of a mechanical arm to grab a vial to an opening mechanism, comprising the following steps: S1, setting a XYZ three-dimensional space coordinate system of the mechanical arm, the front-end gripper grabs the smallest size vial to the opening mechanism working position, and the coordinate point of the center position of the front-end gripper at this time is calibrated as the reference coordinate (X0, Y0, Z0); S2, according to the setting of the bottle body diameter interval, and set the corresponding slope and intercept of each interval, according to the linear function to calculate the target value; S3, through visual recognition to obtain the bottle body diameter and the total height H of the bottle body of the penicillin bottle; S4, calculate the compensation value for correcting the actual position of the mechanical arm: The compensation value is (the target value-the bottle body diameter / 2)-the calibration bias term. S5, according to the compensation value and the total height H of the bottle body, correct the actual coordinate point of the center position of the front end gripper; S6, input the preset mechanical arm pose parameters and the calculated actual coordinate into the mechanical arm control system, control the mechanical arm to move to the target pose and perform the cap opening operation.

[0004] The present application can accurately grasp and open the penicillin bottle of different sizes by setting the coordinate system, calculating the target value, obtaining the size of the penicillin bottle, calculating the compensation value and correcting the coordinate point, etc. The defects of low efficiency of manual opening and fixed parameter mechanical opening device unable to adapt to different size penicillin bottles in the prior art are overcome, the dispensing efficiency and accuracy of the automatic dispensing machine are improved, and the risk in the dispensing process is reduced.

[0005] As preferred, the mechanical arm motion XYZ three-dimensional space coordinate system construction process is as follows: setting a reference origin, taking the horizontal forward direction of the mechanical arm as the X axis, taking the horizontal right horizontal movement direction of the mechanical arm as the Y axis, and taking the vertical upward movement direction of the mechanical arm as the Z axis.

[0006] As preferred, the S2 specifically includes the following steps: According to the setting of the bottle body diameter interval, it is divided into 3 intervals: The first interval is (11, 15.77] mm, the slope is set to 0.1333, the intercept is set to 6.1467, and the target value is 0.1333×bottle body diameter+6.1467 at this time; The second interval is (15.77, 18.3] mm, the slope is set to 0.085, the intercept is set to 6.73, and the target value is 0.085×bottle body diameter+6.73 at this time; The third interval is (18.3, 26] mm, the slope is set to 0.09, the intercept is set to 6.5, and the target value is 0.09×bottle body diameter+6.5 at this time.

[0007] The present application calculates the target value (unit same as the coordinate system, assuming mm) according to the bottle body diameter (mm). Because the position of the gripper is different when gripping bottles of different diameters, the offset needs to be calculated according to the bottle body diameter.

[0008] As preferred, the S5 specifically comprises: calculating the actual coordinate point (X1, Y1, Z1) of the center position of the front end gripper, wherein: X1=X0-compensation value; Y1=Y0; Z1=Z0-(H-bottle cap height correction term)+ΔZ, ΔZ is the offset in the Z-axis direction, which is a preset calibration parameter.

[0009] As preferred, the S4 further comprises the following steps before calculating the compensation value: judging whether the bottle body diameter is in the segmented interval, if yes, the compensation value is calculated; if not, the mechanical arm directly throws out the vial, and the feedback information is that the diameter is not in the effective segmented interval.

[0010] As preferred, the mechanical arm pose parameters include the roll angle, pitch angle and yaw angle of the mechanical arm in space.

[0011] As preferred, the cap opening operation includes rotating and unscrewing or vertically pulling out or first rotating and unscrewing and then vertically pulling out.

[0012] A vial cap opening system for an automatic dispensing machine, which is applicable to the above-mentioned vial cap opening method for an automatic dispensing machine, comprising: a visual recognition module for obtaining the bottle body diameter and the total height H of the vial; a cap opening mechanism provided with a bottle cap gripper for clamping the bottle cap of the vial; a mechanical arm control system provided with a data storage module, a data processing module and an execution control module, the data processing module is provided with an actual coordinate calculation program, the data storage module stores all preset calculation parameters and calculation result information, and the execution control module controls the front end gripper to perform the cap opening operation according to the actual coordinate; a front end gripper for clamping the vial.

[0013] As preferred, the front end gripper comprises a first clamping member and a second clamping member arranged symmetrically left and right and a limiting member arranged between the first clamping member and the second clamping member, and the first clamping member and the second clamping member are driven by a pneumatic cylinder or an electric cylinder and simultaneously move close to or away from the limiting member.

[0014] The vial is clamped between the position enclosed by the first clamping member, the second clamping member and the limiting member.

[0015] The beneficial effects of the present application are: by setting the coordinate system and obtaining the specific size of the penicillin bottle, the compensation value is calculated to correct the actual arrival coordinate point of the center position of the front end gripper, and then the mechanical arm is controlled to move to the target pose to perform the uncapping operation, so that the effect of accurately uncapping different sizes of penicillin bottles can be achieved. Different sizes of penicillin bottles require different clamping positions and uncapping forces when uncapping, and the corrected coordinate point can make the mechanical arm accurately grasp and uncap penicillin bottles of different sizes. BRIEF DESCRIPTION OF DRAWINGS

[0016] Figure 1 The method flowchart of the present application.

[0017] Figure 2 The XY axis schematic diagram of the present application.

[0018] Figure 3 The XZ axis schematic diagram of the present application.

[0019] 1, mechanical arm; 2, penicillin bottle; 3, first clamping piece; 4, second clamping piece; 5, limiting piece; 6, uncapping mechanism. DETAILED DESCRIPTION

[0020] The technical solutions in the embodiments of the present application will be further described in detail below with reference to the drawings. The described embodiments are only possible technical implementations of the present application, but are not limited thereto, and those skilled in the art can obtain other embodiments without creative labor based on the embodiments of the present application, which are also within the protection scope of the present application. The present application mainly adopts the method of correcting the uncapping position according to the size of the penicillin bottle, which achieves the effect of adapting to different sizes of penicillin bottles for uncapping operation and improving uncapping efficiency and accuracy. The present application will be described in further detail below.

[0021] Embodiment 1: The penicillin bottle uncapping method for the automatic dispensing machine provided by the embodiments of the present application includes the steps of setting a coordinate system, calculating a target value, obtaining the size of the penicillin bottle, calculating a compensation value, correcting the actual arrival coordinate point, and controlling the mechanical arm to perform the uncapping operation. Among them, by setting the coordinate system and obtaining the specific size of the penicillin bottle, the compensation value is calculated to correct the actual arrival coordinate point of the center position of the front end gripper, and then the mechanical arm is controlled to move to the target pose to perform the uncapping operation, so that the effect of accurately uncapping different sizes of penicillin bottles can be achieved. This is because different sizes of penicillin bottles require different clamping positions and uncapping forces when uncapping, and the corrected coordinate point can make the mechanical arm accurately grasp and uncap penicillin bottles of different sizes, as shown in Figure 1 , the specific steps include: When setting the XYZ three-dimensional space coordinate system of the mechanical arm movement, the reference origin is set first, the horizontal forward direction of the mechanical arm is taken as the X axis, the horizontal right lateral direction of the mechanical arm is taken as the Y axis, and the vertical upward movement direction of the mechanical arm is taken as the Z axis. The reference origin can be selected as a certain fixed point of the automatic dispensing machine, such as a corner of the base of the dispensing machine. The coordinate system thus constructed can accurately describe the position of the mechanical arm in space. In actual application, other appropriate reference points can also be selected to construct the coordinate system according to the specific structure and layout of the dispensing machine. The set segmented interval of the bottle body diameter is divided into three intervals, the first interval is (11, 15.77] mm, the slope is set to 0.1333, the intercept is set to 6.1467, and the target value is 0.1333 x bottle body diameter + 6.1467; the second interval is (15.77, 18.3] mm, the slope is set to 0.085, the intercept is set to 6.73, and the target value is 0.085 x bottle body diameter + 6.73; the third interval is (18.3, 26] mm, the slope is set to 0.09, the intercept is set to 6.5, and the target value is 0.09 x bottle body diameter + 6.5. The reason for segmented calculation is that the offset rules of the vial gripper position are different in different size intervals. In actual operation, the intervals can also be further subdivided according to more experimental data to improve the accuracy of the calculation.

[0022] The bottle body diameter and the total height H of the bottle body of the vial are obtained through visual recognition. Visual recognition can be achieved by using an industrial camera and an image processing algorithm. The industrial camera can clearly capture the image of the vial, and the image processing algorithm can analyze the image to accurately measure the bottle body diameter and the total height. In some special cases, other measurement methods such as laser ranging can also be used to obtain these size information.

[0023] When calculating the compensation value for correcting the actual position of the mechanical arm, the compensation value = (target value - bottle body diameter / 2) - calibration bias. Before calculating the compensation value, it is necessary to determine whether the bottle body diameter is in the segmented interval, if so, the compensation value is calculated; if not, the mechanical hand directly throws out the vial, and the feedback information is that the diameter is not in the effective segmented interval. This can avoid invalid operation on vials that do not meet the size requirements, and improve the dispensing efficiency.

[0024] The actual position coordinate point of the center position of the front end gripper is corrected according to the compensation value and the total height H of the bottle body. The actual position coordinate point (X1, Y1, Z1) of the center position of the front end gripper is calculated, wherein: X1 = X0 - compensation value; Y1 = Y0; Z1 = Z0 - (H - cap height correction term) + ΔZ, ΔZ is the Z axis direction offset, which is a preset calibration parameter. By correcting the coordinate point, the mechanical arm can accurately reach the cap opening position of vials of different sizes.

[0025] The preset mechanical arm pose parameters and the calculated actual in-place coordinates are input to the mechanical arm control system, the mechanical arm is controlled to move to the target pose and perform the cap opening operation. The mechanical arm pose parameters include the roll angle, pitch angle and yaw angle of the mechanical arm in space. The cap opening operation includes rotating and unscrewing or vertically pulling out or first rotating and unscrewing and then vertically pulling out. Different cap opening methods can be selected according to the cap type of the penicillin bottle and the actual situation. The implementation principle of the embodiment is that the embodiment can accurately grasp and open the caps of penicillin bottles of different sizes by setting the coordinate system, calculating the target value in sections, obtaining the size of the penicillin bottle, calculating the compensation value and correcting the coordinate point, etc. The defects of low efficiency of manual cap opening and the inability of fixed parameter mechanical cap opening device to adapt to penicillin bottles of different sizes in the prior art are overcome, the dispensing efficiency and accuracy of the automatic dispensing machine are improved, and the risk in the dispensing process is reduced. Embodiment 2: The difference between this embodiment and the above embodiment is that the penicillin bottle cap opening system for the automatic dispensing machine includes a visual recognition module, a cap opening mechanism, a mechanical arm control system and a front end gripper. The visual recognition module is used to obtain the bottle body diameter and the total height H of the penicillin bottle. It can use high-precision industrial cameras and advanced image processing algorithms to quickly and accurately obtain the size information of the penicillin bottle. In some occasions with higher accuracy requirements, multiple cameras can also be used to take pictures from different angles to improve the accuracy of measurement. Reference Figure 3 , the cap opening mechanism 6 is provided with a cap gripper for clamping the cap of the penicillin bottle 2. The cap gripper can be made of special materials, such as rubber materials with high friction, to ensure that it does not slip when clamping the cap. At the same time, the opening and closing force of the cap gripper can be accurately controlled by a hydraulic system or an electric system to adapt to different types of caps. The mechanical arm control system is provided with a data storage module, a data processing module and an execution control module. The data processing module is provided with an actual in-place coordinate calculation program, the data storage module stores all preset calculation parameters and calculation result information, and the execution control module controls the front end gripper to perform the cap opening operation according to the actual in-place coordinates. The data storage module can use a large-capacity hard disk or flash memory to store a large amount of calculation parameters and result information. The data processing module can use a high-performance processor such as a multi-core CPU or GPU to improve the calculation speed. Reference Figure 2, The mechanical arm 1 is provided with front end clamping jaws including a first clamping piece 3 and a second clamping piece 4 arranged symmetrically left and right and a limiting piece 5 arranged between the first clamping piece and the second clamping piece, the first clamping piece 3 and the second clamping piece 4 are driven by a gas cylinder or an electric cylinder, and simultaneously move close to or away from the limiting piece. The vial 2 is clamped between the position surrounded by the first clamping piece 3, the second clamping piece 4 and the limiting piece 5. The gas cylinder drive has the advantages of fast response speed and large force, while the electric cylinder drive has the advantages of high control precision and good stability. In actual application, the appropriate driving mode can be selected according to the specific needs. The implementation principle of the embodiment is: the vial unscrambling system of the embodiment can accurately obtain the size information of the vial, calculate the actual in-place coordinates, and control the front end clamping jaws and the unscrambling mechanism to unscramble vials of different sizes. Compared with the prior art, the unscrambling efficiency and accuracy are improved, the manual operation error and risk are reduced, and the demand of the automatic dispensing machine for unscrambling vials of different sizes is met. The above are preferred embodiments of the application, and do not limit the protection scope of the application: equivalent changes made according to the structure, shape and principle of the application should be covered within the protection scope of the application.

Claims

1. A method for opening vials in an automatic dispensing machine, applicable to the gripper at the front end of a robotic arm grasping the vial to the opening mechanism, characterized in that, Includes the following steps: S1, set the XYZ three-dimensional coordinate system for the movement of the robotic arm, the front gripper picks up the smallest size vial and moves it to the working position of the capping mechanism, and calibrates the coordinate point of the center position of the front gripper at this time as the reference coordinate (X0, Y0, Z0). S2, based on the set segment interval of the bottle diameter, and set the slope and intercept corresponding to each segment interval, calculate the target value according to the linear function; S3, obtain the bottle diameter and total height H of the vial through visual recognition; S4, Calculate the compensation value used to correct the actual position of the robotic arm: Compensation value = (Target value - Bottle diameter / 2) - Calibration bias term; S5, correct the actual positioning coordinates of the front gripper center position based on the compensation value and the total height H of the bottle; S6 inputs the preset robotic arm pose parameters and the calculated actual positioning coordinates into the robotic arm control system, controlling the robotic arm to move to the target pose and perform the opening operation.

2. The vial opening method for an automatic dispensing machine according to claim 1, characterized in that, The process of constructing the XYZ three-dimensional spatial coordinate system for the robotic arm motion is as follows: Set a reference origin, take the horizontal forward direction of the robotic arm as the X-axis, take the horizontal rightward lateral movement direction of the robotic arm as the Y-axis, and take the vertical upward movement direction of the robotic arm as the Z-axis.

3. The vial opening method for an automatic dispensing machine according to claim 1, characterized in that, S2 specifically includes the following steps: Based on the set diameter of the bottle, the segments are divided into 3 sections: The first interval is (11, 15.77] mm. The slope is set to 0.1333 and the intercept to 6.1467. At this time, the target value is 0.1333 × bottle diameter + 6.1467. The second interval is (15.77, 18.3] mm. The slope is set to 0.085 and the intercept to 6.

73. At this time, the target value is 0.085 × bottle diameter + 6.

73. The third interval is (18.3, 26] mm. The slope is set to 0.09 and the intercept to 6.

5. At this time, the target value is 0.09 × bottle diameter + 6.

5.

4. The vial opening method for an automatic dispensing machine according to claim 1, characterized in that, S5 specifically includes: calculating the actual positioning coordinates (X1, Y1, Z1) of the center position of the front gripper, wherein: X1 = X0 - compensation value; Y1 = Y0; Z1 = Z0 - (H - bottle cap height correction item) + ΔZ, where ΔZ is the offset in the Z-axis direction, which is a preset calibration parameter.

5. The vial opening method for an automatic dispensing machine according to claim 1, characterized in that, Before calculating the compensation value, step S4 also includes the following steps: Determine if the bottle diameter is within the segmented range. If so, calculate the compensation value; otherwise, the robotic arm directly throws out the vial, and the feedback information is that the diameter is not within the valid segmented range.

6. The vial opening method for an automatic dispensing machine according to claim 1, characterized in that, The robotic arm's pose parameters include its roll angle, pitch angle, and yaw angle in space.

7. The vial opening method for an automatic dispensing machine according to claim 1, characterized in that, The opening operation includes rotating to open or pulling out vertically, or rotating to loosen and then pulling out vertically.

8. A vial opening system for an automatic dispensing machine, applicable to the vial opening method for an automatic dispensing machine as described in any one of claims 1-7, characterized in that it comprises: The visual recognition module is used to obtain the diameter of the vial body and the total height H of the vial. The cap opening mechanism is equipped with cap grippers for holding the cap of the vial; The robotic arm control system includes a data storage module, a data processing module, and an execution control module. The data processing module has an actual positioning coordinate calculation program, the data storage module stores all preset calculation parameters and calculation results, and the execution control module controls the front gripper to perform the opening operation based on the actual positioning coordinate. The front gripper is used to hold the vial.

9. A vial opening system for an automatic dispensing machine according to claim 8, characterized in that, The front-end gripper includes a first gripper and a second gripper arranged symmetrically on the left and right, and a limiting member disposed between the first gripper and the second gripper. The first gripper and the second gripper are driven by a pneumatic cylinder or an electric cylinder and move towards or away from the limiting member at the same time.