[go: up one dir, main page]

JP2015189104A - Printer and control method of the same - Google Patents

Printer and control method of the same Download PDF

Info

Publication number
JP2015189104A
JP2015189104A JP2014068251A JP2014068251A JP2015189104A JP 2015189104 A JP2015189104 A JP 2015189104A JP 2014068251 A JP2014068251 A JP 2014068251A JP 2014068251 A JP2014068251 A JP 2014068251A JP 2015189104 A JP2015189104 A JP 2015189104A
Authority
JP
Japan
Prior art keywords
instruction command
print
cutting
recording medium
control data
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.)
Pending
Application number
JP2014068251A
Other languages
Japanese (ja)
Inventor
俊一 若狭
Shunichi Wakasa
俊一 若狭
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2014068251A priority Critical patent/JP2015189104A/en
Publication of JP2015189104A publication Critical patent/JP2015189104A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Electronic Switches (AREA)
  • Handling Of Sheets (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

【課題】記録媒体の無駄な消費を抑制する。【解決手段】プリンター2の制御部50は、受信バッファー56に格納された印刷制御データを分析し、印刷制御データに含まれる印刷指示コマンドのうちの最後の印刷指示コマンドである最終印刷指示コマンドと、切断指示コマンドとの間にある改行指示コマンドを判別し、最終印刷指示コマンドCQを読み出して実行した後、改行指示コマンドを読み捨て、印刷ヘッド24とカッターユニットとの離間距離に対応する距離、感熱ロール紙を搬送させた後、カッターユニットに感熱ロール紙を切断させる。【選択図】図3An object of the present invention is to suppress unnecessary consumption of a recording medium. A control unit (50) of a printer (2) analyzes print control data stored in a reception buffer (56), and outputs a last print instruction command that is the last print instruction command among print instruction commands included in the print control data. After determining the line feed instruction command between the print instruction and the cutting instruction command, reading and executing the final print instruction command CQ, the line feed instruction command is discarded, and the distance corresponding to the separation distance between the print head 24 and the cutter unit, the thermal sensitivity After transporting the roll paper, the cutter unit cuts the thermal roll paper. [Selection diagram] FIG.

Description

本発明は、印刷装置、及び、印刷装置の制御方法に関する。   The present invention relates to a printing apparatus and a printing apparatus control method.

従来、印刷ヘッド(印字ヘッド)と、印刷ヘッドの搬送方向の下流に設けられた切断部(切断装置)とを備える印刷装置(プリンター)が知られている(例えば、特許文献1参照)。   2. Description of the Related Art Conventionally, a printing apparatus (printer) including a print head (print head) and a cutting unit (cutting apparatus) provided downstream in the transport direction of the print head is known (for example, see Patent Document 1).

特開2005−59502号公報JP-A-2005-59502

上述した印刷装置のように、記録媒体に印刷し、切断するものでは、できるだけ記録媒体の無駄な消費を抑制したいとするニーズがある。
本発明は、上述した事情に鑑みてなされたものであり、記録媒体の無駄な消費を抑制することを目的とする。
There is a need to suppress wasteful consumption of a recording medium as much as possible in the case of printing and cutting on a recording medium like the above-described printing apparatus.
The present invention has been made in view of the above-described circumstances, and an object thereof is to suppress wasteful consumption of a recording medium.

上記目的を達成するために、本発明は、制御装置に通信可能な印刷装置であって、記録媒体を搬送方向に搬送する搬送部と、前記記録媒体に印刷する印刷ヘッドと、前記印刷ヘッドの前記搬送方向の下流に設けられ、前記記録媒体を切断する切断部と、印刷を指示する印刷指示コマンド、改行を指示する改行指示コマンド、及び、前記記録媒体の切断を指示する切断指示コマンドを含む印刷制御データを前記制御装置から受信し、受信した前記印刷制御データをバッファーに格納する受信部と、前記受信部により前記バッファーに格納された前記印刷制御データを分析し、前記印刷制御データに含まれる前記印刷指示コマンドのうちの最後の前記印刷指示コマンドである最終印刷指示コマンドと前記切断指示コマンドとの間にある前記改行指示コマンドを判別し、前記最終印刷指示コマンドを読み出して実行した後、前記最終印刷指示コマンドと前記切断指示コマンドとの間にあると判別した前記改行指示コマンドを読み捨て、前記印刷ヘッドと前記切断部との離間距離に対応する第1距離、前記搬送部に前記記録媒体を搬送させた後、前記切断部に前記記録媒体を切断させる制御部と、を備えることを特徴とする。
ここで、印刷制御データにおいて、最終印刷指示コマンドと、切断指示コマンドとの間にある改行指示コマンドは、最終印刷指示コマンドに基づく印刷の実行後、記録媒体の被切断位置が、切断部の切断位置に至るように、記録媒体を搬送するために設けられたコマンドである。そして、各コマンドの間にある改行指示コマンドに基づく搬送量が、印刷ヘッドと切断部との離間距離よりも不必要に長く、このことに起因して、無駄な余白が生じ、記録媒体の無駄な消費が発生する可能性がある。このことに基づき、本発明の構成によれば、印刷装置は、最終印刷指示コマンドを読み出して実行した後、最終印刷指示コマンドと切断指示コマンドとの間にある改行指示コマンドを読み捨て、印刷ヘッドと切断部との離間距離に対応する距離、記録媒体を搬送させた後、切断部に記録媒体を切断させる。このため、記録媒体は、最終印刷指示コマンドに基づく画像の印刷の実行後、印刷ヘッドと切断部との離間距離に対応する距離だけ搬送されて切断されることとなり、無駄な余白が生じず、記録媒体の無駄な消費を抑制できる。
In order to achieve the above object, the present invention provides a printing apparatus capable of communicating with a control device, a transport unit that transports a recording medium in a transport direction, a print head that prints on the recording medium, A cutting unit that is provided downstream in the transport direction and includes a cutting unit that cuts the recording medium, a print instruction command that instructs printing, a line feed instruction command that instructs a line feed, and a cutting instruction command that instructs the cutting of the recording medium Receiving the print control data from the control device, storing the received print control data in a buffer, analyzing the print control data stored in the buffer by the receiving unit, and including the print control data in the print control data The line feed instruction between the last print instruction command that is the last print instruction command of the print instruction commands and the cutting instruction command. After determining the command and reading and executing the final print instruction command, the line feed instruction command determined to be between the final print instruction command and the cutting instruction command is discarded, and the print head, the cutting unit, And a control unit that causes the cutting unit to cut the recording medium after the recording medium is transported to the transport unit by a first distance corresponding to the separation distance.
Here, in the print control data, the line feed instruction command between the final print instruction command and the cutting instruction command indicates that the cut position of the recording medium is the cutting position of the cutting portion after execution of printing based on the final print instruction command. This is a command provided to transport the recording medium so as to reach the position. In addition, the carry amount based on the line feed instruction command between the commands is unnecessarily longer than the separation distance between the print head and the cutting unit, which results in useless margins and waste of the recording medium. Consumption may occur. Based on this, according to the configuration of the present invention, the printing apparatus reads out and executes the final print instruction command, and then discards the line feed instruction command between the final print instruction command and the cutting instruction command. After transporting the recording medium for a distance corresponding to the separation distance from the cutting unit, the recording unit is caused to cut the recording medium. For this reason, the recording medium is transported and cut by a distance corresponding to the separation distance between the print head and the cutting portion after execution of printing of the image based on the final print instruction command, and no unnecessary blank space is generated. Wasteful consumption of the recording medium can be suppressed.

また、本発明の印刷装置は、前記制御部は、前記最終印刷指示コマンドを読み出して実行し、前記最終印刷指示コマンドと前記切断指示コマンドとの間にある前記改行指示コマンドを読み捨て、前記バッファーに格納された次の前記印刷制御データに含まれる前記印刷指示コマンドに基づいて前記印刷ヘッドに印刷させつつ、前記第1距離、前記搬送部に前記記録媒体を搬送させた後、前記切断部に前記記録媒体を切断させることを特徴とする。
本発明の構成によれば、最終印刷指示コマンドに基づく画像の印刷後の搬送中に、受信バッファーに格納された次の印刷制御データに基づく画像の印刷が実行されるため、次の印刷制御データに基づく印刷おける余白の発生を抑制でき、より効果的に記録媒体の無駄な消費を抑制できる。
In the printing apparatus of the present invention, the control unit reads and executes the final print instruction command, discards the line feed instruction command between the final print instruction command and the cutting instruction command, and stores it in the buffer. The print head is printed based on the print instruction command included in the next stored print control data, and the recording medium is transported to the transport unit by the first distance, and then the cutting unit is The recording medium is cut.
According to the configuration of the present invention, the printing of the image based on the next printing control data stored in the reception buffer is executed during the conveyance after the printing of the image based on the final printing instruction command. It is possible to suppress the generation of margins in printing based on the above, and it is possible to more effectively suppress wasteful consumption of the recording medium.

また、本発明の印刷装置は、前記制御部は、前記第一距離の搬送、及び、前記次の印刷制御データに基づく印刷の実行中、前記第1距離の搬送が完了したか否かを監視し、前記第1距離の搬送が完了した場合、前記切断部に前記記録媒体を切断させることを特徴とする。
本発明の構成によれば、印刷装置は、第1距離の搬送中に次の印刷制御データに基づく印刷を実行して記録媒体の無駄な消費を抑制した上で、1の印刷制御データに基づいて印刷される画像と、当該1の印刷制御データの次の印刷制御データに基づいて印刷される画像との間で、記録媒体を切断できる。
In the printing apparatus according to the aspect of the invention, the control unit may monitor whether the first distance conveyance is completed during the first distance conveyance and the printing based on the next print control data. When the conveyance of the first distance is completed, the cutting unit is caused to cut the recording medium.
According to the configuration of the present invention, the printing apparatus executes printing based on the next print control data during conveyance of the first distance to suppress wasteful consumption of the recording medium, and then based on the one print control data. The recording medium can be cut between the image to be printed and the image printed based on the print control data next to the one print control data.

また、上記目的を達成するために、本発明は、制御装置に通信可能に構成され、記録媒体を搬送方向に搬送する搬送部と、前記記録媒体に印刷する印刷ヘッドと、前記印刷ヘッドの前記搬送方向の下流に設けられ、前記記録媒体を切断する切断部と、を備える印刷装置の制御方法であって、印刷を指示する印刷指示コマンド、改行を指示する改行指示コマンド、及び、前記記録媒体の切断を指示する切断指示コマンドを含む印刷制御データを前記制御装置から受信し、受信した前記印刷制御データをバッファーに格納し、前記バッファーに格納された前記印刷制御データを分析し、前記印刷制御データに含まれる前記印刷指示コマンドのうちの最後の前記印刷指示コマンドである最終印刷指示コマンドと前記切断指示コマンドとの間にある前記改行指示コマンドを判別し、前記最終印刷指示コマンドを読み出して実行した後、前記最終印刷指示コマンドと前記切断指示コマンドとの間にあると判別した前記改行指示コマンドを読み捨て、前記印刷ヘッドと前記切断部との離間距離に対応する第1距離、前記搬送部に前記記録媒体を搬送させた後、前記切断部に前記記録媒体を切断させることを特徴とする。
本発明の構成によれば、記録媒体は、最終印刷指示コマンドに基づく画像の印刷の実行後、印刷ヘッドと切断部との離間距離に対応する距離だけ搬送されて切断されることとなり、無駄な余白が生じず、記録媒体の無駄な消費を抑制できる。
In order to achieve the above object, the present invention is configured to be able to communicate with a control device, and includes a transport unit that transports a recording medium in a transport direction, a print head that prints on the recording medium, and the print head. A printing apparatus control method, comprising: a cutting unit that is provided downstream in a transport direction and cuts the recording medium, wherein the printing instruction command for instructing printing, the line feed instruction command for instructing a line feed, and the recording medium Print control data including a cutting instruction command for instructing cutting is received from the control device, the received print control data is stored in a buffer, the print control data stored in the buffer is analyzed, and the print control is performed. Before the last print instruction command that is the last print instruction command of the print instruction commands included in the data and the cutting instruction command After determining the line feed instruction command and reading and executing the final print instruction command, the line feed instruction command determined to be between the final print instruction command and the cutting instruction command is discarded and the print head and the cutting are cut off. The recording medium is transported by the transporting section for a first distance corresponding to a separation distance from the section, and then the recording medium is cut by the cutting section.
According to the configuration of the present invention, after execution of image printing based on the final print instruction command, the recording medium is transported and cut by a distance corresponding to the separation distance between the print head and the cutting unit, which is useless. There is no blank space, and wasteful consumption of the recording medium can be suppressed.

また、本発明の印刷装置の制御方法は、前記最終印刷指示コマンドを読み出して実行し、前記最終印刷指示コマンドと前記切断指示コマンドとの間にある前記改行指示コマンドを読み捨て、前記受信バッファーに格納された次の前記印刷制御データに含まれる前記印刷指示コマンドに基づいて前記印刷ヘッドに印刷させつつ、前記第1距離、前記搬送部に前記記録媒体を搬送させた後、前記切断部に前記記録媒体を切断させることを特徴とする。
本発明の構成によれば、より効果的に記録媒体の無駄な消費を抑制できる。
In the printing apparatus control method of the present invention, the final print instruction command is read and executed, and the line feed instruction command between the final print instruction command and the cutting instruction command is discarded and stored in the reception buffer. The print head is printed based on the print instruction command included in the next print control data, and the recording medium is transported to the transport unit by the first distance, and then the recording is performed by the cutting unit. The medium is cut.
According to the configuration of the present invention, wasteful consumption of the recording medium can be more effectively suppressed.

また、本発明の印刷装置の制御方法は、前記第一距離の搬送、及び、前記次の印刷制御データに基づく印刷の実行中、前記第1距離の搬送が完了したか否かを監視し、前記第1距離の搬送が完了した場合、前記切断部に前記記録媒体を切断させることを特徴とする。
本発明の構成によれば、印刷装置は、第1距離の搬送中に次の印刷制御データに基づく印刷を実行して記録媒体の無駄な消費を抑制した上で、1の印刷制御データに基づいて印刷される画像と、当該1の印刷制御データの次の印刷制御データに基づいて印刷される画像との間で、記録媒体を切断できる。
Further, the control method of the printing apparatus of the present invention monitors whether or not the first distance conveyance is completed during the execution of the first distance conveyance and the printing based on the next print control data, When the conveyance of the first distance is completed, the cutting unit is caused to cut the recording medium.
According to the configuration of the present invention, the printing apparatus executes printing based on the next print control data during conveyance of the first distance to suppress wasteful consumption of the recording medium, and then based on the one print control data. The recording medium can be cut between the image to be printed and the image printed based on the print control data next to the one print control data.

本発明によれば、記録媒体の無駄な消費を抑制する。   According to the present invention, wasteful consumption of a recording medium is suppressed.

本実施形態に係るPOS端末の構成を示す図。The figure which shows the structure of the POS terminal which concerns on this embodiment. プリンターの内部の構成を示す図。FIG. 3 is a diagram illustrating an internal configuration of a printer. ホストコンピューター、プリンターの機能的構成を示す図。The figure which shows the functional structure of a host computer and a printer. 印刷制御データ、及び、レシートを示す図。The figure which shows printing control data and a receipt. 搬送用改行指示コマンドLFTの説明に用いる図。The figure used for description of the line feed command LFT for conveyance. プリンターの動作を示すフローチャート。6 is a flowchart illustrating the operation of a printer.

以下、図面を参照して本発明の実施形態について説明する。
図1は、本発明を適用した実施形態に係るPOS端末1の概略構成を示す図である。
また、図2は、POS端末1が備えるプリンター2(印刷装置)の本体内部の構成を模式的に示す図である。
POS端末1は、スーパーマーケットやコンビニエンスストア等の店舗に構築された販売時点管理システム(POSシステム)上に設けられた端末であり、売上登録処理及び精算処理を行うホストコンピューター3(制御装置)と、このホストコンピューター3に接続され、ホストコンピューター3の制御の下、レシート10を発行するプリンター2と、を備える。
ホストコンピューター3は、売上登録処理及び精算処理の処理内容を表示するディスプレー12、売上登録処理時に商品に付されたバーコードを読み取るバーコードスキャナー13、売上登録キー等の各種キーを備えたキー入力部14、精算用の現金を収容するキャッシュドロワー15等を備えている。また、ホストコンピューター3には、売上登録した情報を収集するPOSサーバー16が接続される。
レシート10の発行に際し、ホストコンピューター3は、バーコードスキャナー13からの入力値や、キー入力部14からの入力値に基づいて、適宜、POSサーバー16にアクセスしてレシート10を発行するために必要な情報を取得し、プリンター2にレシート10の発行に係る各種動作を行わせる印刷制御データを生成し、プリンター2に出力する。プリンター2は、ホストコンピューター3から入力された印刷制御データに基づいて、各部を動作させ、レシート10を発行する。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a diagram showing a schematic configuration of a POS terminal 1 according to an embodiment to which the present invention is applied.
FIG. 2 is a diagram schematically illustrating an internal configuration of a printer 2 (printing apparatus) included in the POS terminal 1.
The POS terminal 1 is a terminal provided on a point-of-sale management system (POS system) built in a store such as a supermarket or a convenience store, and a host computer 3 (control device) that performs sales registration processing and settlement processing; The printer 2 is connected to the host computer 3 and issues a receipt 10 under the control of the host computer 3.
The host computer 3 has a display 12 for displaying the contents of the sales registration process and the settlement process, a bar code scanner 13 for reading a bar code attached to the product during the sales registration process, and a key input including various keys such as a sales registration key. The unit 14 includes a cash drawer 15 that accommodates cash for settlement. The host computer 3 is connected to a POS server 16 that collects information registered for sales.
When issuing the receipt 10, the host computer 3 is necessary to access the POS server 16 and issue the receipt 10 as appropriate based on the input value from the barcode scanner 13 or the input value from the key input unit 14. Print information that causes the printer 2 to perform various operations related to the issuance of the receipt 10 is generated and output to the printer 2. The printer 2 operates each unit based on the print control data input from the host computer 3 and issues a receipt 10.

また、図1及び図2に示すように、印刷装置としてのプリンター2は、本体20に記録媒体としての感熱ロール紙22を収容し、感熱ロール紙22を搬送するローラー形状のプラテン23(搬送部)と、プラテン23に対向配置された印刷ヘッド24と、感熱ロール紙22を切断するカッターユニット25(切断部)とを備えている。
プリンター2は、搬送モーター26(搬送部、図3)を駆動して、プラテン23を回転して、感熱ロール紙22を搬送方向Y1に搬送しながら、発熱素子が並べて設けられた印刷ヘッド24によって、感熱ロール紙22の印刷面に熱を与えて、感熱ロール紙22の印刷面にドットを形成することにより、画像を印刷するサーマルラインプリンターである。
画像が印刷された感熱ロール紙22は、本体20の上面に形成された排紙口28から外に向けて搬送され、この排紙口28よりも搬送方向Y1上流側でカッターユニット25により切断され、レシート10となる。
As shown in FIGS. 1 and 2, the printer 2 as a printing apparatus accommodates a thermal roll paper 22 as a recording medium in a main body 20, and a roller-shaped platen 23 (conveying unit) that conveys the thermal roll paper 22. ), A print head 24 disposed opposite to the platen 23, and a cutter unit 25 (cutting unit) for cutting the thermal roll paper 22.
The printer 2 drives the conveyance motor 26 (conveyance unit, FIG. 3), rotates the platen 23, and conveys the thermal roll paper 22 in the conveyance direction Y1, while the print head 24 is provided with the heating elements arranged side by side. The thermal line printer prints an image by applying heat to the printing surface of the thermal roll paper 22 to form dots on the printing surface of the thermal roll paper 22.
The heat-sensitive roll paper 22 on which the image is printed is conveyed outward from a paper discharge port 28 formed on the upper surface of the main body 20, and is cut by the cutter unit 25 on the upstream side of the paper discharge port 28 in the conveyance direction Y1. The receipt 10 is obtained.

図2に示すように、プリンター2が備えるカッターユニット25は、感熱ロール紙22の搬送路の一方側に配置された固定刃30と、この固定刃30に対向して感熱ロール紙22の搬送路の他方側に配置された可動刃31と、可動刃31を固定刃30に向けてスライドさせるカッター駆動モーター32とを備え、カッター駆動モーター32の駆動力により、駆動機構(図示略)を介して可動刃31がカッター駆動モーター32に向けて移動され、固定刃30と可動刃31との間に印刷後の感熱ロール紙22が挟まれ、切断される。
また、図1に示すように、プリンター2の本体20には開閉可能なカバー35が設けられる。本体20には、カバー35を開くためのレバー36が設けられ、カバー35を開くと、感熱ロール紙22を収容する空間が露出し、感熱ロール紙22の補充や交換が可能になる。また、本体20には、プリンター2の電源をオン/オフさせる電源スイッチ37、手動による感熱ロール紙22の搬送等の操作を行うための紙送りスイッチ38、及び、所定の態様で点灯/消灯することによりプリンター2の状態や、エラーの発生の有無等を表示するLED39が設けられている。
印刷ヘッド24は、カッターユニット25の搬送方向Y1の下流に設けられる。
As shown in FIG. 2, the cutter unit 25 provided in the printer 2 includes a fixed blade 30 disposed on one side of the conveyance path of the thermal roll paper 22 and a conveyance path of the thermal roll paper 22 facing the fixed blade 30. A movable blade 31 disposed on the other side of the blade and a cutter drive motor 32 that slides the movable blade 31 toward the fixed blade 30. The drive force of the cutter drive motor 32 causes a drive mechanism (not shown) to pass through. The movable blade 31 is moved toward the cutter drive motor 32, and the thermal roll paper 22 after printing is sandwiched between the fixed blade 30 and the movable blade 31 and cut.
As shown in FIG. 1, the main body 20 of the printer 2 is provided with a cover 35 that can be opened and closed. The main body 20 is provided with a lever 36 for opening the cover 35. When the cover 35 is opened, a space for accommodating the thermal roll paper 22 is exposed, and the thermal roll paper 22 can be replenished or replaced. Further, the main body 20 has a power switch 37 for turning on / off the power of the printer 2, a paper feed switch 38 for manually operating the heat-sensitive roll paper 22, and the like, and is turned on / off in a predetermined manner. Accordingly, an LED 39 for displaying the status of the printer 2 and the presence or absence of an error is provided.
The print head 24 is provided downstream of the cutter unit 25 in the transport direction Y1.

図3は、POS端末1の機能的構成を示すブロック図である。
図3に示すように、ホストコンピューター3は、ホスト側制御部40と、ホスト側入力部41と、ホスト側表示部42と、ホスト側記憶部43と、ホスト側インターフェース部(I/F)44と、を備えている。
ホスト側制御部40は、ホストコンピューター3を中枢的に制御するものであり、各種プログラムを実行するCPU、CPUにより実行される基本制御プログラム等を記憶するROM、CPUが実行するプログラムや処理対象のデータ等を一時的に記憶するワークエリアを形成するRAM、その他周辺回路等を備えている。ホスト側制御部40は、POSアプリケーション実行部40aと、プリンタードライバー実行部40bと、を備えているが、これらについては後述する。
ホスト側入力部41は、上述したキー入力部14を含めた各種入力デバイスに接続され、入力デバイスに対する操作を検出し、ホスト側制御部40に出力する。
ホスト側表示部42は、上述したディスプレー12に接続され、ホスト側制御部40の制御の下、売上登録処理及び精算処理の処理内容等の各種情報をディスプレー12に表示する。
なお、上述したように、ホストコンピューター3は、バーコードスキャナー13や、キャッシュドロワー等の各種レジスター周辺デバイスが接続されているが、ホストコンピューター3には、これらデバイスを接続するためのインターフェースが実装されると共に、これらデバイスを制御するためのデバイスドライバーが予めインストールされている。
ホスト側記憶部43は、ハードディスクや、EEPROM等の不揮発性メモリーを備え、各種データを書き換え可能に、不揮発的に記憶する。
ホスト側インターフェース部44は、ホスト側制御部40の制御の下、プリンター2との間で通信規格に準拠した通信を行う。
FIG. 3 is a block diagram showing a functional configuration of the POS terminal 1.
As shown in FIG. 3, the host computer 3 includes a host-side control unit 40, a host-side input unit 41, a host-side display unit 42, a host-side storage unit 43, and a host-side interface unit (I / F) 44. And.
The host-side control unit 40 centrally controls the host computer 3, and includes a CPU that executes various programs, a ROM that stores basic control programs executed by the CPU, programs executed by the CPU, and processing targets. It includes a RAM that forms a work area for temporarily storing data and the like, and other peripheral circuits. The host-side control unit 40 includes a POS application execution unit 40a and a printer driver execution unit 40b, which will be described later.
The host side input unit 41 is connected to various input devices including the key input unit 14 described above, detects an operation on the input device, and outputs it to the host side control unit 40.
The host-side display unit 42 is connected to the display 12 described above, and displays various types of information such as sales registration processing and payment processing contents on the display 12 under the control of the host-side control unit 40.
As described above, the host computer 3 is connected to various register peripheral devices such as a barcode scanner 13 and a cash drawer. The host computer 3 is provided with an interface for connecting these devices. In addition, device drivers for controlling these devices are installed in advance.
The host-side storage unit 43 includes a hard disk, a nonvolatile memory such as an EEPROM, and stores various data in a rewritable manner.
The host side interface unit 44 performs communication based on the communication standard with the printer 2 under the control of the host side control unit 40.

プリンター2は、上述したようにレシート10を発行するサーマルラインプリンターであり、図3に示すように、制御部50と、プリントエンジン51と、入力部52と、表示部53と、記憶部54と、インターフェース部55と、を備えている。
制御部50は、プリンター2の各部を制御するものであり、上述したホスト側制御部40と同様、CPUや、ROM、RAM、その他の周辺回路等を備えている。
プリントエンジン51は、制御部50の制御で、印刷ヘッド24や、搬送モーター26、カッター駆動モーター32等を動作させて、感熱ロール紙22に画像を印刷し、画像を印刷した感熱ロール紙22を切断することによりレシート10を発行する。制御部50の機能は、CPUや、ファームウェアとのプログラムを読み出して実行する等、ハードウェアとソフトウェアとの協働により実現される。
搬送モーター26や、プラテン23等、感熱ロール紙22を搬送させる機構、装置が、「搬送部」に該当する。
入力部52は、電源スイッチ37、及び、紙送りスイッチ38に接続され、これら操作スイッチに対する操作を検出し、制御部50に出力する。
表示部53は、制御部50の制御の下、LED39に駆動信号を出力し、所定の態様でLED39を点灯/消灯させる。
記憶部54は、EEPROMや、ハードディスク等の不揮発性メモリーを備え、各種データを書き換え可能に、不揮発的に記憶する。記憶部54に記憶される各データについては、後述する。
インターフェース部(I/F)55は、ホストコンピューター3との間で、通信規格に準拠した通信を行う。インターフェース部55は、ホストコンピューター3から受信した印刷制御データについて、バッファー56に、順次、格納する。インターフェース部55が、ホストコンピューター3から印刷制御データを受信し、バッファー56に格納する「受信部」として機能する。
The printer 2 is a thermal line printer that issues the receipt 10 as described above. As shown in FIG. 3, the control unit 50, the print engine 51, the input unit 52, the display unit 53, the storage unit 54, and the like. And an interface unit 55.
The control unit 50 controls each unit of the printer 2 and includes a CPU, a ROM, a RAM, other peripheral circuits, and the like, similar to the host-side control unit 40 described above.
Under the control of the control unit 50, the print engine 51 operates the print head 24, the transport motor 26, the cutter drive motor 32, and the like to print an image on the thermal roll paper 22, and the thermal roll paper 22 on which the image has been printed. The receipt 10 is issued by cutting. The function of the control unit 50 is realized by cooperation of hardware and software, such as reading and executing a program with a CPU and firmware.
The mechanism and apparatus for transporting the thermal roll paper 22 such as the transport motor 26 and the platen 23 correspond to the “transport section”.
The input unit 52 is connected to the power switch 37 and the paper feed switch 38, detects operations on these operation switches, and outputs them to the control unit 50.
The display unit 53 outputs a drive signal to the LED 39 under the control of the control unit 50, and turns on / off the LED 39 in a predetermined manner.
The storage unit 54 includes a nonvolatile memory such as an EEPROM or a hard disk, and stores various data in a rewritable manner. Each data stored in the storage unit 54 will be described later.
The interface unit (I / F) 55 performs communication based on the communication standard with the host computer 3. The interface unit 55 sequentially stores the print control data received from the host computer 3 in the buffer 56. The interface unit 55 functions as a “reception unit” that receives print control data from the host computer 3 and stores it in the buffer 56.

次いで、POSアプリケーション実行部40a、及び、プリンタードライバー実行部40bの説明を通して、1つのレシート10を発行する際のPOS端末1の基本的な動作について説明する。
POSアプリケーション実行部40aは、ホストコンピューター3に予めインストールされたPOSアプリケーションを実行することにより、取引毎に、POSサーバー16にアクセスして必要な情報を取得した上で、購入された商品を示す情報や、商品の単価を示す情報、合計購入金額を示す情報等のレシート10(図4(B))に記載すべき情報を取得し、取得した情報に基づいて、レシート10に印刷すべき画像の情報を含む印刷データを生成し、プリンタードライバー実行部40bに出力する。
プリンタードライバー実行部40bは、ホストコンピューター3に予めインストールされたプリンタードライバーを実行することにより、POSアプリケーション実行部40aから入力された印刷データに基づいて、プリンター2のコマンド仕様に対応した印刷制御データを生成し、プリンター2に出力する。印刷制御データには、複数の制御コマンドが含まれている。
ホストコンピューター3からプリンター2に出力された印刷制御データの制御コマンドは、順次、バッファー56に格納される。プリンター2の制御部50は、バッファー56に格納された制御コマンドを、順次、読み出して実行することにより、プリントエンジン51を制御して、レシート10の発行に係る各種動作を実行する。
Next, the basic operation of the POS terminal 1 when issuing one receipt 10 will be described through the description of the POS application execution unit 40a and the printer driver execution unit 40b.
The POS application execution unit 40a executes the POS application preinstalled in the host computer 3, thereby accessing the POS server 16 for each transaction to obtain necessary information and information indicating the purchased product. In addition, information to be described in the receipt 10 (FIG. 4B) such as information indicating the unit price of the product and information indicating the total purchase amount is acquired, and based on the acquired information, the image to be printed on the receipt 10 is acquired. Print data including information is generated and output to the printer driver execution unit 40b.
The printer driver execution unit 40b executes print driver data pre-installed in the host computer 3 to obtain print control data corresponding to the command specifications of the printer 2 based on the print data input from the POS application execution unit 40a. Generate and output to the printer 2. The print control data includes a plurality of control commands.
Control commands for print control data output from the host computer 3 to the printer 2 are sequentially stored in the buffer 56. The control unit 50 of the printer 2 sequentially reads and executes the control commands stored in the buffer 56 to control the print engine 51 and execute various operations related to the receipt 10 issue.

図4(A)は、印刷制御データの内容の一例を示す図であり、図4(B)は、図4(A)の印刷制御データに基づいて画像が印刷されたレシート10の一例を示す図である。なお、図4(B)は、後述する手段によって余白の削減が行われることなく、図4(A)の印刷制御データに基づいて処理を行って発行されるレシート10を示す。
図4(B)のレシート10では、図中上に向かう方向が、搬送方向Y1に対応する方向である。従って、レシート10の発行の際には、切断されて先端10aが形成された感熱ロール紙22に、印刷ヘッド24によってレシート10の先端10a側から後端10b側へ向かって、順次、ドットが形成されて画像が印刷され、その後、感熱ロール紙22が切断されて後端10bが形成される。
FIG. 4A is a diagram illustrating an example of the contents of the print control data, and FIG. 4B illustrates an example of the receipt 10 on which an image is printed based on the print control data of FIG. FIG. Note that FIG. 4B shows a receipt 10 issued by performing processing based on the print control data of FIG. 4A without performing margin reduction by means described later.
In the receipt 10 of FIG. 4B, the upward direction in the drawing is the direction corresponding to the transport direction Y1. Therefore, when the receipt 10 is issued, dots are sequentially formed on the thermal roll paper 22 that has been cut and formed at the leading edge 10a from the leading edge 10a side to the trailing edge 10b side by the print head 24. Then, an image is printed, and then the thermal roll paper 22 is cut to form the rear end 10b.

印刷制御データは、プリンター2にレシート10の発行に係る各種動作を行わせるためのコマンド群のことであり、印刷指示コマンドCM、改行指示コマンドLF、及び、切断指示コマンドSC等の制御コマンドを含む。
印刷指示コマンドCMは、1行分の文字列の印刷を指示する制御コマンドである。
図4(A)に示すように、印刷指示コマンドCMは、文字列装飾コマンドMSと、文字列印刷指示コマンドMKとを含む。
文字列装飾コマンドMSは、印刷する文字列に施す装飾を指定する制御コマンドである。装飾とは、印刷する文字列に対して描画に関する何らかの処理を行うことである。例えば、文字列の拡大や、文字列の位置の移動(左寄せ、中央寄せ、右寄せ等)、縮小、回転、強調、太字化、装飾文字又は装飾記号の付加等が装飾である。
文字列印刷指示コマンドMKは、文字列を指定し、指定した文字列の印刷を指示するコマンドである。文字列印刷指示コマンドは、命令コードと、所定の文字コード(例えば、アスキーコード。)で表現された文字の組み合わせからなる文字列と、の組合せにより構成されている。例えば、図4(B)の1行目の文字列に係る文字列印刷指示コマンドMKは、「XXX△“AAA△Store”」(ただし、XXXは、文字列を印刷することを指示する命令コード。また、ダブルクォーテーション内の文字列は、アスキーコードで表現された文字の組み合わせによって構成された文字列。)という構成となっている。
改行指示コマンドLFは、1行分の改行を指示する制御コマンドである。図4(A)、(B)に示すように、改行指示コマンドLFが読み出されて実行された場合、1行分の改行が行われ、レシート10に1行分の空白が生じる。
切断指示コマンドSCは、カッターユニット25による切断を指示する制御コマンドである。切断指示コマンドSCが読み出されて実行された場合、カッターユニット25による感熱ロール紙22の切断が行われる。
The print control data is a command group for causing the printer 2 to perform various operations related to the issuance of the receipt 10, and includes control commands such as a print instruction command CM, a line feed instruction command LF, and a cutting instruction command SC. .
The print instruction command CM is a control command for instructing printing of a character string for one line.
As shown in FIG. 4A, the print instruction command CM includes a character string decoration command MS and a character string print instruction command MK.
The character string decoration command MS is a control command for designating decorations to be applied to a character string to be printed. Decoration is to perform some process related to drawing on a character string to be printed. For example, decoration includes character string enlargement, character string position movement (left-justified, center-justified, right-justified, etc.), reduction, rotation, emphasis, bolding, and addition of decorative characters or symbols.
The character string print instruction command MK is a command for designating a character string and instructing printing of the designated character string. The character string print instruction command is composed of a combination of an instruction code and a character string made up of a combination of characters represented by a predetermined character code (for example, ASCII code). For example, the character string print instruction command MK related to the character string on the first line in FIG. 4B is “XXXΔ“ AAAΔStore ”” (where XXX is an instruction code for instructing to print the character string) The character string in the double quotation is a character string composed of a combination of characters expressed in ASCII code.)
The line feed instruction command LF is a control command for instructing a line feed for one line. As shown in FIGS. 4A and 4B, when the line feed instruction command LF is read and executed, a line feed is performed for one line, and a blank for one line is generated in the receipt 10.
The cutting instruction command SC is a control command for instructing cutting by the cutter unit 25. When the cutting instruction command SC is read and executed, the thermal roll paper 22 is cut by the cutter unit 25.

図4(A)に示すように、印刷制御データに含まれる複数の印刷指示コマンドCMのうちの最後の印刷指示コマンドCM(以下、「最終印刷指示コマンドCQ」という。)と、切断指示コマンドSCとの間には、複数(本例では4つ)の改行指示コマンドLFが設けられる。
この改行指示コマンドLFは、以下の処理を目的として設けられたものである。
図5は、改行指示コマンドLFの説明に用いる図であり、プリンター2の搬送路上の感熱ロール紙22の状態を模式的に示したものである。
図5において、位置T1は、印刷ヘッド24によってドットが形成される位置を示す。また、位置T2は、カッターユニット25によって感熱ロール紙22が切断される位置を示す。図中、上に向かう方向が、搬送方向Y1である。
図5(A)は、最終印刷指示コマンドCQに基づく1行分の画像G1が印刷された直後の感熱ロール紙22の状態を示す。図5(A)に示すように、最終印刷指示コマンドCQの実行の直後は、画像G1が位置T1を搬送方向Y1の下流側に少し超えた状態となる。
図5(A)に示す状態で、感熱ロール紙22の切断を行った場合、画像G1よりも搬送方向Y1の下流側で感熱ロール紙22が切断されてしまい、切断によって切り離される紙片には、画像G1が印刷されていない状態となる。
このことを踏まえ、印刷制御データにおいて、最終印刷指示コマンドCQと、切断指示コマンドSCとの間には、4つの改行指示コマンドLFが設けられる。切断指示コマンドSCの実行の前に、4つの改行指示コマンドLFが実行されることにより、感熱ロール紙22が搬送方向Y1に、4行分、搬送される。これにより、図5(B)に示すように、4つの改行指示コマンドLFを実行した直後は、画像G1が、位置T2の搬送方向Y1の下流側に位置した状態となる。この状態で、切断指示コマンドSCに基づいて感熱ロール紙22の切断を実行することにより、切断によって切り離される紙片に、画像G1が印刷された状態となる。
As shown in FIG. 4A, the last print instruction command CM (hereinafter referred to as “final print instruction command CQ”) among the plurality of print instruction commands CM included in the print control data, and the cutting instruction command SC. A plurality (four in this example) of line feed instruction commands LF are provided between.
This line feed instruction command LF is provided for the following processing.
FIG. 5 is a diagram used for explaining the line feed instruction command LF, and schematically shows the state of the thermal roll paper 22 on the conveyance path of the printer 2.
In FIG. 5, a position T <b> 1 indicates a position where dots are formed by the print head 24. The position T2 indicates a position where the thermal roll paper 22 is cut by the cutter unit 25. In the figure, the upward direction is the transport direction Y1.
FIG. 5A shows the state of the thermal roll paper 22 immediately after the image G1 for one line based on the final print instruction command CQ is printed. As shown in FIG. 5A, immediately after execution of the final print instruction command CQ, the image G1 is slightly beyond the position T1 downstream in the transport direction Y1.
When the thermal roll paper 22 is cut in the state shown in FIG. 5A, the thermal roll paper 22 is cut on the downstream side in the transport direction Y1 from the image G1. The image G1 is not printed.
Based on this, in the print control data, four line feed instruction commands LF are provided between the final print instruction command CQ and the cutting instruction command SC. Before the cutting instruction command SC is executed, four line feed instruction commands LF are executed, whereby the thermal roll paper 22 is conveyed by four lines in the conveying direction Y1. As a result, as shown in FIG. 5B, immediately after the four line feed instruction commands LF are executed, the image G1 is positioned downstream of the conveyance direction Y1 of the position T2. In this state, by executing the cutting of the thermal roll paper 22 based on the cutting instruction command SC, the image G1 is printed on the piece of paper separated by the cutting.

ここで、最終印刷指示コマンドCQに基づく画像を印刷した後、当該画像より搬送方向Y1の上流側で感熱ロール紙22を切断するためには、以下の搬送を行えばよい。当該コマンドに基づいて当該画像を印刷した後、位置T1と位置T2との離間距離(印刷ヘッドと切断部との離間距離)、感熱ロール紙22を搬送方向Y1に搬送すればよい。
一方で、改行指示コマンドLFにより、上記搬送を行った場合、改行指示コマンドLFが1行分の搬送を実行すること等に起因して、不必要に長い搬送を行う可能性がある。
以上を踏まえ、プリンター2は、以下の処理を実行する。
Here, after printing an image based on the final print instruction command CQ, in order to cut the thermal roll paper 22 upstream of the image in the transport direction Y1, the following transport may be performed. After printing the image based on the command, the separation distance between the position T1 and the position T2 (the separation distance between the print head and the cutting unit) and the thermal roll paper 22 may be conveyed in the conveyance direction Y1.
On the other hand, when the above-described conveyance is performed by the line feed instruction command LF, there is a possibility that an unnecessarily long conveyance may be performed due to the line break instruction command LF performing conveyance for one line.
Based on the above, the printer 2 executes the following processing.

図6は、プリンター2の動作を示すフローチャートである。
図6に示すように、ホストコンピューター3が印刷制御データを送信した場合、プリンター2のインターフェース部55は、印刷制御データを受信し、バッファー56に格納する(ステップSA1)。ここで、ホストコンピューター3は、複数のレシート10を連続して発行させる場合は、複数の印刷制御データを送信する。この場合、プリンター2のインターフェース部55は、複数の印刷制御データを受信し、順番に、バッファー56に格納する。
次いで、プリンター2の制御部50は、バッファー56に格納された印刷制御データのうち、実行しておらず、かつ、最も早くバッファー56に格納された印刷制御データを参照し(ステップSA2)、以下のステップSA3、SA4の分析を行う。
以下、ステップSA2で参照する印刷制御データを、「対象印刷制御データ」という。
次いで、制御部50は、対象印刷制御データに含まれる制御コマンドのうち、最終印刷指示コマンドCQを判別する(ステップSA3)。
次いで、制御部50は、判別した最終印刷指示コマンドCQと、切断指示コマンドSCとの間に設けられた改行指示コマンドLFを判別する(ステップSA4)。
以下、ステップSA4で判別された改行指示コマンドLFを、「搬送用改行指示コマンドLFT」という。
FIG. 6 is a flowchart showing the operation of the printer 2.
As shown in FIG. 6, when the host computer 3 transmits print control data, the interface unit 55 of the printer 2 receives the print control data and stores it in the buffer 56 (step SA1). Here, the host computer 3 transmits a plurality of print control data when issuing a plurality of receipts 10 continuously. In this case, the interface unit 55 of the printer 2 receives a plurality of print control data and stores them in the buffer 56 in order.
Next, the control unit 50 of the printer 2 refers to the print control data that has not been executed among the print control data stored in the buffer 56 and is stored first in the buffer 56 (step SA2). Steps SA3 and SA4 are analyzed.
Hereinafter, the print control data referred to in step SA2 is referred to as “target print control data”.
Next, the control unit 50 determines the final print instruction command CQ among the control commands included in the target print control data (step SA3).
Next, the control unit 50 determines a line feed instruction command LF provided between the determined final print instruction command CQ and the cutting instruction command SC (step SA4).
Hereinafter, the line feed instruction command LF determined in step SA4 is referred to as a “feed line feed instruction command LFT”.

次いで、制御部50は、対象印刷制御データの次の印刷制御データがバッファー56に格納されているか否かを判別する(ステップSA5)。
以下、対象印刷制御データの次にバッファー56に格納されている印刷制御データを、「次回印刷制御データ」と表現し、対象印刷制御データと区別する。
格納されていない場合(ステップSA5:NO)、制御部50は、最終印刷指示コマンドCQの読み出し、実行が完了したか否かを監視しつつ(ステップSA7)、対象印刷制御データの制御コマンドを、順番に、バッファー56から読み出し、実行する(ステップSA6)。
最終印刷指示コマンドCQの読み出し、実行が完了した場合(ステップSA7:YES)、制御部50は、最終印刷指示コマンドCQと切断指示コマンドSCの間にあると判別した全ての搬送用改行指示コマンドLFTを読み捨てる(ステップSA8)。
次いで、制御部50は、搬送モーター26を制御して、位置T1(図5)と位置T2(図5)との離間距離(印刷ヘッドと切断部との離間距離)に対応する距離(以下、「第1距離」という。)、感熱ロール紙22を搬送方向Y1に搬送する(ステップSA9)。
位置T1と位置T2との離間距離に対応する距離とは、当該離間距離に所定のマージンを反映した距離であり、事前に定められている。
次いで、制御部50は、カッターユニット25を制御して、感熱ロール紙22を切断する(ステップSA10)。
なお、ステップSA10の切断は、切断指示コマンドSCに基づいて行ってもよく、また、搬送用改行指示コマンドLFTの読み捨てと併せて切断指示コマンドSCを読み捨て、搬送後自動的に切断を実行してもよい。
このように、本実施形態では、最終印刷指示コマンドCQに基づく画像の印刷後、搬送用改行指示コマンドLFTに基づく搬送に変えて、事前に定められた位置T1と位置T2との離間距離に対応する距離、搬送を行い、切断を実行する。このため、不必要に長距離、搬送が行われることがなく、最終印刷指示コマンドCQに基づく画像と、後端10bとの間に形成される余白が縮小し、記録媒体(感熱ロール紙22)の無駄を抑制できる。
Next, the control unit 50 determines whether or not the next print control data of the target print control data is stored in the buffer 56 (step SA5).
Hereinafter, the print control data stored in the buffer 56 after the target print control data is expressed as “next print control data” and is distinguished from the target print control data.
If not stored (step SA5: NO), the control unit 50 monitors whether or not the reading and execution of the final print instruction command CQ has been completed (step SA7), and sends the control command for the target print control data to the control command. In order, the data is read from the buffer 56 and executed (step SA6).
When the reading and execution of the final print instruction command CQ are completed (step SA7: YES), the control unit 50 determines all the line feed instruction commands LFT for conveyance that are determined to be between the final print instruction command CQ and the cutting instruction command SC. Is discarded (step SA8).
Next, the control unit 50 controls the transport motor 26 so that the distance corresponding to the separation distance (the separation distance between the print head and the cutting portion) between the position T1 (FIG. 5) and the position T2 (FIG. 5) (Referred to as “first distance”), and the thermal roll paper 22 is transported in the transport direction Y1 (step SA9).
The distance corresponding to the separation distance between the position T1 and the position T2 is a distance reflecting a predetermined margin in the separation distance, and is determined in advance.
Next, the control unit 50 controls the cutter unit 25 to cut the thermal roll paper 22 (step SA10).
The cutting in step SA10 may be performed based on the cutting instruction command SC. Also, the cutting instruction command SC is discarded together with the reading of the carriage return instruction command LFT, and the cutting is automatically performed after the conveyance. Also good.
As described above, in this embodiment, after printing an image based on the final print instruction command CQ, it is changed to conveyance based on the line feed instruction command LFT for conveyance, and corresponds to a predetermined distance between the position T1 and the position T2. The distance to be transported is carried out, and cutting is executed. For this reason, unnecessarily long distance and conveyance are not performed, and the margin formed between the image based on the final print instruction command CQ and the rear end 10b is reduced, and the recording medium (the thermal roll paper 22). Can be wasted.

ステップSA5で、対象印刷制御データの次に次回印刷制御データが格納されていると判別した場合(ステップSA5:YES)、制御部50は、最終印刷指示コマンドCQの読み出し、実行が完了したか否かを監視しつつ(ステップSA12)、対象印刷制御データの制御コマンドを、順番に、バッファー56から読み出し、実行する(ステップSA11)。
最終印刷指示コマンドCQの読み出し、実行が完了した場合(ステップSA12:YES)、制御部50は、最終印刷指示コマンドCQと切断指示コマンドSCの間にあると判別した全ての搬送用改行指示コマンドLFTを読み捨てる(ステップSA13)。
次いで、制御部50は、次回印刷制御データの分析、次回印刷制御データの制御コマンドの読み出し、実行を行う(ステップSA14)。次回印刷制御データの制御コマンドの実行に伴って、感熱ロール紙22が搬送方向Y1へ搬送される。制御部50は、次回印刷制御データの制御コマンドの実行中、当該制御コマンドの実行に伴って搬送される感熱ロール紙22の搬送量が、第1距離となったか否かを監視する(ステップSA15)。
なお、次回印刷制御データの分析とは、ステップSA3、SA4で説明した分析であり、制御部50は、分析結果に基づいて、図6のフローチャート同様の処理を行う。
つまり、本実施形態では、第1距離の搬送と並行して、次回印刷制御データに基づく次のレシートの印刷が実行される。
If it is determined in step SA5 that the next print control data is stored next to the target print control data (step SA5: YES), the control unit 50 determines whether the reading and execution of the final print instruction command CQ has been completed. In step SA12, the control commands of the target print control data are sequentially read from the buffer 56 and executed (step SA11).
When the reading and execution of the final print instruction command CQ are completed (step SA12: YES), the control unit 50 determines all the line feed instruction commands LFT for conveyance that are determined to be between the final print instruction command CQ and the cutting instruction command SC. Is discarded (step SA13).
Next, the control unit 50 analyzes the next print control data, reads out and executes the control command for the next print control data (step SA14). The thermal roll paper 22 is conveyed in the conveyance direction Y1 with the execution of the control command for the next print control data. During the execution of the control command for the next print control data, the control unit 50 monitors whether or not the transport amount of the thermal roll paper 22 transported along with the execution of the control command has reached the first distance (step SA15). ).
The next print control data analysis is the analysis described in steps SA3 and SA4, and the control unit 50 performs the same processing as the flowchart of FIG. 6 based on the analysis result.
That is, in the present embodiment, in parallel with the conveyance of the first distance, the next receipt is printed based on the next print control data.

第1距離の搬送が完了した場合(ステップSA15:YES)、制御部50は、カッターユニット25を制御して、感熱ロール紙22を切断する(ステップSA16)。
なお、画像の印刷の途中に感熱ロール紙22の切断が行われた場合、当該画像に白スジが発生する可能性がある。これを踏まえ、以下の構成であってもよい。制御部50は、対象印刷制御データ、及び、次回印刷制御データを分析する。制御部50は、分析結果に基づいて第1距離を調整し、切断が、次回印刷制御データにおける1の印刷指示コマンドCMの実行後、次の印刷指示コマンドCMの実行前に行われるようにする。これにより、白スジを抑制できる。
このように、第1距離の搬送中に、次回印刷制御データに基づく印刷を実行することにより、次回印刷制御データの最初の印刷指示コマンドCMに基づく画像と、次回印刷制御データに係るレシート10の先端10aとの間に形成される余白(いわゆるトップマージン)を縮小でき、より効果的に感熱ロール紙22の無駄な消費を抑制できる。
When the conveyance of the first distance is completed (step SA15: YES), the control unit 50 controls the cutter unit 25 to cut the thermal roll paper 22 (step SA16).
If the thermal roll paper 22 is cut during image printing, white stripes may occur in the image. Based on this, the following configuration may be used. The control unit 50 analyzes the target print control data and the next print control data. The control unit 50 adjusts the first distance based on the analysis result so that cutting is performed after execution of the first print instruction command CM in the next print control data and before execution of the next print instruction command CM. . Thereby, white stripes can be suppressed.
As described above, by executing printing based on the next print control data during the conveyance of the first distance, the image based on the first print instruction command CM of the next print control data and the receipt 10 related to the next print control data are displayed. A margin (so-called top margin) formed between the leading end 10a can be reduced, and wasteful consumption of the thermal roll paper 22 can be suppressed more effectively.

以上説明したように、本実施形態に係るプリンター2の制御部50は、バッファー56に格納された印刷制御データを分析し、印刷制御データに含まれる印刷指示コマンドCMのうちの最後の印刷指示コマンドCMである最終印刷指示コマンドCQと、切断指示コマンドSCとの間にある改行指示コマンドLF(搬送用改行指示コマンドLFT)を判別し、最終印刷指示コマンドCQを読み出して実行した後、搬送用改行指示コマンドLFTを読み捨て、位置T1(印刷ヘッド24)と位置T2(カッターユニット25(切断部))との離間距離に対応する距離、感熱ロール紙22を搬送させた後、カッターユニット25に感熱ロール紙22を切断させる。
この構成よれば、感熱ロール紙22は、最終印刷指示コマンドCQに基づく画像の印刷の実行後、位置T1と位置T2との離間距離に対応する距離だけ搬送されて切断されることとなり、無駄な余白が生じず、感熱ロール紙22の無駄な消費を抑制できる。
As described above, the control unit 50 of the printer 2 according to the present embodiment analyzes the print control data stored in the buffer 56, and the last print instruction command of the print instruction commands CM included in the print control data. A line feed instruction command LF (conveyance line feed instruction command LFT) between the final print instruction command CQ, which is a CM, and a cutting instruction command SC is discriminated, the final print instruction command CQ is read and executed, and then a line feed for conveyance is performed. The instruction command LFT is discarded, and the thermal roll paper 22 is conveyed by a distance corresponding to the separation distance between the position T1 (print head 24) and the position T2 (cutter unit 25 (cutting unit)), and then the thermal roll is sent to the cutter unit 25. The paper 22 is cut.
According to this configuration, the thermal roll paper 22 is transported and cut by a distance corresponding to the separation distance between the position T1 and the position T2 after printing of the image based on the final print instruction command CQ, which is useless. There is no blank space, and wasteful consumption of the heat-sensitive roll paper 22 can be suppressed.

また、本実施形態では、制御部50は、最終印刷指示コマンドCQを読み出して実行し、搬送用改行指示コマンドLFTを読み捨て、バッファー56に格納された次回印刷制御データに含まれる印刷指示コマンドCMに基づいて印刷ヘッド24に印刷させつつ、位置T1と位置T2との離間距離に対応する距離、感熱ロール紙22を搬送させた後、カッターユニット25に感熱ロール紙22を切断させる。
この構成によれば、最終印刷指示コマンドCQに基づく画像の印刷後の搬送中に、バッファー56に格納された次回印刷制御データに基づく画像の印刷が実行されるため、次回印刷制御データにおける余白の発生を抑制でき、より効果的に感熱ロール紙22の無駄な消費を抑制できる。
In the present embodiment, the control unit 50 reads and executes the final print instruction command CQ, discards the line feed instruction command LFT for conveyance, and sets the print instruction command CM included in the next print control data stored in the buffer 56. The thermal roll paper 22 is transported by a distance corresponding to the separation distance between the position T1 and the position T2 while printing is performed on the print head 24, and then the thermal roll paper 22 is cut by the cutter unit 25.
According to this configuration, the printing of the image based on the next printing control data stored in the buffer 56 is executed during the conveyance after the printing of the image based on the final printing instruction command CQ. Generation | occurrence | production can be suppressed and the useless consumption of the thermal roll paper 22 can be suppressed more effectively.

また、本実施形態では、制御部50は、第一距離の搬送、及び、次の印刷制御データに基づく印刷の実行中、第1距離の搬送が完了したか否かを監視し、第1距離の搬送が完了した場合、感熱ロール紙22を切断させる。
本発明の構成によれば、プリンター2は、第1距離の搬送中に次の印刷制御データに基づく印刷を実行して記録媒体の無駄な消費を抑制した上で、1の印刷制御データに基づいて印刷される画像と、当該1の印刷制御データの次の印刷制御データに基づいて印刷される画像との間で、感熱ロール紙22を切断できる。
次の印刷制御データに基づく印刷の前に所定のマージンを形成する構成であってもよい。
In the present embodiment, the control unit 50 monitors whether the first distance conveyance is completed during the first distance conveyance and the printing based on the next print control data. Is completed, the thermal roll paper 22 is cut.
According to the configuration of the present invention, the printer 2 executes printing based on the next print control data during conveyance of the first distance to suppress wasteful consumption of the recording medium, and then based on the one print control data. The thermal roll paper 22 can be cut between the image printed in this manner and the image printed based on the print control data next to the one print control data.
A configuration may be employed in which a predetermined margin is formed before printing based on the next print control data.

なお、上述した実施の形態は、あくまでも本発明の一態様を示すものであり、本発明の範囲内で任意に変形および応用が可能である。
例えば、図3に示す各機能部はハードウェアとソフトウェアの協働により任意に実現可能であり、特定のハードウェア構成を示唆するものではない。
また、上記のフローチャートの各ステップを実行するプログラムを、プリンター2の外部の記憶媒体に記憶させたものを読み出して、制御部50により実行させることもできる。
The above-described embodiment is merely an aspect of the present invention, and can be arbitrarily modified and applied within the scope of the present invention.
For example, each functional unit shown in FIG. 3 can be arbitrarily realized by cooperation of hardware and software, and does not suggest a specific hardware configuration.
In addition, a program that executes each step of the above-described flowchart can be read out and stored in a storage medium external to the printer 2 and executed by the control unit 50.

2…プリンター(印刷装置)、3…ホストコンピューター(制御装置)、23…プラテン(搬送部)、24…印刷ヘッド、25…カッターユニット(切断部)、26…搬送モーター(搬送部)、50…制御部、55…インターフェース部(受信部)、56…バッファー。   DESCRIPTION OF SYMBOLS 2 ... Printer (printing apparatus), 3 ... Host computer (control apparatus), 23 ... Platen (conveyance part), 24 ... Print head, 25 ... Cutter unit (cutting part), 26 ... Conveyance motor (conveyance part), 50 ... Control unit, 55... Interface unit (reception unit), 56... Buffer.

Claims (6)

制御装置に通信可能な印刷装置であって、
記録媒体を搬送方向に搬送する搬送部と、
前記記録媒体に印刷する印刷ヘッドと、
前記印刷ヘッドの前記搬送方向の下流に設けられ、前記記録媒体を切断する切断部と、
印刷を指示する印刷指示コマンド、改行を指示する改行指示コマンド、及び、前記記録媒体の切断を指示する切断指示コマンドを含む印刷制御データを前記制御装置から受信し、受信した前記印刷制御データをバッファーに格納する受信部と、
前記受信部により前記バッファーに格納された前記印刷制御データを分析し、前記印刷制御データに含まれる前記印刷指示コマンドのうちの最後の前記印刷指示コマンドである最終印刷指示コマンドと前記切断指示コマンドとの間にある前記改行指示コマンドを判別し、前記最終印刷指示コマンドを読み出して実行した後、前記最終印刷指示コマンドと前記切断指示コマンドとの間にあると判別した前記改行指示コマンドを読み捨て、前記印刷ヘッドと前記切断部との離間距離に対応する第1距離、前記搬送部に前記記録媒体を搬送させた後、前記切断部に前記記録媒体を切断させる制御部と、
を備えることを特徴とする印刷装置。
A printing device capable of communicating with a control device,
A transport unit for transporting the recording medium in the transport direction;
A print head for printing on the recording medium;
A cutting unit that is provided downstream of the print head in the transport direction and cuts the recording medium;
Print control data including a print instruction command for instructing printing, a line feed instruction command for instructing line feed, and a cutting instruction command for instructing cutting of the recording medium are received from the control device, and the received print control data is buffered. Receiving unit to store in,
Analyzing the print control data stored in the buffer by the receiving unit, and a final print instruction command that is the last print instruction command of the print instruction commands included in the print control data, and the cutting instruction command; The line feed instruction command between the final print instruction command and the cutting instruction command is read and discarded, after the line feed instruction command between the final print instruction command and the cutting instruction command is read out and executed. A first distance corresponding to a separation distance between a print head and the cutting unit; a control unit that causes the cutting unit to cut the recording medium after the recording unit transports the recording medium;
A printing apparatus comprising:
前記制御部は、
前記最終印刷指示コマンドを読み出して実行し、前記最終印刷指示コマンドと前記切断指示コマンドとの間にある前記改行指示コマンドを読み捨て、前記バッファーに格納された次の前記印刷制御データに含まれる前記印刷指示コマンドに基づいて前記印刷ヘッドに印刷させつつ、前記第1距離、前記搬送部に前記記録媒体を搬送させた後、前記切断部に前記記録媒体を切断させることを特徴とする請求項1に記載の印刷装置。
The controller is
The final print instruction command is read and executed, the line feed instruction command between the final print instruction command and the cutting instruction command is discarded, and the print control data included in the next print control data stored in the buffer is discarded. 2. The printing apparatus according to claim 1, wherein the print head is caused to print based on an instruction command, and the recording medium is transported to the transport unit by the first distance, and then the recording medium is cut by the cutting unit. The printing apparatus as described.
前記制御部は、
前記第一距離の搬送、及び、前記次の印刷制御データに基づく印刷の実行中、前記第1距離の搬送が完了したか否かを監視し、前記第1距離の搬送が完了した場合、前記切断部に前記記録媒体を切断させることを特徴とする請求項2に記載の印刷装置。
The controller is
During the execution of printing based on the first distance and the next print control data, it is monitored whether or not the first distance has been transferred, and when the first distance has been transferred, The printing apparatus according to claim 2, wherein a cutting unit cuts the recording medium.
制御装置に通信可能に構成され、記録媒体を搬送方向に搬送する搬送部と、前記記録媒体に印刷する印刷ヘッドと、前記印刷ヘッドの前記搬送方向の下流に設けられ、前記記録媒体を切断する切断部と、を備える印刷装置の制御方法であって、
印刷を指示する印刷指示コマンド、改行を指示する改行指示コマンド、及び、前記記録媒体の切断を指示する切断指示コマンドを含む印刷制御データを前記制御装置から受信し、受信した前記印刷制御データをバッファーに格納し、前記バッファーに格納された前記印刷制御データを分析し、前記印刷制御データに含まれる前記印刷指示コマンドのうちの最後の前記印刷指示コマンドである最終印刷指示コマンドと前記切断指示コマンドとの間にある前記改行指示コマンドを判別し、前記最終印刷指示コマンドを読み出して実行した後、前記最終印刷指示コマンドと前記切断指示コマンドとの間にあると判別した前記改行指示コマンドを読み捨て、前記印刷ヘッドと前記切断部との離間距離に対応する第1距離、前記搬送部に前記記録媒体を搬送させた後、前記切断部に前記記録媒体を切断させることを特徴とする印刷装置の制御方法。
It is configured to be communicable with the control device, and is provided in a transport unit that transports the recording medium in the transport direction, a print head that prints on the recording medium, and a downstream of the print head in the transport direction, and cuts the recording medium A control method of a printing apparatus comprising a cutting unit,
Print control data including a print instruction command for instructing printing, a line feed instruction command for instructing line feed, and a cutting instruction command for instructing cutting of the recording medium are received from the control device, and the received print control data is buffered. And analyzing the print control data stored in the buffer, a final print instruction command that is the last print instruction command of the print instruction commands included in the print control data, and the cutting instruction command, The line feed instruction command between the final print instruction command and the cutting instruction command is read and discarded, after the line feed instruction command between the final print instruction command and the cutting instruction command is read out and executed. A first distance corresponding to a separation distance between the print head and the cutting unit; After delivery, the control method for a printing apparatus, characterized in that for cutting the recording medium to the cutting unit.
前記最終印刷指示コマンドを読み出して実行し、前記最終印刷指示コマンドと前記切断指示コマンドとの間にある前記改行指示コマンドを読み捨て、前記受信バッファーに格納された次の前記印刷制御データに含まれる前記印刷指示コマンドに基づいて前記印刷ヘッドに印刷させつつ、前記第1距離、前記搬送部に前記記録媒体を搬送させた後、前記切断部に前記記録媒体を切断させることを特徴とする請求項4に記載の印刷装置の制御方法。   The final print instruction command is read and executed, and the line feed instruction command between the final print instruction command and the cutting instruction command is discarded and included in the next print control data stored in the reception buffer. 5. The printing head is caused to print based on a print instruction command, and the recording medium is transported to the transport unit by the first distance, and then the recording medium is cut by the cutting unit. A control method for a printing apparatus according to claim 1. 前記第一距離の搬送、及び、前記次の印刷制御データに基づく印刷の実行中、前記第1距離の搬送が完了したか否かを監視し、前記第1距離の搬送が完了した場合、前記切断部に前記記録媒体を切断させることを特徴とする請求項5に記載の印刷装置の制御方法。   During the execution of printing based on the first distance and the next print control data, it is monitored whether or not the first distance has been transferred, and when the first distance has been transferred, The method for controlling a printing apparatus according to claim 5, wherein the recording unit is caused to cut the recording medium.
JP2014068251A 2014-03-28 2014-03-28 Printer and control method of the same Pending JP2015189104A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014068251A JP2015189104A (en) 2014-03-28 2014-03-28 Printer and control method of the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014068251A JP2015189104A (en) 2014-03-28 2014-03-28 Printer and control method of the same

Publications (1)

Publication Number Publication Date
JP2015189104A true JP2015189104A (en) 2015-11-02

Family

ID=54424044

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014068251A Pending JP2015189104A (en) 2014-03-28 2014-03-28 Printer and control method of the same

Country Status (1)

Country Link
JP (1) JP2015189104A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017159553A (en) * 2016-03-09 2017-09-14 シチズン時計株式会社 Sheet falling prevention auxiliary unit and printer
US10046577B2 (en) 2016-06-01 2018-08-14 Seiko Epson Corporation Printing device, printing system, and control method of a printing device
JP7488762B2 (en) 2020-12-25 2024-05-22 シチズン時計株式会社 Line printer and method for controlling the line printer

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017159553A (en) * 2016-03-09 2017-09-14 シチズン時計株式会社 Sheet falling prevention auxiliary unit and printer
US10046577B2 (en) 2016-06-01 2018-08-14 Seiko Epson Corporation Printing device, printing system, and control method of a printing device
JP7488762B2 (en) 2020-12-25 2024-05-22 シチズン時計株式会社 Line printer and method for controlling the line printer

Similar Documents

Publication Publication Date Title
JP5810609B2 (en) RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
JP5909871B2 (en) Recording device
JP2015189104A (en) Printer and control method of the same
US9058133B2 (en) Control device, control method for a control device, and recording medium
CN104871125B (en) Receipt printing system, the control method and POS terminal of receipt printing system
US10046577B2 (en) Printing device, printing system, and control method of a printing device
JP5862045B2 (en) RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
JP6056196B2 (en) Medium processing apparatus and POS system
JP2012113608A (en) Control device, recording system, control method of control device, and program
JP2011098440A (en) Recorder, control method for recorder, and program
JP5810616B2 (en) RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
JP5760705B2 (en) RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
JP6756218B2 (en) Printing device and control method of printing device
JP6003265B2 (en) CONTROL DEVICE, CONTROL DEVICE CONTROL METHOD, AND PROGRAM
JP2006079396A (en) Print control apparatus, registered print data registration method for print control apparatus, program, and printing apparatus
JP6127638B2 (en) Printing apparatus, printing apparatus control method, and program
JP5924126B2 (en) Medium processing apparatus and POS system
JP2013257805A (en) Control device, control method of control device, and program
JP6587146B2 (en) Printer
JP2012101391A (en) Recording apparatus, method for controlling the same, and program
JP6019749B2 (en) Medium processing apparatus and POS system
JP2011183699A (en) Printer and control method thereof
JP2017056561A (en) Recording device and control method for the same
JP2014054846A (en) Control device, control method for control device, and program
JP2006007523A (en) Printing apparatus, program, and printing method

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20160617

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20160628