A workpiece detection method and system based on PLC

The PLC-based glass positioning method addresses precision and response delays in traditional sensor-based systems by mapping data blocks to length markers for real-time glass position tracking, improving accuracy and efficiency in glass machining.

CN119750153BActive Publication Date: 2025-07-15BOTTERO GLASS IND FOSHAN CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In traditional glass machining, position control methods rely on physical position sensors, which have problems of insufficient accuracy and response delay, making it difficult to meet complex processing needs.

Method used

Using the PLC-based workpiece detection method, each position data block in the data position sequence group corresponds one by one to the length marking block in the conveying sequence group, the workpiece position information is updated in real time, and accurate mapping and automated detection are achieved.

Benefits of technology

It improves the accuracy and production efficiency of workpiece position detection, reduces the overall production line update cost, optimizes the production process, reduces processing errors and resource waste, and improves system stability and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119750153B_ABST
    Figure CN119750153B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention relates to the technical field of position detection, and discloses a workpiece detection method based on PLC, including: performing a length division operation on the length information of the conveyor belt in the workpiece transportation device at a set length interval to obtain a corresponding conveying sequence group; using a set storage area in the data storage area of the PLC as a position storage area, and a data position sequence group is set in the position storage area; when receiving that the workpiece sensor detects 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. In the workpiece detection method based on PLC in the embodiment of the present invention, each position data block in the data position sequence group corresponds one by one to the length marking block in the conveying sequence group, thereby realizing the accurate mapping of the workpiece position.
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 particularly relates to a workpiece detection method and system based on a PLC. Background Art

[0002] At present, in the glass machining scenario, accurately controlling the position of the glass on the conveyor belt is the key to achieving efficient and high-quality machining. Traditional position control methods mainly rely on physical position sensors (such as proximity switches, photoelectric sensors, etc.) to record the changes in the front and rear positions of the glass, so as to judge its current position. Although this method is simple and direct, when facing complex machining requirements, there may be problems such as insufficient accuracy and response delay. Therefore, designing a solution that can more conveniently and quickly achieve workpiece positioning has become a technical problem that needs to be solved urgently by those skilled in the art. Summary of the Invention

[0003] In view of the above defects, an embodiment of the present invention discloses a workpiece detection method based on a PLC, which can achieve efficient detection of the position of a workpiece, and can greatly reduce the update cost of the overall production line through the above-mentioned logic design method, facilitating popularization.

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

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

[0006] Taking a set storage area in the data storage area of the PLC as a position storage area, where 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, 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 the length marking block in the conveying sequence group;

[0007] When a workpiece sensor detects a workpiece to be processed, determining the current position information of the corresponding workpiece, and performing a real-time update operation on the state information of each position data block in the data position sequence group according to the current position information;

[0008] Determining the real-time position information of the corresponding workpiece to be processed in the workpiece transportation device according to the state information of the position data block after real-time update.

[0009] As an alternative implementation manner, in the first aspect of the embodiments of the present invention, the data position sequence group includes processing data blocks, and the position information of the processing data blocks 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 that of the actual processing stations; the lengths of the multiple length marking blocks are the same;

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

[0011] As an alternative implementation manner, in the first aspect of the embodiments 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 the rising edge state, and each device at the corresponding actual processing station is 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 the falling edge state, and the devices at the corresponding actual processing station are controlled to stop working according to the falling edge state.

[0014] As an alternative implementation manner, in the first aspect of the embodiments of the present invention, when it is received that the workpiece sensor detects the workpiece to be processed, determining the current position information of the corresponding workpiece, and performing a real-time update operation on the state information of each position data block in the data position sequence group according to the current position information, includes:

[0015] When it is received that the first workpiece sensor detects the workpiece to be processed, obtaining the length marking block associated with the first workpiece sensor, determining the corresponding position data block according to the length marking block, and adjusting the state of the position data block to the first data block state;

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

[0017] Performing a real-time update operation on the state information of each position data block in the data position sequence group according to the current position information.

[0018] As an alternative implementation manner, in the first aspect of the embodiments of the present invention, performing a real-time update operation on the state 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 the status information of the corresponding position data block as the first data block status information according to the current position information;

[0020] Perform status replacement on the first data block status in all position data blocks corresponding to the workpiece in the moving direction of the workpiece, and sequentially move the data block status in the position data block corresponding to each position of the workpiece to the adjacent next position data block until the status of all position data blocks corresponding to the workpiece is updated, and adjust the status of the previous position data block where the workpiece moves away to the second data block status.

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

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

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

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

[0025] Adjust and update the internal stored data of the PLC according to the historical update data, the implemented measurement value, and the pre-configured error compensation algorithm to obtain the updated prediction result.

[0026] The second aspect of the embodiments of the present invention discloses a workpiece detection system based on a PLC, including:

[0027] An acquisition module: used to perform length division operation on the length information of the conveyor belt in the workpiece transportation device at a set length interval to obtain the corresponding transportation sequence group, and the transportation sequence group includes a plurality of length marking blocks;

[0028] A data mapping module: used to use the set storage area in the data storage area of the PLC as the position storage area, and 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, and the status of each position data block is the first data block status or the second data block status; and each position data block in the data position sequence group corresponds to the length marking block in the transportation sequence group one by one;

[0029] Detection module: When receiving that the workpiece sensor detects the workpiece to be processed, it is used to determine the current position information of the corresponding workpiece, and perform 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;

[0030] Position update module: It is 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 after real-time update.

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

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

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

[0034] In the PLC-based workpiece detection method in the embodiments of the present invention, each position data block in the data position sequence group corresponds to the length marker block in the conveying sequence group one by one, thereby realizing an accurate mapping of the workpiece position. 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 following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0036] Figure 1 It is a flowchart of the PLC-based workpiece detection method disclosed in the embodiments of the present invention;

[0037] Figure 2 It is a flowchart of the status information update disclosed in the embodiments of the present invention;

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

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

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

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

[0042] Reference numerals: 1, first workpiece sensor; 2, workpiece to be processed; 3, conveyor belt; 31, length marking block; 4, data position sequence group; 41, position data block. Detailed implementation manners

[0043] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope 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 "comprising" and "having" and any variations thereof in the embodiments of the present invention are intended to cover non-exclusive inclusion. Exemplarily, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those clearly listed steps or units, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0045] In the glass machining scenario, accurately controlling the position of the glass on the belt is the key to achieving efficient and high-quality machining. Traditional position control methods mainly rely on physical position sensors (such as proximity switches, photoelectric sensors, etc.) to record the changes in the front and rear positions of the glass, so as to judge its current position. Although this method is simple and direct, in the face of complex machining requirements, there may be problems such as insufficient accuracy and response delay. Based on this, the embodiments of the present invention disclose a workpiece detection method, system, electronic device and storage medium based on PLC, which realizes the precise mapping of the workpiece position by making each position data block in the data position sequence group correspond to the length marking block in the conveying sequence group one by one. 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] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of the workpiece detection method based on PLC disclosed in the embodiments of the present invention. Among them, the execution subject of the method described in the embodiments of the present invention is an execution subject composed of software or / and hardware. This execution subject can receive relevant information through wired or / and wireless means and can send certain instructions. Of course, it can also have certain processing functions and storage functions. This execution subject can control multiple devices, such as a remote physical server or a cloud server and related software, or it can be a local host or server and related software that performs relevant operations on devices placed somewhere. In some scenarios, it can also control multiple storage devices, and the storage devices can be placed in the same place or different places as the devices. As Figures 1 to 4 shown, the workpiece detection method based on PLC includes the following steps:

[0048] S101: Obtain the information of the workpiece transportation device. The information of the workpiece transportation device includes the length information of the conveyor belt 2 in the workpiece transportation device; perform a length division operation on the length information of the conveyor belt 2 in the workpiece transportation device according to a set length interval to obtain a corresponding conveying sequence group. The conveying sequence group includes a plurality of length marking blocks 31, and the lengths of the plurality of length marking blocks 31 are the same;

[0049] S102: Use a set storage area in the data storage area of the PLC as a position storage area. A data position sequence group 4 is set in the position storage area. The data position sequence group 4 includes position data blocks 41 connected in sequence along the length direction. The state of each position data block 41 is the first data block state or the second data block state; and each position data block 41 in the data position sequence group 4 corresponds to a length marking block 31 in the conveying sequence group one by one;

[0050] S103: When receiving that the workpiece sensor detects the workpiece to be processed, determine the current position information of the corresponding workpiece, and perform a real-time update operation on the state 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 state information of the position data block 41 after real-time update.

[0052] In the embodiment of the present invention, the method performs a length division operation on the length information of the conveyor belt 2 in the workpiece transportation device to obtain a plurality of marking blocks with the same length, thereby achieving precise segmentation of the conveyor belt 2. This method can ensure that each workpiece has a clear position mark on the conveyor belt 2, facilitating subsequent position detection and data processing. In the embodiment of the present invention, the position data block specifically refers to a position data unit, that is, the smallest data unit stored inside the PLC; the smallest data unit here corresponds to the length marking block; the fixed-length (minimum length) flag block corresponds to the data unit; the minimum length is related to the workpiece movement speed, the PLC scan cycle, and the detection sensor response speed. The minimum length is the separation length of the marking block and also the resolution length of the data unit; the minimum length is determined according to the processing requirements of the workpiece by the processing equipment; consecutive marking blocks or data blocks with the same characteristics indicate the presence or absence of a workpiece.

[0053] In the embodiment of the present invention, a dedicated position storage area is set in the data storage area of the PLC to store the data position sequence group 4. Each position data block 41 in the data position sequence group 4 corresponds one-to-one with the length marking block 31 in the conveying sequence group, thereby achieving precise mapping of the workpiece position.

[0054] When the workpiece sensor detects a 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 knows 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 errors and costs of manual operations but also improves production efficiency. Precise workpiece position information helps to optimize the production process, such as reasonably arranging the processing sequence and adjusting the conveying speed.

[0056] The method of the embodiment of the present invention can process workpieces of different sizes and shapes, and only needs to make corresponding adjustments to the PLC program according to the workpiece information. This makes the method highly flexible and adaptable and can be widely applied to various industrial automation scenarios. Since the method is implemented based on the PLC system, it can be easily integrated with other automation devices and systems. This makes the system easy to expand and maintain and can meet the changes in future production requirements. Precise workpiece position information helps to avoid collisions or overlaps of workpieces during transportation. It can reduce the risk of equipment damage and ensure the safety of operators. By updating the status information of the position data block 41 in real time, the PLC system can promptly detect abnormal situations and give early warnings.

[0057] When implementing specifically, the lengths of the length marking blocks here can be the same or different. In the embodiments of the present invention, they are set to be the same, which makes the calculation and positioning more convenient and fast by setting them to the same length.

[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 3 mm.

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

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

[0061] In the specific implementation algorithm, there is a full shift method (all data areas are moved, the data area is moved once when the belt moves one fixed length, and each data unit is moved), and there is also a relative shift (the pointer moves and the data area does not move). When implementing specifically, in order to further obtain the speed and size parameters, corresponding calculations can also be performed according to 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 stations in the workpiece transportation device; the number of the processing data blocks is the same as that of the actual processing stations.

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

[0064] In the embodiment of the present invention, the position information of the processed data block directly corresponds to the position of the actual processing station in the workpiece transportation device, ensuring that when each workpiece reaches the specified 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 processed data block, the PLC system can dynamically adjust the processing sequence to ensure that the workpieces are processed according to the predetermined process flow. It helps to optimize the production process and reduce waiting time and resource waste.

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

[0066] In the embodiment of the present invention, the PLC system can realize the real-time monitoring and scheduling of the production process by updating the state 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, and optimize production plans and resource allocation. Precise workpiece position and processing station state information helps to reasonably arrange the processing sequence and processing time, and avoid idleness and waste of processing stations.

[0067] In the embodiment of the present invention, the PLC system can realize the visual display of the production process by updating the state information in the data position sequence group 4 in real time. It 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 improvement of introducing the processed data block and clarifying the first data block state and the second data block state in the embodiment of the present invention brings multiple technical effects such as accurately matching processing requirements with workpiece positions, improving the automation level of the production process, optimizing production scheduling and resource allocation, and enhancing the transparency and traceability of the production process. These effects make this method have higher application value and competitiveness in the field of industrial automation, and contribute to the intelligent and efficient development of the manufacturing industry.

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

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

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

[0072] In the solution of the embodiment of the present invention, when it is detected that the processing data block changes from the second data block status (no workpiece) to the first data block status (there is a workpiece), that is, the rising edge status, the PLC system can immediately recognize and trigger the devices at the corresponding processing station to start working. This real-time response ensures that the workpiece can start processing immediately when it reaches the specified position, reduces the waiting time, and improves the processing efficiency.

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

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

[0075] More preferably, when it is received that the workpiece sensor detects the workpiece to be processed, the current position information of the corresponding workpiece is determined, and 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, including:

[0076] S1031: When it is received that the first workpiece sensor 1 detects the workpiece to be processed, the length marking block 31 associated with the first workpiece sensor 1 is obtained, the corresponding position data block 41 is determined according to the length marking block 31, and the status of the position data block 41 is adjusted to the first data block status;

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

[0078] S1033: Perform 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. When the movement of the belt or conveyor belt reaches the set length interval, it means that the workpiece data block has advanced by one data unit or one length interval simultaneously.

[0079] When the workpiece to be processed is detected by the first workpiece sensor 1 in the embodiment of the present invention, the length marking block 31 associated with the sensor is immediately obtained, and the corresponding position data block 41 is determined accordingly. This mechanism ensures the accurate identification of the workpiece position and reduces the processing error caused by inaccurate position judgment.

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

[0081] By accurately identifying the workpiece position and real-time updating the position information, the PLC system can accurately judge when the workpiece reaches the specified 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 the position information also helps to avoid ineffective processing. For example, when the workpiece fails to reach the specified processing station on time due to some reason, the PLC system can immediately stop the operation of the relevant processing equipment, thus avoiding unnecessary energy consumption and processing costs.

[0082] More preferably, the real-time update operation on 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 the status information of the corresponding position data block 41 as the first data block status information according to the current position information;

[0084] Perform state replacement on the first data block state in all position data blocks 41 corresponding to the workpiece along the workpiece movement direction, and sequentially move the data block states in the position data blocks 41 corresponding to each position of the workpiece to the adjacent next position data block 41 until the states of all position data blocks 41 corresponding to the workpiece are updated, and adjust the state of the previous position data block where the workpiece has moved away to the second data block state.

[0085] In the embodiment of the present invention, by performing state replacement on the first data block state in all position data blocks 41 corresponding to the workpiece along the workpiece movement direction according to the conveying speed information, 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, the direction along the workpiece movement can be left, right, up, or down, that is, corresponding mapping is performed according to the actual situation.

[0086] Traditional position judgment methods may lead to inaccurate position judgment due to factors such as sensor errors and workpiece size changes. And this method effectively reduces the position judgment error and improves the stability and reliability of the system by combining multiple information to dynamically update the state information of the position data block 41.

[0087] By accurately tracking the workpiece position and real-time updating the state information of the position data block 41, the system can accurately judge when the workpiece reaches the specified 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 updating of the position information also helps to avoid processing conflicts. For example, when multiple workpieces enter the processing area at the same time, the system can coordinate the processing sequence according to their respective position information to ensure that each workpiece can be correctly processed.

[0089] Real-time updating of the position information helps the system to respond to various abnormal situations (such as workpiece jams, sensor failures, etc.) in a timely manner. By quickly identifying and handling these abnormal situations, the system can reduce the failure rate and improve the overall stability.

[0090] This method dynamically updates the state information of the position data block 41 by combining multiple information. Even in the case of some sensor failures or data loss, the system can still accurately judge the workpiece position 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, obtain the length marking block 31 associated with the second workpiece sensor, and obtain 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 for 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 for 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, through the detection of the second workpiece sensor, the system can double-verify the workpiece position. 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 a servo motor encoder, a counter, etc. According to the change in the belt position measured by the displacement sensor, the moving position of the position data block is updated. After passing through the workpiece detection sensor, the numerical characteristics of the data block itself do 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 specifically detect the workpiece position, but also specifically identify 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 adjust the update strategy for the state information of each position data block 41 accordingly. This real-time correction mechanism ensures the accuracy of the position information and provides a reliable basis for subsequent processing operations.

[0096] By real-time correcting the position information, the system can more accurately determine when the workpiece reaches the specified processing station, thereby reducing the waiting time of the processing operation. This helps to improve the processing efficiency and reduce the production cost.

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

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

[0099] Adjust and update the data stored inside the PLC according to the historical update data, the actual measurement value, and the pre-configured error compensation algorithm to obtain an updated prediction result.

[0100] In the embodiment of the present invention, by combining the historical update data and the actual measurement value, the system can real-time calibrate the data stored inside the PLC and reduce the problem of inaccurate prediction caused by data deviation or error.

[0101] The pre-configured error compensation algorithm can compensate for known or potential error sources, further improving the accuracy of data. This compensation mechanism helps ensure that the system can provide reliable prediction results under various working conditions.

[0102] Combining historical data and real-time measurement values for prediction can more comprehensively reflect the dynamic changes of the system, thus improving the prediction accuracy.

[0103] By updating the internal data of the PLC in real time, the system can respond to changes faster, 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 implementation measurement values with the data stored in the PLC internal memory. The system first collects and stores historical update data, which usually includes past measurement values, calibration results, and system operating status, etc. During the implementation 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 will automatically trigger the calibration program to adjust the data stored in the PLC internal memory to ensure the accuracy and consistency of the data.

[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 influence of these errors through calculation and adjustment. During the workpiece detection process, the system will call these error compensation algorithms in real time to correct the measurement results, thus further improving the accuracy of the data.

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

[0107] Shortening the prediction response time is achieved by updating the internal data of the PLC in real time and optimizing the algorithm. During the workpiece detection process, the system obtains the current measurement value in real time and immediately updates the internal data of the PLC. At the same time, the system also optimizes 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 faster, thus shortening the prediction response time and providing more timely guidance for subsequent processing operations.

[0108] In the embodiment of the present invention, the PLC-based workpiece detection method realizes the accurate mapping of the workpiece position by making each position data block 41 in the data position sequence group 4 correspond one-to-one with the length marking 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, the current position information, and the conveying speed information.

[0109] Embodiment II

[0110] Please refer to Figure 5 , Figure 5 which is a schematic structural diagram of the PLC-based workpiece detection system disclosed in the embodiment of the present invention. As Figure 5 shown, the PLC-based workpiece detection system may include:

[0111] An acquisition module 21: configured to perform a length division operation on the length information of the conveyor belt in the workpiece transportation device at a set length interval to obtain a corresponding conveying sequence group, where 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] A data mapping module 22: configured to use a set storage area in the data storage area of the PLC as a position storage area, and 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, and the status of each position data block is a first data block status or a second data block status; and each position data block in the data position sequence group corresponds one-to-one with the length marking block in the conveying sequence group;

[0113] A detection module 23: configured to, when receiving that the workpiece sensor detects the workpiece to be processed, determine the current position information of the corresponding workpiece, and perform 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;

[0114] A position update module 24: configured 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.

[0115] In the embodiment of the present invention, the PLC-based workpiece detection method realizes the accurate mapping of the workpiece position by making each position data block in the data position sequence group correspond one-to-one with the length marking 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, the current position information, and the conveying speed information.

[0116] Embodiment III

[0117] Please refer to Figure 6 , Figure 6 which is a schematic structural diagram of an electronic device disclosed in an embodiment of the present invention. The electronic device can be a computer, a server, etc. Of course, in certain cases, it can also be a smart device such as a mobile phone, a tablet computer, and a monitoring terminal, as well as an image acquisition device with processing functions. As Figure 6 shown, the electronic device may include:

[0118] A memory 510 storing executable program code;

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

[0120] Wherein, the processor 520 calls the executable program code stored in the memory 510 and executes some or all of the steps in the workpiece detection method based on PLC in the first embodiment.

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

[0122] An embodiment of the present invention also discloses a computer program product, wherein when the computer program product runs on a computer, it causes the computer to execute some or all of the steps in the workpiece detection method based on PLC in the first embodiment.

[0123] An embodiment of the present invention also discloses an application publishing platform, wherein the application publishing platform is used to publish a computer program product, and when the computer program product runs on a computer, it causes the computer to execute some or all of the steps in the workpiece detection method based on PLC in the first embodiment.

[0124] In various embodiments of the present invention, it should be understood that the magnitude of the sequence numbers of the various processes does not necessarily mean the inevitable sequence of execution. The execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to 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, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

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

[0127] When 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 such an 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. This computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc., specifically, the processor in the computer device) to execute some or all of the steps of the methods described in the various embodiments 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. B can also be determined according to A and / or other information.

[0129] Those 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 relevant hardware through a program. This program can be stored in a computer-readable storage medium. 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 electrically-erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or other optical disc memories, magnetic disk memories, tape memories, or any other computer-readable medium that can be used to carry or store data.

[0130] The above has introduced in detail the workpiece detection method, system, electronic device and storage medium based on PLC disclosed in the embodiments of the present invention. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A workpiece detection method based on PLC, characterized in that, Including: Performing a length division operation on the length information of the conveyor belt in the workpiece transportation device at set length intervals to obtain a corresponding conveying sequence group, where the conveying sequence group includes a plurality of length marking blocks; Taking a set storage area in the data storage area of the PLC as a position storage area, in which a data position sequence group is set, the data position sequence group includes position data blocks connected in sequence along the length direction, and the state of each position data block is the first data block state or the second data block state; and each position data block in the data position sequence group corresponds one-to-one to the length marking block in the conveying sequence group; When receiving that the workpiece sensor detects a workpiece to be processed, determining the current position information of the corresponding workpiece, and performing a real-time update operation on the state information of each position data block in the data position sequence group according to the current position information; Determining the real-time position information of the corresponding workpiece to be processed in the workpiece transportation device according to the state information of the position data block after real-time update.

2. The workpiece detection method based on PLC according to claim 1, characterized in that, The data position sequence group includes processing data blocks, the position information of the processing data blocks 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 that of the actual processing stations; the lengths of the plurality of length marking blocks are all the same; The first data block state is used to represent that there is a workpiece at the corresponding position, and the second data block state is used to represent that there is no workpiece at the corresponding position.

3. The workpiece detection method based on PLC according to claim 2, wherein, The workpiece detection method further includes: When detecting that the state of the processing data block changes from the second data block state to the first data block state, determining it as the rising edge state, and controlling the devices at the corresponding actual processing station to work according to the rising edge state to perform corresponding processing operations; When detecting that the state of the processing data block changes from the first data block state to the second data block state, determining it as the falling edge state, and controlling the devices at the corresponding actual processing station to stop working according to the falling edge state.

4. The PLC-based workpiece detection method according to claim 1, wherein, The step of when receiving that the workpiece sensor detects a workpiece to be processed, determining the current position information of the corresponding workpiece, and performing a real-time update operation on the state information of each position data block in the data position sequence group according to the current position information includes: When receiving that the first workpiece sensor detects a workpiece to be processed, obtaining the length marking block associated with the first workpiece sensor, determining the corresponding position data block according to the length marking block, and adjusting the state of the position data block to the first data block state; When the workpiece to be processed leaves the first workpiece sensor, adjusting the state of the position data block associated with the first workpiece sensor to the second data block state; Performing a real-time update operation on the state information of each position data block in the data position sequence group according to the current position information.

5. The workpiece detection method based on PLC according to claim 4, wherein, The step of performing a real-time update operation on the state information of each position data block in the data position sequence group according to the current position information includes: Determining that the state information of the corresponding position data block is the first data block state information according to the current position information; Replace the status of the first data block in all position data blocks corresponding to the workpiece along the moving direction of the workpiece, and sequentially move the data block status in the position data blocks corresponding to each position of the workpiece to the adjacent next position data block until the status of all position data blocks corresponding to the workpiece is updated, and adjust the status of the position data block at the previous position where the workpiece has moved away to the second data block status.

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, obtain the length marking block associated with the second workpiece sensor, and obtain its theoretical status information according to the corresponding length marking block; If the theoretical status information matches the actual status, it is determined that there is no need to adjust the update strategy of the status information of each position data block. If the theoretical status information does not match the actual status, determine the difference between the theoretical status information and the actual status, and adjust the update strategy of the status information of each position data block according to the difference between the theoretical status information and the actual status.

7. The workpiece detection method based on PLC according to claim 4, wherein The workpiece detection method further includes: Adjust and update the data stored in the PLC according to the historical update data, the actual measurement value, and the pre-configured error compensation algorithm to obtain the updated prediction result.

8. A workpiece detection system based on PLC, characterized in that, It includes: An acquisition module: used to perform length division operations on the length information of the conveyor belt in the workpiece transportation device at a set length interval to obtain a corresponding conveying sequence group, and the conveying sequence group includes a plurality of length marking blocks; A data mapping module: used to use a set storage area in the data storage area of the PLC as a position storage area. In the position storage area, there is a data position sequence group, and the data position sequence group includes position data blocks connected in sequence along the length direction. The status of each position data block is the first data block status or the second data block status; and each position data block in the data position sequence group corresponds one-to-one with the length marking block in the conveying sequence group; A detection module: used to determine the current position information of the corresponding workpiece when receiving the workpiece to be processed detected by the workpiece sensor, and perform real-time update operations on the status information of each position data block in the data position sequence group according to the current position information; A 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 after real-time update.

9. An electronic device, characterized in that, It includes: 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 causes the 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