CN103707665A - Character printing control method and device applied to paper recorder - Google Patents

Character printing control method and device applied to paper recorder Download PDF

Info

Publication number
CN103707665A
CN103707665A CN201310692370.1A CN201310692370A CN103707665A CN 103707665 A CN103707665 A CN 103707665A CN 201310692370 A CN201310692370 A CN 201310692370A CN 103707665 A CN103707665 A CN 103707665A
Authority
CN
China
Prior art keywords
array
filled
row
print
character
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.)
Granted
Application number
CN201310692370.1A
Other languages
Chinese (zh)
Other versions
CN103707665B (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.)
Chongqing Chuanyi Automation Co Ltd
Original Assignee
Chongqing Chuanyi Automation 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 Chongqing Chuanyi Automation Co Ltd filed Critical Chongqing Chuanyi Automation Co Ltd
Priority to CN201310692370.1A priority Critical patent/CN103707665B/en
Publication of CN103707665A publication Critical patent/CN103707665A/en
Application granted granted Critical
Publication of CN103707665B publication Critical patent/CN103707665B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a character printing control method and a device applied to a paper recorder. The method comprises that: when a communication frame sent by a main processor of the paper recorder is received, the communication frame is parsed and a character needed to be printed is acquired; a lattice filling pattern of the character needed to be printed is searched in a pre-stored character stock; the lattice filling pattern of the character needed to be printed is filled in a preset data array; and when the data array is filled up, a printing module is driven to print the character needed to be printed according to the lattice filling pattern in the data array. With application of the method and the device, the paper recorder can be utilized to print the character.

Description

Be applied to word print control program and the device of paper recorder
Technical field
The present invention relates to industrial control technology field, particularly a kind of word print control program and device that is applied to paper recorder.
Background technology
In the prior art, word is printed as a very important function that has paper recorder, and the information such as the data of the duty of its equipment, set parameter, collection and false alarm all need print with the form of word; According to statistics, in having paper recorder, word print out task can account for 70% of its whole printing amount.Therefore, in the prior art, how to have utilized paper recorder printing character becoming study hotspot.
Summary of the invention
In view of this, the object of the present invention is to provide a kind of word print control program and device that is applied to paper recorder, to realize utilizing, have paper recorder printing character.
For achieving the above object, the invention provides following technical scheme:
A word print control program that is applied to paper recorder, comprising:
At the primary processor that receives paper recorder, send communication frame time, resolve described communication frame, obtain and to need printable character;
From the character library prestoring, search described dot matrix the fill style that needs printable character;
The described dot matrix the fill style of printable character that needs is filled in default array;
When described array is filled completely, drive print module according to the dot matrix the fill style in described array, print the described printable character that needs.
Preferably, described driving print module, according to the dot matrix the fill style in described array, is printed the described printable character that needs, and comprising:
Determine the dead-center position in described array;
From described dead-center position, check line by line whether the element in described array is filled;
When described element is filled, drive print module to print.
Preferably, for the first row element adjacent in described array and the second row element, describedly check that line by line whether the element in described array is filled, and comprising:
According to first direction, check successively whether the element in described the first row element is filled;
According to second direction, check that successively whether element in described the second row element is by filling; Wherein, the opposite direction of described first direction and described second direction.
Preferably, described array is the two-dimensional array of 7 row 600 row.
Preferably, described communication frame is comprised of ASCII ASII.
A word print control unit that is applied to paper recorder, comprising:
Parsing module is used for, and when receiving the communication frame that the primary processor of paper recorder sends, resolves described communication frame, obtains and needs the character printed;
Search module for, from the character library prestoring, search described dot matrix the fill style that needs printable character;
Packing module is used for, and the described dot matrix the fill style of printable character that needs is filled in default array;
Driver module is used for, and when described array is filled completely, drives print module according to the dot matrix the fill style in described array, prints the described printable character that needs.
Preferably, described driver module comprises:
Determining unit is used for, and determines the dead-center position in described array;
Check unit for, from described dead-center position, check line by line whether the element in described array is filled;
Driver element is used for, and when described element is filled, drives print module to print.
Preferably, for the first row element in described array and the second row element, described in check that unit comprises:
First check subelement for, according to first direction, check successively whether the element in described the first row element is filled;
Second check subelement for, according to second direction, check successively whether the element in described the second row element is filled; Wherein, the opposite direction of described first direction and described second direction.
Preferably, described array is the two-dimensional array of 7 row 600 row.
Preferably, described communication frame is comprised of ASCII ASII.
By above-mentioned technical scheme, can be found out, in embodiments of the present invention, during the default communication frame sending at the primary processor that receives paper recorder from processor, first can resolve communication frame, obtain and need printable character; Then can from the character library prestoring, search and need the dot matrix of printable character the fill style; Then the dot matrix the fill style that needs printable character can be filled in default array again; Finally, when array is filled when full, can drive print module according to the dot matrix the fill style in array, print and need printable character; Therefore, adopt method of the present invention and device, can realize utilization has paper recorder printing character.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the disclosed flow chart that is applied to the word print control program of paper recorder of the embodiment of the present invention;
Fig. 2 is dot matrix the fill style of the disclosed character A of the embodiment of the present invention;
Fig. 3 is the disclosed another flow chart that is applied to the word print control program of paper recorder of the embodiment of the present invention;
Fig. 4 is the disclosed module map that is applied to the word print control unit of paper recorder of the embodiment of the present invention;
Fig. 5 is the disclosed another module map that is applied to the word print control unit of paper recorder of the embodiment of the present invention;
Fig. 6 is disclosed another module map that is applied to the word print control unit of paper recorder of the embodiment of the present invention.
The specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
The invention discloses a kind of word print control program that is applied to paper recorder, as shown in Figure 1, the method at least comprises the following steps:
S11: during the default communication frame sending at the primary processor that receives paper recorder from processor, resolve communication frame, obtain and need printable character;
Concrete, communication frame can be comprised of ASCII (American Standard Code for Information Interchange, ASII); And after communication frame is resolved, can directly obtain and need printable character;
S12: search from the character library prestoring from processor and need the dot matrix of printable character the fill style;
Concrete, in prior art, what all characters adopted is the dot matrix demonstration/printing type of 7 row 5 row, and therefore, pre-stored in character library be dot matrix the fill style that 7 row 5 of each character are listed as; For example, as shown in Figure 2, dot matrix the fill style of character " A ";
S13: the dot matrix the fill style that needs printable character is filled in default array from processor;
Concrete, default array can be the two-dimensional array of 7 row 600 row; And in order clearly to print each character, can between dot matrix the fill style of each character, reserve row blank, and not pre-filled, so, different intercharacters can be separated, thereby can clearly print each character;
The filling process that it is concrete, can be as follows:
Dot matrix the fill style of first character is filled in to the first five row (the 1st row are to the 5th row) in two-dimensional array, then the 6th row give over to blank, dot matrix the fill style of second character is filled in to the row of the 7th in two-dimensional array to the 11st row, then the 12nd row give over to blank again, type, expires whole two-dimensional array until fill successively; Therefore, adopting above-mentioned this filling mode, the two-dimensional array of 7 row 600 row, can fill dot matrix the fill styles of 10 characters altogether;
S14: when array is filled completely, drive print module from processor, according to the dot matrix the fill style in array, print and need printable character.
Therefore, in embodiments of the present invention, during the default communication frame sending at the primary processor that receives paper recorder from processor, first can resolve communication frame, obtain and need printable character; Then can from the character library prestoring, search and need the dot matrix of printable character the fill style; Then the dot matrix the fill style that needs printable character can be filled in default array again; Finally, when array is filled when full, drive print module according to the dot matrix the fill style in array, print and need printable character; Therefore, adopt method of the present invention, can realize utilization has paper recorder printing character.
, it should be noted that meanwhile, due to when the real work, when array, fill when full, from processor, can be sent to print module by filling full array, and then control print module and print; And in the prior art, have the processor of paper recorder, and every parsing obtains one and needs printable character, and the print module that is sent to being about to prints; Therefore, compare in prior art, adopt method of the present invention, can improve print speed undoubtedly.
In other embodiment of the present invention, as shown in Figure 3, the step S14 in above-mentioned all embodiment can specifically comprise:
S31: determine the dead-center position in array;
Concrete, when array is the two-dimensional array of 7 row 600 row, its dead-center position can be the position of the 1st row the 1st row, the position of the position of the 1st row 600 row, the 7th row 1 row or the position of the 7th row 600 row;
S32: from dead-center position, check line by line whether the element in array is filled;
S33: when element is filled, drive print module to print.
Concrete, the function of above-mentioned print module can be realized by print needle; And now for the first row element adjacent in array and the second row element, its process of checking whether the element in array is filled can be as follows:
A: check according to first direction successively whether the element in the first row element is filled;
B: check according to second direction successively whether the element in the second row element is filled; Wherein, the opposite direction of first direction and second direction;
More specifically, its first direction can be from left to right, and second direction can be from right to left; Now, from processor, can if be filled, drive print needle to do beat action according to checking successively from left to right whether the element the first row element is filled, thereby realize, print, and when not filling, print needle directly be skipped; And after the first row element is printed, can directly drive print needle to jump to the low order end of the second row, according to dextrosinistral direction, check and print; And in the prior art, there is the processor of paper recorder can drive print needle according to a direction, to print always, suppose still to print from left to right the first row element, printing the first row element so, while starting to print the second row element, still can drive print needle to jump to the high order end of the second row, according to direction from left to right, print; Therefore, therefore, adopt this printing type of the present invention, also saved the time-write interval undoubtedly, improved printing effect.
It should be noted that, can record according to test, print module is in the range of every a line, drive so print module to range place, can carry out next line element, and needn't drive print module that whole elements of every a line are all checked, and can further save the time-write interval so undoubtedly, improve printing effect; Meanwhile, it should be noted that a feature due to word print out task is that all printable characters that need are used identical color to print; Therefore in the communication frame that main processing sends, except comprising, need printable character, also a default byte is used for storing color; And carrying out word while printing from processor at every turn, and can rotate print cartridge motor first according to the value of above-mentioned color byte, select correct color (and all constant in the process printed at whole word of this color), and then carry out word printing.
The invention also discloses a kind of word print control unit of being applied to paper recorder corresponding with said method, as shown in Figure 4, this device can specifically comprise:
Parsing module 41 for, when receiving the communication frame that the primary processor of paper recorder sends, resolve communication frame, obtain and need the character printed;
Concrete, communication frame can be comprised of ASII code;
Search module 42 for, from the character library prestoring, search and need the dot matrix of printable character the fill style;
Packing module 43 for, the dot matrix the fill style that needs printable character is filled in default array;
Concrete, above-mentioned array can be specially the two-dimensional array of 7 row 600 row;
Driver module 44 for, when array, fill when full, drive print module according to the dot matrix the fill style in array, print and need printable character.
Therefore, in embodiments of the present invention, during the default communication frame sending at the primary processor that receives paper recorder from processor, first can resolve communication frame, obtain and need printable character; Then can from the character library prestoring, search and need the dot matrix of printable character the fill style; Then the dot matrix the fill style that needs printable character can be filled in default array again; Finally, when array is filled when full, drive print module according to the dot matrix the fill style in array, print and need printable character; Therefore, adopt device of the present invention, can realize utilization has paper recorder printing character.
In other embodiment of the present invention, as shown in Figure 5, the driver module 44 in above-mentioned all embodiment can comprise:
Determining unit 51 for, determine the dead-center position in array;
Check unit 52 for, from dead-center position, check line by line whether the element in array is filled;
Driver element 53 for, when element is filled, drive print module to print.
In other embodiment of the present invention, for the first row element in array and the second row element, as shown in Figure 6, check that unit 52 can comprise:
First check subelement 61 for, according to first direction, check successively whether the element in the first row element is filled;
Second check subelement 62 for, according to second direction, check successively whether the element in the second row element is filled; Wherein, the opposite direction of first direction and second direction;
It should be noted that, the above-mentioned function that is applied to the word printing equipment of paper recorder can be specifically in default realizing from processor; And will there be the original processor of paper recorder (primary processor) and the newly-increased task from processor to separate, its primary processor can mainly be responsible for external information acquisition and processing, the output of reporting to the police, button is caught and the task such as content demonstration, and can mainly be responsible for print out task from processor.And primary processor with from processor, can specifically by RS485 bus, be connected.
And can, referring to the record of said method, not repeat them here for parsing module 41, each refinement function of searching module 42, packing module 43 and driver module 44.
Above-mentioned explanation to the disclosed embodiments, makes professional and technical personnel in the field can realize or use the present invention.To the multiple modification of these embodiment, will be apparent for those skilled in the art, General Principle as defined herein can, in the situation that not departing from the spirit or scope of the present invention, realize in other embodiments.Therefore, the present invention will can not be restricted to these embodiment shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.

Claims (10)

1. a word print control program that is applied to paper recorder, is characterized in that, comprising:
At the primary processor that receives paper recorder, send communication frame time, resolve described communication frame, obtain and to need printable character;
From the character library prestoring, search described dot matrix the fill style that needs printable character;
The described dot matrix the fill style of printable character that needs is filled in default array;
When described array is filled completely, drive print module according to the dot matrix the fill style in described array, print the described printable character that needs.
2. method according to claim 1, is characterized in that, described driving print module, according to the dot matrix the fill style in described array, is printed the described printable character that needs, and comprising:
Determine the dead-center position in described array;
From described dead-center position, check line by line whether the element in described array is filled;
When described element is filled, drive print module to print.
3. method according to claim 2, is characterized in that, for the first row element adjacent in described array and the second row element, describedly checks that line by line whether the element in described array is filled, and comprising:
According to first direction, check successively whether the element in described the first row element is filled;
According to second direction, check that successively whether element in described the second row element is by filling; Wherein, the opposite direction of described first direction and described second direction.
4. method according to claim 1, is characterized in that, described array is the two-dimensional array of 7 row 600 row.
5. method according to claim 1, is characterized in that, described communication frame is comprised of ASCII ASII.
6. a word print control unit that is applied to paper recorder, is characterized in that, comprising:
Parsing module is used for, and when receiving the communication frame that the primary processor of paper recorder sends, resolves described communication frame, obtains and needs the character printed;
Search module for, from the character library prestoring, search described dot matrix the fill style that needs printable character;
Packing module is used for, and the described dot matrix the fill style of printable character that needs is filled in default array;
Driver module is used for, and when described array is filled completely, drives print module according to the dot matrix the fill style in described array, prints the described printable character that needs.
7. device according to claim 6, is characterized in that, described driver module comprises:
Determining unit is used for, and determines the dead-center position in described array;
Check unit for, from described dead-center position, check line by line whether the element in described array is filled;
Driver element is used for, and when described element is filled, drives print module to print.
8. device according to claim 7, is characterized in that, for the first row element in described array and the second row element, described in check that unit comprises:
First check subelement for, according to first direction, check successively whether the element in described the first row element is filled;
Second check subelement for, according to second direction, check successively whether the element in described the second row element is filled; Wherein, the opposite direction of described first direction and described second direction.
9. device according to claim 6, is characterized in that, described array is the two-dimensional array of 7 row 600 row.
10. device according to claim 6, is characterized in that, described communication frame is comprised of ASCII ASII.
CN201310692370.1A 2013-12-17 2013-12-17 It is applied to word print control program and the device of paper recorder Active CN103707665B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310692370.1A CN103707665B (en) 2013-12-17 2013-12-17 It is applied to word print control program and the device of paper recorder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310692370.1A CN103707665B (en) 2013-12-17 2013-12-17 It is applied to word print control program and the device of paper recorder

Publications (2)

Publication Number Publication Date
CN103707665A true CN103707665A (en) 2014-04-09
CN103707665B CN103707665B (en) 2016-11-09

Family

ID=50401171

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310692370.1A Active CN103707665B (en) 2013-12-17 2013-12-17 It is applied to word print control program and the device of paper recorder

Country Status (1)

Country Link
CN (1) CN103707665B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4263504A (en) * 1979-08-01 1981-04-21 Ncr Corporation High density matrix code
GB2157865A (en) * 1984-04-20 1985-10-30 Seikosha Kk Dot printer
DE3434887A1 (en) * 1984-09-22 1986-04-03 Olympia Werke Ag, 2940 Wilhelmshaven Method for a matrix printer for representing alphanumeric characters
CN85102473A (en) * 1985-04-01 1987-06-17 山东电子研究所 Chinese character information processing technique with sequential word-root approach
CN1030985A (en) * 1987-07-23 1989-02-08 中国商用机器公司 The disposal route of ideograph and device
US5117371A (en) * 1987-02-27 1992-05-26 Franz Kristen Character storage process and arrangement for reducing the redundancy of characters for matrix printers with multipass printing
WO1997026619A1 (en) * 1996-01-15 1997-07-24 Philip Richardson Data encoding and decoding systems
JP3035418B2 (en) * 1992-12-22 2000-04-24 キヤノン株式会社 Character printing method and its printing device
CN1803460A (en) * 2005-01-12 2006-07-19 长沙高新开发区佳程防伪科技有限公司 Transverse typeset printing technology of minitype printer
CN101100138A (en) * 2007-07-27 2008-01-09 东莞市创普光电技术有限公司 Laser lattice code printing method
CN101923450A (en) * 2010-04-23 2010-12-22 中兴通讯股份有限公司 Printing method and device of heat-sensitive printer
CN102407683A (en) * 2010-09-26 2012-04-11 江门市得实计算机外部设备有限公司 Stepless zooming printing control method and device of printer

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4263504A (en) * 1979-08-01 1981-04-21 Ncr Corporation High density matrix code
GB2157865A (en) * 1984-04-20 1985-10-30 Seikosha Kk Dot printer
DE3434887A1 (en) * 1984-09-22 1986-04-03 Olympia Werke Ag, 2940 Wilhelmshaven Method for a matrix printer for representing alphanumeric characters
CN85102473A (en) * 1985-04-01 1987-06-17 山东电子研究所 Chinese character information processing technique with sequential word-root approach
US5117371A (en) * 1987-02-27 1992-05-26 Franz Kristen Character storage process and arrangement for reducing the redundancy of characters for matrix printers with multipass printing
CN1030985A (en) * 1987-07-23 1989-02-08 中国商用机器公司 The disposal route of ideograph and device
JP3035418B2 (en) * 1992-12-22 2000-04-24 キヤノン株式会社 Character printing method and its printing device
WO1997026619A1 (en) * 1996-01-15 1997-07-24 Philip Richardson Data encoding and decoding systems
CN1803460A (en) * 2005-01-12 2006-07-19 长沙高新开发区佳程防伪科技有限公司 Transverse typeset printing technology of minitype printer
CN101100138A (en) * 2007-07-27 2008-01-09 东莞市创普光电技术有限公司 Laser lattice code printing method
CN101923450A (en) * 2010-04-23 2010-12-22 中兴通讯股份有限公司 Printing method and device of heat-sensitive printer
CN102407683A (en) * 2010-09-26 2012-04-11 江门市得实计算机外部设备有限公司 Stepless zooming printing control method and device of printer

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
尹艳辉,王海文,邢军: "《计算机组成原理教程》", 30 September 2013, article "计算机组成原理教程" *

Also Published As

Publication number Publication date
CN103707665B (en) 2016-11-09

Similar Documents

Publication Publication Date Title
CN108073913B (en) Handwriting datamation data acquisition method
CN1093664C (en) Layout display apparatus for tape printing apparatus, capable of displaying plural-lined characters at high speed
CN103336690B (en) HTML (Hypertext Markup Language) 5-based text-element drawing method and device
CN109032722A (en) Update method, device and equipment, the medium of the display effect of UI component
US8368697B2 (en) Providing an overview of a large event sample period that supports triage and navigation
CN103268185A (en) Text display method and text display device for e-book reader
JP2013058090A5 (en)
CN1176428A (en) Efficient method and apparatus for downloading of fonts from processor to printer
US11763504B2 (en) Method for displaying electronic price tag, server and storage medium
CN110223643B (en) Data transmission method, assembly and system and display device
CN107977590A (en) A kind of information reads system, method and collecting device
CN103707665A (en) Character printing control method and device applied to paper recorder
US20150036154A1 (en) Methods and apparatuses for displaying text block and processing text block
CN106293862B (en) A kind of analysis method and device of expandable mark language XML data
CN110705215A (en) Encoding method, encoding device and display device of MIPI configuration file
CN109710808A (en) A kind of analytic method of XML file, system, device and readable storage medium storing program for executing
CN102184102B (en) Web page data range selecting system
CN204406441U (en) A kind of e-inks set of hanging scrolls code proving installation
CN201278146Y (en) ATA interface signal capturing apparatus implemented based on FPGA
CN103428397A (en) Image information processing method and device
CN112416995B (en) Data statistics method, device, computer equipment and storage medium
CN103699538A (en) Method and device for file sharing
CN105306928A (en) Method and device for testing set top box browser
US9619438B2 (en) Embedding bitmap fonts in PDF files
CN102736865A (en) System and method for printing distributed auxiliary information file

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant