[go: up one dir, main page]

JP5810616B2 - RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM - Google Patents

RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM Download PDF

Info

Publication number
JP5810616B2
JP5810616B2 JP2011104598A JP2011104598A JP5810616B2 JP 5810616 B2 JP5810616 B2 JP 5810616B2 JP 2011104598 A JP2011104598 A JP 2011104598A JP 2011104598 A JP2011104598 A JP 2011104598A JP 5810616 B2 JP5810616 B2 JP 5810616B2
Authority
JP
Japan
Prior art keywords
recording
image
command
instruction command
line feed
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
JP2011104598A
Other languages
Japanese (ja)
Other versions
JP2012232562A (en
JP2012232562A5 (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.)
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 JP2011104598A priority Critical patent/JP5810616B2/en
Publication of JP2012232562A publication Critical patent/JP2012232562A/en
Publication of JP2012232562A5 publication Critical patent/JP2012232562A5/ja
Application granted granted Critical
Publication of JP5810616B2 publication Critical patent/JP5810616B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)
  • Record Information Processing For Printing (AREA)
  • Printers Characterized By Their Purpose (AREA)

Description

本発明は、制御装置に接続可能な記録装置、記録装置の制御方法、及び、プログラムに関する。   The present invention relates to a recording apparatus connectable to a control apparatus, a control method for the recording apparatus, and a program.

従来、制御装置(ホストPC)と、記録装置(プリンター)とが通信可能に接続され、制御装置の制御の下、記録装置が記録媒体への記録を行うシステムが知られている(例えば、特許文献1参照)。
この種のシステムでは、記録媒体への画像の記録に際し、制御装置が記録装置に記録データを送信し、記録装置は記録データに基づいて記録媒体に画像を記録する。記録データに改行コマンドが含まれている場合、記録装置は、改行コマンドに基づいて、適宜、改行を行う。
2. Description of the Related Art Conventionally, a system is known in which a control device (host PC) and a recording device (printer) are communicably connected, and the recording device performs recording on a recording medium under the control of the control device (for example, patents). Reference 1).
In this type of system, when recording an image on a recording medium, the control device transmits recording data to the recording device, and the recording device records an image on the recording medium based on the recording data. When the record data includes a line feed command, the recording apparatus appropriately performs a line feed based on the line feed command.

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

ところで、記録媒体に記録される画像のレイアウトや、バランスを変更するため、改行の態様の変更が求められることがある。
しかしながら、上述したシステムにおいて、改行の態様を変更するためには、制御装置から送信する記録データにおける改行コマンドの態様を変更する必要があった。この場合、制御装置に対して、プログラム修正等の改変を行う必要があるが、制御装置に対する改変は、相当な煩雑な作業を伴う場合があったり、また、記録装置と制御装置との開発の主体が異なる等の理由により制御装置に改変を行えない場合があったりする等の理由のため、できるだけ避けたいとするニーズがあった。
本発明は、上述した事情に鑑みてなされたものであり、制御装置から記録装置に送信する記録データを変更することなく、所望の改行を行えるようにすることを目的とする。
By the way, in order to change the layout and balance of the image recorded on the recording medium, it is sometimes required to change the line feed mode.
However, in the system described above, in order to change the line feed mode, it is necessary to change the line feed command mode in the recording data transmitted from the control device. In this case, it is necessary to modify the control device such as program correction. However, the modification to the control device may involve considerable troublesome work, or development of the recording device and the control device. There is a need to avoid as much as possible because the control device may not be modified due to reasons such as different main bodies.
The present invention has been made in view of the above-described circumstances, and an object thereof is to enable a desired line feed without changing recording data transmitted from a control device to a recording device.

上記目的を達成するために、本発明は、制御装置に接続可能な記録装置であって、記録ヘッドと、記録媒体を搬送する搬送部と、前記制御装置から、画像の記録を指示する画像記録指示コマンドと、改行を指示する改行コマンドとを少なくとも含んで構成される記録データとを受信する受信部と、受信した前記記録データに基づいて、前記記録ヘッド、及び、前記搬送部を制御して、前記記録媒体への記録を行う記録制御部と、を備え、前記記録制御部は、所定の条件を満たす前記改行コマンドを読み捨て、所定の規則に従って改行を行うことを特徴とする。
この構成によれば、記録データに含まれる改行コマンドが読み捨てられた上で、改行コマンドに基づく改行に代えて、所定の規則に従って、自動で、改行が行われることとなり、制御装置から記録装置に送信する記録データを変更することなく、所望の改行が行われるようにすることが可能となる。
To achieve the above object, the present invention is a recording device connectable to the controller, and instructs the recording head, and a transport unit for feeding transportable recording medium, from the control device, the recording of images A receiving unit that receives an image recording instruction command and recording data that includes at least a line feed command that instructs a line feed, and controls the recording head and the transport unit based on the received recording data And a recording control unit that performs recording on the recording medium, wherein the recording control unit reads and discards the line feed command that satisfies a predetermined condition, and performs a line feed according to a predetermined rule.
According to this configuration, after a line feed command included in the recording data is discarded, a line feed is automatically performed according to a predetermined rule instead of a line feed based on the line feed command. It is possible to perform a desired line feed without changing the recording data to be transmitted.

また、上記発明の記録装置であって、本発明は、前記記録制御部は、前記画像記録指示コマンドに基づく画像の記録前、又は、記録後、前記改行コマンドを読み捨て、当該画像記録指示コマンドに指定される画像の種類に対応した改行を行うことを特徴とする。
この構成によれば、画像記録指示コマンド、及び、当該画像記録指示コマンドに基づく画像の記録後の改行を指示する改行コマンドについて、当該画像記録指示コマンドに基づく画像の記録後、当該改行コマンドを読み捨て、当該画像記録指示コマンドに係る画像の属性に対応した改行を行うため、制御装置から記録装置の送信する記録データの内容を変更することなく、画像を記録した後、画像の属性に対応した適切な改行が行われるようにすることが可能となる。
Further, in the recording apparatus according to the invention, the recording control unit reads the line feed command before or after recording an image based on the image recording instruction command, and discards the line feed command as the image recording instruction command. and performing line feed corresponding to the type of the designated Ru image.
According to this configuration, for an image recording instruction command and a line feed command for instructing a line feed after recording an image based on the image recording instruction command, the line feed command is discarded after recording an image based on the image recording instruction command. In order to perform a line feed corresponding to the image attribute related to the image recording instruction command, after recording the image without changing the content of the recording data transmitted from the control device to the recording device, it is appropriate to correspond to the image attribute. It is possible to make a new line break.

また、上記発明の記録装置であって、本発明は、前記画像記録指示コマンドは、文字列と、グラフィックと、バーコードと3つの種類に係る画像の情報のいずれか一つを少なくとも指定可能であることを特徴とする。
この構成によれば、文字列に係る画像を記録した後、グラフィックに係る画像を記録した後、及び、バーコードに係る画像を記録した後のいずれの場合も、それぞれの画像の種類に応じて適切に改行を行うことが可能となる。
In the recording apparatus according to the invention, the image recording instruction command can specify at least one of character information, graphics, barcode, and image information of three types. It is characterized by being.
According to this configuration, after recording an image related to a character string, after recording an image related to a graphic, and after recording an image related to a barcode, depending on the type of each image Appropriate line breaks can be made.

また、上記発明の記録装置であって、本発明は、前記記録制御部は、一の画像記録指示コマンド、及び、当該一の画像記録指示コマンドの次に実行すべき次の画像記録指示コマンドについて、前記一の画像記録指示コマンドに係る画像と、前記次の画像記録指示コマンドに係る画像との間が、所定の条件を満たす区切りに該当する場合は、前記一の画像記録指示コマンドと前記次の画像記録指示コマンドの間に存在する前記改行コマンドを読み捨て、前記一の画像記録指示コマンドの実行後、前記次の画像記録指示コマンドの実行前に、当該区切りに対応した改行を行うことを特徴とする。
この構成によれば、一の画像記録指示コマンドに係る画像と、次の画像記録指示コマンドに係る画像との間が、所定の条件を満たす区切りに該当する場合は、これら画像記録指示コマンドの間に存在する改行コマンドを読み捨てて、当該一の画像記録指示コマンドの実行後、当該次の画像記録指示コマンドの実行前に、当該区切りに対応した改行を行うため、制御装置から記録装置の送信する記録データの内容を変更することなく、区切りに対応した適切な改行が行われるようにすることが可能となる。
Further, in the recording apparatus according to the above invention, the present invention provides the recording control unit for one image recording instruction command and a next image recording instruction command to be executed next to the one image recording instruction command. When the image according to the one image recording instruction command and the image according to the next image recording instruction command fall under a boundary satisfying a predetermined condition, the one image recording instruction command and the next image recording instruction command The line feed command existing between the image recording instruction commands is discarded, and after the execution of the first image recording instruction command, the line feed corresponding to the delimiter is performed before the execution of the next image recording instruction command. And
According to this configuration, when an interval between an image related to one image recording instruction command and an image related to the next image recording instruction command falls within a boundary satisfying a predetermined condition, the interval between these image recording instruction commands Is sent to the recording device from the control device to perform a line feed corresponding to the break after the execution of the one image recording instruction command and before the execution of the next image recording instruction command. An appropriate line feed corresponding to the delimiter can be performed without changing the contents of the recording data.

また、上記発明の記録装置であって、本発明は、前記区切りごとに、各区切りに対応して行うべき改行の態様が予め定められていることを特徴とする。
この構成によれば、各区切りについて、事前に指定された適切な態様で改行を行うことが可能となる。
In the recording apparatus according to the invention described above, the present invention is characterized in that, for each of the delimiters, a line feed mode to be performed corresponding to each delimiter is predetermined.
According to this configuration, it is possible to perform a line break in an appropriate manner designated in advance for each delimiter.

また、上記目的を達成するために、本発明は、制御装置に接続可能であり、記録ヘッドと、記録媒体を搬送する搬送部と、を備えた記録装置の制御方法であって、前記制御装置から、画像の記録を指示する画像記録指示コマンドと、改行を指示する改行コマンドとを少なくとも含んで構成される記録データを受信し、受信した前記記録データに基づいて、所定の条件を満たす前記改行コマンドを読み捨て、所定の規則に従って改行を行い、前記記録ヘッド、及び、前記搬送部を制御して前記記録媒体への記録を行うことを特徴とする。
この制御方法によれば、記録データに含まれる改行コマンドが読み捨てられた上で、改行コマンドに基づく改行に代えて、所定の規則に従って、自動で、改行が行われることとなり、制御装置から記録装置に送信する記録データを変更することなく、所望の改行が行われるようにすることが可能となる。
In order to achieve the above object, the present invention can be connected to the control device, a recording head, a method of controlling a recording apparatus and a transport unit for feeding transportable recording medium, the control from the device, and the image recording instruction command for instructing recording of images, receives recording data configured to include at least a line feed command for instructing line feed, based on the recording data received, a predetermined condition is satisfied The line feed command is discarded, line feed is performed according to a predetermined rule, and recording on the recording medium is performed by controlling the recording head and the transport unit.
According to this control method, after a line feed command included in the recording data is discarded, a line feed is automatically performed according to a predetermined rule instead of a line feed based on the line feed command. It is possible to perform a desired line feed without changing the recording data to be transmitted.

また、上記目的を達成するために、本発明は、制御装置に接続可能であり、記録ヘッドと、記録媒体を搬送する搬送部と、前記制御装置から、画像の記録を指示する画像記録指示コマンドと、改行を指示する改行コマンドとを少なくとも含んで構成される記録データを受信する受信部と、を備える記録装置の各部を制御する制御部により実行されるプログラムであって、前記制御部を、受信した前記記録データに基づいて、前記記録ヘッド、及び、前記搬送部を制御して、前記記録媒体への記録を行い、所定の条件を満たす前記改行コマンドを読み捨て、所定の規則に従って改行を行う記録制御部として機能させることを特徴とする。
このプログラムを実行すれば、記録データに含まれる改行コマンドが読み捨てられた上で、改行コマンドに基づく改行に代えて、所定の規則に従って、自動で、改行が行われることとなり、制御装置から記録装置に送信する記録データを変更することなく、所望の改行が行われるようにすることが可能となる。
In order to achieve the above object, the present invention can be connected to the control device, and the recording head, and a transport unit for feeding transportable recording medium, from the control device, the image recording for instructing recording of images A program that is executed by a control unit that controls each unit of a recording apparatus, the receiving unit receiving reception data configured to include at least an instruction command and a line feed command for instructing a line feed, the control unit On the basis of the received recording data, the recording head and the transport unit are controlled to perform recording on the recording medium, and the line feed command satisfying a predetermined condition is discarded and a line feed is performed according to a predetermined rule. It is made to function as a recording control part which performs.
If this program is executed, the line feed command included in the recording data is discarded and the line feed is automatically performed according to a predetermined rule instead of the line feed based on the line feed command. It is possible to perform a desired line feed without changing the recording data to be transmitted.

本発明によれば、制御装置から記録装置に送信する記録データを変更することなく、所望の改行を行えるようになる。   According to the present invention, a desired line feed can be performed without changing the recording data transmitted from the control device to the recording device.

第1実施形態に係るPOS端末の概略構成を示す図である。It is a figure which shows schematic structure of the POS terminal which concerns on 1st Embodiment. プリンター本体内部の構成を模式的に示す図である。FIG. 2 is a diagram schematically illustrating an internal configuration of a printer main body. POS端末の機能的構成を示すブロック図である。It is a block diagram which shows the functional structure of a POS terminal. 記録データ、及び、レシートを模式的に示す図である。It is a figure which shows recording data and a receipt typically. レシートを示す図である。It is a figure which shows a receipt. プリンターの動作を示すフローチャートである。3 is a flowchart illustrating an operation of a printer. 規則テーブルのデータ構造を示す図である。It is a figure which shows the data structure of a rule table. 第2実施形態に係るレシートを示す図である。It is a figure which shows the receipt which concerns on 2nd Embodiment. POS端末の機能的構成を示すブロック図である。It is a block diagram which shows the functional structure of a POS terminal. プリンターの動作を示すフローチャートである。3 is a flowchart illustrating an operation of a printer. 区切りテーブルのデータ構造を示す図である。It is a figure which shows the data structure of a division | segmentation table.

以下、図面を参照して本発明の実施形態について説明する。
<第1実施形態>
図1は、本発明を適用した実施形態に係るPOS端末1の概略構成を示す図である。
また、図2は、POS端末1が備えるプリンター2(記録装置)の本体内部の構成を模式的に示す図である。
図1に示す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.
<First Embodiment>
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 the internal configuration of the printer 2 (recording apparatus) included in the POS terminal 1.
A POS terminal 1 shown in FIG. 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 is a host computer 3 (control) that performs sales registration processing and settlement processing. Device) and a printer 2 which 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. Control information is generated, and a control command for causing 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 a control command 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の記録面にドットを形成することにより、画像を記録するサーマルラインプリンターである。後述する制御部50や、搬送モーター26、プラテン23等が協働して搬送部として機能する。
画像が記録された感熱ロール紙22は、本体20の上面に形成された排紙口28から外に向けて搬送され、この排紙口28よりも搬送方向Y1上流側でカッターユニット25により切断され、レシート10となる。
As shown in FIGS. 1 and 2, the printer 2 as a recording apparatus accommodates a thermal roll paper 22 as a recording medium in a main body 20 and transports the thermal roll paper 22 with a roller-shaped platen 23 (conveying unit). ), A recording 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 (FIG. 3), rotates the platen 23, and conveys the thermal roll paper 22 in the conveyance direction Y1, while the thermal roll is provided by the recording head 24 in which the heating elements are arranged. The thermal line printer records an image by applying heat to the recording surface of the paper 22 and forming dots on the recording surface of the thermal roll paper 22. A control unit 50, a conveyance motor 26, a platen 23, and the like, which will be described later, function as a conveyance unit in cooperation.
The thermal roll paper 22 on which the image is recorded 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が設けられている。
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.

図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と、インターフェイス部(I/F)55と、を備えている。
制御部50は、プリンター2の各部を中枢的に制御するものであり、上述したホスト側制御部40と同様、CPUや、ROM、RAM、その他の周辺回路等を備えている。
プリントエンジン51は、制御部50が備える記録制御部60の制御の下、記録ヘッド24や、搬送モーター26、カッター駆動モーター32等を動作させて、感熱ロール紙22に画像を記録し、画像を記録した感熱ロール紙22を切断することによりレシート10を発行する。この記録制御部60の機能は、CPUや、ファームウェアとのプログラムを読み出して実行する等、ハードウェアとソフトウェアとの協働により実現される。
入力部52は、電源スイッチ37、及び、紙送りスイッチ38に接続され、これら操作スイッチに対する操作を検出し、制御部50に出力する。
表示部53は、制御部50の制御の下、LED39に駆動信号を出力し、所定の態様でLED39を点灯/消灯させる。
記憶部54は、EEPROMや、ハードディスク等の不揮発性メモリーを備え、各種データを書き換え可能に、不揮発的に記憶する。記憶部54に記憶される各データについては、後述する。
インターフェイス部55は、ホストコンピューター3との間で、通信規格に準拠した通信を行う。このインターフェイス部55と、制御部50とが協働して、ホストコンピューター3から制御コマンドを受信する受信部として機能する。
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 (I / F) 55.
The control unit 50 centrally 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.
The print engine 51 operates the recording head 24, the conveyance motor 26, the cutter driving motor 32, and the like under the control of the recording control unit 60 included in the control unit 50, and records an image on the thermal roll paper 22, and the image is recorded. The receipt 10 is issued by cutting the recorded thermal roll paper 22. The function of the recording control unit 60 is realized by cooperation of hardware and software, such as reading and executing a program with a CPU and firmware.
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 55 performs communication based on the communication standard with the host computer 3. The interface unit 55 and the control unit 50 cooperate to function as a receiving unit that receives a control command from the host computer 3.

次いで、POSアプリケーション実行部40a、及び、プリンタードライバー実行部40bの説明を通して、1つのレシート10を発行する際のPOS端末1の基本的な動作について説明する。
POSアプリケーション実行部40aは、ホストコンピューター3に予めインストールされたPOSアプリケーションを実行することにより、取引毎に、POSサーバー16にアクセスして必要な情報を取得した上で、購入された商品を示す情報や、商品の単価を示す情報、合計購入金額を示す情報等のレシート10(図4(B))に記載すべき情報を取得し、取得した情報に基づいて、レシート10に記録すべき画像の情報を含む印刷データを生成し、プリンタードライバー実行部40bに出力する。
プリンタードライバー実行部40bは、ホストコンピューター3に予めインストールされたプリンタードライバーを実行することにより、POSアプリケーション実行部40aから入力された印刷データに基づいて、プリンター2のコマンド仕様に対応した制御コマンドを生成し、プリンター2に出力する。
制御コマンドとは、プリンター2にレシート10の発行に係る各種動作を行わせるためのコマンド群のことであり、所定の搬送量だけ感熱ロール紙22の搬送を指示する搬送指示コマンドHCや、カッターユニット25によるによる切断を指示する切断指示コマンドSCのほか、記録データ80が含まれている。
記録データ80(図4(A))とは、感熱ロール紙22に記録すべき画像の情報、具体的には、記録すべき画像の内容(文字列や、所定のグラフィック、バーコード等)や、その順序を具体的に指定し、記録させる情報のことである。この記録データ80の具体的な態様については、後に詳述する。
ホストコンピューター3からプリンター2に出力された制御コマンドは、順次、受信バッファー56に格納される。プリンター2の制御部50の記録制御部60は、受信バッファー56に格納された制御コマンドを、順次、読み出して実行することにより、プリントエンジン51を制御して、レシート10の発行に係る各種動作を実行する。特に、記録制御部60は、記録データ80に基づいてプリントエンジン51を制御することにより、感熱ロール紙22への所定の画像の記録、及び、画像の記録に伴う必要な搬送を行う。
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. Information that should be described in the receipt 10 (FIG. 4B) such as information indicating the unit price of the product and information indicating the total purchase price, and based on the acquired information, the image to be recorded on the receipt 10 Print data including information is generated and output to the printer driver execution unit 40b.
The printer driver execution unit 40b generates a control command corresponding to the command specification of the printer 2 based on the print data input from the POS application execution unit 40a by executing a printer driver installed in the host computer 3 in advance. And output to the printer 2.
The control command is a group of commands for causing the printer 2 to perform various operations related to issuance of the receipt 10, and includes a conveyance instruction command HC that instructs conveyance of the thermal roll paper 22 by a predetermined conveyance amount, and a cutter unit. In addition to the cutting instruction command SC for instructing cutting by 25, recording data 80 is included.
The recording data 80 (FIG. 4A) is information on the image to be recorded on the thermal roll paper 22, specifically, the content of the image to be recorded (character string, predetermined graphic, barcode, etc.) The information to be recorded by specifying the order in detail. A specific mode of the recording data 80 will be described in detail later.
Control commands output from the host computer 3 to the printer 2 are sequentially stored in the reception buffer 56. The recording control unit 60 of the control unit 50 of the printer 2 sequentially reads and executes the control commands stored in the reception buffer 56 to control the print engine 51 and perform various operations related to the issue of the receipt 10. Run. In particular, the recording control unit 60 controls the print engine 51 based on the recording data 80 to perform recording of a predetermined image on the thermal roll paper 22 and necessary conveyance accompanying recording of the image.

次いで、記録データ80、及び、記録データ80に基づいて画像が記録されたレシート10の具体例について、説明する。   Next, a specific example of the recording data 80 and the receipt 10 on which an image is recorded based on the recording data 80 will be described.

図4(A)は、記録データ80の内容の一例を示す図であり、図4(B)は、図4(A)の記録データ80に基づいて画像が記録されたレシート10の一例を示す図である。
図4(B)のレシート10では、図中上に向かう方向が、搬送方向Y1に対応する方向である。従って、レシート10の発行の際には、感熱ロール紙22が切断されて先端10aが形成された後、記録ヘッド24によってレシート10の先端10a側から末端10b側へ向かって、順次、ドットが形成されて画像が記録され、その後、感熱ロール紙22が切断されて末端10bが形成される。
4A is a diagram illustrating an example of the contents of the recording data 80, and FIG. 4B illustrates an example of the receipt 10 on which an image is recorded based on the recording data 80 of FIG. 4A. FIG.
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, after the thermal roll paper 22 is cut to form the leading end 10a, dots are sequentially formed by the recording head 24 from the leading end 10a side to the terminal end 10b side of the receipt 10. The image is recorded, and then the thermal roll paper 22 is cut to form the end 10b.

本実施形態では、プリンター2が発行するレシート10のレイアウトは、所定の例外を除き、いずれのレシート10についても基本的に同一である。
詳述すると、まず、レシート10の先頭には、所定の態様の所定の文字列からなるトップロゴ100が記録される。図4(B)の例では、トップロゴ100は、基準の大きさの2倍の大きさで、中央寄せ(レシート10の幅方向の中央部に文字列が記録されるようにすること。)された「AAA△Store」(△はスペース。以下同じ。)の文字列である。
本実施形態では、所定の例外を除き、プリンター2が発行する全てのレシート10について、その先頭に、同一の態様の同一の文字列からなるトップロゴ100が記録される。
さらに、トップロゴ100から1行分のスペースを空けて、日時情報101が記録される。日時情報101は、レシート10が発行された日時の情報である。
以下、トップロゴ100と日時情報101との境目のことを区切りK1と称する。
「区切りK」とは、トップロゴ100、及び、日時情報101のように、情報の内容が異なる画像の境目、及び、文字列に係る画像(例えば、後述する線分情報105)と、グラフィックに係る画像(例えば、後述するグラフィック画像106)とのように、種類が異なる画像の境目のことである。すなわち、情報の内容が異なっていたり、また、画像の種類が異なっていたりする等の所定の条件を満たす画像と画像との間に区切りKが形成される。
In the present embodiment, the layout of the receipt 10 issued by the printer 2 is basically the same for all the receipts 10 with a predetermined exception.
More specifically, first, a top logo 100 composed of a predetermined character string in a predetermined form is recorded at the top of the receipt 10. In the example of FIG. 4B, the top logo 100 is twice as large as the reference size and is centered (a character string is recorded at the center in the width direction of the receipt 10). Is a character string of “AAAΔStore” (Δ is a space, the same applies hereinafter).
In the present embodiment, with the exception of predetermined exceptions, the top logo 100 composed of the same character string in the same mode is recorded at the top of all receipts 10 issued by the printer 2.
Further, the date information 101 is recorded with a space for one line from the top logo 100. The date information 101 is information on the date and time when the receipt 10 is issued.
Hereinafter, the boundary between the top logo 100 and the date / time information 101 is referred to as a separator K1.
The “separator K” refers to the boundary between images having different information contents, such as the top logo 100 and the date / time information 101, an image related to a character string (for example, line segment information 105 described later), and graphic. This is a boundary between different types of images such as an image (for example, a graphic image 106 described later). That is, a separator K is formed between images that satisfy a predetermined condition such that information contents are different or image types are different.

さらに、日時情報101から1行分のスペースを空けて、購入商品情報102が記録される。購入商品情報102とは、レシート10を受け取るべき顧客が購入した商品の名称と、その商品の単価との一覧を示す情報である。図4(B)に示すように、商品の名称と、その商品の単価とは、同一行に記録される。以下、商品の名称と、商品の単価とが記録された1つの行のことを「明細行」という。明細行と明細行との間には、1又は複数行分のスペースが形成されることなく、一の明細行の次の行に、次の明細行が記録される。
以下、日時情報101と購入商品情報102との境目のことを区切りK2と称する。
さらに、購入商品情報102から1行分のスペースを空けて、合計購入金額情報103が記録される。合計購入金額情報103とは、レシート10に係る会計における合計購入金額を示す情報である。
以下、購入商品情報102と合計購入金額情報103との境目のことを区切りK3と称する。
Further, the purchased product information 102 is recorded with a space for one line from the date / time information 101. The purchased product information 102 is information indicating a list of the names of products purchased by customers who should receive the receipt 10 and the unit prices of the products. As shown in FIG. 4B, the name of the product and the unit price of the product are recorded on the same line. Hereinafter, one line in which the name of the product and the unit price of the product are recorded is referred to as a “detailed line”. A space for one or more lines is not formed between the detail lines, and the next detail line is recorded in the next line of the one detail line.
Hereinafter, the boundary between the date information 101 and the purchased product information 102 is referred to as a break K2.
Further, the total purchase price information 103 is recorded with a space for one line from the purchased product information 102. The total purchase amount information 103 is information indicating the total purchase amount in the accounting relating to the receipt 10.
Hereinafter, the boundary between the purchased product information 102 and the total purchase price information 103 is referred to as a break K3.

さらに、合計購入金額情報103から1行分のスペースを空けて、定型文言情報104が記録される。
定型文言情報104とは、合計購入金額情報103の後に定型的に記録される文言を示す文字列のことである。図4(B)の例では、定型文言情報104は、基準の大きさで、中央寄せされた「Thank△you」の文字列である。
以下、合計購入金額情報103と定型文言情報104との境目のことを区切りK4と称する。
さらに、定型文言情報104から1行分のスペースを空けて、線分情報105が記録される。線分情報105とは、定型文言情報104の後に定型的に記録される線分を示す情報のことである。具体的には、線分情報105は、「−」の文字がレシート10の幅方向の全域に繰り返されて形成された、直線に類する画像である。
以下、定型文言情報104と線分情報105との境目のことを区切りK5と称する。
さらに、線分情報105の後には、1又は複数行分のスペースが形成されることなく、グラフィック画像106が記録される。グラフィック画像106については後述する。
以下、線分情報105とグラフィック画像106の境目のことを区切りK6と称する。
さらに、グラフィック画像106の後には、1又は複数行分のスペースが形成されることなく、バーコード画像107が記録される。
以下、バーコード画像107と、レシート10の末端10bとの境目のことを区切りK8と称する。
Further, the fixed phrase information 104 is recorded with a space for one line from the total purchase amount information 103.
The fixed phrase information 104 is a character string indicating a fixed phrase recorded after the total purchase amount information 103. In the example of FIG. 4B, the fixed phrase information 104 is a character string of “ThankΔyou” that is centered and centered.
Hereinafter, the boundary between the total purchase amount information 103 and the fixed phrase information 104 is referred to as a break K4.
Further, the line segment information 105 is recorded with a space for one line from the fixed phrase information 104. The line segment information 105 is information indicating a line segment that is routinely recorded after the fixed phrase information 104. Specifically, the line segment information 105 is an image similar to a straight line, which is formed by repeating the character “-” throughout the width direction of the receipt 10.
Hereinafter, the boundary between the fixed phrase information 104 and the line segment information 105 is referred to as a break K5.
Further, the graphic image 106 is recorded after the line segment information 105 without forming a space for one or more lines. The graphic image 106 will be described later.
Hereinafter, the boundary between the line segment information 105 and the graphic image 106 is referred to as a break K6.
Further, the barcode image 107 is recorded after the graphic image 106 without forming a space for one or more lines.
Hereinafter, the boundary between the barcode image 107 and the end 10b of the receipt 10 is referred to as a break K8.

記録データ80は、上述したように、感熱ロール紙22に記録すべき画像の情報を含むデータであるが、具体的には、感熱ロール紙22に所定の画像を所定の態様で記録させることを指示するコマンドが、記録させる順番に並んで構成されたデータである。プリンター2の制御部50の記録制御部60は、記録データ80を構成する各コマンドを、順次、読み出して実行することにより、感熱ロール紙22への画像の記録、及び、画像の記録に伴う必要な搬送を行う。
そして、記録データ80は、上記レイアウトに準じて感熱ロール紙22に画像を記録すべく、以下のような態様となっている。
すなわち、図4(A)を参照し、文字列記録コマンド群MKG1は、トップロゴ100を記録させるコマンド群であり、文字列装飾コマンドMS1、文字列記録指示コマンドMK1、及び、改行コマンドLF1の3つのコマンドが含まれている。
文字列装飾コマンドMS1は、トップロゴ100に施す装飾を指定するコマンドであり、具体的には、当該文字列の大きさを基準の大きさの2倍とすること、及び、当該文字列を中央寄せすることを指定するコマンドである。なお、装飾とは、記録する文字列に対して描画に関する何らかの処理を行うことを意味し、上述した文字列の拡大や、文字列の位置の移動のほか、例えば、縮小、回転、強調、太字化、装飾文字又は装飾記号の付加等が装飾に該当する。
文字列記録指示コマンドMK1はトップロゴ100を記録することを指示するコマンドである。本実施形態では、基本的に、文字列記録指示コマンドMKは、命令コードと、所定の文字コード(例えば、アスキーコード。)で表現された文字の組み合わせからなる文字列と、が組み合わされて構成されている。例えば、文字列記録指示コマンドMK1は、「XXX△“AAA△Store”」(ただし、XXXは、文字列を記録することを指示する命令コード。また、ダブルクォーテーション内の文字列は、アスキーコードで表現された文字の組み合わせによって構成された文字列。)という構成となっている。
改行コマンドLF1は、文字列を記録した後に行うべき改行を指示するコマンドであり、これにより、一の行への文字列の記録後、次の画像が記録される対象となる行が、当該一の行の次の行へと移行する。
As described above, the recording data 80 is data including information on an image to be recorded on the thermal roll paper 22. More specifically, the recording data 80 is to record a predetermined image on the thermal roll paper 22 in a predetermined mode. The command to be instructed is data arranged in the order of recording. The recording control unit 60 of the control unit 50 of the printer 2 needs to accompany the recording of the image on the thermal roll paper 22 and the recording of the image by sequentially reading and executing each command constituting the recording data 80. Carry out proper transport.
The recording data 80 is in the following mode in order to record an image on the thermal roll paper 22 in accordance with the layout.
That is, referring to FIG. 4A, the character string recording command group MKG1 is a command group for recording the top logo 100, and includes a character string decoration command MS1, a character string recording instruction command MK1, and a line feed command LF1. Contains one command.
The character string decoration command MS1 is a command for designating decoration to be applied to the top logo 100. Specifically, the character string size is set to twice the reference size, and the character string is centered. It is a command that specifies to send. Note that decoration means performing some processing related to drawing on the character string to be recorded. In addition to the above-described character string enlargement and character string position movement, for example, reduction, rotation, emphasis, bold Addition of decoration characters or decoration symbols corresponds to decoration.
The character string recording instruction command MK1 is a command for instructing to record the top logo 100. In the present embodiment, basically, the character string recording instruction command MK is configured by combining an instruction code and a character string composed of a combination of characters expressed by a predetermined character code (for example, ASCII code). Has been. For example, the character string recording instruction command MK1 is “XXXΔ“ AAAΔStore ”” (where XXX is an instruction code for instructing to record a character string. The character string in double quotations is an ASCII code. A character string composed of a combination of expressed characters.).
The line feed command LF1 is a command for instructing a line feed to be performed after the character string is recorded. Thus, after the character string is recorded on one line, the line on which the next image is recorded is Move to the next line after.

記録制御部60は、プリントエンジン51を制御して、文字列装飾コマンドMS1により指定された装飾を施した上で、文字列記録指示コマンドMK1が指定する文字列を記録媒体に記録する。これにより、図4(B)に示すように、基準の2倍の大きさで、中央寄せされた「AAA△Store」の文字列が記録される。
詳述すると、プリンター2の記憶部54には、フォントテーブル70が記憶されている。フォントテーブル70とは、フォントデータを集合して記憶するテーブルであり、また、フォントデータとは、文字を感熱ロール紙22に記録可能な態様で表現する実データのことである。本実施形態では、フォントデータの態様は、ビットマップフォントデータである。フォントデータの態様としては、ビットマップデータのほか、スケイラブルフォントデータや、ベクトルフォントデータ、アウトラインフォントデータ等がある。
なお、本実施形態では、感熱ロール紙22に記録する「文字」は、言語で使用される意味を持った文字のみならず、記憶部54に記憶されたフォントデータに基づいて感熱ロール紙22に記録可能な「図形」の全てを指す概念である。
アスキーコードで表現された文字のそれぞれは、フォントテーブル70に記憶されたいずれかのフォントデータと対応関係にあり、この対応関係を示す情報が記憶部54に予め記憶されている。例えば、各アスキーコードと、各アスキーコードに対応するフォントデータの位置(フォントテーブル70における記憶領域のアドレス)とが対応づけて記憶されたテーブルが記憶部54に予め記憶されている。
そして、文字列装飾コマンドMS1、及び、文字列記録指示コマンドMK1に基づいて、「AAA△Store」の文字列を記録する際、記録制御部60は、フォントテーブル70、及び、アスキーコードとフォントデータとの対応関係を示す情報を参照して、当該文字列を構成する各文字のフォントデータを取得し、文字列装飾コマンドMS1が指定する装飾を反映した上で、取得したフォントデータに基づいて、プリントバッファー(不図示)に文字列に係る画像データ(ビットマップデータ)を展開する。次いで、記録制御部60は、プリントバッファーに展開した当該文字列に係る画像データに基づいて、記録ヘッド24や、搬送モーター26等を駆動して、感熱ロール紙22に文字列に係る画像を構成するドットを形成することにより、「AAA△Store」の文字列を記録する。
The recording control unit 60 controls the print engine 51 to apply the decoration specified by the character string decoration command MS1, and then records the character string specified by the character string recording instruction command MK1 on the recording medium. As a result, as shown in FIG. 4B, the center-aligned character string “AAAΔStore” is recorded with a size twice as large as the reference.
More specifically, a font table 70 is stored in the storage unit 54 of the printer 2. The font table 70 is a table that collects and stores font data, and the font data is actual data that expresses characters in a form that can be recorded on the thermal roll paper 22. In the present embodiment, the font data mode is bitmap font data. Examples of font data include bitmap font data, scalable font data, vector font data, outline font data, and the like.
In the present embodiment, “characters” to be recorded on the thermal roll paper 22 are not only characters having a meaning used in a language, but also on the thermal roll paper 22 based on font data stored in the storage unit 54. It is a concept that indicates all “graphics” that can be recorded.
Each character expressed in ASCII code has a corresponding relationship with any one of the font data stored in the font table 70, and information indicating the corresponding relationship is stored in the storage unit 54 in advance. For example, a table in which each ASCII code and the position of font data corresponding to each ASCII code (address of the storage area in the font table 70) are stored in association with each other is stored in the storage unit 54 in advance.
When the character string “AAAΔStore” is recorded based on the character string decoration command MS1 and the character string recording instruction command MK1, the recording control unit 60 includes the font table 70, the ASCII code, and the font data. The font data of each character constituting the character string is obtained by referring to the information indicating the correspondence relationship between the character string and the decoration designated by the character string decoration command MS1, and based on the obtained font data, Image data (bitmap data) relating to a character string is developed in a print buffer (not shown). Next, the recording control unit 60 drives the recording head 24, the conveyance motor 26, and the like based on the image data related to the character string developed in the print buffer, and configures the image related to the character string on the thermal roll paper 22. The character string “AAAΔStore” is recorded by forming dots to be used.

文字列記録コマンド群MKG1の後には、空改行コマンドKLF1が続いている。
空改行コマンドKLFは、1行分のスペースを形成すること(以下、「空改行」という。)を指示するコマンドである。空改行コマンドKLFの実行により、一の行に画像が記録されることなく、次の画像が記録される対象となる行が、当該一の行の次の行へと移行し、これにより、1行分のスペースが形成される。
この空改行コマンドKLF1が、記録制御部60により実行されることにより、区切りK1に対応する位置に、1行分のスペースが形成される。
なお、改行コマンドLFと、空改行コマンドKLFとは、同一のコマンドであるが、説明の便宜のため、これらコマンドを区別して表現する。
空改行コマンドKLF1の後には、文字列記録コマンド群MKG2が続いている。
文字列記録コマンド群MKG2は、日時情報101を記録させるコマンド群であり、上述した文字列記録コマンド群MKG1と同様、文字列装飾コマンドMS、文字列記録指示コマンドMK、及び、改行コマンドLFを含んで構成されている。
文字列記録コマンド群MKG2の後には、空改行コマンドKLF2が続いている。
この空改行コマンドKLF2が、記録制御部60により実行されることにより、区切りK2に対応する位置に、1行分のスペースが形成される。
空改行コマンドKLF2の後には、文字列記録コマンド群MKG3、4、5が続いている。
文字列記録コマンド群MKG3、4、5のそれぞれは、購入商品情報102の明細行のそれぞれを記録させるコマンド群であり、文字列記録コマンド群MKG3は、「ItemA△△△〜△800」の文字列を、文字列記録コマンド群MKG4は、「ItemB△△△〜△500」の文字列を、そして、文字列記録コマンド群MKG5は、「ItemC△△△〜△250」の文字列を、記録させるコマンド群である。
A blank line feed command KLF1 follows the character string recording command group MKG1.
The blank line feed command KLF is a command for instructing to form a space for one line (hereinafter referred to as “blank line feed”). Execution of the blank line feed command KLF shifts the line on which the next image is to be recorded to the next line of the one line without recording the image on the first line. A line of space is formed.
When this blank line feed command KLF1 is executed by the recording control unit 60, a space for one line is formed at a position corresponding to the break K1.
Note that the line feed command LF and the empty line feed command KLF are the same command, but for convenience of explanation, these commands are expressed separately.
The blank line feed command KLF1 is followed by a character string recording command group MKG2.
The character string recording command group MKG2 is a command group for recording the date and time information 101, and includes the character string decoration command MS, the character string recording instruction command MK, and the line feed command LF, as with the character string recording command group MKG1 described above. It consists of
After the character string recording command group MKG2, an empty line feed command KLF2 follows.
When this blank line feed command KLF2 is executed by the recording control unit 60, a space for one line is formed at a position corresponding to the break K2.
After the empty line feed command KLF2, character string recording command groups MKG3, 4, 5 follow.
Each of the character string recording command groups MKG3, 4, and 5 is a command group for recording each detail line of the purchased product information 102, and the character string recording command group MKG3 is a character of “ItemAΔΔΔ˜Δ800”. The character string recording command group MKG4 records the character string “ItemBΔΔΔ to Δ500”, and the character string recording command group MKG5 records the character string “ItemCΔΔΔΔ to Δ250”. This is a command group.

文字列記録コマンド群MKG5の後には、空改行コマンドKLF3が続いている。
この空改行コマンドKLF3が、記録制御部60により実行されることにより、区切りK3に対応する位置に、1行分のスペースが形成される。
空改行コマンドKLF3の後には、文字列記録コマンド群MKG6が続いている。
文字列記録コマンド群MKG6は、合計購入金額情報103を記録させるコマンド群である。
文字列記録コマンド群MKG6の後には、空改行コマンドKLF4が続いている。
この空改行コマンドKLF4が、記録制御部60により実行されることにより、区切りK4に対応する1行分のスペースが形成される。
空改行コマンドKLF4の後には、文字列記録コマンド群MKG7が続いている。
文字列記録コマンド群MKG7は、定型文言情報104を記録させるコマンド群である。
文字列記録コマンド群MKG7の後には、空改行コマンドKLF5が続いている。
この空改行コマンドKLF5が、記録制御部60により実行されることにより、区切りK5に対応する1行分のスペースが形成される。
空改行コマンドKLF5の後には、文字列記録コマンド群MKG8が続いている。
文字列記録コマンド群MKG8は、線分情報105を記録させるコマンド群である。
The character string recording command group MKG5 is followed by an empty line feed command KLF3.
When this blank line feed command KLF3 is executed by the recording control unit 60, a space for one line is formed at a position corresponding to the break K3.
The blank line feed command KLF3 is followed by a character string recording command group MKG6.
The character string recording command group MKG6 is a command group for recording the total purchase amount information 103.
After the character string recording command group MKG6, an empty line feed command KLF4 follows.
When this blank line feed command KLF4 is executed by the recording control unit 60, a space for one line corresponding to the break K4 is formed.
The blank line feed command KLF4 is followed by a character string recording command group MKG7.
The character string recording command group MKG7 is a command group for recording the fixed phrase information 104.
After the character string recording command group MKG7, an empty line feed command KLF5 follows.
When this blank line feed command KLF5 is executed by the recording control unit 60, a space for one line corresponding to the break K5 is formed.
The blank line feed command KLF5 is followed by a character string recording command group MKG8.
The character string recording command group MKG8 is a command group for recording the line segment information 105.

文字列記録コマンド群MKG8の後には、グラフィック記録指示コマンドGSが続いている。
記録制御部60は、このグラフィック記録指示コマンドGSに基づいて感熱ロール紙22にグラフィック画像106を記録する。
詳述すると、プリンター2の記憶部54には、登録グラフィックテーブル71が記憶されている。この登録グラフィックテーブル71では、複数のグラフィック画像データと、各グラフィック画像に一意に付与された識別コードとが対応づけて記憶されている。グラフィック画像データとは、フォントデータに基づいて記録される画像ではなく、所定の画像(グラフィック画像)を表現するビットマップデータのことであり、例えば、図4(B)のレシート10のグラフィックエリアA3のグラフィック画像106(強調用の飾り枠の中に「10%Off」という文字列が描画された画像)を表現するビットマップデータである。
そして、グラフィック記録指示コマンドGSには、記録すべきグラフィック画像の識別コードを特定する情報が含まれている。グラフィック記録指示コマンドGSに基づいてグラフィック画像を記録する際、記録制御部60は、登録グラフィックテーブル71を参照して、当該識別コードに対応するグラフィック画像データを取得し、取得したグラフィック画像データをプリントバッファーに展開し、展開したグラフィック画像データに基づいてプリントエンジン51を制御して、グラフィック画像の記録を行う。
なお、グラフィック記録指示コマンドGSを、グラフィックエリアA3に記録すべき画像のビットマップデータを含んだ構成とし、当該ビットマップデータに係る画像を記録させるコマンドとすること可能である。この場合、記録制御部60は、グラフィック記録指示コマンドGSに含まれるビットマップデータをプリントバッファーに展開して画像を記録する。
グラフィック記録指示コマンドGSには、改行コマンドLFが含まれており、グラフィック画像106の記録後は、改行が行われ、次の画像が記録される対象となる行が、次の行へと移行する。
A graphic recording instruction command GS follows the character string recording command group MKG8.
The recording control unit 60 records the graphic image 106 on the thermal roll paper 22 based on the graphic recording instruction command GS.
Specifically, a registered graphic table 71 is stored in the storage unit 54 of the printer 2. In the registered graphic table 71, a plurality of graphic image data and an identification code uniquely assigned to each graphic image are stored in association with each other. The graphic image data is not an image recorded based on the font data but bitmap data representing a predetermined image (graphic image). For example, the graphic area A3 of the receipt 10 in FIG. Is a bitmap data representing a graphic image 106 (an image in which a character string “10% Off” is drawn in a decorative frame for emphasis).
The graphic recording instruction command GS includes information for specifying the identification code of the graphic image to be recorded. When recording a graphic image based on the graphic recording instruction command GS, the recording control unit 60 refers to the registered graphic table 71, acquires graphic image data corresponding to the identification code, and prints the acquired graphic image data. The graphic image is developed in the buffer, and the print engine 51 is controlled based on the developed graphic image data to record the graphic image.
Note that the graphic recording instruction command GS may be configured to include bitmap data of an image to be recorded in the graphic area A3, and may be a command for recording an image related to the bitmap data. In this case, the recording control unit 60 develops the bitmap data included in the graphic recording instruction command GS in the print buffer and records an image.
The graphic recording instruction command GS includes a line feed command LF. After the graphic image 106 is recorded, a line feed is performed, and the line on which the next image is recorded moves to the next line. .

グラフィック記録指示コマンドGSの後には、バーコード記録指示コマンドBSが続いている。
バーコード記録指示コマンドBSは、HRI文字に関する各種設定(HRI文字を記録するか否か、HRI文字をバーコードとの関係でどこに記録するか等)を指定するコマンドや、バーコードを記録する際のサイズを指定するコマンド、バーコードに変換しようとしている文字列(以下、「変換前文字列」という。)を指定すると共に当該変換前文字列に基づくバーコードの画像を記録することを指示するコマンド等が含まれて構成されている。
バーコード記録指示コマンドBSに基づいてバーコードを記録する際、記録制御部60は、バーコード記録指示コマンドBSに含まれる変換前文字列を取得し、取得した変換前文字列を、ファームウェアに実装された所定の機能により、画像としてのバーコードを表現するビットマップデータに変換し、HRI文字に関する各種設定や、バーコードのサイズに関する各種設定を反映した上で、画像としてのバーコードを表現するビットマップデータをプリントバッファーに展開する。そして、記録制御部60は、展開したビットマップデータに基づいて、プリントエンジン51を制御して、バーコード、及び、HRI文字に係る画像を感熱ロール紙22に記録する。
バーコード記録指示コマンドBSには、改行コマンドLFが含まれており、バーコード画像107の記録後は、改行が行われ、次の画像が記録される対象となる行が、次の行へと移行する。
The bar code recording instruction command BS follows the graphic recording instruction command GS.
The bar code recording instruction command BS is used to specify various settings relating to the HRI character (whether or not to record the HRI character, where to record the HRI character in relation to the bar code, etc.) A command for specifying the size of a character, a character string to be converted into a barcode (hereinafter referred to as “character string before conversion”) and an instruction to record a barcode image based on the character string before conversion It includes commands and so on.
When recording a barcode based on the barcode recording instruction command BS, the recording control unit 60 acquires the pre-conversion character string included in the barcode recording instruction command BS, and implements the acquired pre-conversion character string in the firmware. By using the predetermined function, the image data is converted into bitmap data representing the barcode as an image, and the barcode as the image is expressed after reflecting various settings relating to the HRI characters and various settings relating to the barcode size. The bitmap data is expanded in the print buffer. Then, the recording control unit 60 controls the print engine 51 based on the developed bitmap data, and records the barcode and the image relating to the HRI character on the thermal roll paper 22.
The bar code recording instruction command BS includes a line feed command LF. After the bar code image 107 is recorded, a line feed is performed, and the line on which the next image is recorded is changed to the next line. Transition.

ところで、レシート10に記録される画像のレイアウトや、バランスの変更、その他の理由により、レシート10における改行の態様の変更が求められることがある。
例えば、感熱ロール紙22の節約を目的として画像と画像との間の改行を省略したり、また、レシート10におけるグラフィック画像106のバランスを考慮して、グラフィック画像106の後に複数行分のスペースを入れたり、また、バーコード画像107の読み取り精度を考慮して、バーコード画像107の前後に複数行分のスペースを入れたりする等の変更が求められることがある。
しかしながら、従来、POS端末1において、レシート10における改行の態様を変更するためには、ホストコンピューター3から送信する記録データ80における空改行コマンドKLFの態様を変更する必要があった。
この場合、ホストコンピューター3に対して、プログラム修正等の改変を行う必要があるが、ホストコンピューター3に対する改変は、相当な煩雑な作業を伴う場合があったり、また、プリンター2とホストコンピューター3との開発の主体が異なる等の理由によりホストコンピューター3に改変を行えない場合があったりする等の理由のため、できるだけ避けたいとするニーズがあった。
以上を踏まえ、本実施形態では、プリンター2が以下の動作を実行することにより、ホストコンピューター3からプリンター2に送信する記録データ80を変更することなく、所望の改行を行えるようにしている。
以下、具体例を挙げて、説明する。
By the way, there is a case where it is required to change the line feed mode in the receipt 10 due to the layout of the image recorded on the receipt 10, the balance change, and other reasons.
For example, a line break between images is omitted for the purpose of saving thermal roll paper 22, and a space for a plurality of lines is provided after the graphic image 106 in consideration of the balance of the graphic image 106 in the receipt 10. In consideration of the reading accuracy of the barcode image 107, a change such as inserting a space for a plurality of lines before and after the barcode image 107 may be required.
However, conventionally, in the POS terminal 1, in order to change the line feed mode in the receipt 10, it is necessary to change the mode of the empty line feed command KLF in the recording data 80 transmitted from the host computer 3.
In this case, it is necessary to modify the host computer 3 such as program correction. However, the modification to the host computer 3 may involve considerable troublesome work, and the printer 2 and the host computer 3 There is a need to avoid as much as possible because the host computer 3 may not be modified due to different development subjects.
Based on the above, in the present embodiment, the printer 2 executes the following operation so that a desired line feed can be performed without changing the recording data 80 transmitted from the host computer 3 to the printer 2.
Hereinafter, a specific example will be described.

レシート10における改行(空改行)の態様を以下の3つの規則に従うように変更することにより、図4(B)におけるレシート10のレイアウトを変更する場合を例にして説明する。
すなわち、規則1.種類が文字列の画像(フォントデータに基づいて記録される画像)が記録された行の後には、1又は複数行分のスペースを空けることなく、次の行から画像を記録する。これにより、文字列と文字列との間のスペースを省略し、感熱ロール紙22の節約を図る。
規則2.種類がグラフィックの画像(例えば、グラフィック画像106)の後には、2行分のスペースを空けるため、2回の空改行を行う。これにより、図4(B)に示すように、グラフィック画像106の後には、バーコード画像107が記録されるが、当該バーコード画像107とグラフィック画像106とが適切に乖離し、バーコード画像107の読み取り精度の向上を図る。
規則3.種類がバーコードの画像(バーコード画像107)の後には、1行分のスペースを空けるため、1回の空改行を行う。これにより、バーコード画像107と、レシート10の末端10bが不自然に近接することを防止し、レシート10の見た目を向上する。また、適度のスペースを空けることにより、バーコード画像107の読み取り精度を向上する。
An example will be described in which the layout of the receipt 10 in FIG. 4B is changed by changing the form of line feed (blank line feed) in the receipt 10 to conform to the following three rules.
That is, Rule 1. After the line in which the image of the character string (image recorded based on the font data) is recorded, the image is recorded from the next line without leaving a space for one or more lines. Thereby, the space between character strings is omitted, and the thermal roll paper 22 is saved.
Rule 2. After a graphic image of the type (for example, graphic image 106), two blank line feeds are performed in order to make a space for two lines. As a result, as shown in FIG. 4B, a barcode image 107 is recorded after the graphic image 106. However, the barcode image 107 and the graphic image 106 are appropriately separated from each other. To improve the reading accuracy.
Rule 3. After the barcode type image (barcode image 107), one blank line feed is performed in order to make a space for one line. Thereby, the barcode image 107 and the end 10b of the receipt 10 are prevented from approaching unnaturally, and the appearance of the receipt 10 is improved. Further, the reading accuracy of the barcode image 107 is improved by making a suitable space.

図5は、上記3つの規則に従って、レシート10における改行の態様を変更する前と、変更した後のレシート10の状態を示す図である。図5(A)は、変更前のレシート10を示しており、図4(B)と同一である。すなわち、図5(A)のレシート10は、図4(A)の記録データ80をそのまま実行することにより発行されるレシート10である。また、図5(B)は、変更後のレシート10を示している。
図5(B)に示すように、区切りK1〜K6は、文字列が記録された行の後に形成される区切りであるが、規則1により、これら区切りK1〜K6に対応する部位には、1又は複数行分のスペースが形成されていない。
また、区切りK7は、グラフィック画像106の後に形成された区切りであるが、このグラフィック画像106の後には、2行分のスペースが形成されている。
また、区切りK8は、バーコード画像107の後に形成された区切りであるが、このバーコード画像107の後には、1行分のスペースが形成されている。
本実施形態に係るプリンター2は、以下の動作を実行することにより、ホストコンピューター3に対する改変を伴うことなく、図5(A)のレシート10に係るレイアウトを、図5(B)のレシート10に係るレイアウトへと変更する。
FIG. 5 is a diagram showing the state of the receipt 10 before and after changing the line feed mode in the receipt 10 according to the above three rules. FIG. 5 (A) shows the receipt 10 before the change, which is the same as FIG. 4 (B). That is, the receipt 10 in FIG. 5A is a receipt 10 issued by executing the recording data 80 in FIG. 4A as it is. FIG. 5B shows the receipt 10 after the change.
As shown in FIG. 5B, the breaks K1 to K6 are breaks formed after the line in which the character string is recorded. According to the rule 1, the parts corresponding to the breaks K1 to K6 are 1 Or a space for a plurality of lines is not formed.
The break K7 is a break formed after the graphic image 106. A space for two lines is formed after the graphic image 106.
The break K8 is a break formed after the barcode image 107. A space for one line is formed after the barcode image 107.
The printer 2 according to the present embodiment executes the following operation to change the layout according to the receipt 10 in FIG. 5A to the receipt 10 in FIG. 5B without altering the host computer 3. Change to this layout.

図6は、記録データ80に基づいて感熱ロール紙22に画像を記録する際の記録制御部60の動作を示すフローチャートである。
以下の動作の前提として、ホストコンピューター3からプリンター2に図4(A)の記録データ80を含む制御コマンドが送信されており、プリンター2の受信バッファー56に記録データ80が既に格納されているものとする。
また、以下の説明において、記録制御部60の機能は、CPUがファームウェアを読み出して実行する等、ハードウェアとソフトウェアとの協働により実現される。
まず、記録制御部60は、記録データ80に含まれる画像記録指示コマンドを読み出し(ステップSA1)、読み出した画像記録指示コマンドを実行し、画像を記録する(ステップSA2)。
画像記録指示コマンドとは、何らかの画像の記録を指示するコマンド(コマンド群であってもよい)の便宜的な総称であり、具体的には、文字列記録コマンド群MKG、グラフィック記録指示コマンドGS、又は、バーコード記録指示コマンドBSのいずれかのコマンド、又は、コマンド群ことである。上述したように、記録データ80は、画像を記録する順番に、画像記録指示コマンドが並んで構成されたデータであり、記録制御部60は、記録データ80における順番通り、順次、画像記録指示コマンドを読み出して、実行する。
FIG. 6 is a flowchart showing the operation of the recording control unit 60 when an image is recorded on the thermal roll paper 22 based on the recording data 80.
As a premise of the following operation, a control command including the recording data 80 of FIG. 4A is transmitted from the host computer 3 to the printer 2, and the recording data 80 is already stored in the reception buffer 56 of the printer 2. And
In the following description, the function of the recording control unit 60 is realized by cooperation of hardware and software, such as a CPU reading and executing firmware.
First, the recording control unit 60 reads an image recording instruction command included in the recording data 80 (step SA1), executes the read image recording instruction command, and records an image (step SA2).
The image recording instruction command is a convenient general term for a command (or command group) for instructing recording of an image. Specifically, a character string recording command group MKG, a graphic recording instruction command GS, Or, it is any command or command group of the bar code recording instruction command BS. As described above, the recording data 80 is data in which the image recording instruction commands are arranged in the order in which the images are recorded, and the recording control unit 60 sequentially performs the image recording instruction commands in the order in the recording data 80. Is read and executed.

次いで、記録制御部60は、ステップSA2において実行した画像記録指示コマンドに続いて、1又は複数の空改行コマンドKLFがある場合は、全ての空改行コマンドKLFを実行することなく、読み捨てる(ステップSA3)。
例えば、記録制御部60は、ステップSA2において、文字列記録コマンド群MKG1を実行したとした場合、当該文字列記録コマンド群MKG1に続く、空改行コマンドKLF1を読み捨てる。
次いで、記録制御部60は、ステップSA2において、画像記録指示コマンドを実行することによって記録した画像の種類を特定する(ステップSA4)。
本実施形態では、画像の種類としては、文字列(フォントデータを利用して記録される画像)、グラフィック(グラフィック画像106のように、フォントデータを利用せず、所定のビットマップデータが所定の手段によりプリントバッファーに展開されて記録される画像)、及び、バーコードの3つの種類が存在する。そして、画像の種類によって、画像記録指示コマンドの命令コード、及び、コマンドの形態が異なっているため、ステップSA2で実行した画像記録指示コマンドの命令コードにより、ステップSA2で記録した画像の種類が、文字列、グラフィック画像106、及び、バーコード画像107のいずれであるかを特定可能である。
次いで、記録制御部60は、記憶部54に記憶された規則テーブル72を参照する(ステップSA5)。
Next, if there is one or more empty line feed commands KLF following the image recording instruction command executed in step SA2, the recording control unit 60 discards the reading without executing all the empty line feed commands KLF (step SA3).
For example, if the recording control unit 60 executes the character string recording command group MKG1 in step SA2, the recording control unit 60 reads and discards the empty line feed command KLF1 following the character string recording command group MKG1.
Next, in step SA2, the recording control unit 60 specifies the type of recorded image by executing an image recording instruction command (step SA4).
In the present embodiment, the types of images include character strings (images recorded using font data), graphics (graphic images 106, font data is not used, and predetermined bitmap data is predetermined. There are three types of images: an image developed and recorded in a print buffer by means, and a barcode. Since the instruction code of the image recording instruction command and the command form differ depending on the type of image, the type of image recorded in step SA2 is determined by the instruction code of the image recording instruction command executed in step SA2. It can be specified whether the character string, the graphic image 106, or the barcode image 107.
Next, the recording control unit 60 refers to the rule table 72 stored in the storage unit 54 (step SA5).

図7は、規則テーブル72のデータ構造を模式的に示す図である。
規則テーブル72は、画像の種類と、当該種類の画像を記録した後における空改行の態様を示す情報とを対応づけて記憶するテーブルである。換言すれば、規則テーブル72は、上述した空改行の態様に関する3つの規則を体系的に記憶するテーブルである。
図7に示すように、規則テーブル72の1件のレコードは、画像の種類を示す情報が格納される画像種類フィールド72aと、空改行の態様を示す情報が格納される空改行態様フィールド72bとを含んで構成されている。
すなわち、レコードR1は、規則1に対応するレコードであり、画像の種類としての文字列を示す情報と、画像の種類が文字列である画像を記録した後、空改行を行わないことを示す情報とが対応づけて記憶されている。
また、レコードR2は、規則2に対応するレコードであり、画像の種類としてのグラフィックを示す情報と、画像の種類がグラフィックである画像を記録した後、2回の空改行を行うことを示す情報とが対応づけて記憶されている。
また、レコードR3は、規則3に対応するレコードであり、画像の種類としてのバーコードを示す情報と、画像の種類がバーコードである画像を記録した後、1回の空改行を行うことを示す情報とが対応づけて記憶されている。
FIG. 7 is a diagram schematically showing the data structure of the rule table 72.
The rule table 72 is a table that stores an image type in association with information indicating an empty line feed mode after the image of the type is recorded. In other words, the rule table 72 is a table that systematically stores the three rules related to the above-described empty line feed mode.
As shown in FIG. 7, one record of the rule table 72 includes an image type field 72a in which information indicating the type of image is stored, and a blank line feed mode field 72b in which information indicating a blank line feed mode is stored. It is comprised including.
That is, the record R1 is a record corresponding to the rule 1, and information indicating a character string as an image type and information indicating that no blank line feed is performed after recording an image whose image type is a character string. Are stored in association with each other.
The record R2 is a record corresponding to the rule 2, and information indicating a graphic as an image type and information indicating that two blank line breaks are performed after recording an image whose image type is a graphic. Are stored in association with each other.
The record R3 is a record corresponding to the rule 3, and information indicating a barcode as an image type and an image whose image type is a barcode are recorded, and then one blank line feed is performed. The information shown is stored in association with each other.

さて、前掲図6に戻り、ステップSA5において規則テーブル72を参照した後、記録制御部60は、規則テーブル72の内容に基づいて、実行すべき空改行の態様を特定する(ステップSA6)。
すなわち、記録制御部60は、規則テーブル72の各レコードのうち、規則テーブル72の画像種類フィールド72aに、ステップSA4で特定した画像の種類を示す情報が格納されているレコードを特定し、特定したレコードの空改行態様フィールド72bに格納されている情報が示す空改行の態様を、実行すべき空改行の態様と、特定する。
次いで、記録制御部60は、ステップSA6で特定した空改行の態様で、空改行を実行する(ステップSA7)。
このステップSA7では、図7を参照し、ステップSA2で記録された画像の種類が文字列である場合は、空改行が行われず、また、ステップSA2で記録された画像の種類がグラフィックである場合は、2回の空改行が行われ、また、ステップSA2で記録された画像の種類がバーコードである場合は、1回の空改行が行われる。
次いで、記録制御部60は、未実行の画像記録指示コマンドが残っているか否かを判別し、残っている場合(ステップSA8:NO)、処理手順をステップSA1へ移行して、画像記録指示コマンドを実行し、一方、残っていない場合(ステップSA8:YES)、処理を終了する。
Now, referring back to FIG. 6, after referring to the rule table 72 in step SA5, the recording control unit 60 identifies the mode of blank line feed to be executed based on the contents of the rule table 72 (step SA6).
That is, the recording control unit 60 specifies and specifies a record in which information indicating the type of the image specified in step SA4 is stored in the image type field 72a of the rule table 72 among the records of the rule table 72. The mode of blank line feed indicated by the information stored in the blank line break mode field 72b of the record is specified as the mode of blank line feed to be executed.
Next, the recording control unit 60 executes a blank line feed in the blank line break mode specified in step SA6 (step SA7).
In step SA7, referring to FIG. 7, when the image type recorded in step SA2 is a character string, no blank line feed is performed, and when the image type recorded in step SA2 is graphic. In the case where two blank line feeds are performed, and when the type of the image recorded in step SA2 is a barcode, one blank line feed is performed.
Next, the recording control unit 60 determines whether or not an unexecuted image recording instruction command remains, and if it remains (step SA8: NO), the processing procedure proceeds to step SA1, and the image recording instruction command On the other hand, if it does not remain (step SA8: YES), the process is terminated.

以上のような動作を行うことにより、ホストコンピューター3から送信された記録データ80における空改行コマンドKLFの態様にかかわらず、種類が文字列の画像が記録された行の後は、空改行が行われず、1又は複数行分のスペースが削除され、また、種類がグラフィックの画像が記録された後は、空改行が2回行われ、2行分のスペースが形成され、また、種類がバーコードの画像が記録された後は、空改行が1回行われ、1行分のスペースが形成され、これにより、ホストコンピューター3がプリンター2に送信する記録データ80の内容の変更を伴うことなく、図5(A)のレシート10に係るレイアウトから、図5(B)のレシート10に係るレイアウトへと、レイアウトが変更される。   By performing the operation as described above, a blank line feed is performed after the line in which the image of the character string type is recorded, regardless of the mode of the blank line feed command KLF in the recording data 80 transmitted from the host computer 3. After one or more lines of space are deleted and a graphic image of type is recorded, a blank line feed is performed twice to form a space of two lines, and the type is barcode. After the image is recorded, a blank line feed is performed once, and a space for one line is formed, so that the content of the recording data 80 transmitted from the host computer 3 to the printer 2 is not changed. The layout is changed from the layout related to the receipt 10 in FIG. 5A to the layout related to the receipt 10 in FIG.

なお、規則テーブル72における空改行態様フィールド72bの情報を変更することにより、所定の種類の画像を記録した場合の空改行の態様を任意に設定することが可能である。
例えば、規則1を、種類が文字列の画像を記録した後、空改行を1回行うこととした場合、図7の規則テーブル72のレコードR1の空改行態様フィールド72bに、空改行を1回行うことを示す情報を格納するようにすればよい。これにより、記録制御部60は、文字列の画像を記録した後、規則テーブル72を参照し、空改行を1回実行すべきと判別し、空改行を1回行うこととなる。
規則テーブル72の内容の変更は、プリンター2に設けられたスイッチを操作して行えるようにしてもよく、また、プリンター2に専用の端末を接続し、当該端末を操作して行えるようにしてもよい。また、ホストコンピューター3を、ユーザーが、規則テーブル72の内容の変更を指示する入力を行える構成とすると共に、当該入力に基づいて、規則テーブル72の内容音変更を指示する専用のコマンドを出力する構成とし、さらに、プリンター2を当該専用のコマンドに基づいて、規則テーブル72の内容の変更する処理を行う構成としてもよい。
Note that by changing the information in the blank line break mode field 72b in the rule table 72, it is possible to arbitrarily set the blank line break mode when a predetermined type of image is recorded.
For example, if rule 1 is to perform a blank line feed once after recording an image of the character string type, a blank line break is once in the blank line break mode field 72b of record R1 of rule table 72 in FIG. Information indicating what is to be done may be stored. As a result, after recording the character string image, the recording control unit 60 refers to the rule table 72, determines that the blank line feed should be executed once, and performs the blank line feed once.
The contents of the rule table 72 can be changed by operating a switch provided in the printer 2, or by connecting a dedicated terminal to the printer 2 and operating the terminal. Good. In addition, the host computer 3 is configured so that the user can input an instruction to change the contents of the rule table 72, and a dedicated command to instruct the change of the contents sound of the rule table 72 is output based on the input. Further, the printer 2 may be configured to change the contents of the rule table 72 based on the dedicated command.

以上説明したように、本実施形態では、記録制御部60は、記録データ80に含まれる改行コマンドを読み捨て、所定の規則に従って改行を行う。
これによれば、記録データ80に含まれる改行コマンドが読み捨てられた上で、改行コマンドに基づく改行に代えて、所定の規則に従って、自動で、改行が行われることとなり、ホストコンピューター3からプリンター2に送信する記録データ80を変更することなく、所望の改行が行われるようにすることが可能となる。
As described above, in this embodiment, the recording control unit 60 discards the line feed command included in the recording data 80 and performs a line feed according to a predetermined rule.
According to this, after the line feed command included in the record data 80 is discarded, the line feed is automatically performed according to a predetermined rule instead of the line feed based on the line feed command. It is possible to perform a desired line feed without changing the recording data 80 to be transmitted.

また、本実施形態では、記録制御部60は、画像記録指示コマンド、及び、当該画像記録指示コマンドに基づく画像の記録後の改行を指示する空改行コマンドKLFについて、当該画像記録指示コマンドに基づく画像の記録後、当該空改行コマンドKLFを読み捨て、当該画像記録指示コマンドに係る画像の種類に対応した改行を行う。
これによれば、画像記録指示コマンド、及び、当該画像記録指示コマンドに基づく画像の記録後の改行を指示する空改行コマンドKLFについて、当該画像記録指示コマンドに基づく画像の記録後、当該空改行コマンドKLFを読み捨て、当該画像記録指示コマンドに係る画像の種類に対応した改行を行うため、ホストコンピューター3からプリンター2に送信する記録データ80の内容を変更することなく、画像を記録した後、画像の種類に対応した適切な改行が行われるようにすることが可能となる。
なお、記録制御部60は、画像記録指示コマンド、及び、当該画像記録指示コマンドに基づく画像の記録「前」の改行を指示する空改行コマンドKLFについて、当該画像記録指示コマンドに基づく画像の記録前に、当該空改行コマンドKLFを読み捨て、当該画像記録指示コマンドに係る画像の種類に対応した改行を行うようにしてもよい。
In the present embodiment, the recording control unit 60 uses the image recording instruction command and an empty line feed command KLF to instruct a line break after recording of an image based on the image recording instruction command, based on the image recording instruction command. After the recording, the empty line feed command KLF is discarded and a line feed corresponding to the type of image related to the image recording instruction command is performed.
According to this, for the image recording instruction command and the blank line feed command KLF for instructing a line feed after recording of an image based on the image recording instruction command, the blank line feed command after recording the image based on the image recording instruction command Since the KLF is discarded and a line feed corresponding to the type of image related to the image recording instruction command is performed, the image is recorded after the image is recorded without changing the content of the recording data 80 transmitted from the host computer 3 to the printer 2. Appropriate line breaks corresponding to the type can be performed.
Note that the recording control unit 60 uses the image recording instruction command and the empty line feed command KLF for instructing a line break “before” the image recording based on the image recording instruction command before the image recording based on the image recording instruction command. Alternatively, the blank line feed command KLF may be discarded and a line break corresponding to the type of image related to the image recording instruction command may be performed.

また、本実施異形態では、画像記録指示コマンドは、文字列と、グラフィックと、バーコードとの3つの種類に係る画像のいずれかを記録させるコマンドである。
これによれば、いずれの種類の画像を記録した場合であっても、種類に応じた改行を行うことが可能となる。
In the present embodiment, the image recording instruction command is a command for recording any one of three types of images including a character string, a graphic, and a barcode.
According to this, it is possible to perform a line feed according to the type regardless of which type of image is recorded.

<第2実施形態>
次いで、第2実施形態について説明する。
図4(B)に示すように、レシート10には、区切りK1〜区切りK8の8つの区切りKが形成されている。
そして、本実施形態に係るプリンター2は、特定の区切りKに特定の態様の空改行を実行可能である。
上述したとおり、区切りKとは、図4(B)に示すように、トップロゴ100及び日時情報101や、日時情報101及び購入商品情報102のように、内容が異なる画像と画像との間に形成される境目、及び、線分情報105(種類が文字列の画像)及びグラフィック画像106(種類がグラフィックの画像)や、グラフィック画像106及びバーコード画像107(種類がバーコードの画像)のように、種類が異なる画像と画像との間に形成される境目のことである。内容、又は、種類が異なる等の所定の条件を満たす画像と画像との間に区切りKが形成される。
Second Embodiment
Next, a second embodiment will be described.
As shown in FIG. 4B, the receipt 10 is formed with eight separators K1 to separators K8.
The printer 2 according to the present embodiment can execute a blank line feed in a specific mode at a specific break K.
As described above, the break K is, as shown in FIG. 4B, between images with different contents, such as the top logo 100 and date / time information 101, date / time information 101, and purchased product information 102. Borders to be formed, line segment information 105 (image of type character string) and graphic image 106 (image of type graphic), graphic image 106 and barcode image 107 (image of type barcode) In addition, it is a boundary formed between images of different types. A separator K is formed between images that satisfy a predetermined condition such as different contents or types.

図8(A)は、空改行の態様の変更によるレイアウトの変更前のレシート10を示し、図8(B)は、レイアウトの変更後のレシート10の一例を示している。図8(A)のレシート10は、図4(B)のレシート10と同一である。
以下、図8(A)のレシート10から、図8(B)のレシート10へとレイアウトを変更する場合を例にして説明する。
すなわち、区切りK1について、1つの空改行に伴う1行分のスペースから、2つの空改行に伴う2行分のスペースが形成された状態へと変更し、また、区切りK3について、1つの空改行に伴う1行分のスペースから、空改行が行われずスペースがない状態へと変更し、また、区切りK6について、空改行が行われずスペースがない状態から、1つの空改行に伴う1行分のスペースが形成された状態へと変更する場合を例にして説明する。
本実施形態では、上述した第1実施形態と同様、ホストコンピューター3からプリンター2に送信される記録データ80の内容を変更することなく、空改行の態様の変更によるレイアウトの変更を実現する。
FIG. 8A shows the receipt 10 before the layout change due to the change of the blank line feed mode, and FIG. 8B shows an example of the receipt 10 after the layout change. The receipt 10 in FIG. 8A is the same as the receipt 10 in FIG.
Hereinafter, the case where the layout is changed from the receipt 10 in FIG. 8A to the receipt 10 in FIG. 8B will be described as an example.
That is, for the break K1, the space for one line associated with one blank line feed is changed to a state in which a space for two lines associated with two blank line breaks is formed. The line for one line is changed from a space for one blank line to a state without blank line breaks and no spaces, and for the break K6, from a state without blank line breaks and no space for one line line An example of changing to a state in which a space is formed will be described.
In the present embodiment, as in the first embodiment described above, the layout can be changed by changing the blank line feed mode without changing the contents of the recording data 80 transmitted from the host computer 3 to the printer 2.

図9は、本実施形態に係るPOS端末1の機能的構成を示すブロック図である。
図3と図9との比較において明らかなように、本実施形態に係るプリンター2の記憶部54には、規則テーブル72に代えて、区切りテーブル73が記憶されている。区切りテーブル73については、後に詳述する。
FIG. 9 is a block diagram showing a functional configuration of the POS terminal 1 according to the present embodiment.
As is clear from a comparison between FIG. 3 and FIG. 9, a delimiter table 73 is stored in the storage unit 54 of the printer 2 according to this embodiment instead of the rule table 72. The delimiter table 73 will be described in detail later.

図10は、本実施形態に係るプリンター2の動作を示すフローチャートである。
以下の動作の前提として、ホストコンピューター3からプリンター2に記録データ80を含む制御コマンドが送信されており、プリンター2の受信バッファー56に記録データ80が既に格納されているものとする。
まず、プリンター2の記録制御部60は、8つの区切りK1〜K8のそれぞれと、記録データ80における画像記録指示コマンドとを対応づける(ステップSB1)。
詳述すると、例えば、区切りK1は、図4に示すように、文字列記録コマンド群MKG1に係るトップロゴ100と、文字列記録コマンド群MKG2に係る日時情報101との境目に対応する区切りKであるが、この場合、区切りK1を、文字列記録コマンド群MKG1と対応づける。同様に、例えば、区切りK2は、文字列記録コマンド群MKG2に係る日時情報101と、文字列記録コマンド群MKG3に係る明細行の画像との境目に対応する区切りKであるが、この場合、区切りK2を、文字列記録コマンド群MKG2と対応づける。
このように、記録制御部60は、各区切りKについて、各区切りKに対応する部位の直前の画像の記録に係る画像記録指示コマンドを、各区切りKに対応する画像記録指示コマンドとする。なお、第1実施形態と同様、画像記録指示コマンドとは、何らかの画像の記録を指示するコマンド(コマンド群であってもよい)の便宜的な総称であり、具体的には、文字列記録コマンド群MKG、グラフィック記録指示コマンドGS、又は、バーコード記録指示コマンドBSのいずれかのことである。
なお、各区切りKと、各区切りKに対応する画像記録指示コマンドとを列挙すると、区切りK1及び文字列記録コマンド群MKG1、区切りK2及び文字列記録コマンド群MKG2、区切りK3及び文字列記録コマンド群MKG5、区切りK4及び文字列記録コマンド群MKG6、区切りK5及び文字列記録コマンド群MKG7、区切りK6及び文字列記録コマンド群MKG8、区切りK7及びグラフィック記録指示コマンドGS、区切りK8及びバーコード記録指示コマンドBS、がそれぞれ対応関係にあり、ステップSB1では、記録制御部60は、これらコマンド及び区切りKの対応関係を情報として記憶部54に記憶する。
FIG. 10 is a flowchart showing the operation of the printer 2 according to this embodiment.
As a premise of the following operation, it is assumed that a control command including recording data 80 is transmitted from the host computer 3 to the printer 2 and the recording data 80 is already stored in the reception buffer 56 of the printer 2.
First, the recording control unit 60 of the printer 2 associates each of the eight breaks K1 to K8 with the image recording instruction command in the recording data 80 (step SB1).
More specifically, for example, as shown in FIG. 4, the break K1 is a break K corresponding to the boundary between the top logo 100 related to the character string recording command group MKG1 and the date / time information 101 related to the character string recording command group MKG2. In this case, the separator K1 is associated with the character string recording command group MKG1. Similarly, for example, the break K2 is a break K corresponding to the boundary between the date / time information 101 related to the character string recording command group MKG2 and the detailed line image related to the character string recording command group MKG3. K2 is associated with the character string recording command group MKG2.
As described above, for each segment K, the recording control unit 60 sets the image recording instruction command related to the recording of the image immediately before the part corresponding to each segment K as the image recording command corresponding to each segment K. Note that, as in the first embodiment, the image recording instruction command is a convenient generic term for a command (may be a command group) for instructing recording of an image, and specifically, a character string recording command. One of the group MKG, the graphic recording instruction command GS, or the bar code recording instruction command BS.
It should be noted that when each delimiter K and the image recording instruction command corresponding to each delimiter K are listed, the delimiter K1 and character string recording command group MKG1, the delimiter K2 and character string recording command group MKG2, the delimiter K3 and character string recording command group MKG5, separator K4 and character string recording command group MKG6, separator K5 and character string recording command group MKG7, separator K6 and character string recording command group MKG8, separator K7 and graphic recording instruction command GS, separator K8 and barcode recording instruction command BS Are in a correspondence relationship, and in step SB1, the recording control unit 60 stores the correspondence relationship between these commands and the break K in the storage unit 54 as information.

次いで、記録制御部60は、記録データ80に含まれる画像記録指示コマンドを読み出し(ステップSB2)、読み出した画像記録指示コマンドを実行し、画像を記録する(ステップSB3)。上述したように、記録データ80は、画像を記録する順番に、画像記録指示コマンドが並んで構成されたデータであり、記録制御部60は、記録データ80における順番通り、順次、画像記録指示コマンドを読み出して、実行する。
次いで、記録制御部60は、ステップSB3で実行した画像記録指示コマンドに対応する区切りKが存在するか否かを判別する(ステップSB4)。
対応する区切りKが存在しない場合(ステップSB4:NO)、記録制御部60は、ステップSB3で実行した画像記録指示コマンドに続く空改行コマンドKLFについて、読み捨てることなく、全て実行し(ステップSB5)、未実行の画像記録指示コマンドが残っているか否かを判別し(ステップSB6)、残っている場合(ステップSB6:NO)、処理手順をステップSB2へ移行して、画像記録指示コマンドを実行し、一方、残っていない場合(ステップSB6:YES)、処理を終了する。
対応する区切りKが存在しない画像記録指示コマンドとは、例えば、文字列記録コマンド群MKG3や、文字列記録コマンド群MKG4である。
一方、対応する区切りKが存在する場合(ステップSB4:YES)、記録制御部60は、区切りテーブル73を参照する(ステップSB7)。
Next, the recording control unit 60 reads an image recording instruction command included in the recording data 80 (step SB2), executes the read image recording instruction command, and records an image (step SB3). As described above, the recording data 80 is data in which the image recording instruction commands are arranged in the order in which the images are recorded, and the recording control unit 60 sequentially performs the image recording instruction commands in the order in the recording data 80. Is read and executed.
Next, the recording control unit 60 determines whether or not there is a break K corresponding to the image recording instruction command executed in step SB3 (step SB4).
If there is no corresponding break K (step SB4: NO), the recording control unit 60 executes all empty line feed commands KLF following the image recording instruction command executed in step SB3 without discarding them (step SB5). Then, it is determined whether or not an unexecuted image recording instruction command remains (step SB6). If it remains (step SB6: NO), the process proceeds to step SB2, and the image recording instruction command is executed. On the other hand, if it does not remain (step SB6: YES), the process is terminated.
Examples of the image recording instruction command that does not have a corresponding break K are a character string recording command group MKG3 and a character string recording command group MKG4.
On the other hand, when the corresponding break K exists (step SB4: YES), the recording control unit 60 refers to the break table 73 (step SB7).

図11は、区切りテーブル73のデータ構造を模式的に示す図である。
区切りテーブル73は、各区切りKと、各区切りKに対応する部位に実行することが指定された空改行の態様とを対応づけて記憶するテーブルであり、1の件のレコードには、区切りフィールド73aと、空改行態様フィールド73bとが含まれている。
空改行態様フィールド73bには、対応する区切りKにおいて実行すべき空改行の態様を示す情報が格納されている。
例えば、レコードL1は、区切りK1において、空改行を2回行うべきことを示している。
また、空改行態様フィールド73bがnullデータとなっている場合は、対応する区切りKについては、空改行の態様について何ら指定されていないことを示している。この場合、区切りKでは、記録データ80における空改行コマンドKLFに応じて、適宜、空改行が行われる。
FIG. 11 is a diagram schematically showing the data structure of the separation table 73. As shown in FIG.
The delimiter table 73 is a table that stores each delimiter K in association with an empty line feed mode that is specified to be executed at a site corresponding to each delimiter K. One record includes a delimiter field. 73a and an empty line feed mode field 73b are included.
The blank line break mode field 73b stores information indicating a blank line break mode to be executed at the corresponding break K.
For example, the record L1 indicates that an empty line feed should be performed twice at the break K1.
Further, when the blank line break mode field 73b is null data, it is indicated that no corresponding blank line break mode is specified for the corresponding break K. In this case, at the break K, a blank line feed is appropriately performed according to the blank line feed command KLF in the recording data 80.

さて、前掲図10に戻り、ステップSB7において区切りテーブル73を参照した後、記録制御部60は、対応する区切りKについて、空改行の態様が指定されているか否かを判別する(ステップSB8)。
空改行の態様が指定されているとは、区切りテーブル73において、対応する区切りKに係るレコードの空改行態様フィールド73bに、空改行の態様を示す情報が格納されているということであり、一方、空改行の態様が指定されていないとは、区切りテーブル73において、対応する区切りKに係るレコードの空改行態様フィールド73bが、nullデータであることを意味する。
対応する区切りKについて、空改行の態様が指定されていない場合(ステップSB8:NO)、記録制御部60は、処理手順をステップSB5へ移行し、ステップSB3で実行した画像記録指示コマンドに続く空改行コマンドKLFについて、読み捨てることなく、全て実行し(ステップSB5)、未実行の画像記録指示コマンドが残っているか否かを判別し(ステップSB6)、残っている場合(ステップSB6:NO)、処理手順をステップSB2へ移行して、画像記録指示コマンドを実行し、一方、残っていない場合(ステップSB6:YES)、処理を終了する。
一方、対応する区切りKについて、空改行の態様が指定されている場合(ステップSB8:YES)、記録制御部60は、ステップSB3で実行した画像記録指示コマンドに続く空改行コマンドKLFについて、全て、読み捨てる(ステップSB9)。
次いで、記録制御部60は、指定された空改行の態様に準じて、空改行を実行する(ステップSB10)。すなわち、区切りテーブル73の対応するレコードの空改行態様フィールド73bの内容に基づいて、指定された態様で空改行を実行する。
次いで、記録制御部60は、処理手順をステップSB6へ移行する。
Returning to FIG. 10, after referring to the break table 73 in step SB7, the recording control unit 60 determines whether or not a blank line feed mode is specified for the corresponding break K (step SB8).
The empty line break mode is specified in the delimiter table 73, that information indicating the empty line break mode is stored in the empty line break mode field 73b of the record associated with the corresponding break K. That the blank line feed mode is not designated means that the blank line break mode field 73b of the record related to the corresponding break K in the break table 73 is null data.
If no blank line feed mode is designated for the corresponding break K (step SB8: NO), the recording control unit 60 moves the processing procedure to step SB5, and the blank following the image recording instruction command executed in step SB3. All the line feed commands KLF are executed without being discarded (step SB5), it is determined whether or not an unexecuted image recording instruction command remains (step SB6), and if it remains (step SB6: NO), The processing procedure proceeds to step SB2, and an image recording instruction command is executed. On the other hand, when there is no remaining image (step SB6: YES), the processing ends.
On the other hand, when a blank line feed mode is designated for the corresponding break K (step SB8: YES), the recording control unit 60 performs all of the blank line feed command KLF following the image recording instruction command executed in step SB3. It is discarded (step SB9).
Next, the recording control unit 60 executes a blank line feed according to the designated blank line break mode (step SB10). That is, a blank line feed is executed in a specified manner based on the contents of the blank line break manner field 73b of the corresponding record in the delimiter table 73.
Next, the recording control unit 60 moves the processing procedure to Step SB6.

以上のような動作を行うことにより、記録制御部60は、文字列記録コマンド群MKG1を読み出して実行した後、当該コマンドに続く空改行コマンドKLF1を読み飛ばし、区切りテーブル73の内容に基づいて、空改行を2回行う。これにより、図8(B)に示すように、区切りK1に対応する部位に、2行分のスペースが形成される。
同様に、記録制御部60は、文字列記録コマンド群MKG5を読み出して実行した後、当該コマンドに続く空改行コマンドKLF3を読み飛ばし、区切りテーブル73の内容に基づいて、空改行を0回行う(空改行を行わない)。これにより、図8(B)に示すように、区切りK3に対応する部位の、スペースが削除される。
同様に、記録制御部60は、文字列記録コマンド群MKG8を読み出して実行した後、当該コマンドに続く空改行コマンドKLFが存在しないが、区切りテーブル73の内容に基づいて、空改行を1回行う。これにより、図8(B)に示すように、区切りK6に対応する部位に、1行分のスペースが形成される。
これにより、ホストコンピューター3に対し何ら改変を行うことなく、プリンター2により、図8(B)に示すレイアウトに準じて、レシート10を発行することが可能となる。
By performing the operation as described above, the recording control unit 60 reads and executes the character string recording command group MKG1, then skips the blank line feed command KLF1 following the command, and based on the contents of the delimiter table 73, Do two blank breaks. As a result, as shown in FIG. 8B, a space for two rows is formed at a portion corresponding to the break K1.
Similarly, after reading and executing the character string recording command group MKG5, the recording control unit 60 skips the blank line feed command KLF3 following the command and performs blank line breaks 0 times based on the contents of the delimiter table 73 ( Do not do blank line breaks). As a result, as shown in FIG. 8B, the space of the part corresponding to the break K3 is deleted.
Similarly, after reading and executing the character string recording command group MKG8, the recording control unit 60 does not have a blank line feed command KLF following the command, but performs a blank line feed once based on the contents of the delimiter table 73. . As a result, as shown in FIG. 8B, a space for one line is formed at the portion corresponding to the break K6.
Accordingly, the receipt 10 can be issued by the printer 2 according to the layout shown in FIG. 8B without any modification to the host computer 3.

なお、区切りテーブル73における空改行態様フィールド73bの情報を変更することにより、各区切りKにおいて実行すべき空改行の態様を任意に設定することが可能である。
例えば、区切りK2に対応する部位で空改行を3回行うようにする場合、区切りテーブル73において、区切りK2に対応するレコードの空改行態様フィールド73bに、空改行を3回行うことを指示する情報を格納すればよい。
区切りテーブル73の内容の変更は、プリンター2に設けられたスイッチを操作して行えるようにしてもよく、また、プリンター2に専用の端末を接続し、当該端末を操作して行えるようにしてもよい。また、ホストコンピューター3を、ユーザーが、区切りテーブル73の内容の変更を指示する入力を行える構成とすると共に、当該入力に基づいて、区切りテーブル73の内容音変更を指示する専用のコマンドを出力する構成とし、さらに、プリンター2を当該専用のコマンドに基づいて、区切りテーブル73の内容の変更する処理を行う構成としてもよい。
Note that by changing the information in the blank line break mode field 73b in the break table 73, it is possible to arbitrarily set the blank line break mode to be executed in each break K.
For example, when a blank line feed is performed three times at the part corresponding to the break K2, in the break table 73, information indicating that the blank line break mode field 73b of the record corresponding to the break K2 is to be performed three times. Should be stored.
The contents of the separation table 73 can be changed by operating a switch provided in the printer 2, or by connecting a dedicated terminal to the printer 2 and operating the terminal. Good. Further, the host computer 3 is configured such that the user can input to instruct the change of the contents of the separation table 73, and a dedicated command to instruct the change of the contents sound of the separation table 73 is output based on the input. Further, the printer 2 may be configured to change the contents of the separation table 73 based on the dedicated command.

以上説明したように、本実施形態によれば、記録制御部60は、一の画像記録指示コマンド、及び、当該一の画像記録指示コマンドの次に実行すべき次の画像記録指示コマンドについて、当該一の画像記録指示コマンドに係る画像と、当該次の画像記録指示コマンドに係る画像との間が、所定の条件を満たす区切りK(本実施形態では、異なる情報の画像の境目、及び、異なる種類の画像の境目に該当する区切りK)に該当する場合は、これら画像記録指示コマンドの間に存在する空改行コマンドKLFを読み捨てて、当該一の画像記録指示コマンドの実行後、当該次の画像記録指示コマンドの実行前に、当該区切りに対応した改行を行う。
これによれば、一の画像記録指示コマンドに係る画像と、次の画像記録指示コマンドに係る画像との間が、所定の条件を満たす区切りに該当する場合は、これら画像記録指示コマンドの間に存在する改行コマンドを読み捨てて、当該一の画像記録指示コマンドの実行後、当該次の画像記録指示コマンドの実行前に、当該区切りに対応した改行を行うため、ホストコンピューター3からプリンター2に送信する記録データ80の内容を変更することなく、区切りに対応した適切な改行が行われるようにすることが可能となる。
As described above, according to the present embodiment, the recording control unit 60 relates to one image recording instruction command and the next image recording instruction command to be executed next to the one image recording instruction command. Separation K that satisfies a predetermined condition between an image related to one image recording instruction command and an image related to the next image recording instruction command (in this embodiment, the boundary between images of different information and different types In the case of the break K) corresponding to the boundary of the image, the empty line feed command KLF existing between these image recording instruction commands is discarded and the next image recording is executed after the execution of the one image recording instruction command. A line feed corresponding to the break is performed before the command is executed.
According to this, when the interval between the image related to the one image recording instruction command and the image related to the next image recording instruction command falls within a predetermined condition, the interval between these image recording instruction commands An existing line feed command is discarded and sent from the host computer 3 to the printer 2 to execute a line feed corresponding to the delimiter after the execution of the one image recording instruction command and before the execution of the next image recording instruction command. An appropriate line feed corresponding to the break can be performed without changing the content of the recording data 80.

また、本実施形態では、区切りテーブル73を利用して、区切りKごとに、各区切りKに対応して行うべき改行の態様が予め指定されている。
これによれば、各区切りについて、各区切りに対応した適切な態様で改行を行うことが可能となる。
Further, in the present embodiment, using the separation table 73, the form of line breaks to be performed corresponding to each separation K is designated in advance for each separation K.
According to this, it becomes possible to perform a line feed for each delimiter in an appropriate manner corresponding to each delimiter.

なお、上述した実施の形態は、あくまでも本発明の一態様を示すものであり、本発明の範囲内で任意に変形および応用が可能である。
例えば、図3に示す各機能部はハードウェアとソフトウェアの協働により任意に実現可能であり、特定のハードウェア構成を示唆するものではない。
また、上記実施形態では、プリンター2自身が記録制御部60を有する制御部50を備えていたが、例えば、制御部50の機能を、プリンター2に外部接続される別の装置に持たせるようにしても良い。
また、本発明は、サーマル式のプリンターに限らず、インクジェット式プリンター、ドットインパクト式プリンター、レーザープリンター、熱昇華型プリンター等の任意の形式のプリンターに適用可能である。また、ATMにおけるプリンター等、他の装置に組み込まれるプリンターであってもよい。また、CDのレーベル面や、DVDのレーベル面等の紙以外の媒体に記録するものでもよい。
また、本発明を適用可能なプログラムは、ホストコンピューター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 the above-described embodiment, the printer 2 itself includes the control unit 50 including the recording control unit 60. However, for example, the function of the control unit 50 is provided to another device externally connected to the printer 2. May be.
The present invention is not limited to a thermal printer, but can be applied to an arbitrary type of printer such as an ink jet printer, a dot impact printer, a laser printer, or a thermal sublimation printer. Moreover, the printer incorporated in other apparatuses, such as a printer in ATM, may be used. Further, it may be recorded on a medium other than paper, such as a CD label surface or a DVD label surface.
A program to which the present invention is applicable may be included in a printer driver installed in the host computer 3.
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…ホストコンピューター(制御装置)、10…レシート、22…感熱ロール紙(記録媒体)、23…プラテン(搬送部)、24…記録ヘッド、26…搬送モーター(搬送部)、50…制御部、51…プリントエンジン、60…記録制御部、80…記録データ。   DESCRIPTION OF SYMBOLS 2 ... Printer (recording apparatus), 3 ... Host computer (control apparatus), 10 ... Receipt, 22 ... Thermal roll paper (recording medium), 23 ... Platen (conveyance part), 24 ... Recording head, 26 ... Conveyance motor (conveyance) Part), 50 ... control part, 51 ... print engine, 60 ... recording control part, 80 ... recording data.

Claims (5)

制御装置に接続可能な記録装置であって、
記録ヘッドと、
記録媒体を搬送する搬送部と、
前記制御装置から、画像の記録を指示する一の画像記録指示コマンド、改行を指示する改行コマンド、及び前記一の画像記録指示コマンドの次に実行すべき次の画像記録指示コマンドを少なくとも含んで構成される記録データを受信する受信部と、
受信した前記記録データに基づいて、前記記録ヘッド、及び、前記搬送部を制御して、前記記録媒体への記録を行う記録制御部と、を備え、
前記記録制御部は、
前記一の画像記録指示コマンドに係る画像と、前記次の画像記録指示コマンドに係る画像との間が、所定の条件を満たす区切りに該当する場合は、前記一の画像記録指示コマンドと前記次の画像記録指示コマンドの間に存在する前記改行コマンドを読み捨て、前記一の画像記録指示コマンドの実行後、前記次の画像記録指示コマンドの実行前に、当該区切りに対応した改行を行うことを特徴とする記録装置。
A recording device connectable to a control device,
A recording head;
A transport unit for transporting the recording medium;
From the control device, the image recording instruction to one image recording instruction command, the line feed command, and the next image recording command to be executed next the one image recording command of at least comprise instructing line feed A receiving unit for receiving the configured recording data;
A recording control unit for controlling the recording head and the transport unit based on the received recording data to perform recording on the recording medium,
The recording control unit
In a case where a gap between the image related to the one image recording instruction command and the image related to the next image recording instruction command falls within a predetermined condition , the one image recording instruction command and the next image recording instruction command Abandoning the line feed command existing between image recording instruction commands, and executing a line break corresponding to the delimiter after executing the one image recording instruction command and before executing the next image recording instruction command, Recording device.
前記画像記録指示コマンドは、文字列と、グラフィックと、バーコードと3つの種類に係る画像の情報のいずれか一つを少なくとも指定可能であることを特徴とする請求項に記載の記録装置。 The recording apparatus according to claim 1 , wherein the image recording instruction command can designate at least one of character information, graphics, barcode, and image information of three types. 前記区切りごとに、各区切りに対応して行うべき改行の態様が予め定められていることを特徴とする請求項に記載の記録装置。 The recording apparatus according to claim 1 , wherein a mode of line feed to be performed corresponding to each segment is predetermined for each segment. 制御装置に接続可能であり、記録ヘッドと、記録媒体を搬送する搬送部と、を備えた記録装置の制御方法であって、
前記制御装置から、画像の記録を指示する一の画像記録指示コマンド、改行を指示する改行コマンド、及び前記一の画像記録指示コマンドの次に実行すべき次の画像記録指示コマンドを少なくとも含んで構成される記録データを受信し、
受信した前記記録データに基づいて、前記一の画像記録指示コマンドに係る画像と、前記次の画像記録指示コマンドに係る画像との間が、所定の条件を満たす区切りに該当する場合は、前記一の画像記録指示コマンドと前記次の画像記録指示コマンドの間に存在する前記改行コマンドを読み捨て、前記一の画像記録指示コマンドの実行後、前記次の画像記録指示コマンドの実行前に、当該区切りに対応した改行を行い、前記記録ヘッド、及び、前記搬送部を制御して前記記録媒体への記録を行うことを特徴とする記録装置の制御方法。
A control method of a recording apparatus that can be connected to a control apparatus, and includes a recording head and a transport unit that transports a recording medium,
From the control device, comprises one image recording instruction command for instructing recording of an image, line feed command instructs the new line, and the next image recording command to be executed next to the first image recording command of at least Receive the recorded data consisting of
Based on the received recording data, if the interval between the image related to the one image recording instruction command and the image related to the next image recording instruction command falls within a predetermined condition , The line feed command existing between the image recording instruction command and the next image recording instruction command is discarded, and after the execution of the one image recording instruction command, before the execution of the next image recording instruction command, A control method for a recording apparatus, wherein a corresponding line feed is performed, and recording is performed on the recording medium by controlling the recording head and the transport unit.
制御装置に接続可能であり、記録ヘッドと、記録媒体を搬送する搬送部と、前記制御装置から、画像の記録を指示する一の画像記録指示コマンド、改行を指示する改行コマンド及び前記一の画像記録指示コマンドの次に実行すべき次の画像記録指示コマンドを少なくとも含んで構成される記録データを受信する受信部と、を備える記録装置の各部を制御する制御部により実行されるプログラムであって、
前記制御部を、
受信した前記記録データに基づいて、前記記録ヘッド、及び、前記搬送部を制御して、前記記録媒体への記録を行い、
前記一の画像記録指示コマンドに係る画像と、前記次の画像記録指示コマンドに係る画像との間が、所定の条件を満たす区切りに該当する場合は、前記一の画像記録指示コマンドと前記次の画像記録指示コマンドの間に存在する前記改行コマンドを読み捨て、前記一の画像記録指示コマンドの実行後、前記次の画像記録指示コマンドの実行前に、当該区切りに対応した改行を行う記録制御部として機能させることを特徴とするプログラム。
It can be connected to the control device, and the recording head, and a conveying unit that conveys the recording medium, from the controller, one image recording instruction command for instructing recording of an image, line feed command and the one indicating the new line A program that is executed by a control unit that controls each unit of the recording apparatus, and a reception unit that receives recording data including at least a next image recording instruction command to be executed next to the image recording instruction command. And
The control unit
Based on the received recording data, the recording head and the transport unit are controlled to perform recording on the recording medium,
In a case where a gap between the image related to the one image recording instruction command and the image related to the next image recording instruction command falls within a predetermined condition , the one image recording instruction command and the next image recording instruction command As a recording control unit that discards the line feed command existing between image recording instruction commands, and executes a line break corresponding to the break after execution of the one image recording instruction command and before execution of the next image recording instruction command A program characterized by functioning.
JP2011104598A 2011-05-09 2011-05-09 RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM Active JP5810616B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011104598A JP5810616B2 (en) 2011-05-09 2011-05-09 RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011104598A JP5810616B2 (en) 2011-05-09 2011-05-09 RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM

Publications (3)

Publication Number Publication Date
JP2012232562A JP2012232562A (en) 2012-11-29
JP2012232562A5 JP2012232562A5 (en) 2014-05-29
JP5810616B2 true JP5810616B2 (en) 2015-11-11

Family

ID=47433378

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011104598A Active JP5810616B2 (en) 2011-05-09 2011-05-09 RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM

Country Status (1)

Country Link
JP (1) JP5810616B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6413483B2 (en) * 2014-08-25 2018-10-31 セイコーエプソン株式会社 Printing apparatus, control method, and program

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59148933A (en) * 1983-02-14 1984-08-25 Casio Comput Co Ltd List printing system
JPH05305753A (en) * 1992-04-30 1993-11-19 Brother Ind Ltd Printer
JP3711431B2 (en) * 1998-04-14 2005-11-02 セイコーエプソン株式会社 Printing apparatus, printing apparatus control method, and information recording medium
JP2003127502A (en) * 2001-10-24 2003-05-08 Sharp Corp Printer
JP2005141649A (en) * 2003-11-10 2005-06-02 Seiko Epson Corp POS system, electronic receipt issuing system, electronic receipt issuing method and program

Also Published As

Publication number Publication date
JP2012232562A (en) 2012-11-29

Similar Documents

Publication Publication Date Title
JP5810609B2 (en) RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
JP5909871B2 (en) Recording device
US8988702B2 (en) Printing apparatus and printing method
US10430697B2 (en) Printer and method for processing string information
US9898691B2 (en) Control device, control system, and control method of a control device
KR101429850B1 (en) Recording device and control method of a recording device
US9058133B2 (en) Control device, control method for a control device, and recording medium
JP5810616B2 (en) RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
JP2013242802A (en) Media processing device, and pos system
EP2889753A1 (en) Receipt printing system, control method for receipt printing system, and control device
JP5862045B2 (en) RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
JP2015189104A (en) Printer and control method of the same
JP6056196B2 (en) Medium processing apparatus and POS system
JP5760705B2 (en) RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
JP4492261B2 (en) PRINT CONTROL DEVICE, CONTROL METHOD AND PROGRAM FOR PRINT CONTROL DEVICE
JP2018130916A (en) Printing apparatus and method for controlling printing apparatus
JP6019749B2 (en) Medium processing apparatus and POS system
JP6756218B2 (en) Printing device and control method of printing device
JP6032334B2 (en) Control device and recording system
JP2014054846A (en) Control device, control method for control device, and program
JP2006007523A (en) Printing apparatus, program, and printing method
JP2011173297A (en) Controller, control method and program thereof
JP2013025556A (en) Control device, control method of control device, and program
JP2012101391A (en) Recording apparatus, method for controlling the same, and program
JP2012141345A (en) Control method of controller, controller, and program

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140410

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140410

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150227

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150310

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150428

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20150818

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150831

R150 Certificate of patent or registration of utility model

Ref document number: 5810616

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350