An SMT patch control method for an electric energy meter based on visual detection

By eliminating discrete points through phenotypic coding grouping, evaluating guide rail temperature, and linking correction with metering level, the systematic drift problem of electricity meter mounting offset was solved, achieving high-precision mounting consistency and assembly stability, and ensuring the accuracy and reliability of the correction results.

CN122476609APending Publication Date: 2026-07-28ZHEJIANG HUAYI ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG HUAYI ELECTRONICS CO LTD
Filing Date
2026-05-26
Publication Date
2026-07-28

AI Technical Summary

Technical Problem

Existing technologies cannot effectively distinguish between systematic drift and random distribution of meter mounting offset, lack differentiated correction methods, cannot ensure the mounting consistency and assembly stability of high-precision meter types, and lack closed-loop verification of correction results.

Method used

Discrete points are eliminated by grouping phenotypic coding, and the convergence of the direction is evaluated by combining the guide rail temperature. A dual truncation correction strategy with metrological level linkage is adopted, and a closed-loop verification process of coordinate reference is carried out to ensure the accuracy and reliability of the correction results.

Benefits of technology

It improves the placement accuracy and system reliability in the SMT placement process of electricity meters, reduces the risk of overcorrection, achieves rapid restoration of a stable coordinate system, and enhances the overall correction effect of the production line.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122476609A_ABST
    Figure CN122476609A_ABST
Patent Text Reader

Abstract

The application discloses an SMT patch control method based on visual detection, relates to the technical field of visual detection, and is used for solving the problem of continuous decline of patching precision caused by the fact that systematic coordinate drift cannot be accurately identified and automatically corrected in patch production, collecting a patching offset vector output by an AOI detection device, removing discrete points according to a table type code to generate a same-table-type offset vector set, performing consistency evaluation on an offset direction distribution by using a guide rail temperature to generate a systematic drift characteristic quantity, determining a grade correction step according to a measurement grade, performing direction confrontation calculation on the drift characteristic quantity and a coordinate reference device value to generate a convergence correction quantity, issuing the convergence correction quantity to a patch machine to perform coordinate reference updating and verify the correction effect through a next batch of offset vectors, realizing adaptive closed-loop correction of systematic coordinate drift in the patching process of different table type electric energy meters, and improving patching precision and production line stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of visual inspection technology, and more specifically, to a visual inspection-based SMT surface mount control method for electricity meters. Background Technology

[0002] As electricity meter products develop towards high-precision metering, multi-meter mixed-line production, and flexible manufacturing, SMT assembly lines are gradually adopting a linkage between AOI inspection equipment and MES work order system to conduct online inspection and production control of the mounting status of different types of electricity meters. Due to the differences in PCB structure layout and metering level of different meter types, mounting offset behaviors are prone to overlap during continuous production on the same assembly line. Therefore, existing production lines usually need to dynamically correct the coordinate reference of the mounting machine based on the mounting inspection results to ensure the mounting consistency and assembly stability of electricity meters of different metering levels.

[0003] The existing technology has the following shortcomings:

[0004] Currently, existing technologies lack the ability to automatically group AOI detection data by phenotype and remove discrete points. They cannot assess the consistency of the directional distribution of offset vectors of different phenotypes, making it difficult to accurately distinguish between systematic drift and random dispersion. They also lack differentiated correction step size control methods linked to metrological levels, cannot provide additional correction magnitude protection for high-precision metrological phenotypes, and lack closed-loop verification and benchmark rollback mechanisms after correction, making it impossible to effectively confirm the correction results.

[0005] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0006] To overcome the aforementioned deficiencies in the prior art, embodiments of this application provide a visual inspection-based SMT surface mount control method for electricity meters. This method addresses the problems mentioned in the background art by employing an offset vector grouping and elimination mechanism based on phenotypic coding, a directional convergence evaluation method weighted by rail temperature, a dual truncation correction strategy linked to metering levels, and a closed-loop verification process for coordinate reference updates.

[0007] To achieve the above objectives, this application provides the following technical solution: a visual inspection-based SMT surface mount control method for electricity meters, comprising the following steps:

[0008] Step S1: Collect the placement offset vector output by the AOI detection device, combine it with the phenotypic code of the MES work order to group the placement offset vectors according to the phenotypic, remove the offset vectors with discrete directions within each group, and generate a set of offset vectors with the same phenotypic.

[0009] Step S2: Detect the temperature of the production line guide rail, use the guide rail temperature to evaluate the consistency of the directional distribution of the same phenotype offset vector set and generate systematic drift feature quantity, mark the same phenotype offset vector set according to the directional convergence of the systematic drift feature quantity and then interrupt and block it.

[0010] Step S3: Read the measurement level of the MES work order, determine the level correction step size according to the measurement level, read the current reference device value of the coordinate system of the pick and place machine, perform directional countermeasure calculation between the systematic drift characteristic quantity and the current reference device value of the coordinate system, and double-truncate the calculation result according to the level correction step size and the correction boundary threshold to generate the convergence correction quantity.

[0011] Step S4: Send the convergence correction amount to the pick-and-place machine to perform coordinate reference update, collect the placement offset vector of the next batch after the update to determine whether the offset amplitude has narrowed, and update the historical correction reference according to the judgment result.

[0012] In a preferred embodiment, in step S1, after each PCB is mounted, the AOI inspection device obtains the deviation of the actual landing point of each mounted device relative to the design coordinates by image comparison detection as the mounting offset vector, which includes the X-direction offset component and the Y-direction offset component.

[0013] Read the phenotypic code corresponding to each PCB in the current batch from the MES work order database, and divide the set of placement offset vectors into several subsets according to the phenotypic code. Each subset contains only the placement offset vectors under the same phenotypic code.

[0014] In a preferred embodiment, in step S1, the mean and standard deviation of the offset components of each mounting offset vector in the X and Y directions are calculated respectively, and mounting offset vectors whose mean offset components all exceed twice the standard deviation are identified as discrete points and removed from the subset.

[0015] The subset after removing discrete points is used as the offset vector set with the same phenotype.

[0016] In a preferred embodiment, in step S2, the production line guide rail temperature is the temperature measurement value of the pick-and-place machine transmission guide rail collected in real time by the production line guide rail temperature sensor.

[0017] The consistency of the directional distribution of the same phenotypic offset vector set is evaluated by using the temperature of the production line guide rail. The mean vector of each offset vector in the same phenotypic offset vector set is calculated, and the cosine similarity between the offset vector and the mean vector is calculated. The mean value of the cosine similarity is taken to obtain the uncorrected directional convergence.

[0018] The temperature of the production line guide rail is normalized using the Max-Min normalization method to obtain the normalized guide rail temperature.

[0019] The uncorrected directional convergence is corrected by using the normalized guide rail temperature to obtain the corrected directional convergence.

[0020] In a preferred embodiment, in step S2, the mean vector of all offset vectors in the same phenotypic offset vector set is used as the mean directional offset, which together with the corrected directional convergence constitutes the systematic drift characteristic quantity.

[0021] When the corrected directional convergence is greater than or equal to the preset directional convergence threshold, it is determined that there is a systematic drift in the same phenotypic offset vector set, and the systematic drift feature is passed to step S3.

[0022] When the convergence of the corrected direction is less than the preset convergence threshold, the offset vector set with the same phenotype is marked as random distribution and the blocking is interrupted, and the process does not proceed to step S3.

[0023] In a preferred embodiment, in step S3, the measurement level of the MES work order is the measurement accuracy level corresponding to the current phenotype recorded in the MES work order database, including level A and level B.

[0024] The normalized value for level A is set to 1, and the normalized value for level B is set to 0. The level correction step size is calculated accordingly. Where L is the level correction step size, L max β is the maximum allowable single correction step size for the production line, β is the grade adjustment coefficient, and G is the normalized value of the measurement grade.

[0025] In a preferred embodiment, in step S3, the current reference device value of the coordinate system is the current corrected reference value of the coordinate system of the pick and place machine provided by the pick and place machine control device;

[0026] The directional mean offset is extracted from the systematic drift characteristics, and the difference between the directional mean offset and the current reference device value of the coordinate system is calculated to obtain the original correction difference.

[0027] In a preferred embodiment, in step S3, the original correction difference is sequentially truncated by the level correction step size and the correction boundary threshold, and the calculation formula is as follows:

[0028]

[0029]

[0030] .

[0031] In a preferred embodiment, in step S4, the convergence correction amount is sent to the pick-and-place machine control device to perform coordinate reference update;

[0032] After the next batch of PCBs is assembled, the AOI inspection device will collect the assembly offset vector and use it as the value collected by the batch offset vector verification device.

[0033] The average magnitude of each offset vector in the offset vector data collected by the verification batch is used as the average offset amplitude, and compared with the average offset amplitude of the previous batch:

[0034] When the average offset amplitude of the offset vector values ​​collected by the verification batch is less than the average offset amplitude of the previous batch, the historical correction benchmark will be maintained as the current updated value.

[0035] When the average offset amplitude of the offset vector data collected by the verification batch is greater than or equal to the average offset amplitude of the previous batch, the historical correction benchmark will be rolled back to the coordinate value before correction.

[0036] The technical effects and advantages of this application are as follows:

[0037] This application effectively isolates the interference of different PCB structure differences on drift assessment by grouping the placement offset vectors according to phenotypic codes and removing discrete points, thereby improving the accuracy of systematic drift identification. It introduces a rail temperature normalized weighted correction direction convergence, so that the drift direction consistency assessment takes into account the thermal field effect. The dual truncation mechanism of grade correction step size truncation and correction boundary threshold linked with the metrology level reduces the risk of overcorrection. The closed-loop verification and historical correction benchmark rollback mechanism for the next batch of offset vectors ensures that the coordinate system can quickly recover stability when correcting deviations, thereby improving the placement accuracy of the production line and the overall reliability of the correction system. Attached Figure Description

[0038] Figure 1 This is a flowchart illustrating the implementation of a vision-based SMT surface mount control method for electricity meters according to this application.

[0039] Figure 2 This is a schematic diagram illustrating the steps of a vision-based detection-based SMT surface mount control method for electricity meters according to this application. Detailed Implementation

[0040] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0041] This application achieves adaptive and precise correction of systematic coordinate drift during the SMT placement process of electricity meters by eliminating discrete offsets through phenotypic grouping, evaluating directional convergence through temperature weighting, generating convergence correction through dual truncation of metering level, and ensuring coordinate stability through a closed-loop verification and backoff mechanism.

[0042] Example 1

[0043] Please see Figures 1 to 2 A method for controlling surface mount technology (SMT) of an energy meter based on vision detection, the specific operation process of which is as follows:

[0044] Step S1: Collect the placement offset vector output by the AOI detection device, combine it with the phenotypic code of the MES work order to group the placement offset vectors according to the phenotypic, remove the offset vectors with discrete directions within each group, and generate a set of offset vectors with the same phenotypic.

[0045] Step S2: Detect the temperature of the production line guide rail, use the guide rail temperature to evaluate the consistency of the directional distribution of the same phenotype offset vector set and generate systematic drift feature quantity, mark the same phenotype offset vector set according to the directional convergence of the systematic drift feature quantity and then interrupt and block it.

[0046] Step S3: Read the measurement level of the MES work order, determine the level correction step size according to the measurement level, read the current reference device value of the coordinate system of the pick and place machine, perform directional countermeasure calculation between the systematic drift characteristic quantity and the current reference device value of the coordinate system, and double-truncate the calculation result according to the level correction step size and the correction boundary threshold to generate the convergence correction quantity.

[0047] Step S4: Send the convergence correction amount to the pick-and-place machine to perform coordinate reference update, collect the placement offset vector of the next batch after the update to determine whether the offset amplitude has narrowed, and update the historical correction reference according to the judgment result.

[0048] The specific implementation is as follows:

[0049] In step S1, the mounting offset vector refers to the deviation of the actual landing point of each mounted device relative to the design coordinates obtained by the AOI inspection device through image comparison after each PCB is mounted. It includes the X-direction offset component and the Y-direction offset component, and is used to describe the degree of deviation of the mounting position of each PCB in the current batch.

[0050] The table type code is a code in the MES work order database that identifies the product category to which the current PCB belongs. It is used to distinguish PCBs of different table types, including single-phase fee control tables, three-phase fee control tables, IoT tables, and Southern Power Grid tables.

[0051] It should be explained that AOI inspection device refers to automated optical inspection equipment, which is used to detect the placement position of each component on the PCB and output offset data through image acquisition and comparison after the placement is completed. In this example, it is used to obtain the placement offset vector.

[0052] The mounting offset vectors output by the AOI inspection device are grouped and discretely eliminated according to phenotypic encoding to generate a set of offset vectors with the same phenotypic form.

[0053] Specifically, read the phenotypic code corresponding to each PCB in the current batch from the MES work order database, and divide the set of placement offset vectors into several subsets according to the phenotypic code. Each subset contains only the placement offset vectors under the same phenotypic code.

[0054] For each subset, calculate the mean and standard deviation of the offset components of all mounting offset vectors in the X and Y directions within the subset;

[0055] The mounting offset vectors whose mean value of all offset components exceeds twice the standard deviation are identified as discrete points and removed from the subset. The subset after removing the discrete points is the set of offset vectors with the same phenotype.

[0056] When the number of remaining vectors after removing discrete points in the subset is not less than the preset minimum number of samples, the same phenotype offset vector set enters step S2 to participate in the subsequent drift feature evaluation.

[0057] When the number of remaining vectors is less than the preset minimum number of samples, the subset of the phenotype is marked as insufficient samples and will not proceed to step S2. It will wait for the next batch of data to be supplemented and then re-statistically analyzed.

[0058] By grouping the mounting offset vectors by phenotypic encoding and removing discrete points, the mutual interference of offset data caused by differences in PCB structure of different phenotypic forms is avoided, providing a basis for offset data analysis by phenotypic form in subsequent steps.

[0059] It should be noted that the preset minimum sample size is used to ensure the statistical reliability of subsequent directional consistency assessment. It can be set according to the production line cycle time and the output of a single batch, with a typical value of no less than 5 PCBs. The discrete point elimination is based on the two-standard-deviation criterion. This criterion has a robust ability to eliminate occasional random mounting anomalies in engineering practice, while retaining the main data that represent the systematic deviation state of the production line.

[0060] In step S2, the production line guide rail temperature is the real-time temperature measurement value of the pick-and-place machine's transmission guide rail collected by the production line guide rail temperature sensor, which is used to reflect the influence of the degree of thermal expansion of the guide rail on the consistency of the placement coordinate drift direction.

[0061] It should be explained that the production line guide rail temperature sensor is a temperature detection element installed on the transport guide rail of the pick-and-place machine. It is used to collect the temperature rise data of the guide rail during continuous operation in real time. In this example, it is used to collect the temperature of the production line guide rail.

[0062] The uncorrected direction convergence is the mean of the cosine similarity between each offset vector and the mean vector within the same phenotypic offset vector set. It is used to characterize the concentration of offset directions within the subset. The higher the value, the more consistent the directions of each offset vector are, and the more likely it is to be a systematic drift.

[0063] The corrected directional convergence is the directional convergence after temperature correction of the production line guide rail, reflecting the superimposed effect of temperature factors on the consistency of drift direction.

[0064] The systematic drift characteristic is a descriptive quantity composed of the directional mean offset and the corrected directional convergence.

[0065] The consistency of the directional distribution of the same phenotypic offset vector set is evaluated by using the temperature of the production line guide rail, and a systematic drift characteristic quantity is generated.

[0066] Calculate the mean vector for each offset vector in the same phenotypic offset vector set, then calculate the cosine similarity between each offset vector and the mean vector, and take the mean of the cosine similarity to obtain the uncorrected directional convergence.

[0067] The temperature of the production line guide rails is normalized using the Max-Min normalization method. The normalization formula is as follows:

[0068] ;

[0069] in, T represents the normalized guide rail temperature, and T represents the production line guide rail temperature. min With T max These represent the minimum and maximum values ​​of the production line guide rail temperature in the production line's historical records.

[0070] After obtaining the normalized guide rail temperature, a weighted correction is applied to the uncorrected directional convergence:

[0071] ;

[0072] Among them, C adj To correct the directional convergence, C raw The uncorrected directional convergence is represented by α, which is the guide rail temperature influence coefficient. Normalized guide rail temperature;

[0073] The mean vector of all offset vectors in the same phenotypic offset vector set is used as the directional mean offset, which together with the corrected directional convergence constitutes the systematic drift characteristic.

[0074] When the corrected directional convergence is greater than or equal to the preset directional convergence threshold, it is determined that there is a systematic drift in the same phenotypic offset vector set, and the systematic drift feature is passed to step S3.

[0075] When the convergence of the corrected direction is less than the preset convergence threshold, it is determined that the offset direction of the current same phenotype offset vector set is discrete and belongs to random distribution. The same phenotype offset vector set is marked as random distribution and the interruption is interrupted, and the process does not proceed to step S3.

[0076] It should be noted that the guide rail temperature influence coefficient α reflects the degree to which the guide rail temperature amplifies the consistency of the drift direction, and can be calibrated based on the thermal expansion coefficient of the guide rail material and historical temperature drift data; the preset directional convergence threshold can be determined by dividing the interval based on the cosine similarity distribution of systematic drift batches and randomly scattered batches in the historical data of the production line.

[0077] In step S3, the measurement level of the MES work order is the measurement accuracy level corresponding to the current phenotype recorded in the MES work order database, including level A and level B, which is used to constrain the upper limit of the magnitude of a single coordinate correction.

[0078] The grade correction step size is the upper limit of the single coordinate correction amplitude dynamically determined according to the measurement grade. The higher the measurement grade, the smaller the grade correction step size, in order to prevent the high-precision measurement model from oscillating within the convergence boundary due to excessive step size during the correction process.

[0079] The current reference device value of the coordinate system refers to the current corrected reference value of the coordinate system of the pick-and-place machine provided by the pick-and-place machine control equipment.

[0080] It should be noted that the MES work order database is a collection of data used in the Manufacturing Execution System to store and manage production work order information. It uses the work order number as an index and records production parameters such as the phenotypic code, metering level and chip model corresponding to each batch of PCBs, which can be retrieved and used by each process during execution.

[0081] The pick-and-place machine control equipment is a motion control system built into the pick-and-place machine. It is used to store and manage the coordinate reference parameters of the pick-and-place machine and to update the coordinate reference after receiving a correction command.

[0082] Read the measurement level of the MES work order, perform mapping and normalization processing on it, taking a normalized value of 1 for level A and a normalized value of 0 for level B, and calculate the level correction step size accordingly:

[0083] ;

[0084] Where L is the level correction step size, L max β is the maximum allowable single correction step size for the production line, β is the grade adjustment coefficient, and G is the normalized value of the measurement grade.

[0085] The mean directional offset is extracted from the systematic drift characteristics and compared with the current reference device value in the coordinate system to calculate the original correction difference:

[0086] ;

[0087] Among them, D raw V is the original correction difference. drift V is the directional mean offset among the systematic drift characteristics. base This represents the current reference device value for the coordinate system.

[0088] The original correction difference is truncated sequentially by the level correction step size and the correction boundary threshold. The truncation operation keeps the direction of the original correction difference unchanged, only limiting its magnitude. The calculation formula is as follows:

[0089]

[0090]

[0091] ;

[0092] By using a dual truncation of the grade correction step size and the correction boundary threshold, a convergent correction amount that can be safely distributed is generated, providing a metric-grade differentiated correction input for subsequent coordinate benchmark updates.

[0093] It should be noted that the grade adjustment coefficient β can be calibrated based on the historical mounting accuracy tolerance window of each metering grade phenotype on the production line, with a value range of 0 to 1; the maximum single correction step size L max The settings can be configured according to the resolution of the pick-and-place machine's coordinate system and the production line's process specifications. The correction boundary threshold database value is provided by the production line process parameter database to prevent the correction magnitude of any phenotype from exceeding the production line's safe range. The dual truncation mechanism ensures that the actual correction step size of the Class A metering phenotype does not exceed the correction step size of the Class B phenotype, thus providing additional correction protection for high-precision phenotypes at the grade level. When the modulus of the original correction difference is zero, it indicates that there is no systematic drift in the current batch, and no truncation operation is performed; the converged correction amount is taken as the zero vector.

[0094] In step S4, the convergence correction amount is sent to the pick-and-place machine control device to perform coordinate reference update, and the historical correction reference is refreshed to the current updated coordinate value;

[0095] After the next batch of PCBs is mounted, the mounting offset vector is collected by the AOI inspection device and used as the value collected by the verification batch offset vector device. The average offset amplitude of the verification batch offset vector device is calculated and compared with the average offset amplitude of the previous batch.

[0096] When the average offset amplitude of the offset vector values ​​collected by the verification batch is less than the average offset amplitude of the previous batch, the correction is deemed effective, the historical correction benchmark is kept as the current updated value, and the closed loop is completed.

[0097] When the average offset amplitude of the offset vector collected by the verification batch offset vector device is greater than or equal to the average offset amplitude of the previous batch, it is determined that the correction in this round is excessive or there is a deviation in direction. The historical correction benchmark is then rolled back to the coordinate value before the correction, and step S1 is triggered to re-collect the current batch mounting offset vector, starting a new round of drift evaluation and correction process.

[0098] It should be noted that the average offset magnitude is taken as the average magnitude of each offset vector in the offset vector data collected by the verification batch, so as to comprehensively reflect the degree of composite offset in the X and Y directions; the rollback mechanism of the historical correction benchmark ensures that the coordinate system can be restored to a stable state when the correction direction is incorrectly judged, and avoids the coordinate drift caused by continuous erroneous correction.

[0099] Finally, it should be noted that in this paper, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0100] Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0101] In this document, the singular forms “a,” “an,” and “the” may also include the plural forms unless the context clearly indicates otherwise. It should also be understood that terms such as “comprising / including” or “having” specify the presence of the stated features, integrals, steps, operations, components, parts, or combinations thereof, but do not preclude the possibility of the presence or addition of one or more other features, integrals, steps, operations, components, parts, or combinations thereof. Meanwhile, the term “and / or” as used in this specification includes any and all combinations of the associated listed items.

[0102] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.

[0103] The above description of the disclosed embodiments will enable those skilled in the art to make or use various modifications to these embodiments. It will be readily apparent to those skilled in the art that the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for controlling surface mount technology (SMT) of an energy meter based on vision detection, characterized in that: Includes the following steps: Step S1: Collect the placement offset vector output by the AOI detection device, combine it with the phenotypic code of the MES work order to group the placement offset vectors according to the phenotypic, remove the offset vectors with discrete directions within each group, and generate a set of offset vectors with the same phenotypic. Step S2: Detect the temperature of the production line guide rail, use the guide rail temperature to evaluate the consistency of the directional distribution of the same phenotype offset vector set and generate systematic drift feature quantity, mark the same phenotype offset vector set according to the directional convergence of the systematic drift feature quantity and then interrupt and block it. Step S3: Read the measurement level of the MES work order, determine the level correction step size according to the measurement level, read the current reference device value of the coordinate system of the pick and place machine, perform directional countermeasure calculation between the systematic drift characteristic quantity and the current reference device value of the coordinate system, and double-truncate the calculation result according to the level correction step size and the correction boundary threshold to generate the convergence correction quantity. Step S4: Send the convergence correction amount to the pick-and-place machine to perform coordinate reference update, collect the placement offset vector of the next batch after the update to determine whether the offset amplitude has narrowed, and update the historical correction reference according to the judgment result.

2. The method for controlling surface mount technology (SMT) of an energy meter based on visual inspection according to claim 1, characterized in that: In step S1, after each PCB is mounted, the AOI detection device obtains the deviation of the actual landing point of each mounted device relative to the design coordinates through image comparison detection as the mounting offset vector, which includes the X-direction offset component and the Y-direction offset component. Read the phenotypic code corresponding to each PCB in the current batch from the MES work order database, and divide the set of placement offset vectors into several subsets according to the phenotypic code. Each subset contains only the placement offset vectors under the same phenotypic code.

3. The method for controlling the surface mount technology (SMT) of an energy meter based on visual inspection according to claim 2, characterized in that: In step S1, the mean and standard deviation of the offset components of each mounting offset vector in the X and Y directions are calculated respectively. Mounting offset vectors whose mean offset components all exceed twice the standard deviation are identified as discrete points and removed from the subset. The subset after removing discrete points is used as the offset vector set with the same phenotype.

4. The method for controlling SMT surface mount technology of an energy meter based on vision detection according to claim 1, characterized in that: In step S2, the production line guide rail temperature is the temperature measurement value of the pick-and-place machine transmission guide rail collected in real time by the production line guide rail temperature sensor. The consistency of the directional distribution of the same phenotypic offset vector set is evaluated by using the temperature of the production line guide rail. The mean vector of each offset vector in the same phenotypic offset vector set is calculated, and the cosine similarity between the offset vector and the mean vector is calculated. The mean value of the cosine similarity is taken to obtain the uncorrected directional convergence. The temperature of the production line guide rail is normalized using the Max-Min normalization method to obtain the normalized guide rail temperature. The uncorrected directional convergence is corrected by using the normalized guide rail temperature to obtain the corrected directional convergence.

5. The SMT surface mount control method for an energy meter based on vision detection according to claim 4, characterized in that: In step S2, the mean vector of all offset vectors in the same phenotypic offset vector set is used as the directional mean offset, which together with the corrected directional convergence constitutes the systematic drift characteristic quantity. When the corrected directional convergence is greater than or equal to the preset directional convergence threshold, it is determined that there is a systematic drift in the same phenotypic offset vector set, and the systematic drift feature is passed to step S3. When the convergence of the corrected direction is less than the preset convergence threshold, the offset vector set with the same phenotype is marked as random distribution and the blocking is interrupted, and the process does not proceed to step S3.

6. The method for controlling the surface mount technology (SMT) of an energy meter based on visual inspection according to claim 5, characterized in that: In step S3, the measurement level of the MES work order is the measurement accuracy level corresponding to the current phenotype recorded in the MES work order database, including level A and level B. The normalized value for level A is set to 1, and the normalized value for level B is set to 0. The level correction step size is calculated accordingly. Where L is the level correction step size, L max β is the maximum allowable single correction step size for the production line, β is the grade adjustment coefficient, and G is the normalized value of the measurement grade.

7. The method for controlling surface mount technology (SMT) of an energy meter based on visual inspection according to claim 5, characterized in that: In step S3, the current reference device value of the coordinate system is the current corrected reference value of the coordinate system of the pick and place machine provided by the pick and place machine control device; The directional mean offset is extracted from the systematic drift characteristics, and the difference between the directional mean offset and the current reference device value of the coordinate system is calculated to obtain the original correction difference.

8. The SMT surface mount control method for an energy meter based on vision detection according to claim 7, characterized in that: In step S3, the original correction difference is sequentially truncated by the level correction step size and the correction boundary threshold. The calculation formula is as follows: ; ; Among them, D clip1 D is the correction difference after being truncated by the grade correction step size. final D is the convergence correction factor. raw The original correction difference is L, the level correction step size is T. bound To correct the boundary threshold.

9. The method for controlling surface mount technology (SMT) of an energy meter based on visual inspection according to claim 1, characterized in that: In step S4, the convergence correction amount is sent to the pick-and-place machine control equipment to perform coordinate reference update; After the next batch of PCBs is assembled, the AOI inspection device will collect the assembly offset vector and use it as the value collected by the batch offset vector verification device. The average magnitude of each offset vector in the offset vector data collected by the verification batch is used as the average offset amplitude, and compared with the average offset amplitude of the previous batch: When the average offset amplitude of the offset vector values ​​collected by the verification batch is less than the average offset amplitude of the previous batch, the historical correction benchmark will be maintained as the current updated value. When the average offset amplitude of the offset vector data collected by the verification batch is greater than or equal to the average offset amplitude of the previous batch, the historical correction benchmark will be rolled back to the coordinate value before correction.