Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. The technical scheme of the application obtains, stores, uses, processes and the like the data, which all meet the relevant regulations of national laws and regulations.
Example 1
Fig. 1 is a schematic structural diagram of a cigarette warehouse missing detecting system according to a first embodiment of the present invention, where the present embodiment is a cigarette warehouse missing detecting system, and the system may be applied to a missing detecting scene of a cigarette packaging device, as shown in fig. 1, and the system includes a cigarette detecting module 110 and a control module 120, where the cigarette detecting module 110 includes at least one cigarette detecting channel;
The cigarette detection module 110 is configured to send a detection start signal to the control module 120 and emit laser to cigarettes in each cigarette detection channel when detecting a preset level signal;
the cigarette detection module 110 is further configured to receive reflected light rays of the laser on the cigarette, and generate reflected received data according to the reflected light rays;
the control module 120 is configured to obtain the reflected received data output by the cigarette detection module 110 after receiving the detection start signal, and determine the detection result of the missing cigarette according to the reflected received data of each cigarette detection channel.
In this aspect, the cigarette detection module 110 may be a non-contact detection module based on a laser sensor, and may include a transmitting unit and a receiving unit. The transmitting unit is used for transmitting laser to the cigarette, and the receiving unit is used for receiving the reflected light of the cigarette. The control module 120 may include a controller such as a single-chip microcomputer, a microprocessor, and the like, and may further include peripheral circuits of the controller, such as a voltage stabilizing circuit, a power supply circuit, and the like.
To achieve accurate detection of cigarettes, the cigarette detection module 110 may include one or more cigarette detection channels, each of which may detect a single or a preset number of cigarettes. The cigarette detection module 110 can periodically detect cigarettes in the cigarette warehouse, and the detection period can be controlled by a square wave signal. The start or end of the detection period may be marked, for example, with a square wave rising edge.
It is easy to understand that the preset level signal may be a rising edge signal or a falling edge signal. The cigarette detection module 110 may start moving toward the cigarettes when detecting the preset level signal, and when the distance between the cigarette detection module 110 and the cigarettes is within the preset distance range, laser light is emitted to the cigarettes in each cigarette detection channel through the emission unit. After the laser light is emitted, the cigarette detection module 110 may receive the reflected light of the laser light on the cigarette through the receiving unit, and generate reflected received data according to the reflected light, that is, convert an analog signal (optical signal) into a digital signal (electrical signal).
The cigarette detection module 110 may also send a detection start signal to the control module 120 to report the working state of the cigarette detection module 110 while detecting the preset level signal. The detection start signal may be a flag signal. After receiving the detection start signal sent by the cigarette detection module 110, the control module 120 may obtain the reflected reception data output by the cigarette detection module 110, and determine the missing detection result of each cigarette detection channel according to the reflected reception data of each cigarette detection channel.
It can be appreciated that the control module 120 may determine the count lack detection result of each cigarette detection channel according to the value of the reflected received data, or determine the count lack detection result of each cigarette detection channel according to whether the reflected received data is complete. The missing count detection result may include whether the cigarette detection channel is missing or not, and may further include the number of cigarettes missing from the cigarette detection channel.
In a possible implementation, the control module 120 is further configured to determine that the cigarette detection channel is defective when the reflected received data of the cigarette detection channel is less than or equal to a preset sensitivity.
The control module 120 may preset the sensitivity as a reference value of the reflected received data, determine that the cigarette detection channel is not defective if the reflected received data of the cigarette detection channel is less than or equal to the sensitivity, and determine that the cigarette detection channel is not defective if the reflected received data of the cigarette detection channel is greater than the sensitivity.
According to the scheme, accurate and reliable detection of the defects can be realized through reflecting the comparison result of the received data and the sensitivity.
Based on the above scheme, optionally, the control module 120 is further configured to determine that the cigarette detection channel fails when the continuous preset number of times of missing cigarette detection results of the cigarette detection channel are missing cigarettes.
The control module 120 may record the failure detection result of each cigarette detection channel in each detection period, and if the failure detection results of the continuous preset times of the cigarette detection channels are all failure, the cigarette detection channels may have faults, so that the failure detection needs to be performed on the cigarette detection channels. The preset number of times may be set according to a failure probability of the cigarette detection channel, for example, 5 times of failures occur every 100 times of cigarette detection by the cigarette detection channel, and the preset number of times may be set to 5 times.
According to the scheme, the fault condition of the cigarette detection channel can be detected according to the continuously output missing detection result, so that the faults of the cigarette detection module can be eliminated in time, and the cigarette packaging efficiency is guaranteed.
According to the technical scheme, when a cigarette detection module detects a preset level signal, a detection starting signal is sent to a control module, laser is emitted to cigarettes in all cigarette detection channels, the cigarette detection module receives reflected light rays of the laser on the cigarettes and generates reflected receiving data according to the reflected light rays, and after the control module receives the detection starting signal, the control module obtains the reflected receiving data output by the cigarette detection module and determines a missing detection result according to the reflected receiving data of all cigarette detection channels. The technical scheme solves the problems of low detection accuracy and the like of the cigarettes, can improve the detection accuracy of the cigarettes at the same time of ensuring the operation efficiency of the cigarette packing machine, and reduces the maintenance cost of a cigarette warehouse detection system of the cigarettes.
Example two
This embodiment is a preferred embodiment provided on the basis of the above-described embodiment. Fig. 2 is a schematic structural diagram of a cigarette warehouse defect detecting system according to a second embodiment of the present invention. As shown in fig. 2, the components of the original tobacco warehouse shortage detection system are unchanged, and a communication module 130 and a user terminal 140 are added.
In this embodiment, the user terminal 140 is configured to send a request signal to the communication module 130, where the request signal includes at least one of a parameter setting signal, an information query signal, and a cigarette detection channel control signal;
The communication module 130 is configured to receive the request signal and send the request signal to the control module 120;
The control module 120 is configured to process the request signal, determine a response signal, and send the response signal to the communication module 130;
the communication module 130 is configured to receive the response signal and send the response signal to the user terminal 140.
It can be appreciated that the smoke library branch lack detection system may deploy the communication module 130 for receiving the request signal sent by the user terminal 140. The user terminal 140 may be a smart phone, a computer, a tablet computer, etc. of the user, and the user terminal 140 may be configured with a defect detection management application to facilitate information acquisition and detection control. The user can perform operations such as parameter setting, information inquiry, cigarette detection channel control and the like on the deficiency detection management application interface. Accordingly, in response to a request operation of the user terminal 140, the user terminal 140 may transmit a request signal to the communication module 130. Specifically, the request signal may include a parameter setting signal, an information inquiry signal, a cigarette detection channel control signal, and the like. The parameter setting signal may include a setting signal of parameters such as sensitivity, detection period, and the like. The information inquiry signal can comprise the inquiry signal of the information such as the number of times of cigarette detection, the number of times of failure of the cigarette detection channel, the detection result of the deficiency of the cigarette detection channel and the like. The control signals of the cigarette detection channel can comprise control signals of the states of opening, closing, testing and the like of the cigarette detection channel.
The communication module 130 may receive a request signal of the user terminal 140 and transmit the request signal to the control module 120. The control module 120 may perform corresponding processing on the request signal, generate a response signal according to the response information, and transmit the response signal to the communication module 130. For example, the request signal is a sensitivity setting signal, the response signal can be a sensitivity setting success signal, the request signal is a detection result inquiry signal of the deficiency, and the response signal can feed back the detection result of the deficiency. The communication module 130 may receive the response signal and transmit to the user terminal 140. The user terminal 140 may receive the response signal and recognize the response signal to restore the response information.
The scheme can realize remote control of the cigarette warehouse shortage detection system, and is favorable for flexible setting of parameters and timely acquisition of information.
Based on the scheme, the cigarette warehouse missing detection system further comprises a storage module, wherein the storage module is used for storing sensitivity, missing detection results, fault detection results and cigarette detection channel control records.
The system is easy to understand, and the system stores the information such as sensitivity, the detection result of the cigarette missing, the detection result of the fault, the control record of the cigarette detection channel and the like, is favorable for realizing the efficient management of the system, and timely eliminates the abnormality and orderly restores the operation of the system under the emergency conditions such as power failure, fault and the like of the system.
In a specific example, the cigarette bank defect detecting system comprises a power circuit, a singlechip, a WiFi communication module, a laser sensor module, a storage module and the like. The main working principle of the system is that the laser is emitted by the emitting unit of the laser sensor module, when encountering cigarettes, the light is reflected back and received by the receiving unit of the laser sensor module, and after being converted by the analog-to-digital unit of the singlechip, the state of the cigarettes is judged by comparing the return value with the set sensitivity value. According to the state of the cigarettes, information such as cigarette detection signals, total number of cigarettes, sensor failure times and the like can be obtained. And storing the information such as the cigarette detection times, the sensor failure times, the laser sensor states (laser start-stop states and sensitivity values) and the like into a storage module so as to realize that the user configuration is not lost along with the system outage. The data interaction of the cigarette bank missing detection system is realized through a WiFi communication module, a server is built on the WiFi communication module, and a user terminal can be connected with the cigarette bank missing detection system in a TCP mode to inquire or modify the system state and related parameters.
After the cigarette library defect detection system is powered on and started, firstly, program initialization is carried out, including initialization of analog-to-digital conversion configuration functions, serial port configuration functions, wiFi communication module functions, storage functions and the like. After the program is initialized, the singlechip reads the data (data set by a user) of the storage module, and periodically calls functions such as an analog-digital conversion processing function, a WiFi data processing function, a storage read-write function and the like, so that the functions of cigarette detection, fault self-diagnosis, starting or closing of a laser power supply, sensitivity adjustment, inquiry of various parameters and the like of a cigarette detection channel are realized.
The initialization of the analog-to-digital conversion processing function comprises the configuration of data acquisition pins, the configuration of output driving pins, the configuration of parameters such as analog-to-digital conversion signal sampling time, channel holding time, working clock frequency and the like.
The initialization of the WiFi data processing function comprises two aspects of communication port configuration and WiFi server establishment setting. The ESP8266 chip is adopted as a WiFi communication module to communicate with the user terminal, and a serial port communication mode is used for carrying out data transmission with the WiFi communication module, so that a corresponding serial port is required to be defined in the singlechip to carry out data transmission with the WiFi communication module, the serial port configuration comprises selection of data bits, baud rates, interrupt enabling and serial port numbers, a server is built in the ESP detection system after the serial port configuration is completed, and parameters such as WiFi names, passwords, multiple connection modes and the like are set.
The following describes the analog-to-digital conversion processing function, the WiFi data processing function, and the user data initializing function, respectively.
The analog-to-digital conversion processing function converts the analog quantity signal received by the laser sensor module receiving unit into a digital signal, and the cigarette detection state is obtained by comparing the digital signal with the sensitivity. And the rising edge and the falling edge of the cigarette detected by the laser sensor are obtained according to the detection state of the cigarette.
The cigarette detection times acquisition method comprises the step of calculating the total cigarette detection times through rising edge signals, namely adding one to the cigarette detection times when the rising edge signals exist in the sensor.
In the cigarette detection method, when all 7 cigarette detection channels detect cigarettes (digital signals are larger than the sensitivity value), a low level is output to indicate that the cigarettes are detected. When the use AND logic judges hold a service on the 49th day after one's death channels are 1 at the same time, 0 is output to indicate that the cigarette bank is free of cigarettes.
The fault self-diagnosis method of the cigarette detection channels comprises the step of judging the detection state of each cigarette detection channel when the laser sensor module is close to the cigarette. The rising edge of one of the cigarette detection channels is used for identifying that the laser sensor module is close to the cigarette. The falling edge of one of the cigarette detection channels is used for identifying that the laser sensor module is far away from the cigarette. When one of the cigarette detection channels is detected to output a rising edge signal, judging whether each cigarette detection channel is in shortage or not. If the cigarette detection channel is in shortage, the number of times of the cigarette detection channel faults is increased by one. And when the number of faults reaches 5, judging that the cigarette detection channel has faults.
The fault detection statistical sign indicates that the laser sensor module is far away from the cigarettes, and the fault detection statistical sign is reset when each cigarette detection channel detects a falling edge. In contrast, if one of the cigarette detection channels detects a rising edge, the failure detection statistics flag is assigned to 1 to indicate that the laser sensor module is close to the cigarette. And if the laser sensor module is close to the cigarette, counting the failure times.
The WiFi data processing function is mainly responsible for receiving a request signal sent by the user terminal and returning a response signal. The request signal may include parameter setting and modification, status query and modification of on and off of the laser sensor, failure count query and clearing of the laser sensor, count query of cigarette detection, and sensitivity modification and query, etc.
The WiFi communication module receives a request signal sent by the user terminal and sends the request signal to the singlechip, and the singlechip performs corresponding task processing including receiving and opening laser emission, closing laser emission, modifying sensitivity, inquiring laser opening state, inquiring sensitivity, inquiring diagnosis value, eliminating diagnosis value, inquiring total number of cigarette detection and the like. After the task is completed, the singlechip can return a corresponding response signal.
In this scheme, the non-contact detection mode of cigarette storehouse lacks a detecting system has integrated self-detection function, and the user can master the state of each cigarette detection channel at any time, has brought the facility for the maintenance of equipment to prolonged cigarette storehouse and lacks a detecting system's life, solved the spring and the baffle of mechanical type detecting system iron material preparation and easily oxidized, the detection failure rate that lead to is high, the fault rate is high and use cost high scheduling problem.
Example III
Fig. 3 is a flowchart of a method for detecting a missing cigarette in a cigarette warehouse, which is provided in accordance with a third embodiment of the present application, and the method may be implemented by a system for detecting missing cigarette in a cigarette warehouse, which is provided in the embodiment of the present application, and includes a control module and a cigarette detection module, where the cigarette detection module includes at least one cigarette detection channel.
As shown in fig. 3, the method for detecting the cigarette missing in the cigarette warehouse comprises the following steps:
and S310, sending a detection starting signal to the control module by the cigarette detection module when detecting a preset level signal, and emitting laser to cigarettes in each cigarette detection channel.
S320, receiving the reflected light of the laser on the cigarette by the cigarette detection module, and generating reflected received data according to the reflected light.
S330, after receiving the detection starting signal, the control module acquires the reflection receiving data output by the cigarette detection module, and determines the detection result of the deficiency according to the reflection receiving data of each cigarette detection channel.
In this scheme, optionally, the determining the missing count detection result according to the reflection receiving data of each cigarette detection channel includes:
And determining that the cigarette detection channel is in shortage when the reflection receiving data of the cigarette detection channel is smaller than or equal to the preset sensitivity.
On the basis of the above scheme, optionally, after determining the result of detecting the defect, the method further includes:
And determining that the cigarette detection channel fails when the continuous preset times of the cigarette detection channel are all the missing detection results of the cigarette detection channel through the control module.
In one possible scheme, the cigarette bank defect detection system further comprises a communication module and a user terminal, and the method further comprises:
transmitting a request signal to a communication module through a user terminal, wherein the request signal comprises at least one of a parameter setting signal, an information inquiry signal and a cigarette detection channel control signal;
Receiving the request signal through the communication module and sending the request signal to the control module;
processing the request signal through the control module, determining a response signal, and sending the response signal to the communication module;
and receiving the response signal through the communication module and sending the response signal to the user terminal.
In a preferred scheme, the cigarette bank defect detection system further comprises a storage module, and the method further comprises:
and storing the sensitivity, the failure detection result, the fault detection result and the cigarette detection channel control record through a storage module.
According to the technical scheme, when a cigarette detection module detects a preset level signal, a detection starting signal is sent to a control module, laser is emitted to cigarettes in all cigarette detection channels, the cigarette detection module receives reflected light rays of the laser on the cigarettes and generates reflected receiving data according to the reflected light rays, and after the control module receives the detection starting signal, the control module obtains the reflected receiving data output by the cigarette detection module and determines a missing detection result according to the reflected receiving data of all cigarette detection channels. The technical scheme solves the problems of low detection accuracy and the like of the cigarettes, can improve the detection accuracy of the cigarettes at the same time of ensuring the operation efficiency of the cigarette packing machine, and reduces the maintenance cost of a cigarette warehouse detection system of the cigarettes.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.