[go: up one dir, main page]

CN103707665B - Text printing control method and device applied to paper recorder - Google Patents

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

Info

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
dot matrix
print
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
CN201310692370.1A
Other languages
Chinese (zh)
Other versions
CN103707665A (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

Landscapes

  • Record Information Processing For Printing (AREA)

Abstract

本发明公开了一种应用于有纸记录仪的文字打印控制方法及装置,该方法包括:在接收到有纸记录仪的主处理器所发送的通信帧时,解析通信帧,获得需打印字符;从预存的字库中查找需打印字符的点阵填充样式;将需打印字符的点阵填充样式填充至预设的数组内;当数组填充满时,驱动打印模块按照数组内的点阵填充样式,打印需打印字符;采用本发明的方法及装置,可实现利用有纸记录仪打印文字。

The invention discloses a text printing control method and device applied to a paper recorder. The method includes: when receiving a communication frame sent by a main processor of a paper recorder, analyzing the communication frame to obtain characters to be printed ;Find the dot matrix filling pattern of the characters to be printed from the pre-stored font library; fill the dot matrix filling pattern of the characters to be printed into the preset array; when the array is full, drive the printing module to follow the dot matrix filling pattern in the array , printing needs to print characters; adopting the method and device of the present invention can realize printing characters by using a paper recorder.

Description

应用于有纸记录仪的文字打印控制方法及装置Text printing control method and device applied to paper recorder

技术领域technical field

本发明涉及工业控制技术领域,特别涉及一种应用于有纸记录仪的文字打印控制方法及装置。The invention relates to the technical field of industrial control, in particular to a text printing control method and device applied to a paper recorder.

背景技术Background technique

在现有技术中,文字打印作为有纸记录仪的一个非常重要的功能,其设备的工作状态、所设置的参数、采集的数据以及错误报警等信息均需以文字的形式进行打印;据统计,在有纸记录仪中,文字打印任务可占到其整个打印量的70%。因此,在现有技术中,如何利用有纸记录仪打印文字正在成为研究热点。In the prior art, text printing is a very important function of paper recorders, and information such as the working status of the equipment, the parameters set, the collected data, and error alarms all need to be printed in the form of text; according to statistics , In a paper recorder, text printing tasks can account for 70% of its entire printing volume. Therefore, in the prior art, how to utilize the paper recorder to print characters is becoming a research hotspot.

发明内容Contents of the invention

有鉴于此,本发明的目的在于提供一种应用于有纸记录仪的文字打印控制方法及装置,以实现利用有纸记录仪打印文字。In view of this, the object of the present invention is to provide a text printing control method and device applied to a paper recorder, so as to realize the printing of text by using the paper recorder.

为实现上述目的,本发明提供如下技术方案:To achieve the above object, the present invention provides the following technical solutions:

一种应用于有纸记录仪的文字打印控制方法,包括:A text printing control method applied to a paper recorder, comprising:

在接收到有纸记录仪的主处理器所发送的通信帧时,解析所述通信帧,获得需打印字符;When receiving the communication frame sent by the main processor of the paper recorder, analyze the communication frame to obtain the characters to be printed;

从预存的字库中查找所述需打印字符的点阵填充样式;Find the dot matrix filling pattern of the characters to be printed from the pre-stored font library;

将所述需打印字符的点阵填充样式填充至预设的数组内;Filling the dot matrix filling pattern of the characters to be printed into a preset array;

当所述数组填充满时,驱动打印模块按照所述数组内的点阵填充样式,打印所述需打印字符。When the array is full, the drive printing module prints the characters to be printed according to the dot matrix filling pattern in the array.

优选的,所述驱动打印模块按照所述数组内的点阵填充样式,打印所述需打印字符,包括:Preferably, the drive printing module prints the characters to be printed according to the dot matrix filling pattern in the array, including:

确定所述数组中的零点位置;determining a zero location in said array;

从所述零点位置开始,逐行查看所述数组中的元素是否被填充;Starting from the zero position, check whether the elements in the array are filled line by line;

当所述元素被填充时,驱动打印模块进行打印。When the element is filled, the printing module is driven to print.

优选的,针对所述数组中相邻的第一行元素和第二行元素,所述逐行查看所述数组中的元素是否被填充,包括:Preferably, for the adjacent elements in the first row and the second row in the array, the row-by-row checking whether the elements in the array are filled includes:

按照第一方向依次查看所述第一行元素中的元素是否被填充;According to the first direction, check whether the elements in the first row of elements are filled;

按照第二方向依次查看所述第二行元素中的元素是否被填填充;其中,所述第一方向与所述第二方向的方向相反。Checking in turn according to the second direction whether the elements in the second row of elements are filled; wherein, the first direction is opposite to the second direction.

优选的,所述数组为7行600列的二维数组。Preferably, the array is a two-dimensional array with 7 rows and 600 columns.

优选的,所述通信帧由美国标准信息交换码ASCII组成。Preferably, the communication frame is composed of American Standard Code for Information Interchange (ASCII).

一种应用于有纸记录仪的文字打印控制装置,包括:A text printing control device applied to a paper recorder, comprising:

解析模块用于,当接收到有纸记录仪的主处理器所发送的通信帧时,解析所述通信帧,获得需打印的字符;The parsing module is used to, when receiving the communication frame sent by the main processor of the paper recorder, parse the communication frame to obtain the characters to be printed;

查找模块用于,从预存的字库中查找所述需打印字符的点阵填充样式;The search module is used to search the dot matrix filling pattern of the characters to be printed from the pre-stored font library;

填充模块用于,将所述需打印字符的点阵填充样式填充至预设的数组内;The filling module is used to fill the dot matrix filling pattern of the characters to be printed into the preset array;

驱动模块用于,当所述数组填充满时,驱动打印模块按照所述数组内的点阵填充样式,打印所述需打印字符。The driving module is configured to, when the array is full, drive the printing module to print the characters to be printed according to the dot matrix filling pattern in the array.

优选的,所述驱动模块包括:Preferably, the drive module includes:

确定单元用于,确定所述数组中的零点位置;The determination unit is used to determine the zero position in the array;

查看单元用于,从所述零点位置开始,逐行查看所述数组中的元素是否被填充;The checking unit is used to check whether the elements in the array are filled line by line starting from the zero position;

驱动单元用于,当所述元素被填充时,驱动打印模块进行打印。The driving unit is used to drive the printing module to print when the elements are filled.

优选的,针对所述数组中的第一行元素和第二行元素,所述查看单元包括:Preferably, for the elements in the first row and the second row in the array, the viewing unit includes:

第一查看子单元用于,按照第一方向依次查看所述第一行元素中的元素是否被填充;The first viewing subunit is used to sequentially check whether the elements in the first row of elements are filled according to the first direction;

第二查看子单元用于,按照第二方向依次查看所述第二行元素中的元素是否被填充;其中,所述第一方向与所述第二方向的方向相反。The second checking subunit is used to sequentially check whether elements in the second row of elements are filled according to a second direction; wherein, the first direction is opposite to the second direction.

优选的,所述数组为7行600列的二维数组。Preferably, the array is a two-dimensional array with 7 rows and 600 columns.

优选的,所述通信帧由美国标准信息交换码ASCII组成。Preferably, the communication frame is composed of American Standard Code for Information Interchange (ASCII).

由上述的技术方案可以看出,在本发明实施例中,预设的从处理器在接收到有纸记录仪的主处理器所发送的通信帧时,首先会对通信帧进行解析,获得需打印字符;然后会从预存的字库中查找需打印字符的点阵填充样式;再然后会将需打印字符的点阵填充样式填充至预设的数组内;最后,当数组被填充满时,会驱动打印模块按照数组内的点阵填充样式,打印需打印字符;由上可见,采用本发明的方法及装置,可实现利用有纸记录仪打印文字。As can be seen from the above technical solution, in the embodiment of the present invention, when the preset slave processor receives the communication frame sent by the main processor of the paper recorder, it first analyzes the communication frame to obtain the required Print characters; then it will search the dot matrix filling pattern of the characters to be printed from the pre-stored font library; then fill the dot matrix filling pattern of the characters to be printed into the preset array; finally, when the array is filled, it will Drive the printing module to print characters to be printed according to the dot matrix filling pattern in the array; it can be seen from the above that using the method and device of the present invention can realize the printing of characters by using the paper recorder.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1为本发明实施例所公开的应用于有纸记录仪的文字打印控制方法的流程图;FIG. 1 is a flowchart of a text printing control method applied to a paper recorder disclosed in an embodiment of the present invention;

图2为本发明实施例所公开的字符A的点阵填充样式;Fig. 2 is the dot matrix filling pattern of the character A disclosed in the embodiment of the present invention;

图3为本发明实施例所公开的应用于有纸记录仪的文字打印控制方法的又一流程图;Fig. 3 is another flow chart of the text printing control method applied to the paper recorder disclosed by the embodiment of the present invention;

图4为本发明实施例所公开的应用于有纸记录仪的文字打印控制装置的模块图;Fig. 4 is a block diagram of a text printing control device applied to a paper recorder disclosed in an embodiment of the present invention;

图5为本发明实施例所公开的应用于有纸记录仪的文字打印控制装置的又一模块图;Fig. 5 is another block diagram of a text printing control device applied to a paper recorder disclosed in an embodiment of the present invention;

图6为本发明实施例所公开的应用于有纸记录仪的文字打印控制装置的另一模块图。FIG. 6 is another block diagram of a text printing control device applied to a paper recorder disclosed in an embodiment of the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

本发明公开了一种应用于有纸记录仪的文字打印控制方法,如图1所示,该方法至少包括以下步骤:The invention discloses a text printing control method applied to a paper recorder, as shown in Figure 1, the method at least includes the following steps:

S11:预设的从处理器在接收到有纸记录仪的主处理器所发送的通信帧时,解析通信帧,获得需打印字符;S11: When the preset slave processor receives the communication frame sent by the main processor of the paper recorder, it parses the communication frame and obtains the characters to be printed;

具体的,通信帧可由美国标准信息交换码(American Standard Code forInformation Interchange,ASCII)组成;而在对通信帧解析后,可直接获得需打印字符;Specifically, the communication frame can be composed of American Standard Code for Information Interchange (ASCII); and after the communication frame is parsed, the characters to be printed can be directly obtained;

S12:从处理器从预存的字库中查找需打印字符的点阵填充样式;S12: The slave processor searches the dot matrix filling pattern of the characters to be printed from the pre-stored font library;

具体的,由于现有技术中,所有字符采用的为7行5列的点阵显示/打印方式,因此,字库中预先存储的为每个字符的7行5列的点阵填充样式;例如,如图2所示,字符“A”的点阵填充样式,;Specifically, because in the prior art, all characters adopt a dot matrix display/printing method of 7 rows and 5 columns, therefore, the pre-stored dot matrix filling pattern of 7 rows and 5 columns for each character in the font library; for example, As shown in Figure 2, the dot matrix filling style of the character "A",;

S13:从处理器将需打印字符的点阵填充样式填充至预设的数组内;S13: filling the dot matrix filling pattern of characters to be printed into a preset array from the processor;

具体的,预设的数组可为7行600列的二维数组;而为了清楚的打印每个字符,可在每个字符的点阵填充样式间留出一列空白,不预填充,如此,可以将不同的字符间隔开,从而可清楚的打印每个字符;Specifically, the preset array can be a two-dimensional array of 7 rows and 600 columns; and in order to print each character clearly, a column of blanks can be left between the dot matrix filling patterns of each character without pre-filling, so, you can Space different characters apart so that each character can be printed clearly;

其具体的填充过程,可如下:The specific filling process can be as follows:

将第一个字符的点阵填充样式填充在二维数组中的前五列(即第1列至第5列),然后第6列留作空白,将第二个字符的点阵填充样式填充在二维数组中的第7列至第11列,然后第12列再留作空白,依次类型,直至填充满整个二维数组;由上可见,采用上述这种填充方式,7列600列的二维数组,可共填充10个字符的点阵填充样式;Fill the first five columns (i.e. columns 1 to 5) in the two-dimensional array with the dot matrix filling pattern of the first character, then leave the sixth column blank, and fill the dot matrix filling pattern of the second character Columns 7 to 11 in the two-dimensional array, and then the twelfth column is left blank, and the types are followed until the entire two-dimensional array is filled; it can be seen from the above that using the above-mentioned filling method, 7 columns and 600 columns A two-dimensional array, which can be filled with a dot matrix filling style of 10 characters in total;

S14:当数组填充满时,从处理器驱动打印模块,按照数组内的点阵填充样式,打印需打印字符。S14: When the array is full, the slave processor drives the printing module to print characters to be printed according to the dot matrix filling pattern in the array.

由上可见,在本发明实施例中,预设的从处理器在接收到有纸记录仪的主处理器所发送的通信帧时,首先会对通信帧进行解析,获得需打印字符;然后会从预存的字库中查找需打印字符的点阵填充样式;再然后会将需打印字符的点阵填充样式填充至预设的数组内;最后,当数组被填充满时,驱动打印模块按照数组内的点阵填充样式,打印需打印字符;由上可见,采用本发明的方法,可实现利用有纸记录仪打印文字。As can be seen from the above, in the embodiment of the present invention, when the preset slave processor receives the communication frame sent by the main processor of the paper recorder, it will first analyze the communication frame to obtain the characters to be printed; then it will Find the dot matrix filling pattern of the characters to be printed from the pre-stored font library; and then fill the dot matrix filling pattern of the characters to be printed into the preset array; finally, when the array is filled, the driver print module according to the array Dot matrix filling pattern, printing needs to print characters; As can be seen from the above, adopting the method of the present invention can realize printing characters by using the paper recorder.

同时,需要说明的是,由于在实际工作时,当数组填充满时,从处理器会将填充满的数组传送至打印模块,然后再控制打印模块进行打印;而在现有技术中,有纸记录仪的处理器,每解析获得一个需打印字符,即将之传送至打印模块进行打印;因此,相对比于现有技术,采用本发明的方法,无疑可提高打印速度。At the same time, it should be noted that, in actual work, when the array is filled, the slave processor will transmit the filled array to the printing module, and then control the printing module to print; and in the prior art, there are paper The processor of the recorder analyzes and obtains a character to be printed, and transmits it to the printing module for printing; therefore, compared with the prior art, the method of the present invention can undoubtedly increase the printing speed.

在本发明其它实施例中,如图3所示,上述所有实施例中的步骤S14可具体包括:In other embodiments of the present invention, as shown in FIG. 3, step S14 in all the above embodiments may specifically include:

S31:确定数组中的零点位置;S31: Determine the zero position in the array;

具体的,当数组为7行600列的二维数组时,其零点位置可为第1行第1列的位置、第1行600列的位置、第7行1列的位置或第7行600列的位置;Specifically, when the array is a two-dimensional array with 7 rows and 600 columns, its zero position can be the position of the first row and the first column, the position of the first row of 600 columns, the position of the seventh row and one column, or the position of the seventh row and 600 column position;

S32:从零点位置开始,逐行查看数组中的元素是否被填充;S32: Starting from the zero position, check whether the elements in the array are filled line by line;

S33:当元素被填充时,驱动打印模块进行打印。S33: When the element is filled, drive the printing module to print.

具体的,上述打印模块的功能可由打印针来实现;而此时针对数组中相邻的第一行元素和第二行元素,其查看数组中的元素是否被填充的过程可如下:Specifically, the function of the above printing module can be realized by the printing needle; at this time, for the elements in the first row and the second row adjacent to the array, the process of checking whether the elements in the array are filled can be as follows:

A:按照第一方向依次查看第一行元素中的元素是否被填充;A: Follow the first direction to check whether the elements in the first row of elements are filled;

B:按照第二方向依次查看第二行元素中的元素是否被填充;其中,第一方向与第二方向的方向相反;B: Check whether the elements in the second row of elements are filled in turn according to the second direction; where the first direction is opposite to the second direction;

更具体的,其第一方向可为从左至右,而第二方向可为由右至左;此时,从处理器可按照由左至右依次查看第一行元素中的元素是否被填充,若被填充,则驱动打印针做一次敲击动作,从而实现打印,而在未填充时,打印针直接跳过;而在第一行元素打印完毕后,可直接驱动打印针跳动到第二行的最右端,按照从右至左的方向进行查看和打印即可;而在现有技术中,有纸记录仪的处理器会驱动打印针一直按照一个方向进行打印,假设仍以从左至右打印第一行元素,那么在打印完第一行元素,开始打印第二行元素时,仍会驱动打印针跳动到第二行的最左端,按照从左至右的方向进行打印;因此,由上可见,采用本发明的这种打印方式,无疑也节省了打印时间,提高了打印效率。More specifically, the first direction can be from left to right, and the second direction can be from right to left; at this time, the slave processor can check whether the elements in the first row of elements are filled in order from left to right , if it is filled, it will drive the printing needle to do a knocking action, so as to realize printing, and when it is not filled, the printing needle will skip directly; after the first line of elements is printed, it can directly drive the printing needle to jump to the second The rightmost end of the row can be viewed and printed from right to left; while in the prior art, the processor of the paper recorder will drive the printing needle to print in one direction all the time, assuming that it is still printed from left to left If the first row of elements is printed right, then after printing the first row of elements and starting to print the second row of elements, the printing needle will still be driven to jump to the leftmost end of the second row, and printing will be performed from left to right; therefore, It can be seen from the above that the printing method of the present invention undoubtedly saves printing time and improves printing efficiency.

需要说明的是,可以根据试验测得,打印模块在每一行的最大行程,那么驱动打印模块至最大行程处,即可进行下一行元素,而不必驱动打印模块将每一行的全部元素均进行查看,这样无疑可进一步节省了打印时间,提高打印效率;同时,值得注意的是,由于文字打印任务的一个特点为所有需打印字符使用相同的颜色进行打印;因此主处理所发送的通信帧中,除了包含需打印字符外,还预设一字节用于进行存储颜色;而从处理器在每次进行文字打印时,会首先根据上述颜色字节的值,转动墨盒电机,选择正确的颜色(且此颜色在整个文字打印的过程中均不变),然后再进行文字打印。It should be noted that the maximum stroke of the printing module in each line can be measured according to the test, then the printing module can be driven to the maximum stroke to carry out the elements of the next line without driving the printing module to view all the elements of each line , which can undoubtedly further save printing time and improve printing efficiency; at the same time, it is worth noting that, due to a feature of the text printing task, all characters to be printed are printed in the same color; therefore, in the communication frame sent by the main processing, In addition to containing the characters to be printed, a byte is also preset for storing the color; and the slave processor will first rotate the ink cartridge motor according to the value of the above color byte to select the correct color ( And this color will not change during the whole text printing process), and then print the text.

本发明还公开了一种与上述方法相对应的应用于有纸记录仪的文字打印控制装置,如图4所示,该装置可具体包括:The present invention also discloses a text printing control device applied to paper recorders corresponding to the above method, as shown in Figure 4, the device may specifically include:

解析模块41用于,当接收到有纸记录仪的主处理器所发送的通信帧时,解析通信帧,获得需打印的字符;The parsing module 41 is used for, when receiving the communication frame sent by the main processor of the paper recorder, parse the communication frame to obtain the characters to be printed;

具体的,通信帧可由ASCII码组成;Specifically, the communication frame may be composed of ASCII codes;

查找模块42用于,从预存的字库中查找需打印字符的点阵填充样式;The search module 42 is used to search for the dot matrix fill pattern of characters to be printed from the pre-stored font library;

填充模块43用于,将需打印字符的点阵填充样式填充至预设的数组内;The filling module 43 is used to fill the dot matrix filling pattern of characters to be printed into the preset array;

具体的,上述数组可具体为7行600列的二维数组;Specifically, the above array may be specifically a two-dimensional array with 7 rows and 600 columns;

驱动模块44用于,当数组填充满时,驱动打印模块按照数组内的点阵填充样式,打印需打印字符。The driving module 44 is used to, when the array is full, drive the printing module to print characters to be printed according to the dot matrix filling pattern in the array.

由上可见,在本发明实施例中,预设的从处理器在接收到有纸记录仪的主处理器所发送的通信帧时,首先会对通信帧进行解析,获得需打印字符;然后会从预存的字库中查找需打印字符的点阵填充样式;再然后会将需打印字符的点阵填充样式填充至预设的数组内;最后,当数组被填充满时,驱动打印模块按照数组内的点阵填充样式,打印需打印字符;由上可见,采用本发明的装置,可实现利用有纸记录仪打印文字。As can be seen from the above, in the embodiment of the present invention, when the preset slave processor receives the communication frame sent by the main processor of the paper recorder, it will first analyze the communication frame to obtain the characters to be printed; then it will Find the dot matrix filling pattern of the characters to be printed from the pre-stored font library; and then fill the dot matrix filling pattern of the characters to be printed into the preset array; finally, when the array is filled, the driver print module according to the array Dot matrix filling pattern, printing needs to print characters; as can be seen from the above, adopting the device of the present invention can realize printing characters by using the paper recorder.

在本发明其它实施例中,如图5所示,上述所有实施例中的驱动模块44可包括:In other embodiments of the present invention, as shown in FIG. 5, the driving module 44 in all the above-mentioned embodiments may include:

确定单元51用于,确定数组中的零点位置;The determination unit 51 is used to determine the zero position in the array;

查看单元52用于,从零点位置开始,逐行查看数组中的元素是否被填充;The checking unit 52 is used to check whether the elements in the array are filled line by line starting from the zero position;

驱动单元53用于,当元素被填充时,驱动打印模块进行打印。The driving unit 53 is used to drive the printing module to print when the element is filled.

在本发明其它实施例中,针对数组中的第一行元素和第二行元素,如图6所示,查看单元52可包括:In other embodiments of the present invention, for the elements in the first row and the second row in the array, as shown in FIG. 6, the viewing unit 52 may include:

第一查看子单元61用于,按照第一方向依次查看第一行元素中的元素是否被填充;The first checking subunit 61 is used to check in turn whether the elements in the first row of elements are filled according to the first direction;

第二查看子单元62用于,按照第二方向依次查看第二行元素中的元素是否被填充;其中,第一方向与第二方向的方向相反;The second checking subunit 62 is used to check in turn whether the elements in the second row of elements are filled according to the second direction; wherein, the first direction is opposite to the second direction;

需要说明的是,上述应用于有纸记录仪的文字打印装置的功能可具体在预设的从处理器中实现;且将有纸记录仪原有的处理器(主处理器)和新增的从处理器的任务分开,其主处理器可主要负责外部信息的采集和处理、报警输出、按键捕获和内容显示等任务,而从处理器可主要负责打印任务。且主处理器和从处理器可具体通过RS485总线相连。It should be noted that the above-mentioned functions of the text printing device applied to the paper recorder can be realized in the preset slave processor; and the original processor (main processor) and the newly added The tasks of the slave processor are separated, the main processor can be mainly responsible for the collection and processing of external information, alarm output, key capture and content display and other tasks, while the slave processor can be mainly responsible for printing tasks. And the main processor and the slave processor can be specifically connected through the RS485 bus.

而对于解析模块41、查找模块42、填充模块43及驱动模块44的各细化功能可参见上述方法的记载,在此不再赘述。As for the detailed functions of the analyzing module 41 , the searching module 42 , the filling module 43 and the driving module 44 , please refer to the description of the above method, which will not be repeated here.

对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

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.
CN201310692370.1A 2013-12-17 2013-12-17 Text printing control method and device applied to 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 Text printing control method and device applied to paper recorder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310692370.1A CN103707665B (en) 2013-12-17 2013-12-17 Text printing control method and device applied to 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 Text printing control method and device applied to 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 dot matrix coding 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 dot matrix coding 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
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
CN103802509B (en) Remote implementation method based on industrial inkjet printer control system
CN105630817B (en) A kind of method and system of electronic invoice Context resolution
CN101526963A (en) Method for identifying web page coding, device and terminal equipment
CN108319578B (en) Method for generating medium for data recording
US9336194B2 (en) Submatch extraction
US9405755B1 (en) Apparatus and method for processing log file data
CN103707665B (en) Text printing control method and device applied to paper recorder
US20140049554A1 (en) Method of manipulating character string in embeded system
US9035972B2 (en) Intelligent axis labels
US20080201356A1 (en) System and method of report representation
US9036163B2 (en) Methods and apparatuses for displaying text block and processing text block
CN109241510A (en) A kind of autochart generation system and its implementation based on wechat small routine
CN106610803A (en) Graphic and storage method for condition data printing output of power protection apparatus
CN101110979B (en) Method, device and system for message transmission
US9405651B1 (en) Apparatus and method for processing log file data
CN204406441U (en) A kind of e-inks set of hanging scrolls code proving installation
CN109710808A (en) A kind of analytic method of XML file, system, device and readable storage medium storing program for executing
CN106294431A (en) The automatic intercept method of a kind of field and device
CN104537403B (en) A kind of e-inks set of hanging scrolls code test device and method
CN103692786B (en) Be applied to curve printing control method and the device of paper recorder
CN106708788A (en) Character typesetting method, system and apparatus
US9405610B1 (en) Apparatus and method for processing log file data
CN110209457A (en) Applied to the font rendering methods of electronics price tag, system and electronic equipment and medium

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