Control method and device, electronic equipment and medium
By setting multiple detection points on the filling line and using counting and action signals to control, the accuracy of product identification and processing in product production is solved, and stable and efficient processing is achieved under different production conditions.
Patent Information
- Application Number
- CN202510369108.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-07-11
AI Technical Summary
In the production process of products, especially on the filling line, it is difficult to accurately identify and process products at different production lines and conveying speeds, especially when the sensor is triggered by mistake, resulting in product processing errors.
By setting multiple detection points on the assembly line, counting the product with the detection device, and outputting an action signal to the action actuator when specific conditions are met, combining the first-in first-out algorithm and the anti-dust mechanism to ensure the accuracy and stability of product processing.
It realizes accurate identification and processing of products that meet specific conditions under different production conditions, reduces algorithm complexity, improves system stability, and prevents error processing caused by false signals.
Smart Images

Figure CN120295235A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of product production and its control, and particularly to a control method, apparatus, electronic device, and medium. Background Art
[0002] During the product production process, it is necessary to identify and process products that meet specific conditions. For example, during the filling process, the entire filling line needs to go through processes such as filling, weighing, valve installation, valve arrangement, capping, and waste rejection. When the weighing sensor in the weighing process detects that the filling is unqualified, the corresponding subsequent processes need to be closed in sequence, and when the next qualified product comes, they need to be opened in sequence, and at the same time, the waste rejection function needs to be completed. Due to different conveyor speeds on the same production line or different mechanical designs of different production lines, the number of products in the interval may be different. A control method applicable to different situations for identifying and processing products that meet specific conditions is particularly important. Summary of the Invention
[0003] In view of this, the present disclosure provides a control method, apparatus, electronic device, and medium for at least partially solving the above technical problems.
[0004] In a first aspect, the present disclosure provides a control method, the method including: counting the products passing through according to a signal received from a first detection device indicating that a product has passed through a first detection point, and when information indicating that a product meeting a first condition is detected is received from a second detection device, writing the current count value of the products passing through the first detection point into an array; wherein, the first detection device and the second detection device are both arranged near the first detection point; counting the products passing through according to a signal received from a third detection device indicating that a product has passed through a second detection point, and if the count value of the products passing through the second detection point is equal to a value in the array, outputting an action signal to an action execution mechanism; wherein, the third detection device and the action execution mechanism are arranged near the second detection point, and the first detection point and the second detection point are arranged in sequence along the conveying direction of the production line.
[0005] Second aspect, the present disclosure provides a control device, the device comprising: a first counting module for counting the products passing by according to a signal received from a first detection device indicating that a product has passed through a first detection point; a data writing module for writing the current count value of the products passing through the first detection point into an array when information indicating that a product meeting a first condition has been detected is received from a second detection device, wherein the first detection device and the second detection device are both arranged near the first detection point; a second counting module for counting the products passing by according to a signal received from a third detection device indicating that a product has passed through a second detection point; a comparison and output module for outputting an action signal to an action execution mechanism if the count value of the products passing through the second detection point is equal to a value in the array, wherein the third detection device and the action execution mechanism are arranged near the second detection point, and the first detection point and the second detection point are sequentially arranged along the conveying direction of the production line.
[0006] Third aspect, the present disclosure provides an electronic device, the electronic device comprising: a processor, a communication interface, a memory and a bus, and the processor, the communication interface and the memory complete communication with each other through the bus; the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to perform the operations corresponding to the method described in the first aspect.
[0007] Fourth aspect, the present disclosure provides a machine-readable storage medium, on which machine instructions are stored, and when the machine instructions are executed by a processor, the processor is enabled to perform the method described in the first aspect.
[0008] In the embodiments of the present application, it is applicable to the screening and processing process of products meeting specific conditions in various production situations, has a low algorithm complexity, high stability, and is easy to implement. In addition, an anti-fooling function is added to prevent mis-signals from causing misalignment. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 is a flowchart of a control method according to an embodiment of the present disclosure.
[0010] Figure 2 is a structural diagram of a control device according to an embodiment of the present disclosure.
[0011] Figure 3 is a structural diagram of an electronic device according to an embodiment of the present disclosure.
[0012] LIST OF REFERENCE NUMERALS:
[0013] Control device 200; First counting module 210;
[0014] Data writing module 220; Second counting module 230;
[0015] Comparison and output module 240; Electronic device 300;
[0016] Processor 302; Communication interface 304;
[0017] Memory 306; Bus 308;
[0018] Program 310. Detailed implementation manners
[0019] To make the objectives, technical solutions, and advantages of this application clearer and more understandable, the following further elaborates on this application with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all of them. All other technical solutions obtained by those of ordinary skill in the art based on the embodiments in this application fall within the scope of protection of this application.
[0020] Figure 1 The flowchart of a control method according to an embodiment of the present disclosure is shown. As Figure 1 shown, the method includes: In step S110, count the passing products according to the signal indicating that a product has passed the first detection point received from the first detection device, and when the information indicating that a product meeting the first condition is detected is received from the second detection device, write the current count value of the products passing through the first detection point into an array; wherein, both the first detection device and the second detection device are arranged near the first detection point. In step S120, count the passing products according to the signal indicating that a product has passed the second detection point received from the third detection device. If the count value of the products passing through the second detection point is equal to a value in the array, output an action signal to the action execution mechanism; wherein, the third detection device and the action execution mechanism are arranged near the second detection point, and the first detection point and the second detection point are sequentially arranged along the pipeline transmission direction.
[0021] In this embodiment, the first detection device and the third detection device are respectively used to detect whether a product has passed the first detection point and the second detection point, and output corresponding signals when it is detected that a product has passed the first detection point and the second detection point. The first detection device and the third detection device are, for example but not limited to, photoelectric switches, infrared sensors, etc. Optionally, the method further includes the following steps: Obtain in real time from the first detection device, the second detection device, and the third detection device the corresponding signals indicating that a product has passed the first detection point, the signal indicating that a product has passed the second detection point, and the information indicating that a product meeting the first condition is detected.
[0022] In this embodiment, optionally, the detection ends of the first detection device and the second detection device respectively point to the first detection point, the detection end of the third detection device points to the second detection point, and the action execution mechanism is configured to extend the action execution end to the first detection point when receiving the action signal. The action execution mechanism is, for example but not limited to, a manipulator, a cylinder, etc.
[0023] Optionally, the method further includes the following data pop - stack step: when outputting the action signal to the action execution mechanism, pop the value in the array that is equal to the count value of the pair of products passing through the second detection point.
[0024] In this embodiment, the array is preferably A[] = {1, 2, …, n}, where n is an integer not greater than the maximum number of products in each production batch. Optionally, in step S110, the first - in - first - out algorithm can be used to execute the step of writing the current count value of the products passing through the first detection point into the array; and, in step S120, the first - in - first - out algorithm can be used to execute the step of popping the value in the array that is equal to the count value of the pair of products passing through the second detection point.
[0025] In practical applications, the first detection device or the third detection device may be mis - triggered, resulting in counting errors. When the first detection device or the third detection device is mis - triggered, the count value a of the products passing through the first detection point and the count value b of the products passing through the second detection point may be misaligned and cannot be corresponded, and the kick - out action cannot be triggered normally. To avoid this problem, anti - fooling processing can be exemplarily performed through the following steps: in response to receiving the start signal of a new production batch, clear the values in the array, and respectively clear the count value of the products passing through the first detection point and the count value of the products passing through the second detection point.
[0026] The embodiments of the present disclosure are, for example but not limited to, applied to the kick - out process during the filling process. The action execution mechanism is a cylinder, and the first condition is the defective product condition.
[0027] To implement the control method of the above - mentioned embodiment, other embodiments of the present invention also provide a control device 200, as Figure 2 shown, the device 200 includes a first counting module 210, a data writing module 220, a second counting module 230, and a comparison and output module 240. It should be noted that since the following embodiments are for implementing the foregoing method embodiments, each module in the control device 200 is set to implement each step of the method in the foregoing embodiments. Therefore, the present invention is not limited to the following embodiments, and any module that can implement the above - mentioned method should be included in the protection scope of the present invention.
[0028] In this embodiment, the first counting module 210 is configured to count the products passing by according to the signal received from the first detection device indicating that a product has passed the first detection point. Optionally, the device 200 further includes an acquisition module, which is configured to acquire in real time from the first detection device the corresponding signal indicating that a product has passed the first detection point.
[0029] In this embodiment, the data writing module 220 is configured to write the current count value of the products passing by the first detection point into an array when receiving from the second detection device the information indicating that a product meeting the first condition has been detected; wherein, both the first detection device and the second detection device are arranged near the first detection point. Exemplarily, the data writing module 220 is further configured to perform the step of writing the current count value of the products passing by the first detection point into the array by using the first-in-first-out algorithm. Optionally, the acquisition module is further configured to acquire in real time from the second detection device the corresponding signal indicating that a product has passed the second detection point.
[0030] Optionally, in response to receiving the start signal of a new production batch, clear the values in the array, and respectively reset to zero the count value of the products passing by the first detection point and the count value of the products passing by the second detection point. Optionally, the array is A[] = {1, 2,..., n}, where n is an integer not greater than the maximum number of products in each production batch.
[0031] Optionally, the device 200 includes a data popping module, which is configured to pop out the value in the array that is equal to the count value of the products passing by the second detection point when outputting the action signal to the action execution mechanism. Exemplarily, the data popping module is further configured to perform the step of popping out the value in the array that is equal to the count value of the products passing by the second detection point by using the first-in-first-out algorithm.
[0032] Optionally, the detection ends of the first detection device and the second detection device respectively point to the first detection point, the detection end of the third detection device points to the second detection point, and the action execution mechanism is configured to extend the action execution end to the first detection point when receiving the action signal.
[0033] In this embodiment, the second counting module 230 is configured to count the products passing by according to the signal received from the third detection device indicating that a product has passed the second detection point. Optionally, the acquisition module is further configured to acquire in real time from the third detection device the corresponding information indicating that a product meeting the first condition has been detected.
[0034] In this embodiment, the comparison and output module 240 is configured to output an action signal to the action execution mechanism if the count value of the product passing through the second detection point is equal to a value in the array. The third detection device and the action execution mechanism are arranged near the second detection point, and the first detection point and the second detection point are sequentially arranged along the pipeline transmission direction.
[0035] Embodiments of the present disclosure are, for example but not limited to, applied to the kicking waste process during the filling process. The first detection device and the third detection device are respectively photoelectric switches, the action execution mechanism is a cylinder, and the first condition is a defective product condition.
[0036] It should be noted that the control method of the foregoing embodiment is a method embodiment corresponding to the control device 200 of this embodiment. The control device 200 of this embodiment can cooperate with the control method of the foregoing embodiment. The relevant technical details mentioned in the control method of the foregoing embodiment are still valid in the control device 200 of this embodiment. To avoid repetition, they are not described here again.
[0037] Figure 3 is a schematic diagram of an electronic device according to an embodiment of the present application. The specific implementation of the electronic device is not limited in the specific embodiments of the present application. Refer to Figure 3 The electronic device 300 provided by the embodiment of the present application includes: a processor 302, a communication interface 304, a memory 306, and a bus 308. Among them:
[0038] The processor 302, the communication interface 304, and the memory 306 communicate with each other through the bus 308.
[0039] The communication interface 304 is used to communicate with other electronic devices or servers.
[0040] The processor 302 is configured to execute the program 310, and specifically can execute the relevant steps in the above method embodiment.
[0041] Specifically, the program 310 may include program codes, and the program codes include computer operation instructions.
[0042] The processor 302 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application. One or more processors included in the intelligent device may be of the same type of processor, such as one or more CPUs; or may be of different types of processors, such as one or more CPUs and one or more ASICs.
[0043] A memory 306 for storing a program 310. The memory 306 may include high-speed RAM memory and may also include non-volatile memory, such as at least one disk memory.
[0044] The program 310 can specifically be used to cause the processor 302 to execute the methods in any of the foregoing embodiments.
[0045] For the specific implementation of each step in the program 310, reference may be made to the corresponding steps and the descriptions in the corresponding units in the foregoing method embodiments, which will not be elaborated herein. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the devices and modules described above can refer to the corresponding process descriptions in the foregoing method embodiments, which will not be elaborated herein.
[0046] This application also provides a computer-readable storage medium storing instructions for causing a machine to execute the methods described herein. Specifically, a system or device equipped with a storage medium can be provided, on which software program codes for implementing the functions in any of the foregoing embodiments are stored, and the computer (or CPU or MPU) of the system or device is caused to read and execute the program codes stored in the storage medium.
[0047] In this case, the program code read from the storage medium itself can implement the functions in any of the foregoing embodiments. Therefore, the program code and the storage medium storing the program code constitute a part of this application.
[0048] Embodiments of the storage medium for providing program codes include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Optionally, the program code can be downloaded from a server computer via a communication network.
[0049] This application embodiment also provides a computer program product including computer instructions that direct a computing device to perform any corresponding operations in the foregoing multiple method embodiments.
[0050] It should be noted that according to the needs of implementation, the various components / steps described in the embodiments of this application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the objectives of the embodiments of this application.
[0051] The method according to the embodiments of the present application can be implemented in hardware, firmware, or be implemented as software or computer code that can be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or be implemented as computer code that is originally stored in a remote recording medium or a non-transitory machine-readable medium and downloaded through a network and will be stored in a local recording medium, so that the method described herein can be stored on such a software process on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component (such as a RAM, a ROM, a flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown herein, the execution of the code converts the general-purpose computer into a dedicated computer for executing the method shown herein.
[0052] It should be noted that not all steps and modules in the above-mentioned various processes and system structure diagrams are necessary, and some steps or modules can be ignored according to actual needs. The execution order of each step is not fixed and can be adjusted according to needs. The system structure described in the above-mentioned various embodiments can be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented separately by multiple physical entities, or some components in multiple independent devices may be jointly implemented.
[0053] In this patent application, nouns and pronouns related to people are not limited to a specific gender. The term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not explicitly listed, or also includes elements inherent to such a process, method, article or device. Without further limitation, an element defined by the statement "comprising one" does not exclude the existence of another identical element in the process, method, article or device comprising the element.
[0054] In the above-mentioned various embodiments, the hardware module can be implemented mechanically or electrically. For example, a hardware module can include permanent dedicated circuits or logic (such as a dedicated processor, FPGA or ASIC) to complete corresponding operations. The hardware module can also include programmable logic or circuits (such as a general-purpose processor or other programmable processors), which can be temporarily set by software to complete corresponding operations. The specific implementation method (mechanical method, or dedicated permanent circuit, or temporarily set circuit) can be determined based on cost and time considerations.
[0055] The above has shown and described the present application in detail through the accompanying drawings and preferred embodiments. However, the present application is not limited to these disclosed embodiments. Based on the above-mentioned multiple embodiments, those skilled in the art can know that the code review means in the above different embodiments can be combined to obtain more embodiments of the present application, and these embodiments are also within the protection scope of the present application.
Claims
1. A control method, characterized in that, The method includes: Counting the passing products according to the signal indicating that a product has passed the first detection point received from the first detection device, and when receiving the information indicating that a product meeting the first condition is detected from the second detection device, writing the current count value of the products passing the first detection point into an array; wherein, both the first detection device and the second detection device are arranged near the first detection point; Counting the passing products according to the signal indicating that a product has passed the second detection point received from the third detection device, and if the count value of the products passing the second detection point is equal to a value in the array, outputting an action signal to the action execution mechanism; wherein, the third detection device and the action execution mechanism are arranged near the second detection point, and the first detection point and the second detection point are arranged in sequence along the pipeline conveying direction.
2. The method according to claim 1, characterized in that, The method further includes: Obtaining in real time from the first detection device, the second detection device and the third detection device the signals indicating that a product has passed the first detection point, the signal indicating that a product has passed the second detection point, and the information indicating that a product meeting the first condition is detected.
3. The method according to claim 1, characterized in that, The detection ends of the first detection device and the second detection device respectively point to the first detection point; The detection end of the third detection device points to the second detection point, and the action execution mechanism is configured to extend the action execution end to the first detection point when receiving the action signal.
4. The method according to claim 1, characterized in that The method further includes: When outputting the action signal to the action execution mechanism, popping the value in the array that is equal to the count value of the products passing the second detection point.
5. The method according to claim 4, characterized in that, The method further includes: Using the first-in-first-out algorithm to execute the step of writing the current count value of the products passing the first detection point into the array and the step of popping the value in the array that is equal to the count value of the products passing the second detection point; wherein, the array is A[] = {1, 2,..., n}, and n is an integer not greater than the maximum number of products in each production batch.
6. The method according to claim 1, wherein The method further includes: In response to receiving the start signal of a new production batch, clearing the values in the array, and respectively clearing the count values of the products passing the first detection point and the products passing the second detection point.
7. The method according to claim 1, wherein The first detection device and the third detection device are respectively photoelectric switches, the action execution mechanism is a cylinder, and the first condition is the defective product condition.
8. A control device (200), characterized in that, The device (200) includes: A first counting module (210) for counting the passing products according to the signal indicating that a product has passed the first detection point received from the first detection device; A data writing module (220) for writing the current count value of the products passing the first detection point into an array when receiving the information indicating that a product meeting the first condition is detected from the second detection device; wherein, both the first detection device and the second detection device are arranged near the first detection point; A second counting module (230) for counting the products passing by according to a signal received from a third detection device indicating that a product has passed through a second detection point; A comparison and output module (240) for outputting an action signal to an action execution mechanism if the count value of the products passing through the second detection point is equal to a value in the array; wherein, the third detection device and the action execution mechanism are arranged near the second detection point, and the first detection point and the second detection point are sequentially arranged along the conveying direction of the pipeline.
9. An electronic device (300), the electronic device (300) comprising: A processor (302), a communication interface (304), a memory (306) and a bus (308), and the processor (302), the communication interface (304) and the memory (306) complete communication with each other through the bus (308); The memory (306) is used for storing at least one executable instruction, and the executable instruction causes the processor (302) to execute the operations corresponding to the method according to any one of claims 1-7.
10. A machine-readable storage medium, on which machine instructions are stored, and when the machine instructions are executed by a processor, the processor is caused to execute the method according to any one of claims 1-7.