Workpiece detection method and system based on PLC

By adopting the PLC-based workpiece detection method in glass machining, the status information of workpiece position data blocks is updated in real time, and the problems of insufficient accuracy and response delay in traditional methods are solved, achieving efficient and accurate workpiece position detection and production process optimization.

CN119750153AActive Publication Date: 2025-04-04BOTTERO GLASS IND FOSHAN CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411939640.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-04
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

In traditional glass machining, precisely controlling the position of glass on the belt has problems of insufficient accuracy and response delay, which is difficult to meet the complex processing needs.

Method used

Using a workpiece detection method based on PLC, by dividing the conveyor belt length information in the workpiece transport device, forming a conveying sequence group, and setting a data position sequence group in the data storage area of ​​the PLC, the status information of the position data block is updated in real time to determine the real-time position of the workpiece.

Benefits of technology

It realizes efficient inspection of workpiece positions, reduces the renewal cost of the overall production line, is easy to promote, and improves the accuracy and production efficiency of workpiece inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119750153A_ABST
    Figure CN119750153A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of position detection, and discloses a PLC-based workpiece detection method, which comprises the following steps of: performing length division operation on length information of a conveying belt in a workpiece conveying device according to a set length interval to obtain a corresponding conveying sequence group; a set storage area in a data storage area of the PLC is used as a position storage area, and a data position sequence group is arranged in the position storage area; and when a to-be-processed workpiece detected by the workpiece sensor is received, determining current position information of the corresponding workpiece, and performing real-time updating operation on state information of each position data block in the data position sequence group according to the current position information. According to the workpiece detection method based on the PLC in the embodiment of the invention, each position data block in the data position sequence group is in one-to-one correspondence with the length marking block in the conveying sequence group, so that the accurate mapping of the workpiece position is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of position detection, and in particular to a workpiece detection method and system based on PLC. Background Art

[0002] At present, in the glass mechanical processing scene, accurately controlling the position of the glass on the belt is the key to achieving efficient and high-quality processing. The traditional position control method mainly relies on physical position sensors (such as proximity switches, photoelectric sensors, etc.) to record the changes in the front and rear positions of the glass to determine its current position. Although this method is simple and direct, it may have problems such as insufficient accuracy and response delay when facing complex processing requirements. Therefore, designing a solution that can achieve workpiece positioning more conveniently and quickly has become a technical problem that needs to be solved urgently by technicians in this field. Summary of the invention

[0003] In response to the above-mentioned defects, an embodiment of the present invention discloses a workpiece detection method based on PLC, which can realize efficient detection of the implementation position of the workpiece, and through the above-mentioned logic design method, it can greatly reduce the update cost of the overall production line, which is convenient for promotion.

[0004] The first aspect of the embodiment of the present invention discloses a workpiece detection method based on PLC, comprising:

[0005] Performing a length division operation on the length information of the conveyor belt in the workpiece transport device according to a set length interval to obtain a corresponding conveying sequence group, wherein the conveying sequence group includes a plurality of length marking blocks;

[0006] A set storage area in the data storage area of ​​the PLC is used as a position storage area, a data position sequence group is set in the position storage area, the data position sequence group includes position data blocks connected in sequence along the length direction, the state of each position data block is a first data block state or a second data block state; and each position data block in the data position sequence group corresponds one-to-one to a length mark block in the transport sequence group;

[0007] When receiving a signal that a workpiece to be processed is detected by a workpiece sensor, current position information of the corresponding workpiece is determined, and status information of each position data block in the data position sequence group is updated in real time according to the current position information;

[0008] The real-time position information of the corresponding workpiece to be processed in the workpiece transport device is determined according to the status information of the position data block updated in real time.

[0009] As an optional implementation, in the first aspect of the embodiment of the present invention, the data position sequence group includes a processing data block, and the position information of the processing data block in the data position sequence group corresponds to the position of the actual processing station in the workpiece transportation device; the number of the processing data blocks is the same as the number of the actual processing stations; the lengths of the multiple length mark blocks are all the same;

[0010] The first data block state is used to indicate that there is a workpiece at the corresponding position, and the second data block state is used to indicate that there is no workpiece at the corresponding position.

[0011] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the workpiece detection method further includes:

[0012] When it is detected that the state in the processing data block changes from the second data block state to the first data block state, it is determined as a rising edge state, and the devices at the corresponding actual processing station are controlled to work according to the rising edge state to perform the corresponding processing operation;

[0013] When it is detected that the state in the processing data block changes from the first data block state to the second data block state, it is determined as a falling edge state, and the device at the corresponding actual processing station is controlled to stop working according to the falling edge state.

[0014] As an optional implementation, in the first aspect of the embodiment of the present invention, when receiving a signal that a workpiece to be processed is detected by a workpiece sensor, determining the current position information of the corresponding workpiece, and performing a real-time update operation on the status information of each position data block in the data position sequence group according to the current position information, includes:

[0015] When receiving a signal that the first workpiece sensor detects a workpiece to be processed, obtaining a length mark block associated with the first workpiece sensor, determining a corresponding position data block according to the length mark block, and adjusting the state of the position data block to the state of the first data block;

[0016] When the workpiece to be processed passes through the workpiece sensor, the state of the position data block associated with the first workpiece sensor is adjusted to the state of the second data block;

[0017] The status information of each position data block in the data position sequence group is updated in real time according to the current position information.

[0018] As an optional implementation, in the first aspect of the embodiment of the present invention, the real-time updating operation of the status information of each position data block in the data position sequence group according to the workpiece size information, the current position information and the conveying speed information includes:

[0019] Determine, according to the current position information, that the state information of the corresponding position data block is the first data block state information;

[0020] The state of the first data block in all the position data blocks corresponding to the workpiece is changed along the direction of movement of the workpiece, and the state of the data block in the position data block corresponding to each position of the workpiece is moved to the next adjacent position data block in turn until the states of all the position data blocks corresponding to the workpiece are updated, and the state of the previous position data block from which the workpiece moves is adjusted to the state of the second data block.

[0021] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the workpiece detection method further includes:

[0022] When receiving the workpiece to be processed detected by the second workpiece sensor, obtaining the length marking block associated with the second workpiece sensor, and obtaining its theoretical state information according to the corresponding length marking block;

[0023] If the theoretical state information matches the actual state, it is determined that there is no need to adjust the update strategy of the state information of each position data block. If the theoretical state information does not match the actual state, the difference between the theoretical state information and the actual state is determined, and the update strategy of the state information of each position data block is adjusted according to the difference between the theoretical state information and the actual state.

[0024] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the workpiece detection method further includes:

[0025] The PLC internal storage data is adjusted and updated based on historical update data, implemented measurement values, and pre-configured error compensation algorithms to obtain updated prediction results.

[0026] A second aspect of an embodiment of the present invention discloses a workpiece detection system based on PLC, comprising:

[0027] An acquisition module: used for performing a length division operation on the length information of the conveyor belt in the workpiece transport device according to a set length interval to obtain a corresponding conveying sequence group, wherein the conveying sequence group includes a plurality of length marking blocks;

[0028] Data mapping module: used to use a set storage area in the data storage area of ​​the PLC as a position storage area, wherein a data position sequence group is set in the position storage area, wherein the data position sequence group includes position data blocks sequentially connected along the length direction, and the state of each position data block is a first data block state or a second data block state; and each position data block in the data position sequence group corresponds one-to-one to a length mark block in the transport sequence group;

[0029] Detection module: used for determining the current position information of the corresponding workpiece when receiving the workpiece sensor detecting the workpiece to be processed, and performing real-time update operation on the status information of each position data block in the data position sequence group according to the current position information;

[0030] Position update module: used to determine the real-time position information of the corresponding workpiece to be processed in the workpiece transportation device according to the status information of the position data block updated in real time.

[0031] The third aspect of an embodiment of the present invention discloses an electronic device, comprising: a memory storing executable program code; a processor coupled to the memory; the processor calls the executable program code stored in the memory to execute the PLC-based workpiece detection method disclosed in the first aspect of the embodiment of the present invention.

[0032] A fourth aspect of an embodiment of the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the PLC-based workpiece detection method disclosed in the first aspect of an embodiment of the present invention.

[0033] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0034] The PLC-based workpiece detection method in the embodiment of the present invention realizes accurate mapping of the workpiece position by one-to-one correspondence between each position data block in the data position sequence group and the length mark block in the conveying sequence group. When the workpiece sensor detects the workpiece to be processed, the status information of each position data block in the data position sequence group is updated in real time according to the current position information. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1 It is a schematic flow chart of a PLC-based workpiece detection method disclosed in an embodiment of the present invention;

[0037] Figure 2 is a schematic diagram of a process of updating status information disclosed in an embodiment of the present invention;

[0038] Figure 3 It is a display schematic diagram of mapping the length mark block and the position data block disclosed in an embodiment of the present invention;

[0039] Figure 4It is another schematic diagram showing the mapping between the length mark block and the position data block disclosed in the embodiment of the present invention;

[0040] Figure 5 It is a structural schematic diagram of a PLC-based workpiece detection system provided by an embodiment of the present invention;

[0041] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention.

[0042] Figure numerals: 1. first workpiece sensor; 2. processed workpiece; 3. conveyor belt; 31. length marking block; 4. data position sequence group; 41. position data block. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] It should be noted that the terms "first", "second", "third", "fourth", etc. in the specification and claims of the present invention are used to distinguish different objects rather than to describe a specific order. The terms "including" and "having" in the embodiments of the present invention and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0045] In the glass mechanical processing scenario, accurately controlling the position of the glass on the belt is the key to achieving efficient and high-quality processing. Traditional position control methods mainly rely on physical position sensors (such as proximity switches, photoelectric sensors, etc.) to record changes in the front and rear positions of the glass to determine its current position. Although this method is simple and direct, it may have problems such as insufficient accuracy and response delays when facing complex processing requirements. Based on this, the embodiment of the present invention discloses a workpiece detection method, system, electronic device and storage medium based on PLC, which achieves accurate mapping of the workpiece position through a one-to-one correspondence between each position data block in the data position sequence group and the length mark block in the conveying sequence group. When the workpiece sensor detects the workpiece to be processed, the status information of each position data block in the data position sequence group is updated in real time according to the current position information.

[0046] Embodiment 1

[0047] See also Figure 1 , Figure 1 It is a flow chart of the PLC-based workpiece detection method disclosed in the embodiment of the present invention. Among them, the execution subject of the method described in the embodiment of the present invention is an execution subject composed of software and / or hardware, and the execution subject can receive relevant information by wired or / and wireless means, and can send certain instructions. Of course, it can also have certain processing functions and storage functions. The execution subject can control multiple devices, such as a remote physical server or cloud server and related software, or it can be a local host or server and related software that performs related operations on a device placed somewhere. In some scenarios, multiple storage devices can also be controlled, and the storage devices can be placed in the same place or different places as the devices. For example Figures 1 to 4 As shown, the PLC-based workpiece detection method includes the following steps:

[0048] S101: Acquire workpiece transport device information, the workpiece transport device information including length information of a conveyor belt 2 in the workpiece transport device; perform a length division operation on the length information of the conveyor belt 2 in the workpiece transport device according to a set length interval to obtain a corresponding transport sequence group, the transport sequence group including a plurality of length marking blocks 31, and the lengths of the plurality of length marking blocks 31 are all the same;

[0049] S102: Using a set storage area in the data storage area of ​​the PLC as a position storage area, wherein a data position sequence group 4 is provided in the position storage area, wherein the data position sequence group 4 includes position data blocks 41 sequentially connected along the length direction, and the state of each position data block 41 is a first data block state or a second data block state; and each position data block 41 in the data position sequence group 4 corresponds one-to-one to a length mark block 31 in the transport sequence group;

[0050] S103: when receiving a signal from the workpiece sensor that a workpiece to be processed is detected, determining the current position information of the corresponding workpiece, and performing a real-time update operation on the status information of each position data block 41 in the data position sequence group 4 according to the current position information;

[0051] S104: Determine the real-time position information of the corresponding workpiece 2 to be processed in the workpiece transportation device according to the status information of the position data block 41 updated in real time.

[0052] The method of the embodiment of the present invention obtains a plurality of marking blocks of the same length by performing a length division operation on the length information of the conveyor belt 2 in the workpiece transport device, thereby realizing accurate segmentation of the conveyor belt 2. This method can ensure that each workpiece has a clear position mark on the conveyor belt 2, which is convenient for subsequent position detection and data processing. In the embodiment of the present invention, the position data block specifically refers to the position data unit, that is, the minimum data unit stored inside the PLC; the minimum data unit here corresponds to the length marking block; the fixed length (minimum length) marking block corresponds to the data unit; the minimum length is related to the moving speed of the workpiece, the scanning cycle of the PLC, and the response speed of the detection sensor, and the minimum length is the separation length of the marking block, that is, the resolution length of the data unit; the minimum length is determined according to the processing requirements of the processing equipment for the workpiece; continuous marking blocks or data blocks with the same characteristics mean that there is a workpiece or there is no workpiece.

[0053] The embodiment of the present invention sets a special position storage area in the data storage area of ​​the PLC for storing the data position sequence group 4. Each position data block 41 in the data position sequence group 4 corresponds to the length mark block 31 in the conveying sequence group, thereby realizing accurate mapping of the workpiece position.

[0054] When the workpiece sensor detects the workpiece to be processed, the status information of each position data block 41 in the data position sequence group 4 is updated in real time according to the current position information. This real-time update mechanism can ensure that the PLC system always grasps the accurate position of the workpiece on the conveyor belt 2, thereby improving the accuracy of workpiece detection.

[0055] The method of the embodiment of the present invention realizes automatic detection and real-time update of the workpiece position through the PLC system without manual intervention. This not only reduces the error and cost of manual operation, but also improves production efficiency. Accurate workpiece position information helps to optimize the production process, such as reasonably arranging the processing sequence, adjusting the conveying speed, etc.

[0056] The method of the embodiment of the present invention can handle workpieces of different sizes and shapes, and only needs to adjust the PLC program accordingly according to the workpiece information. This makes the method highly flexible and adaptable, and can be widely used in various industrial automation scenarios. Since the method is implemented based on the PLC system, it can be easily integrated with other automation equipment and systems. This makes the system easy to expand and maintain, and can meet changes in future production needs. Accurate workpiece position information helps to avoid collision or overlap of workpieces during transportation. It can reduce the risk of equipment damage while ensuring the safety of operators. By updating the status information of the position data block 41 in real time, the PLC system can detect abnormal conditions in time and issue early warnings.

[0057] In a specific implementation, the length of the length mark block here may be the same or different. In the embodiment of the present invention, it is set to be the same. By setting it to the same length, it is more convenient and faster to perform calculations and positioning.

[0058] Specifically, at the beginning, no workpiece enters, but the belt is rotating. At this time, MB0 = 0; one MB represents a PLC internal storage unit (byte), and one MB area represents a fixed length of 3mm;

[0059] When there is no workpiece, when the belt rotates to position 03, MB1=0 is recorded; when there is no workpiece, when the belt rotates to position 06, MB2=0 is recorded; when there is no workpiece, when the belt rotates to position 09, MB3=0 is recorded; when there is no workpiece, when the belt rotates to position 12, MB4=0 is recorded; when the workpiece enters, the sensor excites the PLC, and the belt position is read as 15 (16, 17), and MB5=1 is recorded; when the workpiece enters, the belt position is read as 18 (19, 20) at a fixed interval, MB6=1 can be recorded; when the workpiece enters, the belt position is read as 120 at a fixed interval, MB60=1 can be recorded; when the workpiece enters, the belt position is read as 480 at a fixed interval, MB160=1 can be recorded; when the workpiece ends entering, the belt position is read as 483 at a fixed interval, MB161=0 can be recorded; when there is no workpiece, when the belt rotates to position 486, MB162=0 can be recorded; when there is no workpiece, when the belt rotates to position 3840, MB1280=0 can be recorded. The above method can be used to achieve specific position update. When implementing it, the belt servo position or encoder pulse can be used as the reference for the belt position.

[0060] During the specific implementation, the belt length and data storage area can be adjusted according to the specific process parameters; when the used storage area is larger than the actual maximum byte (1280) actually set, the PLC starts again from area 0, which is a large recycling area.

[0061] In the specific implementation algorithm, there are full shift methods (all data areas are moved, the data area moves once every time the belt moves a fixed length, and each data unit moves completely), and relative shift methods (the pointer moves, but the data area does not move). In order to further obtain speed and size parameters during specific implementation, corresponding calculations can also be performed based on the data area.

[0062] More preferably, the data position sequence group 4 includes processing data blocks, and the position information of the processing data blocks in the data position sequence group 4 corresponds to the position of the actual processing station in the workpiece transport device; the number of the processing data blocks is the same as the number of the actual processing stations;

[0063] The first data block state is used to indicate that there is a workpiece at the corresponding position, and the second data block state is used to indicate that there is no workpiece at the corresponding position.

[0064] The position information of the processing data block in the embodiment of the present invention directly corresponds to the position of the actual processing station in the workpiece transport device, ensuring that when each workpiece arrives at the designated processing station, the PLC system can accurately identify and trigger the corresponding processing operation. This direct association avoids processing delays or errors caused by incorrect workpiece position judgment, and improves processing efficiency and accuracy. According to the real-time position of the workpiece on the conveyor belt 2 and the state of the processing data block, the PLC system can dynamically adjust the processing sequence to ensure that the workpiece is processed according to the predetermined process flow. It helps to optimize the production process and reduce waiting time and resource waste.

[0065] The PLC system of the embodiment of the present invention can automatically trigger and control the operation of the processing equipment, such as starting, stopping, adjusting parameters, etc., by updating the status information of the processing data block in real time. This automatic control reduces human intervention and improves the automation and efficiency of the production process. Automatic control reduces errors and failures caused by improper human operation and improves the stability and reliability of the production process.

[0066] The PLC system of the embodiment of the present invention can realize real-time monitoring and scheduling of the production process by updating the status information of each data block in the data position sequence group 4 in real time. It helps to timely discover and solve bottlenecks and problems in the production process, optimize production planning and resource allocation. Accurate workpiece position and processing station status information helps to reasonably arrange the processing sequence and processing time, and avoid idleness and waste of processing stations.

[0067] The PLC system of the embodiment of the present invention can realize the visual display of the production process by updating the status information in the data position sequence group 4 in real time, which helps operators and managers to understand the production progress and status in real time and improves the transparency and traceability of the production process.

[0068] The embodiment of the present invention brings multiple technical effects such as accurate matching of processing requirements and workpiece positions, improving the automation level of the production process, optimizing production scheduling and resource allocation, and improving the transparency and traceability of the production process by introducing processing data blocks and clarifying the improvement of the first data block state and the second data block state. These effects make the method have higher application value and competitiveness in the field of industrial automation, and help promote the intelligent and efficient development of the manufacturing industry.

[0069] More preferably, the workpiece detection method further comprises:

[0070] When it is detected that the state in the processing data block changes from the second data block state to the first data block state, it is determined as a rising edge state, and the devices at the corresponding actual processing station are controlled to work according to the rising edge state to perform the corresponding processing operation;

[0071] When it is detected that the state in the processing data block changes from the first data block state to the second data block state, it is determined as a falling edge state, and the device at the corresponding actual processing station is controlled to stop working according to the falling edge state.

[0072] In the solution of the embodiment of the present invention, when the processing data block is detected to change from the second data block state (no workpiece) to the first data block state (with workpiece), that is, the rising edge state, the PLC system can immediately identify and trigger the device of the corresponding processing station to start working. This real-time response ensures that the workpiece can be processed immediately when it reaches the specified position, reducing waiting time and improving processing efficiency.

[0073] On the contrary, when it is detected that the processing data block changes from the first data block state to the second data block state, that is, the falling edge state, the PLC system can immediately control the devices of the corresponding processing station to stop working. This timely stop avoids ineffective processing and waste of resources, and also helps to protect processing equipment and workpieces from damage.

[0074] By precisely controlling the start and end times of machining operations, machining errors caused by inaccurate workpiece position or insufficient machining time can be reduced. This helps improve product quality and machining accuracy. Real-time response and precise control help reduce system delays and jitter, and improve the stability and reliability of the entire machining process.

[0075] More preferably, when receiving the workpiece sensor detecting the workpiece to be processed, determining the current position information of the corresponding workpiece, and performing a real-time update operation on the status information of each position data block 41 in the data position sequence group 4 according to the current position information, including:

[0076] S1031: upon receiving a signal from the first workpiece sensor 1 that the workpiece to be processed is detected, obtaining a length mark block 31 associated with the first workpiece sensor 1, determining a corresponding position data block 41 according to the length mark block 31, and adjusting the state of the position data block 41 to the first data block state;

[0077] S1032: When the workpiece to be processed passes through the first workpiece sensor, the state of the position data block 41 associated with the first workpiece sensor 1 is adjusted to the second data block state;

[0078] S1033: Update the status information of each position data block 41 in the data position sequence group 4 in real time according to the current position information. When the movement of the belt or conveyor reaches the set length interval, it means that the workpiece data block has moved forward by one data unit or one length interval.

[0079] When the first workpiece sensor 1 detects the workpiece to be processed, the embodiment of the present invention immediately obtains the length mark block 31 associated with the sensor, and determines the corresponding position data block 41 accordingly. This mechanism ensures accurate identification of the workpiece position and reduces processing errors caused by inaccurate position judgment.

[0080] When the workpiece passes through the workpiece sensor, the state of the relevant position data block 41 is immediately adjusted to the second data block state (no workpiece), which reflects the real-time position of the workpiece on the conveyor belt 2. This real-time update helps the PLC system to accurately grasp the motion state of the workpiece, so as to make correct processing decisions. The detection of the presence of the workpiece and the detection of the workpiece characteristics are realized by the workpiece sensor. When the workpiece sensor here is implemented specifically, it can include one or more sensors, and different sensors are used to detect different characteristics of the workpiece. It can be a position sensor to detect the position, or it can be a shape sensor or a color sensor or an identification sensor. The identification sensor here can be an RFID sensor. The above sensors are used to further obtain the workpiece information, such as the color, height, material, and shape characteristics of the workpiece. Different data is used in the data block to identify the workpiece characteristics. So that different processing techniques can be adopted at different workstations according to the characteristics of the workpiece.

[0081] By accurately identifying the workpiece position and updating the position information in real time, the PLC system can accurately determine when the workpiece arrives at the designated processing station and trigger the corresponding processing operation accordingly. This precise control reduces the waiting time of the processing operation and improves the processing efficiency. Real-time updating of position information also helps to avoid invalid processing. For example, when the workpiece fails to arrive at the designated processing station on time for some reason, the PLC system can immediately stop the operation of the relevant processing equipment, thereby avoiding unnecessary energy consumption and processing costs.

[0082] More preferably, the real-time updating operation of the status information of each position data block 41 in the data position sequence group 4 according to the workpiece size information, current position information and conveying speed information includes:

[0083] Determine, according to the current position information, that the state information of the corresponding position data block 41 is the first data block state information;

[0084] The state of the first data block in all the position data blocks 41 corresponding to the workpiece is replaced along the direction of movement of the workpiece, and the state of the data block in the position data block 41 corresponding to each position of the workpiece is moved to the next adjacent position data block 41 in turn until the states of all the position data blocks 41 corresponding to the workpiece are updated, and the state of the previous position data block from which the workpiece moves is adjusted to the state of the second data block.

[0085] In the embodiment of the present invention, the state of the first data block in all the position data blocks 41 corresponding to the workpiece is changed along the workpiece moving direction according to the conveying speed information, so that the system can track the position change of the workpiece on the conveyor belt 2 in real time. This dynamic update ensures the accuracy of the position information and provides a reliable basis for subsequent processing operations. Here, along the workpiece moving direction can be left, right, upward or downward, that is, the corresponding mapping is performed according to the actual situation.

[0086] The traditional position determination method may lead to inaccurate position determination due to factors such as sensor error, workpiece size change, etc. However, this method combines multiple information to dynamically update the status information of the position data block 41, effectively reducing the position determination error and improving the stability and reliability of the system.

[0087] By accurately tracking the position of the workpiece and updating the status information of the position data block 41 in real time, the system can accurately determine when the workpiece arrives at the designated processing station and trigger the corresponding processing operation accordingly. This precise control reduces the waiting time of the processing operation and improves the processing efficiency.

[0088] Real-time updated position information also helps avoid processing conflicts. For example, when multiple workpieces enter the processing area at the same time, the system can coordinate the processing sequence based on their respective position information to ensure that each workpiece can be processed correctly.

[0089] Real-time updates of position information help the system respond promptly to various abnormal situations (such as workpiece jams, sensor failures, etc.). By quickly identifying and handling these abnormal situations, the system can reduce failure rates and improve overall stability.

[0090] The method dynamically updates the status information of the position data block 41 by combining multiple information. Even if some sensors fail or data is lost, the system can still accurately determine the position of the workpiece based on other information and make corresponding processing.

[0091] More preferably, the workpiece detection method further includes:

[0092] When receiving the workpiece to be processed detected by the second workpiece sensor, obtaining the length marking block 31 associated with the second workpiece sensor, and obtaining its theoretical state information according to the corresponding length marking block 31;

[0093] If the theoretical state information matches the actual state, it is determined that there is no need to adjust the update strategy of the state information of each position data block 41. If the theoretical state information does not match the actual state, the difference between the theoretical state information and the actual state is determined, and the update strategy of the state information of each position data block 41 is adjusted according to the difference between the theoretical state information and the actual state.

[0094] In the embodiment of the present invention, the system can double-verify the workpiece position through the detection of the second workpiece sensor. This helps to reduce the problem of inaccurate workpiece position judgment caused by single sensor failure or error. The second workpiece sensor here can be a belt displacement sensor, such as an encoder or servo motor encoder, counter, etc., which updates the moving position of the position data block according to the belt position change measured by the displacement sensor. After passing through the workpiece detection sensor, the numerical characteristics of the data block itself will not change when moving within the belt range. More preferably, the second workpiece sensor here can be a combination of multiple sensors, which can not only realize the specific detection of the workpiece position, but also realize the specific identification of the corresponding workpiece shape and workpiece color.

[0095] When the theoretical state information does not match the actual state, the system can determine the difference between the two and accordingly adjust the state information update strategy of each position data block 41. This real-time correction mechanism ensures the accuracy of the position information and provides a reliable basis for subsequent processing operations.

[0096] By correcting the position information in real time, the system can more accurately determine when the workpiece arrives at the designated processing station, thereby reducing the waiting time for the processing operation. This helps to improve processing efficiency and reduce production costs.

[0097] Real-time correction of position information also helps avoid processing conflicts and delays. When the position of the workpiece changes, the system can adjust the processing sequence and timing in time to ensure that each workpiece can be processed correctly.

[0098] More preferably, the workpiece detection method further includes:

[0099] The PLC internal storage data is adjusted and updated based on historical update data, implemented measurement values, and pre-configured error compensation algorithms to obtain updated prediction results.

[0100] By combining historical update data and implementation measurement values, the system can calibrate the data stored inside the PLC in real time, thereby reducing the problem of inaccurate predictions caused by data deviations or errors.

[0101] Pre-configured error compensation algorithms can further improve data accuracy by compensating for known or potential error sources. This compensation mechanism helps ensure that the system can provide reliable prediction results under various operating conditions.

[0102] Combining historical data with real-time measurements for prediction can more comprehensively reflect the dynamic changes of the system, thereby improving the accuracy of the prediction.

[0103] By updating the PLC internal data in real time, the system can respond to changes more quickly, shorten the prediction response time, and provide more timely guidance for subsequent processing operations.

[0104] Real-time data calibration is achieved by comparing and correcting historical update data and actual measurement values ​​with the data stored in the PLC. The system first collects and stores historical update data, which usually includes past measurement values, calibration results, and system operation status. During the measurement process, the system obtains the current measurement value in real time and compares it with the historical data. If data deviation or error is found, the system automatically triggers the calibration procedure to adjust the data stored in the PLC to ensure data accuracy and consistency.

[0105] Error compensation is achieved through pre-configured error compensation algorithms. These algorithms are usually based on mathematical models and statistical analysis methods, and can compensate for known or potential error sources. For example, for sensor measurement errors, errors caused by environmental changes, etc., the error compensation algorithm can eliminate the impact of these errors through calculation and adjustment. During the workpiece inspection process, the system will call these error compensation algorithms in real time to correct the measurement results, thereby further improving the accuracy of the data.

[0106] Improving prediction accuracy mainly depends on the comprehensive analysis of historical data and real-time measurements. The system will first collect and store a large amount of historical data, including past measurements, system operating status, processing parameters, etc. During the prediction process, the system will combine the current real-time measurements and historical data, and use machine learning algorithms or statistical analysis methods to process and analyze the data. By mining the correlation and regularity between data, the system can more comprehensively reflect the dynamic changes of the system, thereby improving the accuracy of the prediction.

[0107] Shortening the prediction response time is achieved by updating the PLC internal data and optimizing the algorithm in real time. During the workpiece inspection process, the system will obtain the current measurement value in real time and immediately update the PLC internal data. At the same time, the system will also optimize the algorithm to improve the calculation efficiency and response speed. In this way, when the system needs to make a prediction, it can obtain the latest data and information more quickly, thereby shortening the prediction response time and providing more timely guidance for subsequent processing operations.

[0108] The PLC-based workpiece detection method in the embodiment of the present invention realizes accurate mapping of the workpiece position by one-to-one correspondence between each position data block 41 in the data position sequence group 4 and the length mark block 31 in the conveying sequence group. When the workpiece sensor detects the workpiece to be processed, the status information of each position data block 41 in the data position sequence group 4 is updated in real time according to the workpiece size information, current position information and conveying speed information.

[0109] Embodiment 2

[0110] See also Figure 5 , Figure 5 Schematic diagram of the structure of the PLC-based workpiece detection system disclosed in the embodiment of the present invention. Figure 5 As shown, the PLC-based workpiece detection system may include:

[0111] The acquisition module 21 is used to perform a length division operation on the length information of the conveyor belt in the workpiece transport device according to a set length interval to obtain a corresponding conveying sequence group, wherein the conveying sequence group includes a plurality of length marking blocks, and the lengths of the plurality of length marking blocks are the same;

[0112] Data mapping module 22: used to use a set storage area in the data storage area of ​​the PLC as a position storage area, wherein a data position sequence group is set in the position storage area, wherein the data position sequence group includes position data blocks sequentially connected along the length direction, and the state of each position data block is a first data block state or a second data block state; and each position data block in the data position sequence group corresponds one-to-one to a length mark block in the transport sequence group;

[0113] Detection module 23: used for determining the current position information of the corresponding workpiece when receiving the workpiece sensor detecting the workpiece to be processed, and performing real-time update operation on the status information of each position data block in the data position sequence group according to the current position information;

[0114] The position updating module 24 is used to determine the real-time position information of the corresponding workpiece to be processed in the workpiece transport device according to the status information of the position data block updated in real time.

[0115] The PLC-based workpiece detection method in the embodiment of the present invention realizes accurate mapping of the workpiece position by one-to-one correspondence between each position data block in the data position sequence group and the length mark block in the conveying sequence group. When the workpiece sensor detects the workpiece to be processed, the status information of each position data block in the data position sequence group is updated in real time according to the workpiece size information, current position information and conveying speed information.

[0116] Embodiment 3

[0117] See also Figure 6 , Figure 6 Schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention. The electronic device may be a computer, a server, etc. Of course, in certain circumstances, it may also be a smart device such as a mobile phone, a tablet computer, a monitoring terminal, and an image acquisition device with processing functions. Figure 6 As shown, the electronic device may include:

[0118] A memory 510 storing executable program codes;

[0119] a processor 520 coupled to the memory 510;

[0120] The processor 520 calls the executable program code stored in the memory 510 to execute part or all of the steps in the PLC-based workpiece detection method in the first embodiment.

[0121] An embodiment of the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute part or all of the steps in the PLC-based workpiece detection method in the first embodiment.

[0122] The embodiment of the present invention further discloses a computer program product, wherein when the computer program product is run on a computer, the computer is enabled to execute part or all of the steps in the PLC-based workpiece detection method in the first embodiment.

[0123] An embodiment of the present invention further discloses an application publishing platform, wherein the application publishing platform is used to publish a computer program product, wherein when the computer program product runs on a computer, the computer executes part or all of the steps in the PLC-based workpiece detection method in embodiment one.

[0124] In various embodiments of the present invention, it should be understood that the size of the serial numbers of the processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0125] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0126] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0127] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several requests for a computer device (which can be a personal computer, a server or a network device, etc., specifically a processor in a computer device) to perform some or all of the steps of the method described in each embodiment of the present invention.

[0128] In the embodiments provided by the present invention, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.

[0129] A person of ordinary skill in the art can understand that some or all of the steps in the various methods of the embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0130] The PLC-based workpiece detection method, system, electronic device and storage medium disclosed in the embodiments of the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A workpiece detection method based on PLC, characterized in that: include: Performing a length division operation on the length information of the conveyor belt in the workpiece transport device according to a set length interval to obtain a corresponding conveying sequence group, wherein the conveying sequence group includes a plurality of length marking blocks; A set storage area in the data storage area of ​​the PLC is used as a position storage area, a data position sequence group is set in the position storage area, the data position sequence group includes position data blocks connected in sequence along the length direction, the state of each position data block is a first data block state or a second data block state; and each position data block in the data position sequence group corresponds one-to-one to a length mark block in the transport sequence group; When receiving a signal that a workpiece to be processed is detected by a workpiece sensor, current position information of the corresponding workpiece is determined, and status information of each position data block in the data position sequence group is updated in real time according to the current position information; The real-time position information of the corresponding workpiece to be processed in the workpiece transport device is determined according to the status information of the position data block updated in real time.

2. The PLC-based workpiece detection method according to claim 1, characterized in that: The data position sequence group includes a processing data block, and the position information of the processing data block in the data position sequence group corresponds to the position of the actual processing station in the workpiece transport device; the number of the processing data blocks is the same as the number of the actual processing stations; and the lengths of the multiple length mark blocks are all the same; The first data block state is used to indicate that there is a workpiece at the corresponding position, and the second data block state is used to indicate that there is no workpiece at the corresponding position.

3. The PLC-based workpiece detection method according to claim 2, characterized in that: The workpiece detection method further comprises: When it is detected that the state in the processing data block changes from the second data block state to the first data block state, it is determined as a rising edge state, and the devices at the corresponding actual processing station are controlled to work according to the rising edge state to perform the corresponding processing operation; When it is detected that the state in the processing data block changes from the first data block state to the second data block state, it is determined as a falling edge state, and the device at the corresponding actual processing station is controlled to stop working according to the falling edge state.

4. The PLC-based workpiece detection method according to claim 1, characterized in that: When receiving the workpiece sensor detecting the workpiece to be processed, determining the current position information of the corresponding workpiece, and performing a real-time update operation on the status information of each position data block in the data position sequence group according to the current position information, including: When receiving a signal that the first workpiece sensor detects a workpiece to be processed, obtaining a length mark block associated with the first workpiece sensor, determining a corresponding position data block according to the length mark block, and adjusting the state of the position data block to the state of the first data block; When the workpiece to be processed leaves the first workpiece sensor, the state of the position data block associated with the first workpiece sensor is adjusted to the state of the second data block; The status information of each position data block in the data position sequence group is updated in real time according to the current position information.

5. The PLC-based workpiece detection method according to claim 4, characterized in that: The operation of performing real-time updating of the status information of each position data block in the data position sequence group according to the current position information includes: Determine, according to the current position information, that the state information of the corresponding position data block is the first data block state information; The state of the first data block in all the position data blocks corresponding to the workpiece is replaced along the direction of movement of the workpiece, and the state of the data block in the position data block corresponding to each position of the workpiece is moved to the next adjacent position data block in turn until the states of all the position data blocks corresponding to the workpiece are updated, and the state of the previous position data block from which the workpiece moves is adjusted to the state of the second data block.

6. The PLC-based workpiece detection method according to claim 4, characterized in that: The workpiece detection method further includes: When receiving the workpiece to be processed detected by the second workpiece sensor, obtaining the length marking block associated with the second workpiece sensor, and obtaining its theoretical state information according to the corresponding length marking block; If the theoretical state information matches the actual state, it is determined that there is no need to adjust the update strategy of the state information of each position data block. If the theoretical state information does not match the actual state, the difference between the theoretical state information and the actual state is determined, and the update strategy of the state information of each position data block is adjusted according to the difference between the theoretical state information and the actual state.

7. The PLC-based workpiece detection method according to claim 4, characterized in that: The workpiece detection method further includes: The PLC internal storage data is adjusted and updated based on historical update data, implemented measurement values, and pre-configured error compensation algorithms to obtain updated prediction results.

8. A workpiece detection system based on PLC, characterized in that: include: An acquisition module: used for performing a length division operation on the length information of the conveyor belt in the workpiece transport device according to a set length interval to obtain a corresponding conveying sequence group, wherein the conveying sequence group includes a plurality of length marking blocks; Data mapping module: used to use a set storage area in the data storage area of ​​the PLC as a position storage area, wherein a data position sequence group is set in the position storage area, wherein the data position sequence group includes position data blocks sequentially connected along the length direction, and the state of each position data block is a first data block state or a second data block state; and each position data block in the data position sequence group corresponds one-to-one to a length mark block in the transport sequence group; Detection module: used for determining the current position information of the corresponding workpiece when receiving the workpiece sensor detecting the workpiece to be processed, and performing real-time update operation on the status information of each position data block in the data position sequence group according to the current position information; Position update module: used to determine the real-time position information of the corresponding workpiece to be processed in the workpiece transportation device according to the status information of the position data block updated in real time.

9. An electronic device, characterized in that: include: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the PLC-based workpiece detection method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program enables a computer to execute the PLC-based workpiece detection method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Pushing mechanism and object sorting device comprising same

    CN106364895A

  • Automatic sorting device for objects and control method thereof

    CN106391492A

  • Workpiece position correction method and device

    CN112722765A

  • Transport device and method for position monitoring

    CN114096476A

  • Monitoring device for work conveyance condition

    JP1995187448A