Production line monitoring system and control method thereof

文档序号:1963311 发布日期:2021-12-14 浏览:29次 中文

阅读说明:本技术 一种产线监测系统及其控制方法 (Production line monitoring system and control method thereof ) 是由 陈存定 刘佳宜 曹晓鹏 杨清海 武艳 鲍良波 刘憶 候运阳 于 2021-08-11 设计创作,主要内容包括:本发明提供了一种产线监测系统及其控制方法,属于产线监测技术领域,包括获取模块,用于获取工件安装图像信号和产线工作信号,并采用预设算法对工件安装图像信号和产线工作信号进行处理分析,得到处理后的工件安装图像信号和产线工作信号;控制模块,用于接收处理后的工件安装图像信号和产线工作信号,且依据预设任务调度方法中的优先级顺序生成对应的控制信号;报警模块,用于根据对应的控制信号生成报警信号。本发明提供的一种产线监测系统及其控制方法,通过控制模块实时监测工件安装图像信号和产线工控数据,并在接收到异常信号时,迅速将异常信号反馈到报警模块,实现了全自动全天异常监测,无需人工看守。(The invention provides a production line monitoring system and a control method thereof, belonging to the technical field of production line monitoring, and comprising an acquisition module, a processing module and a control module, wherein the acquisition module is used for acquiring a workpiece installation image signal and a production line working signal, and processing and analyzing the workpiece installation image signal and the production line working signal by adopting a preset algorithm to obtain a processed workpiece installation image signal and a processed production line working signal; the control module is used for receiving the processed workpiece mounting image signals and the production line working signals and generating corresponding control signals according to a priority sequence in a preset task scheduling method; and the alarm module is used for generating an alarm signal according to the corresponding control signal. According to the production line monitoring system and the control method thereof, the control module is used for monitoring workpiece mounting image signals and production line industrial control data in real time, and when receiving abnormal signals, the abnormal signals are quickly fed back to the alarm module, so that full-automatic all-day abnormal monitoring is realized, and manual watching is not needed.)

1. A production line monitoring system, comprising:

the acquisition module is used for acquiring the workpiece installation image signal and the production line working signal, and processing and analyzing the workpiece installation image signal and the production line working signal by adopting a preset algorithm to obtain a processed workpiece installation image signal and a processed production line working signal;

the control module is connected with the acquisition module and used for receiving the processed workpiece installation image signals and the processed production line working signals, and the processed workpiece installation image signals and the processed production line working signals generate corresponding control signals according to the priority sequence in the preset task scheduling method;

and the alarm module is connected with the control module and is used for generating an alarm signal according to the corresponding control signal.

2. The production line monitoring system according to claim 1, wherein the preset task scheduling method specifically comprises: dividing the production line monitoring system service into a plurality of tasks, including a start task, a PLC Alarm signal processing task, an image detection result processing task, a PLC industrial control data reading task, a PLC industrial control data sending task, a PLC state signal reading task, a PLC state signal sending task and an OLED display task, wherein the start task has a priority of 6, the PLC Alarm signal processing task and the image detection result processing task have a priority of 6, the PLC industrial control data reading task and the PLC industrial control data sending task have a priority of 5, the PLC state signal reading task and the PLC state signal sending task have a priority of 4, and the OLED display task has a priority of 3.

3. The in-line monitoring system of claim 1, wherein the control module comprises:

the control chip is connected with the acquisition module and used for receiving the processed workpiece mounting image signals and the production line working signals and generating corresponding control signals according to the processed workpiece mounting image signals and the production line working signals, and the control chip uses a real-time operating system;

and the cloud server is connected with the control chip and is used for receiving and storing the control signal generated according to the production line working signal.

4. The line monitoring system of claim 3, wherein the real-time operating system comprises an embedded real-time operating system.

5. The in-line monitoring system of claim 2, wherein the acquisition module comprises:

the image processing unit is connected with the control chip and is used for acquiring a production line workpiece installation image signal, processing and analyzing the image signal and transmitting the processed and analyzed image signal to the control chip;

and the production line control unit is connected with the control chip and used for acquiring production line industrial control data in real time and transmitting the industrial control data to the control chip.

6. The production line monitoring system of claim 1, wherein the alarm module is provided with a plurality of types of alarm indicator lights for executing different alarm commands according to different alarm signals.

7. The in-line monitoring system of claim 1, comprising:

the display module is connected with the control module and is used for displaying the running state of the system task in real time;

and the reset module is connected with the control module and is used for controlling the reset of the control module.

8. The production line monitoring system of claim 1, comprising a power module coupled to the control module, the power module configured to provide power to the control module and the alarm module.

9. A control method of a production line monitoring system is characterized by comprising the following steps:

s1: initializing a production line monitoring system of the production line monitoring system of any one of claims 1-8;

s2: dividing each task of a production line and setting priority;

s3: acquiring a production line workpiece installation image signal through an image processing unit, and acquiring a production line working signal through a production line control unit;

s4: processing the workpiece installation image signal through a preset algorithm to obtain a processed workpiece installation image signal;

s5: judging whether the processed workpiece mounting image signal and the processed production line working signal are abnormal or not, if so, going to step S6, and if not, going to step S7;

s6: generating a corresponding control signal according to the processed workpiece mounting image signal and the production line working signal through a control chip, transmitting the corresponding control signal to an alarm module, and generating a corresponding alarm signal according to the corresponding control signal by the alarm module;

s7: and transmitting the production line working signal to a cloud server through a control chip for storage.

10. The control method of the in-line monitoring system as claimed in claim 9, wherein the preset algorithm in step S4 specifically includes the steps of:

s41: acquiring a workpiece installation image through an industrial camera;

s42: reading a preset template image, and comparing the obtained workpiece installation image with the preset template image;

s43: calculating the matching degree of the workpiece installation image and the template image, and judging whether the matching degree exceeds a preset threshold value, if so, going to step S44, otherwise, going to step S45;

s44: generating an abnormal workpiece mounting image signal and transmitting the abnormal workpiece mounting image signal to a control chip;

s45: and generating a normal workpiece mounting image signal and transmitting the normal workpiece mounting image signal to the control chip.

Technical Field

The invention belongs to the technical field of industrial production line monitoring, and particularly relates to a production line monitoring system and a control method thereof.

Background

With the development of new-generation information technology and the continuous promotion of data collection work of industrial terminals such as intelligent manufacturing and industrial 4.0, the industrial brain with the industrial internet of things as the core becomes an important center for promoting industrial structure adjustment and modern economic system construction. In order to comply with the trend of technical development and respond to the national development strategy, a modern industrial internet of things production line monitoring system integrating data acquisition, network transmission, data analysis and exception handling is urgently needed to be created, the industrial automatic production line is endowed with intellectualization, the safety and reliability of the automatic production line are improved, and the influence of production line exception on production efficiency and production quality is reduced.

A modern intelligent production line needs to be provided with a set of sensitive and reliable production line monitoring system, for an automatic production line, the monitoring system needs to find out that the production line is abnormal in time, execute a corresponding processing scheme according to a detected abnormal code and send an alarm signal, and therefore the safety of a normal industrial automatic production and production system is guaranteed. Most of the existing automatic production lines are sequentially executed according to a time sequence, namely, the abnormal alarm task is responded after the data frame which is currently sent is read and sent, and the low-delay requirement for responding to the abnormal alarm task is far not met.

Disclosure of Invention

The invention aims to provide a production line monitoring system and a control method thereof, which can quickly respond to an abnormal alarm and have high real-time performance and high reliability, aiming at the problems in the prior art.

In order to achieve the purpose, the invention adopts the technical scheme that:

a production line monitoring system comprising the steps of:

the acquisition module is used for acquiring the workpiece installation image signal and the production line working signal, and processing and analyzing the workpiece installation image signal and the production line working signal by adopting a preset algorithm to obtain a processed workpiece installation image signal and a processed production line working signal;

the control module is connected with the acquisition module and used for receiving the processed workpiece installation image signals and the processed production line working signals, and the processed workpiece installation image signals and the processed production line working signals generate corresponding control signals according to the priority sequence in the preset task scheduling method;

and the alarm module is connected with the control module and is used for generating an alarm signal according to the corresponding control signal.

In the production line monitoring system, the preset task scheduling method specifically includes: dividing the production line monitoring system service into a plurality of tasks, including a start task, a PLC Alarm signal processing task, an image detection result processing task, a PLC industrial control data reading task, a PLC industrial control data sending task, a PLC state signal reading task, a PLC state signal sending task and an OLED display task, wherein the start task has a priority of 6, the PLC Alarm signal processing task and the image detection result processing task have a priority of 6, the PLC industrial control data reading task and the PLC industrial control data sending task have a priority of 5, the PLC state signal reading task and the PLC state signal sending task have a priority of 4, and the OLED display task has a priority of 3.

In the above production line monitoring system, the control module includes:

the control chip is connected with the acquisition module and used for receiving the processed workpiece mounting image signals and the production line working signals and generating corresponding control signals according to the processed workpiece mounting image signals and the production line working signals, and the control chip uses a real-time operating system;

and the cloud server is connected with the control chip and is used for receiving and storing the control signal generated according to the production line working signal.

In the production line monitoring system, the real-time operating system includes an embedded real-time operating system.

In the above production line monitoring system, the obtaining module includes:

the image processing unit is connected with the control chip and is used for acquiring a production line workpiece installation image signal, processing and analyzing the image signal and transmitting the processed and analyzed image signal to the control chip;

and the production line control unit is connected with the control chip and used for acquiring production line industrial control data in real time and transmitting the industrial control data to the control chip.

In the production line monitoring system, the alarm module is provided with a plurality of types of alarm indicator lamps for executing different alarm commands according to different alarm signals.

The production line monitoring system comprises a display module, a monitoring module and a control module, wherein the display module is connected with the control module and is used for displaying the running state of a system task in real time;

and the reset module is connected with the control module and is used for controlling the reset of the control module.

In the production line monitoring system, the power module is connected to the control module and used for supplying power to the control module and the alarm module.

The invention also aims to provide a control method of the production line monitoring system, which comprises the following steps:

s1: initializing a production line monitoring system;

s2: dividing each task of a production line and setting priority;

s3: acquiring a production line workpiece installation image signal through an image processing unit, and acquiring a production line working signal through a production line control unit;

s4: processing the workpiece installation image signal through a preset algorithm to obtain a processed workpiece installation image signal;

s5: judging whether the processed workpiece mounting image signal and the processed production line working signal are abnormal or not, if so, going to step S6, and if not, going to step S7;

s6: generating a corresponding control signal according to the processed workpiece mounting image signal and the production line working signal through a control chip, transmitting the corresponding control signal to an alarm module, and generating a corresponding alarm signal according to the corresponding control signal by the alarm module;

s7: and transmitting the production line working signal to a cloud server through a control chip for storage.

In the above control method of the production line monitoring system, the preset algorithm in step S4 specifically includes the steps of:

s41: acquiring a workpiece installation image through an industrial camera;

s42: reading a preset template image, and comparing the obtained workpiece installation image with the preset template image;

s43: calculating the matching degree of the workpiece installation image and the template image, and judging whether the matching degree exceeds a preset threshold value, if so, going to step S44, otherwise, going to step S45;

s44: generating an abnormal workpiece mounting image signal and transmitting the abnormal workpiece mounting image signal to a control chip;

s45: and generating a normal workpiece mounting image signal and transmitting the normal workpiece mounting image signal to the control chip.

Compared with the prior art, the invention has the following beneficial effects:

1. according to the invention, the control module is used for monitoring workpiece mounting image signals and production line industrial control data in real time, and when receiving abnormal signals, the abnormal signals are quickly fed back to the alarm module, so that full-automatic all-day abnormal monitoring is realized, and manual watching is not needed.

2. According to the invention, by adopting a multi-task management mechanism and preempting and scheduling the tasks according to the priority, the abnormal signal task is set as a high-priority task, other executing tasks can be preempted when the abnormal signal occurs, the abnormal signal is processed preferentially, the low time-delay property of abnormal signal alarm is met, and the reliability and the real-time property of the production line monitoring system are ensured.

3. By setting different priorities for each task of the production line and setting the priorities of the PLC Alarm signal processing task and the image detection result processing task to be the highest level, the real-time response to the PLC Alarm signal processing task and the image detection result processing task is realized, the ultra-low time delay requirements of two Alarm services are realized, the response efficiency of the production line monitoring system to the Alarm services is greatly improved, and the reliability and the real-time performance of the production line monitoring system are ensured.

4. The modules are reasonably and efficiently matched, the image processing unit is used for processing and judging the workpiece installation image, the workload of a control chip is reduced, the hardware cost is reduced on the premise of ensuring the running state of the production line to be monitored in real time all day long, the embedded type monitoring system is suitable for embedded products with insufficient computing capacity and insufficient resources, and the embedded type monitoring system can realize complete production line monitoring of embedded equipment with limited resources.

5. The execution state of the current system task is displayed through the display module, the execution state comprises the task state running at present, the detection state of the PLC Alarm signal and the detection of the workpiece installation state can be visually displayed through the display module, the monitoring of workers on the real-time state of a production line is facilitated, and the working efficiency is greatly improved.

Drawings

FIG. 1 is a system block diagram of a production line monitoring system according to the present invention.

Fig. 2 is a diagram illustrating steps in a control method of a production line monitoring system according to the present invention.

Fig. 3 is a diagram illustrating specific steps of S4 in the control method of the production line monitoring system according to the present invention.

Detailed Description

The following are specific embodiments of the present invention and are further described with reference to the drawings, but the present invention is not limited to these embodiments.

It should be noted that all the directional indicators (such as up, down, left, right, front, and rear … …) in the embodiment of the present invention are only used to explain the relative position relationship between the components, the movement situation, etc. in a specific posture (as shown in the drawing), and if the specific posture is changed, the directional indicator is changed accordingly.

As shown in fig. 1 to 3, the present invention provides a production line monitoring system, including:

the acquisition module is used for acquiring the workpiece installation image signal and the production line working signal, and processing and analyzing the workpiece installation image signal and the production line working signal by adopting a preset algorithm to obtain a processed workpiece installation image signal and a processed production line working signal;

the control module is connected with the acquisition module and used for receiving the processed workpiece installation image signals and the processed production line working signals, and the processed workpiece installation image signals and the processed production line working signals generate corresponding control signals according to the priority sequence in the preset task scheduling method;

and the alarm module is connected with the control module and is used for generating an alarm signal according to the corresponding control signal.

According to the production line monitoring system provided by the invention, the production line working signal is acquired in real time through the acquisition module, the acquired workpiece mounting image signal and the production line working signal are analyzed and processed and then transmitted to the control module, the running state of the production line is monitored in real time through the control module, and the abnormal signal is rapidly fed back to the alarm module when the abnormal working signal is received, so that full-automatic real-time abnormal monitoring is realized, manual real-time watching is not needed, and the working efficiency is greatly improved.

Preferably, as shown in fig. 1 to 3, the control module includes: the control chip is connected with the acquisition module and used for receiving the processed workpiece mounting image signals and the production line working signals and generating corresponding control signals according to the processed workpiece mounting image signals and the production line working signals, and the control chip uses a real-time operating system; and the cloud server is connected with the control chip and is used for receiving and storing the control signal generated according to the production line working signal.

Further preferably, the control chip and the cloud server communicate with each other through an ethernet.

In this embodiment, the control chip is preferably an STM32H743 embedded processor, the acquisition module continuously transmits a working signal acquired in real time to the control chip, the control chip receives a plurality of working signals, the control chip processes the working signal and transmits the processed working signal to the cloud server for storage when receiving a normal working signal, and the alarm module is notified to alarm when receiving an abnormal working signal.

Preferably, as shown in fig. 1 to 3, the real-time operating system includes an embedded real-time operating system FreeRTOS, and the embedded real-time operating system FreeRTOS is configured to divide the in-line task into a plurality of parts and set a priority to each in-line task.

Further preferably, the preset task scheduling method specifically includes: dividing the production line monitoring system service into a plurality of tasks, including a start task, a PLC Alarm signal processing task, an image detection result processing task, a PLC industrial control data reading task, a PLC industrial control data sending task, a PLC state signal reading task, a PLC state signal sending task and an OLED display task, wherein the start task has a priority of 6, the PLC Alarm signal processing task and the image detection result processing task have a priority of 6, the PLC industrial control data reading task and the PLC industrial control data sending task have a priority of 5, the PLC state signal reading task and the PLC state signal sending task have a priority of 4, and the OLED display task has a priority of 3.

Preferably, the starting task is used for creating other tasks, the PLC industrial control data reading task and the PLC state signal reading task refer to that the control chip respectively reads industrial control data and state signals of the PLC through a Modbus TCP protocol, and the PLC industrial control data sending task and the PLC state signal sending task respectively convert the industrial control data and the state signals into formats and upload the formats to the cloud server through an MQTT protocol. And the PLC Alarm signal processing task receives an Alarm signal generated when the PLC is abnormal in the process flows of feeding, oiling and the like through the Ethernet, and controls the Alarm module to give an Alarm if the PLC receives the Alarm signal. The image detection result processing task is to receive the detection result of the image processing unit through the serial port, and if the image processing unit detects that the workpiece is abnormally installed, the alarm module is controlled to give an alarm.

In this embodiment, the production line monitoring system service is divided into a plurality of tasks, and the priority of the tasks is set, and the higher the level is, the higher the priority is, that is, the system can preferentially process the tasks with high priority, and the tasks with high priority can preempt the tasks with low priority at any time. In actual production, a plurality of tasks which run simultaneously exist on a production line, wherein a PLC industrial control data reading task, a PLC industrial control data sending task, a PLC state signal reading task and a PLC state signal sending task are carried out daily and continuously, and a PLC Alarm signal processing task and an image detection result processing task need to be temporarily responded by a production line monitoring system when an abnormal state occurs.

And for the image detection result processing task, the workpiece installation state is captured in real time through the industrial camera, the captured picture is subjected to image processing and detection, whether the workpiece is installed wrongly is judged, meanwhile, the workpiece image detection result is sent to the control chip through the serial port, when the control chip receives the workpiece installation image detection result, the PLC industrial control data sending task is interrupted due to the fact that the priority of the image detection result processing task is the highest level, the image detection result processing task with the higher priority is responded, and the interrupted PLC industrial control data sending task is continuously executed after the image detection result processing task is executed. Similarly, when the PLC status signal sending task is executed, if the control module receives a PLC Alarm signal transmitted through the ethernet, the PLC Alarm signal processing task interrupts the PLC status signal sending task having a lower priority, and continues to execute the PLC status signal sending task after the PLC Alarm signal processing task is completed. In the whole process, the tasks with high priority can interrupt the tasks with low priority at any time and preempt execution, the tasks with the same priority are sequentially executed according to the time sequence, the tasks are not influenced with each other, the response efficiency of the tasks with high priority is ensured, and the stability of the system is also ensured.

Preferably, as shown in fig. 1 to 3, the obtaining module includes:

the image processing unit is connected with the control chip and is used for acquiring a production line workpiece installation image signal, processing and analyzing the image signal and transmitting the processed and analyzed image signal to the control chip; and the production line control unit is connected with the control chip and used for acquiring production line industrial control data in real time and transmitting the industrial control data to the control chip.

Further preferably, the image processing unit processes the workpiece image using a template matching algorithm.

In this embodiment, the image processing unit obtains a production line workpiece image through the industrial camera, processes and detects a workpiece installation image, sends an image processing result to the control chip through the serial port, and controls the alarm module to give an alarm through the control chip if the workpiece assembly position is abnormal. Meanwhile, the industrial camera further processes and detects the workpiece image through a template matching algorithm, judges whether the workpiece is abnormal or not, and obtains a processed image signal, so that the processed image signal can be directly sent to the control chip, the control chip only needs to generate a corresponding control signal according to the processed image signal, the workpiece installation image is not required to be processed, analyzed and judged, the workload of the control chip is greatly reduced, the system can run on embedded equipment with limited resources, the hardware cost is reduced on the premise of ensuring the running state of an all-weather real-time monitoring production line, the system is suitable for embedded products with insufficient computing capacity and insufficient resources, and the practicability of the system is greatly improved.

The production line control unit comprises an industrial control PLC and is used for acquiring production line industrial control data in real time, wherein the production line industrial control data comprise production line state signals, industrial control data and Alarm signals, and the control chip reads real-time data on the industrial control PLC through the Ethernet.

The automatic production line generates a large amount of data every day, one part of the data is from data collected by a sensor, and the other part of the data is industrial control data, state signals and alarm signals generated by a PLC of the automatic production line. The production line monitoring system is used for collecting production line data and transmitting the data to the industrial internet cloud server most of the time, reading and sending of the data are generally transmitted according to bytes or data frames, time consumption is long, if the production line is abnormal in the data reading or sending process, the monitoring system needs to immediately stop the task of reading and sending the data, and an abnormal alarm task is responded preferentially. The system is an embedded real-time production line monitoring system based on FreeRTOS, and can preferentially respond to an abnormal alarm task when an abnormality occurs, so that the low-delay requirement of the alarm task is ensured.

Preferably, as shown in fig. 1 to 3, the system comprises a display module connected to the control module, wherein the display module is used for displaying the running state of the system task in real time.

Further preferably, the display module is an OLED display.

In this embodiment, OLED display module is used for showing the execution state of current system task, including which task is running at present, whether detect PLC's Alarm signal, whether detect workpiece setting badly, all can show through display module directly perceivedly, and the staff of being convenient for has improved work efficiency to producing the control of line real-time condition greatly.

Preferably, as shown in fig. 1 to 3, the controller includes a reset module connected to the control module, and the reset module is configured to control the reset of the control module.

In this embodiment, the reset module is used for controlling the restart of the control chip, when the control chip is abnormal and causes system crash or other defects, the control chip can be controlled to restart through the reset module, partial abnormalities can be solved without replacing the chip, the maintenance efficiency of the system is improved, and the stability of the system is enhanced.

Preferably, as shown in fig. 1 to 3, the alarm module is provided with a plurality of categories of alarm indication lamps for executing different alarm commands according to different alarm signals.

In this embodiment, the Alarm module makes an Alarm response when the control chip reads an Alarm signal of the PLC, or the image processing unit detects that the workpiece is not correctly installed, and the Alarm module includes alarms of different color categories such as red, yellow, blue, green and the like, and can display different Alarm contents according to different Alarm signals, so that the worker can distinguish different abnormal states, and meanwhile, the Alarm module is further provided with a buzzer Alarm prompt, so that the worker can be notified in the shortest time, and the response efficiency of system Alarm is greatly improved.

Preferably, as shown in fig. 1 to 3, the portable electronic device includes a power module connected to the control module, wherein the power module is configured to supply power to the control module, the alarm module, the display module, and the reset module.

In this embodiment, the power module is used to supply power to the whole system and provide a stable 3.3V power, and the power module is a conventional technical means and is not described herein again.

As shown in fig. 1 to 3, the present invention further provides a control method of a production line monitoring system, including the steps of:

s1: initializing a production line monitoring system;

s2: dividing each task of a production line and setting priority;

s3: acquiring a production line workpiece image signal and a production line working signal through an acquisition module, and processing the workpiece image signal and the production line working signal through a preset algorithm to obtain a processed workpiece image signal and a processed production line working signal;

s4: judging whether the processed workpiece image signal and the processed production line working signal are abnormal or not, if so, going to step S5, and if not, going to step S6;

s5: generating a corresponding control signal through a control chip, transmitting the corresponding control signal to an alarm module, and generating a corresponding alarm signal by the alarm module according to the corresponding control signal;

s6: and transmitting the production line working signal to a cloud server through a control chip for storage.

In this embodiment, the production line monitoring system is initialized, then each task of the production line is divided, each task is enabled to run independently, and each task is set with a priority, so that the system executes different tasks in sequence according to the task priority, executes a high-priority task first, and then executes a low-priority task, and the high-priority task can interrupt the low-priority task. In the task execution process, a production line workpiece image signal is obtained through an image processing unit, the workpiece image signal is processed and analyzed through a preset algorithm, whether the workpiece image signal is abnormal or not is judged, if the workpiece is not installed in place, a low-priority task is directly interrupted, a high-priority image detection result processing task is preferentially executed, an Alarm module is controlled to give an Alarm through a control chip, in addition, a production line working signal is obtained through a production line control unit in real time, if the control chip reads a production line Alarm signal, a PLC Alarm task is preferentially executed, and the Alarm module is controlled to give an Alarm through the control chip. Different priorities are set for different tasks, so that the high-priority image detection result processing task and the PLC Alarm signal task are responded in real time, the low-delay requirement of the Alarm task is met, and the Alarm timeliness in production line monitoring is greatly improved.

Preferably, as shown in fig. 1 to 3, the processing of the workpiece image signal in step S3 specifically includes the steps of:

s31: acquiring a workpiece installation image through an industrial camera;

s32: reading a preset template image, and comparing the obtained workpiece installation image with the preset template image;

s32: calculating the matching degree of the workpiece installation image and the template image, and judging whether the matching degree exceeds a preset threshold value, if so, going to step S33, otherwise, going to step S34;

s33: generating an abnormal workpiece mounting image signal and transmitting the abnormal workpiece mounting image signal to a control chip;

s34: and generating a normal workpiece mounting image signal and transmitting the normal workpiece mounting image signal to the control chip.

In this embodiment, a template matching algorithm is used to determine whether workpiece installation is normal, and the working principle is as follows: firstly, reading a workpiece installation image and a preset template image, performing template matching by using matchTemplate (target, template, TM _ SQDIFF _ NORMED), performing normalization processing, cutting out a matching area to obtain a matching area image, performing gray level matching, calculating a difference value between the workpiece installation image and the preset template image, judging that the workpiece is abnormally installed when the difference value exceeds a preset threshold value, and otherwise, judging that the workpiece is normally installed. The workpiece installation image is processed in advance through the template matching algorithm, the processed image signal can be directly sent to the control chip, the control chip only needs to generate a corresponding control signal according to the image signal, the workpiece installation image is not required to be processed, analyzed and judged, the workload of the control chip is greatly reduced, the system can run on embedded equipment with limited resources, the hardware cost is reduced on the premise of ensuring the running state of an all-weather real-time monitoring production line, the system is suitable for embedded products with insufficient computing capacity and insufficient resources, and the practicability of the system is greatly improved.

It should be noted that the descriptions related to "first", "second", "a", etc. in the present invention are only used for descriptive purposes and are not to be construed as indicating or implying relative importance or implicit indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise. The terms "connected," "fixed," and the like are to be construed broadly, e.g., "fixed" may be a fixed connection, a removable connection, or an integral part; can be mechanically or electrically connected; they may be directly connected or indirectly connected through intervening media, or they may be connected internally or in any other suitable relationship, unless expressly stated otherwise. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.

In addition, the technical solutions in the embodiments of the present invention may be combined with each other, but it must be based on the realization of those skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination of technical solutions should not be considered to exist, and is not within the protection scope of the present invention.

The specific embodiments described herein are merely illustrative of the spirit of the invention. Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:统计过程控制的统计计算方法及装置、计算机设备及介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类