Gray code-based printer control method and device

文档序号:1235211 发布日期:2020-09-11 浏览:16次 中文

阅读说明:本技术 基于格雷码的打印机控制方法及装置 (Gray code-based printer control method and device ) 是由 余日晶 张春银 于 2020-05-25 设计创作,主要内容包括:本发明公开了一种基于格雷码的打印机控制方法、介质及装置,其中方法包括:获取待打印数据和打印参数,其中,所述打印参数包括单次打印任务对应的打印距离;根据所述打印参数控制打印头对当前打印任务对应的待打印数据进行打印;控制打印机对耗材进行移动,并通过格雷码步长测量仪对耗材的移动距离进行测量,以获取耗材移动距离;判断所述耗材移动距离是否大于等于所述打印距离,如果所述耗材移动距离大于等于所述打印距离,则停止耗材的移动,并控制打印头对下一打印任务对应的待打印数据进行打印;能够实现在打印机打印过程中对耗材的移动进行精准控制,提高打印机的打印质量。(The invention discloses a printer control method, medium and device based on Gray codes, wherein the method comprises the following steps: acquiring data to be printed and printing parameters, wherein the printing parameters comprise a printing distance corresponding to a single printing task; controlling a printing head to print data to be printed corresponding to the current printing task according to the printing parameters; controlling a printer to move the consumable, and measuring the moving distance of the consumable through a Gray code step length measuring instrument to obtain the moving distance of the consumable; judging whether the consumable moving distance is greater than or equal to the printing distance, if so, stopping the movement of the consumable and controlling the printing head to print data to be printed corresponding to the next printing task; can realize printing the removal of in-process to the consumptive material at the printer and carry out accurate control, improve the printing quality of printer.)

1. A printer control method based on Gray codes is characterized by comprising the following steps:

acquiring data to be printed and printing parameters, wherein the printing parameters comprise a printing distance corresponding to a single printing task;

controlling a printing head to print data to be printed corresponding to the current printing task according to the printing parameters;

controlling a printer to move the consumable, and measuring the moving distance of the consumable through a Gray code step length measuring instrument to obtain the moving distance of the consumable;

and judging whether the consumable moving distance is greater than or equal to the printing distance, if so, stopping the movement of the consumable and controlling the printing head to print the data to be printed corresponding to the next printing task.

2. The gray code-based printer control method of claim 1, wherein the single print job comprises one print line.

3. The gray code-based printer control method according to claim 1, wherein the single print job includes a plurality of print lines, and wherein controlling the print head to print the data to be printed corresponding to the current print job according to the print parameters includes:

and controlling the printing head to print the current printing line, and after the current printing line is printed, controlling the printing head to move by one printing line distance so as to finish the printing of a plurality of printing lines in a single printing task through the movement of the printing head.

4. The gray code-based printer control method of claim 1, wherein measuring the moving distance of the consumable by a gray code step size measuring instrument, comprises:

and in the process of moving the consumable, acquiring the effective step value of the Gray code step length measuring instrument, and calculating the moving distance of the consumable according to the effective step value, the radius of the Gray code step length measuring instrument and the single-circle step value.

5. A computer-readable storage medium, having stored thereon a gray-code-based printer control program which, when executed by a processor, implements the gray-code-based printer control method according to any one of claims 1 to 4.

6. A printer control apparatus based on Gray code, comprising:

the system comprises an acquisition module, a processing module and a printing module, wherein the acquisition module is used for acquiring data to be printed and printing parameters, and the printing parameters comprise printing distances corresponding to single printing tasks;

the control module is used for controlling the printing head to print the data to be printed corresponding to the current printing task according to the printing parameters;

the control module is also used for controlling the printer to move the consumable and measuring the moving distance of the consumable through the Gray code step length measuring instrument so as to obtain the moving distance of the consumable;

and the judging module is used for judging whether the consumable moving distance is greater than or equal to the printing distance, stopping the movement of the consumable when the consumable moving distance is greater than or equal to the printing distance, and controlling the printing head to print the data to be printed corresponding to the next printing task.

7. The gray code-based printer control apparatus of claim 6, wherein the single print job comprises one print line.

8. The gray code-based printer control device according to claim 6, wherein the single print job includes a plurality of print lines, and wherein controlling the print head to print the data to be printed corresponding to the current print job according to the print parameters includes:

and controlling the printing head to print the current printing line, and after the current printing line is printed, controlling the printing head to move by one printing line distance so as to finish the printing of a plurality of printing lines in a single printing task through the movement of the printing head.

9. The gray code-based printer control apparatus of claim 7, wherein the measuring of the moving distance of the consumable by the gray code step size measuring instrument comprises:

and in the process of moving the consumable, acquiring the effective step value of the Gray code step length measuring instrument, and calculating the moving distance of the consumable according to the effective step value, the radius of the Gray code step length measuring instrument and the single-circle step value.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于智能手机芯片的便捷式打印机控制系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类