CN112606575B - Method, device, equipment and storage medium for solving paper shortage misjudgment of printer - Google Patents

Method, device, equipment and storage medium for solving paper shortage misjudgment of printer Download PDF

Info

Publication number
CN112606575B
CN112606575B CN202011527080.8A CN202011527080A CN112606575B CN 112606575 B CN112606575 B CN 112606575B CN 202011527080 A CN202011527080 A CN 202011527080A CN 112606575 B CN112606575 B CN 112606575B
Authority
CN
China
Prior art keywords
paper
shortage
value
detection
paper shortage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011527080.8A
Other languages
Chinese (zh)
Other versions
CN112606575A (en
Inventor
许开明
林文原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Rongda Hezhong Xiamen Technology Group Co ltd
Original Assignee
Rongda Hezhong Xiamen Technology Group Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Rongda Hezhong Xiamen Technology Group Co ltd filed Critical Rongda Hezhong Xiamen Technology Group Co ltd
Priority to CN202011527080.8A priority Critical patent/CN112606575B/en
Publication of CN112606575A publication Critical patent/CN112606575A/en
Application granted granted Critical
Publication of CN112606575B publication Critical patent/CN112606575B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J29/00Details of, or accessories for, typewriters or selective printing mechanisms not otherwise provided for
    • B41J29/38Drives, motors, controls or automatic cut-off devices for the entire printing mechanism
    • B41J29/393Devices for controlling or analysing the entire machine ; Controlling or analysing mechanical parameters involving printing of test patterns

Abstract

The invention provides a method, a device, equipment and a storage medium for solving paper shortage misjudgment of a printer, wherein the method comprises the steps of determining that the printer is in a normal paper shortage state; according to a paper shortage learning instruction received from an upper computer, configuring a plurality of value signals to a paper detection unit in a paper feeding channel to obtain a voltage detection value set of the paper detection unit; judging whether the detection value set has stability; if yes, obtaining a critical value through calculation according to the detection value set; if not, returning to the step 2 to re-fetch the detection value set; performing difference operation on the critical value and a preset difference threshold value to serve as a paper shortage threshold value, updating the paper shortage threshold value into a storage medium, and using the paper shortage threshold value as a judgment basis for judging whether the printer is in shortage of paper; the device, the equipment and the medium are used as main bodies for realizing, and the method has the advantages of improving the efficiency and the robustness of a printer system by integrating the detection value set and using the numerical rule in the detection value set for judging paper shortage.

Description

Method, device, equipment and storage medium for solving paper shortage misjudgment of printer
Technical Field
The invention relates to a method, a device, equipment and a storage medium for solving paper shortage misjudgment of a printer.
Background
The thermal printer is widely applied to industries such as express delivery, catering and logistics, has a basic function in the printer, namely detects thermal paper and prompts whether the paper exists or not. When no paper is detected, corresponding sound or light alarm prompt is made so as to replace the paper in time.
The identification principle is adopted, and the identification device mainly comprises a photoelectric emitter, a photoelectric receiver and a controller. In a common practice, a uniform paper-out judgment threshold value AD is preset in the controller, and if the reception AD value of the paper detection unit is greater than the paper-out judgment threshold value AD, paper is considered to be out of paper, otherwise, paper is considered to be present. However, in actual mass production, the situation of paper shortage misjudgment can occur by adopting the method:
firstly, due to the differences of the structures of the photoelectric device, the controller and the printer, and the unified paper shortage judgment threshold value, the condition that the AD value received by the paper detection unit cannot be larger than the unified preset paper shortage judgment threshold value AD can occur.
Secondly, because the thermal printing paper is various, if some thermal label paper with transparent bottom layer paper and conventional thermal continuous paper with characters printed on the back are available, the AD value received by the paper detection unit of the two kinds of paper is larger than the paper shortage judgment threshold.
In view of the above, the present invention provides a method, an apparatus, a device and a storage medium for solving the paper shortage misjudgment problem of a printer, and accordingly, the present invention is provided.
Disclosure of Invention
In order to solve the problems, the technical scheme of the invention is as follows:
a method for solving paper shortage misjudgment of a printer comprises the following steps:
step 1: determining to make the printer in a normal paper out state;
and 2, step: according to a paper shortage learning instruction received from an upper computer, configuring a plurality of value signals to a paper detection unit in a paper feeding channel to obtain a voltage detection value set of the paper detection unit;
and step 3: judging whether the detection value set has stability;
if yes, obtaining a critical value through calculation according to the detection value set;
if not, returning to the step 2 to re-fetch the detection value set;
and 4, step 4: performing difference operation on the critical value and a preset difference threshold value to serve as a paper shortage threshold value, and updating the paper shortage threshold value into a storage medium to be used as a judgment basis for judging whether the printer is in paper shortage or not;
and 5: judging whether the detection value of the paper detection unit of the actual paper feeding is in the paper shortage state or not based on the paper shortage threshold value;
if so, stopping paper feeding printing and giving an alarm for prompting;
if not, paper feeding and printing are continued.
Preferably, the stability determination process in step 3 includes:
the controller sequences and calculates the numerical values in the detection value set to obtain the range and the average value of the detection values;
judging whether the ratio of the range to the average value is less than a preset percentage or not;
if yes, the detection value set is stable, and the next step is carried out by taking the minimum value as a critical value;
if not, the detection value set is not stable.
Preferably, the process of setting the gap threshold in step 4 includes:
judging whether the range of the detection value set is larger than a preset standard value or not;
if yes, the difference threshold is twice as large as the range;
if not, the difference threshold is a set constant.
Preferably, when a printing instruction or a paper feeding instruction is received, the current detection value of the paper detection unit is obtained every step of one paper feeding stroke;
judging whether the current detection value is larger than a paper shortage threshold value or not;
if yes, the value in the paper shortage counter is automatically increased;
if not, resetting the paper-out counter;
judging whether the numerical value of the paper-out counter is larger than a preset paper-out counter accumulation sum threshold value or not;
if so, indicating that the paper is out of stock, stopping paper feeding and printing, and prompting in a sound form or a light form;
if not, paper feeding and printing are continued.
Preferably, the paper out counter accumulation and threshold are selected by external input or self-learning based on the detection value set.
A device for solving the problem of paper shortage misjudgment of a thermal printer comprises a paper feeding unit, a paper detection unit, a paper shortage counter unit and a paper shortage judgment unit, wherein the paper detection unit comprises two photoelectric receivers and two photoelectric transmitters which are oppositely arranged in a paper feeding channel.
The device for solving the problem of misjudgment of paper shortage of the thermal printer comprises a controller, a power supply module, an instruction receiving module communicated with an upper computer, a paper feeding module, a printing module and a paper detection module, wherein the paper detection module is electrically connected to the controller as a control input, and the paper feeding module and the printing module are electrically connected to the controller as a load.
A storage medium for solving paper shortage misjudgment of a thermal printer stores a computer program which can be executed by a controller of an apparatus in which the storage medium is located.
According to the method, the learning of the paper shortage threshold is carried out for each printing device independently, the learned paper shortage threshold is stored in the storage medium, when paper shortage judgment is carried out, a continuous accumulated paper shortage judgment mode is adopted, only when the paper shortage counter is accumulated and the threshold is continuously preset according to the numerical value of the paper shortage counter, the paper shortage is judged, the contradiction between the device difference and the unified preset paper shortage threshold is eliminated, and the problem that paper shortage misjudgment is caused due to the fact that part of paper media possibly have the paper shortage threshold more than or equal to is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention.
Wherein:
FIG. 1 is a schematic overall flow diagram of a first embodiment of the present invention;
FIG. 2 is a schematic flowchart illustrating the judgment of the detection value set according to the first embodiment of the present invention;
FIG. 3 is a flowchart illustrating the selection of gap threshold according to the first embodiment of the present invention;
FIG. 4 is a flowchart illustrating a paper shortage determination method according to a first embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a paper-out error determination device according to a second embodiment of the present invention;
FIG. 6 is a schematic view showing the structure of a sheet detecting unit according to a second embodiment of the present invention;
fig. 7 is a schematic structural diagram of a paper shortage misjudgment solving device according to a third embodiment of the invention.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects to be solved by the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1 to 4, a method for solving paper shortage misjudgment of a printer according to a first embodiment of the present invention includes:
step 1: turning off the power supply of the equipment, if paper exists in the paper detection device, taking out the paper, and determining that the printer is in a normal paper shortage state;
step 2: starting a device power supply, initializing an electronic element, and configuring 10 value-taking signals to a paper detection unit in a paper feeding channel according to a paper shortage learning instruction received from an upper computer to obtain a voltage detection value set of the paper detection unit, wherein the upper computer is any one of a computer, a mobile phone and a handheld programmer, the value-taking signals are set at certain time intervals such as 50ms, and the more the voltage detection values are, the more accurate the value-taking quantity is;
and step 3: judging whether the detection value set has stability;
if yes, obtaining a critical value through calculation according to the detection value set; if not, returning to the step 2 to re-fetch the detection value set;
and 4, step 4: performing difference operation on the critical value and a preset difference threshold value to serve as a paper shortage threshold value, and updating the paper shortage threshold value into a storage medium to be used as a judgment basis for judging whether the printer is in paper shortage or not;
and 5: judging whether the detection value of the paper detection unit of the actual paper feeding is in the paper shortage state or not based on the paper shortage threshold value;
if so, stopping paper feeding printing and giving an alarm for prompting;
if not, paper feeding and printing are continued.
As shown in fig. 2, the process of determining stability in step 3 includes: the controller obtains the range and the average value of the detection values by sequencing and calculating the values in the detection value set; judging whether the ratio of the range to the average value is less than a preset percentage, specifically the percentage is 5%; if yes, the detection value set is stable, and the next step is carried out by taking the minimum value as a critical value; if not, the detection value set is not stable.
As shown in fig. 3, the process of setting the gap threshold in step 4 includes: judging whether the range of the detection value set is greater than a preset standard value or not, and specifically setting the standard value to be 5 according to the actual situation; if yes, the difference threshold is twice as large as the range; if not, the difference threshold is a set constant, taking the standard numerical value as an example, and setting the constant as 10; the setting is mainly based on the consistency of the detection value set, or the deviation is small, the range can be correspondingly reduced, and if a certain deviation exists, the corresponding range is enlarged.
As shown in fig. 4, when a print command or a paper feeding command is received, every time a paper feeding stroke is stepped, the paper moves a certain distance, that is, the position of the paper relative to the paper detection unit is changed, and the current detection value of the paper detection unit is obtained in the process; judging whether the current detection value is larger than a paper shortage threshold value or not; if yes, the value in the paper shortage counter is automatically increased by 1; if not, resetting the paper-out counter; judging whether the numerical value of the paper-out counter is larger than a preset paper-out counter accumulation sum threshold value or not; if so, indicating that the paper is out of stock, stopping paper feeding and printing, and prompting in a sound form or a light form; if not, paper feeding and printing are continued.
The current continuous detection value is stably enabled to be larger than the paper shortage threshold value only when paper is completely fed, namely the numerical value in the paper shortage counter is enabled to be continuously increased, if the paper shortage counter is judged by mistake due to partial reasons, the current continuous detection value can jump up and down on the paper shortage threshold value, therefore, the paper shortage counter cannot exceed the accumulation sum threshold value of the paper shortage counter, and when the current detection value is smaller than the paper shortage threshold value, the numerical value of the paper shortage counter is set to be zero, namely the numerical value in the paper shortage counter is recalculated, and the paper shortage state cannot be judged.
The accumulation and threshold value of the paper-out counter are selected through external input or according to independent learning of a detection value set, because the thermal printing paper is various, for example, the thermal label paper with a transparent bottom layer and the thermal continuous paper with black body characters printed on the bottom layer are printed, the AD values of the two kinds of paper received by the paper detection unit are larger than the condition of the paper-out judgment threshold value, the first setting can be finely adjusted according to the actual alarm times and generate a file, different records can be generated corresponding to different printing papers, and the different accumulation and threshold values of the paper-out counter can be called by the printing papers of different types through setting the allowable tolerance of the detection value set.
Therefore, in the embodiment, by comparing the paper shortage threshold value obtained by the optimization algorithm with the paper shortage counter accumulation sum threshold value, the occurrence of misjudgment is reduced from two aspects, and the robustness of the printer system is improved, wherein the robustness means that the system has the capability of keeping certain performance unchanged under the disturbance of uncertainty, in the application system, the accumulated difference of thermal printing paper or electronic elements can be reduced, and the function of keeping the printer system to normally print is realized;
referring to fig. 5-6, an apparatus for solving the paper shortage problem of a thermal printer according to a second embodiment of the present invention includes a paper feeding unit, a paper detecting unit, a paper shortage counter unit, and a paper shortage determining unit, wherein the paper detecting unit includes two photoelectric receivers and two photoelectric transmitters electrically connected to a controller and oppositely disposed in a paper feeding path, the photoelectric transmitters are configured to transmit laser, and the photoelectric receivers are configured to receive laser.
Referring to fig. 7, an apparatus for solving the paper shortage misjudgment of the thermal printer according to the third embodiment of the present invention includes a controller, a power module, a command receiving module communicating with an upper computer, a paper feeding module, a printing module, and a paper detecting module, wherein the paper detecting module is electrically connected to the controller as a control input, and the paper feeding module and the printing module are electrically connected to the controller as a load.
A fourth embodiment of the present invention provides a storage medium for solving a paper-out misjudgment of a thermal printer, which stores a computer program executable by a controller of an apparatus in which the storage medium is located.
According to the method, the learning of the paper shortage threshold is carried out for each printing device independently, the learned paper shortage threshold is stored in the storage medium, when paper shortage judgment is carried out, a continuous accumulated paper shortage judgment mode is adopted, only when the paper shortage counter is accumulated and the threshold is continuously preset according to the numerical value of the paper shortage counter, the paper shortage is judged, the contradiction between the device difference and the unified preset paper shortage threshold is eliminated, and the problem that paper shortage misjudgment is caused due to the fact that part of paper media possibly have the paper shortage threshold more than or equal to is solved.
In summary, the invention integrates the detection value set and uses the value rule in the detection value set for judging paper shortage, thereby having the advantages of improving the efficiency and robustness of the printer system.
The invention has been described above with reference to the accompanying drawings, it is obvious that the invention is not limited to the specific implementation in the above-described manner, and it is within the scope of the invention to apply the inventive concept and solution to other applications without substantial modification.

Claims (7)

1. A method for solving paper shortage misjudgment of a printer is characterized by comprising the following steps:
step 1: determining to make the printer in a normal paper out state;
step 2: according to a paper shortage learning instruction received from an upper computer, configuring a plurality of value signals to a paper detection unit in a paper feeding channel to obtain a voltage detection value set of the paper detection unit;
and step 3: judging whether the detection value set has stability;
if yes, obtaining a critical value through calculation according to the detection value set;
if not, returning to the step 2 to re-fetch the detection value set;
and 4, step 4: performing difference operation on the critical value and a preset difference threshold value to serve as a paper shortage threshold value, and updating the paper shortage threshold value into a storage medium to be used as a judgment basis for judging whether the printer is in paper shortage or not;
and 5: based on the paper shortage threshold, when a printing instruction or a paper feeding instruction is received, the current detection value of the paper detection unit is obtained every step of one paper feeding stroke, and whether the current detection value is larger than the paper shortage threshold is judged;
if yes, the value in the paper shortage counter is automatically increased;
if not, resetting the paper-out counter;
judging whether the numerical value of the paper shortage counter is larger than a preset paper shortage counter accumulation sum threshold value or not;
if so, stopping paper feeding printing and giving an alarm for prompting;
if not, paper feeding and printing are continued.
2. The method for solving the paper shortage misjudgment of the printer according to claim 1, wherein the stability judgment process in the step 3 comprises:
the controller obtains the range and the average value of the detection values by sequencing and calculating the values in the detection value set;
judging whether the ratio of the range to the average value is less than a preset percentage or not;
if yes, the detection value set is stable, and the next step is carried out by taking the minimum value as a critical value;
if not, the detection value set is not stable.
3. The method for solving the paper shortage false judgment of the printer according to claim 2, wherein the setting process of the gap threshold in the step 4 comprises:
judging whether the range of the detection value set is larger than a preset standard value or not;
if yes, the difference threshold is twice as large as the range;
if not, the difference threshold is a set constant.
4. The method as claimed in claim 1, wherein the paper out counter and the threshold are selected by external input or self-learning based on the detection value set.
5. The device for solving the paper shortage misjudgment of the thermal printer is characterized by being applied to the method for solving the paper shortage misjudgment of the thermal printer according to any one of claims 1 to 4, and comprising a paper feeding unit, a paper detecting unit, a paper shortage counter unit and a paper shortage judging unit, wherein the paper detecting unit comprises two photoelectric receivers and two photoelectric transmitters which are oppositely arranged in a paper feeding channel.
6. The device for solving the paper shortage misjudgment of the thermal printer is applied to the method for solving the paper shortage misjudgment of the thermal printer, which is characterized by comprising a controller, a power supply module, an instruction receiving module communicated with an upper computer, a paper feeding module, a printing module and a paper detection module, wherein the paper detection module is electrically connected to the controller as a control input, and the paper feeding module and the printing module are electrically connected to the controller as a load.
7. A storage medium for solving a paper-out misjudgment of a thermal printer, which is applied to the method for solving a paper-out misjudgment of a printer according to any one of claims 1 to 4, and which stores a computer program executable by a controller of an apparatus in which the storage medium is located.
CN202011527080.8A 2020-12-22 2020-12-22 Method, device, equipment and storage medium for solving paper shortage misjudgment of printer Active CN112606575B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011527080.8A CN112606575B (en) 2020-12-22 2020-12-22 Method, device, equipment and storage medium for solving paper shortage misjudgment of printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011527080.8A CN112606575B (en) 2020-12-22 2020-12-22 Method, device, equipment and storage medium for solving paper shortage misjudgment of printer

Publications (2)

Publication Number Publication Date
CN112606575A CN112606575A (en) 2021-04-06
CN112606575B true CN112606575B (en) 2022-09-23

Family

ID=75245334

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011527080.8A Active CN112606575B (en) 2020-12-22 2020-12-22 Method, device, equipment and storage medium for solving paper shortage misjudgment of printer

Country Status (1)

Country Link
CN (1) CN112606575B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114889338B (en) * 2022-03-31 2023-04-07 厦门汉印电子技术有限公司 Detection threshold setting method and device, printer and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0761652A (en) * 1993-08-30 1995-03-07 Nec Corp Paper sheet detecting device for printer
JP2011011389A (en) * 2009-06-30 2011-01-20 Sato Knowledge & Intellectual Property Institute Thermal printer and label-paper detecting method for the same
CN102452222A (en) * 2010-11-01 2012-05-16 北京威腾电子有限公司 Continuous media ink-jet printer and control panel
CN201849055U (en) * 2010-11-01 2011-06-01 北京威腾电子有限公司 Continuous medium ink-jet printer
JP2016060636A (en) * 2014-09-22 2016-04-25 株式会社沖データ Medium state change determination method, medium state change determination device and image formation device
CN106626847B (en) * 2015-11-03 2020-08-21 山东新北洋信息技术股份有限公司 Printing method and printer
CN111813352B (en) * 2020-06-04 2022-11-11 厦门汉印电子技术有限公司 Printing paper shortage detection method, device, equipment and storage medium
CN111923612B (en) * 2020-06-29 2022-07-12 厦门汉印电子技术有限公司 Learning method, device and equipment of paper shortage threshold and readable storage medium

Also Published As

Publication number Publication date
CN112606575A (en) 2021-04-06

Similar Documents

Publication Publication Date Title
CN101844463B (en) Printing medium calibration control method
CN111813352B (en) Printing paper shortage detection method, device, equipment and storage medium
CN112606575B (en) Method, device, equipment and storage medium for solving paper shortage misjudgment of printer
CN101859235B (en) System having plurality of memory devices and data transfer method for the same
US9267835B2 (en) Failure diagnosis apparatus for fuel level sensor and failure diagnosis method for fuel level sensor
KR100425639B1 (en) Wet type image forming apparatus and information processing system using this apparatus
US9372438B2 (en) System and method for determining a level of toner in a replacement toner cartridge
US20060245770A1 (en) Apparatus and method for displaying toner residual quantity
CN102180020B (en) Consumable chip, consumable container and method for indicating consumable allowance data
US20150029291A1 (en) Printer and mark detection method
CN112965351B (en) Image forming cartridge and toner remaining amount detecting method
JP2018512299A (en) Ink remaining amount detecting method, ink remaining amount detecting device, ink supply system, and ink jet printer
KR100846783B1 (en) Apparatus and method for detecting fault substrate
US10664729B2 (en) Consumables management system and consumables management device
US9992354B2 (en) Media reflectance identifiers
JP6560907B2 (en) Ink cartridge, detection circuit, ink mounting unit, printer, print system, and ink remaining amount detection method
KR101926342B1 (en) Float level sensor device capable of setting up channel
US20080036802A1 (en) Liquid container and liquid consuming apparatus
CN114889338B (en) Detection threshold setting method and device, printer and storage medium
JP6402798B2 (en) Control device for vehicle power window device
KR101872717B1 (en) Apparatus for supporting function of securing printing
US11461603B2 (en) Sensor of imaging device detects an amount of print media in a print media receptacle using plural thresholds to notify user when the imaging device has a low quantity of the print media
US11272068B2 (en) Post-processing apparatus and control method
EP1953600A2 (en) Function executing device
CN210836401U (en) Detection assembly, detection mechanism and cash processing equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant