Automatic barcode verification test method
By collecting and verifying barcode images in automated testing equipment, combined with electrical pre-inspection, the reliability of barcode recognition results was solved, the accuracy and consistency of test results were achieved, and the stable operation of the production line was ensured.
Patent Information
- Application Number
- CN202611556844.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-09
- Publication Date
- 2026-11-06
AI Technical Summary
In existing automated testing equipment, the reliability of barcode recognition results is insufficient, leading to misjudgments, repeated barcode readings, or incorrect interception, which affects the production line cycle time. Furthermore, when the barcode and the product entity are mismatched, the information-level verification is difficult to reflect the true electrical attributes of the product under test.
By acquiring the product arrival signal, a fixed industrial camera is triggered to capture barcode images. When consecutive frames are decoded consistently, the barcode string is determined. The barcode string is then verified against the product model rules of the current work order. After the model comparison is successful, the barcode string is locked, electrical pre-inspection is performed, and a one-time license mark is generated to ensure the reliability of test initiation and data upload.
This improves the stability of barcode identity input, reduces the probability of incorrect work orders or wrong models entering the testing process, ensures the accuracy and consistency of test results, and forms a closed-loop control from physical arrival, visual identity verification, work order rule verification, and electrical feature review.
Smart Images

Figure CN123050464A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of automated testing equipment modification and machine vision recognition technology, and in particular to an automatic barcode verification and testing method. Background Technology
[0002] The transformation of automated testing equipment and machine vision recognition technology is a technology that combines industrial automation control, functional testing equipment, machine vision imaging, image recognition, equipment interlocking, and production data management technologies.
[0003] In practical operation, existing automated testing equipment upgrades and machine vision recognition technologies typically integrate industrial camera recognition, work order information verification, equipment startup control, and production data management as interconnected functional links. While each link can perform basic automated operations, the reliability of the recognition results, once they become direct inputs for subsequent control, affects the test release outcome. For example, slight vibrations after product pressing, barcode surface reflections, dirt, and partial obstruction can all cause abnormal characters at a certain acquisition point. If these abnormal characters still enter the work order verification process, it may lead to misjudgments, duplicate code readings, or incorrect interception, thus disrupting the production line cycle. Conventional model verification mainly relies on the numerical relationship between barcode content and work order information. When the barcode itself mismatches with the product entity, the string format, prefix, and model field may still all conform to the current work order requirements. In this case, information-level verification cannot reflect the true electrical attributes of the product under test. For example, if an incorrect product is affixed with the correct model barcode and enters the fixture, data verification may remain normal, but subsequent testing programs may perform tests on incompatible hardware, leading to incorrect testing and data distortion risks. Therefore, improvements are needed. Summary of the Invention
[0004] The purpose of this invention is to address the shortcomings of existing technologies by proposing an automatic barcode verification and testing method.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: an automatic barcode verification and testing method, comprising the following steps:
[0006] Obtain a product arrival signal, determine the product arrival status cycle based on the product arrival signal, and trigger a fixed industrial camera to capture barcode images;
[0007] When the barcode image is processed, a barcode string is obtained when consecutive frames are decoded consistently.
[0008] Get the current work order, call the product model rule of the current work order, and verify the barcode string to obtain the model comparison result;
[0009] When the model comparison result is passed, the barcode string is locked, the pre-inspection pilot and pre-inspection excitation parameters are determined according to the current work order, the pre-inspection pilot is subjected to electrical pre-inspection according to the pre-inspection excitation parameters, the pre-inspection response data is obtained, the pre-inspection verification result is obtained according to the pre-inspection response data, and when the pre-inspection verification result is passed, a one-time license identifier is generated, the software startup entry is opened and the hardware interlock output is enabled, and a start-up signal is generated.
[0010] The functional circuit is tested according to the enabled start signal to obtain test data;
[0011] The test data is bound to the barcode string to generate a test record, which is then uploaded.
[0012] The one-time license mark is valid once during the product arrival period, and the interlock status is reset after the functional circuit test is completed.
[0013] Preferably, the steps of acquiring a product arrival signal, determining the product arrival status cycle based on the product arrival signal, and triggering a fixed industrial camera to acquire a barcode image are as follows:
[0014] The fixed industrial camera is mounted above the functional circuit test fixture, and an optical lens and auxiliary light source are configured to cover the barcode area in the imaging field of view. The brightness, exposure time, and camera gain of the auxiliary light source are set as imaging parameters. A pressing position switch is set on the functional circuit test fixture. When the pressing position switch switches from the non-positioned state to the positioned state, a product positioning signal is generated and a product positioning state cycle is established. After waiting for a preset stabilization time based on the product positioning signal, the fixed industrial camera is triggered to continuously acquire a preset number of original images. During the continuous acquisition, the imaging parameters remain unchanged. The image corresponding to the barcode area is cropped from each frame of the original image to obtain the barcode image. The product positioning state cycle ends when the pressing position switch returns to the non-positioned state.
[0015] Preferably, the step of processing the barcode image to obtain the barcode string when consecutive frames are decoded consistently is as follows:
[0016] The barcode image is sequentially subjected to grayscale conversion, contrast enhancement, binarization, and distortion correction to obtain a preprocessed image. The barcode recognition image is cropped according to a preset region of interest. The barcode recognition images continuously collected within the product arrival status period are decoded frame by frame to obtain continuous frame decoding results. When the decoding results of each continuous frame are non-empty strings and have the same content, the same string is determined to be the barcode string; otherwise, the barcode decoding is determined to have failed and the barcode string remains in an undetermined state.
[0017] Preferably, the steps of obtaining the current work order, calling the product model rule of the current work order, and verifying the barcode string to obtain the model comparison result are as follows:
[0018] According to the current work order, the product model rule and the test program model are invoked. Within the product arrival status period, the product model rule and the test program model are locked. The product model rule includes barcode fixed length, barcode prefix, model field start position, model field length, allowed character set, check bit rule, and regular expression. The barcode string is checked for string length, prefix content, character validity, check bit, and regular expression matching status according to the product model rule. The product model field is extracted according to the model field start position and model field length. If all checks pass and the product model field matches the test program model, a successful model comparison result is generated; otherwise, a failed model comparison result is generated.
[0019] Preferably, when the model comparison result passes, the barcode string is locked, the pre-inspection pilot and pre-inspection excitation parameters are determined according to the current work order, electrical pre-inspection is performed on the pre-inspection pilot according to the pre-inspection excitation parameters to obtain pre-inspection response data, and a pre-inspection verification result is obtained based on the pre-inspection response data. When the pre-inspection verification result passes, a one-time license identifier is generated, the software startup entry is opened, and the hardware interlock output is enabled. The specific steps for generating a startup permission signal are as follows:
[0020] The pre-inspection test configuration corresponding to the test program model is read according to the current work order. The pre-inspection test configuration includes the pre-inspection pilot, the pre-inspection excitation parameters, the reference response voltage, and the allowable voltage deviation. The pre-inspection excitation parameters include the excitation voltage and the sampling time. When the model comparison result is passed and the product arrival signal is valid, the barcode string is locked. The excitation voltage is applied through the test interface according to the pre-inspection excitation parameters, and the response voltage of each pre-inspection pilot is collected at the sampling time to form the pre-inspection response data. The normalized deviation is calculated based on the pre-inspection response data using the following formula: ,in, Indicates normalization bias. Indicates the first The response voltage of the aforementioned pre-detection pilot. Indicates the first The reference response voltage of the pre-detection pilot, Indicates the first The allowable voltage deviation of each of the pre-detection pilots is greater than 0. Indicates the pilot number for pre-testing. The total number of pre-detection pilots is a positive integer. The response voltage, the reference response voltage, and the allowable voltage deviation are all voltage-dimensional, while the normalized deviation is a dimensionless quantity. When the normalized deviation is not greater than 1, a passing pre-detection verification result is generated. When the normalized deviation is greater than 1, a failing pre-detection verification result is generated, and the software startup entry and the hardware interlock output are set to a disabled state. When the pre-detection verification result passes, the one-time permission identifier is generated, the software startup entry is opened, the hardware interlock output is enabled, and the start-up permission signal is generated.
[0021] Preferably, the step of performing functional circuit testing based on the enabled start signal to obtain test data specifically includes:
[0022] According to the current work order, the test program is loaded, and the start-up signal is input to the start interface of the test program. The locked barcode string is written into the test context, and modification of the barcode string in the test context is prohibited during the functional circuit test. The test program reads the barcode string from the test context. During the functional circuit test, the test item name, measurement value, single-item judgment result, test start time, test end time, and workstation identifier are collected to form the test data. After all test items are executed, a total judgment result is generated based on the single-item judgment results. When the functional circuit test is interrupted, the interruption status, completed test items, and interruption time are written into the test data, and the barcode string remains unchanged.
[0023] Preferably, the step of binding the test data with the barcode string to generate a test record and uploading it specifically includes:
[0024] A record object is created, and the locked barcode string is set as the unique product identifier of the record object. The test item name, measurement value, single judgment result, total judgment result, test start time, test end time, and workstation identifier from the test data are written into the record object to generate the test record. The test record is submitted to the manufacturing execution system. After receiving a successful reception identifier from the manufacturing execution system, the test record is persisted. If the successful reception identifier is not received, the test record is retained and a data upload alarm signal is output. When the functional circuit test is interrupted, an abort status is written into the test record and the test data is retained, so that the barcode string and the test data maintain a one-to-one traceability relationship.
[0025] Preferably, the one-time license mark is effective once during the product arrival status period, and the step of resetting the interlock status after the functional circuit test is completed is as follows:
[0026] Before generating the start-up permission signal, the product arrival signal is detected and the work order configuration is read to obtain a review work order. When the product arrival signal fails, the one-time license identifier is cleared and the software startup entry and the hardware interlock output are set to the disabled state. When the review work order is inconsistent with the current work order, the one-time license identifier is cleared and the software startup entry and the hardware interlock output are set to the disabled state. After the functional circuit test starts, the one-time license identifier is marked as used and the software startup entry and the hardware interlock output are restored to the disabled state. The start-up permission signal is prohibited from being generated again during the product arrival status cycle. After the functional circuit test ends, the one-time license identifier is cleared and the barcode string is unlocked. When the product arrival signal turns to the invalid state, the product arrival status cycle ends. When the product arrival signal turns to the valid state, a new product arrival status cycle is established and the barcode reading state is reset.
[0027] Compared with the prior art, the advantages and positive effects of the present invention are as follows:
[0028] In this invention, a product arrival signal is acquired, and a product arrival status period is defined based on the product arrival signal. This ensures that the reading, verification, test authorization, and test results of the same product under test are all constrained within a defined physical presence period, reducing crosstalk caused by the continuation of the previous product's identity information to the next. Within the product arrival status period, a fixed industrial camera is triggered to capture barcode images, and the consistency of consecutive frame decoding results is used as the confirmation condition for the barcode string. This excludes occasional reading results caused by vibration, reflection, dirt, and instantaneous imaging fluctuations in a single frame from valid identity information, improving the stability of barcode identity input. The current work order is acquired, and the corresponding product model rule is called to verify the barcode string, linking the barcode identity, the current production task, and the test program to be executed, reducing the probability of incorrect work orders or wrong models entering the test process. After the model comparison is successful, the barcode string is locked, and pre-detection pilots and pre-detection excitation parameters are determined based on the current work order. Pre-detection excitation is applied to the pre-detection pilots, and a pre-detection verification result is formed based on the pre-detection response data, ensuring the digital identity expressed by the barcode is valid. It also needs to correspond with the actual electrical response of the product under test, expanding from simple string error prevention to cross-confirmation of identity information and physical electrical characteristics. This can further identify anomalies such as incorrect barcode labeling, incorrect material clamping, and correct identity information but mismatched product entities. A one-time license mark is generated only when the pre-inspection verification is passed, and the software startup entry and hardware interlock output are enabled simultaneously. This ensures that the test startup is constrained by identity verification, electrical pre-inspection, software permissions, and hardware status. The one-time license mark also limits the license to a single validity period within the current product arrival status cycle, which can suppress repeated triggering, old license residue, and multiple tests corresponding to one verification. The test data obtained from the functional circuit test continues to be bound with the locked barcode string to generate test records and upload them. This ensures that the front-end identity verification, intermediate test license, and back-end data traceability maintain the same identity link, forming a closed-loop control from physical arrival, visual identity verification, work order rule verification, electrical characteristic review, double interlock release to test record binding. This achieves more stable technical gains in terms of error prevention accuracy, test startup reliability, anomaly interception capability, and traceability consistency. Attached Figure Description
[0029] Figure 1 This is a schematic diagram of the steps of the present invention. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0031] The following detailed description of an automatic barcode verification test method, with reference to specific embodiments, illustrates this method. This embodiment is applied to the functional circuit testing station for electronic components, printed circuit board assemblies, or finished products. While retaining the existing functional circuit testing host, functional circuit testing fixture, pressing mechanism, test power supply, and signal adapter board, a fixed industrial camera, optical lens, and auxiliary light source are installed above the functional circuit testing fixture. The fixed industrial camera is connected to an industrial control computer (ICC). A pressing-in-place switch is connected to the ICC's digital input interface, and the ICC's digital output interface is connected to the test start interlock circuit of the functional circuit testing equipment. The fixed industrial camera is a 5-megapixel global shutter industrial camera with a 12mm focal length. The working distance between the industrial camera and the barcode plane is 350mm. The auxiliary light source is a ring-shaped LED light source. The industrial camera communicates with the ICC via a gigabit Ethernet interface. The interlock input / output uses a 24V digital interface, where a low level corresponds to 0V and indicates a disabled state, and a high level corresponds to 24V and indicates an enabled state. The above equipment specifications are used to illustrate one possible implementation method, which can be adjusted according to the size of the product under test and the structure of the original functional circuit test fixture.
[0032] After the camera is mechanically installed, an offline calibration is performed. In this embodiment, a planar checkerboard calibration board with 9×6 interior corner points and an actual distance of 10mm between adjacent corner points is used. Fifteen calibration images are obtained by changing the position and orientation of the calibration board within the camera's field of view. The focal length, principal point coordinates, radial distortion coefficient, and tangential distortion coefficient are calculated according to the planar camera calibration method, and the obtained parameters are saved as the camera calibration parameters for the current workstation. The reprojection error is calculated using all calibration images. The calibration result is saved when the root mean square reprojection error is no greater than 0.3 pixels; if it exceeds 0.3 pixels, the camera's fixed state is readjusted and recalibrated. 0.3 pixels is the calibration limit used during equipment acceptance in this embodiment. The above calibration process is repeated after the camera and lens are replaced or the mechanical support position changes.
[0033] Please see Figure 1 This invention provides a technical solution, an automatic barcode verification and testing method, comprising the following steps:
[0034] This embodiment establishes a single-product processing boundary based on the physical process from when the product under test enters the functional circuit test fixture to when it leaves the fixture. This ensures that image acquisition, barcode decoding, model verification, electrical pre-inspection, test authorization, functional circuit testing, and data uploading for the same product are all associated with the same product arrival status cycle.
[0035] Obtain the product arrival signal, determine the product arrival status cycle based on the product arrival signal, and trigger the fixed industrial camera to collect barcode images;
[0036] In practice, the industrial control computer reads the pressure-closed switch with a sampling period of 10 milliseconds. If five consecutive samples are valid, the switch is confirmed to be in the "closed" state; if five consecutive samples are invalid, the switch is confirmed to be in the "not closed" state. This creates a 50-millisecond software debouncing time, preventing mechanical contact jitter from causing repeated establishment of the product's position status cycle. The moment the pressure-closed switch switches from the "not closed" to the "closed" state after debouncing is taken as the start time of the product's position status cycle, and the cycle number is incremented by 1. The moment the pressure-closed switch switches from the "closed" to the "not closed" state after debouncing is taken as the end time of the current product's position status cycle.
[0037] When a new product arrival status cycle is established, the barcode string, model comparison results, pre-inspection verification results, and test start status saved in the previous cycle are cleared, and the used status of the current cycle is initialized to unused. Then, after waiting for a preset stabilization period, the fixed industrial camera is triggered to acquire images.
[0038] The preset stabilization time is determined based on actual test results during the equipment debugging phase. Specifically, the standard product is clamped 30 times consecutively. After each clamping, an image of the barcode area is captured at 10-millisecond intervals. The x-coordinate and y-coordinate of the center of the barcode area are calculated based on the circumscribed rectangle of the barcode area. When the change in the x-coordinate of the center of each of the five consecutive images does not exceed 1 pixel and the change in the y-coordinate of the center does not exceed 1 pixel, the acquisition time of the first image that meets the aforementioned continuous stabilization condition is determined as the stabilization time of that clamping. The maximum value among the stabilization times obtained from 30 clampings is taken, and then 50 milliseconds are added to it as the preset stabilization time used for production operation. In this embodiment, the maximum stabilization time in 30 tests is 238 milliseconds, therefore the preset stabilization time is set to 300 milliseconds.
[0039] When processing barcode images, the barcode string is obtained when consecutive frames are decoded consistently.
[0040] In this embodiment, three frames of barcode images are continuously acquired for each scan, with an interval of 30 milliseconds between the three frames. During the acquisition of the same set of three frames, the brightness of the auxiliary light source, the exposure time, and the camera gain remain constant.
[0041] Imaging parameters were selected offline using standard samples before equipment production. Specifically, 30 qualified standard products were sequentially acquired from parameter combinations consisting of auxiliary light source 8-bit brightness control values of 120, 150, 180, and 210; exposure times of 1500 microseconds, 2000 microseconds, 2500 microseconds, and 3000 microseconds; and camera gains of 0dB, 2dB, and 4dB. For each parameter combination, three frames were continuously acquired for each standard product. The number of standard products whose three frames were successfully decoded and whose strings matched was divided by 30 to obtain the continuous frame recognition success rate for the corresponding parameter combination. Simultaneously, the proportion of pixels with a grayscale value of 255 in the barcode area was calculated as the saturation pixel ratio. Only parameter combinations with a continuous frame recognition success rate of 100%, a saturation pixel ratio of no more than 1%, and an average grayscale value in the barcode area between 80 and 180 were retained. When multiple parameter combinations met the conditions, the combination with the shortest exposure time was prioritized; if the exposure times were the same, the combination with the lowest camera gain was selected; and if the camera gains were still the same, the combination with the lowest auxiliary light source brightness was selected. In this embodiment, the final selected auxiliary light source brightness is 180, the exposure time is 2500 microseconds, and the camera gain is 2dB. If the product model or barcode material changes, the calibration should be performed using the same procedure.
[0042] Get the current work order, call the product model rule of the current work order, and verify the barcode string to obtain the model comparison result;
[0043] In practice, the industrial control computer reads the current work order identifier from the manufacturing execution system. When the manufacturing execution system uses a work order issuance method, the work order switching command is only allowed to be written to the active work order at the workstation when the functional circuit test fixture is not in place. After the product arrival status cycle is established, the active work order is copied to the current cycle context and locked as the current work order. This field is not allowed to be directly overwritten before the current product leaves.
[0044] When the model comparison result is passed, the barcode string is locked, the pre-inspection pilot and pre-inspection excitation parameters are determined according to the current work order, the pre-inspection pilot is electrically pre-inspected according to the pre-inspection excitation parameters, the pre-inspection response data is obtained, the pre-inspection verification result is obtained according to the pre-inspection response data, and when the pre-inspection verification result is passed, a one-time license mark is generated, the software startup entry is opened and the hardware interlock output is enabled, and a start-up signal is generated.
[0045] After successful model comparison, the current barcode string is written to a read-only field in the current cycle context. During the current cycle's validity period, scanning events, manual input, and other software interface modifications to the field are prohibited. Based on the current work order, the pre-inspection test configuration is loaded, and the electrical identity of the product under test is verified. Only products whose barcode identity and physical electrical characteristics both meet the requirements of the current product model are allowed to proceed to full functional circuit testing.
[0046] The test data is obtained by performing functional circuit tests based on the start-up signal;
[0047] The start-allow signal only indicates authorization to start the full functional circuit test and is not a continuously maintained test power enable signal during the test. Upon receiving the start-allow signal, the functional circuit test program latches the start request and enters the running state. Subsequent restoration of the software start-up entry and hardware interlock output to the disabled state will not interrupt the currently running functional circuit test.
[0048] Bind test data to barcode strings to generate test records and upload them;
[0049] Test records are created at the start of the full-function circuit test and use the locked barcode string as the unique product identification field. Therefore, all data generated during the test is directly appended to the same record object, and there is no need to scan the barcode again after the test is completed.
[0050] The one-time license mark is valid once during the product arrival period, and the interlock status is reset after the functional circuit test is completed.
[0051] In addition to the one-time authorization marker, this embodiment also stores the cycle usage status within the product arrival status cycle context. The one-time authorization marker can be cleared after the full functional circuit test begins, but the cycle usage status remains "used" until the pressure-in switch changes to the non-in position and the current product arrival status cycle ends. The industrial control computer checks the cycle usage status before generating any new start-up signal, thus eliminating the problem of needing to re-obtain test authorization after the test ends because the one-time authorization marker has been cleared, even if the same product has not been loaded.
[0052] The specific steps for obtaining a product arrival signal, determining the product arrival status cycle based on the signal, and triggering a fixed industrial camera to capture barcode images are as follows:
[0053] This embodiment further explains the installation, imaging area, and triggering conditions of the fixed industrial camera.
[0054] A fixed industrial camera is mounted above a functional circuit test fixture, equipped with an optical lens and an auxiliary light source to ensure the imaging field of view covers the barcode area. The brightness, exposure time, and camera gain of the auxiliary light source are set as imaging parameters. A pressing position switch is set on the functional circuit test fixture. When the pressing position switch switches from the non-positioned state to the positioned state, a product positioning signal is generated and a product positioning state cycle is established. After waiting for a preset stabilization time based on the product positioning signal, the fixed industrial camera is triggered to continuously acquire a preset number of original images. During continuous acquisition, the imaging parameters remain unchanged. The corresponding image of the barcode area is cropped from each frame of the original image to obtain the barcode image. The product positioning state cycle ends when the pressing position switch returns to the non-positioned state.
[0055] The barcode area is determined during the equipment debugging phase. Thirty qualified standard products are loaded into a fixture and pressed together. The circumscribed rectangle of the barcode is detected from the full image of each standard product. The coordinates of the 30 circumscribed rectangles are taken as a union, and 20 pixels are added to the top, bottom, left, and right directions of the union to form the final fixed region of interest. If the expanded boundary exceeds the camera image boundary, the corresponding boundary is truncated to the image boundary. This region of interest is configured according to the product model and stored in the work order parameter file, and is not arbitrarily changed with individual products during production.
[0056] After the camera, lens, or mechanical support is reinstalled, the camera calibration and region of interest determination process needs to be repeated; when only the same model of product under test is replaced, the already verified imaging parameters and region of interest configuration are directly loaded.
[0057] The specific steps for obtaining the barcode string when consecutive frames of a barcode image are decoded consistently are as follows:
[0058] The barcode image is sequentially subjected to grayscale conversion, contrast enhancement, binarization, and distortion correction to obtain a preprocessed image. The barcode recognition image is then extracted according to the preset region of interest. The barcode recognition images continuously collected within the product arrival status cycle are decoded frame by frame to obtain continuous frame decoding results. When the decoding results of each continuous frame are all non-empty strings and have the same content, the same string is determined to be the barcode string; otherwise, the barcode decoding is deemed to have failed and the barcode string remains in an undetermined state.
[0059] For color images, grayscale values are calculated according to the formula... Calculate, where, This represents the grayscale value of the output pixel. This represents the red channel value of the corresponding pixel. This represents the green channel value of the corresponding pixel. This represents the blue channel value of the corresponding pixel. , , and All use dimensionless gray levels from 0 to 255.
[0060] When contrast is enhanced, the grayscale values corresponding to a cumulative pixel ratio of 1% and 99% are calculated in the grayscale histogram of the current barcode area. The former is mapped to 0, and the latter to 255, with a linear mapping between them. Pixels lower than the former are uniformly truncated to 0, and pixels higher than the latter are uniformly truncated to 255. 1% and 99% are fixed quantile points in this embodiment, directly configured by the device debugging software, and do not change with individual products.
[0061] Binarization employs the Otsu thresholding method, calculating the inter-class variance among all candidate grayscale thresholds from 0 to 255 and selecting the grayscale value that maximizes the inter-class variance as the binarization threshold for the current image. Distortion correction utilizes camera intrinsic parameters, radial distortion parameters, and tangential distortion parameters saved during the equipment installation phase.
[0062] After each frame is preprocessed, the barcode recognition image is extracted according to the preset region of interest, and the standard barcode decoder corresponding to the current work order barcode format is called. In this embodiment, the decoding results of three consecutive frames are recorded as strings S1, S2, and S3, respectively. Only when S1, S2, and S3 are not empty, have the same string length, and the position of each character is completely consistent, is the string used as the barcode string.
[0063] If the initial 3-frame decoding fails, wait 100 milliseconds to re-acquire the next set of 3 frames. Each product arrival status cycle executes a maximum of 3 acquisitions, therefore the maximum number of automatic re-acquisitions is 2. If the third set still cannot form a consistent non-empty string, the code reading status is set to failure, an audible and visual alarm is output, and the software startup entry and hardware interlock output remain in a disabled state. After replacing the product or re-pressing, a new product arrival status cycle is established, and the retry count is reset to zero.
[0064] The specific steps for obtaining the current work order, calling the product model rule for the current work order, and verifying the barcode string to get the model comparison result are as follows:
[0065] Based on the current work order, the product model rules and test program model are invoked. Within the product arrival status cycle, the product model rules and test program model are locked. The product model rules include barcode fixed length, barcode prefix, model field start position, model field length, allowed character set, check bit rules, and regular expressions. The barcode string length, prefix content, character validity, check bits, and regular expression matching status are verified according to the product model rules. The product model field is extracted based on the model field start position and model field length. If all verifications pass and the product model field matches the test program model, a successful model comparison result is generated; otherwise, a failed model comparison result is generated.
[0066] For example, the current work order is WO-A001, the corresponding test program model is A01, the product barcode is in the format A01-260909-0012-0, and the total length is 17 characters. The first three characters constitute the product model field, the fourth, eleventh, and sixteenth characters are connectors, the remaining specified fields are numeric characters, and the last character is a check digit. The regular expression is set to ^A01-[0-9]{6}-[0-9]{4}-[0-9]$.
[0067] The check digit is calculated by summing the values of all numeric characters in the first 16 characters of the barcode and taking the remainder after dividing by 10. For example, in A01-260909-0012-0, the sum of the numeric values is 30, and 30 divided by 10 is 0. Therefore, the last check digit should be 0. Any of the following will result in a failed model comparison: incorrect string length, incorrect product model prefix, non-numeric characters at specified numeric positions, check digit mismatch, regular expression matching failure, or inconsistency between the product model field and the model in the test program.
[0068] Table 1. Examples of work orders and main operating parameters
[0069] project Example setting value Setup method Use phase Current work order WO-A001 Manufacturing Execution System (MES) distribution Lock when product arrives Test program model A01 Pre-association with the current work order Model verification and testing Barcode fixed length 17 characters Product barcode specifications pre-configured String validation Continuous frame acquisition 3 frames Equipment parameter configuration Barcode Decoding Single frame interval 30 milliseconds Camera trigger parameter configuration Barcode Decoding Maximum number of data collection groups 3 groups Workstation parameter configuration Decoding retry Product arrival and shake reduction time 50 milliseconds Sampled in 10 milliseconds and consistent for 5 consecutive times. Position judgment Preset stable duration 300 milliseconds Maximum stable time in 30 tests plus 50 milliseconds First image capture Pre-detection pilot TP1, TP2, TP3 Filter by Model Ability Electrical pre-inspection Pre-detection excitation voltage 3.3V Configuration within the product's safe power-on range Electrical pre-inspection Pre-inspection current limit 100mA Configuration below the product safety current limit Electrical pre-inspection Pre-inspection sampling time 50 milliseconds after excitation Stability testing of standard samples determines Electrical pre-inspection Real-time upload timeout 5 seconds Workstation communication parameter configuration Data Upload
[0070] As can be seen from Table 1, the number of frames, duration, stimulus parameters, number of retries and upload timeout involved in this embodiment all have clear setting values or clear determination methods. Each parameter is loaded by the corresponding product model configuration at the beginning of the product arrival status cycle, without relying on the tester's temporary judgment during the single-item test.
[0071] When the model comparison result is passed, the barcode string is locked. Based on the current work order, the pre-inspection pilot and pre-inspection excitation parameters are determined. Electrical pre-inspection is performed on the pre-inspection pilot according to the pre-inspection excitation parameters to obtain pre-inspection response data. Pre-inspection verification results are obtained based on the pre-inspection response data. When the pre-inspection verification result is passed, a one-time permission identifier is generated. The software startup entry is opened, and hardware interlocking output is enabled. The specific steps for generating the start-up permission signal are as follows:
[0072] Based on the current work order, the pre-inspection test configuration corresponding to the test program model is read. The pre-inspection test configuration includes pre-inspection pilots, pre-inspection excitation parameters, reference response voltage, and allowable voltage deviation. The pre-inspection excitation parameters include excitation voltage and sampling time. When the model comparison result is passed and the product arrival signal is valid, the barcode string is locked. The excitation voltage is applied through the test interface according to the pre-inspection excitation parameters, and the response voltage of each pre-inspection pilot is collected at the sampling time to form pre-inspection response data. The normalized deviation is calculated based on the pre-inspection response data using the following formula: ,in, Indicates normalization bias. Indicates the first The response voltage of each pre-detection pilot. Indicates the first Reference response voltage of each pre-detection pilot, Indicates the first The allowable voltage deviation for each pre-detection pilot is greater than 0. Indicates the pilot number for pre-testing. This represents the total number of pre-detection pilots and is a positive integer. The response voltage, reference response voltage, and allowable voltage deviation are all voltage-dimensional, while the normalized deviation is a dimensionless quantity. When the normalized deviation is not greater than 1, a passing pre-detection verification result is generated. When the normalized deviation is greater than 1, a failing pre-detection verification result is generated, and the software startup entry and hardware interlock output are set to a disabled state. When the pre-detection verification result passes, a one-time permission identifier is generated, the software startup entry is opened, the hardware interlock output is enabled, and a startup permission signal is generated.
[0073] To determine the pilot test, all candidate test points accessible at the current workstation were first calibrated offline. For each product model that could be produced at the same workstation, 30 standard samples that had passed complete functional circuit testing and whose model was confirmed to be correct were selected. The response voltages of each candidate test point were collected under the same excitation conditions and at the same sampling time.
[0074] For the The candidate test point, the first The response voltage of a qualified standard sample is denoted as The reference response voltage is according to Calculate, where, Indicates the first Reference response voltages at candidate test points Indicates the first On the candidate test point, the first The response voltage of a qualified standard sample. Indicates the candidate test point number. Indicates the serial number of the qualified standard sample. This represents the total number of qualified standard samples; in this embodiment, it is taken as... , and All are measured in volts.
[0075] Corresponding sample standard deviation according to Calculate, where, Indicates the first The sample standard deviation of the response voltage at each candidate test point , , , and The meaning is the same as described above. The unit is volt.
[0076] Engineering tolerance This is obtained from the maximum permissible voltage deviation specified for the corresponding test point in the current product's circuit design specifications or approved functional circuit test specifications. It must be greater than 0. Expanded measurement uncertainty Obtained from the equipment calibration report corresponding to the test voltage range, using the expanded measurement uncertainty corresponding to coverage factor 2, and requiring... .when If the existing measurement capabilities are insufficient to support the pre-detection judgment of the test point, then the candidate test point should be excluded; At that time, the allowable voltage deviation is in accordance with Calculate, where, Indicates the first Allowable voltage deviation for each candidate test point Indicates the allowable deviation of the project. Indicates the sample standard deviation. These represent expanded measurement uncertainty, and all four are expressed in volts. Because Therefore, there must be This ensures that the normalization deviation formula does not have the problem of division by zero.
[0077] It is also necessary to verify that the candidate test points have the ability to distinguish the current model from other models produced at the same workstation. Let the current model be A, and another model that can be produced at the same workstation be B. For the same candidate test point... The reference response voltage and allowable voltage deviation for the current model are denoted as follows: and The reference response voltage and allowable voltage deviation for other models are respectively denoted as... and Only when the following conditions are met At that time, it was believed that model A and model B were in the first... The allowed response intervals for each candidate test point do not overlap. Indicates that model A is in the Reference response voltages at candidate test points Indicates that model B is in the Reference response voltages at candidate test points This indicates the allowable voltage deviation of model A at the corresponding test point. This indicates the allowable voltage deviation of model B at the corresponding test point. All four parameters mentioned above are in voltage dimension. Only candidate test points that meet the non-overlapping interval condition for all other models that may be mixed into the current workstation are determined as pre-test pilot points.
[0078] If a single candidate test point cannot distinguish all other models simultaneously, multiple candidate test points are selected to form a pre-detection pilot set. The selection principle is to add candidate test points that meet at least one model distinction condition to the set in descending order of the number of other models they can distinguish, until at least one pre-detection pilot for each other model does not overlap with the allowable response range of the current model. In this embodiment, TP1, TP2, and TP3 are ultimately selected as three pre-detection pilots, therefore the total number of pre-detection pilots is... .
[0079] In this embodiment, the reference response voltages for TP1, TP2, and TP3 are set to 1.20V, 1.80V, and 2.50V, respectively, with corresponding allowable voltage deviations of 0.08V, 0.10V, and 0.12V. These values are determined by combining statistical data from the aforementioned 30 qualified samples, engineering allowable deviations, and equipment measurement uncertainties.
[0080] The pre-test excitation voltage is determined based on the safe power supply range allowed by the product's electrical design. For example, the product design allows an input voltage range of 3.0V to 3.6V; therefore, 3.3V, in the middle of this range, is selected as the pre-test excitation voltage. The test power supply current limit is set to 100mA, which is lower than the 150mA safe current limit specified in the product design, thus ensuring that the pre-test is within the product's normal safe power supply range. The same principle applies to different product models, configuring the excitation voltage and current limits according to their respective design specifications.
[0081] The sampling time was determined through offline stability testing. For 30 qualified standard samples, the response voltages TP1, TP2, and TP3 were collected at 20 ms, 30 ms, 40 ms, 50 ms, and 60 ms after excitation was applied, respectively. For the same sample and the same test point, the difference in response voltage between two adjacent sampling times did not exceed the corresponding allowable voltage deviation. When 10% of the samples meet this condition, and all subsequent responses from the sampling time to 60 milliseconds satisfy this condition, the corresponding test point is considered to have entered the stable interval. Only the earliest common sampling time when all pre-detection pilots of the 30 standard samples have entered the stable interval is used as the pre-detection sampling time. In this embodiment, the earliest common stable sampling time is 50 milliseconds, therefore 50 milliseconds after excitation is determined as the sampling time. 10% is only used for offline determination of the stable sampling time.
[0082] In actual testing, the response voltages of TP1, TP2, and TP3 were read at a sampling time of 50 milliseconds, and the obtained response voltages were used as... , , Then calculate according to the prescribed normalized deviation formula. This formula actually requires that the actual response error of each pre-detection pilot must not exceed its own allowable voltage deviation, because as long as any test point meets the requirement... The corresponding ratio is greater than 1, which is the maximum value. Then it becomes greater than 1.
[0083] Table 2. Example data and calculation results of electrical pre-inspection
[0084] sample TP1 response voltage TP2 response voltage TP3 response voltage TP1 normalization bias TP2 normalized bias TP3 normalization bias E Pre-inspection results P1 1.18V 1.84V 2.47V 0.250 0.400 0.250 0.400 pass P2 1.42V 1.58V 2.20V 2.750 2.200 2.500 2.750 Not approved P3 1.27V 1.89V 2.61V 0.875 0.900 0.917 0.917 pass P4 1.29V 1.90V 2.63V 1.125 1.000 1.083 1.125 Not approved
[0085] As shown in Table 2, the response deviations of the three pre-detection pilots P1 and P3 did not exceed the corresponding allowable voltage deviations, therefore the maximum normalized deviation was no greater than 1 and they were judged as passing; at least one of the pre-detection pilots P2 and P4 exceeded the corresponding allowable voltage deviation, therefore the maximum normalized deviation was greater than 1 and they were judged as failing. The data in the table are consistent with the normalized deviation formula item by item.
[0086] The one-time license identifier is generated by combining the workstation identifier, the product arrival status cycle number, the current work order, and the barcode string. For example, if the workstation identifier is FCT01, the product arrival status cycle number is 000125, the current work order is WO-A001, and the barcode string is A01-260909-0012-0, the corresponding one-time license identifier will be saved as FCT01-000125-WO-A001-A01-260909-0012-0. Since the product arrival status cycle number monotonically increases within this workstation, different product arrival status cycles within the same workstation will not generate the same one-time license identifier. The one-time license identifier does not serve an encryption authentication function; it is only used to establish a one-to-one correspondence between the current product arrival status cycle and a single test authorization.
[0087] The specific steps for obtaining test data by performing functional circuit tests based on the enable signal are as follows:
[0088] The test program is loaded according to the current work order. The start signal is allowed to be input to the start interface of the test program. The locked barcode string is written to the test context, and the barcode string in the test context is prohibited from being modified during the functional circuit test. The test program reads the barcode string from the test context. During the functional circuit test, the test item name, measured value, individual judgment result, test start time, test end time, and workstation identifier are collected to form test data. After all test items are executed, the total judgment result is generated based on the individual judgment results. When the functional circuit test is interrupted, the interruption status, completed test items, and interruption time are written to the test data, and the barcode string remains unchanged.
[0089] The test context is created before the start signal is generated and includes at least the product arrival status cycle number, current work order, test program model, barcode string, one-time license identifier, test start time, and cycle usage status. The barcode string field is set to read-only after being written until the current functional circuit test is completed; any new camera decoding result cannot overwrite the already locked barcode string.
[0090] The functional circuit test procedure follows the existing test procedure corresponding to the current work order, without changing the test items and test limits already established on the original functional circuit test equipment. Upon completion of each test item, immediately record the test item name, measured value, and individual judgment result. The overall judgment result is "pass" if all required test items pass; the overall judgment result is "fail" if any required test item fails.
[0091] In the event of any of the following: emergency stop signal, test power protection, test communication abnormality, or abnormal termination of the test program, the test status is set to aborted. The generated test item data and interruption time are saved, but the aborted record is not converted into a complete pass / fail test record. The current barcode string remains bound to the aborted record to ensure that the specific product identity can be determined during anomaly tracing.
[0092] The specific steps for binding test data with barcode strings to generate test records and uploading them are as follows:
[0093] Create a record object, set the locked barcode string as the unique product identifier of the record object, write the test item name, measurement value, individual judgment result, total judgment result, test start time, test end time, and workstation identifier from the test data into the record object, generate a test record, submit the test record to the manufacturing execution system, complete the persistence of the test record after receiving the acceptance success flag from the manufacturing execution system, retain the test record and output a data upload alarm signal if no acceptance success flag is received, and write the abort status into the test record and retain the test data when the functional circuit test is interrupted, so that the barcode string and the test data maintain a one-to-one traceability relationship.
[0094] The record object is created at the start of functional circuit testing and data is continuously appended during the test. After submitting data through the Manufacturing Execution System (MES) interface, a 5-second wait is required. If a successful reception flag is received within 5 seconds, the local record status is set to "uploaded," and the record number returned by the MES is saved. If no successful reception flag is received within 5 seconds, or if an upload failure flag is explicitly received, the complete test record is written to the local persistent upload queue, and a data upload alarm is output.
[0095] The upload queue is stored in the industrial control computer's local database and includes at least the barcode string, current work order, workstation identifier, test start time, test end time, complete test data, number of uploads, and the time of the most recent upload. The background retransmission program scans the upload queue every 30 seconds and resubmits any unuploaded records using the original data. Each record is automatically retried up to 10 times. After 10 failed attempts, the record is not deleted; its status is set to pending manual confirmation, and a data upload alarm is continuously displayed. Once the network is restored or communication is confirmed to be restored by the operator, the record awaiting manual confirmation can be added back to the upload queue. When resubmitting, the original test record and barcode string are used, and no new test data is generated, thus avoiding the need for recombining barcodes and test results due to network failures.
[0096] The one-time license mark is valid only once during the product arrival status period. The specific steps for resetting the interlock status after the functional circuit testing is completed are as follows:
[0097] Before generating the start-up permission signal, the product arrival signal is detected and the work order configuration is read to obtain the verification work order. When the product arrival signal fails, the one-time permission identifier is cleared and the software start-up entry and hardware interlock output are set to the disabled state. When the verification work order is inconsistent with the current work order, the one-time permission identifier is cleared and the software start-up entry and hardware interlock output are set to the disabled state. After the functional circuit test starts, the one-time permission identifier is marked as used and the software start-up entry and hardware interlock output are restored to the disabled state. The generation of the start-up permission signal is prohibited during the product arrival status cycle. After the functional circuit test is completed, the one-time permission identifier is cleared and the barcode string is unlocked. When the product arrival signal turns to the invalid state, the product arrival status cycle ends. When the product arrival signal turns to the valid state, a new product arrival status cycle is established and the barcode reading state is reset.
[0098] In practice, before generating the start-allow signal, the product arrival signal, after 50 milliseconds of software debouncing, is reread. Simultaneously, the manufacturing execution system or workstation activity order configuration is reread as a verification work order. When the product arrival signal is invalid, the current one-time permission identifier is immediately deleted, the software start status is set to disabled, and the 24V hardware interlock output is set to 0V. If the verification work order identifier is inconsistent with the current work order identifier locked within the current product arrival status cycle, the same processing is performed, and the current product arrival status cycle is marked as an invalid work order change state. Even if the original work order is switched back to this invalid state, the start-allow signal is not regenerated. The product must first be removed to invalidate the product arrival signal before re-clamping the product to establish a new product arrival status cycle.
[0099] Once all verification conditions are met, the software startup entry is set to the enabled state, the hardware interlock output switches from 0V to 24V, and the functional circuit testing equipment accepts the startup request after detecting the enabled startup conditions. After the functional circuit testing program provides feedback on the running status, the current one-time license identifier status is immediately changed from unused to used, and the cycle used status in the current product arrival status cycle is set to used. The software startup entry is then restored to disabled, and the hardware interlock output returns to 0V.
[0100] When the functional circuit test is completed, the one-time license identifier is deleted and the running state lock of the barcode string is released, but the cycle used state is not cleared. As long as the press-in switch remains in the in position, the cycle used state continues to be used, so all subsequent requests to start the cycle are rejected. Only when the press-in switch changes from the in position to the non-in position after debouncing is the current product in-position state cycle ended and the cycle used state cleared. After the next product is re-pressed, a new product in-position state cycle is established, the cycle number is incremented by 1, and the barcode retry count, model comparison result, pre-inspection verification result, and license status are all reinitialized.
[0101] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. An automatic barcode verification and testing method, characterized in that, Includes the following steps: Obtain a product arrival signal, determine the product arrival status cycle based on the product arrival signal, and trigger a fixed industrial camera to capture barcode images; When the barcode image is processed, a barcode string is obtained when consecutive frames are decoded consistently. Get the current work order, call the product model rule of the current work order, and verify the barcode string to obtain the model comparison result; When the model comparison result is passed, the barcode string is locked, the pre-inspection pilot and pre-inspection excitation parameters are determined according to the current work order, the pre-inspection pilot is subjected to electrical pre-inspection according to the pre-inspection excitation parameters, the pre-inspection response data is obtained, the pre-inspection verification result is obtained according to the pre-inspection response data, and when the pre-inspection verification result is passed, a one-time license identifier is generated, the software startup entry is opened and the hardware interlock output is enabled, and a start-up signal is generated. The functional circuit is tested according to the enabled start signal to obtain test data; The test data is bound to the barcode string to generate a test record, which is then uploaded. The one-time license mark is valid once during the product arrival period, and the interlocking status is reset after the functional circuit test is completed.
2. The automatic barcode verification and testing method according to claim 1, characterized in that, The specific steps for obtaining a product arrival signal, determining the product arrival status cycle based on the product arrival signal, and triggering a fixed industrial camera to capture barcode images are as follows: The fixed industrial camera is mounted above the functional circuit test fixture, and an optical lens and auxiliary light source are configured to cover the barcode area in the imaging field of view. The brightness, exposure time, and camera gain of the auxiliary light source are set as imaging parameters. A pressing position switch is set on the functional circuit test fixture. When the pressing position switch switches from the non-positioned state to the positioned state, a product positioning signal is generated and a product positioning state cycle is established. After waiting for a preset stabilization time based on the product positioning signal, the fixed industrial camera is triggered to continuously acquire a preset number of original images. During the continuous acquisition, the imaging parameters remain unchanged. The image corresponding to the barcode area is cropped from each frame of the original image to obtain the barcode image. The product positioning state cycle ends when the pressing position switch returns to the non-positioned state.
3. The automatic barcode verification and testing method according to claim 1, characterized in that, The specific steps for processing the barcode image and obtaining the barcode string when consecutive frames are decoded consistently are as follows: The barcode image is sequentially subjected to grayscale conversion, contrast enhancement, binarization, and distortion correction to obtain a preprocessed image. The barcode recognition image is cropped according to a preset region of interest. The barcode recognition images continuously collected within the product arrival status period are decoded frame by frame to obtain continuous frame decoding results. When the decoding results of each continuous frame are non-empty strings and have the same content, the same string is determined to be the barcode string; otherwise, the barcode decoding is determined to have failed and the barcode string remains in an undetermined state.
4. The automatic barcode verification and testing method according to claim 1, characterized in that, The specific steps for obtaining the current work order, calling the product model rule of the current work order, and verifying the barcode string to obtain the model comparison result are as follows: According to the current work order, the product model rule and the test program model are invoked. Within the product arrival status period, the product model rule and the test program model are locked. The product model rule includes barcode fixed length, barcode prefix, model field start position, model field length, allowed character set, check bit rule, and regular expression. The barcode string is checked for string length, prefix content, character validity, check bit, and regular expression matching status according to the product model rule. The product model field is extracted according to the model field start position and model field length. If all checks pass and the product model field matches the test program model, a successful model comparison result is generated; otherwise, a failed model comparison result is generated.
5. The automatic barcode verification and testing method according to claim 4, characterized in that, When the model comparison result is passed, the barcode string is locked, the pre-inspection pilot and pre-inspection excitation parameters are determined according to the current work order, the pre-inspection pilot is subjected to electrical pre-inspection according to the pre-inspection excitation parameters, pre-inspection response data is obtained, and pre-inspection verification result is obtained based on the pre-inspection response data. When the pre-inspection verification result is passed, a one-time license identifier is generated, the software startup entry is opened and the hardware interlock output is enabled. The specific steps for generating a startup permission signal are as follows: The pre-inspection test configuration corresponding to the test program model is read according to the current work order. The pre-inspection test configuration includes the pre-inspection pilot, the pre-inspection excitation parameters, the reference response voltage, and the allowable voltage deviation. The pre-inspection excitation parameters include the excitation voltage and the sampling time. When the model comparison result is passed and the product arrival signal is valid, the barcode string is locked. The excitation voltage is applied through the test interface according to the pre-inspection excitation parameters, and the response voltage of each pre-inspection pilot is collected at the sampling time to form the pre-inspection response data. The normalized deviation is calculated based on the pre-inspection response data using the following formula: ,in, Indicates normalization bias. Indicates the first The response voltage of the aforementioned pre-detection pilot. Indicates the first The reference response voltage of the pre-detection pilot, Indicates the first The allowable voltage deviation of each of the pre-detection pilots is greater than 0. Indicates the pilot number for pre-testing. The total number of pre-detection pilots is a positive integer. The response voltage, the reference response voltage, and the allowable voltage deviation are all voltage-dimensional, while the normalized deviation is a dimensionless quantity. When the normalized deviation is not greater than 1, a passing pre-detection verification result is generated. When the normalized deviation is greater than 1, a failing pre-detection verification result is generated, and the software startup entry and the hardware interlock output are set to a disabled state. When the pre-detection verification result passes, the one-time permission identifier is generated, the software startup entry is opened, the hardware interlock output is enabled, and the start-up permission signal is generated.
6. The automatic barcode verification and testing method according to claim 1, characterized in that, The specific steps for obtaining test data based on the enabled start signal to perform functional circuit testing are as follows: According to the current work order, the test program is loaded, and the start-up signal is input to the start interface of the test program. The locked barcode string is written into the test context, and modification of the barcode string in the test context is prohibited during the functional circuit test. The test program reads the barcode string from the test context. During the functional circuit test, the test item name, measurement value, single-item judgment result, test start time, test end time, and workstation identifier are collected to form the test data. After all test items are executed, a total judgment result is generated based on the single-item judgment results. When the functional circuit test is interrupted, the interruption status, completed test items, and interruption time are written into the test data, and the barcode string remains unchanged.
7. The automatic barcode verification and testing method according to claim 6, characterized in that, The specific steps for binding the test data with the barcode string to generate test records and uploading them are as follows: A record object is created, and the locked barcode string is set as the unique product identifier of the record object. The test item name, measurement value, single judgment result, total judgment result, test start time, test end time, and workstation identifier from the test data are written into the record object to generate the test record. The test record is submitted to the manufacturing execution system. After receiving a successful reception identifier from the manufacturing execution system, the test record is persisted. If the successful reception identifier is not received, the test record is retained and a data upload alarm signal is output. When the functional circuit test is interrupted, an abort status is written into the test record and the test data is retained, so that the barcode string and the test data maintain a one-to-one traceability relationship.
8. The automatic barcode verification and testing method according to claim 1, characterized in that, The one-time license identifier is valid once during the product arrival status period, and the specific steps for resetting the interlock status after the functional circuit test are completed are as follows: Before generating the start-up permission signal, the product arrival signal is detected and the work order configuration is read to obtain a review work order. When the product arrival signal fails, the one-time license identifier is cleared and the software startup entry and the hardware interlock output are set to the disabled state. When the review work order is inconsistent with the current work order, the one-time license identifier is cleared and the software startup entry and the hardware interlock output are set to the disabled state. After the functional circuit test starts, the one-time license identifier is marked as used and the software startup entry and the hardware interlock output are restored to the disabled state. The start-up permission signal is prohibited from being generated again during the product arrival status cycle. After the functional circuit test ends, the one-time license identifier is cleared and the barcode string is unlocked. When the product arrival signal turns to the invalid state, the product arrival status cycle ends. When the product arrival signal turns to the valid state, a new product arrival status cycle is established and the barcode reading state is reset.
