JP5810616B2 - RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM - Google Patents
RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM Download PDFInfo
- 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
Links
- 238000000034 method Methods 0.000 title claims description 16
- PWPJGUXAGUPAHP-UHFFFAOYSA-N lufenuron Chemical compound C1=C(Cl)C(OC(F)(F)C(C(F)(F)F)F)=CC(Cl)=C1NC(=O)NC(=O)C1=C(F)C=CC=C1F PWPJGUXAGUPAHP-UHFFFAOYSA-N 0.000 title 1
- 230000032258 transport Effects 0.000 claims description 15
- 230000008859 change Effects 0.000 description 22
- 238000005034 decoration Methods 0.000 description 13
- 238000010586 diagram Methods 0.000 description 11
- 238000012545 processing Methods 0.000 description 11
- 238000000926 separation method Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 101001046587 Homo sapiens Krueppel-like factor 1 Proteins 0.000 description 5
- 102100022248 Krueppel-like factor 1 Human genes 0.000 description 5
- 101001139136 Homo sapiens Krueppel-like factor 3 Proteins 0.000 description 4
- 102100020678 Krueppel-like factor 3 Human genes 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 4
- 101001139146 Homo sapiens Krueppel-like factor 2 Proteins 0.000 description 3
- 101001139134 Homo sapiens Krueppel-like factor 4 Proteins 0.000 description 3
- 101001139130 Homo sapiens Krueppel-like factor 5 Proteins 0.000 description 3
- 102100020675 Krueppel-like factor 2 Human genes 0.000 description 3
- 102100020677 Krueppel-like factor 4 Human genes 0.000 description 3
- 102100020680 Krueppel-like factor 5 Human genes 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000002093 peripheral effect Effects 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 238000010438 heat treatment Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000001454 recorded image Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 238000000859 sublimation Methods 0.000 description 1
- 230000008022 sublimation Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 238000011144 upstream manufacturing Methods 0.000 description 1
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.
ところで、記録媒体に記録される画像のレイアウトや、バランスを変更するため、改行の態様の変更が求められることがある。
しかしながら、上述したシステムにおいて、改行の態様を変更するためには、制御装置から送信する記録データにおける改行コマンドの態様を変更する必要があった。この場合、制御装置に対して、プログラム修正等の改変を行う必要があるが、制御装置に対する改変は、相当な煩雑な作業を伴う場合があったり、また、記録装置と制御装置との開発の主体が異なる等の理由により制御装置に改変を行えない場合があったりする等の理由のため、できるだけ避けたいとするニーズがあった。
本発明は、上述した事情に鑑みてなされたものであり、制御装置から記録装置に送信する記録データを変更することなく、所望の改行を行えるようにすることを目的とする。
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実施形態>
図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
The
When issuing the
また、図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
The
The
図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
As shown in FIG. 1, the
図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
The host-
The host
The host-
As described above, the
The host-
The host
プリンター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
The
The
The
The
The
The
次いで、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
The POS application execution unit 40a executes the POS application preinstalled in the
The printer
The control command is a group of commands for causing the
The recording data 80 (FIG. 4A) is information on the image to be recorded on the
Control commands output from the
次いで、記録データ80、及び、記録データ80に基づいて画像が記録されたレシート10の具体例について、説明する。
Next, a specific example of the
図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
In the
本実施形態では、プリンター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
More specifically, first, a
In the present embodiment, with the exception of predetermined exceptions, the
Further, the
Hereinafter, the boundary between the
The “separator K” refers to the boundary between images having different information contents, such as the
さらに、日時情報101から1行分のスペースを空けて、購入商品情報102が記録される。購入商品情報102とは、レシート10を受け取るべき顧客が購入した商品の名称と、その商品の単価との一覧を示す情報である。図4(B)に示すように、商品の名称と、その商品の単価とは、同一行に記録される。以下、商品の名称と、商品の単価とが記録された1つの行のことを「明細行」という。明細行と明細行との間には、1又は複数行分のスペースが形成されることなく、一の明細行の次の行に、次の明細行が記録される。
以下、日時情報101と購入商品情報102との境目のことを区切りK2と称する。
さらに、購入商品情報102から1行分のスペースを空けて、合計購入金額情報103が記録される。合計購入金額情報103とは、レシート10に係る会計における合計購入金額を示す情報である。
以下、購入商品情報102と合計購入金額情報103との境目のことを区切りK3と称する。
Further, the purchased
Hereinafter, the boundary between the
Further, the total
Hereinafter, the boundary between the purchased
さらに、合計購入金額情報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
The fixed
Hereinafter, the boundary between the total
Further, the
Hereinafter, the boundary between the
Further, the
Hereinafter, the boundary between the
Further, the
Hereinafter, the boundary between the
記録データ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
The
That is, referring to FIG. 4A, the character string recording command group MKG1 is a command group for recording the
The character string decoration command MS1 is a command for designating decoration to be applied to the
The character string recording instruction command MK1 is a command for instructing to record the
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
More specifically, a font table 70 is stored in the
In the present embodiment, “characters” to be recorded on the
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
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
文字列記録コマンド群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
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
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
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
文字列記録コマンド群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
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
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
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
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
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
文字列記録コマンド群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
Specifically, a registered graphic table 71 is stored in the
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
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
The graphic recording instruction command GS includes a line feed command LF. After the
グラフィック記録指示コマンド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
The bar code recording instruction command BS includes a line feed command LF. After the
ところで、レシート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
For example, a line break between images is omitted for the purpose of saving
However, conventionally, in the POS terminal 1, in order to change the line feed mode in the
In this case, it is necessary to modify the
Based on the above, in the present embodiment, the
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
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
図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
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
The break K8 is a break formed after the
The
図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
As a premise of the following operation, a control command including the
In the following description, the function of the
First, the
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
次いで、記録制御部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
For example, if the
Next, in step SA2, the
In the present embodiment, the types of images include character strings (images recorded using font data), graphics (
Next, the
図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
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
The record R3 is a record corresponding to the
さて、前掲図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
That is, the
Next, the
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
以上のような動作を行うことにより、ホストコンピューター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
なお、規則テーブル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
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
The contents of the rule table 72 can be changed by operating a switch provided in the
以上説明したように、本実施形態では、記録制御部60は、記録データ80に含まれる改行コマンドを読み捨て、所定の規則に従って改行を行う。
これによれば、記録データ80に含まれる改行コマンドが読み捨てられた上で、改行コマンドに基づく改行に代えて、所定の規則に従って、自動で、改行が行われることとなり、ホストコンピューター3からプリンター2に送信する記録データ80を変更することなく、所望の改行が行われるようにすることが可能となる。
As described above, in this embodiment, the
According to this, after the line feed command included in the
また、本実施形態では、記録制御部60は、画像記録指示コマンド、及び、当該画像記録指示コマンドに基づく画像の記録後の改行を指示する空改行コマンドKLFについて、当該画像記録指示コマンドに基づく画像の記録後、当該空改行コマンドKLFを読み捨て、当該画像記録指示コマンドに係る画像の種類に対応した改行を行う。
これによれば、画像記録指示コマンド、及び、当該画像記録指示コマンドに基づく画像の記録後の改行を指示する空改行コマンドKLFについて、当該画像記録指示コマンドに基づく画像の記録後、当該空改行コマンドKLFを読み捨て、当該画像記録指示コマンドに係る画像の種類に対応した改行を行うため、ホストコンピューター3からプリンター2に送信する記録データ80の内容を変更することなく、画像を記録した後、画像の種類に対応した適切な改行が行われるようにすることが可能となる。
なお、記録制御部60は、画像記録指示コマンド、及び、当該画像記録指示コマンドに基づく画像の記録「前」の改行を指示する空改行コマンドKLFについて、当該画像記録指示コマンドに基づく画像の記録前に、当該空改行コマンドKLFを読み捨て、当該画像記録指示コマンドに係る画像の種類に対応した改行を行うようにしてもよい。
In the present embodiment, the
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
Note that the
また、本実施異形態では、画像記録指示コマンドは、文字列と、グラフィックと、バーコードとの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
The
As described above, the break K is, as shown in FIG. 4B, between images with different contents, such as the
図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
Hereinafter, the case where the layout is changed from the
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
図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
図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
As a premise of the following operation, it is assumed that a control command including recording
First, the
More specifically, for example, as shown in FIG. 4, the break K1 is a break K corresponding to the boundary between the
As described above, for each segment K, the
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
次いで、記録制御部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
Next, the
If there is no corresponding break K (step SB4: NO), the
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
図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
The blank line
For example, the record L1 indicates that an empty line feed should be performed twice at the break K1.
Further, when the blank line
さて、前掲図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
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
If no blank line feed mode is designated for the corresponding break K (step SB8: NO), the
On the other hand, when a blank line feed mode is designated for the corresponding break K (step SB8: YES), the
Next, the
Next, the
以上のような動作を行うことにより、記録制御部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
Similarly, after reading and executing the character string recording command group MKG5, the
Similarly, after reading and executing the character string recording command group MKG8, the
Accordingly, the
なお、区切りテーブル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
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
The contents of the separation table 73 can be changed by operating a switch provided in the
以上説明したように、本実施形態によれば、記録制御部60は、一の画像記録指示コマンド、及び、当該一の画像記録指示コマンドの次に実行すべき次の画像記録指示コマンドについて、当該一の画像記録指示コマンドに係る画像と、当該次の画像記録指示コマンドに係る画像との間が、所定の条件を満たす区切りK(本実施形態では、異なる情報の画像の境目、及び、異なる種類の画像の境目に該当する区切りK)に該当する場合は、これら画像記録指示コマンドの間に存在する空改行コマンドKLFを読み捨てて、当該一の画像記録指示コマンドの実行後、当該次の画像記録指示コマンドの実行前に、当該区切りに対応した改行を行う。
これによれば、一の画像記録指示コマンドに係る画像と、次の画像記録指示コマンドに係る画像との間が、所定の条件を満たす区切りに該当する場合は、これら画像記録指示コマンドの間に存在する改行コマンドを読み捨てて、当該一の画像記録指示コマンドの実行後、当該次の画像記録指示コマンドの実行前に、当該区切りに対応した改行を行うため、ホストコンピューター3からプリンター2に送信する記録データ80の内容を変更することなく、区切りに対応した適切な改行が行われるようにすることが可能となる。
As described above, according to the present embodiment, the
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
また、本実施形態では、区切りテーブル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
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
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
2…プリンター(記録装置)、3…ホストコンピューター(制御装置)、10…レシート、22…感熱ロール紙(記録媒体)、23…プラテン(搬送部)、24…記録ヘッド、26…搬送モーター(搬送部)、50…制御部、51…プリントエンジン、60…記録制御部、80…記録データ。
DESCRIPTION OF
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.
前記制御装置から、画像の記録を指示する一の画像記録指示コマンド、改行を指示する改行コマンド、及び前記一の画像記録指示コマンドの次に実行すべき次の画像記録指示コマンドを少なくとも含んで構成される記録データを受信し、
受信した前記記録データに基づいて、前記一の画像記録指示コマンドに係る画像と、前記次の画像記録指示コマンドに係る画像との間が、所定の条件を満たす区切りに該当する場合は、前記一の画像記録指示コマンドと前記次の画像記録指示コマンドの間に存在する前記改行コマンドを読み捨て、前記一の画像記録指示コマンドの実行後、前記次の画像記録指示コマンドの実行前に、当該区切りに対応した改行を行い、前記記録ヘッド、及び、前記搬送部を制御して前記記録媒体への記録を行うことを特徴とする記録装置の制御方法。 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.
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)
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)
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 |
-
2011
- 2011-05-09 JP JP2011104598A patent/JP5810616B2/en active Active
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 |