CN110978822A - Lottery printing method, lottery reader, lottery printing system and storage medium - Google Patents

Lottery printing method, lottery reader, lottery printing system and storage medium Download PDF

Info

Publication number
CN110978822A
CN110978822A CN201911136065.8A CN201911136065A CN110978822A CN 110978822 A CN110978822 A CN 110978822A CN 201911136065 A CN201911136065 A CN 201911136065A CN 110978822 A CN110978822 A CN 110978822A
Authority
CN
China
Prior art keywords
printing
time
data
line
lottery
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.)
Pending
Application number
CN201911136065.8A
Other languages
Chinese (zh)
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.)
Guangzhou Sanhuan Yongxin Technology Co ltd
Original Assignee
Guangzhou Sanhuan Yongxin Technology 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 Guangzhou Sanhuan Yongxin Technology Co ltd filed Critical Guangzhou Sanhuan Yongxin Technology Co ltd
Priority to CN201911136065.8A priority Critical patent/CN110978822A/en
Publication of CN110978822A publication Critical patent/CN110978822A/en
Pending legal-status Critical Current

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

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

The invention discloses a method for printing lottery tickets, a lottery ticket reader, a system and a storage medium, wherein a printing rule is set to send the next line of data to a thermal printing head for printing while printing the current line of data, and the next line of data is automatically printed after the printing of one line of data is finished, so that the waiting time for sending data can be saved, the printing is continuously carried out, and the printing speed is increased; simultaneously with intelligent accuse thermal technology combine together for thermal printer head can not appear still continuously heating when unusual printing, thereby can avoid the overheated damage of heating element that leads to often because the response is not timely turned off in the heating of lottery ticket printer, the interference killing feature of effectual reinforcing printing avoids beating the unexpected damage of printer head, prolongs the life who beats printer head. The invention can be applied to the technical field of thermal printing.

Description

Lottery printing method, lottery reader, lottery printing system and storage medium
Technical Field
The invention relates to a thermal printing technology, in particular to a lottery printing method, a lottery reader, a lottery printing system and a storage medium.
Background
The thermal printer has the working principle that a printing head core is provided with a row of tiny semiconductor heating elements, and the printing heating elements heat and contact the thermal printing paper to enable the thermal printing paper to generate chemical reaction in a film; the chemical reaction of the printing paper belongs to the thermosensitive reaction, the heated place can be converted into black or blue, the thermal printer drives the heating core to heat and the motor to feed paper through linkage control, and target patterns or characters are selectively heated and printed at the determined position of the thermal printing paper. The chemical reaction of the thermal printing paper is performed at a certain temperature, and the chemical reaction is accelerated by a high temperature. When the temperature is lower than 60 ℃, the printing paper can be changed into dark color after a long time, even for several years; whereas at a temperature of 200 c this chemical reaction is completed in a few microseconds. In order to ensure the printing speed, the heating efficiency of the traditional thermal printer core is particularly high, and the required heating quantity can be achieved in a short time.
In the prior art, a timeout detection processing method and a cycle detection heating method based on embedding in a kernel process are applied to a thermal sensitive printer, but due to the particularity of lottery printing, the timeout detection processing method and the cycle detection heating method based on embedding in the kernel process are not applied to the lottery printing technology.
Disclosure of Invention
In order to solve at least one of the above technical problems, an object of the present invention is to provide a method of printing a lottery ticket, a lottery ticket reader, a system and a storage medium.
The technical scheme adopted by the invention is as follows: in one aspect, an embodiment of the present invention includes a method for printing a lottery ticket, including:
calculating a first time, wherein the first time is the time required for printing single-line lottery data;
calculating second time according to the first time, wherein the second time is the total time required for printing the lottery data to be printed;
appointing any behavior first target data in the lottery data to be printed;
setting to send second target data while printing the first target data, wherein the second target data is data of a next line of the first target data;
printing is set to be carried out line by line from the first line of the lottery data to be printed, and the next line of lottery data is automatically printed after one line of lottery data is printed;
detecting whether printing is overtime;
when the printing timeout of a single line is detected, the printing of the lottery data of the current line is stopped, and the lottery data of the next line is started to start printing;
when the total time elapsed from the start of printing to the current printing is detected, printing is ended.
Further, the first time is calculated by using the following formula:
Figure BDA0002279627230000021
in the formula, E0Printing energy for the heating body; i is0Is the current of the heating body; t is tsVH is the print voltage for the strobe width; vcomIs common electrode voltage drop;
Figure BDA0002279627230000022
is the resistance value of the heating element; ricIs the internal resistance of the heat-generating IC.
Further, the step of calculating a second time according to the first time specifically includes:
acquiring the first time;
calculating the line number of the data to be printed;
multiplying the first time by the line number of the data to be printed to obtain a third time;
and amplifying the third time in proportion to obtain the second time.
Further, the step of detecting whether printing is overtime specifically includes:
acquiring the first time and the second time;
acquiring the actual time consumed for printing the single-line lottery data as fourth time;
acquiring the total time consumed from the beginning of printing to the current printing as fifth time;
comparing the magnitude of the first time and the fourth time;
if the fourth time is less than the first time, judging that the single-line printing is not overtime, and if the fourth time is greater than the first time, judging that the single-line printing is overtime;
comparing the second time with the fifth time;
if the fifth time is less than the second time, the total time consumed from the beginning of printing to the current printing is judged not to be overtime, and if the fifth time is greater than the second time, the total time consumed from the beginning of printing to the current printing is judged to be overtime.
On the other hand, the embodiment of the invention also comprises a lottery ticket reader, which comprises a thermal printing head, a control timer and an overtime timer, wherein the control timer and the overtime timer are respectively connected with the thermal printing head;
the thermal print head is used for being heated and executing printing;
the control timer is used for acquiring the first time and timing the printing of single-line lottery ticket data;
and the overtime timer is used for acquiring the second time and timing the total time consumed from the beginning of printing to the current printing.
Further, the control timer is further configured to control printing of single-line lottery ticket data, specifically:
when the printing time of the single-line lottery data acquired by timing is equal to the first time, the control timer controls the thermal printing head to stop heating, and the printing of the current-line lottery data is stopped;
and after the next line of lottery data is started to be printed, the control timer controls the thermal printing head to start heating, and the next line of lottery data is printed.
Further, the timeout timer is further configured to control heating of the thermal print head, specifically:
and when the total time consumed from the beginning of printing to the current printing exceeds the second time, the overtime timer controls the heat-sensitive printing head to stop heating, and the printing is finished.
In another aspect, an embodiment of the present invention further includes a lottery printing system, including:
the calculation module is used for calculating the first time and the second time, wherein the first time is the time required for printing the lottery data in a single line, and the second time is the total time required for printing the lottery data to be printed;
the setting module is used for setting printing rules; appointing any behavior first target data in the lottery data to be printed; setting to send second target data while printing the first target data, wherein the second target data is data of a next line of the first target data; printing is set to be carried out line by line from the first line of the lottery data to be printed, and the next line of lottery data is automatically printed after one line of lottery data is printed;
the detection module is used for detecting whether printing is overtime;
the processing module is used for carrying out corresponding processing according to the detection result, terminating the printing of the current row of lottery data when the printing timeout of a single row is detected, and starting the printing of the next row of lottery data; when the total time elapsed from the start of printing to the current printing is detected, printing is ended.
Further, the calculating module is configured to calculate the first time by the following formula:
Figure BDA0002279627230000031
in the formula, E0Printing energy for the heating body; i is0Is the current of the heating body; t is tsVH is the print voltage for the strobe width; vcomIs common electrode voltage drop;
Figure BDA0002279627230000032
is the resistance value of the heating element; ricIs the internal resistance of the heat-generating IC.
In another aspect, embodiments of the present invention further include a storage medium, wherein the processor-executable instructions, when executed by the processor, are configured to perform the lottery printing method.
The invention has the beneficial effects that: according to the lottery printing method, the overtime detection processing method and the circulating detection heating method embedded in the kernel process are applied to the lottery printing technology, and are combined with the method for accelerating the lottery printing speed, so that the overheating damage of a heating element caused by the fact that the heating and turn-off response of a thermal printing head of a lottery reader is not timely can be avoided, the anti-interference capability of printing is effectively enhanced, the accidental damage of the printing head is avoided, and the service life of the printing head is prolonged; the thermal printing head can be heated to print current data; and the data to be printed is sent to the printing head, so that the printing time can be shortened, the printing speed is increased, and the working efficiency is improved.
Drawings
FIG. 1 is a flow chart of the steps of a general lottery reader indicia printing method;
fig. 2 is a flowchart illustrating the steps of the lottery printing method according to the present embodiment;
fig. 3 is a flowchart of the actual operation of printing the lottery ticket in this embodiment.
Detailed Description
As shown in fig. 1, a general lottery ticket reader mark printing method includes the following steps:
s1, starting printing;
s2, putting down the thermal printing head;
s3, sending data to be printed to a printing head;
s4, driving a motor to feed paper, and calculating heating (printing) time;
s5, starting a thermal printing head to heat;
s6, judging whether the heating time is up;
s7, if yes, judging whether printing is finished;
s8, if yes, printing is finished; if not, return to step S3.
As shown in fig. 1, in the general method for printing a label on a lottery ticket reader, after printing a line of data, the next line of printed data is loaded for printing, and when each line of data needs to be printed, the thermal print head is started to start heating, and after the time required for heating is reached, whether all printing is finished needs to be further determined, if not, the next line of data to be printed is continuously sent to the thermal print head, and then the thermal print head is started to heat, so as to start printing; if all printing is finished, stopping heating the thermal heating head continuously, and finishing printing; the method has the advantages of low printing speed and low working efficiency. The conventional lottery printing technology does not have an intelligent control heating technology, namely a time detection processing method and a cyclic detection heating method based on embedding in a kernel process are not applied to the lottery printing technology, so that the printing efficiency is low, the heating of the thermal printing head cannot be effectively controlled or immediately stopped, the accidental damage of the printing head cannot be avoided, and the service life of the printing head is prolonged.
The embodiment of the invention is just an improvement of the prior lottery printing method, and sends the next line of data to be printed to the printing head while printing one line of data, thereby realizing rapid and continuous printing, namely after printing one line of data, if detecting that the printing is not overtime or unfinished, the next line of data to be printed can be rapidly printed, and the next line of data to be printed is sent while printing; meanwhile, the method for accelerating the printing speed is combined with the intelligent heat control technology, so that the accidental damage of the printing head can be avoided, and the service life of the printing head is prolonged.
As shown in fig. 2, the present embodiment provides a lottery printing method, which specifically includes the following steps:
q1. calculating a first time, the first time being a time required to print a single line of lottery data;
calculating second time according to the first time, wherein the second time is the total time required for printing the lottery data to be printed;
q3. specifying any one of the lottery ticket data to be printed as first target data;
setting to transmit second target data while printing the first target data, wherein the second target data is data next to the first target data;
q5., printing is set to be carried out line by line from the first line of the lottery data to be printed, and the next line of lottery data is automatically printed after one line of lottery data is printed;
detecting whether the printing is overtime;
when the printing timeout of a single line is detected, the printing of the lottery data of the current line is stopped, and the lottery data of the next line is started to be printed;
q8. when a total time elapsed from the start of printing to the current printing is detected, printing is ended.
As a preferred implementation of this lottery ticket printing method, the first time in step Q1 is calculated by using the following formula:
Figure BDA0002279627230000051
in the formula, E0Printing energy for the heating body; i is0Is the current of the heating body; t is tsVH is the print voltage for the strobe width; vcomIs common electrode voltage drop;
Figure BDA0002279627230000052
is the resistance value of the heating element; ricIs the internal resistance of the heat-generating IC.
As a preferred implementation of this lottery ticket printing method, the step Q2, that is, the step of calculating the second time according to the first time, specifically includes:
acquiring the first time;
calculating the line number of the data to be printed;
q203, multiplying the first time by the line number of the data to be printed to obtain a third time;
and Q204, amplifying the third time in proportion to obtain the second time.
As a preferred implementation manner of this lottery ticket printing method, the step Q6, that is, the step of detecting whether printing is timed out, specifically includes:
obtaining the first time and the second time;
acquiring the actual consumed time for printing the single-line lottery ticket data as fourth time;
acquiring the total time consumed from the beginning of printing to the current printing as a fifth time;
comparing the magnitudes of the first time and the fourth time;
if the fourth time is less than the first time, judging that the single-line printing is not overtime, and if the fourth time is greater than the first time, judging that the single-line printing is overtime;
comparing the second time with the fifth time;
and Q607. if the fifth time is less than the second time, determining that the total time consumed from the beginning of printing to the current printing is not overtime, and if the fifth time is greater than the second time, determining that the total time consumed from the beginning of printing to the current printing is overtime.
In this embodiment, the first time is a theoretical value of calculated time required for printing single-line lottery data, the second time is a theoretical value of calculated total time required for printing lottery data to be printed, and the third time is to obtain a middle theoretical value of the second time. In step Q204, the third time is scaled up to obtain the second time, where the scaling up is generally small, that is, the third time is scaled up a little to obtain the second time, that is, the total time required for printing the lottery data to be printed. The reason why the third time needs to be properly enlarged is that intermittent delay printing exists due to hardware problems in the printing process, and according to the printing specificity of the lottery ticket, although the time difference required for printing each line of data is very small, a slight gap still exists, in order to ensure that the lottery ticket printer runs normally as far as possible, the printing is directly finished before all the printing is finished. The second time is set to play a role in protecting the thermal printing head while not affecting normal printing as much as possible. The fourth time is an actual value of time actually consumed for printing the single-line lottery ticket data counted by the timer, and the fifth time is an actual value of total time consumed from the beginning of printing to the current printing counted by the timer.
Judgment of whether single-line data printing is overtime:
in this embodiment, the actual time value obtained by timing is compared with the theoretical time value obtained by calculation, that is, the first time (the theoretical time value required for printing single-line lottery data) and the fourth time (the actual time value actually consumed for printing single-line lottery data) are compared, whether the printing time of the single-line lottery data is overtime is determined, when the fourth time (the actual time value actually consumed for printing single-line lottery data) is greater than the first time (the theoretical time value required for printing single-line lottery data), it is determined that the printing time of the single-line lottery data is overtime, the printing of the current-line lottery data is terminated, and the next-line lottery data is started to be printed; and when the fourth time (the actual value of the time actually consumed for printing the single-line lottery data) is less than the first time (the theoretical value of the time required for printing the single-line lottery data), determining that the printing time of the single-line lottery data is not over time, and continuing to print the current-line lottery data. For example, the theoretical value of the time required for printing the first row of lottery data is 500us, when the actual value of the time actually consumed for printing the single row of lottery data displayed on the single-row timer is greater than 500us, such as 501us displayed on the single-row timer, the printer immediately stops printing the first row of lottery data, starts printing the second row of lottery data, recalculates the theoretical value of the time required for printing the second row of lottery data, and the single-row timer also recalculates the actual value of the time actually consumed for printing the second row of lottery data; when the single-line timer displays less than 500us, such as displaying 499us on the single-line timer, if the first line of data is not completely printed, the printer does not finish printing the first line of data, and continues to print the first line of data, and if the first line of data is completely printed when the single-line timer displays 499us, the printer automatically starts the second line of data to start printing; when the time displayed by the single-line timer is just equal to the calculated theoretical value of the printing time of the single-line data, namely just 500us is displayed on the single-line timer, firstly, whether the printing of the first line of data is completely finished at the moment is judged, if the printing of the first line of data is completely finished, the printing of the first line of data is immediately finished, the next line of data is started to be printed, and if the printing of the first line of data is not completely finished, the printing of the first line of data is immediately finished at the next moment, namely 501us, and the next line of data is started to be printed. That is, only when the printing time of the lottery ticket data of one line is detected to be overtime, the printing of the current line of data is stopped, and the printing of the next line of data is started, otherwise, the printing is continued until the printing of the current line is finished, and the printing of the next line of data is started.
Judging whether all the data to be printed are printed overtime:
in this embodiment, whether all the data to be printed is overtime is judged by comparing the second time (the theoretical value of the total time required for printing the lottery data to be printed) with the fifth time (the actual value of the total time consumed from the beginning of printing to the current printing), and when the fifth time (the actual value of the total time consumed from the beginning of printing to the current printing) is greater than the second time (the theoretical value of the total time required for printing the lottery data to be printed), the printing is immediately finished when all the data to be printed is determined to be overtime; and when the fifth time (the actual value of the total time consumed from the beginning of printing to the current printing) is less than the second time (the theoretical value of the total time required for printing the lottery data to be printed), determining that all the data to be printed are not printed overtime, and continuing the printing. For example, the calculated total theoretical time value required for printing the lottery data to be printed at this time is 10s, and when the actual value of the total time consumed from the beginning of printing to the current printing, which is displayed on the total time timer, is greater than 10s, for example, 10s 0ms 1us is displayed on the total time timer, the thermal printing head is immediately stopped from heating, and the printing at this time is finished; when the actual value of the total time consumed from the beginning of printing to the current printing, which is displayed on the total time timer, is less than 10s, for example, 9s is displayed on the total time timer, if the printing is not completely printed, the printing is continued according to the setting, and if the printing is completely printed when 9s is displayed on the total time timer, the heating of the thermal printing head is immediately stopped, and the printing is automatically finished; when the actual value of the total time consumed from the beginning of printing to the current printing displayed on the total time timer is equal to 10s, namely when 10s is just displayed on the total time timer, firstly judging whether the printing is completely finished at the moment, if the printing is completely finished, immediately stopping heating of the thermal printing head, finishing the printing, and if the printing is not completely finished, immediately stopping heating of the thermal printing head at the next moment and finishing the printing. That is, only when the total time consumed from the beginning of printing to the current printing is detected to be overtime, the printing is ended, otherwise, the printing is continued according to the setting until all the printing is finished, and the printing is automatically ended.
In this embodiment, the printing rule is set to send the next line of data to the thermal print head while printing the current line of data, that is, send the second line of data to the thermal print head to wait for printing while printing the first line of data, send the third line of data to the thermal print head to wait for printing while printing the second line of data, send the fourth line of data to the thermal print head while printing the third line of data, and so on. Meanwhile, when the printing is normal, the printing of the next line of data is automatically started every time the printing of one line of data is finished, namely, the printing of the second line of data is automatically started when the printing of the first line of data is finished, the printing of the third line of data is automatically started when the printing of the second line of data is finished, and the printing is finished until all the data of all the lines are completely printed. The printing method is combined with the intelligent heat control technology, namely when each line of data is not printed, the next line of data needs to be sent, then the thermal printing head is started to start heating, the printing is carried out, the printing is stopped when the heating time is up, then whether all the printing is finished is judged, if so, the printing is finished, otherwise, the next line of data to be printed is continuously sent to the thermal printing head for printing; when one line of data is printed, the next line of data to be printed is sent to the thermal printing head to be printed, the time required for printing single line of data and the total time required for printing all data are set, when one line of data and all data are printed without time-out (printing is normal), the thermal printing head is in a continuous heating state, a state that heating is stopped when the next line of data is sent does not exist, namely, printing is continuously carried out, and heating of the thermal printing head is stopped until all data are printed; when the printing of single line of data is overtime, the printing of the current line of data can be stopped, the next line of data is started to start printing, and when all the printing is overtime, the heating of the thermal printing head can be immediately stopped, so that the printing is finished.
Referring to fig. 3, an actual operation flowchart of the printing method according to this embodiment is shown, in which the lottery data printing and the determining whether the single data printing and the all data printing are overtime are executed in parallel, and there is no sequential order, that is, the lottery printer executes printing while performing determining, and then continues to execute printing and continue determining according to the result of the determining.
In summary, the lottery printing method described in this embodiment has the following advantages:
the printing rule is set to send the next line of data to the thermal printing head for printing while printing the current line of data, and the next line of data is automatically printed after the printing of one line of data is finished, so that the waiting time for sending data can be saved, the printing is continuously carried out, and the printing speed is improved; simultaneously with intelligent accuse thermal technology combine together for thermal printer head can not appear still continuously heating when unusual printing, thereby can avoid the overheated damage of heating element that leads to often because the response is not timely turned off in the heating of lottery ticket printer, the interference killing feature of effectual reinforcing printing avoids beating the unexpected damage of printer head, prolongs the life who beats printer head.
The embodiment also comprises a lottery ticket reader, which is used for executing the method for printing the lottery ticket, and comprises a thermal printing head, a control timer and an overtime timer, wherein the control timer and the overtime timer are respectively connected with the thermal printing head;
the thermal print head is used for being heated and executing printing;
the control timer is used for acquiring the first time and timing the printing of single-line lottery ticket data;
and the overtime timer is used for acquiring the second time and timing the total time consumed from the beginning of printing to the current printing.
As a preferred implementation of this embodiment of the lottery ticket reader, the control timer is further configured to control printing of single-line lottery ticket data, specifically:
when the printing time of the single-line lottery data acquired by timing is equal to the first time, the control timer controls the thermal printing head to stop heating, and the printing of the current-line lottery data is stopped;
and after the next line of lottery data is started to be printed, the control timer controls the thermal printing head to start heating, and the next line of lottery data is printed.
Further, as a preferred implementation manner of this lottery ticket reader embodiment, the timeout timer is further configured to control the heating of the thermal print head, specifically:
and when the total time consumed from the beginning of printing to the current printing exceeds the second time, the overtime timer controls the heat-sensitive printing head to stop heating, and the printing is finished.
The embodiment provides a device for executing the lottery ticket printing method, which is a lottery ticket reader and mainly comprises a thermal printing head, a control timer and an overtime timer, wherein the thermal printing head is an important element of the lottery ticket reader (corresponding to a lottery ticket printer), the printing of the lottery ticket is realized by heating the thermal printing head, the printing is started when the thermal printing head is heated, and the printing is stopped when the thermal printing head is stopped from heating. In this embodiment, the heating of the thermal print head is controlled by setting two timers, namely, a control timer and an overtime timer, that is, the printing of lottery ticket data is controlled, and the printing of single-line data is controlled by controlling the timers, specifically: assigning the calculated time theoretical value required for printing the single-line lottery data to a control timer, controlling the timer to time the printing time of the single-line lottery data in real time, and controlling the thermal printing head to immediately stop printing the current line of data and jump to the next line of data to start printing when the printing time of the single-line lottery data is overtime; the printing of all lottery data is controlled by the overtime timer, which specifically comprises the following steps: and assigning the calculated total theoretical time value required for printing all lottery data to an overtime timer, wherein the overtime timer is used for timing the total time consumed from the beginning of printing to the current printing in real time, and when the real-time timing time value exceeds the pre-designed total time value for printing all the lottery data, the overtime controller controls the thermal printing head to immediately stop heating and finish printing.
The present embodiment further includes a lottery printing system, comprising:
the calculation module is used for calculating the first time and the second time, wherein the first time is the time required for printing the single-line lottery data, and the second time is the total time required for printing the lottery data to be printed;
the setting module is used for setting printing rules; appointing any behavior first target data in the lottery data to be printed;
setting to send second target data while printing the first target data, wherein the second target data is data of a next line of the first target data; printing is set to be carried out line by line from the first line of the lottery data to be printed, and the next line of lottery data is automatically printed after one line of lottery data is printed;
the detection module is used for detecting whether printing is overtime;
the processing module is used for carrying out corresponding processing according to the detection result, terminating the printing of the current row of lottery data when the printing timeout of a single row is detected, and starting the printing of the next row of lottery data; when the total time elapsed from the start of printing to the current printing is detected, printing is ended.
As a preferred implementation of this embodiment, the calculating module is configured to calculate the first time by using the following formula:
Figure BDA0002279627230000101
in the formula, E0Printing energy for the heating body; i is0Is the current of the heating body; t is tsVH is the print voltage for the strobe width; vcomIs common electrode voltage drop;
Figure BDA0002279627230000102
is the resistance value of the heating element; ricIs the internal resistance of the heat-generating IC.
The present embodiment also includes a storage medium having stored therein processor-executable instructions, which when executed by a processor, perform the method of lottery printing.
When the lottery printing system in this embodiment is executed by running a corresponding program using a computer or other terminal, the medium refers to a storage module in the computer or other terminal. When the functions of the method and the medium are realized, the technical effect same as that of the single-step phase-shift electronic speckle interferometry system can be realized.
It should be understood that although the terms first, second, third, fourth, fifth, etc. may be used in this disclosure to describe time values, these time values should not be limited to these terms. These terms are used only to distinguish between different time values and to facilitate comparison. For example, a first time may also be referred to as a second time, and similarly, a second time may also be referred to as a third time, without departing from the scope of the present disclosure. The use of any and all examples, or exemplary language ("e.g.," such as "or the like") provided with this embodiment is intended merely to better illuminate embodiments of the invention and does not pose a limitation on the scope of the invention unless otherwise claimed. As used in this disclosure, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. In addition, unless defined otherwise, all technical and scientific terms used in this example have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the description of the embodiments herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
The above description is only a preferred embodiment of the present invention, and the present invention is not limited to the above embodiment, and any modifications, equivalent substitutions, improvements, etc. within the spirit and principle of the present invention should be included in the protection scope of the present invention as long as the technical effects of the present invention are achieved by the same means. The invention is capable of other modifications and variations in its technical solution and/or its implementation, within the scope of protection of the invention.

Claims (10)

1. A lottery printing method, comprising:
calculating a first time, wherein the first time is the time required for printing single-line lottery data;
calculating second time according to the first time, wherein the second time is the total time required for printing the lottery data to be printed;
appointing any behavior first target data in the lottery data to be printed;
setting to send second target data while printing the first target data, wherein the second target data is data of a next line of the first target data;
printing is set to be carried out line by line from the first line of the lottery data to be printed, and the next line of lottery data is automatically printed after one line of lottery data is printed;
detecting whether printing is overtime;
when the printing timeout of a single line is detected, the printing of the lottery data of the current line is stopped, and the lottery data of the next line is started to start printing;
when the total time elapsed from the start of printing to the current printing is detected, printing is ended.
2. The method of claim 1, wherein the first time is calculated using the following equation:
Figure FDA0002279627220000011
in the formula, E0Printing energy for the heating body; i is0Is the current of the heating body; t is tsVH is the print voltage for the strobe width; vcomIs common electrode voltage drop;
Figure FDA0002279627220000012
is the resistance value of the heating element; ricIs the internal resistance of the heat-generating IC.
3. The method for printing a lottery ticket as in claim 1, wherein the step of calculating a second time based on the first time comprises:
acquiring the first time;
calculating the line number of the data to be printed;
multiplying the first time by the line number of the data to be printed to obtain a third time;
and amplifying the third time in proportion to obtain the second time.
4. The method for printing lottery tickets according to claim 1, wherein said step of detecting whether the printing has timed out includes:
acquiring the first time and the second time;
acquiring the actual time consumed for printing the single-line lottery data as fourth time;
acquiring the total time consumed from the beginning of printing to the current printing as fifth time;
comparing the magnitude of the first time and the fourth time;
if the fourth time is less than the first time, judging that the single-line printing is not overtime, and if the fourth time is greater than the first time, judging that the single-line printing is overtime;
comparing the second time with the fifth time;
if the fifth time is less than the second time, the total time consumed from the beginning of printing to the current printing is judged not to be overtime, and if the fifth time is greater than the second time, the total time consumed from the beginning of printing to the current printing is judged to be overtime.
5. A lottery ticket reader for performing the method of claims 1-4, comprising a thermal print head, a control timer and an overtime timer, said control timer and overtime timer being respectively connected to said thermal print head;
the thermal print head is used for being heated and executing printing;
the control timer is used for acquiring the first time and timing the printing of single-line lottery ticket data;
and the overtime timer is used for acquiring the second time and timing the total time consumed from the beginning of printing to the current printing.
6. The lottery reader of claim 5, wherein the control timer is further configured to control printing of a single line of lottery data, in particular:
when the printing time of the single-line lottery data acquired by timing is equal to the first time, the control timer controls the thermal printing head to stop heating, and the printing of the current-line lottery data is stopped;
and after the next line of lottery data is started to be printed, the control timer controls the thermal printing head to start heating, and the next line of lottery data is printed.
7. The lottery reader of claim 5, wherein the timeout timer is further configured to control thermal print head heating, in particular:
and when the total time consumed from the beginning of printing to the current printing exceeds the second time, the overtime timer controls the thermal printing head to stop heating, and the printing is finished.
8. A lottery printing system, comprising:
the calculation module is used for calculating the first time and the second time, wherein the first time is the time required for printing the single-line lottery data, and the second time is the total time required for printing the lottery data to be printed;
the setting module is used for setting printing rules; appointing any behavior first target data in the lottery data to be printed;
setting to send second target data while printing the first target data, wherein the second target data is data of a next line of the first target data; printing is set to be carried out line by line from the first line of the lottery data to be printed, and the next line of lottery data is automatically printed after one line of lottery data is printed;
the detection module is used for detecting whether printing is overtime;
the processing module is used for carrying out corresponding processing according to the detection result, terminating the printing of the current row of lottery data when the printing timeout of a single row is detected, and starting the printing of the next row of lottery data; when the total time elapsed from the start of printing to the current printing is detected, printing is ended.
9. The lottery printing system of claim 8, wherein the calculation module is configured to calculate the first time by calculating the following equation:
Figure FDA0002279627220000031
in the formula, E0Printing energy for the heating body; i is0Is the current of the heating body; t is tsVH is the print voltage for the strobe width; vcomIs common electrode voltage drop;
Figure FDA0002279627220000032
is the resistance value of the heating element; ricIs the internal resistance of the heat-generating IC.
10. A storage medium having stored therein processor-executable instructions, which when executed by a processor, are configured to perform the method of claims 1-4.
CN201911136065.8A 2019-11-19 2019-11-19 Lottery printing method, lottery reader, lottery printing system and storage medium Pending CN110978822A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911136065.8A CN110978822A (en) 2019-11-19 2019-11-19 Lottery printing method, lottery reader, lottery printing system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911136065.8A CN110978822A (en) 2019-11-19 2019-11-19 Lottery printing method, lottery reader, lottery printing system and storage medium

Publications (1)

Publication Number Publication Date
CN110978822A true CN110978822A (en) 2020-04-10

Family

ID=70085200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911136065.8A Pending CN110978822A (en) 2019-11-19 2019-11-19 Lottery printing method, lottery reader, lottery printing system and storage medium

Country Status (1)

Country Link
CN (1) CN110978822A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112208238A (en) * 2020-10-19 2021-01-12 珠海泽冠科技有限公司 Method for improving paper sticking of thermal printer during printing
CN112214183A (en) * 2020-09-15 2021-01-12 厦门汉印电子技术有限公司 Printing control method, printing control apparatus, printer, and computer-readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006085888A2 (en) * 2005-02-04 2006-08-17 Astro-Med, Inc. Method of adjusting strobe length in a thermal printer to reduce effects of changes in media transport speed
CN101460311A (en) * 2006-06-08 2009-06-17 兄弟工业株式会社 Tag label creation device
JP2010105203A (en) * 2008-10-28 2010-05-13 Canon Inc Printer and method for detecting movement of body
CN102419528A (en) * 2010-09-24 2012-04-18 富士施乐株式会社 Conveying apparatus and image forming apparatus
CN102529413A (en) * 2010-10-14 2012-07-04 精工电子有限公司 Printing apparatus and printing control method
CN102555549A (en) * 2010-12-02 2012-07-11 精工爱普生株式会社 Printing device and control method therefor
CN104191824A (en) * 2014-09-19 2014-12-10 青岛海信智能商用***有限公司 Thermal printer and method for controlling same
CN105607879A (en) * 2015-12-21 2016-05-25 珠海奔图电子有限公司 Portrait adjustment control method and apparatus suitable for preprinted paper
CN108773194A (en) * 2018-05-04 2018-11-09 飞天诚信科技股份有限公司 A kind of printer and the method for improving print speed

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006085888A2 (en) * 2005-02-04 2006-08-17 Astro-Med, Inc. Method of adjusting strobe length in a thermal printer to reduce effects of changes in media transport speed
CN101460311A (en) * 2006-06-08 2009-06-17 兄弟工业株式会社 Tag label creation device
JP2010105203A (en) * 2008-10-28 2010-05-13 Canon Inc Printer and method for detecting movement of body
CN102419528A (en) * 2010-09-24 2012-04-18 富士施乐株式会社 Conveying apparatus and image forming apparatus
CN102529413A (en) * 2010-10-14 2012-07-04 精工电子有限公司 Printing apparatus and printing control method
CN102555549A (en) * 2010-12-02 2012-07-11 精工爱普生株式会社 Printing device and control method therefor
CN104191824A (en) * 2014-09-19 2014-12-10 青岛海信智能商用***有限公司 Thermal printer and method for controlling same
CN105607879A (en) * 2015-12-21 2016-05-25 珠海奔图电子有限公司 Portrait adjustment control method and apparatus suitable for preprinted paper
CN108773194A (en) * 2018-05-04 2018-11-09 飞天诚信科技股份有限公司 A kind of printer and the method for improving print speed

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
戴阳等: ""基于STM32微处理器的蓝牙热敏打印机的研制"", 《国外电子测量技术》 *
谢仕聘: "《计算机外部设备结构分析与计算》", 31 December 1988, 西安电子科技大学出版社 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112214183A (en) * 2020-09-15 2021-01-12 厦门汉印电子技术有限公司 Printing control method, printing control apparatus, printer, and computer-readable storage medium
CN112208238A (en) * 2020-10-19 2021-01-12 珠海泽冠科技有限公司 Method for improving paper sticking of thermal printer during printing

Similar Documents

Publication Publication Date Title
CN110978822A (en) Lottery printing method, lottery reader, lottery printing system and storage medium
CN106585115B (en) A kind of method that thermal printer driving is realized using a hardware timer
CN103481694A (en) Printing method and equipment of needle printer and needle printer
CN114889347A (en) Printer heating operation processing method based on reverse order logic control
CN111070908B (en) Direct printing type certificate card printing method and device, certificate card printer and storage medium
CN113829769A (en) Printing speed optimization method and device of Bluetooth printer
JP2525896B2 (en) Printer device
US8803932B2 (en) Printer
JP2893824B2 (en) Printer
CN111070909A (en) Direct printing type certificate card printing method and device, certificate card printer and storage medium
JP2524980B2 (en) How to prevent overheating of the heating element
JP2009269354A (en) Thermal printer and drive method thereof
JPH07112745B2 (en) Printer
CN107962874B (en) Method for improving reliability of driving program of thermal printer
CN110450553A (en) A kind of print control program, control module, machine core and terminal
CN113997703A (en) Control method for printer release paper
JPH0584219B2 (en)
JPH11138872A (en) Thermal printer
JPH01109422A (en) Printing activating control system for printing device
JP3234685B2 (en) Printer printing duty control device
JP3495756B2 (en) Printer and control method thereof
JPH0635193B2 (en) Printer
JP2012210749A (en) Thermal printer device and program
JPH07186432A (en) Printing device
US11001079B2 (en) Thermal printer and computer-readable storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200410

RJ01 Rejection of invention patent application after publication