Summary of the invention
The first object of the present invention is to provide a kind of thermal-sensitive printer printing speed adjustment method for improving print quality.
The second object of the present invention is to provide a kind of computer installation for improving print quality.
The third object of the present invention is to provide a kind of computer readable storage medium for improving print quality.
In order to realize above-mentioned first purpose, thermal-sensitive printer printing speed adjustment method provided by the invention includes: to obtain
The present motor pulse width of current print line;Obtain the row printing number of every a line pre-print row in preset quantity pre-print row
According to;Judge whether row print data includes speed regulation print data, if so, obtaining the corresponding pre-print motor arteries and veins of speed regulation print data
Rush width;Printing motor is beaten according to the comparison result of present motor pulse width and all pre-print motor pulse width
Print rate control.
By above scheme as it can be seen that thermal-sensitive printer printing speed adjustment method of the invention is beaten to current print line
When print, by judging exist with the presence or absence of speed regulation print data in pre-print row in the preset quantity pre-print row that will print
When adjusting the speed print data, the corresponding pre-print motor pulse width of speed regulation print data is obtained, and wide according to present motor pulse
The comparison result of degree and pre-print motor pulse width carries out printing rate control to printing motor, so that printing speed regulation printing number
According to when be more clear, to improve print quality.
In further embodiment, according to the comparison result of present motor pulse width and all pre-print motor pulse width
If the step of carrying out printing rate control to printing motor includes: that there are pre-print motor pulse is wide in preset quantity pre-print row
Degree is greater than present motor pulse width, then using maximum pre-print motor pulse width as present motor pulse width to printing
Motor carries out printing rate control.
It can be seen that there are pre-print motor pulse width to be greater than present motor pulse width in judging pre-print row
When, then illustrate there is the print line for needing to slow down printing rate in pre-print row, maximum pre-print motor pulse width is made
Control for present motor pulse width to printing motor so that current print line and the pre-print row that will print it
Between change gentle, ensure the print quality at speed regulation print data.
In further embodiment, according to the comparison result of present motor pulse width and all pre-print motor pulse width
The step of printing rate control is carried out to printing motor further include: if pre-print motor arteries and veins is not present in preset quantity pre-print row
Width is rushed greater than present motor pulse width, then printing motor is controlled according to present motor pulse width.
It can be seen that there is no pre-print motor pulse width to be greater than present motor in judging preset quantity pre-print row
Pulse width, then the current printing rate of explanation meets the rate requirement that print data is adjusted the speed in pre-print row, then keeps currently beating
Rate is printed, ensures print quality.
In further embodiment, after the step of obtaining speed regulation print data corresponding pre-print motor pulse width, side
Method further include: if pre-print motor pulse width is greater than or equal to setting motor pulse width, motor pulse width will be set
As pre-print motor pulse width.
It can be seen that in order to ensure print speed, when pre-print motor pulse width is more than setting motor pulse width,
Motor pulse width will be set as pre-print motor pulse width, to ensure printing rate.
In further embodiment, speed regulation print data is the print data of default lettering rate.
It can be seen that can ensure beating for default lettering rate using the print data of default lettering rate as speed regulation print data
The print quality of printing evidence.
In further embodiment, if the step of obtaining speed regulation print data corresponding pre-print motor pulse width includes:
The row print data of pre-print row includes bar code data, then obtains the corresponding pre-print motor pulse width of bar code data.
In further embodiment, if the step of obtaining speed regulation print data corresponding pre-print motor pulse width includes:
The row print data of pre-print row includes two-dimensional code data, then obtains the corresponding pre-print motor pulse width of two-dimensional code data.
In further embodiment, if the step of obtaining speed regulation print data corresponding pre-print motor pulse width includes:
The row print data of pre-print row includes graph data, then obtains the corresponding pre-print motor pulse width of graph data.
It can be seen that obtaining corresponding pre-print motor arteries and veins according to the difference that the row print data of pre-print row includes data
Width is rushed, it can be convenient for the printing rate of accurate control printing motor.
In order to realize the second object of the present invention, it includes processor and memory that the present invention, which provides computer installation, is deposited
Reservoir is stored with computer program, and above-mentioned thermal-sensitive printer printing speed adjustment is realized when computer program is executed by processor
The step of method.
In order to realize the third object of the present invention, computer readable storage medium provided by the invention is stored thereon with meter
Calculation machine program, the step of above-mentioned thermal-sensitive printer printing speed adjustment method is realized when computer program is executed by a controller.
Specific embodiment
Thermal-sensitive printer printing speed adjustment method of the invention is the computer program applied in thermal printer, is used for
Realize the adjustment to print speed.The present invention also provides a kind of computer installation, which includes controller, controller
The step of above-mentioned thermal-sensitive printer printing speed adjustment method is realized when for executing the computer program stored in memory.
The present invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, and computer program is held by controller
The step of above-mentioned thermal-sensitive printer printing speed adjustment method is realized when row.
Thermal-sensitive printer printing speed adjustment method embodiment:
As shown in Figure 1, step S1 when being printed, is first carried out in thermal-sensitive printer printing speed adjustment method, obtain
The present motor pulse width of current print line.When obtaining the present motor pulse width of current print line, acquisition can be passed through
The hot spot quantity and the corresponding row print data type of current print line that current print line needs to heat, and pass through hot spot
Quantity and row print data type confirm present motor pulse width, this is the well-known technique of those skilled in the art, herein
It repeats no more.
Since thermal printer has that heating power is inadequate, printing can not be improved by way of high current
The temperature of head hot spot, therefore, the color that thermal printer usually controls the figure printed by extending heating time are deep
Degree.In general, thermal printer can heat print head by exporting electric current to print head, heat sensitive printer
The time span of print head output heated current influence whether the speed of printing, the print head of heat sensitive printer exports heating
The time span of electric current is longer, and print speed is slower, conversely, print speed is faster.And thermal printer is to pass through PWM
(PulseWidthModulation, pulse width modulation) controls the revolving speed of motor, to control the speed of paper feed.Using
PWM can easily generate the square-wave signal of a fixed cycle and duty ratio, i.e., for controlling the motor arteries and veins of motor rotation
Rush signal.Wherein, the revolving speed of the motor pulse width in motor pulse signal and motor is inversely proportional, and motor pulse width is bigger,
Then the revolving speed of motor is smaller.Therefore, can be convenient for knowing turning for the corresponding motor of current print line by obtaining motor pulse width
Speed.
After obtaining present motor pulse width, step S2 is executed, obtains every a line pre-print in preset quantity pre-print row
Capable row print data.The row print data of pre-print row can be obtained by reading the data of storage unit.Wherein, preset quantity
It can be set as needed, in the present embodiment, 30 rows when preset quantity.
It obtains in preset quantity pre-print row after the row print data of every a line pre-print row, executes step S3, judge to go
Whether print data includes speed regulation print data.Wherein, speed regulation print data is the print data of default lettering rate.Default lettering
The print data of rate refers to the data by user or developer institute self-defining, needs higher print quality.Preferably, in advance
If the print data of lettering rate includes bar code data, two-dimensional code data, graph data or custom data.Right
When row print data is handled, being marked according to row print data type, thus make printer can recognize trip beat
Whether printing includes bar code data, two-dimensional code data, graph data or custom data in.Number is printed to row
The technological means being known to the skilled person is marked according to middle row print data type, details are not described herein.By right
The corresponding label of row print data type is judged whether wrap to can get in the row print data of each pre-print row
Include speed regulation print data.
If judging row print data not includes speed regulation print data, S4 is thened follow the steps, according to adding in pre-print row
Hot spot number obtains pre-print motor pulse width.Row print data does not include that speed regulation print data then illustrates not needing to beat row
Printing can pass through the points of the heating in pre-print row and determine pre-print motor pulse width according to progress specially treated.Pass through
Heating points determine the technological means that pre-print motor pulse width is known to the skilled person, and details are not described herein.
If judging, row print data includes speed regulation print data, thens follow the steps S5, and it is corresponding to obtain speed regulation print data
Pre-print motor pulse width.Since each row print data type is provided with corresponding printing motor pulse width, if beating
Middle presence speed regulation print data is printed and distribute, then this dozen is determined according to the corresponding printing motor pulse width of type of speed regulation print data
The printing motor pulse width printed and distribute.The corresponding printing motor pulse width of type for adjusting the speed print data is obtained by test.
In the present embodiment, if the step of obtaining speed regulation print data corresponding pre-print motor pulse width includes: to beat in advance
The row print data printed and distribute includes bar code data, then obtains the corresponding pre-print motor pulse width of bar code data;If pre-
The row print data of print line includes two-dimensional code data, then obtains the corresponding pre-print motor pulse width of two-dimensional code data;If
The row print data of pre-print row includes graph data, then obtains the corresponding pre-print motor pulse width of graph data.Row is beaten
The corresponding printing motor pulse width of the type of printing evidence is configured by application developer.
After obtaining the corresponding pre-print motor pulse width of speed regulation print data, step S6 is executed, judges pre-print motor
Whether pulse width is greater than or equal to setting motor pulse width.Wherein, setting motor pulse width can according to actual needs into
Row setting.
If judging, pre-print motor pulse width is greater than or equal to setting motor pulse width, thens follow the steps S7, will
Motor pulse width is set as pre-print motor pulse width.It is more than that setting motor pulse is wide in pre-print motor pulse width
When spending, using setting motor pulse width as pre-print motor pulse width, to ensure printing rate.
After the pre-print motor pulse width for obtaining all pre-print rows, step S8 is executed, it is wide according to present motor pulse
The comparison result of degree and all pre-print motor pulse width carries out printing rate control to printing motor.Obtain all pre-print
After capable pre-print motor pulse width, by the pre-print motor pulse width of all pre-print rows respectively with present motor pulse
Width is compared, and according to the comparison result of present motor pulse width and pre-print motor pulse width to printing motor into
Row printing rate control, the speed change for the printing motor that can make is more smooth, while making printing more clear when adjusting the speed print data
It is clear, to improve print quality.
In the present embodiment, fought each other according to the comparison result of present motor pulse width and all pre-print motor pulse width
If the step of print motor carries out printing rate control includes: that there are pre-print motor pulse width is big in preset quantity pre-print row
In present motor pulse width, then using maximum pre-print motor pulse width as present motor pulse width to printing motor
Carry out printing rate control.There are pre-print motor pulse width to be greater than present motor pulse width in judging pre-print row
When, then illustrate there is the print line for needing to slow down printing rate in pre-print row, using pre-print motor pulse width as current
Motor pulse width is controlled to printing motor, so that changing between current print line and the pre-print row that will print
Gently, the print quality at speed regulation print data is ensured.
Printing motor is carried out according to the comparison result of present motor pulse width and all pre-print motor pulse width
The step of printing rate control further include: if there is no pre-print motor pulse width to be greater than currently in preset quantity pre-print row
Motor pulse width then controls printing motor according to present motor pulse width.Judging preset quantity pre-print row
In there is no pre-print motor pulse width to be greater than present motor pulse width, then the current printing rate of explanation meets pre-print row
The rate requirement of middle speed regulation print data then keeps current printing rate, ensures print quality.
Computer installation embodiment:
The computer installation of the present embodiment includes controller, and controller realizes above-mentioned thermal printing when executing computer program
Step in machine print speed method of adjustment embodiment.
For example, computer program can be divided into one or more modules, one or more module, which is stored in, is deposited
It in reservoir, and is executed by controller, to complete the present invention.One or more modules can be the system that can complete specific function
Column count machine program instruction section, the instruction segment is for describing implementation procedure of the computer program in computer installation.
Computer installation may include, but be not limited only to, controller, memory.It will be understood by those skilled in the art that calculating
Machine device may include more or fewer components, perhaps combine certain components or different components, such as computer installation
It can also include input-output equipment, network access equipment, bus etc..
For example, controller can be central processing unit (Central Processing Unit, CPU), it can also be
His general purpose controller, digital signal controller (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array
(FieldProgrammable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor are patrolled
Collect device, discrete hardware components etc..General purpose controller can be microcontroller or the controller be also possible to it is any conventional
Controller etc..Controller is the control centre of computer installation, utilizes various interfaces and the entire computer installation of connection
Various pieces.
Memory can be used for storing computer program and/or module, and controller is stored in memory by operation or execution
Interior computer program and/or module, and the data being stored in memory are called, realize the various function of computer installation
Energy.For example, memory can mainly include storing program area and storage data area, wherein storing program area can storage program area,
Application program needed at least one function (such as sound receive capabilities, sound are converted into literal function etc.) etc.;Storing data
Area, which can be stored, uses created data (such as audio data, text data etc.) etc. according to mobile phone.In addition, memory can be with
It can also include nonvolatile memory, such as hard disk, memory, plug-in type hard disk, intelligence including high-speed random access memory
Storage card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash
Card), at least one disk memory, flush memory device or other volatile solid-state parts.
Computer readable storage medium embodiment:
If the integrated module of the fixed frequency air conditioner of above-described embodiment is realized in the form of SFU software functional unit and as independence
Product when selling or using, can store in a computer readable storage medium.Based on this understanding, it realizes above-mentioned
All or part of the process in thermal-sensitive printer printing speed adjustment method embodiment can also be instructed by computer program
Relevant hardware is completed, and computer program can be stored in a computer readable storage medium, and the computer program is controlled
When device processed executes, it can be achieved that the step of above-mentioned thermal-sensitive printer printing speed adjustment method embodiment.Wherein, computer program packet
Computer program code is included, computer program code can be source code form, object identification code form, executable file or certain
Intermediate form etc..Storage medium may include: any entity or device, recording medium, U that can carry computer program code
Disk, mobile hard disk, magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), arbitrary access
Memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It needs
Bright, the content that computer-readable medium includes can be fitted according to the requirement made laws in jurisdiction with patent practice
When increase and decrease, such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium does not include electric carrier wave letter
Number and telecommunication signal.
It can be seen from the above, thermal-sensitive printer printing speed adjustment method of the invention is printed to current print line
When, by judging exist in pre-print row and adjust with the presence or absence of speed regulation print data in the preset quantity pre-print row that will print
When fast print data, the corresponding pre-print motor pulse width of speed regulation print data is obtained, and according to present motor pulse width
Printing rate control is carried out to printing motor with the comparison result of pre-print motor pulse width, so that printing speed regulation print data
When be more clear, to improve print quality.
It should be noted that the above is only a preferred embodiment of the present invention, but the design concept invented is not limited thereto,
All insubstantial modifications made using this design to the present invention, are also fallen within the scope of protection of the present invention.