CN103707665B - It is applied to word print control program and the device of paper recorder - Google Patents
It is applied to word print control program and the device of paper recorder Download PDFInfo
- Publication number
- CN103707665B CN103707665B CN201310692370.1A CN201310692370A CN103707665B CN 103707665 B CN103707665 B CN 103707665B CN 201310692370 A CN201310692370 A CN 201310692370A CN 103707665 B CN103707665 B CN 103707665B
- Authority
- CN
- China
- Prior art keywords
- row
- array
- filled
- 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.)
- Active
Links
Abstract
The invention discloses a kind of word print control program being applied to paper recorder and device, the method includes: when the communication frame that the primary processor receiving paper recorder is sent, and resolves communication frame, it is thus achieved that need printable character;Searching from the character library prestoring needs dot matrix the fill style of printable character;Fill the dot matrix the fill style needing printable character to the array preset;When array is filled full, driving print module according to the dot matrix the fill style in array, printing needs printable character;Use the method and device of the present invention, can realize utilizing paper recorder printing character.
Description
Technical field
The present invention relates to technical field of industrial control, particularly to a kind of word being applied to paper recorder
Print control program and device.
Background technology
In the prior art, word prints a very important function as paper recorder, and it sets
The information such as standby duty, set parameter, the data of collection and false alarm are both needed to word
Form print;According to statistics, in paper recorder, word print out task can account for it and entirely beat
The 70% of print amount.Therefore, in the prior art, paper recorder printing character how is utilized to become
Study hotspot.
Content of the invention
In view of this, it is an object of the invention to provide a kind of word being applied to paper recorder and print control
Method and device processed, to realize utilizing paper recorder printing character.
For achieving the above object, the present invention provides following technical scheme:
A kind of word print control program being applied to paper recorder, comprising:
When the communication frame that the primary processor receiving paper recorder is sent, resolve described communication frame,
Acquisition needs printable character;
Described dot matrix the fill style needing printable character is searched from the character library prestoring;
Fill described dot matrix the fill style needing printable character to the array preset;
When described array is filled full, drive print module according to the dot matrix the fill style in described array,
Printing described needs printable character.
Preferably, described driving print module is according to the dot matrix the fill style in described array, prints described
Need printable character, comprising:
Determine the dead-center position in described array;
From the beginning of described dead-center position, check whether the element in described array is filled line by line;
When described element is filled, print module is driven to print.
Preferably, for the first row element adjacent in described array and the second row element, described look into line by line
See whether the element in described array is filled, comprising:
Check whether the element in described the first row element is filled successively according to first direction;
Check the element in described second row element whether by filling successively according to second direction;Wherein,
Described first direction is in opposite direction with described second direction.
Preferably, described array is the two-dimensional array of 7 row 600 row.
Preferably, described communication frame is made up of ASCII ASCII.
A kind of word print control unit being applied to paper recorder, comprising:
Parsing module is used for, and when the communication frame that the primary processor receiving paper recorder is sent, solves
Analyse described communication frame, it is thus achieved that the character that need to print;
Search module to be used for, from the character library prestoring, search described dot matrix the fill style needing printable character;
Packing module is used for, and fills described dot matrix the fill style needing printable character to the array preset;
Drive module to be used for, when described array is filled full, drive print module according in described array
Dot matrix the fill style, printing described needs printable character.
Preferably, described driving module includes:
Determining unit is used for, and determines the dead-center position in described array;
Check unit for, from the beginning of described dead-center position, whether checking the element in described array line by line
It 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 unit bag is checked
Include:
First checks subelement for checking the element in described the first row element successively according to first direction
It whether is filled;
Second checks subelement for checking the element in described second row element successively according to second direction
It whether is filled;Wherein, described first direction and described second direction is in opposite direction.
Preferably, described array is the two-dimensional array of 7 row 600 row.
Preferably, described communication frame is made up of ASCII ASCII.
By above-mentioned technical scheme it can be seen that in embodiments of the present invention, that presets is connecing from processor
When receiving the communication frame that the primary processor of paper recorder is sent, first communication frame can be resolved,
Acquisition needs printable character;Then can search from the character library prestoring needs dot matrix the fill style of printable character;
Subsequently the dot matrix the fill style needing printable character can be filled to the array preset;Finally, array is worked as
When being filled full, print module can be driven according to the dot matrix the fill style in array, printing needs printable character;
Therefore, use the method and device of the present invention, can realize utilizing paper recorder printing character.
Brief description
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to reality
The accompanying drawing executing required use in example or description of the prior art is briefly described, it should be apparent that below,
Accompanying drawing in description is only some embodiments of the present invention, for those of ordinary skill in the art,
On the premise of not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the word print control program being applied to paper recorder disclosed in the embodiment of the present invention
Flow chart;
Fig. 2 is dot matrix the fill style of the character A disclosed in the embodiment of the present invention;
Fig. 3 is the word print control program being applied to paper recorder disclosed in the embodiment of the present invention
Another flow chart;
Fig. 4 is the word print control unit being applied to paper recorder disclosed in the embodiment of the present invention
Module map;
Fig. 5 is the word print control unit being applied to paper recorder disclosed in the embodiment of the present invention
Another module map;
Fig. 6 is the word print control unit being applied to paper recorder disclosed in the embodiment of the present invention
Another module map.
Detailed description of the invention
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 carried out
Clearly and completely describe, it is clear that described embodiment is only a part of embodiment of the present invention, and
It is not all, of embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art are not doing
The every other embodiment being obtained under the premise of going out creative work, broadly falls into the scope of protection of the invention.
The invention discloses a kind of word print control program being applied to paper recorder, as it is shown in figure 1,
The method at least comprises the following steps:
S11: the default communication frame being sent at the primary processor receiving paper recorder from processor
When, resolve communication frame, it is thus achieved that need printable character;
Concrete, communication frame can be by ASCII (American Standard Code for
Information Interchange, ASCII) composition;And after communication frame is resolved, can directly obtain and need
Printable character;
S12: searching from the character library prestoring from processor needs dot matrix the fill style of printable character;
Concrete, due in prior art, the lattice display/printing for 7 row 5 row that all characters use
Mode, therefore, the dot matrix the fill style of 7 row 5 row for each character prestoring in character library;Example
As, as in figure 2 it is shown, dot matrix the fill style of character " A ",;
S13: fill the dot matrix the fill style needing printable character to default array from processor;
Concrete, the array preset can be the two-dimensional array of 7 row 600 row;And it is every in order to clearly print
Individual character, can reserve row blank between dot matrix the fill style of each character, not pre-filled, so,
Different intercharacters can be separated, thus can clearly print each character;
Its concrete filling process, can be as follows:
(the i.e. the 1st row are extremely for first five row being filled in dot matrix the fill style of first character in two-dimensional array
5th row), then the 6th row left blank, dot matrix the fill style of second character is filled in two dimension
The 7th row in array, to the 11st row, then the 12nd arrange left blank again, successively type, until filling
Full whole two-dimensional array;Therefore, use above-mentioned this filling mode, the two-dimensional array of 7 row 600 row,
Dot matrix the fill style of 10 characters can be filled altogether;
S14: when array is filled full, drive print module from processor, fill according to the dot matrix in array
Pattern, printing needs printable character.
Therefore, in embodiments of the present invention, that presets is receiving paper recorder from processor
During the communication frame that primary processor is sent, first communication frame can be resolved, it is thus achieved that need printable character;
Then can search from the character library prestoring needs dot matrix the fill style of printable character;Subsequently can print needing
Dot matrix the fill style of character is filled to the array preset;Finally, when array is filled full, drive
Print module is according to the dot matrix the fill style in array, and printing needs printable character;Therefore, use this
The method of invention, can realize utilizing paper recorder printing character.
Meanwhile, it should be noted that due to when real work, when array is filled full, from processor
Print module can be sent to by filling full array, then control print module again and print;And now
Have in technology, the processor of paper recorder, often resolve obtain one need printable character, will transmission
Print to print module;Therefore, compared to prior art, the method for the present invention is used, undoubtedly
Print speed can be improved.
In other embodiments of the present invention, as it is shown on figure 3, step S14 in above-mentioned all embodiments can
Specifically include:
S31: determine the dead-center position in array;
Concrete, when the two-dimensional array that array is 7 row 600 row, its dead-center position can be the 1st row the 1st
The position of the position of row, the position of the 1st row 600 row, the position of the 7th row 1 row or the 7th row 600 row;
S32: from the beginning of dead-center position, checks whether the element in array is filled line by line;
S33: when element is filled, drives print module to print.
Concrete, the function of above-mentioned print module can be realized by print needle;And now for phase in array
Adjacent the first row element and the second row element, it checks that the process whether element in array is filled can be such as
Under:
A: check whether the element in the first row element is filled successively according to first direction;
B: check whether the element in the second row element is filled successively according to second direction;Wherein, first
Direction is in opposite direction with second direction;
More specifically, its first direction can be from left to right, and second direction can be for from right to left;Now,
Whether can be filled according to the element checked successively from left to right the first row element from processor, if being filled out
Fill, then drive print needle to do beat action, thus realize printing, and when being not filled by, print needle
Directly skip;And after the first row element prints and finishes, can directly drive print needle to jump to the second row
Low order end, carries out checking and printing according to dextrosinistral direction;And in the prior art, have paper
The processor of recorder can drive print needle to print according to a direction always, it is assumed that still with from a left side to
Right printing the first row element, then printing the first row element, when starting to print the second row element, still
Print needle can be driven to jump to the high order end of the second row, print according to direction from left to right;Therefore,
Therefore, use this printing type of the present invention, also save the time-write interval undoubtedly, improve and beat
Print efficiency.
It should be noted that can record according to test, print module in the range of every a line, that
Drive print module at range, next line element can be carried out, without driving print module
Whole elements of every a line are all checked, the time-write interval can be saved further so undoubtedly, improve
Printing effect;Simultaneously, it is notable that owing to a feature of word print out task is that all need are beaten
Lettering symbol uses identical color to print;Therefore in the communication frame that main process is sent, except comprising
Need outside printable character, also preset a byte and be used for carrying out storing color;And entering style of writing every time from processor
When word prints, the value first according to above-mentioned color byte for the meeting, rotate print cartridge motor, select correct color
(and this color is all constant during the printing of whole word), then carries out word printing again.
The invention also discloses a kind of word of being applied to paper recorder corresponding with said method to print
Control device, as shown in Figure 4, this device may particularly include:
Parsing module 41 is used for, when the communication frame that the primary processor receiving paper recorder is sent,
Resolve communication frame, it is thus achieved that the character that need to print;
Concrete, communication frame can be made up of ASCII character;
Searching module 42 to be used for, searching from the character library prestoring needs dot matrix the fill style of printable character;
Packing module 43 is used for, and fills the dot matrix the fill style needing printable character to the array preset;
Concrete, above-mentioned array can be specially the two-dimensional array of 7 row 600 row;
Drive module 44 to be used for, when array is filled full, drive print module to fill out according to the dot matrix in array
Filling pattern, printing needs printable character.
Therefore, in embodiments of the present invention, that presets is receiving paper recorder from processor
During the communication frame that primary processor is sent, first communication frame can be resolved, it is thus achieved that need printable character;
Then can search from the character library prestoring needs dot matrix the fill style of printable character;Subsequently can print needing
Dot matrix the fill style of character is filled to the array preset;Finally, when array is filled full, drive
Print module is according to the dot matrix the fill style in array, and printing needs printable character;Therefore, use this
The device of invention, can realize utilizing paper recorder printing character.
In other embodiments of the present invention, as it is shown in figure 5, driving module 44 in above-mentioned all embodiments
May include:
Determining unit 51 is used for, and determines the dead-center position in array;
Check unit 52 for, from the beginning of dead-center position, checking whether the element in array is filled line by line;
Driver element 53 is used for, and when element is filled, drives print module to print.
In other embodiments of the present invention, for the first row element in array and the second row element, such as Fig. 6
Shown in, check that unit 52 mays include:
First checks subelement 61 for checking that the element in the first row element is successively according to first direction
It no is filled;
Second checks subelement 62 for checking that the element in the second row element is successively according to second direction
It no is filled;Wherein, first direction and second direction is in opposite direction;
It should be noted that the function of the above-mentioned word printing equipment being applied to paper recorder can specifically exist
That presets realizes from processor;And by original for paper recorder processor (primary processor) and newly-increased
The task from processor separate, its primary processor can mainly be responsible for collection and process, the report of external information
The tasks such as alert output, button capture and content show, and can mainly be responsible for print out task from processor.And
Primary processor can be connected especially by RS485 bus with from processor.
And the 41st, parsing module is searched to each refinement of module the 42nd, packing module 43 and driving module 44
Function can be found in the record of said method, does not repeats them here.
Described above to the disclosed embodiments, makes professional and technical personnel in the field be capable of or uses
The present invention.Multiple modifications to these embodiments will be aobvious and easy for those skilled in the art
See, generic principles defined herein can without departing from the spirit or scope of the present invention,
Realize in other embodiments.Therefore, the present invention is not intended to be limited to the embodiments shown herein,
And it is to fit to the wide scope consistent with principles disclosed herein and features of novelty.
Claims (2)
1. the word print control program being applied to paper recorder, it is characterised in that include:
When the communication frame that the primary processor receiving paper recorder is sent, resolve described communication frame,
Acquisition needs printable character;
Described dot matrix the fill style needing printable character is searched from the character library prestoring;
Fill described dot matrix the fill style needing printable character to the array preset;
Described array is the two-dimensional array of 7 row 600 row;
When described array is filled full, drive print module according to the dot matrix the fill style in described array,
Printing described needs printable character;
Described communication frame is made up of ASCII ASCII, also presets one in described communication frame
Individual byte is used for storing color;
Described driving print module, according to the dot matrix the fill style in described array, prints and described need to print word
Symbol, comprising:
Determine the dead-center position in described array;
From the beginning of described dead-center position, check whether the element in described array is filled line by line;
When described element is filled, print module is driven to print;
Described dead-center position is the position of the 1st row the 1st row, the position of the 1st row 600 row, the 7th row 1
The position of row or the position of the 7th row 600 row;
For the first row element adjacent in described array and the second row element, described check described number line by line
Whether the element in group is filled, comprising:
Check whether the element in described the first row element is filled successively according to first direction;
Check whether the element in described second row element is filled successively according to second direction;Wherein, institute
State the in opposite direction of first direction and described second direction.
2. the word print control unit being applied to paper recorder, it is characterised in that include:
Parsing module is used for, and when the communication frame that the primary processor receiving paper recorder is sent, solves
Analysing described communication frame, it is thus achieved that the character that need to print, described communication frame is by ASCII ASCII
Composition, also presets a byte and is used for storing color in described communication frame;
Search module to be used for, from the character library prestoring, search described dot matrix the fill style needing printable character;
Packing module is used for, and fills described dot matrix the fill style needing printable character to the array preset;
Described array is the two-dimensional array of 7 row 600 row;
Drive module to be used for, when described array is filled full, drive print module according in described array
Dot matrix the fill style, printing described needs printable character;
Described driving module includes:
Determining unit is used for, and determines the dead-center position in described array, and described dead-center position is the 1st row the 1st
The position of the position of row, the position of the 1st row 600 row, the position of the 7th row 1 row or the 7th row 600 row;
Check unit for, from the beginning of described dead-center position, whether checking the element in described array line by line
It is filled;
Driver element is used for, and when described element is filled, drives print module to print;
For the first row element in described array and the second row element, described check that unit includes:
First checks subelement for checking the element in described the first row element successively according to first direction
It whether is filled;
Second checks subelement for checking the element in described second row element successively according to second direction
It whether is filled;Wherein, described first direction and described second direction is in opposite direction.
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 CN103707665A (en) | 2014-04-09 |
CN103707665B true 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)
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 |
-
2013
- 2013-12-17 CN CN201310692370.1A patent/CN103707665B/en active Active
Patent Citations (12)
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 |
Also Published As
Publication number | Publication date |
---|---|
CN103707665A (en) | 2014-04-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1093664C (en) | Layout display apparatus for tape printing apparatus, capable of displaying plural-lined characters at high speed | |
CN102799592B (en) | The parsing method and system of rich text document | |
CN105868171B (en) | A kind of method of calibration and device of Excel file | |
US9246789B2 (en) | Testing apparatus and test display method | |
CN103336690A (en) | HTML (Hypertext Markup Language) 5-based text-element drawing method and device | |
CA2363151A1 (en) | Metrics and status presentation system and method using persistent template-driven web objects | |
US9405755B1 (en) | Apparatus and method for processing log file data | |
CN109992234B (en) | Image data reading method and device, electronic equipment and readable storage medium | |
CN104102690B (en) | Storage structure based telemetry data processing method | |
CN101826049A (en) | Implementation method for debugging information output in embedded system | |
CN111181769B (en) | Network topological graph drawing method, system, device and computer readable storage medium | |
CN108965274A (en) | The analysis method and device of DBC file | |
CN103707665B (en) | It is applied to word print control program and the device of paper recorder | |
CN109241510A (en) | A kind of autochart generation system and its implementation based on wechat small routine | |
CN103258021A (en) | Character terminal feature data extraction method based on behavioral analysis | |
CN103605521A (en) | Method and device for realizing interface apposition | |
CN101295495B (en) | Method of controlling display method, display-use signal producing device, display device, and display system for implementing the method | |
CN101980133A (en) | Method and system for detecting text selection region deviation of double-layer electronic file | |
EP1959352A2 (en) | System and method of report representation | |
US9405651B1 (en) | Apparatus and method for processing log file data | |
CN101419594B (en) | GIS map primitive control device | |
CN109710808A (en) | A kind of analytic method of XML file, system, device and readable storage medium storing program for executing | |
CN101877024B (en) | Graphical simulation analytical method of high-speed railway vehicular equipment | |
CN1229731A (en) | Character displaying device and its input device | |
CN201278146Y (en) | ATA interface signal capturing apparatus implemented based on FPGA |
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 |