Matrix algorithm-based vial positioning and frame control system
By using matrix algorithms and sensor collaborative acquisition technology, the problems of low positioning accuracy and easy misalignment of the medicine bottle framing equipment have been solved, realizing the full-process automated control of medicine bottles and improving production efficiency and aseptic level.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-03-17
AI Technical Summary
Existing bottle crating equipment suffers from problems such as disordered bottle matrix arrangement, large filling deviation, and lack of bottle inversion detection and matrix center calibration mechanisms. This leads to easy misalignment of the crating frames, requiring frequent manual intervention and failing to meet the aseptic and high-efficiency production requirements of the pharmaceutical industry.
By employing a matrix algorithm combined with a collaborative information acquisition method involving visual sensors, photoelectric sensors, and mechanical limit blocks, and through bottle tilting point correction, point set center of gravity calculation, and overall position calibration technologies, the entire process of medicine bottle automation and precision control is achieved.
It achieves high precision in positioning medicine bottles, reliable and stable frame-fitting operation, eliminates the need for manual intervention in the production process, improves operational efficiency, significantly reduces the risk of drug contamination, and complies with the new GMP standards for the pharmaceutical industry.
Smart Images

Figure CN121348944B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automation control technology, and in particular to a medicine bottle positioning and frame control system based on matrix algorithms. Background Technology
[0002] Against the backdrop of the pharmaceutical industry implementing the new GMP standards and pursuing aseptic and efficient production, automated bottle crating is a key link in processes such as freeze drying and transfer. Its positioning accuracy and operating efficiency directly affect the continuity of the production line. Existing crating equipment mostly relies on manual bottle handling or a combination of traditional screws and fixed platforms, which is difficult to meet the needs of large-scale production.
[0003] A pharmaceutical company uses an automatic framing device with a screw conveyor and a stainless steel fixed platform. In the framing operation before freeze-drying, the screw conveys the medicine bottles to the fixed platform to form a matrix before framing. However, this equipment has obvious technical defects: due to the large frictional resistance between the medicine bottles and the platform, and the fact that the matrix is formed solely by mechanical limiting, the matrix arrangement is messy during the bottle handling process, and the filling volume deviation is obvious. At the same time, it lacks a bottle inversion detection and matrix center of gravity calibration mechanism. During framing, misalignment is easily caused by incorrect bottle posture and overall matrix offset. Moreover, the bottle handling speed is slow, requiring frequent manual intervention and adjustment, which reduces production efficiency and increases the risk of drug contamination. It cannot meet the requirements of high-speed aseptic production. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a medicine bottle positioning and frame control system based on matrix algorithm, so as to realize the full-process automated and precise control of medicine bottles from alignment, detection, calibration to frame output.
[0005] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:
[0006] The first aspect is a medicine bottle positioning and frame control system based on a matrix algorithm, including:
[0007] The positioning module is used to perform matrix-style alignment and positioning of the medicine bottles delivered to the alignment area according to a preset number, so as to obtain an initial matrix medicine bottle group.
[0008] The acquisition module is used to detect the upright state of the medicine bottles based on the initial matrix of medicine bottles through a vision sensor, and to collect the position information of the medicine bottle group through the cooperation of the first photoelectric sensor, the second photoelectric sensor and the mechanical limit block.
[0009] The calculation module is used to construct a point set by treating the center position of each upright medicine bottle as a discrete point based on the upright state and position information of the medicine bottle. It solves the centroid coordinates of the point set and calculates the position adjustment value based on the deviation between the centroid coordinates and the centroid coordinates of the preset standard matrix.
[0010] The calibration module is used to perform overall position calibration on the initial matrix vial group using position adjustment values to obtain a calibrated matrix vial group;
[0011] The drive module is used to push the full-bottle group of medicine bottles into the designated position of the frame working area through the drive module mechanism when the calibrated matrix medicine bottle group reaches the full state in the array channel, and obtain the position positioning signal.
[0012] The detection module is used to detect whether the empty frame has reached the designated area based on the position signal, so as to obtain the empty frame position signal;
[0013] The processing module is used to control the lifting device to lift the empty frame in the frame-fitting working area by the empty frame positioning signal, so as to realize the complete fitting of the empty frame to the calibrated matrix of medicine bottles. After confirming that the fitting is completed, the module sends a PLC control command to output the fitted medicine bottle group from the frame-fitting working area.
[0014] Furthermore, the medicine bottles delivered to the alignment area are arranged in a matrix according to a preset number to obtain an initial matrix medicine bottle group, including:
[0015] The control conveying device continuously transports the medicine bottles to the alignment area, and the guiding mechanism in the alignment area initially guides the medicine bottles to obtain a preliminary group of medicine bottles;
[0016] Based on the initially assembled group of medicine bottles, and according to the number of rows and columns of the preset matrix, the medicine bottle group is pushed in a matrix arrangement by the pushing mechanism and pressed against the mechanical limit block to complete the matrix arrangement of the medicine bottles and form a geometrically arranged matrix medicine bottle group.
[0017] After forming a geometrically arranged matrix of medicine bottles, the number of medicine bottles in the matrix of medicine bottles is detected in real time by a counting sensor. When the count value reaches the preset number, a stop signal is triggered to stop the conveying device and lock the current state, so as to obtain the initial matrix of medicine bottles required by the preset number.
[0018] Furthermore, based on the initial matrix of medicine bottles, the upright state of the medicine bottles is detected by a visual sensor, and the position information of the medicine bottle group is collected by a first photoelectric sensor, a second photoelectric sensor, and a mechanical limiting block, including:
[0019] Initiate a visual scan of the initial matrix of medicine bottles, capture images of each medicine bottle using a visual sensor, and classify the medicine bottles into upright and inverted states based on the image recognition results. At the same time, record the center coordinates of the bottle mouth of each medicine bottle identified as upright to obtain the first set of coordinates.
[0020] Based on the spatial distribution of the medicine bottle group indicated by the first coordinate set, the first photoelectric sensor and the second photoelectric sensor are triggered to synchronously detect the edge position of the medicine bottle group in order to obtain the preliminary contour position information of the medicine bottle group in the planar coordinate system.
[0021] Based on the preliminary contour position information, the mechanical limit block is controlled to move to the calculated position, contact the medicine bottle group and complete the physical limit. The position information of the medicine bottle group is collected by reading the final position parameters of the mechanical limit block.
[0022] Furthermore, based on the upright state and position information of the medicine bottles, a point set is constructed by treating the center position of each upright medicine bottle as a discrete point. The centroid coordinates of the point set are solved, and the position adjustment value is calculated based on the deviation between the centroid coordinates and the centroid coordinates of a preset standard matrix. This includes:
[0023] After completing the detection of the upright state of the medicine bottles and the collection of their position information, the center coordinates of each upright medicine bottle are extracted as the basic data points based on the confirmed state of the upright medicine bottle group.
[0024] Using the center coordinates of all upright medicine bottles as discrete points, construct a complete set of points that reflects the spatial distribution characteristics of the current medicine bottle group;
[0025] Geometric centroid calculation is performed on the constructed discrete point set to obtain the actual centroid coordinates of the current upright medicine bottle group;
[0026] The difference between the calculated actual centroid coordinates and the pre-stored standard matrix centroid coordinates is used to obtain the position offset of the entire medicine bottle group in the horizontal plane; the corresponding position adjustment value is obtained based on the position offset.
[0027] Furthermore, the initial matrix vial group is subjected to overall position calibration using position adjustment values to obtain a calibrated matrix vial group, including:
[0028] Based on the obtained position adjustment value, the position adjustment value is parsed into displacement parameters that can be executed by the drive mechanism;
[0029] Based on the displacement parameters, the control drive mechanism acts on the support platform of the initial matrix of medicine bottles, so that the entire medicine bottle group performs translational motion according to the calculated displacement parameters.
[0030] After the translation movement is completed, the actual position of the medicine bottle group is detected by the position sensor to verify the conformity between the actual position and the preset standard position. When the position deviation is within the allowable tolerance range, the position calibration is confirmed to be completed.
[0031] After confirming that the position calibration is complete, mark the bottle group with the precise alignment as the calibrated matrix bottle group.
[0032] Furthermore, based on the calibrated matrix vial group reaching a full state in the array channel, the full-state vial group is pushed into a designated position in the frame working area via a drive module mechanism, obtaining a position positioning signal, including:
[0033] After receiving the signal that the calibrated matrix medicine bottle group is in place, the system continuously monitors the arrangement status of the medicine bottle group in the array channel. When it is detected that the medicine bottle group fills the entire array channel cross section, it is confirmed that the full bottle state has been reached.
[0034] After confirming that the bottle is full, a push command is generated and sent to the drive module mechanism, which controls the drive module mechanism to act on the full bottle group at a preset push stroke and speed.
[0035] By driving the module mechanism to push the full medicine bottle group smoothly into the frame working area along the array channel until the medicine bottle group reaches the preset designated position.
[0036] After the medicine bottle group reaches the designated position, the final position of the medicine bottle group is verified by the position detection sensor. When the position is confirmed to be accurate, a position arrival signal is obtained.
[0037] Furthermore, based on the position arrival signal, a visual sensor detects whether the empty frame has reached the designated area to obtain the empty frame arrival signal, including:
[0038] After receiving the position signal, the vision sensor is activated to collect the storage position of the empty frame in the frame-making work area, and obtain the current position data of the empty frame.
[0039] Based on the current location data, the actual location coordinates of the empty frame are identified and compared with the coordinates of a preset designated area to obtain the comparison result;
[0040] When the comparison result shows that the empty frame has not reached the designated area, a position adjustment command is generated and sent to the empty frame conveying device to control the empty frame conveying device to move the empty frame to the designated area and obtain the position of the empty frame after adjustment.
[0041] Based on the adjusted position of the empty frame, the position is verified again by the vision sensor. When it is confirmed that the empty frame has accurately reached the designated area, the empty frame is in place signal.
[0042] Furthermore, by using the empty frame positioning signal, the lifting device is controlled to raise the empty frame within the frame-fitting working area, achieving complete frame-fitting of the calibrated matrix vial group. After confirming the completion of the fitting, a PLC control command is issued to output the fitted vial group from the frame-fitting working area, including:
[0043] After receiving the empty frame positioning signal, a lifting start command is obtained and sent to the lifting device to control the lifting device to vertically lift the empty frame at a preset speed.
[0044] During the lifting process of the empty frame, the lifting height of the empty frame is monitored in real time by a height sensor. When the preset covering height is reached, the lifting device is controlled to stop lifting. At this time, the empty frame completely covers the calibrated matrix of medicine bottles below.
[0045] After the lifting device stops, the visual sensor collects data on the completion status of the packaging. Image analysis confirms that the positional relationship between the empty frame and the medicine bottle group meets the preset packaging standard, and a packaging completion confirmation signal is obtained.
[0046] Based on the confirmation signal of completion of packaging, a PLC control command is generated and sent to the output device. The output device controls the packaging of the completed medicine bottle group from the packaging frame work area to the next process, and at the same time resets the lifting device to the initial position, ready to receive the next work cycle.
[0047] In a second aspect, a computing device includes:
[0048] One or more processors;
[0049] A storage device for storing one or more programs that, when executed by one or more processors, cause the one or more processors to execute the system.
[0050] Thirdly, a computer-readable storage medium storing a program that, when executed by a processor, performs the system.
[0051] The above-described solution of the present invention has at least the following beneficial effects:
[0052] Because this invention employs a matrix-style alignment positioning method combined with information acquisition through a visual sensor, a first photoelectric sensor, a second photoelectric sensor, and a mechanical limit block, along with a bottle-inverting point correction mechanism, a deviation analysis using a point set centroid calculation algorithm, and overall bottle group position calibration technology, and utilizes a closed-loop collaborative approach involving multiple modules (positioning, acquisition, calculation, calibration, driving, detection, and processing) to achieve fully automated control of the entire process, it effectively overcomes the technical problems of traditional bottle-mounting equipment that rely on simple mechanical structures, resulting in chaotic matrix arrangement, large filling deviations, lack of bottle posture detection and precise position calibration mechanisms, easy misalignment of the mounting frame, and frequent manual intervention. This achieves high bottle positioning accuracy, reliable and stable mounting operation, no need for manual intervention in the production process, improved work efficiency, and a significant reduction in the risk of drug contamination, fully meeting the requirements of the new GMP standards for sterile and efficient production in the pharmaceutical industry. Attached Figure Description
[0053] Figure 1 This is a schematic diagram of a medicine bottle positioning and frame control system based on a matrix algorithm provided in an embodiment of the present invention.
[0054] Figure 2 This is a schematic diagram of the process of obtaining the empty frame positioning and frame control system based on matrix algorithm provided by the embodiment of the present invention. The system uses a visual sensor to detect whether the empty frame has reached the designated area to obtain the empty frame positioning signal.
[0055] Figure 3 This is a schematic diagram of a computing device. Detailed Implementation
[0056] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0057] like Figure 1 As shown, embodiments of the present invention propose a medicine bottle positioning and frame control system based on a matrix algorithm, comprising:
[0058] The positioning module is used to perform matrix-style alignment and positioning of the medicine bottles delivered to the alignment area according to a preset number, so as to obtain an initial matrix medicine bottle group.
[0059] The acquisition module is used to detect the upright state of the medicine bottles based on the initial matrix of medicine bottles through a vision sensor, and to collect the position information of the medicine bottle group through the cooperation of the first photoelectric sensor, the second photoelectric sensor and the mechanical limit block.
[0060] The calculation module is used to construct a point set by treating the center position of each upright medicine bottle as a discrete point based on the upright state and position information of the medicine bottle. It solves the centroid coordinates of the point set and calculates the position adjustment value based on the deviation between the centroid coordinates and the centroid coordinates of the preset standard matrix.
[0061] The calibration module is used to perform overall position calibration on the initial matrix vial group using position adjustment values to obtain a calibrated matrix vial group;
[0062] The drive module is used to push the full-bottle group of medicine bottles into the designated position of the frame working area through the drive module mechanism when the calibrated matrix medicine bottle group reaches the full state in the array channel, and obtain the position positioning signal.
[0063] The detection module is used to detect whether the empty frame has reached the designated area based on the position signal, so as to obtain the empty frame position signal;
[0064] The processing module is used to control the lifting device to lift the empty frame in the frame-fitting working area by the empty frame positioning signal, so as to realize the complete fitting of the empty frame to the calibrated matrix of medicine bottles. After confirming that the fitting is completed, the module sends a PLC control command to output the fitted medicine bottle group from the frame-fitting working area.
[0065] In this embodiment of the invention, because the invention employs a full-process collaborative control technology that includes matrix-style column positioning, visual sensor detection of the upright state of the medicine bottle, collaborative acquisition of the position information of the medicine bottle group by dual photoelectric sensors and mechanical limit blocks, bottle tilting point correction, point set center of gravity calculation algorithm to solve for deviation and generate position adjustment value, overall position calibration, full bottle status push, empty frame position detection and adjustment, lifting frame and PLC control output, it effectively overcomes the technical problems of low positioning accuracy, inconsistent medicine bottle posture, easy frame misalignment, frequent manual intervention required, low production efficiency, and high risk of drug contamination in traditional medicine bottle framing equipment. This results in significantly improved medicine bottle positioning and framing accuracy, fully automated production process without manual intervention, greatly improved work efficiency, and effectively reduced risk of drug contamination, meeting the core requirements of aseptic and efficient production in the pharmaceutical industry.
[0066] In a preferred embodiment of the present invention, the medicine bottles delivered to the alignment area are arranged in a matrix according to a preset number to obtain an initial matrix medicine bottle group, including:
[0067] Step 1.1: Control the conveying device to continuously transport the medicine bottles to the alignment area, and guide the medicine bottles through the guiding mechanism of the alignment area to obtain a preliminary group of medicine bottles. Specifically, this includes: starting the conveying device, which uses a low-friction conveying surface to reduce the frictional resistance between the medicine bottles and the contact surface, ensuring that the medicine bottles are continuously and smoothly transported to the alignment area. The alignment area is equipped with symmetrically distributed inclined guide plates as a guiding mechanism. When the medicine bottles enter the alignment area, the guide plates on both sides gradually converge from the entrance end to the inside, forming a gentle guiding force on the dispersed medicine bottles, guiding the medicine bottles to converge towards the center area of the alignment area, avoiding the medicine bottles from getting stuck or scattered due to collision or friction during the transport process, and finally forming a preliminary group of medicine bottles with a relatively concentrated distribution and no obvious stacking.
[0068] Step 1.2: Based on the initially assembled group of medicine bottles, and according to the preset number of rows and columns of the matrix, the pushing mechanism pushes the group of medicine bottles in a matrix arrangement and presses them against the mechanical limit block to complete the matrix-style alignment of the medicine bottles, forming a geometrically arranged matrix medicine bottle group. Specifically, after obtaining the initially assembled group of medicine bottles, a precise drive command is sent to the pushing mechanism according to the preset matrix row and column parameters. The pushing mechanism consists of a horizontal pushing component and a vertical pushing component. First, the horizontal pushing component smoothly applies force from one side of the medicine bottle group, pushing... The medicine bottles are gradually pushed to the other side according to a preset number of columns, and then pushed a second time according to a preset number of rows by a vertical pushing component, so that the medicine bottles gradually fit together to form a regular row and column arrangement during the pushing process. At the same time, the mechanical limiting block is pre-moved to a fixed position that matches the preset matrix size. Under the action of the pushing mechanism, the medicine bottles are gradually pushed and tightly fitted to the inside of the mechanical limiting block. The rigid positioning of the mechanical limiting block restricts the displacement of the medicine bottles, and finally completes the matrix arrangement of the medicine bottles, forming a matrix medicine bottle group with distinct rows and columns and a regular geometric structure.
[0069] Step 1.3: After forming a geometrically arranged matrix of medicine bottles, the number of medicine bottles in the matrix of medicine bottles is detected in real time by a counting sensor. When the count value reaches a preset number, a stop signal is triggered to stop the conveying device and lock the current state to obtain the initial matrix of medicine bottles with the preset number requirement. Specifically, after the matrix of medicine bottles is formed, the counting sensors installed around the alignment area immediately start real-time detection. The sensors count the medicine bottles in the matrix of medicine bottles row by row and column by column by recognizing the contours of the medicine bottles to ensure that the medicine bottles at each position can be accurately detected. When the number of medicine bottles detected by the counting sensor reaches the preset number, the sensor immediately feeds back a count compliance signal to the control system. After receiving the signal, the control system generates a stop command and sends it to the conveying device. After receiving the command, the conveying device quickly stops running to prevent the medicine bottles from continuing to enter the alignment area and causing stacking or exceeding the number limit. At the same time, the positioning and locking mechanism of the alignment area is activated to slightly clamp and fix the matrix of medicine bottles from all sides, locking the current arrangement state of the medicine bottles and preventing the medicine bottles from shifting their positions before subsequent processes. Finally, an initial matrix of medicine bottles with accurate quantity, stable arrangement and meeting the preset number requirement is obtained.
[0070] In this embodiment of the invention, the invention employs a technique that first guides and gathers the medicine bottles transported to the alignment area through an alignment area guiding mechanism, then pushes the group of medicine bottles according to the preset number of rows and columns of the matrix and closes them to the mechanical limit blocks to complete the matrix alignment, and finally uses a counting sensor to detect the number of medicine bottles in real time. Once the target is met, a stop signal is triggered and the state is locked. Therefore, this invention effectively overcomes the technical problems of scattered medicine bottle gathering, inability to match the preset matrix requirements, and easy deviation in quantity in the traditional medicine bottle alignment process, which leads to the initial medicine bottle group not meeting the operating standards. Thus, it achieves the technical effect of orderly initial gathering of medicine bottles, regular matrix arrangement that accurately matches the preset row and column requirements, and accurate and unbiased quantity of the initial matrix medicine bottle group.
[0071] In a preferred embodiment of the present invention, based on an initial matrix of medicine bottles, the upright state of the medicine bottles is detected by a visual sensor, and the position information of the medicine bottle group is collected by a first photoelectric sensor and a second photoelectric sensor in conjunction with a mechanical limiting block, including:
[0072] Step 2.1: Initiate a visual scan of the initial matrix of medicine bottles. The visual sensor captures images of each bottle and, based on image recognition results, categorizes the bottles into upright and inverted states. Simultaneously, it records the center coordinates of the bottle opening of each bottle identified as upright, obtaining a first set of coordinates. Specifically, this includes: issuing a visual scan start command; the visual sensor installed directly above the entire column area begins operation; this sensor performs a comprehensive scan of the initial matrix of medicine bottles at a preset scanning frequency and resolution, ensuring that each bottle is clearly captured; and the visual sensor transmits the acquired image data in real time. The image recognition algorithm analyzes and judges the contour features and height parameters of each medicine bottle. Based on the specific circular contour and standard height range of the bottle when it is upright with the mouth facing upward, and the irregular flat contour and height abnormality features when it is inverted, all medicine bottles are clearly classified into upright and inverted states. While completing the state classification, based on the preset planar coordinate system, with the fixed reference point of the entire column area as the origin, the X-axis and Y-axis coordinate values corresponding to the center of the mouth of each upright medicine bottle are accurately calculated and recorded. All recorded coordinate values are sorted and summarized in the matrix row and column order to form a first coordinate set that accurately reflects the spatial distribution of upright medicine bottles.
[0073] Step 2.2: Based on the spatial distribution of the medicine bottle group indicated by the first coordinate set, trigger the first photoelectric sensor and the second photoelectric sensor to synchronously detect the edge position of the medicine bottle group to obtain the preliminary contour position information of the medicine bottle group in the planar coordinate system. Specifically, this includes: analyzing and processing all coordinate values in the first coordinate set, extracting the maximum and minimum values among the coordinate values, determining the approximate distribution range of the upright medicine bottle group in the planar coordinate system, and clarifying the spatial distribution of the medicine bottle group; based on the spatial distribution information, sending a synchronous trigger command to the first photoelectric sensor and the second photoelectric sensor, wherein the first photoelectric sensor is installed on the edge of the row area in the X-axis direction, and the second photoelectric sensor is installed on the edge in the Y-axis direction. The two sensors start detection work simultaneously. The sensors scan the edge of the medicine bottle group in the corresponding direction by emitting detection beams. When the beam is blocked by a medicine bottle, the current position is recorded. By continuously scanning and traversing all positions of the edge, the left and right edge limit positions of the medicine bottle group in the X-axis direction and the upper and lower edge limit positions in the Y-axis direction are obtained. The coordinate values corresponding to the edge limit positions are integrated to form a preliminary rectangular contour of the medicine bottle group in the planar coordinate system, thereby obtaining the preliminary contour position information including the contour boundary coordinate range.
[0074] Step 2.3: Based on the preliminary contour position information, control the mechanical limit block to move to the calculated position, contact the medicine bottle group, and complete the physical limitation. By reading the final position parameters of the mechanical limit block, the position information of the medicine bottle group is collected. Specifically, after receiving the preliminary contour position information, the target position to be reached by the mechanical limit block is calculated by combining the preset mechanical limit safety clearance parameters. The target position can make close contact with the edge of the medicine bottle group without causing squeezing damage to the medicine bottle. Then, a motion command is sent to the drive mechanism of the mechanical limit block. The drive mechanism drives the mechanical limit blocks installed around the row area to move smoothly along the guide rail to the calculated target position. When the mechanical limit block contacts the edge of the medicine bottle group and feels a slight contact pressure feedback, the drive mechanism stops working. The mechanical limit block completes the physical limitation of the medicine bottle group, limiting the displacement of the medicine bottle group during operation. At this time, the position detection element installed on the mechanical limit block reads the final position parameters of the limit block in real time, including the precise coordinates of each limit block in the plane coordinate system. The parameters are summarized and processed to finally accurately collect position information that can comprehensively reflect the actual spatial position of the medicine bottle group.
[0075] In this embodiment of the invention, because a visual sensor is used to scan and capture images of each medicine bottle and identify its upright and inverted states, and to record the center coordinates of the mouth of the upright medicine bottle, the first photoelectric sensor and the second photoelectric sensor are triggered to simultaneously detect the edge position of the medicine bottle group based on the coordinate set to obtain preliminary contour information. Then, the mechanical limit block is controlled to move to the corresponding position to complete the physical limit and its final position parameters are read according to the preliminary contour. Therefore, the technical problems of traditional equipment being unable to accurately identify the posture of the medicine bottle, relying on a single mechanical limit to collect the position of the medicine bottle group, resulting in insufficient accuracy, and lacking a collaborative mechanism for posture detection and position acquisition are effectively overcome. Thus, the invention achieves accurate differentiation between the upright and inverted states of the medicine bottle and accurate acquisition of the planar contour and actual position information of the medicine bottle group.
[0076] In a preferred embodiment of the present invention, based on the upright state and position information of the medicine bottle, the center position of each upright medicine bottle is regarded as a discrete point to construct a point set. The centroid coordinates of the point set are solved, and a position adjustment value is calculated based on the deviation between the centroid coordinates and the centroid coordinates of a preset standard matrix. This includes:
[0077] Step 3.1: After completing the detection of the upright state of the medicine bottles and the acquisition of their position information, based on the confirmed upright state of the medicine bottle group, extract the center coordinates of the bottle body of each upright medicine bottle as the basic data point. Specifically, this includes: first, extracting all medicine bottle data determined to be in an upright state from the detection results of the vision sensor, and removing all medicine bottle data in an inverted state; then, retrieving the recorded center coordinates of the bottle mouth of the upright medicine bottle, and simultaneously retrieving the pre-entered structural dimension data of the corresponding specification medicine bottle from the device parameter storage unit. This data includes the fixed vertical distance and horizontal offset from the center of the bottle mouth to the center of the bottle body. Distance; using a plane coordinate system with a fixed reference point preset in the entire column as the origin as a unified reference, based on the retrieved bottle structure size data, the spatial position coordinates of the bottle mouth center of each upright bottle are converted to obtain the plane coordinates corresponding to the center of each upright bottle body; after the conversion is completed, all obtained bottle body center coordinates are initially verified to check for abnormal coordinates caused by incorrect size data retrieval or conversion operation errors, ensuring that each coordinate value can accurately correspond to the actual spatial position of the bottle, and finally all verified bottle body center coordinates are organized into an orderly basic data point.
[0078] Step 3.2: Using the center coordinates of all upright medicine bottles as discrete points, construct a complete point set reflecting the spatial distribution characteristics of the current medicine bottle group. This includes: first, performing a secondary validity check on the obtained basic data point list, focusing on identifying abnormal data points whose coordinate values exceed the effective operating range of the entire column area, and simultaneously verifying whether the medicine bottle corresponding to each data point is in a confirmed upright state to ensure that each data point participating in the point set construction is real and valid; then, classifying and sorting the verified basic data points according to the preset row and column arrangement order of the initial matrix medicine bottle group, arranging the center coordinates of the medicine bottles in the same row according to the column order, and arranging the center coordinates of the medicine bottles in the same column according to the row order, so that the arrangement order of the data points is consistent with the actual matrix arrangement of the medicine bottles; finally, integrating all the sorted bottle center coordinates into a unified discrete point set.
[0079] Step 3.3 involves calculating the geometric centroid of the constructed discrete point set to obtain the actual centroid coordinates of the current upright medicine bottle group. This includes: first, determining the range of discrete points for the centroid calculation, selecting only the coordinates of all valid bottle centers within the constructed complete point set, excluding any invalid or abnormal data; then, summing the horizontal values of all coordinates in the point set one by one, dividing the sum by the total number of coordinate points involved in the calculation to obtain the horizontal coordinate component of the current upright medicine bottle group's centroid; subsequently, using the same method, summing the vertical values of all coordinates in the point set one by one, dividing the sum by the total number of coordinate points involved in the calculation to obtain the vertical coordinate component of the current upright medicine bottle group's centroid. Finally, integrating the obtained horizontal and vertical coordinate components to form the accurate actual centroid coordinates representing the overall spatial position center of the current upright medicine bottle group.
[0080] Step 3.4: Perform a difference calculation between the calculated actual centroid coordinates and the pre-stored standard matrix centroid coordinates to obtain the overall positional offset of the medicine bottle group in the horizontal plane. Based on this offset, obtain the corresponding position adjustment value. This includes: first, retrieving the pre-calibrated standard matrix centroid coordinates. These coordinates are theoretical centroid coordinates calculated and stored in advance, taking into account the row and column specifications of the preset matrix and the fixed reference points of the entire column area, and matching the standard positional requirements of the equipment frame operation; then, performing a difference calculation between the horizontal component of the calculated actual centroid coordinates and the horizontal component of the standard matrix centroid coordinates to obtain the horizontal positional offset of the medicine bottle group. Simultaneously, adjust the actual centroid coordinates... The difference between the vertical component and the vertical component of the standard matrix centroid coordinates is calculated to obtain the vertical position offset of the medicine bottle group. The offsets in both directions together constitute the overall position offset data of the medicine bottle group. Then, the motion accuracy parameters and mechanical response characteristic parameters of the equipment transmission mechanism are retrieved. The parameters include the motion step accuracy of the transmission mechanism and the mechanical backlash compensation value. Based on the parameters, the obtained position offset is proportionally converted and compensated, and the influence of the inherent mechanical backlash and transmission delay of the equipment is fully considered during the correction process. Finally, the corrected horizontal and vertical offset data are converted into position adjustment values that can directly drive the calibration mechanism to perform position adjustment actions.
[0081] In this embodiment of the invention, the technical means of identifying the inverted state of the bottle, obtaining its coordinates, performing fixed-point correction through an adjustment mechanism, constructing an effective discrete point set with the center coordinates of the upright bottle mouth, applying a point set centroid calculation algorithm to solve for the actual geometric centroid coordinates, and comparing the actual centroid coordinates with the centroid coordinates of a preset standard matrix to calculate the position deviation value and thus obtain the position adjustment value, effectively overcomes the technical problems of traditional equipment lacking inverted bottle detection and correction mechanisms and lacking matrix centroid calibration functions, resulting in incorrect bottle posture, overall matrix offset, and easy misalignment of the frame. Thus, the technical effects of uniformly ensuring the upright state of the bottle, precise and controllable matrix spatial distribution, and quantifiable calculation of position deviation are achieved.
[0082] In a preferred embodiment of the present invention, an overall position calibration is performed on the initial matrix vial group using position adjustment values to obtain a calibrated matrix vial group, including:
[0083] Step 4.1: Based on the obtained position adjustment value, the position adjustment value is parsed into displacement parameters that the drive mechanism can execute. Specifically, this includes: receiving the generated position adjustment value, which contains the specific distance and direction information that the medicine bottle group needs to move in the X and Y axes; to ensure accurate execution by the drive mechanism, the control system initiates a parameter parsing process to convert the abstract position adjustment value into displacement parameters that the drive mechanism can directly recognize and execute; during the parsing process, the core technical parameters of the drive mechanism, including the step angle of the servo motor, the lead of the ball screw, and the transmission ratio of the transmission gears, are combined, and the adjustment is converted into displacement parameters through kinematic calculations. The distance corresponding to the integer value is converted into specific parameters such as the rotation angle of the motor and the travel of the lead screw. At the same time, the displacement parameters are optimized according to the load-bearing characteristics of the platform, the total weight of the medicine bottle group, and the inertial effect during the movement. The starting acceleration, running speed, and stopping deceleration of the motor are specified to avoid the medicine bottle group from sliding or tipping over on the platform due to excessive movement. After the analysis is completed, the displacement parameters are verified a second time to compare whether the position adjustment logic before and after the analysis is consistent to ensure that the parameters are without deviation. Finally, a complete set of displacement parameters including motor control signals, travel limit signals, and speed control signals is formed.
[0084] Step 4.2: Based on the displacement parameters, control the drive mechanism to act on the support platform of the initial matrix of medicine bottles, so that the entire medicine bottle group translates according to the calculated displacement parameters. Specifically, this includes: sending the analyzed displacement parameters to the controller of the drive mechanism via a real-time communication bus. The drive mechanism consists of a high-precision servo motor, a ball screw transmission assembly, a linear guide, and a support platform. The support platform is made of a low-friction coefficient material with anti-slip texture on the surface, ensuring smooth platform movement and preventing relative displacement of the medicine bottle group during translation. After receiving the displacement parameters, the controller first starts the preheating program of the servo motor to ensure that the motor is in a stable working state, and then starts the acceleration according to the parameters. The speed-controlled motor starts slowly, and the rotational motion of the motor is converted into linear motion of the carrier platform through the ball screw transmission assembly. During the translation process, the encoder collects the rotation angle of the motor in real time, and then calculates the actual moving distance and speed of the carrier platform. This is compared with the preset displacement parameters in real time, and the output power of the motor is dynamically adjusted to ensure that the platform moves strictly according to the set displacement distance, speed and direction. At the same time, the linear guide rail plays a precise guiding role for the carrier platform, limiting the platform's deviation in the direction perpendicular to the movement direction, and ensuring that the entire medicine bottle group moves purely in translation along the X-axis or Y-axis without rotation or tilting, until the carrier platform moves to the preset target position, and the motor stops smoothly according to the deceleration parameters.
[0085] Step 4.3, after completing the translation movement, detect the actual position of the vial group through the position sensor, verify the coincidence degree between the actual position and the preset standard position. When the position deviation is within the allowable tolerance range, confirm that the position calibration is completed, specifically including: after the carrying platform completes the translation movement and stops, immediately trigger the position detection process, start multiple high-precision position sensors installed around the collation area. The sensors include laser displacement sensors and visual positioning sensors. Among them, the laser displacement sensor is used to detect the actual position of the edge of the vial group, and the visual positioning sensor is used to capture the overall image of the vial group and calculate the centroid coordinates; the laser displacement sensor emits laser beams to the four edges of the vial group, calculates the actual distance between each edge and the sensor through the time difference of receiving the reflected beams, and then converts it into the edge coordinates of the vial group in the plane coordinate system; the visual positioning sensor performs a panoramic scan of the vial group, combines the characteristics of the center coordinates of the upright vial mouths stored in the previous period, and quickly identifies and calculates the actual centroid coordinates of the current vial group; comprehensively compare the detected edge coordinates and centroid coordinates with the corresponding parameters of the preset standard position, and calculate the deviation values of the actual position and the standard position in the X-axis and Y-axis directions; then, retrieve the position accuracy standard corresponding to the frame-setting process in the pharmaceutical industry, determine the allowable tolerance range, which is set according to the vial specifications and the empty frame size, to ensure that the vial group can be fully adapted to the empty frame during frame setting. If the calculated deviation value is within the allowable tolerance range, determine that the position calibration is qualified and generate a calibration completion signal; if the deviation value exceeds the allowable range, automatically trigger the re-calibration process.
[0086] Step 4.4, after confirming that the position calibration is completed, mark the vial group with accurately aligned positions as the calibrated matrix vial group, specifically including: after confirming that the position calibration is qualified, start the vial group status marking process. First, store information such as the position data, calibration time, and deviation detection results of the current vial group in the database and associate it with the production number of the batch vials; then, send a calibration completion notice through the internal data bus, clearly mark the vial group as the calibrated matrix vial group, and at the same time update the status identifier of the vial group, switching from the initial matrix vial group to the calibrated state, ensuring that the process can accurately identify and retrieve the relevant data of the vial group; in addition, lock the current position of the carrying platform, start the positioning locking mechanism of the platform, and fix the platform at the target position through mechanical buckles to prevent position deviation caused by external interference during the waiting for frame setting; finally, generate a calibration completion report, including the position comparison before and after calibration, displacement parameter details, detection results, etc., to provide data support for the monitoring and optimization of the production process, and at the same time prepare to receive the start signal of the drive module to push the calibrated matrix vial group.
[0087] In this embodiment of the invention, because the invention uses the technique of resolving the position adjustment value into a displacement parameter that the drive mechanism can execute, and controlling the drive mechanism to drive the bearing platform to make the medicine bottle group perform precise translational movement based on the displacement parameter, and after the translation is completed, the actual position is detected by the position sensor and the degree of conformity with the preset standard position is verified. After confirming that the deviation is within the allowable tolerance range, it is marked as a calibrated matrix medicine bottle group. Therefore, it effectively overcomes the technical problems of traditional equipment lacking a precise overall calibration mechanism for the medicine bottle group, relying solely on mechanical limiters to correct the overall matrix offset, and causing large positional deviations when frame fitting. Thus, it achieves precise alignment of the overall position of the medicine bottle group with the preset standard position, reliable and effective calibration results, and reduces the risk of frame fitting misalignment.
[0088] In a preferred embodiment of the present invention, based on the calibrated matrix vial group reaching a full state in the array channel, the full-state vial group is pushed into a designated position in the frame working area by a drive module mechanism to obtain a position positioning signal, including:
[0089] Step 5.1: After receiving the calibrated matrix bottle group positioning signal, continuously monitor the arrangement status of the bottle groups in the array channel. When the bottle groups are detected to fill the entire array channel cross-section, confirm that the full bottle state has been reached. Specifically, this includes: immediately initiating the full bottle state monitoring process of the array channel after receiving the calibrated matrix bottle group positioning signal. The cross-section of the array channel is precisely matched with the external dimensions of the preset matrix bottle group. Multiple photoelectric sensors and a set of visual monitoring cameras are evenly installed along the perimeter of the channel inner wall. The photoelectric sensors are used to detect in real time whether each area of the channel cross-section is blocked by the bottle, and the visual monitoring cameras are used to capture a complete image of the channel cross-section for auxiliary judgment; monitoring... During the process, photoelectric sensors continuously emit detection beams into the channel. As the medicine bottle group gradually advances into the channel, the sensors are blocked by the medicine bottles in turn and send back blocking signals. At the same time, the visual monitoring camera captures images of the channel cross-section at a fixed frequency, performs image analysis, and determines whether there are gaps in the cross-section that are not filled by medicine bottles. The blocking signals of all photoelectric sensors and the results of visual image analysis are summarized synchronously. When all photoelectric sensors continuously send back blocking signals, and the visual image analysis shows that each preset area of the channel cross-section is completely covered by medicine bottles without any obvious gaps, it is confirmed that the calibrated matrix medicine bottle group has filled the entire array channel cross-section, and the full bottle state is determined.
[0090] Step 5.2: After confirming the full bottle state, a push command is generated and sent to the drive module mechanism. The drive module mechanism is controlled to act on the full bottle group with a preset propulsion stroke and speed. Specifically, this includes: upon receiving the full bottle confirmation signal, immediately initiating the push command generation process. First, the preset parameters corresponding to the current production task are retrieved, including the length of the array channel, the coordinates of the specified position in the frame working area, and the specifications and dimensions of the bottle group. Combined with the actual length of the calibrated matrix bottle group, the required propulsion stroke of the drive module mechanism is accurately calculated to ensure that the bottle group can be accurately pushed to the specified position in the frame working area. At the same time, based on the material characteristics of the bottle, the bottle body strength, and the calibrated... The overall stability of the vial assembly is ensured by setting a reasonable propulsion speed, which has been optimized through multiple tests to guarantee production efficiency while preventing the vial assembly from tipping over or shifting due to excessive propulsion. The push command also specifies the start-up method, acceleration rate, and stopping method of the drive module mechanism, adopting a gradual start-up and deceleration-stop mode to reduce the impact of inertia on the vial assembly. After the command is generated, the push command containing the propulsion stroke, propulsion speed, and start-stop parameters is sent to the controller of the drive module mechanism through a high-speed communication interface. The drive module mechanism consists of a high-precision servo motor, a ball screw transmission assembly, and a flexible push plate. After receiving the command, the controller analyzes the parameters and prepares for start-up.
[0091] Step 5.3: The full medicine bottle assembly is smoothly pushed into the frame working area along the array channel by the driving module mechanism until it reaches the preset designated position. Specifically, this includes: after the controller of the driving module mechanism parses the pushing command, it first starts the servo motor's preheating program. Once the motor's operation is stable, it slowly starts the motor according to the acceleration rate specified in the command. The servo motor converts rotational motion into linear motion through a ball screw transmission assembly, driving a flexible pushing plate installed at the end of the screw forward. The flexible pushing plate is made of elastic material with a non-slip buffer layer on its surface, ensuring it fits snugly against the contact surface of the medicine bottle assembly without causing compression damage to the bottle body. During the pushing process... The inner wall of the array channel is treated with a special coating with a low coefficient of friction to reduce the frictional resistance between the medicine bottle group and the channel wall. At the same time, guide strips are set on both sides of the channel to limit the lateral displacement of the medicine bottle group and ensure that the medicine bottle group moves smoothly along the channel axis. The actual pushing distance and speed of the pusher plate are collected in real time by the displacement sensor installed on the drive module mechanism and compared with the preset parameters in the command. The output power of the servo motor is dynamically adjusted to ensure that the pushing process is strictly executed according to the preset stroke and speed. When the pusher plate drives the medicine bottle group to approach the designated position of the frame working area, the motor is controlled to gradually reduce the speed according to the deceleration parameters in the command until the medicine bottle group accurately reaches the preset designated position.
[0092] Step 5.4: After the medicine bottle group reaches the designated position, the final position of the medicine bottle group is verified by the position detection sensor. When the position is confirmed to be accurate, a position arrival signal is obtained. Specifically, after the medicine bottle group reaches the preset designated position, a push completion signal is sent, and the position verification process is immediately started. Multiple laser displacement sensors and a set of panoramic vision sensors are installed around the designated position in the frame working area. The laser displacement sensors are respectively aligned with the four corners of the medicine bottle group and emit laser beams to the corners. By detecting the laser reflection time, the actual distance between each corner and the sensor is calculated, and then the corner coordinates of the medicine bottle group in the plane coordinate system are calculated. The panoramic vision sensor performs an all-round scan of the medicine bottle group, captures the overall position image of the medicine bottle group, and combines it with the preset position. The system analyzes the image features of the standard position to determine the deviation between the actual position and the standard position of the medicine bottle assembly. It then integrates the corner coordinates collected by the laser displacement sensor and the position deviation data analyzed by the vision sensor to calculate the total deviation between the actual position and the preset standard position along the X and Y axes. Subsequently, it retrieves the allowable positional tolerance range for the frame assembly process. This range is set based on the dimensional allowance of the empty frame and the positioning accuracy requirements of the medicine bottle assembly. If the calculated total deviation value is within the allowable tolerance range, the system confirms the accuracy of the medicine bottle assembly position and generates a position completion signal. If the deviation value exceeds the allowable tolerance range, the system generates a position adjustment command, controlling the drive module mechanism to perform minor adjustments until the medicine bottle assembly position meets the accuracy requirements, and then generates another position completion signal.
[0093] In this embodiment of the invention, by continuously monitoring the array channel arrangement status after receiving the calibrated bottle group positioning signal, using the filling of the channel cross section as the full bottle judgment standard, and generating a push command containing a preset propulsion stroke and speed after confirming that the bottle is full to control the drive module mechanism, the bottle group is smoothly pushed along the channel to the designated position, and the final position is verified by the position detection sensor, the technical problems of inaccurate full bottle detection, easy displacement of the bottle during the pushing process, and lack of accurate verification of the position leading to frame misalignment in traditional equipment are effectively overcome. Thus, the technical effects of accurate full bottle state judgment, smooth pushing of the bottle group without tipping or displacement, and accurate and controllable position are achieved.
[0094] like Figure 2 As shown, in another preferred embodiment of the present invention, based on the position arrival signal, a visual sensor detects whether the empty frame has reached the designated area to obtain the empty frame arrival signal, including:
[0095] Step 6.1: After receiving the position arrival signal, the vision sensors are activated to collect the empty frame storage position in the frame-fitting work area to obtain the current position data of the empty frame. Specifically, after receiving the position arrival signal of the medicine bottle group, the empty frame position detection process is immediately triggered, and multiple sets of high-definition vision sensors installed directly above and on both sides of the frame-fitting work area are activated. The vision sensors are distributed at preset angles to ensure no blind spots in the empty frame storage area. The top sensor is responsible for collecting the overall top view image of the empty frame, and the side sensors collect the side contour images, which together constitute the three-dimensional position perception system of the empty frame. The vision sensors continuously collect the empty frame storage position in a high-frequency scanning mode, capturing key feature information such as the edge contour, four corner vertices, and central area of the empty frame. During the acquisition process, image noise reduction processing is performed simultaneously to filter the influence of ambient light changes, dust and other interference factors on image quality. The sensors transmit the collected image data to the image processing unit in real time. The key geometric features of the empty frame are identified through feature extraction algorithms. Then, combined with the fixed coordinate system of the frame-fitting work area, these features are converted into quantified position data, including the center coordinates, four corner vertex coordinates, edge contour coordinates, etc. of the empty frame, and finally form a set of current position data that comprehensively reflects the current spatial position of the empty frame.
[0096] Step 6.2: Based on the current location data, identify the actual position coordinates of the empty frame and compare them with the coordinates of a preset designated area to obtain the comparison result. Specifically, this includes: retrieving the generated empty frame's current position data and initiating the coordinate identification and comparison process; firstly, using a built-in feature matching algorithm, accurately extracting the actual position coordinates of the empty frame from the current location data, including the geometric center coordinates and the vertex coordinates of the four corners. These coordinates are based on a unified coordinate system of the frame-fitting work area, maintaining a measurement standard consistent with the position coordinates of the medicine bottle group; subsequently, retrieving the coordinates from the preset parameter database that match the current position data... The coordinates of the specified area of the empty frame for matching the production task are pre-calculated and determined based on the final position of the calibrated matrix of medicine bottles, the size of the empty frame, and the assembly accuracy requirements of the frame, ensuring that the empty frame can be accurately aligned with the medicine bottle group after it is in place; during the comparison process, the actual center coordinates of the empty frame are compared point-to-point with the center coordinates of the preset specified area, and the actual coordinates of the four corner vertices are compared one by one with the preset vertex coordinates. The center deviation values in the X-axis and Y-axis directions, the deviation values of each vertex are calculated, and the maximum and average values of all deviation values are counted to form a complete comparison result including the deviation direction, deviation magnitude, and deviation distribution.
[0097] Step 6.3: When the comparison result shows that the empty frame has not reached the designated area, a position adjustment command is generated and sent to the empty frame conveying device to control the empty frame conveying device to move the empty frame to the designated area and obtain the position of the empty frame after adjustment. Specifically, when the comparison result shows that the deviation between the actual position coordinates of the empty frame and the preset designated area coordinates exceeds the allowable range, and it is determined that the empty frame has not reached the designated area, the position adjustment process is started immediately. First, based on the deviation data in the comparison results, combined with the size, weight, material characteristics of the empty frame, and the technical parameters of the empty frame conveying device, a targeted position adjustment command is generated. The command clearly specifies the direction the empty frame needs to move: positive or negative X-axis, positive or negative Y-axis; the precise moving distance is calculated based on the deviation value with millimeter-level accuracy; the moving speed is set according to the weight of the empty frame to avoid excessive speed causing the empty frame to tip over or shift; and acceleration and deceleration parameters are set using a gradual start-stop mode to reduce the impact of inertia. The adjustment command is sent to the controller of the empty frame conveying device via a high-speed communication bus. This conveying device consists of a high-precision servo motor, linear guide rail, and anti-slip support platform. After parsing the command, the controller drives the servo motor to operate, which in turn drives the support platform and the empty frame to move smoothly along the guide rail through the transmission mechanism. During the movement, the displacement sensor on the conveying device collects the actual moving distance and position of the empty frame in real time for dynamic monitoring, ensuring that the empty frame moves strictly according to the parameters of the adjustment command until it reaches the preset designated area range, and finally, the position data of the empty frame after adjustment is obtained.
[0098] Step 6.4: Based on the adjusted empty frame position, the position is verified again using a vision sensor. When it is confirmed that the empty frame has accurately reached the designated area, an empty frame positioning signal is obtained. Specifically, after the empty frame position adjustment is completed, a secondary position verification process is immediately initiated, triggering multiple sets of vision sensors in the frame-fitting work area to comprehensively acquire the adjusted empty frame position. During the acquisition process, the sensors capture feature information such as the edge contour, four corner vertices, and center area of the empty frame from multiple angles. After image noise reduction and feature extraction, the actual position data of the adjusted empty frame is generated. The center coordinates and four corner coordinates of the empty frame are extracted from this data. The vertex coordinates are compared again with the preset coordinates of the designated area, with a focus on verifying whether the deviations in the X and Y axes are within the allowable tolerance range required by the frame fitting process. If the comparison results show that all deviations are within the allowable tolerance range and the edge contour of the empty frame perfectly matches the boundary of the designated area, the control system confirms that the empty frame has accurately reached the designated area and generates an empty frame positioning signal to prepare for the lifting and fitting operation. If the second comparison still shows deviations exceeding the tolerance, an adjustment command is regenerated to control the empty frame conveying device to make minor adjustments until the empty frame position fully meets the requirements, and then an empty frame positioning signal is generated again.
[0099] In this embodiment of the invention, by employing a technical means of receiving a position signal and then activating a vision sensor to collect the current position data of the empty frame in the frame-making work area, identifying the actual position coordinates of the empty frame and comparing them with the coordinates of a preset designated area, generating an adjustment command to control the empty frame conveying device to move the empty frame when it is not in position, and then verifying the position a second time through a vision sensor, the technical problems of traditional equipment lacking a precise empty frame positioning detection and automatic adjustment mechanism, and the easy displacement of the empty frame leading to frame misalignment are overcome. This achieves the technical effects of accurate empty frame position detection, automatic correction of displacement, and precise alignment of the empty frame with the corresponding position of the medicine bottle group, further improving the stability and success rate of the frame-making process.
[0100] In a preferred embodiment of the present invention, a lifting device is controlled to raise the empty frame in the frame-fitting working area via an empty frame positioning signal, thereby achieving complete frame-fitting of the calibrated matrix vial group. After confirming the completion of the frame-fitting, a PLC control command is issued to output the fitted vial group from the frame-fitting working area, including:
[0101] Step 7.1: After receiving the empty frame arrival signal, a lifting start command is obtained and sent to the lifting device. The lifting device is controlled to vertically lift the empty frame at a preset speed. Specifically, this includes: upon receiving the empty frame arrival signal, immediately initiating the frame assembly process. A standardized lifting start command is generated through the internal command parsing module. This command includes core parameters such as lifting speed, starting acceleration, and operational stability. The lifting speed is preset based on the material weight of the empty frame, the height specifications of the medicine bottle group, and the precision requirements of the packaging process. After multiple sets of tests, it ensures packaging efficiency while preventing the empty frame from shaking or the medicine bottle group from shifting due to excessive speed. The lifting device consists of a high-precision servo motor and a ball screw. The system consists of a transmission assembly, guide columns, and a support tray. The support tray fits perfectly against the bottom of the empty frame, and the guide columns are symmetrically distributed around the tray to ensure vertical accuracy during the lifting process. The lifting start command is sent to the controller of the lifting device via a high-speed communication line. After the controller parses the command, it starts the servo motor preheating program. Once the motor's operating status is stable, it starts slowly according to the preset start acceleration. The ball screw converts the rotational motion into linear motion, driving the support tray and the empty frame to be lifted vertically upward along the guide columns. During the lifting process, the operating parameters of the servo motor are fed back in real time, and the output power is dynamically adjusted to ensure that the empty frame always rises smoothly at a uniform preset speed without tilting or shaking.
[0102] Step 7.2: During the lifting of the empty frame, the lifting height of the empty frame is monitored in real time by height sensors. When the preset covering height is reached, the lifting device is controlled to stop lifting. At this time, the empty frame completely covers the calibrated matrix of medicine bottles below. Specifically, this includes: at the same time as the lifting of the empty frame starts, multiple high-precision height sensors installed on the guide columns of the lifting device start working synchronously. These sensors use the laser ranging principle, and the measurement accuracy can reach the millimeter level. They can capture the height position data of the bottom of the empty frame in real time. The sensors transmit the collected height data at a fixed frequency, and the data is filtered in real time to remove outliers caused by environmental interference, ensuring the accuracy of the monitoring data. The preset covering height is based on the calibrated matrix of medicine bottles below. The actual height of the quasi-matrix medicine bottle group, the internal depth of the empty frame, and the requirements of the wrapping process are pre-calculated and determined. This height value ensures that after the empty frame is lifted into place, the medicine bottle group is completely embedded inside the empty frame, and the upper edge of the empty frame is a certain distance higher than the mouth of the medicine bottle, achieving complete coverage without dead angles. When the real-time height data fed back by the height sensor is consistent with the preset wrapping height, a stop command is immediately sent to the lifting device. The command includes deceleration and buffer parameters. The servo motor gradually reduces its speed according to the preset deceleration and finally stops running smoothly. At this time, the empty frame is completely vertically wrapped around the outside of the calibrated matrix medicine bottle group below through the precise guidance of the guide column. The inner wall of the empty frame and the edge of the medicine bottle group maintain a uniform gap, without compression or offset.
[0103] Step 7.3: After the lifting device stops, data on the completion status of the packaging is collected by vision sensors. Image analysis confirms that the positional relationship between the empty frame and the medicine bottle group meets the preset packaging standard, and a packaging completion confirmation signal is obtained. Specifically, after the lifting device stops running, the packaging status detection process is triggered immediately, and multiple sets of high-definition vision sensors installed around and on top of the packaging frame working area are activated. The top sensor mainly collects top view images of the empty frame and the medicine bottle group, focusing on whether the centers of the two are aligned and whether the empty frame completely covers the top of the medicine bottle group; the four sensors collect side view images from the front, back, left, and right directions respectively, detecting the uniformity of the gap between the inner wall of the empty frame and the edge of the medicine bottle group, whether the medicine bottle exceeds the range of the empty frame, and whether the empty frame is tilted. The visual sensor collects multi-dimensional image data and uses a preset image recognition algorithm to extract and analyze features. First, it compares the coordinate deviation between the center of the empty frame and the center of the medicine bottle group to ensure that the deviation is within the allowable tolerance range. Second, it detects the height difference between the upper edge of the empty frame and the mouth of the medicine bottle to verify whether it meets the requirements for complete coverage. Finally, it analyzes the gap distribution between the inner wall of the empty frame and the edge of the medicine bottle group to confirm that there is no local compression or excessive gap. The preset packaging standard clearly specifies the center alignment deviation range, height difference range, and gap uniformity requirements, all of which meet the quality specifications of the pharmaceutical industry's frame packaging process. When it is confirmed that all test items meet the preset standards and there are no misalignments, missing packages, tilting, or other problems, a packaging completion confirmation signal is generated.
[0104] Step 7.4: Based on the packaging completion confirmation signal, generate a PLC control instruction and send it to the output device. The output device will then output the packaged vials from the packaging frame work area to the next process. Simultaneously, the lifting device will be reset to its initial position, ready to receive the next work cycle. Specifically, this includes: Upon receiving the packaging completion confirmation signal, immediately initiate the output and reset process. First, call the preset PLC control instruction template, and combine it with parameters such as the current production task number, vial specifications, and output direction to generate a personalized PLC control instruction. The instruction specifies the output device's operating speed, conveying direction, stop position, and safety interlock parameters. The output device uses a low-friction stainless steel conveyor roller with an anti-slip texture on the surface, ensuring smooth conveying and preventing the packaged vials from shifting during output. Through P... The LC communication interface sends control commands to the driver of the output device. The driver drives the conveyor rollers to run smoothly at a preset speed. The packaged vials are slowly output from the packaging work area to the connection position of the next process under the drive of the rollers. At the same time, a reset command is sent to the lifting device. The servo motor of the lifting device rotates in reverse and drives the carrier tray to descend vertically along the guide column through the ball screw transmission assembly until it returns to the initial position. At this time, the carrier tray is fixed by the mechanical locking mechanism to prevent accidental movement. After the reset is completed, the lifting device sends a reset confirmation signal back to the control system and records the key data of this packaging operation, including packaging time, lifting height, and test results, to form a production record. At the same time, it resets to the initial state and waits to receive the position signal of the next set of calibrated matrix vials, ready to start the next work cycle.
[0105] In this embodiment of the invention, by receiving the empty frame positioning signal and sending a lifting start command to the lifting device to control it to vertically lift the empty frame at a preset speed, using a height sensor to monitor the lifting height in real time and stopping when the preset covering height is reached to achieve complete covering, using a vision sensor to collect covering status data and confirming through image analysis that it meets the preset covering standard, and then generating a PLC control command based on the covering completion confirmation signal to drive the output device to output the covered vials to the next process and reset the lifting device, the technical problems of unstable empty frame lifting, inaccurate covering height control leading to incomplete covering, lack of covering status verification leading to frame misalignment, and reliance on manual intervention for output and equipment reset during traditional equipment frame covering are overcome. This achieves the technical effects of stable and controllable empty frame lifting, complete and precise covering of vials, traceable covering quality, and automated completion of vial output and equipment reset, further ensuring the stability and production continuity of the frame covering process, reducing the risk of contamination from manual intervention, and meeting the aseptic and high-efficiency production requirements of the pharmaceutical industry.
[0106] The control system according to embodiments of the present invention may correspond to the system described in the embodiments of the present invention, and the above and other operations and / or functions of the various modules of the predicted system are respectively for the purpose of implementing Figure 1 The corresponding processes of the system in the illustrated embodiment will not be described in detail here for the sake of brevity.
[0107] This application also provides a computing device. This computing device can utilize a server.
[0108] like Figure 3 As shown in the figure, this is a schematic diagram of a computing device provided in an embodiment of this application. The computing device 700 includes a bus 701, a processor 702, a communication interface 703, and a memory 704. The processor 702, the memory 704, and the communication interface 703 communicate with each other via the bus 701.
[0109] The 701 bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 3 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0110] The processor 702 can be any one or more of the following processors: central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP).
[0111] Communication interface 703 is used for external communication. Memory 704 may include volatile memory, such as random access memory (RAM). Memory 704 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD). Memory 704 stores executable code, which processor 702 executes to perform the aforementioned matrix algorithm-based vial positioning and frame control system.
[0112] Specifically, in implementing the embodiment of the medicine bottle positioning and frame control system based on matrix algorithm described in the above embodiments, and where each module or unit of the medicine bottle positioning and frame control system based on matrix algorithm described in the above embodiments is implemented by software, the software or program code required to execute the functions of each module / unit in the medicine bottle positioning and frame control system based on matrix algorithm described in the above embodiments can be partially or entirely stored in memory 704. Processor 702 executes the program code corresponding to each unit stored in memory 704 to execute the aforementioned medicine bottle positioning and frame control system based on matrix algorithm.
[0113] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the aforementioned matrix algorithm-based vial positioning and frame control system.
[0114] This application also provides a computer program product comprising one or more computer instructions. When the computer instructions are loaded and executed on a computing device, all or part of the processes or functions described in this application are generated.
[0115] The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, or data center to another website, computer, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0116] When the computer program product is executed by a computer, the computer executes any of the methods of the aforementioned matrix algorithm-based medicine bottle positioning and frame control system. The computer program product can be a software installation package; when any of the aforementioned matrix algorithm-based medicine bottle positioning and frame control system methods needs to be used, the computer program product can be downloaded and executed on the computer.
[0117] Embodiments of the present invention also provide a computing device, including: a processor and a memory storing a computer program, wherein the computer program, when executed by the processor, performs the system as described above. All implementations in the above system embodiments are applicable to this embodiment and can achieve the same technical effects.
[0118] Embodiments of the present invention also provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the system as described above. All implementations in the above system embodiments are applicable to this embodiment and can achieve the same technical effects.
[0119] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A vial positioning and framing control system based on matrix algorithm, characterized in that, The method comprises the following steps: A positioning module is used to arrange the medicine bottles conveyed to the alignment area in a matrix according to a preset number to obtain an initial matrix medicine bottle group. An acquisition module is used to detect the upright state of the medicine bottles based on the initial matrix medicine bottle group through a visual sensor, and collect the position information of the medicine bottle group through the cooperation of a first photoelectric sensor, a second photoelectric sensor and a mechanical limiting block. A calculation module is used to take the center position of each upright medicine bottle as a discrete point to construct a point set, solve the barycentric coordinates of the point set, and calculate a position adjustment value based on the deviation of the barycentric coordinates from a preset standard matrix barycentric coordinate. A calibration module is used to perform overall position calibration on the initial matrix medicine bottle group through the position adjustment value to obtain a calibrated matrix medicine bottle group. A driving module is used to push the medicine bottle group reaching the full bottle state in the array channel into a designated position of the frame working area through a driving mechanism to obtain a position-to-position signal. A detection module is used to detect whether the empty frame reaches the designated area through the visual sensor based on the position-to-position signal to obtain an empty frame-to-position signal. A processing module is used to control the lifting device to lift the empty frame in the frame working area through the empty frame-to-position signal to realize the complete wrapping of the calibrated matrix medicine bottle group by the empty frame, and output the wrapped medicine bottle group from the frame working area by issuing a PLC control instruction after confirming the completion of the wrapping.
2. The matrix algorithm based vial positioning and framing control system of claim 1, wherein, The method comprises the following steps: A control conveying device is used to continuously convey the medicine bottles to the alignment area, and a guiding mechanism in the alignment area is used to preliminarily guide the medicine bottles to obtain a preliminarily gathered medicine bottle group. Based on the preliminarily gathered medicine bottle group and according to the number of rows and columns of a preset matrix, a pushing mechanism is used to push the medicine bottle group in a matrix arrangement mode and make it abut against a mechanical limiting block to complete the matrix alignment of the medicine bottles and form a geometrically arranged matrix medicine bottle group. After the geometrically arranged matrix medicine bottle group is formed, a counting sensor is used to detect the number of medicine bottles in the matrix medicine bottle group in real time, and when the counting value reaches a preset number, a stop signal is triggered to stop the conveying device and lock the current state to obtain an initial matrix medicine bottle group meeting the preset number requirement.
3. The matrix algorithm based vial positioning and framing control system of claim 2, wherein, Based on the initial matrix medicine bottle group, a visual sensor is used to detect the upright state of the medicine bottles, and a first photoelectric sensor and a second photoelectric sensor are used to cooperate with a mechanical limiting block to collect the position information of the medicine bottle group. A visual scan for the initial matrix medicine bottle group is started, an image of each medicine bottle is captured through the visual sensor, and based on the image recognition result, the medicine bottles are classified into an upright state and an inverted bottle state, and the bottle opening center coordinates of each identified upright medicine bottle are recorded to obtain a first coordinate set. Based on the space distribution of the medicine bottle group indicated by the first coordinate set, the first photoelectric sensor and the second photoelectric sensor are triggered to synchronously detect the edge position of the medicine bottle group to obtain the preliminary contour position information of the medicine bottle group in a plane coordinate system. Based on the preliminary contour position information, the mechanical limit block is controlled to move to the calculated position, contact the medicine bottle group and complete the physical limit, and the position information of the medicine bottle group is collected by reading the final position parameters of the mechanical limit block.
4. The matrix algorithm based vial positioning and framing control system of claim 3, wherein, Based on the upright state and position information of the medicine bottles, the center position of each upright medicine bottle is regarded as a discrete point to construct a point set, the center of gravity coordinates of the point set are solved, and the position adjustment value is calculated based on the deviation of the center of gravity coordinates from the preset standard matrix center of gravity coordinates, including: After completing the upright state detection and position information collection of the medicine bottles, the center coordinates of the bottle body of each upright medicine bottle are extracted as the basic data points based on the confirmed upright medicine bottle group state; The center coordinates of the bottle body of all upright medicine bottles are regarded as discrete points to construct a complete point set reflecting the spatial distribution characteristics of the current medicine bottle group; The geometric center of gravity calculation is performed on the constructed discrete point set to obtain the actual center of gravity coordinate value of the current upright medicine bottle group; The actual center of gravity coordinate value calculated is subjected to difference value operation with the pre-stored standard matrix center of gravity coordinates to obtain the position offset of the medicine bottle group in the horizontal plane; and the corresponding position adjustment value is obtained according to the position offset.
5. The matrix algorithm based vial positioning and framing control system of claim 4, wherein, The initial matrix medicine bottle group is subjected to overall position calibration through the position adjustment value, including: Based on the obtained position adjustment value, the position adjustment value is analyzed into a displacement parameter executable by the driving mechanism; Based on the displacement parameter, the driving mechanism is controlled to act on the bearing platform of the initial matrix medicine bottle group, so that the entire medicine bottle group is subjected to translational motion according to the calculated displacement parameter; After completing the translational motion, the actual position of the medicine bottle group is detected by the position sensor to verify the degree of coincidence between the actual position and the preset standard position, and when the position deviation is within the allowable tolerance range, it is confirmed that the position calibration is completed; After confirming that the position calibration is completed, the medicine bottle group with accurately aligned positions is marked as the calibrated matrix medicine bottle group.
6. The matrix algorithm based vial positioning and framing control system of claim 5, wherein, Based on the fact that the calibrated matrix medicine bottle group reaches the full bottle state in the array channel, the medicine bottle group reaching the full bottle state is pushed into the designated position of the frame working area by the driving module mechanism to obtain a position to signal, including: After receiving the calibrated matrix medicine bottle group to signal, the arrangement state of the medicine bottle group in the array channel is continuously monitored, and when it is detected that the medicine bottle group fills the entire array channel section, it is confirmed that the full bottle state is reached. After confirming that the full bottle state is reached, a pushing instruction is generated and sent to the driving module mechanism to control the driving module mechanism to act on the medicine bottle group in the full bottle state at a preset pushing stroke and speed; Through the pushing action of the driving module mechanism, the medicine bottle group in the full bottle state is smoothly pushed along the array channel into the frame working area until the medicine bottle group reaches the preset designated position; After the medicine bottle group reaches the designated position, the final position of the medicine bottle group is verified by the position detection sensor, and when it is confirmed that the position is accurate, a position to signal is obtained.
7. The matrix algorithm based vial positioning and framing control system of claim 6, wherein, Based on the position to signal, whether the empty frame reaches the designated area is detected by the vision sensor to obtain an empty frame to signal, including: After receiving the position to signal, the vision sensor is started to collect the empty frame storage position of the frame working area to obtain the current position data of the empty frame; Based on the current position data, the actual position coordinates of the empty frame are identified, and the actual position coordinates are compared with the preset specified area coordinates to obtain a comparison result; When the comparison result shows that the empty frame has not reached the specified area, a position adjustment instruction is generated and sent to the empty frame conveying device to control the empty frame conveying device to move the empty frame to the specified area, obtaining the adjusted empty frame position; Based on the adjusted empty frame position, the position verification is performed again through the visual sensor, and when it is confirmed that the empty frame has accurately reached the specified area, an empty frame arrival signal is obtained.
8. The matrix algorithm based vial positioning and framing control system of claim 7, wherein, Through the empty frame arrival signal, the lifting device is controlled to lift the empty frame in the frame working area, realizing the complete wrapping of the calibrated matrix medicine bottle group by the empty frame, and after confirming the completion of the wrapping, a PLC control instruction is issued to output the wrapped medicine bottle group from the frame working area, including: After receiving the empty frame arrival signal, a lifting start instruction is obtained and sent to the lifting device to control the lifting device to vertically lift the empty frame at a preset speed; During the lifting of the empty frame, the lifting height of the empty frame is monitored in real time through the height sensor, and when the preset wrapping height is reached, the lifting device is controlled to stop lifting, at which time the empty frame completely covers the calibrated matrix medicine bottle group below; After the lifting device stops, the data of the wrapping completion state is collected through the visual sensor, and the image analysis confirms that the position relationship between the empty frame and the medicine bottle group meets the preset wrapping standard, obtaining a wrapping completion confirmation signal; Based on the wrapping completion confirmation signal, a PLC control instruction is generated and sent to the output device to control the output device to output the wrapped medicine bottle group from the frame working area to the next process, while resetting the lifting device to the initial position, preparing to receive the next working cycle.
9. A computing device, comprising: It includes: One or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the functions of the system as claimed in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a program which, when executed by a processor, implements the functions of the system as claimed in any one of claims 1 to 8.
Citation Information
Patent Citations
Automatic bottle unscrambling and framing device
CN202923907U
KR1024402410000B1