Visual quality inspection-based automatic production line logistics control method, terminal and storage medium

CN122239656BActive Publication Date: 2026-09-18JIER MACHINE TOOL GROUP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610702032.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-21
Publication Date
2026-09-18
Estimated Expiration
2046-05-21

AI Technical Summary

Technical Problem

[0002]在新能源汽车大型一体化车身压铸零件的自动化加工装配生产线中,传统物流控制模式普遍采用串行作业流程:工件完成加工后统一进入视觉质检环节,质检结束后再对合格件与不合格件分别执行下料、返修或暂存处理,零件加工、视觉检测、人工抽检、返修作业相互独立、依次执行,无法并行开展

Benefits of technology

本发明通过PLC建立与视觉质检系统及工业机器人的双向通信,实现了基于视觉质检结果的实时物流驱动控制,打破了传统串行作业模式的局限,使零件加工、视觉检测、返修处理及抽检工序能够并行协同开展,显著缩短了线体等待时间,提升了生产节拍和设备利用率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122239656B_ABST
    Figure CN122239656B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of industrial production control, and particularly relates to an automatic production line logistics control method based on visual quality inspection, a terminal and a storage medium, which comprises the following steps: based on an established communication connection, a PLC sends a photograph triggering signal to a visual quality inspection system; the visual quality inspection system performs visual detection on a workpiece after processing is completed, and feeds back a detection result to the PLC; the PLC judges a workpiece quality state according to the visual quality inspection result received in step S3; the PLC performs shunting scheduling on unqualified workpieces according to a repair station state signal and a buffer station state signal; and the workpieces are intelligently graded according to a visual detection confidence level, and low-confidence workpieces are automatically triggered for secondary re-inspection, so that the reliability of the quality inspection result is greatly improved while the detection efficiency is ensured, and the misjudgment problem caused by single threshold determination is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of industrial production control technology, specifically relating to an automated production line logistics control method, terminal, and storage medium based on visual quality inspection. Background Technology

[0002] In the automated processing and assembly production line of large integrated die-cast body parts for new energy vehicles, the traditional logistics control mode generally adopts a serial operation process: after the workpiece is processed, it enters the visual quality inspection stage. After the quality inspection is completed, qualified parts and unqualified parts are respectively processed for unloading, rework or temporary storage. Part processing, visual inspection, manual sampling inspection and rework are independent of each other and are executed sequentially, and cannot be carried out in parallel.

[0003] This serial production model has significant technical drawbacks: Firstly, each stage must wait for the previous process to complete before starting, resulting in long idle times for the line equipment and a slow production cycle, making it difficult to meet the high-capacity, high-efficiency production demands of new energy vehicle manufacturers for large die-cast parts. Secondly, defective workpieces cannot be diverted in real time; rework and buffering can only be handled centrally after all quality inspections are completed, leading to low utilization rates of rework and buffering stations and prolonged workpiece turnover cycles. Furthermore, the sampling inspection process is disconnected from normal production and rework processes, making dynamic scheduling based on station occupancy status impossible, further reducing the overall operating efficiency of the line. Summary of the Invention

[0004] To address the aforementioned shortcomings of existing technologies, this invention provides an automated production line logistics control method, terminal, and storage medium based on visual quality inspection.

[0005] In a first aspect, the present invention provides an automated production line logistics control method based on visual quality inspection, comprising: S1. Establish a communication connection between the line PLC and the vision quality inspection system; S2. Establish a communication connection between the line PLC and the industrial robot; S3. Based on the communication connection established in steps S1 and S2, the PLC sends a photo trigger signal to the vision quality inspection system. The vision quality inspection system performs visual inspection on the workpiece after processing and feeds back the inspection results to the PLC. S4. Based on the visual inspection results received in step S3, the PLC determines the quality status of the workpiece. If a qualified signal is received, step S5 is executed; if a non-qualified signal is received, step S6 is executed. S5 and PLC send normal unloading instructions to the industrial robot, controlling the industrial robot to transfer qualified workpieces to the normal unloading station and complete the normal unloading process. S6. The PLC performs diversion scheduling of non-conforming workpieces based on the status signals of the rework station and the buffer station. If the rework station is in a ready state, then step S7 is executed; if the rework station is not ready but the buffer station is in a ready state, then step S8 is executed. S7. The PLC sends a rework instruction to the industrial robot, controlling the industrial robot to transfer the defective workpiece to the rework station for rework. After the rework is completed, the workpiece is returned to the production line from the rework station, and step S9 is executed. S8. The PLC sends a buffer instruction to the industrial robot, controlling the industrial robot to transfer the defective workpiece to the buffer station for temporary storage. When the rework station is in a ready state, the workpiece in the buffer station is transferred to the rework station for rework processing first. After the rework is completed, it returns to the production line and executes step S9. S9. Perform a sampling inspection on the rework parts returned to the production line. After the sampling inspection is qualified, the parts will enter the unloading process.

[0006] Further improvements to this technical solution include step S3, which includes: S31. The visual quality inspection system reads the material reflectivity parameters of the current workpiece. and surface roughness parameters Combined with the historical defect detection rate statistics of the same batch of workpieces Calculate the initial exposure compensation coefficient for the current workpiece. ; S32, The visual quality inspection system uses the initial exposure compensation coefficient obtained in step S31. The exposure time of the industrial camera is pre-adjusted, a pre-capture image is obtained, and the gray-level distribution uniformity index of the pre-capture image is calculated. ; S33. The uniformity index of grayscale distribution calculated by the visual quality inspection system based on step S32. Combined with a preset uniformity threshold For the initial exposure compensation coefficient Dynamic corrections are performed to obtain the final exposure compensation coefficient. Based on this coefficient, a formal visual inspection is performed, and the inspection completion signal and quality judgment signal are uploaded to the PLC; among them, the final exposure compensation coefficient... The calculation formula is: ; In the formula, This is an index of the uniformity of grayscale distribution in the pre-detection image; The preset uniformity threshold; The intensity factor is adjusted for exposure correction. It is the hyperbolic tangent function; This is the initial exposure compensation factor; This is the final exposure compensation coefficient.

[0007] Further improvements to this technical solution include step S4, which includes: S41, PLC receives the inspection completion signal uploaded by the vision quality inspection system in step S33. Qualified signal Unqualified signals and visual detection confidence Among them, the confidence level of visual detection The visual quality inspection system determines the final exposure compensation coefficient. The results were obtained by combining the pre-detection image quality with the overall calculation: ; in, For visual detection confidence; This is the maximum permissible exposure compensation factor; The standard deviation of the uniformity index; This represents the number of suspected defect areas in the pre-detection image; This represents the total number of pixel regions in the pre-detected image; S42, PLC obtains the visual detection confidence level in step S41. Combined with a preset confidence threshold Establish a graded quality judgment model when At that time, directly based on the qualified signal or unqualified signal Execute step S5 or step S6 if the current state is qualified. And unqualified signals If a non-compliant signal is received, proceed to step S5. And qualified signal Then proceed to step S6; when When this occurs, the secondary re-inspection process is triggered and step S43 is executed; S43, PLC-controlled vision quality inspection system with corrected exposure compensation coefficient Re-perform the visual inspection, where To re-inspect the gain coefficient, and use the results of the second re-inspection as the final quality judgment basis, proceed to step S5 or step S6.

[0008] Further improvements to this technical solution include step S6, which includes: S61, PLC collects the current number of workpieces at the rework station in real time. Remaining time for current rework and the current number of workpieces at the cache station. And calculate the estimated readiness time of the rework station. ; S62, the PLC obtains the estimated readiness time based on step S61. Combined with the waiting time sequence of each workpiece in the cache station Establish a comprehensive scheduling cost function based on time cost. : ; In the formula, The waiting time for the i-th workpiece in the buffer station is expressed in seconds. This is to cache the current number of workpieces at the workstation. The decision variable for the rework station diversion is set to {0,1}, where 1 indicates diversion to the rework station. Let the buffer station be the decision variable for traffic diversion, taking values ​​of {0, 1}, where 1 indicates diversion to the buffer station, and the following conditions must be met. ; Rated capacity for the rework station; Rated capacity for the cache station; This is a weighting coefficient for repair time and cost; For rework load balancing weighting coefficients; This is a weighting coefficient for the cost of waiting in the cache. This refers to the load balancing weighting coefficient for the cache. S63, The PLC establishes the comprehensive scheduling cost function based on step S62. Solve for the splitting decision variables that minimize the cost function. and Based on this decision variable, the industrial robot is controlled to perform the diversion and transfer of defective workpieces in step S7 or step S8.

[0009] Further improvements to this technical solution include step S7, which includes: S71. The visual quality inspection system extracts defect features from non-conforming workpieces entering the rework station and obtains defect type vectors. Defect severity matrix Based on the historical rework database, the expected rework success rate of the workpiece is calculated. ; S72, PLC obtains the expected repair success rate from step S71. Combined with the current load rate of the rework station Determine whether a workpiece transfer request from the cache station to the rework station has been triggered. If so... and If so, a transfer request is triggered and step S73 is executed; where This is the threshold for the success rate of repairs. This represents the maximum allowable load rate for the rework station. S73. After the PLC triggers the transfer request in step S72, it calculates the rework urgency index of each workpiece to be transferred in the buffer station. The workpiece with the highest rework urgency index is selected and transferred to the rework station for rework processing in step S7, and the load status of the rework station is updated; whereby the rework urgency index is... The calculation formula is: ; In the formula, The waiting time for the i-th workpiece in the buffer station is expressed in seconds. The maximum allowed waiting time, in seconds; The comprehensive score for the defect severity of the i-th workpiece; This represents the upper limit of the defect severity. This is to cache the current number of workpieces at the workstation. This is the waiting time weighting coefficient; This is a weighting coefficient for the severity of defects; This refers to the queue position weight coefficient; Let be the repair urgency index of the i-th workpiece.

[0010] Further improvements to this technical solution include step S9, which includes: S91. The visual quality inspection system performs a full-surface re-inspection of the workpiece after the rework in step S7, and extracts the quality feature parameter set of the rework area. And calculate the rework quality confidence level of the workpiece. ; S92, PLC obtains the rework quality confidence level based on step S91. Based on the historical rework pass rate of the batch to which this workpiece belongs. And the estimated repair success rate obtained in step S71 Dynamically calculate the sampling depth coefficient of the current sampling station for the workpiece. ; S93, PLC obtains the sampling depth coefficient from step S92. Adjust the resolution of the sampling images acquired by the visual quality inspection system. And the detection accuracy parameters of the sampling algorithm Differentiated in-depth sampling inspections are carried out, and materials are put into the unloading process after passing the sampling inspection.

[0011] Further improvements to this technical solution include step S5, which includes: S51, the PLC determines that it has received a qualified signal based on the workpiece quality status result obtained in step S4. At that time, determine the target workstation coordinates of the industrial robot. And read the real-time occupancy status matrix of each workstation on the current production line. ; S52, The PLC obtains the target workstation coordinates in step S51. and occupancy state matrix Construct a trajectory optimization objective function that includes an obstacle penalty term. The initial trajectory curve was generated using fifth-order polynomial interpolation. ; S53, PLC generates the initial trajectory curve based on step S52. By combining real-time occupancy status changes, the node parameters of the trajectory curve are iteratively optimized to obtain the final execution trajectory. The system controls the industrial robot to transfer qualified workpieces from the vision inspection station to the normal unloading station according to the final execution trajectory, thus completing the normal unloading process.

[0012] Further improvements to this technical solution include: S101. The PLC collects the inspection result data of N consecutive workpieces fed back by the vision quality inspection system in step S3, and constructs a quality defect statistical matrix. And calculate the frequency vector of each defect type. ; S102. The PLC identifies the main defect types based on the defect occurrence frequency vector p obtained in step S101. Based on a pre-defined defect-process parameter correlation mapping table, the set of processing equipment process parameters that need to be adjusted is determined. ; S103, PLC uses the set of process parameters determined in step S102. Calculate the adjustment amount of each process parameter. It also sends process parameter correction instructions to the processing equipment.

[0013] In a second aspect, the present invention provides a terminal, comprising: Processor, memory, among which, This memory is used to store computer programs. The processor is used to retrieve and run the computer program from memory, causing the terminal to perform the terminal method described above.

[0014] Thirdly, the present invention provides a computer storage medium storing instructions that, when executed on a computer, cause the computer to perform the methods described in the above aspects.

[0015] The beneficial effects of this invention are as follows: This invention establishes bidirectional communication between a PLC and a vision inspection system and an industrial robot, enabling real-time logistics drive control based on vision inspection results. This breaks the limitations of the traditional serial operation mode, allowing parts processing, vision inspection, rework, and sampling inspection processes to be carried out in parallel and collaboratively. This significantly shortens line waiting time and improves production cycle time and equipment utilization.

[0016] Through the adaptive exposure compensation mechanism in steps S31 to S33, the visual quality inspection system can dynamically adjust the exposure parameters according to the reflectivity of the workpiece material, surface roughness, and historical detection rate, effectively improving the detection accuracy and image quality stability of workpieces of different batches and surface conditions, and reducing the risk of missed detection and false detection caused by changes in lighting conditions.

[0017] The graded quality judgment model introduced in steps S41 to S43 intelligently grades the workpieces based on the confidence level of visual inspection. It automatically triggers a second re-inspection for workpieces with low confidence, which greatly improves the reliability of quality inspection results while ensuring inspection efficiency and avoids the misjudgment problem caused by a single threshold judgment.

[0018] Steps S61 to S63, based on the comprehensive scheduling cost function of time cost, realize the dynamic optimal diversion of defective workpieces between the rework station and the buffer station, so that the load of each station tends to be balanced, reducing the invalid waiting of workpieces in the buffer area, and significantly shortening the overall circulation cycle.

[0019] Steps S71 to S73 extract defect features and predict rework success rate, and combine the rework urgency index to prioritize cached workpieces, ensuring that workpieces with high severity and long waiting time enter the rework process first, thereby improving the utilization efficiency of rework resources and the production line response speed.

[0020] Steps S91 to S93 dynamically adjust the sampling depth based on the rework quality confidence level and the batch historical pass rate, realizing differentiated quality control. This ensures sufficient verification of high-risk workpieces while avoiding excessive testing of stable batch workpieces, thus saving quality inspection resources.

[0021] Steps S51 to S53, based on the dynamic collision avoidance trajectory planning of the real-time workstation occupancy status, effectively avoid motion interference of industrial robots in multi-workstation collaborative operations, and improve the safety of robot operation and trajectory execution efficiency.

[0022] Steps S101 to S103 construct a quality defect statistical matrix and reverse-correct the processing parameters to form a closed-loop quality control from detection to processing. This can suppress the recurrence of major defect types from the source, continuously reduce the rework rate, and improve the overall processing quality stability. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 This is a schematic flowchart illustrating a method according to an embodiment of the present invention.

[0025] Figure 2 This is a schematic diagram of the structure of a terminal provided in an embodiment of the present invention. Detailed Implementation

[0026] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the specific embodiments. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.

[0028] Figure 1 This is a schematic flowchart illustrating an automated production line logistics control method based on visual quality inspection provided by the present invention. The order of steps in this flowchart can be changed, and some steps can be omitted, depending on different requirements.

[0029] like Figure 1 As shown, the method includes: S1. Establish a communication connection between the line PLC and the vision quality inspection system, configure a fixed IP address, port number and heartbeat detection signal, and define interactive interface signals, wherein the PLC sends a photo trigger signal, a photo allow signal and a reset signal to the vision quality inspection system, and the vision quality inspection system uploads a detection completion signal, a pass signal and a fail signal to the PLC. S2. Establish a communication connection between the line PLC and the industrial robot, and set the interactive interface signals. The PLC receives the industrial robot's home position signal, gripping completion signal, arrival signal and fault alarm signal. The PLC outputs start signal, stop signal, normal feeding instruction, rework instruction and buffer instruction to the industrial robot. S3. Based on the communication connection established in steps S1 and S2, the PLC sends a photo trigger signal to the vision quality inspection system. The vision quality inspection system performs visual inspection on the workpiece after processing and feeds back the inspection results to the PLC. S4. Based on the visual inspection results received in step S3, the PLC determines the quality status of the workpiece. If a qualified signal is received, step S5 is executed; if a non-qualified signal is received, step S6 is executed. S5 and PLC send normal unloading instructions to the industrial robot, controlling the industrial robot to transfer qualified workpieces to the normal unloading station and complete the normal unloading process. S6. The PLC performs diversion scheduling of non-conforming workpieces based on the status signals of the rework station and the buffer station. If the rework station is in a ready state, then step S7 is executed; if the rework station is not ready but the buffer station is in a ready state, then step S8 is executed. S7. The PLC sends a rework instruction to the industrial robot, controlling the industrial robot to transfer the defective workpiece to the rework station for rework. After the rework is completed, the workpiece is returned to the production line from the rework station, and step S9 is executed. S8. The PLC sends a buffer instruction to the industrial robot, controlling the industrial robot to transfer the defective workpiece to the buffer station for temporary storage. When the rework station is in a ready state, the workpiece in the buffer station is transferred to the rework station for rework processing first. After the rework is completed, it returns to the production line and executes step S9. S9. Perform a sampling inspection on the rework parts returned to the production line. After the sampling inspection is qualified, the parts will enter the unloading process.

[0030] To facilitate understanding of the present invention, the following description further illustrates the automated production line logistics control method based on visual quality inspection provided by the present invention, using the principle of the method and the automated production line logistics control process based on visual quality inspection in the embodiments.

[0031] Specifically, the production line PLC (Programmable Logic Controller) uses a Siemens S7-1500 series central processing unit as its control core. This PLC is equipped with a CP 1543-1 Ethernet communication module, connecting to an industrial Ethernet switch via an RJ45 interface. The vision inspection system employs a vision inspection platform based on an industrial personal computer. This platform features an Intel Core i7 processor, 16GB of random access memory, and a 512GB solid-state drive, and integrates an industrial area scan camera with a GigE (Gigabit Ethernet) interface. The physical connection between the production line PLC and the vision inspection system uses shielded Cat5e twisted-pair cable, establishing a star topology TCP / IP (Transmission Control Protocol / Internet Protocol) communication link through an industrial Ethernet switch.

[0032] In the hardware configuration interface of the online PLC, configure the CP 1543-1 Ethernet communication module with a fixed Internet Protocol version 4 (IPv4) address of 192.168.1.10, a subnet mask of 255.255.255.0, and a default gateway of 192.168.1.1; configure the industrial personal computer of the vision quality inspection system with a fixed IPv4 address of 192.168.1.20, a subnet mask of 255.255.255.0, and a default gateway of 192.168.1.1. Both are on the same network segment to ensure direct routing reachability of Internet Protocol data packets.

[0033] The line PLC acts as the client of the transmission control protocol, and the vision inspection system acts as the server. In the vision inspection software of the vision inspection system, the transmission control protocol listening port is enabled, and the port number is set to 50010. In the program block of the line PLC, the TCON instruction is called to establish an active transmission control protocol connection, with the remote port number set to 50010 and the remote address set to 192.168.1.20. The local port number is automatically assigned by the system.

[0034] The interaction interface signals between the line PLC and the vision quality inspection system are carried through transmission control protocol messages, using a custom application layer protocol. The data message structure is as follows: The output signal set sent from the line PLC to the vision quality inspection system includes: (1) Photo capture trigger signal: Boolean value, valid on rising edge, width is 1 line PLC scan cycle, typical value is 10 milliseconds, used to trigger industrial area array camera to perform image acquisition; (2) Photo capture permission signal: Boolean value, active high level, continuously held, indicating that the current station is allowed to perform visual inspection. When the workpiece has not reached the inspection station or the station is in a safety interlock state, this signal is set to low level; (3) Reset signal: Boolean value, valid on rising edge, used to reset the visual inspection algorithm state and image buffer area when the visual quality inspection system is abnormal or changed.

[0035] The input signal set sent from the visual quality inspection system to the production line PLC includes: (1) Detection completion signal: Boolean value, rising edge valid, indicating that the visual inspection process of the current workpiece has been fully executed and the detection results are ready; (2) Qualified signal: Boolean value, active high level, output synchronously with the detection completion signal, indicating that the current workpiece is judged to be qualified by visual inspection; (3) Non-conforming signal: Boolean value, active high level, output synchronously with the detection completion signal, indicating that the current workpiece is determined to be non-conforming by visual inspection and needs to enter the rework or buffer process.

[0036] The data mapping relationship of the above six interactive interface signals in the transmission control protocol message is as follows: the message length is fixed at 16 bytes, byte 0 is the frame header 0xA5, byte 1 is the command code (0x01 indicates the output signal, 0x02 indicates the input signal), bytes 2 to 7 are the output signal status (byte 2 bit 0 is the photo trigger signal, byte 2 bit 1 is the photo allow signal, byte 2 bit 2 is the reset signal, and the remaining bits are reserved), bytes 8 to 13 are the input signal status (byte 8 bit 0 is the detection complete signal, byte 8 bit 1 is the qualified signal, byte 8 bit 2 is the unqualified signal, and the remaining bits are reserved), and bytes 14 to 15 are the cyclic redundancy check (CRC-16).

[0037] For example, the industrial robot used is the FANUC LR Mate 200iD / 4S six-axis articulated industrial robot. This robot is equipped with an R-30iB Mate robot control cabinet, which has a built-in Ethernet communication board (model A05B-2600-J151) supporting EtherNet / IP (Ethernet Industrial Protocol) and standard transmission control protocols / Internet Protocol communication. The physical connection between the line PLC and the industrial robot also uses shielded Cat5e twisted-pair cable, and a star topology transmission control protocol / Internet Protocol communication link is established through the same industrial Ethernet switch.

[0038] In the hardware configuration interface of the online PLC, configure a fixed IPv4 address of 192.168.2.10 and a subnet mask of 255.255.255.0 for the additional CP 1543-1 Ethernet communication module (or an additional port sharing the same module) used for industrial robot communication; configure a fixed IPv4 address of 192.168.2.30 and a subnet mask of 255.255.255.0 for the Ethernet communication board of the industrial robot control cabinet. The online PLC and the industrial robot are on independent network segments to avoid interference with communication traffic from the vision quality inspection system.

[0039] The line PLC acts as the client of the transmission control protocol, while the industrial robot control cabinet acts as the server. In the communication settings interface of the industrial robot control cabinet, enable the socket communication server function, set the port number to 60010, and select Transmission Control Protocol / Internet Protocol (TCP / IP) as the communication protocol type. In the program block of the line PLC, call the TCON instruction to establish an active transmission control protocol connection, setting the remote port number to 60010 and the remote address to 192.168.2.30.

[0040] The socket communication server of the industrial robot control cabinet supports two data message formats: ASCII (American Standard Code for Information Interchange) string format and binary format. This implementation adopts the ASCII string format, and the message ends with a carriage return and line feed character, which is convenient for debugging and troubleshooting. Typical message example: "DO[1]=1\r\n" means setting the digital output signal 1 to a high level, and "DI[1]\r\n" means reading the status of the digital input signal 1 (when the robot control cabinet parses the message and finds that it does not contain the assignment symbol "=", it recognizes it as a read operation and returns the current status value).

[0041] The interaction interface signals between the line PLC and the industrial robot are carried through the aforementioned socket communication messages, which are divided into a set of digital input signals sent by the industrial robot to the line PLC and a set of digital output signals sent by the line PLC to the industrial robot.

[0042] The set of digital input signals sent by the industrial robot to the line PLC includes: (1) Robot home position signal: Boolean value, active high level, generated by comparing the internal position register of the industrial robot with the preset origin coordinates. When the angle deviation of each axis from the six-axis joint coordinates J1 to J6 is less than 0.1 degrees, this signal is set to high level, indicating that the industrial robot has returned to the preset mechanical origin. (2) Grab completion signal: Boolean value, valid on rising edge, generated by the vacuum suction cup pressure sensor on the end effector of the industrial robot. When the vacuum reaches -0.06 MPa and remains stable for 200 milliseconds, the signal is set to high level, indicating that the workpiece has been reliably grasped. (3) Position signal: Boolean value, active high level, generated by comparing the feedback position of the industrial robot servo motor encoder with the target position. When the servo deviation of each axis is less than 0.05 mm, this signal is set to high level, indicating that the industrial robot has reached the target position; (4) Fault alarm signal: Boolean value, active high level, generated by the industrial robot control cabinet after integrating servo alarm, over-torque alarm, collision detection alarm and external emergency stop signal. When this signal is set to high level, the line PLC should immediately interrupt the current process and trigger a safety stop.

[0043] The set of digital output signals sent from the line PLC to the industrial robot includes: (1) Robot start signal: Boolean value, valid on rising edge, used to trigger the industrial robot to execute the taught trajectory program. When the signal is set to high level, the industrial robot resumes operation from the current paused state or starts execution from the first line of the program. (2) Robot stop signal: Boolean value, valid on rising edge, used to pause the trajectory program currently being executed by the industrial robot, maintain the servo enable state of each axis, and facilitate subsequent resumption of operation; (3) Normal unloading instruction: Boolean value, active high level, used in conjunction with robot start signal. When this signal is high level, the industrial robot executes the preset normal unloading trajectory program (program number P1001) to transfer qualified workpieces from the inspection station to the normal unloading station. (4) Rework instruction: Boolean value, active high level, used in conjunction with robot start signal. When this signal is high level, the industrial robot executes the preset rework trajectory program (program number P1002) to transfer the defective workpiece from the inspection station to the rework station. (5) Buffer instruction: Boolean value, active high level, used in conjunction with robot start signal. When the signal is high level, the industrial robot executes the preset buffer trajectory program (program number P1003) to transfer the unqualified workpiece from the inspection station to the buffer station.

[0044] The signal address mapping of the above nine interactive interface signals in the industrial robot control cabinet is as follows: digital input signals DI[1] to DI[4] correspond to the robot home position signal, gripping completion signal, arrival signal, and fault alarm signal, respectively; digital output signals DO[1] to DO[5] correspond to the robot start signal, robot stop signal, normal unloading instruction, rework instruction, and buffer instruction, respectively. The line PLC queries the input signal status through the socket communication message “DI[1]=?\r\n”, and sets the output signal status through “DO[1]=1\r\n” or “DO[1]=0\r\n”.

[0045] The communication interaction between the line PLC and the industrial robot follows a strict timing logic: The line PLC first queries the robot's home position signal to confirm that the industrial robot is at the origin position. Then, based on the quality judgment result of step S4, it sets the corresponding digital output signal (one of the normal feeding instruction, rework instruction, or buffer instruction), and then sets the robot start signal. After receiving the start signal, the industrial robot executes the corresponding trajectory program. During the program execution, the position signal is set sequentially according to the trajectory nodes. After the trajectory program is completed, the robot's home position signal is reset. After the line PLC detects this signal, it resets all digital output signals, completing one complete communication interaction cycle.

[0046] To ensure safety, an output signal interlock logic is set up: only one of the three signals—normal feeding instruction, rework instruction, and buffer instruction—can be in a high-level state at any given time. The line PLC implements hardware-level interlocking in the program through set / reset triggers (SR triggers) to prevent industrial robot motion conflicts caused by multiple instructions being effective simultaneously due to program abnormalities.

[0047] Step S3 includes: S31. The visual quality inspection system reads the material reflectivity parameters of the current workpiece. and surface roughness parameters Combined with the historical defect detection rate statistics of the same batch of workpieces Calculate the initial exposure compensation coefficient for the current workpiece. ; S32, The visual quality inspection system uses the initial exposure compensation coefficient obtained in step S31. The exposure time of the industrial camera is pre-adjusted, a pre-capture image is obtained, and the gray-level distribution uniformity index of the pre-capture image is calculated. ; S33. The uniformity index of grayscale distribution calculated by the visual quality inspection system based on step S32. Combined with a preset uniformity threshold For the initial exposure compensation coefficient Dynamic corrections are performed to obtain the final exposure compensation coefficient. Based on this coefficient, a formal visual inspection is performed, and the inspection completion signal and quality judgment signal are uploaded to the PLC; among them, the final exposure compensation coefficient... The calculation formula is: ; In the formula, This is an index of the uniformity of grayscale distribution in the pre-detection image; The preset uniformity threshold; The intensity factor is adjusted for exposure correction. It is the hyperbolic tangent function; This is the initial exposure compensation factor; This is the final exposure compensation coefficient.

[0048] Furthermore, the initial exposure compensation coefficient The calculation formula is: ; In the formula, The reflectivity of the current workpiece material; The reflectivity of the reference material; This represents the surface roughness of the current workpiece, in μm. The reference surface roughness is expressed in μm. This represents the upper limit of surface roughness, in μm. This represents the lower limit of surface roughness, in μm. This is a statistical value of the defect detection rate for the same batch of workpieces in history; The target defect detection rate; The roughness affects the weighting coefficient; This is the weighting coefficient for historical detection rate deviation.

[0049] Secondly, step S4 includes: S41, PLC receives the inspection completion signal uploaded by the vision quality inspection system in step S33. Qualified signal Unqualified signals and visual detection confidence Among them, the confidence level of visual detection The visual quality inspection system determines the final exposure compensation coefficient. The results were obtained by combining the pre-detection image quality with the overall calculation: ; in, For visual detection confidence; This is the maximum permissible exposure compensation factor; The standard deviation of the uniformity index; This represents the number of suspected defect areas in the pre-detection image; This represents the total number of pixel regions in the pre-detected image; S42, PLC obtains the visual detection confidence level in step S41. Combined with a preset confidence threshold Establish a graded quality judgment model when At that time, directly based on the qualified signal or unqualified signal Execute step S5 or S6 if the current state is qualified. And unqualified signals If a non-compliant signal is received, proceed to step S5. And qualified signal Then proceed to step S6; when When this occurs, the secondary re-inspection process is triggered and step S43 is executed; S43, PLC-controlled vision quality inspection system with corrected exposure compensation coefficient Re-perform the visual inspection, where To re-inspect the gain coefficient, and use the results of the second re-inspection as the final quality judgment basis, proceed to step S5 or step S6.

[0050] When step S42 determines the confidence level of visual detection At this time, the line PLC triggers the secondary re-inspection process. The line PLC sends a secondary re-inspection trigger message to the visual quality inspection system through the transmission control protocol / Internet protocol communication connection established in step S1. This message uses the interactive interface signal format defined in step S1, with a command code of 0x03, and carries the corrected re-inspection exposure compensation coefficient in the data field. The floating-point value (32-bit IEEE 754 single-precision floating-point number, big-endian) is appended to the end of the message with a cyclic redundancy check.

[0051] After receiving the secondary re-inspection trigger message, the visual quality inspection system parses and obtains the re-inspection exposure compensation coefficient. The exposure time of the industrial camera is corrected using this coefficient, and the image acquisition and defect detection algorithm is re-executed on the same workpiece. After the second inspection, the vision quality inspection system uploads the second inspection result message to the line PLC through the same transmission control protocol / Internet Protocol communication connection. The message format is consistent with the input signal set format defined in step S1, but the data field corresponds to the second inspection status: byte 8 bits 0 indicates the second inspection is complete. The 8-bit 1 in the byte indicates that the second re-inspection is passed. The 8th byte with 2 bits indicates a failed second inspection. .

[0052] In the cyclic scanning program, the line PLC receives the secondary re-inspection result message by calling the TRCV instruction, and parses and extracts the secondary re-inspection completion signal. Second re-inspection pass signal and signals indicating failure in the second re-inspection The line PLC first confirms the completion signal of the second re-inspection. This indicates that the second re-inspection process has been completed; subsequently, the final quality judgment logic is executed: If the second re-inspection signal is qualified And the second re-inspection failed. If the line PLC determines that the final quality status of the workpiece after the second re-inspection is qualified, it directly executes step S5, that is, the line PLC sends a normal unloading command to the industrial robot. If the second re-inspection fails, the signal is... And the second re-inspection passed the signal. If the line PLC determines that the final quality status of the workpiece after the second re-inspection is unqualified, it directly executes step S6, that is, the line PLC performs diversion scheduling of unqualified workpieces according to the rework station status signal and the buffer station status signal.

[0053] The production line PLC sets a secondary re-inspection result overwrite flag in its program. This flag is set when the secondary re-inspection process is triggered and reset at the start of step S5 or step S6. When the secondary re-inspection result overwrite flag is set, the production line PLC blocks the pass signal generated by the primary visual inspection in step S41. With non-compliant signals Only based on the second successful re-inspection signal Signal of failure in second re-inspection As the final basis for quality judgment, it ensures that a low-confidence result from a single test will not interfere with subsequent processes.

[0054] If, after a second re-inspection, the signal indicating that the second re-inspection is qualified is simultaneously high or simultaneously low, the line PLC determines that the vision quality inspection system is in communication abnormality, outputs an alarm signal indicating abnormal second re-inspection result, and forcibly determines the workpiece as unqualified, executing step S6 to enter the rework or buffer process, in order to prevent low-confidence workpieces from flowing into the normal unloading process.

[0055] Next, step S5 includes: S51, the PLC determines that it has received a qualified signal based on the workpiece quality status result obtained in step S4. At that time, determine the target workstation coordinates of the industrial robot. And read the real-time occupancy status matrix of each workstation on the current production line. ; S52, The PLC obtains the target workstation coordinates in step S51. and occupancy state matrix Construct a trajectory optimization objective function that includes an obstacle penalty term. The initial trajectory curve was generated using fifth-order polynomial interpolation. ; S53, PLC generates the initial trajectory curve based on step S52. By combining real-time occupancy status changes, the node parameters of the trajectory curve are iteratively optimized to obtain the final execution trajectory. The system controls the industrial robot to transfer qualified workpieces from the vision inspection station to the normal unloading station according to the final execution trajectory, thus completing the normal unloading process.

[0056] Furthermore, the objective function for trajectory optimization of the obstacle penalty term... The calculation formula is: ; Final execution trajectory The calculation formula is: ; In the formula, Let the target workstation coordinate vector be... The unit is mm; Let be the workstation occupancy rate state matrix at time t. , where K is the number of obstacles; Let be the position vector of the robot's end effector trajectory at time t. The unit is mm; This is the velocity vector of the robot's end effector, in mm / s. This is the acceleration vector of the robot's end effector, in units of... ; The total time of the trajectory motion is expressed in seconds. This is the speed smoothing weighting coefficient, in units of... ; The penalty intensity coefficient for the k-th obstacle, in units of ; Let be the position vector of the k-th obstacle at time t, in mm; Here is the distance regularization constant, in units of ; The initial trajectory generated by fifth-order polynomial interpolation, in mm; Let j be the basis function of the j-th quintic B-spline; is the correction amount for the j-th trajectory control point, in mm; M is the number of trajectory control points. The final execution trajectory is shown in mm.

[0057] In addition, step S6 includes: S61, PLC collects the current number of workpieces at the rework station in real time. Remaining time for current rework and the current number of workpieces at the cache station. And calculate the estimated readiness time of the rework station. ; S62, the PLC obtains the estimated readiness time based on step S61. Combined with the waiting time sequence of each workpiece in the cache station Establish a comprehensive scheduling cost function based on time cost. : ; In the formula, The waiting time for the i-th workpiece in the buffer station is expressed in seconds. This is to cache the current number of workpieces at the workstation. The decision variable for the rework station diversion is set to {0,1}, where 1 indicates diversion to the rework station. Let the buffer station be the decision variable for traffic diversion, taking values ​​of {0, 1}, where 1 indicates diversion to the buffer station, and the following conditions must be met. ; Rated capacity for the rework station; Rated capacity for the cache station; This is a weighting coefficient for repair time and cost; For rework load balancing weighting coefficients; This is a weighting coefficient for the cost of waiting in the cache. This refers to the load balancing weighting coefficient for the cache. S63, The PLC establishes the comprehensive scheduling cost function based on step S62. Solve for the splitting decision variables that minimize the cost function. and Based on this decision variable, the industrial robot is controlled to perform the diversion and transfer of defective workpieces in step S7 or step S8.

[0058] Furthermore, the estimated readiness time for rework stations. The calculation formula is: ; In the formula, The remaining time for the current rework operation at the rework station, in seconds; This represents the current number of workpieces at the rework station. The average rework time per piece at the rework station is expressed in seconds (s). This refers to the number of parallel operation channels at the rework station; The estimated readiness time for the rework station is in seconds (s).

[0059] Then, step S7 includes: S71. The visual quality inspection system extracts defect features from non-conforming workpieces entering the rework station and obtains defect type vectors. Defect severity matrix Based on the historical rework database, the expected rework success rate of the workpiece is calculated. ; S72, PLC obtains the expected repair success rate from step S71. Combined with the current load rate of the rework station Determine whether a workpiece transfer request from the cache station to the rework station has been triggered. If so... and If so, a transfer request is triggered and step S73 is executed; where This is the threshold for the success rate of repairs. This represents the maximum allowable load rate for the rework station. S73. After the PLC triggers the transfer request in step S72, it calculates the rework urgency index of each workpiece to be transferred in the buffer station. The workpiece with the highest rework urgency index is selected and transferred to the rework station for rework processing in step S7, and the load status of the rework station is updated; whereby the rework urgency index is... The calculation formula is: ; In the formula, The waiting time for the i-th workpiece in the buffer station is expressed in seconds. The maximum allowed waiting time, in seconds; The comprehensive score for the defect severity of the i-th workpiece; This represents the upper limit of the defect severity. This is to cache the current number of workpieces at the workstation. This is the waiting time weighting coefficient; This is a weighting coefficient for the severity of defects; This refers to the queue position weight coefficient; Let be the repair urgency index of the i-th workpiece.

[0060] Furthermore, the expected repair success rate The calculation formula is: ; In the formula, d is the defect type vector. m is the total number of defect types; Let J be the characteristic value of the j-th type of defect; This is a matrix representing the severity of defects. ; w is the coupling severity coefficient between the j-th type defect and the k-th type defect; w is the defect type weight vector. ; b is the defect coupling weight coefficient; b is the bias term. Use the Sigmoid activation function; To estimate the success rate of repairs; This is the threshold for the success rate of repairs. The current load rate of the rework station; This represents the maximum allowable load rate for the rework station.

[0061] The buffer station is located between the rework station and the vision inspection station. The buffer station is equipped with a buffer rack, which uses an aluminum alloy frame structure and has three buffer layers. Each buffer layer has four buffer compartments evenly arranged horizontally, for a total of twelve buffer compartments. Each buffer compartment is equipped with an independent presence / absence detection sensor, which is an Omron E3F-TP11 through-beam photoelectric sensor with a detection distance of 500 mm and a PNP (Positive-Negative-Positive) open-collector output, directly connected to the digital input module of the line PLC. Each buffer compartment is also equipped with a positioning stop, 50 mm high, to limit the horizontal displacement of the workpiece within the buffer compartment, ensuring accurate gripping by the vacuum suction cup of the industrial robot's end effector.

[0062] The buffer station is also equipped with a status indicator light, which uses a tri-color LED (Light Emitting Diode) tower light. The colors are green, yellow, and red. Green indicates that the buffer station is in a ready state, yellow indicates that the buffer station is occupied, and red indicates that the buffer station is in a fault state. The status indicator light is driven by the digital output module of the line PLC and controlled by a 24-volt DC signal.

[0063] When the result of the diversion scheduling in step S6 is that the rework station is not ready and the buffer station is ready, the line PLC executes step S8. The line PLC first queries the status of the socket communication connection established in step S2 with the industrial robot to confirm that the transmission control protocol / Internet protocol communication link is normal. The line PLC sends an ASCII (American Standard Code for Information Interchange) string message "DO[5]=1\r\n" to the socket communication server of the industrial robot control cabinet by calling the TSEND instruction, that is, the digital output signal DO[5] corresponding to the buffer instruction is set to a high level.

[0064] Simultaneously with sending the buffer instruction, the digital output signal DO[1] corresponding to the robot start signal set by the line PLC is at a high level, and the ASCII string message is: "DO[1]=1\r\n". After receiving the above two signals, the industrial robot control cabinet parses the program number P1003 corresponding to the buffer instruction and calls the preset buffer trajectory program (program number P1003). The buffer trajectory program is pre-programmed by the industrial robot online teaching method and includes the following trajectory segments: The first segment is the workpiece handling trajectory segment: The industrial robot starts from its current position and moves along linear interpolation (L command) to the workpiece gripping point at the vision inspection station. The coordinates of the gripping point are (X=1250.00, Y=-300.00, Z=450.00, unit: mm, coordinate system: World Coordinate System, WCS), the moving speed is 2000 mm / s, and the positioning accuracy is ±0.05 mm. After reaching the gripping point, the industrial robot controls the vacuum generator to start via digital output signal. After the vacuum level reaches -0.06 MPa, the gripping completion signal is set, and the industrial robot confirms that the workpiece has been reliably gripped.

[0065] The second segment is the transfer trajectory segment: The industrial robot, carrying the workpiece, starts from the gripping point of the vision inspection station, moves along the circular interpolation (C command) path, passing through an intermediate transition point (X=1100.00, Y=-150.00, Z=600.00), to the placement point of the buffer station. The coordinates of the placement point are dynamically calculated based on the current available space in the buffer station. The calculation formula is as follows: ; In the formula, The coordinate vector of the workstation placement point. The unit is millimeters; The reference coordinates for the first compartment at the bottom of the buffer rack are as follows: The unit is millimeters; The target cache layer index. ; This is the interlayer spacing vector. The unit is millimeters; The target cache location number. ; This is the position spacing vector. The unit is millimeters.

[0066] The third segment is the workpiece placement trajectory segment: After the industrial robot reaches the workpiece placement point at the buffer station, it descends at a low speed (e.g., 50 mm / s) until the bottom surface of the workpiece contacts the positioning block of the buffer compartment. Contact detection is achieved by the torque feedback of the servo motor of the six-axis articulated industrial robot. When the torque in the Z-axis direction exceeds the preset threshold of 2.5 N·m, it is determined that the workpiece has been placed in place. The industrial robot controls the vacuum generator to stop, the vacuum suction cup releases the workpiece, and the gripping completion signal is reset. The industrial robot returns to its original position along linear interpolation, the buffer trajectory program is completed, and the robot's original position signal is set.

[0067] The line PLC periodically queries the status of the digital input signal DI[1] (robot home position signal) to confirm that the buffer trajectory program has been executed. Then, it sends ASCII string messages: "DO[5]=0\r\n" and "DO[1]=0\r\n" to reset the buffer instruction and robot start signal. At the same time, the line PLC sets the status of the detection sensor corresponding to the target buffer position to occupied and updates the current number of workpieces at the buffer station. , Increment the value by 1 and record the timestamp of the workpiece being added to the cache. To the First-In-First-Out (FIFO) queue data structure.

[0068] The core function of the buffer station is to temporarily store defective workpieces and transfer them to the rework station first when the rework station is ready. This priority transfer mechanism is continuously monitored and executed by the cyclic scanning program of the line PLC.

[0069] The condition for determining the ready state of the rework station is: the current number of workpieces at the rework station. Furthermore, the rework station operates in parallel channels. At least one channel must be idle, and the equipment to be repaired (including CNC machining centers and laser welding machines) must have been preheated and its temperature must be stable within the process range. These conditions are comprehensively represented by the rework station readiness status signal. This signal is generated by the line PLC based on the channel occupancy signal collected by the rework station's digital input module and the equipment temperature analog input signal, after logical operations. The rework station readiness status signal is then stored in the line PLC's internal memory location M100.0.

[0070] The line PLC executes the following priority transfer logic within each scan cycle (typically 10 milliseconds): The first step is for the line PLC to read the status signal M100.0 of the rework station. If M100.0 is low (i.e., the rework station is not ready), the transfer process is skipped and monitoring continues; if M100.0 is high (i.e., the rework station is ready), the second step is executed.

[0071] The second step involves the line PLC querying the first-in-first-out queue data structure, reading the earliest entered workpiece record from the buffer, and obtaining the corresponding buffer slot coordinates for that workpiece. and cache timestamp The production line PLC calculates the buffer waiting time for the workpiece. ,in The current time of the line PLC system is provided by the real-time clock module of the line PLC.

[0072] The third step involves the line PLC sending a transfer instruction to the industrial robot. This transfer instruction is not an independent digital output signal, but is achieved through a set-back instruction (digital output signal DO[4]) and a robot start signal (digital output signal DO[1]). At the same time, the line PLC sends the target coordinate information to the industrial robot control cabinet via socket communication messages. The specific message sequence is as follows: Message 1: "DO[4]=1\r\n" (Setting the repair instruction) Message 2: "DO[1]=1\r\n" (Setting the robot start signal) Message 3: "PR

[10] =P_place\r\n" (Writing the cache position coordinates into the industrial robot position register PR

[10] ).

[0073] The industrial robot control cabinet parses the above message and calls the preset cache to rework transfer trajectory program (program number P1004). The difference between this trajectory program and the rework trajectory program (program number P1002) in step S7 is that the pick-up point coordinates are not the visual inspection station gripping point, but the cache bin coordinates dynamically specified by the position register PR

[10] ; the placement point coordinates are the rework station placement point (X=600.00, Y=500.00, Z=350.00). After the trajectory program is executed, the line PLC resets the rework instruction and robot start signal, and updates the current number of workpieces in the cache station. Decrease by 1 and update the current number of workpieces at the rework station. Increment by 1 and remove the workpiece record from the first-in-first-out queue.

[0074] After the workpiece in the rework station has been reworked by the rework equipment, the rework station operator or automatic detection equipment confirms that the rework is completed and triggers the rework completion signal. The rework completion signal is connected to the digital input module DI

[10] of the line PLC. After the line PLC detects the rising edge of the signal, it executes the process of returning the reworked workpiece to the production line.

[0075] The line PLC first queries the current number of workpieces at the rework station. ,like Then, a return-to-production-line instruction is sent to the industrial robot. This instruction is implemented by setting the normal unloading instruction (digital output signal DO[3]) and the robot start signal (digital output signal DO[1]), and the target position is specified as the sampling inspection station. The industrial robot executes the preset rework to sampling inspection trajectory program (program number P1005), transfers the reworked workpiece from the rework station to the sampling inspection station, and executes step S9.

[0076] If the current number of workpieces at the rework station And the current number of workpieces at the cache station Then the line PLC triggers the above priority transfer mechanism, transferring the earliest workpiece in the buffer station to the rework station. After the workpiece is reworked, it will also execute the return to the production line process and enter step S9.

[0077] During the execution of step S8, the production line PLC is equipped with multiple levels of safety interlocks: The first level is the compartment occupancy interlock: Before sending a workpiece placement command to the target buffer compartment, the line PLC must confirm that the corresponding detection sensor for that compartment is in a low-level state (i.e., no workpiece). Otherwise, it skips that compartment and checks the next available compartment. If all twelve buffer compartments are occupied, the line PLC outputs a buffer compartment full alarm signal and prompts the operator for manual intervention through the human-machine interface.

[0078] The second level is a transfer conflict interlock: when the rework station's ready status signal M100.0 is high, and the current number of workpieces at the buffer station... If step S6 simultaneously determines that a new defective workpiece needs to be diverted to the rework station, the line PLC will prioritize the transfer from the buffer station to the rework station. The new defective workpiece will enter the buffer station to wait, ensuring that the rework station is not overloaded due to receiving multiple workpieces in parallel.

[0079] The third level is communication timeout interlock: After the line PLC sends the buffer instruction or transfer instruction, it starts a 10000 millisecond timer T0. If the robot's original position signal is not received before the timer expires, it is determined that the industrial robot is abnormal. The line PLC sends the robot stop signal (digital output signal DO[2]) at a high level, and the ASCII string message is: "DO[2]=1\r\n", which forcibly stops the current movement of the industrial robot and outputs an industrial robot execution abnormal alarm signal.

[0080] In addition, step S9 includes: S91. The visual quality inspection system performs a full-surface re-inspection of the workpiece after the rework in step S7, and extracts the quality feature parameter set of the rework area. And calculate the rework quality confidence level of the workpiece. ; S92, PLC obtains the rework quality confidence level based on step S91. Based on the historical rework pass rate of the batch to which this workpiece belongs. And the estimated repair success rate obtained in step S71 Dynamically calculate the sampling depth coefficient of the current sampling station for the workpiece. ; S93, PLC obtains the sampling depth coefficient from step S92. Adjust the resolution of the sampling images acquired by the visual quality inspection system. And the detection accuracy parameters of the sampling algorithm Differentiated in-depth sampling inspections are carried out, and materials are put into the unloading process after passing the sampling inspection.

[0081] Furthermore, the confidence level of the repair quality The calculation formula is: ; Sampling depth coefficient The calculation formula is: ; In the formula, The measured value of the i-th quality characteristic parameter, with the unit depending on the parameter type; This is the lower limit value of the i-th quality characteristic parameter, in units of and . same; This represents the upper limit value of the i-th quality characteristic parameter, with units equal to or greater than 1. same; This is the reference value for the i-th quality characteristic parameter, with units equal to... same; Let be the allowable deviation coefficient for the i-th quality characteristic parameter; is the nonlinear adjustment index of the i-th quality characteristic parameter; n is the total number of quality characteristic parameters; For the confidence level of the repair quality; This represents the historical rework pass rate for the current batch. The target is a high rework pass rate; The expected repair success rate obtained in step S71; The basic sampling depth coefficient; The weighting of the confidence level for rework quality is determined by its impact. Weighting of batch pass rate deviation; The weighting is determined by the expected success rate of repairs. This represents the sampling depth coefficient.

[0082] In addition, the method also includes: S101. The PLC collects the inspection result data of N consecutive workpieces fed back by the vision quality inspection system in step S3, and constructs a quality defect statistical matrix. And calculate the frequency vector of each defect type. ; S102. The PLC identifies the main defect types based on the defect occurrence frequency vector p obtained in step S101. Based on a pre-defined defect-process parameter correlation mapping table, the set of processing equipment process parameters that need to be adjusted is determined. ; S103, PLC uses the set of process parameters determined in step S102. Calculate the adjustment amount of each process parameter. It also sends process parameter correction instructions to the processing equipment.

[0083] Furthermore, the formula for calculating the defect occurrence frequency vector p is: ; Process parameter adjustment amount The calculation formula is: ; In the formula, N is the number of workpieces counted continuously; This is an indicator variable for whether the i-th workpiece has a j-th type of defect, and its value is {0,1}; ν represents the defect signal for the i-th workpiece, with a value of {0,1}; ν is the defect rate amplification factor. Let be the frequency of occurrence of the j-th type of defect; Identify the main defect type; The frequency of occurrence of the main defect types; The frequency threshold for the j-th type of defect; This represents the upper limit of the defect frequency. This is the current set value for the j-th process parameter; Let j be the optimal target value of the j-th process parameter, with units of 1 and 2. same; The allowable adjustment range for the j-th process parameter is given by the unit . same; The maximum allowable adjustment amount for the j-th process parameter, in units of 1 and 2. same; The adjustment amount for the j-th process parameter, in units of and . same.

[0084] The figure is a schematic diagram of the structure of a terminal 300 provided in an embodiment of the present invention. The terminal 300 can be used to execute the automated production line logistics control method based on visual quality inspection provided in an embodiment of the present invention.

[0085] The terminal 300 may include a processor 310, a memory 320, and a communication module 330. These components communicate via one or more buses. Those skilled in the art will understand that the server structure shown in the figure does not constitute a limitation of the present invention. It may be a bus topology or a star topology, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0086] The memory 320 can be used to store the execution instructions of the processor 310. The memory 320 can be implemented by any type of volatile or non-volatile memory terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. When the execution instructions in the memory 320 are executed by the processor 310, the terminal 300 is able to perform some or all of the steps in the above method embodiments.

[0087] The processor 310 serves as the control center of the storage terminal, connecting various parts of the electronic terminal via various interfaces and lines. It executes software programs and / or modules stored in the memory 320, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of integrated circuits (ICs), such as a single packaged IC or multiple packaged ICs with the same or different functions connected together. For example, the processor 310 may consist only of a central processing unit (CPU). In this embodiment of the invention, the CPU may have a single processing core or include multiple processing cores.

[0088] The communication module 330 is used to establish a communication channel, enabling the storage terminal to communicate with other terminals. It receives user data sent by other terminals or sends user data to other terminals.

[0089] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, which, when executed, may include some or all of the steps provided in the embodiments of the present invention. The storage medium may be a magnetic disk, an optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0090] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium such as a USB flash drive, mobile hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, or other media capable of storing program code. It includes several instructions to cause a computer terminal (which may be a personal computer, server, or a second terminal, network terminal, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0091] Although the present invention has been described in detail with reference to the accompanying drawings and preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made to the embodiments of the present invention by those skilled in the art without departing from the spirit and essence of the invention, and such modifications or substitutions should all be within the scope of the present invention. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should also be covered within the protection scope of the present invention.

Claims

1. A method for automated production line logistics control based on visual quality inspection, characterized in that, include: S1. Establish a communication connection between the line PLC and the vision quality inspection system; S2. Establish a communication connection between the line PLC and the industrial robot; S3. Based on the communication connection established in steps S1 and S2, the PLC sends a photo trigger signal to the vision quality inspection system. The vision quality inspection system performs visual inspection on the workpiece after processing and feeds back the inspection results to the PLC. S4. Based on the visual inspection results received in step S3, the PLC determines the quality status of the workpiece. If a qualified signal is received, step S5 is executed; if a non-qualified signal is received, step S6 is executed. S5 and PLC send normal unloading instructions to the industrial robot, controlling the industrial robot to transfer qualified workpieces to the normal unloading station and complete the normal unloading process. S6. The PLC performs diversion scheduling for defective workpieces based on the rework station status signal and the buffer station status signal. If the rework station is in a ready state, step S7 is executed; if the rework station is not ready but the buffer station is in a ready state, step S8 is executed. Step S6 includes: S61, PLC collects the current number of workpieces at the rework station in real time. Remaining time for current rework and the current number of workpieces at the cache station. And calculate the estimated readiness time of the rework station. ; S62, PLC obtains the estimated ready time based on step S61. Combined with the waiting time sequence of each workpiece in the cache station Establish a comprehensive scheduling cost function based on time cost. : ; In the formula, The waiting time for the i-th workpiece in the buffer station is expressed in seconds. This is to cache the current number of workpieces at the workstation. The decision variable for the rework station is set to {0,1}, where 1 indicates that the rework station is assigned to the rework station. Let the buffer station be the decision variable for traffic diversion, taking values ​​of {0, 1}, where 1 indicates diversion to the buffer station, and the following conditions must be met. ; Rated capacity for the rework station; Rated capacity for the cache station; This is a weighting coefficient for repair time and cost; For rework load balancing weighting coefficients; This is a weighting coefficient for the cost of waiting in the cache. This refers to the load balancing weighting coefficient for the cache. S63, The PLC establishes the comprehensive scheduling cost function based on step S62. Solve for the splitting decision variables that minimize the cost function. and Based on this decision variable, the industrial robot is controlled to perform the diversion and transfer of non-conforming workpieces in step S7 or step S8. S7. The PLC sends a rework instruction to the industrial robot, controlling the industrial robot to transfer the defective workpiece to the rework station for rework. After the rework is completed, the workpiece is returned to the production line from the rework station, and step S9 is executed. S8. The PLC sends a buffer instruction to the industrial robot, controlling the industrial robot to transfer the defective workpiece to the buffer station for temporary storage. When the rework station is in a ready state, the workpiece in the buffer station is transferred to the rework station for rework processing first. After the rework is completed, it returns to the production line and executes step S9. S9. Perform a sampling inspection on the rework parts returned to the production line. After the sampling inspection is qualified, the parts will enter the unloading process.

2. The automated production line logistics control method based on visual quality inspection according to claim 1, characterized in that, Step S3 includes: S31. The visual quality inspection system reads the material reflectivity parameters of the current workpiece. and surface roughness parameters Combined with the historical defect detection rate statistics of the same batch of workpieces Calculate the initial exposure compensation coefficient for the current workpiece. ; S32, The visual quality inspection system uses the initial exposure compensation coefficient obtained in step S31. The exposure time of the industrial camera is pre-adjusted, a pre-capture image is obtained, and the gray-level distribution uniformity index of the pre-capture image is calculated. ; S33. The uniformity index of grayscale distribution calculated by the visual quality inspection system based on step S32. Combined with a preset uniformity threshold For the initial exposure compensation coefficient Dynamic corrections are performed to obtain the final exposure compensation coefficient. Based on this coefficient, a formal visual inspection is performed, and the inspection completion signal and quality judgment signal are uploaded to the PLC; among them, the final exposure compensation coefficient... The calculation formula is: ; In the formula, This is an index of the uniformity of grayscale distribution in the pre-detection image; The preset uniformity threshold; The intensity factor is adjusted for exposure correction. It is the hyperbolic tangent function; This is the initial exposure compensation factor; This is the final exposure compensation coefficient.

3. The automated production line logistics control method based on visual quality inspection according to claim 2, characterized in that, Step S4 includes: S41, PLC receives the inspection completion signal uploaded by the vision quality inspection system in step S33. Qualified signal Unqualified signals and visual detection confidence Among them, the confidence level of visual detection The visual quality inspection system determines the final exposure compensation coefficient. The results were obtained by combining the pre-detection image quality with the overall calculation: ; in, For visual detection confidence; This is the maximum permissible exposure compensation factor; The standard deviation of the uniformity index; This represents the number of suspected defect areas in the pre-detection image; This represents the total number of pixel regions in the pre-detected image; S42, PLC obtains the visual detection confidence level in step S41. Combined with a preset confidence threshold Establish a graded quality judgment model when At that time, directly based on the qualified signal or unqualified signal Execute step S5 or S6 if the current state is qualified. And unqualified signals If a non-compliant signal is received, proceed to step S5. And qualified signal Then proceed to step S6; when When this occurs, the secondary re-inspection process is triggered and step S43 is executed; S43, PLC-controlled vision quality inspection system with corrected exposure compensation coefficient Re-perform the visual inspection, where To re-inspect the gain coefficient, and use the results of the second re-inspection as the final quality judgment basis, proceed to step S5 or step S6.

4. The automated production line logistics control method based on visual quality inspection according to claim 3, characterized in that, Step S7 includes: S71. The visual quality inspection system extracts defect features from non-conforming workpieces entering the rework station and obtains defect type vectors. Defect severity matrix Based on the historical rework database, the expected rework success rate of the workpiece is calculated. ; S72, PLC obtains the expected repair success rate from step S71. Combined with the current load rate of the rework station Determine whether a workpiece transfer request from the cache station to the rework station has been triggered. If so... and If so, a transfer request is triggered and step S73 is executed; where This is the threshold for the success rate of repairs. This represents the maximum allowable load rate for the rework station. S73. After the PLC triggers the transfer request in step S72, it calculates the rework urgency index of each workpiece to be transferred in the buffer station. The workpiece with the highest urgency index is selected and transferred to the rework station to perform the rework process in step S7, and the load status of the rework station is updated.

5. The automated production line logistics control method based on visual quality inspection according to claim 4, characterized in that, Step S9 includes: S91. The visual quality inspection system performs a full-surface re-inspection of the workpiece after the rework in step S7, and extracts the quality feature parameter set of the rework area. And calculate the rework quality confidence level of the workpiece. ; S92, PLC obtains the rework quality confidence level based on step S91. Based on the historical rework pass rate of the batch to which this workpiece belongs. And the estimated repair success rate obtained in step S71 Dynamically calculate the sampling depth coefficient of the current sampling station for the workpiece. ; S93, PLC obtains the sampling depth coefficient from step S92. Adjust the resolution of the sampling images acquired by the visual quality inspection system. And the detection accuracy parameters of the sampling algorithm Differentiated in-depth sampling inspections are carried out, and materials are put into the unloading process after passing the sampling inspection.

6. The automated production line logistics control method based on visual quality inspection according to claim 3, characterized in that, Step S5 includes: S51, the PLC determines that it has received a qualified signal based on the workpiece quality status result obtained in step S4. At that time, determine the target workstation coordinates of the industrial robot. And read the real-time occupancy status matrix of each workstation on the current production line. ; S52, The PLC obtains the target workstation coordinates in step S51. and occupancy state matrix Construct a trajectory optimization objective function that includes an obstacle penalty term. The initial trajectory curve was generated using fifth-order polynomial interpolation. ; S53, PLC generates the initial trajectory curve based on step S52. By combining real-time occupancy status changes, the node parameters of the trajectory curve are iteratively optimized to obtain the final execution trajectory. The system controls the industrial robot to transfer qualified workpieces from the vision inspection station to the normal unloading station according to the final execution trajectory, thus completing the normal unloading process.

7. The automated production line logistics control method based on visual quality inspection according to claim 5, characterized in that, Also includes: S101. The PLC collects the inspection result data of N consecutive workpieces fed back by the vision quality inspection system in step S3, and constructs a quality defect statistical matrix. And calculate the frequency vector of each defect type. ; S102. The PLC identifies the main defect types based on the defect occurrence frequency vector p obtained in step S101. Based on a pre-defined defect-process parameter correlation mapping table, the set of processing equipment process parameters that need to be adjusted is determined. ; S103, PLC uses the set of process parameters determined in step S102. Calculate the adjustment amount of each process parameter. It also sends process parameter correction instructions to the processing equipment.

8. A terminal, characterized in that, include: processor; Memory used to store the processor's execution instructions; The processor is configured to perform the method of any one of claims 1-7.

9. A computer-readable storage medium storing a computer program, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Flexible chip production logistics cache system

    CN109885005A

  • Product detection method, medium, equipment and system based on production line centralized re-judgment

    CN120031792A