A code scanning tool and control method thereof
Through the combination of adjustable load-bearing components, code scanning components and auxiliary positioning devices, the problem of high-precision recognition of flexible workpieces is solved, closed-loop control of image code recognition results and process flow is achieved, and recognition stability and consistency are improved.
Patent Information
- Application Number
- CN202510994580.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-07-18
AI Technical Summary
When facing flexible workpieces, existing barcode scanning equipment is prone to code angle deviation, field of view defocus or light interference. The recognition results cannot be controlled in real time, and the recognition results are disconnected from the process flow, which cannot meet the high-precision recognition requirements of flexible workpieces.
The system uses adjustable load-bearing components, code scanning components, trigger devices and auxiliary positioning devices, combined with a control module, to achieve non-pressing positioning of flexible workpieces, visual guidance of the code area and real-time processing of recognition data. The three-dimensional adjustment structure and auxiliary positioning device improve the accuracy of code recognition, and output a process flow permission signal when the recognition result meets the conditions.
It achieves high-precision image code recognition of flexible workpieces, improves the stability and consistency of recognition results, ensures closed-loop control of recognition data and process flow, and reduces the risk of production anomalies caused by misidentification.
Smart Images

Figure CN120493962B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automated identification and intelligent manufacturing control technology, and in particular to a code scanning tool and a control method thereof. Background Art
[0002] Barcode scanning and recognition technology is widely used in industrial automation production, particularly in scenarios involving product information collection, binding relationship confirmation, and process control. Barcode scanning tooling, as an integrated implementation of recognition devices, is often used for static workpiece recognition operations. With the development of flexible manufacturing, some workpieces have flexible and irregular shapes, and the position and posture of their code images change dynamically, placing higher demands on the structure and recognition capabilities of barcode scanning devices.
[0003] Most existing code scanning devices are based on rigid structural designs, and usually use image recognition devices installed at fixed angles in conjunction with static load-bearing platforms to achieve code scanning. When facing flexible workpieces, this type of structure is prone to problems such as code angle deviation, field of view defocus, or light interference, resulting in recognition failure or misreading. Some equipment is not equipped with auxiliary positioning or projection devices, and lacks visual guidance functions for the recognition area. In addition, the existing solutions have limited processing capabilities for acquired images, and do not integrate image optimization operations such as contrast adjustment and tilt correction, which affects the accuracy of code reading. Recognition results are mostly used for uploading and storage, and are not linked to the control logic. Real-time control or blocking of the workpiece flow status cannot be achieved, and there is a decoupling of information judgment and action execution.
[0004] The above technical limitations are particularly evident in the flexible workpiece recognition scenario, especially in applications with high requirements for recognition angle, focus position, image code stability and binding status verification. The existing scanning tooling structure and its supporting recognition control method cannot meet the needs of consistent recognition and process control. It is urgent to propose an adjustable structure, auxiliary positioning and a logical judgment mechanism based on recognition results to achieve effective support. Summary of the Invention
[0005] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention provides a code scanning tool and a control method thereof, which are used to improve the technical problems of unstable code recognition, poor structural adaptability, and the inability of recognition results to directly contribute to process control during the identification process of flexible workpieces.
[0006] The present invention proposes a code scanning tool, which includes: a carrying component for placing a flexible workpiece, and is provided with a structure and a limiting structure for adjusting the position in the planar direction, so as to locate the position of the carrying component without applying a pressing force; a code scanning component, which is installed on the carrying component, and the code scanning component includes an imaging device and a three-dimensional adjustment structure for adjusting its spatial position, and an adjustable angle is formed between the imaging device and the identification code surface on the flexible workpiece; a trigger device, which is used to detect the in-place state of the flexible workpiece and trigger the code scanning operation; an auxiliary positioning device, which is arranged near the code scanning component, and is used to project a visual pattern onto the identification code area to assist the imaging device in focusing and regional positioning; a communication interface, which is used to send identification data to the upper control system; a control module, which is used to judge the binding status of the flexible workpiece according to the identification data, and output a process flow permission signal when it is judged that the binding is completed, otherwise maintain the current workstation status.
[0007] In some examples of the present invention, the planar direction adjustment structure includes a slide rail structure arranged along the X-axis and the Y-axis, and the slide rail structure is equipped with a movable support plate and a spiral fine-tuning knob for achieving precise adjustment of the position of the flexible workpiece.
[0008] In some examples of the present invention, the slide rail structure further includes a limit block and a locking mechanism, wherein the limit block is used to limit the movement limit position of the support plate, and the locking mechanism is used to fix the position of the support plate after adjustment.
[0009] In some examples of the present invention, the adjustable angle is achieved by a universal adjustment support, which includes a ball head connection structure and an angle locking device, and the angle adjustment range is 30° to 60°.
[0010] In some examples of the present invention, the auxiliary positioning device is a laser dot matrix module, which is used to project a cross pattern or a grid pattern, and the center of the projected pattern coincides with the center of the field of view of the imaging device.
[0011] In some examples of the present invention, the control module determines the binding status of the flexible workpiece based on the joint comparison results of the product number, process number and batch number fields in the identification data, and outputs a control signal when the comparison result is that the binding is completed to authorize the flexible workpiece to continue the process flow.
[0012] In some examples of the present invention, the control module further includes a confidence judgment function module, which is used to determine whether to output a process permission signal according to the confidence of the image code analysis of the recognition result.
[0013] The present invention also provides a code scanning control method, which is applied to a code scanning tool with an adjustable code scanning component. The method includes: placing a flexible workpiece on a supporting component provided with a plane adjustment structure and a limiting structure, and realizing non-pressing positioning of the supporting component; adjusting the spatial position of the code scanning component and the orientation of the imaging device to form an adjustable angle between the imaging device and the identification code surface; detecting whether the flexible workpiece is in place, and triggering the code scanning operation after it is in place; projecting a visible pattern to the identification code area through an auxiliary positioning device to assist image focusing and area positioning; collecting images and parsing identification data; sending the identification data to the upper control system; and the control module judging the binding status based on the identification data. If it is judged that the binding is completed, the process flow permission information is output, otherwise the flexible workpiece is kept at the current workstation.
[0014] In some examples of the present invention, the image analysis includes image contrast enhancement and tilt correction steps, the contrast enhancement is based on image histogram equalization, and the tilt correction adopts an affine transformation algorithm.
[0015] In some examples of the present invention, after outputting the transfer permission information, the control module uploads the identification data and binding status results to the upper system to achieve closed-loop management of the scan data and process control.
[0016] Additional aspects and advantages of the present invention will be described in part in the following description and will become apparent from the following description or through practice of the present invention.
[0017] The present invention provides a position structure and a non-pressing limiting structure that can be adjusted along the plane direction on the carrier component, so that the flexible workpiece can be constrained and positioned without applying a mechanical clamping force, thereby avoiding deformation of the image code area due to compression, which affects the imaging clarity. The code scanning component has a three-dimensional adjustable bracket and an adjustable angle feature, so that the imaging device can adjust the framing direction according to the surface posture of the workpiece. The angle adjustment range is set to 30° to 60° to adapt to image code attachment areas with different bending angles, control the matching of the incident light direction and the reflection angle, and reduce image code reflection or image distortion. The auxiliary positioning device provides a visual reference for the imaging device by projecting a calibration pattern on the image code pre-recognition area, which helps to align the imaging field of view and improve the consistency of image focus and recognition area. After the recognition data is uploaded through the communication interface, the control module performs field analysis and outputs a process control signal to realize the logical linkage between code scanning and process scheduling.
[0018] The above structure constructs a closed loop from the physical adaptation of flexible workpieces, image acquisition stability to recognition result process judgment. It can be applied to flexible recognition scenarios where the position of the image code is not fixed and the posture is inconsistent, and can provide status judgment basis in a timely manner after the recognition is completed, thereby solving the problems in the existing technology that the flexible workpiece recognition effect depends on the workpiece posture, the scanning stability is insufficient, and the recognition information is disconnected from the process execution. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 This is a structural diagram of a code scanning tool body provided by the present invention;
[0021] Figure 2 The figure is a schematic structural diagram of a code scanning tool provided according to the present invention.
[0022] Description of reference numerals:
[0023] 000-Scan code tooling;
[0024] 100 - bearing assembly; 110 - limiting structure; 120 - plane direction adjustment structure; 121 - slide rail structure; 122 - movable support plate; 123 - spiral fine-tuning knob; 124 - limiting block; 125 - locking mechanism;
[0025] 200-code scanning component; 210-imaging device; 220-three-dimensional adjustment structure; 230-universal adjustment support;
[0026] 300-trigger device;
[0027] 400-communication interface;
[0028] 500-control module;
[0029] 600-Auxiliary positioning device. DETAILED DESCRIPTION
[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0031] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, features defined as "first" or "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0032] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed, detachable, or integral connections; mechanical or electrical connections; direct or indirect connections through an intermediate medium; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.
[0033] The following describes embodiments of the present invention in detail. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended only to explain the present invention and are not to be construed as limiting the present invention.
[0034] Figure 1 This is a structural diagram of the main body of a code scanning tool 000 provided according to the present invention; Figure 2 This is a structural schematic diagram of a code scanning tool 000 provided according to the present invention.
[0035] See also Figure 1-2In one possible embodiment, the barcode scanning tool 000 includes a carrier assembly 100, a barcode scanning assembly 200, a trigger device 300, an auxiliary positioning device 600, a communication interface 400, and a control module 500. The carrier assembly 100 is used to place a flexible workpiece. Its surface is provided with a planar adjustment structure for both the X-axis and the Y-axis. The structure includes a cross-arranged guide rail and a slide groove, which, in conjunction with a slider and a spiral fine-tuning nut, constitute a manual precision adjustment system. Limit blocks 124 are provided at both ends of the adjustment structure, and magnetic elements are configured at designated stop positions to enhance positioning stability, prevent workpiece displacement deviation, and ensure repeatable positioning accuracy.
[0036] The barcode scanning assembly 200 is mounted on the carrier assembly 100 and consists of an imaging device 210 and a three-dimensional adjustment mechanism. The three-dimensional adjustment structure 220 utilizes a universal ball seat and a locking nut to achieve spatial adjustment of the pitch, yaw, and roll directions of the imaging device 210, ensuring an angle between the optical axis of the imaging device 210 and the surface of the flexible workpiece pattern is within a range of 30° to 60°. A trigger device 300, located near the workpiece placement path and employing either a capacitive proximity sensor or a photoelectric beam sensor, monitors the position of the flexible workpiece and automatically initiates the barcode scanning process upon confirmation.
[0037] The auxiliary positioning device 600 utilizes a laser dot matrix module capable of projecting a cross or grid pattern. The projection center of this pattern is calibrated to align with the center of the imaging device 210's field of view, assisting in rapid focusing and precise positioning of the image code recognition area. After the imaging device 210 captures image data, it is uploaded to the upper control system via the communication interface 400. This interface is compatible with industrial bus protocols such as RS-232, RS-485, EtherCAT, or Modbus, and can be connected to MES or PLC systems via Ethernet, meeting the needs of a variety of industrial automation applications.
[0038] The control module 500 is equipped with an embedded microcontroller system and internally integrates recognition data processing logic. During the code scanning and recognition process, the control module 500 performs a joint comparison based on the product number, process number, batch number and other fields parsed from the recognition code to determine the binding status. The code recognition confidence index is introduced into the judgment mechanism. The confidence returned by the recognition engine is evaluated by multiple factors such as image quality score, code edge clarity, and pattern matching stability. The module sets a confidence judgment threshold (for example, 95%). When the field comparison is consistent and the confidence is not lower than the threshold, the binding is considered complete and a process flow permission signal is output to the upper system. If any condition is not met, the current workstation status is maintained and an abnormal prompt is triggered, prompting the operator to review or re-scan the code.
[0039] This implementation combines mechanical structure, image recognition, and embedded control technologies. Through precise adjustment and non-compression positioning, it addresses the difficulty in identifying patterns on flexible workpieces due to surface deformation. The adjustable imaging angle improves the adaptability and clarity of pattern imagery, while the auxiliary positioning pattern optimizes the focus process and pattern acquisition window selection. The control module 500 incorporates comprehensive field verification and confidence verification logic, ensuring accurate pattern recognition and clear binding status before issuing a transfer authorization signal, reducing the risk of production anomalies caused by misidentification.
[0040] In other options, the communication interface 400 can be expanded with wireless communication modules such as Wi-Fi or ZigBee, depending on the production line deployment environment, to support AGV or mobile workstation communication scenarios. The control module 500 can also integrate a neural network model for adaptive image code recognition in complex backgrounds, supporting online learning and dynamic threshold adjustment to further enhance the robustness of the recognition algorithm and the intelligence of the system.
[0041] See also Figure 1-2 In one possible embodiment, the planar direction adjustment structure 120 is composed of a group of linear slide rail systems arranged orthogonally along the X-axis and the Y-axis, which are used for high-precision adjustment and positioning of flexible workpieces on the horizontal plane. Specifically, the X-axis guide rail is fixed to the bottom plate of the code scanning tool 000, and the Y-axis guide rail is installed on the upper part of the X-axis slider to form a cross structure, thereby realizing the free movement of the workpiece in two directions. Each guide rail adopts a linear guide method of a V-shaped track and a ball slider. The guide rail and the slider are high-precision ground, and the sliding fit clearance is controlled between 5 and 10 microns to ensure low friction and high repeatability during the adjustment process. The entire slide rail system uses an aluminum alloy base as the bearing frame. The rail surface is anodized to improve wear resistance, and the slider components are made of stainless steel to improve structural rigidity.
[0042] A movable pallet 122 is positioned above the slide rails. This pallet is connected to the Y-axis slider via a transition support structure, and standardized fixing holes are provided on the pallet surface for mounting the clamping module for flexible workpieces. To achieve fine-tuning, spiral fine-tuning knobs 123 are provided on the side ends of the X-axis and Y-axis sliders, respectively. These knobs are connected to the sliders via M5 fine-thread screws, offering high adjustment precision. Each rotation corresponds to a pallet displacement of approximately 0.5mm, supporting a submillimeter continuous adjustment range. The slide rail travel range is set to 50mm for the X-axis and 80mm for the Y-axis, meeting the typical needs of adjusting the offset of the drawing code of small and medium-sized flexible workpieces.
[0043] To ensure stable position adjustment and anti-disturbance during process operation, the slide rail structure 121 is designed with a dual locking mechanism. On the one hand, a knob-type clamping block achieves frictional position fixation, providing simple operation and reliable locking. On the other hand, a spring-loaded locking assembly is provided at the bottom of the slider, which cooperates with the equally spaced slots on the sidewalls of the guide rail and automatically engages after adjustment, providing rapid positioning and repeated locking functions. For intelligent production lines or automated work cells, the slide rail can also be expanded to include an electromagnetic locking structure, enabling rapid unlocking and resetting when triggered by a control signal.
[0044] The entire slide rail module is docked with the main tooling platform structure via an array of baseplate positioning holes, offering excellent modularity and removability. The structural interface meets ISO standard module installation specifications. In terms of scope of application, the adjustment platform accommodates flexible workpiece recognition areas up to 300mm × 300mm, with a corresponding code offset adjustment range of ±40mm, making it suitable for a variety of batch flexible material code scanning and data binding scenarios. The slide rails, screws, and pallets involved can all be manufactured using existing CNC machining processes, offering high precision, high consistency, and industrial manufacturability.
[0045] In other embodiments, the linear guide rails can be replaced with a sliding structure combining dovetail grooves and guide posts, depending on the space requirements of the structure, to reduce the overall thickness of the system and simplify the manufacturing process. The fine-tuning mechanism can be expanded to an electric stepper motor-driven screw device, combined with a visual recognition system to achieve automatic correction and positioning. For applications requiring frequent model changes, the support plate can be replaced with a magnetic base combined with a positioning pin limiter, thereby improving model change efficiency while maintaining centering accuracy. The overall solution has excellent precision adjustment capabilities, structural stability, and application adaptability, making it suitable for multi-scenario deployment of precision code scanning processes. In this specification, references to the terms "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples" mean that the specific features, structures, materials, or characteristics described in conjunction with such embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples.
[0046] See also Figure 1-2In one possible embodiment, the slide rail structure 121 is provided with limit blocks 124 and locking mechanisms 125 at both ends of the X-axis and Y-axis directions. The limit blocks 124 are used to define the boundaries of the pallet's movement range, preventing it from exceeding the effective travel range during adjustment, and are structural limiters within the adjustment range. The locking mechanism 125 is used to maintain the pallet's position after positioning is completed, preventing it from displacement or slipping during the code scanning operation, and is a structural retaining device in the static state. Both are clearly distinguished in terms of function and operation stages.
[0047] Limit block 124 is a screw-adjustable metal stopper fixedly mounted in a mounting hole at the end of the guide rail. Its main body is a cylindrical structure with a threaded adjustment rod, and a flexible buffer washer is embedded in the end. During workpiece adjustment, the slider makes mechanical contact when it moves to the preset position of the stopper. The buffer absorbs some of the impact force while preventing the pallet from moving out of the guide rail area. The operator can adjust the extension of the stopper by rotating the screw, thereby setting the maximum adjustment stroke of the X / Y axis. This structure mainly plays a role in the adjustment process, serving as a structural element to limit the operating boundaries of the movable mechanism and does not participate in stable positioning during the code scanning process.
[0048] Locking mechanism 125 utilizes a knob-type side-pressure locking structure, installed on one side of the slider's mating point with the rail. A fine-threaded screw drives a movable ejector block. When the knob is rotated clockwise, the ejector block pushes laterally against the rail surface, generating sufficient friction to prevent further movement of the slider. After the operation is completed, this structure holds the slider stationary, ensuring relatively stable positioning of the workpiece. This structure remains locked during the code scanning process to prevent the pallet from shifting due to vibration or misoperation, which could affect code recognition accuracy.
[0049] In a typical application scenario, after initially placing the flexible workpiece, the operator manually adjusts the support plate according to the scanning assembly 200's viewing position, aligning the image code position using the slide rails. During this adjustment process, the limit stop 124 ensures the slider does not exceed its mechanical limits, while also protecting the guide rails and cables from damage. Once alignment is complete, tighten the locking knob to secure the slider, ensuring image stability and repeatability during scanning.
[0050] In other variations, the limit stop 124 can employ a guide rail-shaped end structure or a spring-loaded buffer stop, both of which are compact and provide energy absorption. The locking mechanism 125 can also be replaced with a preloaded spring locking structure or a magnetic fixing mechanism. The former allows for rapid locking in a quick-adjust state, while the latter is suitable for flexible operating units that require frequent movement. For unmanned operation, an electromagnetic lock or servo brake can be introduced to achieve remotely controlled automatic locking and release, ensuring a balance between structural adaptability and control flexibility.
[0051] In one possible embodiment, the adjustable angle of the imaging device 210 is achieved by a universal adjustment support 230. The support structure consists of a ball head connection mechanism, a clamping and locking device, and an angle marking component. It is used to achieve continuous adjustment of the angle between the imaging device 210 and the surface of the flexible workpiece identification code, and to ensure that the adjustment angle is stable and reliable. The angle adjustment range is 30° to 60°.
[0052] The universal adjustment mount 230 utilizes a dual-ball joint structure, consisting of a primary and secondary ball joint connected in series to form a three-dimensional adjustment mechanism. The primary ball joint is fixed to the support arm, while the secondary ball joint is connected to the imaging device 210. The two ball joints are located in the upper and lower sockets, respectively. Each joint can independently rotate 360°, while a structural limiter limits its maximum rotation angle to prevent excessive displacement and instability. A high-friction silicone rubber ring is placed between the inner wall of the socket and the surface of the ball joint to enhance locking stability and structural damping, preventing the imaging device 210 from shifting from the target viewing angle due to inertial slip during adjustment.
[0053] After adjustment, the included angle is secured by a locking mechanism. The locking mechanism utilizes a rotating ring-press design with a built-in angled wedge. By rotating the external knob to compress the ring, the wedge radially clamps the two ball joints, achieving simultaneous locking of the entire structure. The knob features a coarse-grained grip and angle scale grooves, allowing for quick manual adjustment and angle readings, facilitating rapid repositioning and standardized settings in high-frequency use scenarios.
[0054] In this embodiment, the angle setting range is 30° to 60°, which is based on the image sampling characteristics from the QR code recognition and the need to adapt to the lighting environment in the actual scanning scene. Through experiments, it was found that when the angle between the imaging optical axis and the QR code surface is less than 30°, the light directly hitting the code is likely to produce a high-reflection area, causing the edge contour of the code to be blurred, seriously affecting the clarity and success rate of image recognition; when the angle exceeds 60°, the imaging device 210 needs to be significantly tilted, and its field of view edge is likely to exceed the effective area of the code, especially for flexible surfaces with large curvature. It is more likely to cause distortion. To this end, under the test conditions of relevant standards such as GB / T 18284-2000 and ISO / IEC 15426-2, 100 sets of code scanning examples were evaluated. The results show that 30° to 60° is the optimal angle range that meets the recognition clarity, light protection ability and installation convenience.
[0055] In a typical application, during the initial commissioning phase, the operator selects an initial angle based on the workpiece code orientation and the lighting direction. The angle is then set by adjusting the ball joint support, using the angle scale as a reference to ensure consistency. The locking mechanism 125 locks the angle in under two seconds. For production line changes or adjustments to flexible workpiece types, the angle can be reset simply by loosening the locking ring, making operation efficient and convenient.
[0056] In other embodiments, the universal adjustment mechanism can also employ an arc-guided structure, whereby the imaging device 210 slides and adjusts along an arc-shaped track centered on the sphere, coupled with a rack and pin locking mechanism or a positioning pin mechanism to achieve precise angle setting. This is suitable for highly consistent barcode scanning scenarios requiring precise angle reproduction. Furthermore, the adjustment mechanism can utilize a built-in gyroscope to provide feedback on angle signals, enabling digital angle acquisition and closed-loop control of the system, enabling expanded applications in intelligent focus recognition systems.
[0057] See also Figure 1-2 In one possible embodiment, the auxiliary positioning device 600 uses a laser dot matrix module, which is used to project a visible pattern, specifically a cross pattern or a grid pattern, onto the identification code area on the flexible workpiece, and the center of the pattern is strictly aligned with the center of the field of view of the imaging device 210, so as to assist the imaging device 210 in achieving image focus and rapid positioning of the code area.
[0058] The laser module is an integrated optoelectronic structure containing a red laser (wavelength approximately 650nm), a spot expansion system, and a precision pattern template element. Depending on the recognition task, the module can be set to two modes: cross projection mode, which projects a central crosshair formed by a pair of intersecting perpendicular lines. This is suitable for rapid location of the code center and confirmation of optical axis alignment, primarily for centering calibration. A grid pattern mode projects a regularly spaced 5×5 laser dot matrix, suitable for focusing the recognition area outline, boundary matching, and matching irregular codes. Pattern type can be selected using an electronically controlled switching mechanism or by manually changing the template slice.
[0059] To ensure high consistency between the pattern and the field of view, the laser module is factory calibrated using a laser interferometer during assembly, ensuring that the overlap error between the projection center and the center of the primary optical axis of the imaging device 210 on the imaging plane is less than 0.3mm. This calibration mechanism utilizes a reverse imaging preview comparison method, which loads an auxiliary pattern preview image into the preview screen of the imaging device 210 to ensure that the laser projection center point (e.g., the intersection point) completely coincides with the crosshairs on the camera screen. An automatic calibration algorithm can also be used for software compensation.
[0060] During actual barcode scanning operations, when a flexible workpiece is placed on barcode scanning fixture 000, the laser module is pre-lit, and the projected pattern precisely covers the imaging field of view. The operator simply needs to place the workpiece's code area within the center of the cross or the midline of the grid to roughly center the code. The system can also set judgment rules to refuse to trigger scanning if the position deviation between the pattern and the code exceeds a limit, ensuring that the code is within the valid imaging window when recognition begins. In this way, auxiliary means help the barcode scanning system determine the validity of the code from the perspectives of visual composition and regional boundary recognition, improving the success rate of image acquisition from the source.
[0061] Application data shows that after using this auxiliary positioning module, the first-time recognition success rate has increased from 87% to over 97%, with particularly significant results under complex application conditions such as tilted, warped, or reflective background interference. For example, in flexible FPC binding inspection scenarios, traditional focusing methods have a high recognition failure rate because the image code is often located at the edge and the material is easily bent. The auxiliary pattern can accurately capture the center of the area and guide the optimization of the scanning angle, effectively reducing the misread rate caused by image blur or offset.
[0062] Among other options, the auxiliary pattern can adopt a dynamic projection mechanism and combine with a micro DLP module to realize animated image guidance (such as flashing center point, automatic selection of area outline, etc.), further improving the automatic recognition and adaptation capabilities; it can also achieve dynamic focus adjustment under different thicknesses or curvatures of the workpiece by setting multiple layers of projection depth, which is suitable for image code recognition tasks on three-dimensional surfaces.
[0063] See also Figure 1-2 In one possible implementation, the control module 500 is an embedded microcontroller unit or an industrial-grade programmable logic controller, equipped with internal binding verification logic to process the QR code parsing results obtained by the code scanning component 200 and, based on this, determine whether the flexible workpiece meets the binding requirements of the current process flow. The parsed data fields include three core pieces of information: product number, process number, and batch number. The system has a pre-set process flow database structured in a key-value pair format. Each record corresponds to a valid field combination and is annotated with the process stage and status identification code.
[0064] After receiving the QR code recognition result, the control module 500 first extracts three field values from the recognition data and calls the hash index algorithm to match and search for its records in the database. The comparison logic follows the "joint consistency judgment" strategy: when the product number, process number and batch number are completely matched with a record in the database at the same time, and the record status is marked as "unused" or "valid at the current workstation", it is judged as "binding completed". The system then generates a process flow permission signal and outputs it to the upper system or field controller through the communication interface 400. Common control responses include unlocking the current scanned tool 000, releasing the cylinder clamp, starting the conveying motor or activating the next workstation process equipment.
[0065] If any field is missing, mismatched, or the combination doesn't conform to the expected relationship—for example, if the process number and batch number combination exceeds the database record range or is in transit at another node—the system marks the current recognition status as "abnormal" and maintains the existing workstation lock status. The control module 500 illuminates a red alarm indicator via the status output interface and displays abnormality prompt text on the touch screen. The system also archives the recognized image, parsed field content, and the reason for the comparison failure in a log file, supporting subsequent calls to the quality control system and abnormality statistics.
[0066] To improve recognition stability and tolerance for false positives, the control module 500 supports a secondary assessment of recognition confidence parameters. The system determines the reliability of the recognition result based on the image code analysis confidence value output by the recognition software (e.g., a recognition confidence score ≥ 95%). If the confidence level falls below the set threshold but the field match is successful, the system can perform manual review, prompt for a second recognition, or automatically reject the result based on configuration requirements, preventing misleading process release due to ambiguity.
[0067] The aforementioned binding logic is applicable to traceability tasks for flexible workpieces across multiple production line stages, including assembly, testing, and packaging. Taking the flexible FPC test station as an example, after scanning the QR code for each FPC, the system automatically compares the identification field to see if it has been registered with the current test process, determining whether it has completed the soldering and binding process. If so, it is authorized to be sent to the test stand for functional verification. After the test is complete, the QR code is scanned again to determine whether to proceed to the next bonding step. This mechanism ensures the legitimacy verification and closed-loop status control of the workpiece at each flow node, improving the system's data consistency and process rhythm control efficiency.
[0068] In other embodiments, the field comparison mechanism of control module 500 can also be combined with database field signature verification, timestamp matching, or dynamic workstation token verification to enhance the system's anti-counterfeiting capabilities. The process database can be hosted on a local controller, edge computing node, or MES server, with flexible configuration based on system scale. A permissions management module can also be added to control the setting and modification of field comparison parameters, limiting binding determination rules to authorized users via the user interface or remote platform to ensure system security and data integrity.
[0069] In a possible implementation, the control module 500 further includes a confidence judgment function module, which is configured to determine whether to output a process permission signal based on the confidence level of the image code analysis of the recognition result.
[0070] The confidence assessment module is integrated into the core processing unit within the control module 500 and structurally consists of a code parsing interface, confidence extraction logic, a threshold determination unit, and the decision control module 500. The code parsing interface receives the recognition result data output by the code scanning component 200, which includes the original image of the QR code or barcode, the parsed content, and the confidence score returned by the recognition algorithm. This score is typically generated by comprehensively evaluating multiple parameters such as image quality factor, code contrast, structural integrity, and edge recognition clarity. The score typically ranges from 0 to 100, with higher values indicating more reliable recognition.
[0071] During the system's identification process, after the control module 500 completes the field comparison, the confidence judgment module performs a judgment on the confidence score of this identification task. The system has a preset, adjustable confidence threshold, with a default value of 95 points. If the actual score is greater than or equal to this threshold, and the field comparison result is "binding completed," the system determines that the identification result is credible and outputs a process flow permission signal, allowing the flexible workpiece to proceed to the next process. If the score is lower than the threshold, even if the field comparison is successful, the system will enter the "review required" state, refusing direct release and prompting the operator to rescan or manually confirm.
[0072] The confidence judgment mechanism is particularly suitable for complex situations such as unstable code printing quality, code areas susceptible to contamination, or codes presented on irregular flexible surfaces. In these situations, codes may be partially obscured, warped, or subject to reflections. While traditional field matching can obtain "correct" data, the reliability of the recognition results is low, and direct release carries the risk of misjudgment. By introducing confidence threshold screening, the confidence judgment module establishes a "structural consistency + image quality dual verification" mechanism for data recognition, effectively improving the engineering reliability of recognition results.
[0073] This module also supports dynamic threshold adjustment, optimizing based on production line experience and data feedback. For example, in high-volume, high-consistency scanning scenarios, the threshold can be lowered to 90 to improve cycle efficiency; while for high-value part identification, it can be set above 98 to ensure extreme recognition security. Furthermore, the system supports simultaneous recording of each confidence level judgment result and image archive to a local machine or MES system for quality analysis and traceability.
[0074] In other implementations, the confidence assessment module can incorporate deep learning image models, such as CNN or YOLO networks, to analyze image validity using a multi-feature recognition model for the image code region and adaptively output a confidence score, further improving recognition accuracy in complex scenarios. It can also be integrated with a visual surveillance system to enable a video compensation acquisition mechanism after recognition failures, automatically reacquiring images and performing secondary recognition processing, forming a closed-loop recognition system with automatic error correction.
[0075] In one possible implementation, the code scanning control method is applied to a code scanning tool 000 having an adjustable code scanning component 200. The method is applicable to a non-pressing identification process of a flexible workpiece, and its steps and structure are implemented as follows:
[0076] First, the flexible workpiece is placed on a support assembly 100 equipped with a plane adjustment structure and a position limiting structure 110. Support assembly 100 comprises two sets of linear guide rails, one on the X-axis and the other on the Y-axis, with movable pallets 122 mounted on the rails. The operator can precisely adjust the pallet's position within the horizontal plane using a spiral fine-tuning knob 123 at the end of each set of rails. During adjustment, a limit block 124 restricts the pallet's movement beyond its limits, and a magnetic positioning assembly assists in repeated alignment, ultimately achieving precise positioning without clamping, ensuring the workpiece is stably placed within the recognition field of view.
[0077] Adjusting the spatial position of the code scanning component 200 includes two aspects: the position of the imaging device 210 and the viewing angle. The code scanning component 200 is installed at the end of the retractable bracket through a three-dimensional adjustment structure 220. The double ball joint connection and the gear screw clamping assembly are integrated inside the structure, allowing the imaging device 210 to achieve angle adjustment within the range of ±30° around the pitch and yaw axes. In specific operation, the operator adjusts the setting knob on the side of the bracket to drive the micro gear to rotate the angle adjustment arm. At the same time, the built-in potentiometer records the angle value for system calibration. After adjusting to the desired angle, rotate the locking knob to press the block to complete the stable setting of the angle between the imaging optical axis and the workpiece surface. The permanent angle range is 30° to 60°. The code scanning image distortion model simulation has verified that this range is suitable for most flexible code reflective conditions and composition integrity requirements.
[0078] After the workpiece is placed in place, the photoelectric beam sensor installed on the side of the carrier platform detects the in-place signal, and the system triggers the code scanning component 200 to enter the working state and activates the auxiliary positioning device 600 at the same time. The auxiliary positioning device 600 is a laser dot matrix module. The module and the imaging device 210 are installed on a fixed bracket. Its startup logic is that the code scanning controller receives the "workpiece in place signal" and outputs the laser module start command, projecting a cross or grid pattern to cover the workpiece area. Optical adjustment ensures that the center of the pattern coincides with the axis of the main field of view of the imaging device 210. The operator quickly fine-tunes the position of the pallet according to the outline of the pattern. After confirming that the code is in the center, the code scanning action is triggered.
[0079] After image acquisition, the image processing module performs pre-recognition processing on the code image. This includes image histogram equalization to enhance contrast, affine transformation to correct code tilt, and background texture filtering. Processing time is kept within 50ms to ensure a high system response time. Subsequently, the parsing module extracts information such as the product number, process number, and batch number from the image and generates a corresponding recognition confidence score (maximum 100).
[0080] The identification data and score are instantly transmitted to the control module 500 for evaluation. The module then executes the binding judgment logic (combined field matching + confidence threshold determination), with a total processing time of less than 200ms. If the binding is determined to be complete and the identification score is at least 95% below the system-set threshold (default setting), the control module 500 immediately outputs a "flow allowed" signal, releasing the locking solenoid valve of the current scanning tool 000 and driving the workpiece to the next processing station. Otherwise, the status quo is maintained and a red alarm light illuminates, prompting the operator to review or rescan the code.
[0081] The scanning control process, from workpiece physical positioning, image acquisition, image code recognition, to recognition result decision-making, is completed on the basis of a hardware support structure. All steps are executed and driven by specific structures, avoiding vague functional descriptions and ensuring that the technical implementation path is operational, controllable, and suitable for mass deployment. It is particularly suitable for flexible material process control nodes such as FPC circuit binding, label identification, and medical diaphragm traceability.
[0082] In one possible implementation, to improve the accuracy and robustness of image recognition, image quality preprocessing steps are performed before code parsing. Specifically, these steps include image contrast enhancement and tilt correction. Image contrast enhancement utilizes histogram equalization, while tilt correction is based on an affine transformation algorithm. In some configurations, Hough line detection is used to initially estimate and locate the tilt angle.
[0083] During contrast enhancement, the system first grayscales the image captured by imaging device 210, constructs a grayscale histogram, and calculates its cumulative distribution function (CDF). This remaps the original pixel grayscale to a uniformly distributed output range, thereby enhancing detail in both dark and bright areas of the image. This processing method significantly enhances the edge definition of image codes and effectively addresses image quality degradation in various 2D structured codes, such as QR codes, Data Matrix, and PDF417, under low light, reflections, or background clutter. This method is particularly suitable for codes printed on flexible materials such as PET film and polyimide circuit boards, improving overall recognition quality during the image input phase.
[0084] Image tilt correction primarily addresses the common problem of code deflection during scanning and placement of flexible workpieces. The system uses edge detection algorithms (such as the Canny algorithm) to extract the code boundary, then analyzes the main edge line direction using the Hough transform method to calculate the current code rotation angle. Based on the resulting angle, a two-dimensional affine transformation matrix is constructed. This matrix is used for image rotation, translation, and scaling operations, restoring the tilted code to its standard rectangular coordinate posture. This method is stable for recognizing slightly tilted codes with an offset of ±15° or less, and is particularly suitable for code types with a distinct two-dimensional module distribution structure, such as standard QR Codes and Data Matrix codes. After the affine transformation, the module edges are more regular, facilitating subsequent pixel segmentation and logical decoding.
[0085] This image preprocessing module serves as a standard pre-recognition functional unit in the barcode scanning control system. It connects directly to the image acquisition device front end and automatically invokes the processing flow after image acquisition, without operator intervention. The system processes a single frame with an average latency of less than 80ms, enabling simultaneous operation with industrial barcode scanning systems to meet the demands of medium- and high-speed production lines. Field-tested data shows that this preprocessing process can increase the overall recognition success rate from 86.3% to over 95.8% in scenarios with typical image blur, contrast compression, and angular deviation.
[0086] In other implementations, to accommodate more complex or severely deformed code scenarios, the image preprocessing module can be expanded to include complex image optimization processes such as image sharpening enhancement, edge blur suppression, speckle noise filtering, and background pattern texture removal. Furthermore, deep learning-based image structure restoration models, such as U-Net or STN (Spatial Transformer Networks), can be integrated to achieve complex nonlinear pose correction of code images. This is particularly suitable for code recognition tasks with structural features such as curved surfaces, twists, and bends, enhancing the system's robustness and intelligent adaptability in flexible material scenarios.
[0087] In one possible implementation, after outputting the process transfer permission information, the control module 500 uploads the identification data and binding status results to the host system, implementing a closed-loop information management mechanism between the scanned identification data and the process control status. This upload behavior is not a single result notification, but rather constitutes a full-link feedback control process that runs through scanning, identification, binding, release, and system recording. This supports real-time recording, exception tracing, data exchange, and feedback-driven closed-loop production line control.
[0088] At the implementation level, the control module 500 uses embedded data packaging and reporting logic to generate a structured identification message after determining that the binding status is "completed" and the confidence level meets the threshold requirements. This message is constructed based on industrial interconnection data exchange standards (such as OPC UA, Modbus TCP, HTTP+JSON, or MQTT). The typical field structure includes:
[0089] device_id: The unique device ID of the current scanned tool 000, which is convenient for distinguishing multiple devices in the backend;
[0090] station_id: station identifier, used to distinguish the location where the task occurs;
[0091] sequence_no: identifies the task sequence number, a globally unique serial code generated by the industrial control host;
[0092] timestamp: The time when the task occurred, accurate to milliseconds, used for task sorting and cross-system data reconciliation;
[0093] product_id: the product ID field in the QR code / barcode parsing result;
[0094] process_id: the process step number in the identification field;
[0095] batch_code: production batch information, used for batch traceability and defective product association;
[0096] match_status: Binding status code, where:
[0097] 0 means recognition failed or the field does not match;
[0098] 1 means the fields match and the binding verification passes;
[0099] 2 means the recognition is successful but the confidence level is below the threshold;
[0100] 3 means the recognition is successful but the binding is invalid in the process flow;
[0101] confidence_score: the confidence score of this recognition task (0-100);
[0102] image_ref: the index or storage path of the image captured by this scan (for quality review);
[0103] operator_id (optional): operator identification code or login ID, associated with operation responsibility.
[0104] After the message is collated and formatted within the control module 500, it is uploaded to the host MES system, ERP platform, or SCADA interface server via a wired or wireless industrial communication network. The host system, equipped with a receiving parser, maps the message content into database fields such as the task flow table, identification log table, and binding verification record table, forming a complete scan code identification record chain.
[0105] Taking MES as an example, the system immediately takes corresponding actions based on the match_status field:
[0106] When the status is "1", MES changes the status of the workpiece from "Scanning and Verification" to "Binding Completed" and marks the task as "Transferable";
[0107] When the status is "2", the system enters the "warning" state and can automatically generate a "task requiring review" or push a manual site prompt to scan the code again;
[0108] When the status is "0" or "3", the flow is blocked, the current workstation is frozen, and a pop-up window prompts manual intervention to prevent non-compliant workpieces from flowing into the next process.
[0109] Furthermore, the system establishes an identification link by identifying the timestamp and the task sequence number (sequence_no), enabling cross-site data traceability and multi-station log linkage. If an anomaly occurs in a subsequent process on the production line, quality engineers can use the code field to review the scanned image and initial recognition data to locate the source of the anomaly and confirm whether it is related to front-end recognition failure or misjudgment, further improving closed-loop error correction capabilities.
[0110] In complex flexible manufacturing environments, such as OLED flexible screen coating lines, FPC module assembly lines, or pharmaceutical film material traceability lines, this upload mechanism can be combined with the barcode lifecycle management module to achieve full digital tracking from the product level, batch level, to the image level. The control module 500 also supports connection with an edge gateway, storing identification data in a local SQL database. It also configures an upload cache mechanism and a breakpoint resume strategy to ensure that identification data is not lost in the event of network jitter or interruption of the main system response. Automatic retransmission upon connection restoration ensures a secure closed-loop process data loop.
[0111] In other embodiments, the identification data upload can be combined with a dynamic response mechanism based on a rule engine to provide event-driven feedback on abnormal identification status, such as automatically pausing the pipeline, triggering an alarm instruction, or pushing abnormal sample images to the AI image diagnosis system for secondary analysis and auxiliary judgment, further enhancing the system's automatic judgment and flexible response capabilities under complex conditions.
[0112] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to the embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the claims and their equivalents.
Claims
1. A code scanning tool, characterized in that: include: The carrier assembly is used to place a flexible workpiece and is provided with a plane direction adjustment structure and a limit structure for adjusting the position in the plane direction, so as to locate the position of the carrier assembly without applying a pressing force, the plane direction adjustment structure includes a slide rail structure arranged along the X-axis and the Y-axis, the slide rail structure is used to achieve precise adjustment of the position of the flexible workpiece, the slide rail structure is equipped with a movable support plate, a spiral fine-tuning knob, a limit block and a locking mechanism, the limit block is used to limit the movement limit position of the support plate, and the locking mechanism is used to fix the position of the support plate after adjustment; a code scanning assembly is installed on the carrier assembly, the code scanning assembly includes an imaging device and a three-dimensional adjustment structure for adjusting its spatial position, and an adjustable angle is formed between the imaging device and the identification code surface on the flexible workpiece; a trigger device is used to detect the in-place state of the flexible workpiece and trigger the code scanning operation; an auxiliary positioning device is arranged near the code scanning assembly, and is used to project a visual pattern onto the identification code area to assist the imaging device in focusing and regional positioning; The communication interface is used to send the identification data to the upper control system; the control module is used to determine the binding status of the flexible workpiece based on the identification data, and output a process flow permission signal when it is determined that the binding is completed, otherwise maintain the current workstation status.
2. The code scanning tool according to claim 1, characterized in that: The adjustable angle is achieved through a universal adjustment support, which includes a ball head connection structure and an angle locking device. The angle adjustment range is 30° to 60°.
3. The code scanning tool according to claim 1, characterized in that: The auxiliary positioning device is a laser dot matrix module, which is used to project a cross pattern or a grid pattern, and the center of the projected pattern coincides with the center of the field of view of the imaging device.
4. The code scanning tool according to claim 1, characterized in that: The control module determines the binding status of the flexible workpiece based on the combined comparison result of the product number, process number and batch number fields in the identification data, and outputs a control signal to authorize the flexible workpiece to continue the process flow when the comparison result is binding completion.
5. The code scanning tool according to claim 4, characterized in that: The control module also includes a confidence judgment function module, which is used to determine whether to output a process permission signal based on the confidence of the image code analysis of the recognition result.
6. A code scanning control method, applied to the code scanning tooling according to any one of claims 1 to 5, characterized in that The method includes: placing a flexible workpiece on a carrier assembly provided with a plane adjustment structure and a limiting structure, and realizing non-pressing positioning of the carrier assembly; adjusting the spatial position of the code scanning assembly and the orientation of the imaging device so that an adjustable angle is formed between the imaging device and the identification code surface; detecting whether the flexible workpiece is in place, and triggering a code scanning operation after it is in place; projecting a visible pattern onto the identification code area through an auxiliary positioning device to assist image focusing and area positioning; collecting images and parsing identification data; sending the identification data to the upper control system; the control module determines the binding status based on the identification data, and if it is determined that the binding is completed, outputs process flow permission information, otherwise keeps the flexible workpiece at the current workstation.
7. The code scanning control method according to claim 6, characterized in that: The image analysis includes image contrast enhancement and tilt correction steps, wherein the contrast enhancement is based on image histogram equalization and the tilt correction adopts an affine transformation algorithm.
8. The code scanning control method according to claim 7, characterized in that: After outputting the transfer permission information, the control module uploads the identification data and binding status results to the upper system to achieve closed-loop management of the scan data and process control.
Citation Information
Patent Citations
Electrical element code scanning device and code scanning method
CN117422081A
Automatic equipment of binding of product code
CN208715702U