CN111221480B - Print data processing method and system - Google Patents

Print data processing method and system Download PDF

Info

Publication number
CN111221480B
CN111221480B CN202010026061.0A CN202010026061A CN111221480B CN 111221480 B CN111221480 B CN 111221480B CN 202010026061 A CN202010026061 A CN 202010026061A CN 111221480 B CN111221480 B CN 111221480B
Authority
CN
China
Prior art keywords
task
printing
print
determining
parameters
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
CN202010026061.0A
Other languages
Chinese (zh)
Other versions
CN111221480A (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.)
Zhuhai Seal Interest Technology Co Ltd
Original Assignee
Zhuhai Seal Interest 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 Zhuhai Seal Interest Technology Co Ltd filed Critical Zhuhai Seal Interest Technology Co Ltd
Priority to CN202010026061.0A priority Critical patent/CN111221480B/en
Publication of CN111221480A publication Critical patent/CN111221480A/en
Application granted granted Critical
Publication of CN111221480B publication Critical patent/CN111221480B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1244Job translation or job parsing, e.g. page banding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1253Configuration of print job parameters, e.g. using UI at the client
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

The invention discloses a printing data processing method and a printing data processing system, which are based on the method provided by the invention, the time of a motor and a heating plate is calculated, and the counting of the number of paper feeding steps is put into a timer for processing.

Description

Print data processing method and system
Technical Field
The present disclosure relates to the field of electronic technologies, and in particular, to a print data processing method and system.
Background
In general, two timers are adopted to control the pulse time of the motor and the heating time of the heating plate in a timing interruption manner so as to control the effect of the whole printer, but the data is submitted to the heating plate for heating in different ways.
At present, the heating time and the pulse time of the motor can be calculated outside the interruption, the number of paper feeding steps of paper, heating data and other related parameters are calculated, and then certain parameters are submitted to the timer interruption, so that the timer only plays a role in timing, but the accuracy of the method for controlling the time is lower.
Disclosure of Invention
The invention provides a print data processing method and a print data processing system, which are used for solving the problem of lower accuracy of time control in the prior art.
The specific technical scheme is as follows:
a print data processing method, the method comprising:
when the interrupt service routine receives a print job submission, determining the task type of the current printing task in the printing task;
determining a corresponding processing mode according to the task type;
calculating a time parameter including a timing time of the motor and a heating time of the heating plate;
and executing the printing task according to the determined time parameter, the processing mode and the printing parameters in the printing task.
Optionally, before determining the task type of the current print task in the print task, the method further includes:
determining an idle task structure in the distributed task structure array;
and filling instruction parameters and data to be printed issued by the upper computer into the task structure body, and packaging the instruction parameters and the data to be printed into a printing task.
Optionally, filling the instruction parameters and the data to be printed issued by the upper computer into the task structure body, including:
determining the printing steps of the current printing task, the task type, the printed data content, the printing number of times and the printing parameters of a next task pointer;
and filling the determined printing parameters to the corresponding positions of the task structure body.
Optionally, before determining the task type of the current print task in the print task, the method further includes:
detecting whether an abnormal exit mark exists in the print task;
if so, the print job is exited and the timer is closed.
Optionally, after executing the print job according to the determined processing manner and the print parameters in the print job, the method further includes:
detecting whether the printing task is executed or not;
if the execution of the printing task is completed, releasing the task structure body;
if the printing task is not finished, maintaining the current processing state.
A print data processing system, the system comprising:
the determining module is used for determining the task type of the printing task in the printing task when the interrupt service routine receives the printing task submission;
the processing module is used for determining a corresponding processing mode according to the task type; calculating a time parameter including a timing time of the motor and a heating time of the heating plate; and executing the printing task according to the determined time parameter, the processing mode and the printing parameters in the printing task.
Optionally, the processing module is further configured to determine an idle task structure in the allocated task structure array; and filling instruction parameters and data to be printed issued by the upper computer into the task structure body, and packaging the instruction parameters and the data to be printed into a printing task.
Optionally, the processing module is further configured to determine a number of printing steps of the current print job, a job type, a printed data content, a number of printing copies, and a printing parameter of a next job pointer; and filling the determined printing parameters to the corresponding positions of the task structure body.
Optionally, the processing module is further configured to detect whether an abnormal exit identifier exists in the print job; if so, the print job is exited and the timer is closed.
Optionally, the processing module is further configured to detect whether the execution of the current print job is completed; if the execution of the printing task is completed, releasing the task structure body; if the printing task is not finished, maintaining the current processing state.
Based on the method provided by the invention, the time of the motor and the heating plate is calculated, and the counting of the number of paper feeding steps is put into the timer for processing, so that the method can have a clearer software structure and can realize modularization, and the method can control the time of the timer more accurately only by optimizing code logic in an interrupt service routine, thereby solving the problem of lower time control accuracy in the method in the prior art.
Drawings
FIG. 1 is a flowchart of a print data processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a print job application and submission in an embodiment of the present invention;
FIG. 3 is a flowchart of a motor interrupt service routine in an embodiment of the present invention;
fig. 4 is a schematic diagram of a print data processing system according to an embodiment of the present invention.
Detailed Description
The following detailed description of the technical solutions of the present invention will be given by way of the accompanying drawings and the specific embodiments, and it should be understood that the specific technical features of the embodiments and the embodiments of the present invention are merely illustrative of the technical solutions of the present invention, and not limiting, and that the embodiments and the specific technical features of the embodiments of the present invention may be combined with each other without conflict.
Fig. 1 is a flowchart of a print data processing method according to an embodiment of the present invention, where the method includes:
s1, when an interrupt service routine receives a print job submission, determining the job type of the print job in the print job;
s2, determining a corresponding processing mode according to the task type;
s3, calculating a time parameter comprising the timing time of the motor and the heating time of the heating plate;
and S4, executing the printing task according to the determined time parameter, the processing mode and the printing parameters in the printing task.
Specifically, the print processing mode taking the task as a unit is to package the content to be printed into one print task according to the print instruction issued by the upper computer, each task is assigned with a corresponding task type, the print tasks of different types are processed in the terminal service program in different modes, besides the assigned task type, the parameters such as the number of paper steps of the assigned task, the data to be printed, the number of printing steps of the task and the like are required, and after one task is packaged, the print task can be submitted to the interrupt service program for processing.
In order to generate a print job, the invention firstly needs to determine an idle job structure body in an allocated job structure body array, fill instruction parameters and data to be printed issued by an upper computer into the job structure body, and package the instruction parameters and the data to be printed into the print job. Further, the content of the structure is as follows:
1. designating the number of printing steps of the current printing task;
2. defining a variable of the step to which a counting task is printed;
3. specifying the task type of the task, such as: an empty paper feed type, a printing content type, a paper feed to paper tearing port type and the like;
4. specifying the content of data to be printed;
5. designating the number of printing copies of the current printing task;
6. designating a next task pointer;
7. the present structure does not use a logo.
Based on the content of the above-mentioned structure, the specific generation mode of the print job is shown in fig. 2, in the flow shown in fig. 2, a task structure array is first allocated, when a task is required to be applied, an unused task structure is obtained from the task structure array, the unused task structure is packed into a print job according to the designated parameters of the host computer and the member variables of the structure to be applied for by the data to be printed, and the print job is improved, and if the motor timer is not started, the motor timer is started to start printing.
And finally, when the motor timer interrupt service routine receives the task submission, corresponding processing is carried out according to the type of the print task, for example, for the type of the forward empty paper feeding, namely, only forward paper feeding without printing content, the routine can compare the step number of the print task with the step number of the print task according to the task step number counter, if the counter is smaller than the step number of the print task, the corresponding identification variable is set to the empty paper feeding type, and the paper feeding direction is forward, and because the print content is not needed, the identification variable related to the content is set to be empty, so that the data is not needed to be processed, and the follow-up data represented by the non-empty state can be processed.
Further, whether the execution of the current printing task is completed is detected in real time in the execution process of the current printing task, if the execution of the current printing task is completed, a task structure body corresponding to the current printing task is released, and if the execution of the current printing task is not completed, the current printing task is continuously executed.
Further, as shown in fig. 3, a flowchart of a motor interrupt service routine in an embodiment of the present invention is shown, and in fig. 3, the flowchart includes:
s31, the interrupt service routine firstly judges whether an abnormal exit mark exists in a structural body of a print job;
if so, S32 is executed, and if not, S33 is executed.
S32, exiting the print task and closing the timer;
s33, selecting a corresponding branch according to the task type;
s34, processing relevant parameters of each branch record;
the relevant parameters of this include print direction, print type, whether to preprocess the data, etc.
S35, calculating motor timing time;
s36, processing respective functions according to the printing type, and enabling related interfaces;
s37, preprocessing data to be printed;
s38, judging whether to release the task structure;
s39, paper detection processing;
s40, performing exception handling;
s41, ending the printing task.
Based on the method provided by the invention, the time of the motor and the heating plate is calculated, the count of the number of paper feeding steps is put into the timer for processing, the method can have a clearer software structure, can realize modularization, in addition, the method can control the time of the timer more accurately only by optimizing code logic in the interrupt service routine, thereby solving the problem of lower time control accuracy in the prior art.
Corresponding to the method provided by the invention, the embodiment of the invention also provides a printing data processing system, FIG. 4 is a schematic diagram of a print data processing system according to an embodiment of the present invention, the system including:
the determining module 401 is configured to determine a task type of a current print task in a print task when the interrupt service routine receives a print task submission;
a processing module 402, configured to, according to the task type, determining a corresponding processing mode; calculating a time parameter including a timing time of the motor and a heating time of the heating plate; and executing the printing task according to the determined time parameter, the processing mode and the printing parameters in the printing task.
Further, in the embodiment of the present invention, the processing module 402 is further configured to determine an idle task structure in the allocated task structure array; and filling instruction parameters and data to be printed issued by the upper computer into the task structure body, and packaging the instruction parameters and the data to be printed into a printing task.
Further, in an embodiment of the present invention, the processing module 402, the method is also used for determining the printing steps of the current printing task, the task type, the printed data content, the printing number of times and the printing parameters of a next task pointer; and filling the determined printing parameters to the corresponding positions of the task structure body.
Further, in the embodiment of the present invention, the processing module 402 is further configured to detect whether an abnormal exit identifier exists in the print job; if so, the print job is exited and the timer is closed.
Further, in the embodiment of the present invention, the processing module 402 is further configured to detect whether the execution of the current print job is completed; if the execution of the printing task is completed, releasing the task structure body; if the printing task is not finished, maintaining the current processing state.
While the preferred embodiments of the present application have been described, once the basic inventive concepts are known to those of ordinary skill in the art, additional variations and modifications may be made to these embodiments. It is therefore intended that the following appended claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the present application, including those modified to include the use of specific symbols, labels, and so forth to determine vertices.
It is obvious that the process is not limited to, various modifications and alterations to this application may be made by those skilled in the art without departing from the spirit and scope of this application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and the equivalents thereof, it is intended that the present application also encompass such changes and modifications.

Claims (8)

1. A print data processing method, characterized in that the method comprises:
when the interrupt service routine receives the submission of the printing task, determining the task type of the printing task in the printing task;
determining a corresponding processing mode according to the task type;
calculating a time parameter including a timing time of the motor and a heating time of the heating plate;
executing the printing task according to the determined time parameter, the processing mode and the printing parameters in the printing task; the printing parameters comprise printing steps, task types, printed data content, printing copies and a next task pointer;
before determining the task type of the current printing task in the printing tasks, the method further comprises the following steps:
determining an idle task structure in the distributed task structure array;
and filling instruction parameters and data to be printed issued by the upper computer into the task structure body, and packaging the instruction parameters and the data to be printed into a print task.
2. The method of claim 1, wherein filling the task structure with the instruction parameters and the data to be printed issued by the host computer comprises:
determining the current printing printing parameters of the task;
and filling the determined printing parameters to the corresponding positions of the task structure body.
3. The method of claim 1, wherein before determining the type of job for the current print job from the print jobs, the method further comprises:
detecting whether an abnormal exit mark exists in the print task;
if so, the print job is exited and the timer is closed.
4. The method of claim 1, wherein after executing the print job based on the determined time parameter, the processing mode, and the print parameter in the print job, the method further comprises:
detecting whether the printing task is executed or not;
if the execution of the printing task is completed, releasing the task structure body;
if the printing task is not finished, maintaining the current processing state.
5. A print data processing system, the system comprising:
the determining module is used for determining the task type of the printing task in the printing task when the interrupt service routine receives the printing task submission;
the processing module is used for determining a corresponding processing mode according to the task type; calculating a time parameter including a timing time of the motor and a heating time of the heating plate; executing a printing task according to the determined time parameter, the processing mode and the printing parameter in the printing task, wherein the printing parameter comprises the number of printing steps, the type of the task, the printed data content, the number of printing copies and a next task pointer; the processing module is also used for determining an idle task structure body in the distributed task structure body array; and filling instruction parameters and data to be printed issued by the upper computer into the task structure body, and packaging the instruction parameters and the data to be printed into a print task.
6. The system of claim 5, wherein the processing module is further configured to determine a print parameter for the current print job; and filling the determined printing parameters to the corresponding positions of the task structure body.
7. The system of claim 5, wherein the processing module is further configured to detect whether an abnormal exit identification exists in the print job; if so, the print job is exited and the timer is closed.
8. The system of claim 5, wherein the processing module is further configured to detect whether the execution of the current print job is complete; if the execution of the printing task is completed, releasing the task structure body; if the printing task is not finished, maintaining the current processing state.
CN202010026061.0A 2020-01-10 2020-01-10 Print data processing method and system Active CN111221480B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010026061.0A CN111221480B (en) 2020-01-10 2020-01-10 Print data processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010026061.0A CN111221480B (en) 2020-01-10 2020-01-10 Print data processing method and system

Publications (2)

Publication Number Publication Date
CN111221480A CN111221480A (en) 2020-06-02
CN111221480B true CN111221480B (en) 2023-06-27

Family

ID=70832405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010026061.0A Active CN111221480B (en) 2020-01-10 2020-01-10 Print data processing method and system

Country Status (1)

Country Link
CN (1) CN111221480B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115534545B (en) * 2022-10-11 2024-02-09 珠海趣印科技有限公司 Printing control method of thermal printer based on motor and thermal sensitive sheet
CN116599001B (en) * 2023-04-23 2024-08-20 珠海芯烨电子科技有限公司 Protection method and system for stepping motor of printing terminal

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3022104B2 (en) * 1993-11-17 2000-03-15 富士ゼロックス株式会社 Printer device
JP3559713B2 (en) * 1997-10-27 2004-09-02 キヤノン株式会社 Print processing apparatus, print processing method, and storage medium storing processing program
EP0981104B1 (en) * 1998-07-29 2006-04-05 Seiko Epson Corporation Computer printer initialization
CN101923450B (en) * 2010-04-23 2014-09-10 中兴通讯股份有限公司 Printing method and device of heat-sensitive printer
JP5901196B2 (en) * 2011-09-28 2016-04-06 キヤノン株式会社 Printing control apparatus, method and program
CN106445426B (en) * 2016-08-31 2019-02-22 深圳市华阳信通科技发展有限公司 Text data acquisition and print control program and system based on printing driving
CN106585115B (en) * 2016-12-27 2018-01-16 艾体威尔电子技术(北京)有限公司 A kind of method that thermal printer driving is realized using a hardware timer

Also Published As

Publication number Publication date
CN111221480A (en) 2020-06-02

Similar Documents

Publication Publication Date Title
CN111221480B (en) Print data processing method and system
US4979132A (en) Control device for use with an image recording system
EP1647410A2 (en) Control of dual printing mechanisms
AU2020395474B2 (en) Method for operating a labelling system
JP2024032746A5 (en) After-treatment system, after-treatment system control method, and after-treatment system control program
JP2018114753A (en) Method for automatic process control of digital printer
JP2005169686A5 (en)
EP3206119B1 (en) Media processing system with scheduler
US8352756B2 (en) Image processing apparatus
CN114193935B (en) Printing consumable communication method, regeneration consumable chip, printing consumable and printing system
JP2002108597A (en) Printing device and method for controlling the same and recording medium with its program recorded thereon
CN110920278B (en) Feeding method of marking machine material, marking machine and readable storage medium
US10523836B2 (en) Information processing apparatus
EP4002082A1 (en) A printer and a method for planning a use of an input module of a printer
JP3125086B2 (en) Printer device recovery method and printer device using the same
CN117140964A (en) Model part neglecting method, slicing method and device, electronic equipment and medium
JPH04336264A (en) Printer
JPH07210365A (en) Image forming device
JPH02219134A (en) Data processor
JP3829385B2 (en) Printing device
JPH07108739A (en) Device for monitoring exhaustion of printing paper
JP2003312102A (en) Controlling method of printing apparatus
JPH10833A (en) Printer system and control method therefor
JP2713261B2 (en) Printing device
JPH09114516A (en) Operating state monitoring method for equipment control sequence and sequence controller in equipment control system

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