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

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

Info

Publication number
JP5862045B2
JP5862045B2 JP2011099826A JP2011099826A JP5862045B2 JP 5862045 B2 JP5862045 B2 JP 5862045B2 JP 2011099826 A JP2011099826 A JP 2011099826A JP 2011099826 A JP2011099826 A JP 2011099826A JP 5862045 B2 JP5862045 B2 JP 5862045B2
Authority
JP
Japan
Prior art keywords
image
recording
information
character string
unit
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.)
Expired - Fee Related
Application number
JP2011099826A
Other languages
Japanese (ja)
Other versions
JP2012228847A (en
JP2012228847A5 (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 JP2011099826A priority Critical patent/JP5862045B2/en
Publication of JP2012228847A publication Critical patent/JP2012228847A/en
Publication of JP2012228847A5 publication Critical patent/JP2012228847A5/ja
Application granted granted Critical
Publication of JP5862045B2 publication Critical patent/JP5862045B2/en
Expired - Fee Related 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)
  • Handling Of Sheets (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 for controlling the recording apparatus.

従来、制御装置(ホストPC)に接続可能に構成され、記録ヘッド(印字ヘッド)と、この記録ヘッドの搬送方向下流側に配置された切断部(切断装置)とを備えた記録装置(プリンター)が知られている(例えば、特許文献1参照)。   2. Description of the Related Art Conventionally, a recording apparatus (printer) that is configured to be connectable to a control apparatus (host PC) and includes a recording head (printing head) and a cutting unit (cutting apparatus) disposed on the downstream side in the transport direction of the recording head. Is known (see, for example, Patent Document 1).

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

上述した記録装置では、記録ヘッドと切断部との搬送方向における離間に起因して発生する記録媒体の先端と、記録媒体に記録される画像の先端とのマージンをできるだけ縮小し、記録媒体の無駄な消費を抑制したいとするニーズがある。特に、制御装置に、当該ニーズに応えるための特別な動作をさせたり、また、通常と異なる特別な制御コマンドを記録装置に出力させたりすることなく当該ニーズに応えることにより、制御装置に実装されたプログラム、各種機構の改変をできるだけ避けたいとするニーズがある。
本発明は、上述した事情に鑑みてなされたものであり、制御装置に対する改変を行うことなく、記録ヘッドと切断部との搬送方向における離間に起因して発生する記録媒体の先端と、記録媒体に記録される画像の先端とのマージンをできるだけ縮小することを目的とする。
In the recording apparatus described above, the margin between the leading edge of the recording medium generated due to the separation in the transport direction between the recording head and the cutting unit and the leading edge of the image recorded on the recording medium is reduced as much as possible, and the recording medium is wasted. There is a need to reduce consumption. In particular, it is implemented in the control device by responding to the need without causing the control device to perform a special operation to respond to the need or outputting a special control command different from normal to the recording device. There is a need to avoid altering programs and various mechanisms as much as possible.
The present invention has been made in view of the above-described circumstances, and the front end of the recording medium generated due to the separation in the transport direction between the recording head and the cutting unit without modifying the control device, and the recording medium An object of the present invention is to reduce the margin with the leading edge of the image recorded in the image as much as possible.

上記目的を達成するために、本発明の記録装置は、記録ヘッドと、記録媒体を搬送方向に搬送する搬送部と、前記記録ヘッドの前記搬送方向下流に配置され、前記記録媒体を切断する切断部と、前記記録媒体の先端部の所定の範囲に記録され、文字列を含む第1の画像の情報及び前記所定の範囲と異なる範囲に記録させる第2の画像の情報を含む制御コマンドを受信する受信部と、前記受信部で受信した前記制御コマンドに基づいて、前記記録ヘッドでの前記記録媒体への記録、前記搬送部での前記記録媒体の搬送、及び、前記切断部での前記記録媒体の切断を制御する記録制御部と、前記受信部で前記制御コマンドを受信した場合、前記制御コマンドに含まれる画像の情報から、予め設定された所定の文字列であるキーワード文字列を検出し、前記画像の情報の先頭から前記キーワード文字列に至るまでの情報を、前記第1の画像の情報として抽出し、記憶する先頭画像情報記憶部と、を備え、前記記録制御部は、前記切断部での前記記録媒体の切断を制御する場合、前記先頭画像情報記憶部で記憶した前記第1の画像の情報に基づいて、前記記録媒体の切断位置の前記搬送方向上流側に、前記記録ヘッドで前記第1の画像の情報を記録させ、前記記録媒体の切断位置が前記切断部に対応する位置に至るまで前記搬送部で前記記録媒体を搬送させて、前記切断部で前記記録媒体を切断させ、前記第1の画像を記録した後、前記受信部により新たに前記制御コマンドを受信した場合、新たな前記制御コマンドに含まれる前記画像の情報のうち、前記先頭画像情報記憶部で記憶した前記第1の画像の情報以外の情報に基づいて、記録した前記第1の画像に続けて画像の記録を行うことを特徴とする。
また、本発明の記録装置は、前記先頭画像情報記憶部は、前記第1の画像の情報が記憶されていない状態のときに前記受信部で前記制御コマンドを受信した場合、前記第1の画像の情報を記憶する。
また、本発明の記録装置は、前記先頭画像情報記憶部は、前記第1の画像の情報に、前記第1の画像を構成する文字列の装飾に係る付加情報が含まれている場合は、前記付加情報を記憶する。
また、本発明の記録装置の制御方法は、記録媒体の先端部の所定の範囲に記録され、文字列を含む第1の画像の情報及び前記所定の範囲と異なる範囲に記録させる第2の画像の情報を含む制御コマンドを受信部で受信し、前記制御コマンドに含まれる画像の情報から、予め設定された所定の文字列であるキーワード文字列を検出し、前記画像の情報の先頭から前記キーワード文字列に至るまでの情報を、前記第1の画像の情報として抽出して記憶し、記録ヘッドで前記第1の画像の情報及び前記第2の画像の情報を記録し、前記記録媒体を搬送し、前記記録ヘッドで前記第1の画像の情報を前記記録媒体に記録し、前記記録媒体の切断位置が切断部に対応する位置に至るまで前記記録媒体を搬送し、前記切断部で前記記録媒体を切断し、前記受信部新たに前記制御コマンドを受信した場合、新たな前記制御コマンドに含まれる前記画像の情報のうち、憶した前記第1の画像の情報以外の情報に基づいて、記録した前記第1の画像に続けて画像の記録を行うことを特徴とする。
また、本発明のプログラムは、記録ヘッドと、記録媒体を搬送方向に搬送する搬送部と、前記記録ヘッドの前記搬送方向下流に配置され、前記記録媒体を切断する切断部と、前記記録媒体の先端部の所定の範囲に記録され、文字列を含む第1の画像の情報及び前記所定の範囲と異なる範囲に記録させる第2の画像の情報を含む制御コマンドを受信する受信部と、を備える記録装置を制御する制御部で実行されるプログラムであって、前記制御コマンドを前記受信部に受信させ、前記制御コマンドに含まれる画像の情報から、予め設定された所定の文字列であるキーワード文字列を検出し、前記画像の情報の先頭から前記キーワード文字列に至るまでの情報を、前記第1の画像の情報として抽出して記憶させ、前記記録ヘッドで前記第1の画像の情報及び前記第2の画像の情報を記録させ、前記搬送部で前記記録媒体を搬送させ、前記記録ヘッドで前記第1の画像の情報を前記記録媒体に記録させ、前記記録媒体の切断位置が前記切断部に対応する位置に至るまで前記記録媒体を前記搬送部で搬送させ、前記切断部で前記記録媒体を切断させ、前記第1の画像を記録した後、前記受信部新たに前記制御コマンドを受信した場合、新たな前記制御コマンドに含まれる前記画像の情報のうち、憶した前記第1の画像の情報以外の情報に基づいて、記録した前記第1の画像に続けて画像の記録を行わせることを特徴とする。
上記目的を達成するために、本発明は、制御装置に接続可能な記録装置であって、記録ヘッドと、記録媒体を搬送方向に搬送する搬送部と、前記記録ヘッドの搬送方向下流に配置され、前記記録媒体を切断する切断部と、前記制御装置から、少なくとも前記記録媒体に記録すべき画像の情報を含む記録データを含む制御コマンドを受信する受信部と、前記受信部により受信した前記制御コマンドに基づいて、前記記録ヘッド、前記搬送部、及び、前記切断部を制御して、前記記録媒体への記録、前記記録媒体の搬送、及び、前記記録媒体の切断を行う記録制御部と、前記受信部により前記制御コマンドを受信した場合、前記記録データに含まれる画像の情報に基づいて、前記記録媒体に記録すべき画像のうち、前記記録媒体の先端部の所定の範囲に記録される画像である先頭画像の情報を抽出し、記憶する先頭画像情報記憶部と、を備え、前記記録制御部は、前記切断部により前記記録媒体を切断する場合、前記先頭画像情報記憶部により記憶した前記先頭画像の情報に基づいて、前記記録媒体の切断位置の搬送方向上流側に、前記記録ヘッドにより前記先頭画像を記録させつつ、前記記録媒体の切断位置が前記切断部に対応する位置に至るまで前記搬送部により前記記録媒体を搬送させて、前記切断部により前記記録媒体を切断すること、を特徴とする。
この構成によれば、記録装置は、制御装置から入力された制御コマンドに含まれる記録データから、先頭画像の情報を抽出して記憶しておき、記録媒体を切断する際は、切断のための搬送と併せて、記録媒体における切断位置の搬送方向上流側に先頭画像を記録するため、記録ヘッドと切断部との搬送方向における離間に起因して発生する記録媒体の先端と、記録媒体に記録される画像の先端とのマージンをできるだけ縮小することが可能となる。
特に、制御装置は、記録装置に対して通常の制御コマンドを出力すれば、記録装置側で、自動で、先頭画像の情報が記憶され、以後は、当該先頭画像の情報に基づいて、記録媒体の切断のための搬送に伴う先頭画像の記録が実行されるため、制御装置に係るプログラムや、各種機構に対して改変を行う必要がない。
To achieve the above object, a recording apparatus of the present invention includes a recording head, a conveyance unit for conveying the recording medium in the conveying direction, it is arranged downstream of the transport direction of the recording head, which cuts the recording medium A cutting command and a control command recorded in a predetermined range of the leading end of the recording medium and including information on a first image including a character string and information on a second image recorded in a range different from the predetermined range Based on the receiving unit for receiving and the control command received by the receiving unit, recording on the recording medium by the recording head, conveyance of the recording medium by the conveying unit, and the cutting unit by the cutting unit When the control command is received by the recording control unit that controls cutting of the recording medium and the receiving unit, a keyword character string that is a predetermined character string set in advance is detected from image information included in the control command. And the information from the head of information of the image up to the keyword string is extracted as information of the first image, and an top image information storage unit for storing, the recording control unit, the when controlling the cutting of said recording medium at the cutting portion, on the basis of the said information of the first image stored in said first image information storage unit, on the upstream side in the transport direction of the cutting position of the recording medium, wherein The information of the first image is recorded by a recording head, the recording medium is conveyed by the conveying unit until the cutting position of the recording medium reaches a position corresponding to the cutting unit, and the recording medium is obtained by the cutting unit. When the control command is newly received by the receiving unit after the first image is recorded, the head image information storage unit among the information of the image included in the new control command Remember Based on the first information other than the information of the image, and performs recording of images following the recorded first image.
Further, in the recording apparatus of the present invention, when the head image information storage unit receives the control command at the receiving unit when the information of the first image is not stored, the first image information storage unit The information is memorized.
Further, in the recording apparatus of the present invention, when the first image information storage unit includes the additional information related to the decoration of the character string constituting the first image in the information of the first image, The additional information is stored.
Also, the control method of the recording apparatus of the present invention is a second image recorded in a predetermined range at the leading end portion of the recording medium and recorded in the first image information including a character string and a range different from the predetermined range. receiving a control command including information by the receiving unit, from the information of the image included in the control command, detect the keyword string is preset predetermined character string, the beginning of the information of the image keywords The information up to the character string is extracted and stored as the information of the first image, the information of the first image and the information of the second image are recorded by the recording head, and the recording medium is conveyed. The information of the first image is recorded on the recording medium by the recording head, the recording medium is conveyed until the cutting position of the recording medium reaches a position corresponding to the cutting portion, and the recording is performed by the cutting portion. Cut the medium and said When receiving a new said control command signal portion, of the information of the image included in the new said control command, based on remembers the information other than the information of the first image, it recorded the first It is characterized in that an image is recorded following the image.
The program of the present invention includes a recording head, a conveyance unit for conveying the recording medium in the conveying direction, it is arranged downstream of the transport direction of the recording head, and a cutting unit for cutting the recording medium, said recording medium A receiving unit that receives a control command that includes information on a first image that is recorded in a predetermined range of the leading end of the first image and includes information on a second image that is recorded in a range different from the predetermined range. A keyword that is a program executed by a control unit that controls a recording apparatus provided, the control command being received by the reception unit, and a predetermined character string set in advance from information on an image included in the control command detecting a character string, the information from the head of information of the image up to the keyword string extracted and stored as the information of the first image, the first image in the recording head And the information on the second image are recorded, the recording medium is conveyed by the conveyance unit, the information on the first image is recorded on the recording medium by the recording head, and the cutting position of the recording medium There is conveyed to the recording medium up to the position corresponding to the cut portion in the transport portion, the cutting portion is cut the recording medium, after recording the first image, a new said by the receiving unit when receiving the control command, among the information of the image included in the new said control command, based on remembers the first information other than the image, following the recorded first picture It is characterized in that recording is performed.
In order to achieve the above object, the present invention is a recording apparatus that can be connected to a control device, and is disposed downstream of the recording head, a transport unit that transports the recording medium in the transport direction, and the transport direction of the recording head. A cutting unit for cutting the recording medium, a receiving unit for receiving a control command including recording data including at least information of an image to be recorded on the recording medium from the control device, and the control received by the receiving unit A recording control unit for controlling the recording head, the conveying unit, and the cutting unit based on a command to perform recording on the recording medium, conveyance of the recording medium, and cutting of the recording medium; When the control command is received by the receiving unit, based on the information of the image included in the recording data, among the images to be recorded on the recording medium, a predetermined part of the leading end of the recording medium A first image information storage unit that extracts and stores information of a first image that is an image recorded in the box, and the recording control unit includes the first image information when the recording medium is cut by the cutting unit. Based on the information of the head image stored in the storage unit, the cutting position of the recording medium is recorded in the cutting unit while the head image is recorded by the recording head on the upstream side in the transport direction of the cutting position of the recording medium. The recording medium is transported by the transport unit until a corresponding position is reached, and the recording medium is cut by the cutting unit.
According to this configuration, the recording device extracts and stores the information of the head image from the recording data included in the control command input from the control device, and when cutting the recording medium, Along with the conveyance, the leading image is recorded on the upstream side in the conveyance direction of the cutting position in the recording medium, so that the leading edge of the recording medium caused by the separation in the conveyance direction between the recording head and the cutting unit It is possible to reduce the margin with the leading edge of the image to be reduced as much as possible.
In particular, if the control device outputs a normal control command to the recording device, the information on the first image is automatically stored on the recording device side, and thereafter, the recording medium is recorded based on the information on the first image. Since the recording of the head image accompanying the conveyance for cutting is executed, it is not necessary to modify the program relating to the control device and various mechanisms.

また、上記発明の記録装置であって、本発明は、前記先頭画像情報記憶部は、前記先頭画像の情報が記憶されていない状態のときに前記受信部により前記制御コマンドを受信した場合、前記先頭画像の情報を記憶することを特徴とする。
この構成によれば、先頭画像の情報が記憶されていない状態のときに、制御コマンドに基づく先頭画像の情報の記憶が行われ、以後は、記憶した先頭画像の情報に基づく先頭画像の記録が行われることとなり、先頭画像の情報の記録に係る処理の回数を削減でき、処理効率が向上する。
なお、先頭画像の情報が記憶されていない場合としては、例えば、記録装置が初めて制御コマンドを受信した場合や、先頭画像の情報をRAM等の不揮発性メモリーに記憶する構成としたときに、電源をオフした後、再投入する場合等が想定されている。
Further, in the recording apparatus according to the above invention, in the present invention, when the head image information storage unit receives the control command by the receiving unit when the information of the head image is not stored, The information of the head image is stored.
According to this configuration, when the first image information is not stored, the first image information is stored based on the control command. Thereafter, the first image is recorded based on the stored first image information. As a result, the number of times of processing related to recording of the information of the head image can be reduced, and the processing efficiency is improved.
In addition, as the case where the information of the top image is not stored, for example, when the recording apparatus receives a control command for the first time, or when the information of the top image is stored in a nonvolatile memory such as a RAM, It is assumed that the product is turned on again after turning off.

また、上記発明の記録装置であって、本発明は、前記記録制御部は、前記記録媒体の切断のための搬送に伴って前記先頭画像を記録した後、前記受信部により新たに前記制御コマンドを受信した場合、新たな前記制御コマンドの前記記録データに含まれる画像の情報のうち、前記先頭画像情報記憶部により記憶した前記先頭画像の情報以外の情報に基づいて、前記先頭画像に続けて画像の記録を行うことを特徴とする。
この構成によれば、記憶した先頭画像の情報に基づいて、切断のための搬送に伴う先頭画像の記録を実行した後に、新たな制御コマンドを受信した場合に、既に記録された先頭画像を重複して記録することなく、記録すべき画像を過不足なく記録可能となる。
Further, in the recording apparatus according to the invention, the recording control unit may record the head image along with the conveyance for cutting the recording medium, and then newly perform the control command by the receiving unit. Is received, based on information other than the information on the first image stored in the first image information storage unit among the information on the image included in the recording data of the new control command. It is characterized by recording an image.
According to this configuration, when a new control command is received after executing the recording of the leading image associated with the conveyance for cutting based on the stored leading image information, the previously recorded leading image is duplicated. Thus, the image to be recorded can be recorded without excess or deficiency.

また、上記発明の記録装置であって、本発明は、前記記録制御部は、1の制御コマンドに係る前記記録媒体の切断を開始する前に、当該1の制御コマンドの次の前記制御コマンドを前記受信部により受信している場合であって、当該次の制御コマンドが所定の条件を満たす場合は、前記先頭画像の情報に基づく前記先頭画像の記録を伴わずに前記記録媒体を搬送し、切断した後、当該次の制御コマンドに従って記録媒体への記録を行うことを特徴とする。
この構成によれば、無条件に切断のための搬送に伴う先頭画像の記録を行うのではなく、所定の条件の場合は、当該先頭画像の記録を行わないことが可能となるため、記録装置に状況に応じた処理を行わせることが可能となる。
Further, in the recording apparatus according to the invention, the recording control unit may execute the control command next to the one control command before starting to cut the recording medium according to the one control command. If the next control command satisfies a predetermined condition when being received by the receiving unit, the recording medium is transported without recording the leading image based on the leading image information, After cutting, recording on a recording medium is performed according to the next control command.
According to this configuration, it is possible not to record the leading image accompanying conveyance for cutting unconditionally, but not to record the leading image in the case of a predetermined condition. Can be processed according to the situation.

また、上記発明の記録装置であって、本発明は、前記先頭画像の情報は、文字列を含んで構成される情報であり、前記先頭画像情報記憶部は、前記記録データに含まれる画像の情報から、予め設定された所定の文字列であるキーワード文字列を検出し、当該情報の先頭から前記キーワード文字列に至るまでの情報を抽出して前記先頭画像の情報として記憶することを特徴とする。
この構成によれば、設定されたキーワード文字列を利用して、記録データに含まれる画像の情報から、先頭画像の情報を具体的に特定することが可能となる。特に、記録データに含まれる画像の情報から、キーワード文字列を検出し、当該情報の先頭からキーワード文字列に至るまでの情報を抽出する、という非常に簡易な手段で、先頭画像の情報を特定できる。
Further, in the recording apparatus according to the above invention, in the present invention, the information on the head image is information including a character string, and the head image information storage unit stores information on an image included in the recording data. A keyword character string which is a predetermined character string set in advance is detected from the information, information from the head of the information to the keyword character string is extracted and stored as information of the head image To do.
According to this configuration, it is possible to specifically specify the information of the head image from the information of the image included in the recording data using the set keyword character string. In particular, the information of the head image is specified by a very simple means of detecting the keyword character string from the image information contained in the recorded data and extracting the information from the head of the information to the keyword character string. it can.

また、上記発明の記録装置であって、本発明は、前記先頭画像の情報は、1又は複数の行の文字列を含んで構成される情報であり、前記記録制御部は、前記記録媒体の切断位置の搬送方向上流側に、前記記録ヘッドにより前記先頭画像を記録させつつ、前記記録媒体の切断位置が前記切断部に対応する位置に至るまで前記搬送部により前記記録媒体を搬送させる際、いずれかの行の文字列に基づく画像の記録が完了し、かつ、次の文字列が存在する場合は当該次の文字列に基づく画像の記録が開始されていない状態で、前記記録媒体の切断位置が前記切断部に対応する位置に至って切断が行われるように、前記切断部による切断の前に記録を行うべき文字列の行を決定することを特徴とする。
ここで、記録媒体を切断する際は、記録媒体の搬送や、記録ヘッドによる記録媒体への記録を停止する必要があるが、記録媒体に文字に係る画像を記録する場合において、文字を記録している途中で、記録媒体の切断が行われ、これに伴って文字の記録を一時的に中断し、切断後、文字の記録を再開した場合、上記一時的な中断が記録された文字の白スジ、ドットずれの要因となり、印刷品質の低下を招く可能性がある。
これを踏まえ、上記構成によれば、いずれかの行の文字列に基づく画像の記録が完了し、かつ、次の文字列が存在する場合は当該次の文字列に基づく画像の記録が開始されていない状態で、記録媒体の切断位置が切断部に対応する位置に至って切断が行われることとなるため、上述した要因による印刷品質の低下を効果的に抑制することが可能となる。
Further, in the recording apparatus according to the above invention, in the present invention, the information of the top image is information including one or a plurality of lines of character strings, and the recording control unit includes: When the recording medium is transported by the transport unit until the cutting position of the recording medium reaches a position corresponding to the cutting unit while the head image is recorded by the recording head on the upstream side in the transport direction of the cutting position, When recording of an image based on a character string in any line is completed and the next character string exists, the recording medium is disconnected in a state where image recording based on the next character string is not started. The character string line to be recorded is determined before cutting by the cutting unit so that the cutting is performed at a position corresponding to the cutting unit.
Here, when cutting the recording medium, it is necessary to stop the conveyance of the recording medium and the recording to the recording medium by the recording head. However, when recording an image relating to the character on the recording medium, the character is recorded. If the recording medium is cut in the middle of recording, the character recording is temporarily interrupted, and after the disconnection, the character recording is resumed. This may cause streak and dot shift and may cause a decrease in print quality.
Based on this, according to the above configuration, when the recording of the image based on the character string of any line is completed and the next character string exists, the recording of the image based on the next character string is started. In this state, the cutting position of the recording medium reaches the position corresponding to the cutting portion, and the cutting is performed. Therefore, it is possible to effectively suppress the deterioration of the print quality due to the above-described factors.

また、上記発明の記録装置であって、本発明は、前記先頭画像情報記憶部は、前記記録データに、前記先頭画像を構成する文字列の装飾に係る付加情報が含まれている場合は、前記先頭画像の情報と併せて前記付加情報を記憶することを特徴とする。
ここで、文字列の装飾とは、文字列の拡大、縮小、回転、強調、太字化、装飾文字又は装飾記号の付加、文字列の移動、その他の文字列に対して施される描画に関する何らかの処理のことである。
そして、上記構成によれば、先頭画像に施すことが想定された装飾を適切に施した上で、切断のための搬送に伴って先頭画像を記録することが可能となる。
Further, in the recording device according to the above invention, in the present invention, the head image information storage unit may include additional information related to decoration of a character string constituting the head image in the recording data. The additional information is stored together with the information of the head image.
Here, the decoration of the character string is a character string enlargement, reduction, rotation, emphasis, bolding, addition of a decoration character or decoration symbol, movement of the character string, or any other drawing related to drawing performed on the character string. It is processing.
And according to the said structure, it becomes possible to record a head image with the conveyance for a cutting | disconnection, after giving suitably the decoration assumed to apply to a head image.

また、上記発明の記録装置であって、本発明は、前記制御装置は、前記キーワード文字列の変更を入力可能に構成されると共に、当該入力に基づいて、前記キーワード文字列の設定を変更するためのキーワード設定コマンドを出力可能に構成され、前記制御装置から入力された前記キーワード設定コマンドに基づいて、設定された前記キーワード文字列を変更するキーワード文字列設定部をさらに備えることを特徴とする。
この構成によれば、制御装置に対して、キーワード文字列の変更を入力することにより、設定されたキーワード文字列を変更することが可能となり、利便性が向上する。
Further, in the recording device according to the invention, the control device is configured to be able to input the change of the keyword character string and change the setting of the keyword character string based on the input. And a keyword character string setting unit that changes the keyword character string that has been set based on the keyword setting command input from the control device. .
According to this configuration, it is possible to change the set keyword character string by inputting the change of the keyword character string to the control device, and the convenience is improved.

また、上記発明の記録装置であって、本発明は、前記先頭画像情報記憶部は、前記記録データに含まれる画像の情報から、前記切断部に対応する位置に前記記録媒体の先端が位置しているとした場合に前記切断部と前記記録ヘッドとで挟まれた領域に対応する画像の情報を抽出し、前記先頭画像の情報として記憶することを特徴とする。
ここで、記録ヘッドと切断部との搬送方向における離間に起因して発生する記録媒体の先端と、記録媒体に記録される画像の先端とのマージンを縮小するという目的を達成するためには、先頭画像の情報として、少なくとも、切断部に対応する位置に記録媒体の先端が位置しているとした場合に切断部と記録ヘッドとで挟まれた領域に対応する画像の情報を記憶しておき、当該情報に基づいて、切断のための搬送を開始した後、記録媒体の切断位置が切断部に対応する位置に至るまでの間、画像を記録する必要がある。
これを踏まえ、上記構成によれば、先頭画像として記憶しておく必要がある情報を確実に記憶することが可能となる。
Further, in the recording apparatus according to the invention, the leading image information storage unit is configured such that the leading end of the recording medium is positioned at a position corresponding to the cutting unit based on image information included in the recording data. If it is, the information of the image corresponding to the area sandwiched between the cutting unit and the recording head is extracted and stored as the information of the head image.
Here, in order to achieve the object of reducing the margin between the leading edge of the recording medium generated due to the separation in the transport direction between the recording head and the cutting portion and the leading edge of the image recorded on the recording medium, As the first image information, at least the information of the image corresponding to the area sandwiched between the cutting part and the recording head when the leading edge of the recording medium is located at the position corresponding to the cutting part is stored. Based on this information, it is necessary to record an image until the cutting position of the recording medium reaches the position corresponding to the cutting portion after the conveyance for the cutting is started.
Based on this, according to the above configuration, it is possible to reliably store information that needs to be stored as the head image.

また、上記発明の記録装置であって、本発明は、前記先頭画像情報記憶部は、前記記録データに画像の装飾に係る付加情報が含まれている場合は、前記付加情報に基づく画像の装飾を反映して、前記領域に対応する画像の情報の抽出を行うことを特徴とする。
この構成によれば、装飾を反映して適切に、切断部に対応する位置に記録媒体の先端が位置しているとした場合に切断部と記録ヘッドとで挟まれた領域に対応する画像の情報を抽出することが可能となる。
In the recording device according to the invention, the head image information storage unit may be configured to display an image decoration based on the additional information when the recording data includes additional information related to an image decoration. In this case, the image information corresponding to the area is extracted.
According to this configuration, when the tip of the recording medium is appropriately positioned at a position corresponding to the cutting portion, reflecting the decoration, the image corresponding to the area sandwiched between the cutting portion and the recording head is displayed. Information can be extracted.

また、上記目的を達成するために、本発明は、制御装置に接続可能に構成され、記録ヘッドと、記録媒体を搬送方向に搬送する搬送部と、前記記録ヘッドの搬送方向下流に配置され、前記記録媒体を切断する切断部と、前記制御装置から、少なくとも前記記録媒体に記録すべき画像の情報を含む記録データを含む制御コマンドを受信する受信部と、を備える記録装置の制御方法であって、前記受信部により前記制御コマンドを受信した場合、前記記録データに含まれる画像の情報に基づいて、前記記録媒体に記録すべき画像のうち、前記記録媒体の先端部の所定の範囲に記録される画像である先頭画像の情報を抽出して記憶し、前記切断部により前記記録媒体を切断する場合、記憶した前記先頭画像の情報に基づいて、前記記録媒体の切断位置の搬送方向上流側に、前記記録ヘッドにより前記先頭画像を記録させつつ、前記記録媒体の切断位置が前記切断部に対応する位置に至るまで前記搬送部により前記記録媒体を搬送させて、前記切断部により前記記録媒体を切断すること、を特徴とする。
この制御方法によれば、記録装置は、制御装置から入力された制御コマンドに含まれる記録データから、先頭画像の情報を抽出して記憶しておき、記録媒体を切断する際は、切断のための搬送と併せて、記録媒体における切断位置の搬送方向上流側に先頭画像を記録するため、記録ヘッドと切断部との搬送方向における離間に起因して発生する記録媒体の先端と、記録媒体に記録される画像の先端とのマージンをできるだけ縮小することが可能となる。
特に、制御装置は、記録装置に対して通常の制御コマンドを出力すれば、記録装置側で、自動で、先頭画像の情報が記憶され、以後は、当該先頭画像の情報に基づいて、記録媒体の切断のための搬送に伴う先頭画像の記録が実行されるため、制御装置に係るプログラムや、各種機構に対して改変を行う必要がない。
In order to achieve the above object, the present invention is configured to be connectable to a control device, and is disposed downstream of the recording head, a transport unit that transports the recording medium in the transport direction, and the transport direction of the recording head, A control method for a recording apparatus comprising: a cutting unit that cuts the recording medium; and a receiving unit that receives a control command including recording data including at least information of an image to be recorded on the recording medium from the control device. When the control command is received by the receiving unit, the image to be recorded on the recording medium is recorded in a predetermined range of the leading end of the recording medium based on the image information included in the recording data. In the case of extracting and storing the information of the first image that is an image to be recorded and cutting the recording medium by the cutting unit, the cutting position of the recording medium is determined based on the stored information of the first image. The recording medium is transported by the transporting unit until the cutting position of the recording medium reaches a position corresponding to the cutting unit while the head image is recorded on the upstream side of the transporting direction by the recording head, and the cutting is performed. The recording medium is cut by a section.
According to this control method, the recording device extracts and stores the information of the head image from the recording data included in the control command input from the control device, and cuts the recording medium for cutting. In order to record the leading image on the upstream side in the conveyance direction of the cutting position in the recording medium, the leading edge of the recording medium generated due to the separation in the conveyance direction between the recording head and the cutting unit, and the recording medium It is possible to reduce the margin with the leading edge of the recorded image as much as possible.
In particular, if the control device outputs a normal control command to the recording device, the information on the first image is automatically stored on the recording device side, and thereafter, the recording medium is recorded based on the information on the first image. Since the recording of the head image accompanying the conveyance for cutting is executed, it is not necessary to modify the program relating to the control device and various mechanisms.

また、上記目的を達成するために、本発明は、制御装置に接続可能に構成され、記録ヘッドと、記録媒体を搬送方向に搬送する搬送部と、前記記録ヘッドの搬送方向下流に配置され、前記記録媒体を切断する切断部と、前記制御装置から、少なくとも前記記録媒体に記録すべき画像の情報を含む記録データを含む制御コマンドを受信する受信部と、を備える記録装置の各部を制御する制御部により実行されるプログラムであって、前記制御部を、前記受信部により前記制御コマンドを受信した場合、前記記録データに含まれる画像の情報に基づいて、前記記録媒体に記録すべき画像のうち、前記記録媒体の先端部の所定の範囲に記録される画像である先頭画像の情報を抽出し、記憶する先頭画像情報記憶部と、前記受信部により受信した前記制御コマンドに基づいて、前記記録ヘッド、前記搬送部、及び、前記切断部を制御して、前記記録媒体への記録、前記記録媒体の搬送、及び、前記記録媒体の切断を行い、前記切断部により前記記録媒体を切断する場合、前記先頭画像情報記憶部により記憶した前記先頭画像の情報に基づいて、前記記録媒体の切断位置の搬送方向上流側に、前記記録ヘッドにより前記先頭画像を記録させつつ、前記記録媒体の切断位置が前記切断部に対応する位置に至るまで前記搬送部により前記記録媒体を搬送させて、前記切断部により前記記録媒体を切断する記録制御部と、として機能させることを特徴とする。
このプログラムを実行すれば、記録装置は、制御装置から入力された制御コマンドに含まれる記録データから、先頭画像の情報を抽出して記憶しておき、記録媒体を切断する際は、切断のための搬送と併せて、記録媒体における切断位置の搬送方向上流側に先頭画像を記録するため、記録ヘッドと切断部との搬送方向における離間に起因して発生する記録媒体の先端と、記録媒体に記録される画像の先端とのマージンをできるだけ縮小することが可能となる。
特に、制御装置は、記録装置に対して通常の制御コマンドを出力すれば、記録装置側で、自動で、先頭画像の情報が記憶され、以後は、当該先頭画像の情報に基づいて、記録媒体の切断のための搬送に伴う先頭画像の記録が実行されるため、制御装置に係るプログラムや、各種機構に対して改変を行う必要がない。
In order to achieve the above object, the present invention is configured to be connectable to a control device, and is disposed downstream of the recording head, a transport unit that transports the recording medium in the transport direction, and the transport direction of the recording head, Control each unit of the recording apparatus comprising: a cutting unit that cuts the recording medium; and a receiving unit that receives a control command including recording data including at least information of an image to be recorded on the recording medium from the control device. When the control unit receives the control command by the receiving unit, the program is executed by the control unit, and based on the image information included in the recording data, the image to be recorded on the recording medium Among them, the head image information storage unit that extracts and stores the information of the head image that is an image recorded in a predetermined range of the front end portion of the recording medium, and the receiver that is received by the receiver Based on the control command, the recording head, the conveyance unit, and the cutting unit are controlled to perform recording on the recording medium, conveyance of the recording medium, and cutting of the recording medium, and the cutting unit When the recording medium is cut by the recording head, the head image is recorded by the recording head on the upstream side in the transport direction of the cutting position of the recording medium based on the information of the head image stored by the head image information storage unit. Meanwhile, the recording medium is conveyed by the conveying unit until the cutting position of the recording medium reaches a position corresponding to the cutting unit, and functions as a recording control unit that cuts the recording medium by the cutting unit. It is characterized by.
If this program is executed, the recording apparatus extracts and stores information of the first image from the recording data included in the control command input from the control apparatus, and when cutting the recording medium, In order to record the leading image on the upstream side in the conveyance direction of the cutting position in the recording medium, the leading edge of the recording medium generated due to the separation in the conveyance direction between the recording head and the cutting unit, and the recording medium It is possible to reduce the margin with the leading edge of the recorded image as much as possible.
In particular, if the control device outputs a normal control command to the recording device, the information on the first image is automatically stored on the recording device side, and thereafter, the recording medium is recorded based on the information on the first image. Since the recording of the head image accompanying the conveyance for cutting is executed, it is not necessary to modify the program relating to the control device and various mechanisms.

本発明によれば、制御装置に対する改変を行うことなく、記録ヘッドと切断部との搬送方向における離間に起因して発生する記録媒体の先端と、記録媒体に記録される画像の先端とのマージンをできるだけ縮小できる。   According to the present invention, the margin between the leading edge of the recording medium generated due to the separation in the transport direction between the recording head and the cutting unit and the leading edge of the image recorded on the recording medium without any modification to the control device. Can be reduced as much as possible.

第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. 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 sequence diagram of a conventional host computer and printer. 記録ヘッドと、カッターユニットとの関係を模式的に示す図である。It is a figure which shows typically the relationship between a recording head and a cutter unit. レシートの様子を模式的に示す図である。It is a figure which shows the mode of a receipt typically. ホストコンピューターとプリンターとの動作を示すフローチャート。The flowchart which shows operation | movement with a host computer and a printer. レシートと先頭画像との関係を模式的に示す図である。It is a figure which shows typically the relationship between a receipt and a head image. 先頭画像に係る描画データを所定の座標系に展開した様子を示す図。The figure which shows a mode that the drawing data which concern on a head image were expand | deployed to the predetermined coordinate system. 第2実施形態に係るPOS端末の機能的構成を示すブロック図である。It is a block diagram which shows the functional structure of the POS terminal which concerns on 2nd Embodiment. プリンターの動作を示すフローチャートである。3 is a flowchart illustrating an operation of a printer. 記録データが示す画像に係る描画データを所定の座標系に展開した図。The figure which expanded the drawing data which concern on the image which recording data shows to a predetermined coordinate system.

以下、図面を参照して本発明の実施形態について説明する。
<第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 includes a host computer 3 that performs sales registration processing and settlement processing, The printer 2 is connected to the host computer 3 and issues a receipt 10 under the control of the host computer 3.
The host computer 3 has a display 12 for displaying the contents of the sales registration process and the settlement process, a bar code scanner 13 for reading a bar code attached to the product during the sales registration process, and a key input including various keys such as a sales registration key. The unit 14 includes a cash drawer 15 that accommodates cash for settlement. The host computer 3 is connected to a POS server 16 that collects information registered for sales.
When issuing the receipt 10, the host computer 3 is necessary to access the POS server 16 and issue the receipt 10 as appropriate based on the input value from the barcode scanner 13 or the input value from the key input unit 14. 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の記録面にドットを形成することにより、画像を記録するサーマルラインプリンターである。
画像が記録された感熱ロール紙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 a roller-shaped platen 23 (conveying unit) that conveys the thermal roll paper 22. ), 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.
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と、ホスト側インターフェイス部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 44. Yes.
The host-side control unit 40 centrally controls the host computer 3, and includes a CPU that executes various programs, a ROM that stores basic control programs executed by the CPU, programs executed by the CPU, and processing targets. It includes a RAM that forms a work area for temporarily storing data and the like, and other peripheral circuits. The host-side control unit 40 includes a POS application execution unit 40a and a printer driver execution unit 40b, which will be described later.
The host side input unit 41 is connected to various input devices including the key input unit 14 described above, detects an operation on the input device, and outputs it to the host side control unit 40.
The host-side display unit 42 is connected to the display 12 described above, and displays various types of information such as sales registration processing and payment processing contents on the display 12 under the control of the host-side control unit 40.
As described above, the host computer 3 is connected to various register peripheral devices such as a barcode scanner 13 and a cash drawer. The host computer 3 is provided with an interface for connecting these devices. In addition, device drivers for controlling these devices are installed in advance.
The host-side storage unit 43 includes a hard disk, a nonvolatile memory such as an EEPROM, and stores various data in a rewritable manner.
The host side interface unit 44 performs communication based on the communication standard with the printer 2 under the control of the host side control unit 40.

プリンター2は、上述したようにレシート10を発行するサーマルラインプリンターであり、図3に示すように、制御部50と、プリントエンジン51と、入力部52と、表示部53と、記憶部54と、インターフェイス部55と、を備えている。
制御部50は、プリンター2の各部を中枢的に制御するものであり、上述したホスト側制御部40と同様、CPUや、ROM、RAM、その他の周辺回路等を備えている。
プリントエンジン51は、制御部50が備える記録制御部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 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 trailing end 10b side of the receipt 10. The formed image is recorded, and then the thermal roll paper 22 is cut to form the rear end 10b.

本実施形態では、プリンター2が発行するレシート10のレイアウトは、所定の例外を除き、いずれのレシート10についても基本的に同一である。
すなわち、図4(B)に示すように、レシート10では、先端10aから後端10bへ向かって順番に、換言すれば、記録ヘッド24による記録が行われる順番に、先頭画像エリアA1、レシート情報エリアA2、グラフィックエリアA3、及び、バーコードエリアA4が形成される。
先頭画像エリアA1には、所定の文字列が所定の態様で定型的に記録されるエリアである。図4(B)の例では、「AAA△Store」(△はスペース。以下同じ。)という文字列が、基準の大きさの2倍の大きさで、中央寄せ(レシート10の幅方向の中央部に文字列が記録されるようにすること。)で記録され、次の行に「at△BBB△Area」という文字列が、基準の大きさで、中央寄せで記憶される。
本実施形態では、所定の例外を除き、プリンター2が発行する全てのレシート10について、先頭画像エリアA1には、同一の文字列が同一の態様で記録される。以下、先頭画像エリアA1に記録される上記の2行の文字列のことを「先頭画像」と表現するものとする。すなわち、先頭画像とは、レシート10の先端部に定型的に記録される文字列に係る画像のことである。
レシート情報エリアA2は、レシート10を発行した日時や、購入した商品の名称、商品の単価、合計購入金額、その他の付加的な情報が文字列として記録されるエリアである。
グラフィックエリアA3は、所定のグラフィック画像が記録されるエリアである。グラフィック画像については、後述する。
バーコードエリアA4は、バーコードが記録されるエリアである。
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.
That is, as shown in FIG. 4B, in the receipt 10, in order from the leading end 10a to the trailing end 10b, in other words, in the order in which recording by the recording head 24 is performed, the leading image area A1, the receipt information. An area A2, a graphic area A3, and a barcode area A4 are formed.
The first image area A1 is an area where a predetermined character string is routinely recorded in a predetermined manner. In the example of FIG. 4B, the character string “AAAΔStore” (Δ is a space, the same applies hereinafter) is double the reference size and is centered (the center of the receipt 10 in the width direction). The character string “atΔBBBΔArea” is stored in the next line at a reference size and centered.
In the present embodiment, with the exception of predetermined exceptions, the same character string is recorded in the same manner in the first image area A1 for all receipts 10 issued by the printer 2. Hereinafter, the above two lines of character strings recorded in the head image area A1 are expressed as “head image”. That is, the head image is an image relating to a character string that is routinely recorded at the tip of the receipt 10.
The receipt information area A2 is an area where the date and time when the receipt 10 is issued, the name of the purchased product, the unit price of the product, the total purchase price, and other additional information are recorded as character strings.
The graphic area A3 is an area where a predetermined graphic image is recorded. The graphic image will be described later.
The barcode area A4 is an area where barcodes are recorded.

記録データ80は、上述したように、感熱ロール紙22に記録すべき画像の情報を含むデータであるが、具体的には、感熱ロール紙22に所定の画像を所定の態様で記録させることを指示するコマンドが、記録させる順番に並んで構成されたデータである。プリンター2の制御部50の記録制御部60は、記録データ80を構成する各コマンドを、順次、読み出して実行することにより、感熱ロール紙22への画像の記録、及び、画像の記録に伴う必要な搬送を行う。
図4(A)において、コマンド群H1は、レシート10の先頭画像を構成する2行の文字列のうち、「AAA△Store」の文字列を所定の態様で記録させるコマンド群であり、文字列装飾コマンドMS1、及び、文字列記録指示コマンドMK1の2つのコマンドが含まれている。
文字列装飾コマンドMS1は、「AAA△Store」の文字列に施す装飾を指定するコマンドであり、具体的には、当該文字列の大きさを基準の2倍の大きさとすること、及び、当該文字列を中央寄せすることを指定するコマンドである。なお、装飾とは、記録する文字列に対して描画に関する何らかの処理を行うことを意味し、例えば、上述した文字列の拡大や、文字列の位置の移動のほか、例えば、縮小、回転、強調、太字化、装飾文字又は装飾記号の付加等が装飾に該当する。
文字列記録指示コマンドMK1は、「AAA△Store」の文字列を記録することを指示するコマンドである。本実施形態では、基本的に、文字列記録指示コマンドは、命令コードと、所定の文字コード(例えば、アスキーコード。)で表現された文字の組み合わせからなる文字列と、が組み合わされて構成されている。例えば、文字列記録指示コマンドMK1は、「XXX△“AAA△Store”」(ただし、XXXは、文字列を記録することを指示する命令コード。また、ダブルクォーテーション内の文字列は、アスキーコードで表現された文字の組み合わせによって構成された文字列。)という構成となっている。
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.
In FIG. 4A, a command group H1 is a command group for recording a character string “AAAΔStore” in a predetermined manner among the two lines of character strings constituting the top image of the receipt 10. Two commands, a decoration command MS1 and a character string recording instruction command MK1, are included.
The character string decoration command MS1 is a command for designating decoration to be applied to the character string “AAAΔStore”. Specifically, the character string decoration command has a size twice as large as the reference, and This command specifies that the character string is centered. Note that decoration means performing some processing related to drawing on a character string to be recorded. For example, in addition to the above-described character string enlargement and character string position movement, for example, reduction, rotation, and emphasis. Bolding, adding decorative characters or decorative symbols, etc. correspond to decoration.
The character string recording instruction command MK1 is a command for instructing to record the character string “AAAΔStore”. In the present embodiment, basically, the character string recording instruction command is configured by combining an instruction code and a character string formed by a combination of characters expressed by a predetermined character code (for example, ASCII code). ing. 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.).

記録制御部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 described in 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.

コマンド群H1に続く、コマンド群H2は、「at△BBB△Area」の文字列を所定の態様で記録させるコマンド群であり、当該文字列の大きさを基準の大きさとすること、及び、当該文字列を中央寄せすることを指定する文字列装飾コマンドMS2、及び、「at△BBB△Area」の文字列を記録することを指示する文字列記録指示コマンドMK2を含んで構成されている。
記録制御部60は、コマンド群H2に含まれる各コマンドに基づいて、プリントエンジン51を制御して、図4(B)に示すように、基準の大きさで、中央寄せされた「at△BBB△Area」の文字列を記録する。
コマンド群H2の後には、2つの改行コマンドLFが続いている。これにより、図4(B)に示すように、「at△BBB△Area」の文字列の後には、改行が2つ挿入される。
The command group H2 following the command group H1 is a command group that records the character string “atΔBBBΔArea” in a predetermined manner, and sets the size of the character string as a reference size, and A character string decoration command MS2 for designating that the character string is to be centered and a character string recording instruction command MK2 for instructing to record the character string “atΔBBBΔArea” are configured.
The recording control unit 60 controls the print engine 51 on the basis of each command included in the command group H2, and, as shown in FIG. Record the character string “Area”.
The command group H2 is followed by two line feed commands LF. As a result, as shown in FIG. 4B, two line breaks are inserted after the character string “atΔBBBΔArea”.

2つの改行コマンドLFの後には、コマンド群H3が続いている。このコマンド群H3は、レシート10のレシート情報エリアA2に画像を記録させるコマンド群であり、上述した文字列装飾コマンド、文字列記録指示コマンド、及び、改行コマンドが組み合わされて構成されている。このコマンド群H3の詳細については省略する。   A command group H3 follows the two line feed commands LF. The command group H3 is a command group for recording an image in the receipt information area A2 of the receipt 10, and is configured by combining the above-described character string decoration command, character string recording instruction command, and line feed command. Details of the command group H3 are omitted.

コマンド群H3の後には、グラフィック記録指示コマンドGSが続いている。
記録制御部60は、このグラフィック記録指示コマンドGSに基づいて感熱ロール紙22にグラフィック画像を記録する。
詳述すると、プリンター2の記憶部54には、登録グラフィックテーブル71が記憶されている。この登録グラフィックテーブル71では、複数のグラフィック画像データと、各グラフィック画像に一意に付与された識別コードとが対応づけて記憶されている。グラフィック画像データとは、フォントデータに基づいて記録される画像ではない、所定の画像(グラフィック画像)を表現するビットマップデータのことであり、例えば、図4(B)のレシート10のグラフィックエリアA3のグラフィック画像(強調用の飾り枠の中に「10%Off」という文字列が描画された画像)を表現するビットマップデータである。
そして、グラフィック記録指示コマンドGSには、記録すべきグラフィック画像の識別コードを特定する情報が含まれており、グラフィック記録指示コマンドGSに基づいてグラフィック画像を記録する際、記録制御部60は、登録グラフィックテーブル71を参照して、当該識別コードに対応するグラフィック画像データを取得し、取得したグラフィック画像データをプリントバッファーに展開し、展開したグラフィック画像データに基づいてプリントエンジン51を制御して、グラフィック画像の記録を行う。
なお、グラフィック記録指示コマンドGSを、グラフィックエリアA3に記録すべき画像のビットマップデータを含んだ構成とし、当該ビットマップデータに係る画像を記録させるコマンドとすること可能である。この場合、記録制御部60は、グラフィック記録指示コマンドGSに含まれるビットマップデータをプリントバッファーに展開して画像を記録する。
The command group H3 is followed by a graphic recording instruction command GS.
The recording control unit 60 records a graphic image 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 bitmap data representing a predetermined image (graphic image) that is not an image recorded based on the font data. For example, the graphic area A3 of the receipt 10 in FIG. Is a bitmap data representing a graphic image (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 the graphic image based on the graphic recording instruction command GS, the recording control unit 60 registers the graphic image. With reference to the graphic table 71, graphic image data corresponding to the identification code is acquired, the acquired graphic image data is expanded in a print buffer, the print engine 51 is controlled based on the expanded graphic image data, and the graphic Record an 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.

グラフィック記録指示コマンドGSの後には、バーコード記録指示コマンドBSが続いている。
バーコード記録指示コマンドBSは、HRI文字に関する各種設定(HRI文字を記録するか否か、HRI文字をバーコードとの関係でどこに記録するか等)を指定するコマンドや、バーコードを記録する際のサイズを指定するコマンド、バーコードに変換しようとしている文字列(以下、「変換前文字列」という。)を指定すると共に当該変換前文字列に基づくバーコードの画像を記録することを指示するコマンド等が含まれて構成されている。
バーコード記録指示コマンドBSに基づいてバーコードを記録する際、記録制御部60は、バーコード記録指示コマンドBSに含まれる変換前文字列を取得し、取得した変換前文字列を、ファームウェアに実装された所定の機能により、画像としてのバーコードを表現するビットマップデータに変換し、HRI文字に関する各種設定や、バーコードのサイズに関する各種設定を反映した上で、画像としてのバーコードを表現するビットマップデータをプリントバッファーに展開し、展開したビットマップデータに基づいて、プリントエンジン51を制御して、バーコード、及び、HRI文字に係る画像を感熱ロール紙22に記録する。
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 developed in the print buffer, and the print engine 51 is controlled based on the developed bitmap data, and the image relating to the barcode and the HRI character is recorded on the thermal roll paper 22.

図5は、本願発明を適用する前の従来のPOS端末1におけるプリンター2、及び、ホストコンピューター3の動作を説明するためのシーケンス図である。
従来は、複数のレシート10を発行する場合、プリンター2、及び、ホストコンピューター3は、以下のような手順で各種処理を行っていた。
すなわち、図5に示すように、まず、ホストコンピューター3は、プリンター2に記録データ80を送信する(ステップSA1)。
次いで、プリンター2の記録制御部60は、受信した記録データ80に基づいて、感熱ロール紙22に記録データ80の内容に準拠した画像の記録を行う(ステップSA2)。
次いで、ホストコンピューター3は、感熱ロール紙22の切断位置(レシート10を発行すべく感熱ロール紙22を切断すべき位置であり、以下、「紙切断位置」という。)が、カッターユニット25のカット位置T2(カッターユニット25によって切断が行われる位置。すなわち、固定刃30と、可動刃31とが対峙した位置。)に至るまで、所定量だけ感熱ロール紙22を搬送することを指示する搬送指示コマンドHCをプリンター2に送信する(ステップSA3)。
FIG. 5 is a sequence diagram for explaining operations of the printer 2 and the host computer 3 in the conventional POS terminal 1 before applying the present invention.
Conventionally, when a plurality of receipts 10 are issued, the printer 2 and the host computer 3 perform various processes in the following procedure.
That is, as shown in FIG. 5, first, the host computer 3 transmits recording data 80 to the printer 2 (step SA1).
Next, the recording control unit 60 of the printer 2 records an image based on the content of the recording data 80 on the thermal roll paper 22 based on the received recording data 80 (step SA2).
Next, the host computer 3 has the cutting position of the thermal roll paper 22 (the position where the thermal roll paper 22 should be cut to issue the receipt 10, hereinafter referred to as “paper cutting position”) as the cutting of the cutter unit 25. A conveyance instruction that instructs to convey the thermal roll paper 22 by a predetermined amount until reaching a position T2 (a position where cutting is performed by the cutter unit 25. That is, a position where the fixed blade 30 and the movable blade 31 face each other). Command HC is transmitted to printer 2 (step SA3).

図6は、記録ヘッド24と、カッターユニット25との位置関係を説明するため、これら装置を模式的に示す図である。
図2、及び、図6に示すように、本実施形態では、感熱ロール紙22が搬送される搬送経路(図6)K上の所定の位置に記録ヘッド24が設けられ、この記録ヘッド24の搬送方向Y1下流に感熱ロール紙22を切断するためのカッターユニット25が設けられている。
図6に示すように、記録ヘッド24によって画像が記録される記録位置T1(発熱素子が配置された位置)と、カッターユニット25のカット位置T2との間には、ギャップGが形成されている。
FIG. 6 is a diagram schematically showing these apparatuses in order to explain the positional relationship between the recording head 24 and the cutter unit 25.
As shown in FIGS. 2 and 6, in this embodiment, a recording head 24 is provided at a predetermined position on a conveyance path (FIG. 6) K through which the thermal roll paper 22 is conveyed. A cutter unit 25 for cutting the thermal roll paper 22 is provided downstream in the transport direction Y1.
As shown in FIG. 6, a gap G is formed between the recording position T <b> 1 where the image is recorded by the recording head 24 (position where the heating element is disposed) and the cutting position T <b> 2 of the cutter unit 25. .

ステップSA3において、ホストコンピューター3からプリンター2に搬送指示コマンドHCが送信された後、プリンター2の記録制御部60は、受信した搬送指示コマンドHCに基づいて、プリントエンジン51を制御して、感熱ロール紙22を所定量だけ搬送する(ステップSA4)。
次いで、ホストコンピューター3は、カッターユニット25による感熱ロール紙22の切断を指示する切断指示コマンドSCをプリンター2に送信する(ステップSA5)。
次いで、プリンター2の記録制御部60は、受信した切断指示コマンドSCに基づいて、プリントエンジン51を制御して、感熱ロール紙22を切断する(ステップSA6)。
このようにして1のレシート10を発行した後、さらに、次のレシート10を発行する場合、ホストコンピューター3は、記録データ80、搬送指示コマンドHC、及び、切断指示コマンドSCを順次送信し、プリンター2は受信したコマンドを順次実行する(ステップSA7〜ステップSA12)。
In step SA3, after the transport instruction command HC is transmitted from the host computer 3 to the printer 2, the recording control unit 60 of the printer 2 controls the print engine 51 based on the received transport instruction command HC, and the thermal roll. The paper 22 is conveyed by a predetermined amount (step SA4).
Next, the host computer 3 transmits a cutting instruction command SC for instructing cutting of the thermal roll paper 22 by the cutter unit 25 to the printer 2 (step SA5).
Next, the recording control unit 60 of the printer 2 controls the print engine 51 based on the received cutting instruction command SC to cut the thermal roll paper 22 (step SA6).
When the next receipt 10 is issued after issuing one receipt 10 in this way, the host computer 3 sequentially transmits the recording data 80, the conveyance instruction command HC, and the cutting instruction command SC, and the printer 10 2 sequentially executes the received commands (steps SA7 to SA12).

以上のようなシーケンスで、複数のレシート10を発行していた従来では、以下のような問題があった。   In the prior art in which a plurality of receipts 10 are issued in the sequence as described above, there are the following problems.

図7(A)は、従来の問題点を説明するため、感熱ロール紙22を模式的に示す図である。
図6で説明したように、従来のシーケンスによれば、1のレシート10に係る記録データ80に基づく画像の記録が終了した後、感熱ロール紙22の紙切断位置が、カット位置T2に至るまで感熱ロール紙22が搬送された上で感熱ロール紙22が切断され、その後、次のレシート10に係る記録データ80に基づく画像の記録が開始されるという手順であった。このため、図7に示すように、記録ヘッド24の記録位置T1と、カッターユニット25のカット位置T2との搬送方向Y1におけるギャップGに起因して、レシート10の先端10aと、当該レシート10に記録される先頭画像の先端との間に形成されるマージンMが拡大化する傾向にあった。
FIG. 7A is a diagram schematically showing the thermal roll paper 22 for explaining the conventional problems.
As described with reference to FIG. 6, according to the conventional sequence, after the image recording based on the recording data 80 relating to one receipt 10 is completed, the paper cutting position of the thermal roll paper 22 reaches the cutting position T2. This is a procedure in which the thermal roll paper 22 is cut after the thermal roll paper 22 is transported, and then image recording based on the recording data 80 relating to the next receipt 10 is started. For this reason, as shown in FIG. 7, due to the gap G in the transport direction Y1 between the recording position T1 of the recording head 24 and the cutting position T2 of the cutter unit 25, the leading end 10a of the receipt 10 and the receipt 10 There is a tendency that the margin M formed between the leading edge of the recorded first image is enlarged.

そして、このマージンMは、何ら画像が記録されない無駄な領域であるため、できるだけ当該マージンMを縮小し、感熱ロール紙22の無駄な消費を抑制したいとするニーズがある。
特に、ホストコンピューター3に対する改変、例えば、プログラム修正や、プログラムの書き換え、ホストコンピューター3自体の交換、各種機構の改変等を行うことなく、マージンMを縮小したいとするニーズがあった。これは、例えば、本発明をPOS端末1に適用する際に、ホストコンピューター3に対する改変が必要ない分、作業性がよいからである。さらに、ある店舗において、当該店舗に設置された既存のホストコンピューター3にプリンター2を接続することによりPOS端末1を構築するような状況の場合に、既存のホストコンピューター3に対する改変を行う必要がないため、プリンター2を購入し、導入する店舗側にとっては作業の容易性、接続の確実性の面でメリットがあり、また、プリンター2を販売、提供する主体(例えば、製造メーカー)にとっては、プリンター2の商品価値を向上できるという点でメリットがあるからである。
以上を踏まえ、本実施形態に係るプリンター2は、以下の動作を実行する。
Since this margin M is a useless area where no image is recorded, there is a need to reduce the margin M as much as possible to suppress useless consumption of the thermal roll paper 22.
In particular, there is a need to reduce the margin M without modifying the host computer 3, for example, without modifying the program, rewriting the program, replacing the host computer 3 itself, or modifying various mechanisms. This is because, for example, when the present invention is applied to the POS terminal 1, workability is good because the host computer 3 is not modified. Furthermore, in a situation where the POS terminal 1 is constructed by connecting the printer 2 to the existing host computer 3 installed in the store, there is no need to modify the existing host computer 3. Therefore, there is a merit in terms of ease of work and connection reliability for the store side where the printer 2 is purchased and introduced, and for an entity (for example, a manufacturer) that sells and provides the printer 2, the printer 2 This is because there is a merit in that the product value of 2 can be improved.
Based on the above, the printer 2 according to the present embodiment performs the following operation.

図8は、本実施形態に係るプリンター2、及び、ホストコンピューター3の動作を示すフローチャートであり、(A)はホストコンピューター3の動作を、(B)はプリンター2の動作をそれぞれ示している。
図8では、1つのレシート10を発行する場合におけるプリンター2、及び、ホストコンピューター3の動作を示している。
また、以下の説明において、制御部50、記録制御部60、及び、先頭画像情報記憶部61の機能は、CPUがファームウェア等のプログラムを読み出して実行する等、ハードウェアとソフトウェアとの協働により実現される。
図8に示すように、まず、ホストコンピューター3が記録データ80を送信する(ステップSB1)。
次いで、プリンター2は、ホストコンピューター3が送信した記録データ80を受信する(ステップSC1)。受信した記録データ80は、一旦、受信バッファー56に格納される。
次いで、先頭画像情報記憶部61は、記憶部54に先頭画像データ72(後述)が既に記憶されているか否かを判別する(ステップSC2)。
以下、まず、ステップSC2において先頭画像データ72(後述)が未だ記憶部54に記憶されていない場合(ステップSC2:NO)の、プリンター2の動作を説明する。
なお、ステップSC2で「NO」と判別される場合は、感熱ロール紙22の先端部に、先頭画像が記録されていない状態を想定している。従って、記憶部54に先頭画像データ72が記憶されていない場合のほか、感熱ロール紙22の交換のタイミングや、エラー等の何らかの原因により、先頭画像データ72が記憶部54に記憶されている場合であっても、感熱ロール紙22の先端部に、先頭画像が記録されていない状態である場合には、ステップSC2で「NO」と判別される。
先頭画像データ72が未だ記憶部54に記憶されていない場合(ステップSC2:NO)、先頭画像情報記憶部61は、記憶部54に記憶されたキーワード文字列データ73を参照し、キーワード文字列を取得する(ステップSC3)。キーワード文字列については後述する。
次いで、先頭画像情報記憶部61は、ステップSC3で取得したキーワード文字列を利用して、ステップSC1で受信した記録データ80に含まれる画像の情報から、先頭画像の情報を抽出する(ステップSC4)。
以下、ステップSC4の動作について図4を援用して詳述する。
FIG. 8 is a flowchart showing the operations of the printer 2 and the host computer 3 according to the present embodiment, where (A) shows the operation of the host computer 3 and (B) shows the operation of the printer 2.
FIG. 8 shows operations of the printer 2 and the host computer 3 when issuing one receipt 10.
In the following description, the functions of the control unit 50, the recording control unit 60, and the head image information storage unit 61 are based on the cooperation of hardware and software, such as the CPU reading and executing a program such as firmware. Realized.
As shown in FIG. 8, first, the host computer 3 transmits recording data 80 (step SB1).
Next, the printer 2 receives the recording data 80 transmitted from the host computer 3 (step SC1). The received recording data 80 is temporarily stored in the reception buffer 56.
Next, the leading image information storage unit 61 determines whether leading image data 72 (described later) is already stored in the storage unit 54 (step SC2).
Hereinafter, first, the operation of the printer 2 when the head image data 72 (described later) is not yet stored in the storage unit 54 in step SC2 (step SC2: NO) will be described.
If “NO” is determined in step SC 2, it is assumed that the leading image is not recorded at the leading end of the thermal roll paper 22. Therefore, in addition to the case where the top image data 72 is not stored in the storage unit 54, the case where the top image data 72 is stored in the storage unit 54 due to the timing of replacement of the thermal roll paper 22 or an error. Even so, if the leading image is not recorded at the leading end portion of the thermal roll paper 22, “NO” is determined in the step SC2.
When the head image data 72 is not yet stored in the storage unit 54 (step SC2: NO), the head image information storage unit 61 refers to the keyword character string data 73 stored in the storage unit 54, and determines the keyword character string. Obtain (step SC3). The keyword character string will be described later.
Next, the head image information storage unit 61 uses the keyword character string acquired in step SC3 to extract the information of the head image from the image information included in the recording data 80 received in step SC1 (step SC4). .
Hereinafter, the operation of step SC4 will be described in detail with reference to FIG.

上述したように、本実施形態では、プリンター2によって発行される全てのレシート10について、レシート10の先端部(先頭)に、先頭画像として、所定の文字列が、所定の態様で記録される。具体的には、レシート10の先端部に「AAA△Store」の文字列と、当該文字列に続く「at△BBB△Area」の文字列とが定型的に記録される。
そして、キーワード文字列とは、先頭画像を構成する文字列の末尾に該当する文字列のことであり、上記例では、「Area」がこのキーワード文字列に該当する。
ステップSC4において、先頭画像情報記憶部61は、受信バッファー56に格納されている記録データ80を分析し、各文字列記録指示コマンド(所定の命令コードと、所定の文字コードからなる文字の組み合わせで表現された文字列とを含んで構成されるコマンド)に含まれた文字列の中から、キーワード文字列を検索する。上述したように、文字列記録指示コマンドにおいて、文字列は、所定の文字コードからなる文字の組み合わせによって表現されているため、既存の文字列検索用のアルゴリズムを用いて、記録データ80から、キーワード文字列の検索が可能である。
次いで、先頭画像情報記憶部61は、記録データ80に基づいて画像を記録した場合に、その先頭に記録される文字列から、検索されたキーワード文字列に至るまでの一連の文字列が、先頭画像、すなわち、レシート10の先端部に定型的に記録される文字列であるものとし、記録データ80から、当該一連の文字列の記録に係る一連のコマンドを抽出する。図4(A)の例では、「AAA△Store」の文字列の記録に係る一連のコマンドを含むコマンド群H1の各コマンド、及び、「at△BBB△Area」の文字列の記録に係る一連のコマンドを含むコマンド群H2の各コマンドを抽出する。このように、先頭画像情報記憶部61は、文字列記録指示コマンドのみならず、文字列に施す装飾を指定するコマンドである文字列装飾コマンドも併せて抽出する。
以上のようにして抽出した一連のコマンド(上記例では、コマンド群H1及びコマンド群H2に含まれるコマンド)が、「先頭画像の情報」に該当する。
As described above, in the present embodiment, for all receipts 10 issued by the printer 2, a predetermined character string is recorded in a predetermined manner as a leading image at the leading end (top) of the receipt 10. Specifically, a character string “AAAΔStore” and a character string “atΔBBBΔArea” following the character string are routinely recorded at the leading end of the receipt 10.
The keyword character string is a character string corresponding to the end of the character string constituting the head image. In the above example, “Area” corresponds to this keyword character string.
In step SC4, the head image information storage unit 61 analyzes the recording data 80 stored in the reception buffer 56, and uses each character string recording instruction command (a combination of a character including a predetermined command code and a predetermined character code). The keyword character string is searched from the character strings included in the command including the expressed character string. As described above, in the character string recording instruction command, since the character string is expressed by a combination of characters having a predetermined character code, the keyword is recorded from the recorded data 80 using the existing algorithm for character string search. You can search for strings.
Next, when an image is recorded based on the recording data 80, the head image information storage unit 61 stores a series of character strings from the character string recorded at the head to the searched keyword character string. It is assumed that the image is a character string that is routinely recorded at the tip of the receipt 10, and a series of commands relating to the recording of the series of character strings is extracted from the recording data 80. In the example of FIG. 4A, each command of the command group H1 including a series of commands relating to the recording of the character string “AAAΔStore” and a series relating to the recording of the character string “atΔBBBΔArea”. Each command of the command group H2 including these commands is extracted. Thus, the head image information storage unit 61 extracts not only the character string recording instruction command but also a character string decoration command that is a command for designating decoration to be applied to the character string.
A series of commands extracted as described above (in the above example, commands included in the command group H1 and the command group H2) correspond to “information on the top image”.

ステップSC4において先頭画像の情報を抽出した後、先頭画像情報記憶部61は、当該抽出した先頭画像の情報(一連のコマンド)を、先頭画像データ72として記憶部54に記憶する(ステップSC5)。
次いで、記録制御部60は、先頭画像を構成する文字列の行うち、切断のための搬送に伴って記録する文字列の行、換言すれば、切断のための搬送を開始した後、感熱ロール紙22が切断される前に、記録すべき文字列の行、及び、先頭画像に係る文字列の記録を開始する感熱ロール紙22における位置を決定する(ステップSC6)。
以下、ステップSC6の動作について詳述する。
After extracting the top image information in step SC4, the top image information storage unit 61 stores the extracted top image information (a series of commands) in the storage unit 54 as the top image data 72 (step SC5).
Next, the recording control unit 60 performs the character string constituting the head image and then the row of the character string to be recorded along with the conveyance for cutting, in other words, the thermal roll after starting the conveyance for cutting. Before the paper 22 is cut, the line of the character string to be recorded and the position on the thermal roll paper 22 at which the recording of the character string related to the head image is started are determined (step SC6).
Hereinafter, the operation of step SC6 will be described in detail.

図9は、ステップSC6の動作を説明するために、所定の態様で、先頭画像を感熱ロール紙22に記録した様子を示す図である。
上述したように、本願発明は、記録ヘッド24の記録位置T1と、カッターユニット25のカット位置T2との搬送方向Y1におけるギャップGに起因して、レシート10の先端10aと、当該レシート10に記録される先頭画像の先端との間に形成されるマージンMを縮小することをその目的の1つとしている。
当該目的を達成するために、プリンター2は、図7(B)に示すように、記録データ80に基づく画像の記録が終了した後、感熱ロール紙22を切断するために、感熱ロール紙22を搬送方向Y1に搬送する際に、当該搬送と並行して、先頭画像を記録するにようにし、これによりマージンMを縮小する。
これを踏まえ、ギャップGと、感熱ロール紙22における先頭画像との関係が図9(A)のような状態であるものとする。この図9(A)では、感熱ロール紙22の先端と、先頭画像の先端との距離が、マージンMminとなっている。このマージンMminは、レシート10の枠と、画像とのバランスを考慮して、レシート10の見栄え上の観点から、最低限必要とされるマージンである。従って、マージンMをマージンMminとすれば、マージンMを最も縮小させることができる。
そして図9(A)に示す状態の場合、「at△BBB△Area」の文字列を感熱ロール紙22に記録している途中で、一旦記録が中断され、感熱ロール紙22の切断が行われ、切断の終了後、再び、「at△BBB△Area」の文字列の残りの部分の記録が行われることとなる。この場合、文字列の記録の一時的な中断が、記録された文字列の白スジ、ドットずれの要因となり、印刷品質の低下を招く可能性がある。特に、感熱ロール紙22の切断の際、カッターユニット25の物理的な接触に伴って感熱ロール紙22に一定の圧力が加わるため、切断の前後で、感熱ロール紙22に多少のずれが生じていることがあり、白スジやドットずれが生じる可能性があると言える。
FIG. 9 is a diagram showing a state in which the leading image is recorded on the thermal roll paper 22 in a predetermined manner in order to explain the operation of step SC6.
As described above, the present invention records on the tip 10a of the receipt 10 and the receipt 10 due to the gap G in the transport direction Y1 between the recording position T1 of the recording head 24 and the cutting position T2 of the cutter unit 25. One of the purposes is to reduce the margin M formed between the leading edge of the first image to be generated.
In order to achieve the object, the printer 2 uses the thermal roll paper 22 to cut the thermal roll paper 22 after the image recording based on the recording data 80 is completed, as shown in FIG. When transporting in the transport direction Y1, the leading image is recorded in parallel with the transport, thereby reducing the margin M.
Based on this, it is assumed that the relationship between the gap G and the leading image on the thermal roll paper 22 is in a state as shown in FIG. In FIG. 9A, the distance between the leading edge of the thermal roll paper 22 and the leading edge of the leading image is the margin Mmin. The margin Mmin is a minimum margin required from the viewpoint of the appearance of the receipt 10 in consideration of the balance between the frame of the receipt 10 and the image. Therefore, if the margin M is the margin Mmin, the margin M can be reduced most.
In the state shown in FIG. 9A, the recording is temporarily interrupted while the character string “atΔBBBΔArea” is being recorded on the thermal roll paper 22, and the thermal roll paper 22 is cut. After the cutting is completed, the remaining portion of the character string “atΔBBBΔArea” is recorded again. In this case, the temporary interruption of the recording of the character string may cause white streaks and dot deviation of the recorded character string, which may cause a decrease in print quality. In particular, when the thermal roll paper 22 is cut, a certain pressure is applied to the thermal roll paper 22 in association with the physical contact of the cutter unit 25, so that there is a slight shift in the thermal roll paper 22 before and after cutting. It can be said that white streaks and dot displacement may occur.

また、ギャップGと、感熱ロール紙22における先頭画像との関係が図9(B)のような状態であるものとする。
図9(B)では、「AAA△Store」の文字列と、「at△BBB△Area」の文字列との間が、記録データ80により想定されている離間量よりも大きい状態である。
この場合、図9(A)のような印刷品質の低下は生じないものの、「AAA△Store」の文字列と、「at△BBB△Area」の文字列との想定以上の離間に起因して、レシート10に記録された画像の見た目が悪くなる可能性がある。
また、ギャップGと、感熱ロール紙22における先頭画像との関係が図9(C)のような状態であるものとする。
この場合、図9(A)における印刷品質の低下を防止でき、かつ、図9(B)のような見た目の悪さを防止できる。
以上を踏まえ、ステップSC6では、先頭画像が図9(C)に示す態様で記録されるように、先頭画像を構成する複数行の文字列のうち、感熱ロール紙22の切断の前に記録すべき文字列の行、及び、先頭画像の記録を開始するタイミングを決定する。
以下、さらに詳述する。
Further, it is assumed that the relationship between the gap G and the leading image on the thermal roll paper 22 is in a state as shown in FIG.
In FIG. 9B, the distance between the character string “AAAΔStore” and the character string “atΔBBBΔArea” is larger than the amount of separation assumed by the recording data 80.
In this case, although the print quality does not deteriorate as shown in FIG. 9A, the character string “AAAΔStore” and the character string “atΔBBBΔArea” are more than expected. The image recorded on the receipt 10 may be deteriorated in appearance.
Further, it is assumed that the relationship between the gap G and the leading image on the thermal roll paper 22 is in a state as shown in FIG.
In this case, it is possible to prevent a decrease in print quality in FIG. 9A, and it is possible to prevent poor appearance as shown in FIG.
Based on the above, in step SC6, the head image is recorded before cutting the thermal roll paper 22 among the character strings of the plurality of lines constituting the head image so that the head image is recorded in the manner shown in FIG. 9C. The line of the power string and the timing for starting the recording of the top image are determined.
The details will be described below.

図10は、仮想的に、感熱ロール紙22の全域に、プリンター2の解像度に準拠した画素を配置したとした場合の各画素を、所定の座標系に展開した様子を示す図である。座標系において各画素は、感熱ロール紙22の形状に準拠してドットマトリクス上に配置されており、各画素は、原点に対する位置により特定可能である。
図9(C)、及び、図10を参照し、図9(C)における点Q0が、座標系の原点P0(0、0)に対応しており、また、点Q1がx軸上の点である点P1(x1、y1)に、点Q2がy軸上の点である点P2(x2、y2)に、点Q3が点P3(x3、y3)にそれぞれ対応している。点P1は、原点P0から、感熱ロール紙22の幅に対応するドット数分、x軸(+)方向に離間した点であり、点P2は、原点P0から、プリンター2における記録ヘッド24の記録位置T1と、カッターユニット25のカット位置T2との搬送方向Y1におけるギャップGに対応するドット数分、y軸(−)方向に離間した点である。また、点P3は、点P1からギャップGに対応するドット数分、y軸(−)方向に離間し、かつ、点P2から感熱ロール紙22の幅に対応するドット数分、x軸(+)方向に離間した点である。
ステップSC6において、まず、制御部50は、所定の記憶領域に図10に示す座標系を定義する。
次いで、制御部50は、以下の手順で、記憶部54に記憶された先頭画像データ72に基づいて、所定の装飾を施した先頭画像の画素のデータ(以下、「描画データ」という。)を座標系に展開する。
すなわち、制御部50は、定義した座標系において、文字列間のスペースのドット数を変更することなく、かつ、いずれの文字列の描画データも仮想直線KT2を跨がない状態(=いずれかの文字列の描画データと、当該文字列の次の文字列の描画データとの間に仮想直線KT2が延在している状態、又は、先頭画像を構成する複数行の文字列のうち、最後の行の文字列の描画データのy軸(−)方向の端よりも、y軸(−)方向側に仮想直線KT2が位置している状態)で、マージンMminに対応するドット数分x軸から離間した仮想直線KT1と、点P2と点P3とを結ぶ仮想直線KT2とで囲まれる範囲に、できるだけ多くの行の文字列の描画データが展開された状態となるように、座標系に先頭画像の描画データを展開する。
FIG. 10 is a diagram illustrating a state in which each pixel is developed in a predetermined coordinate system when pixels conforming to the resolution of the printer 2 are virtually arranged in the entire area of the thermal roll paper 22. In the coordinate system, each pixel is arranged on the dot matrix in accordance with the shape of the thermal roll paper 22, and each pixel can be specified by the position with respect to the origin.
With reference to FIGS. 9C and 10, the point Q0 in FIG. 9C corresponds to the origin P0 (0, 0) of the coordinate system, and the point Q1 is a point on the x-axis. To the point P1 (x1, y1), the point Q2 corresponds to the point P2 (x2, y2) which is a point on the y-axis, and the point Q3 corresponds to the point P3 (x3, y3). Point P1 is a point separated from the origin P0 in the x-axis (+) direction by the number of dots corresponding to the width of the thermal roll paper 22, and point P2 is recorded by the recording head 24 in the printer 2 from the origin P0. This is a point separated in the y-axis (−) direction by the number of dots corresponding to the gap G in the transport direction Y1 between the position T1 and the cutting position T2 of the cutter unit 25. Further, the point P3 is separated from the point P1 by the number of dots corresponding to the gap G in the y-axis (−) direction, and from the point P2 by the number of dots corresponding to the width of the thermal roll paper 22, and the x-axis (+ ) In the direction.
In step SC6, first, the control unit 50 defines the coordinate system shown in FIG. 10 in a predetermined storage area.
Next, the control unit 50 performs pixel data (hereinafter referred to as “drawing data”) of the top image with a predetermined decoration based on the top image data 72 stored in the storage unit 54 in the following procedure. Expand to coordinate system.
That is, the control unit 50 does not change the number of dots in the space between character strings in the defined coordinate system, and the drawing data of any character string does not straddle the virtual straight line KT2 (= any A state in which the virtual straight line KT2 extends between the drawing data of the character string and the drawing data of the character string next to the character string, or the last of the character strings of a plurality of lines constituting the top image In a state where the virtual straight line KT2 is located on the y-axis (−) direction side of the drawing data of the line character string from the end of the y-axis (−) direction) The leading image is displayed in the coordinate system so that the drawing data of character strings on as many lines as possible is expanded in a range surrounded by the separated virtual straight line KT1 and the virtual straight line KT2 connecting the points P2 and P3. Expand the drawing data.

例えば、先頭画像の描画データが、所定の装飾を施した「AAA△Store」の文字列に係る描画データと、当該描画データから予め定められたスペースに対応するドット数分離間した、所定の装飾を施した「at△BBB△Area」の文字列に係る描画データとからなる場合において、文字列間のスペースに対応するドット数を変更することなく、仮想直線KT1と仮想直線KT2とで囲まれる範囲に、全ての文字列に係る描画データを展開可能な場合は、当該範囲に、全ての文字列に係る描画データを展開する。一方、仮想直線KT1と仮想直線KT2とのy軸方向のドット数に比して、文字列間のスペースを含めた先頭画像の描画データのy軸方向のドット数が大きく、全ての文字列に係る描画データを仮想直線KT1と仮想直線KT2とで囲まれる範囲に展開することができず、かつ、仮想直線KT1と仮想直線KT2とのy軸方向のドット数に比して、「AAA△Store」の文字列に係る描画データのy軸方向のドット数が小さく、「AAA△Store」の文字列に係る描画データは当該範囲に展開可能な場合は、図10に示すように、「AAA△Store」の文字列に係る描画データと、「at△BBB△Area」の文字列に係る描画データとの間のスペースに、仮想直線KT2が延在するような状態で、各文字列に係る描画データを座標系に展開する。ここで、仮想直線KT1と仮想直線KT2とで挟まれた範囲に展開された文字列は、切断のための搬送の開始後、切断を行う前に、記録される文字列であり、仮想直線KT2よりy軸(−)方向に展開された文字列は、当該切断後に記録される文字列である。制御部50は、座標系を利用して、感熱ロール紙22の切断のための搬送の開始後、切断を行う前に、記録を完了することが可能な文字列について、できるだけ多くの文字列を記録するとした場合に、先頭画像を構成する文字列の行のうち、当該切断前に記録すべき行を特定している。   For example, the drawing data of the head image is a predetermined decoration obtained by rendering drawing data related to the character string “AAAΔStore” with a predetermined decoration and the number of dots corresponding to a predetermined space from the drawing data. And is drawn with virtual lines KT1 and KT2, without changing the number of dots corresponding to the space between the character strings. If the drawing data related to all the character strings can be expanded in the range, the drawing data related to all the character strings is expanded in the range. On the other hand, compared to the number of dots in the y-axis direction of the virtual straight line KT1 and the virtual line KT2, the number of dots in the y-axis direction of the drawing data of the first image including the space between the character strings is large, and all the character strings Such drawing data cannot be developed in a range surrounded by the virtual straight line KT1 and the virtual straight line KT2, and compared to the number of dots in the y-axis direction of the virtual straight line KT1 and the virtual straight line KT2, “AAAΔStore When the number of dots in the y-axis direction of the drawing data related to the character string “” is small and the drawing data related to the character string “AAAΔStore” can be expanded into the range, as shown in FIG. Drawing related to each character string in a state where the virtual straight line KT2 extends in a space between the drawing data related to the character string “Store” and the drawing data related to the character string “atΔBBBΔArea”. data It is deployed to coordinate system. Here, the character string developed in the range sandwiched between the virtual straight line KT1 and the virtual straight line KT2 is a character string recorded after the start of conveyance for cutting and before cutting, and the virtual straight line KT2 The character string expanded in the y-axis (−) direction is a character string recorded after the cutting. The control unit 50 uses the coordinate system to output as many character strings as possible for character strings that can be recorded before starting cutting after conveyance for cutting the thermal roll paper 22 is started. In the case of recording, the line to be recorded before the cutting is specified among the lines of the character string constituting the head image.

次いで、制御部50は、座標系に展開した文字列に係る描画データのうち、先頭の文字列に係る描画データのy軸(+)側の端と、x軸との離間量D1(図10参照)のドット数を検出する。
図10の例では、「AAA△Store」の文字列に係る描画データと、「at△BBB△Area」の文字列に係る描画データとの間のスペースに仮想直線KT2が延在するような状態で、先頭画像に係る描画データが座標系に展開されているが、この場合、図9(C)に示すように、離間量D1に対応する距離L1分、感熱ロール紙22の切断位置(先端)から離間した位置から先頭画像の記録を始めれば、「AAA△Store」の文字列の記録が完了した後、「at△BBB△Area」の文字列の記録を開始する前に、カッターユニット25による感熱ロール紙22の切断が行われ、その後、「at△BBB△Area」の文字列の記録が開始されることとなり、図9(A)を用いて説明した印刷品質の低下を防止できる。
ステップSC6において、制御部50は、以上のようにして座標系に先頭画像に係る描画データを展開した後、仮想直線KT1と仮想直線KT2とで囲まれた範囲に展開した文字列の行を、切断のための搬送の開始後、切断前に感熱ロール紙22に記録する行と決定し、さらに、離間量D1(図10)に対応する距離L1(図9(C))だけ、感熱ロール紙22の先端から離間した位置を、先頭画像の記録を開始する位置(記録開始位置Z1、図9(C)参照)として決定する。
なお、座標系における離間量D1のドット数と、感熱ロール紙22における距離L1の長さとを対応づけて記憶するテーブルが事前に所定の記憶領域に記憶されており、制御部50は、当該テーブルに基づいて、離間量D1を距離L1へと変換する。距離L1の値は、例えば、搬送モーター26がステッピングモーターで構成されている場合において、ステップ数によって表現された値であっても良い。
Next, the control unit 50 sets the distance D1 between the end on the y-axis (+) side of the drawing data related to the first character string and the x-axis among the drawing data related to the character string developed in the coordinate system (FIG. 10). ) Is detected.
In the example of FIG. 10, a state in which the virtual straight line KT2 extends in a space between the drawing data related to the character string “AAAΔStore” and the drawing data related to the character string “atΔBBBΔArea”. In this case, as shown in FIG. 9C, the drawing data relating to the head image is developed in the coordinate system. As shown in FIG. 9C, the cutting position (front end) of the thermal roll paper 22 by a distance L1 corresponding to the separation amount D1. If recording of the head image is started from a position separated from (), after the recording of the character string “AAAΔStore” is completed, the recording of the character string “atΔBBBΔArea” is started before the cutter unit 25 is started. Then, the thermal roll paper 22 is cut, and then the recording of the character string “atΔBBBΔArea” is started, and the deterioration of the print quality described with reference to FIG. 9A can be prevented.
In step SC6, the control unit 50 expands the drawing data related to the head image in the coordinate system as described above, and then expands the line of the character string expanded in the range surrounded by the virtual straight line KT1 and the virtual straight line KT2. After the start of conveyance for cutting, it is determined that the line is to be recorded on the thermal roll paper 22 before cutting, and further, the thermal roll paper is set by a distance L1 (FIG. 9C) corresponding to the distance D1 (FIG. 10). A position spaced from the leading end of 22 is determined as a position to start recording of the top image (recording start position Z1, see FIG. 9C).
A table that stores the number of dots of the separation distance D1 in the coordinate system and the length of the distance L1 on the thermal roll paper 22 in association with each other is stored in advance in a predetermined storage area, and the control unit 50 stores the table. Based on the above, the separation amount D1 is converted into the distance L1. The value of the distance L1 may be, for example, a value expressed by the number of steps when the transport motor 26 is a stepping motor.

さて、前掲図8に戻り、先頭画像情報記憶部61は、ステップSC6で決定した、切断前に記録する文字列の行、及び、先頭画像の記録を開始する位置を示す情報を先頭画像データ72と対応づけて記憶する(ステップSC7)。
次いで、記録制御部60は、記録データ80に基づいて、プリントエンジン51を制御して、感熱ロール紙22に画像の記録を行う(ステップSC8)。
次いで、ホストコンピューター3は、従来と同様、搬送指示コマンドHCをプリンター2に送信する(ステップSB2)。プリンター2の記録制御部60は、受信した搬送指示コマンドHCを読み飛ばす(ステップSC9)。また、ホストコンピューター3は、切断指示コマンドSCをプリンター2に送信するが(ステップSB3)、プリンター2の記録制御部60は、受信した切断指示コマンドSCを読み飛ばす(ステップSC10)。
ホストコンピューター3には、何ら改変が加えられていないため、ホストコンピューター3は、従来と同様、記録データ80、搬送指示コマンドHC、切断指示コマンドSCの順に、順次、コマンドをプリンター2に送信するが、本実施形態に係るプリンター2は、ホストコンピューター3の制御によることなく、マージンMを縮小するための所定の手順により切断のための搬送、切断を実行するため、これらコマンドを読み飛ばしている。また、プリンター2側で、これらコマンドを読み飛ばすという処理を行うため、ホストコンピューター3は、従来と同様の手順でコマンドを送信すればよく、ホストコンピューター3に対する改変が必要ない。
Returning to FIG. 8, the head image information storage unit 61 stores information indicating the character string line to be recorded before cutting and the position where the head image starts to be recorded, determined in step SC 6. Are stored in association with each other (step SC7).
Next, the recording control unit 60 controls the print engine 51 based on the recording data 80 to record an image on the thermal roll paper 22 (step SC8).
Next, the host computer 3 transmits a transport instruction command HC to the printer 2 as in the conventional case (step SB2). The recording control unit 60 of the printer 2 skips the received conveyance instruction command HC (step SC9). Further, the host computer 3 transmits a cutting instruction command SC to the printer 2 (step SB3), but the recording control unit 60 of the printer 2 skips the received cutting instruction command SC (step SC10).
Since no modification has been made to the host computer 3, the host computer 3 sequentially sends the commands to the printer 2 in the order of the recording data 80, the transport instruction command HC, and the cutting instruction command SC as in the conventional case. The printer 2 according to the present embodiment skips these commands in order to execute conveyance and cutting for cutting according to a predetermined procedure for reducing the margin M without being controlled by the host computer 3. In addition, since the printer 2 performs a process of skipping these commands, the host computer 3 only needs to transmit the command in the same procedure as before, and no modification to the host computer 3 is required.

次いで、プリンター2の記録制御部60は、切断のための感熱ロール紙22の搬送を開始する(ステップSC11)。
感熱ロール紙22の搬送中、記録制御部60は、感熱ロール紙22における記録開始位置Z1(図9(C)参照)が、記録ヘッド24の記録位置T1に至ったか否かを監視する(ステップSC12)。なお、プリンター2では、感熱ロール紙22の搬送量を、例えば、ステッピングモーターとして構成された搬送モーター26のステップ数等により管理しており、この搬送量や、感熱ロール紙22の位置を検出する所定のセンター等の検出値に基づいて、記録開始位置Z1や、切断位置のプリンター2における位置を管理しており、記録開始位置Z1や切断位置が、記録位置T1やカット位置T2に至ったことを検出可能である。
感熱ロール紙22における記録開始位置Z1が、記録ヘッド24の記録位置T1に至った場合、記録制御部60は、記憶部54の先頭画像データ72、及び、ステップSC7において先頭画像データ72と対応づけて記憶された、切断前に記録すべき行の情報に基づいて、先頭画像を構成する複数行の文字列のうち、切断前に記録すべき行の文字列に係る制御コマンドを読み出して、実行することにより、当該行の文字列を記録する(ステップSC13)。
例えば、図9(C)を参照し、「AAA△Store」の文字列と、「at△BBB△Area」の文字列のうち、「AAA△Store」の文字列が、切断前に記録すべき行の文字列に該当する場合、記録制御部60は、記憶部54の先頭画像データ72に含まれるコマンドのうち、コマンド群H1に係るコマンドである文字列装飾コマンドMS1、及び、文字列記録指示コマンドMK1を取得し、これらコマンドを読み出して実行することにより、所定の装飾を施した上で、「AAA△Store」の文字列を感熱ロール紙22の搬送量に記録する。
Next, the recording control unit 60 of the printer 2 starts conveying the thermal roll paper 22 for cutting (step SC11).
During conveyance of the thermal roll paper 22, the recording control unit 60 monitors whether or not the recording start position Z1 (see FIG. 9C) on the thermal roll paper 22 has reached the recording position T1 of the recording head 24 (step). SC12). The printer 2 manages the transport amount of the thermal roll paper 22 by, for example, the number of steps of the transport motor 26 configured as a stepping motor, and detects the transport amount and the position of the thermal roll paper 22. The recording start position Z1 and the position of the cutting position in the printer 2 are managed based on the detection value of a predetermined center or the like, and the recording start position Z1 and the cutting position have reached the recording position T1 and the cutting position T2. Can be detected.
When the recording start position Z1 on the thermal roll paper 22 reaches the recording position T1 of the recording head 24, the recording control unit 60 associates the head image data 72 of the storage unit 54 with the head image data 72 in step SC7. The control command related to the character string of the line to be recorded before cutting is read out from the plurality of character strings constituting the head image based on the information of the line to be recorded before cutting, and executed. As a result, the character string of the line is recorded (step SC13).
For example, referring to FIG. 9C, among the character string “AAAΔStore” and the character string “atΔBBBΔArea”, the character string “AAAΔStore” should be recorded before cutting. When it corresponds to the character string of the line, the recording control unit 60 includes the character string decoration command MS1 that is a command related to the command group H1 among the commands included in the head image data 72 of the storage unit 54, and the character string recording instruction. The command MK1 is acquired, and these commands are read and executed to record a character string “AAAΔStore” in the transport amount of the thermal roll paper 22 with a predetermined decoration.

上記特定の行の文字列の記録が完了した後、感熱ロール紙22の切断位置が、カッターユニット25のカット位置T2に至ったタイミングで、記録制御部60は、感熱ロール紙22の搬送を停止し、カッターユニット25により感熱ロール紙22を切断する(ステップSC14)。
上述した手段により、記録開始位置Z1と、先頭画像のうち、記録すべき行が調整されているため、文字列を記録している途中ではなく、文字列の記録が完了した後に、感熱ロール紙22の切断位置が、カッターユニット25のカット位置T2に至ることとなる。
次いで、記録制御部60は、先頭画像のうち、未だ記録されていない行の文字列が存在するか否かを判別し(ステップSC15)、存在する場合(ステップSC15:YES)、先頭画像データ72における当該行の文字列に係る制御コマンドに基づいて、所定の装飾を施した上で、当該行の文字列を記録する(ステップSC16)。
The recording control unit 60 stops the conveyance of the thermal roll paper 22 at the timing when the cutting position of the thermal roll paper 22 reaches the cutting position T2 of the cutter unit 25 after the recording of the character string of the specific line is completed. Then, the thermal roll paper 22 is cut by the cutter unit 25 (step SC14).
Since the recording start position Z1 and the line to be recorded are adjusted in the first image by the above-described means, the thermal roll paper is not after the character string is recorded but after the character string recording is completed. The cutting position 22 reaches the cutting position T2 of the cutter unit 25.
Next, the recording control unit 60 determines whether or not there is a character string in a line that has not been recorded in the head image (step SC15). If it exists (step SC15: YES), the head image data 72 is determined. Based on the control command related to the character string in the line, a predetermined decoration is applied, and the character string in the line is recorded (step SC16).

さて、ステップSC2に戻り、先頭画像データ72が記憶部54に既に記憶されている場合(ステップSC2:YES)について、説明する。
なお、ステップSC2で「YES」と判別される場合は、記憶部54に記憶された先頭画像データ72に基づいて、感熱ロール紙22の先端部に、既に、先頭画像が記録されている状態を想定している。感熱ロール紙22の切断のための搬送に伴って先頭画像が記録されているか否かをフラグによって管理したり、光学的な検出手段で検出するようにしたりするようにしても良い。これにより、感熱ロール紙22の交換のタイミングや、何らかのエラーにより感熱ロール紙22に先頭画像が記録されていない場合に、そのことを適切に検出可能である。
さて、先頭画像データ72が記憶部54に既に記憶されている場合(ステップSC2:YES)、記録制御部60は、受信バッファー56に記憶された記録データ80のうち、先頭画像に係るコマンドを除くコマンドに基づいて、画像の記録を行う(ステップSC17)。例えば、記録データ80の状態が、図4(A)が示す状態である場合、記録制御部60は、コマンド群H1、及び、コマンド群H2を除くコマンドを順次読み出して実行することにより、画像の記録を行う。これにより、先頭画像を重複して記録することなく、画像の記録を行うことができる。
なお、ステップSC17では、記録制御部60は、記憶部54に先頭画像データ72と、受信バッファー56記憶された記録データ80との比較結果に基づいて、記録データ80に含まれるコマンドのうち、先頭画像に係るコマンド以外のコマンドを特定する。
ステップSC17において、感熱ロール紙22に画像を記録した後、記録制御部60は、処理手順をステップSC9へ移行し、切断のための搬送に伴う先頭画像の記録を行う。
Now, returning to step SC2, the case where the top image data 72 is already stored in the storage unit 54 (step SC2: YES) will be described.
If “YES” is determined in step SC 2, the state in which the leading image has already been recorded at the leading end of the thermal roll paper 22 based on the leading image data 72 stored in the storage unit 54. Assumed. Whether or not the leading image is recorded with the conveyance for cutting the thermal roll paper 22 may be managed by a flag, or may be detected by an optical detection means. Thereby, when the leading image is not recorded on the thermal roll paper 22 due to the replacement timing of the thermal roll paper 22 or some error, this can be detected appropriately.
When the head image data 72 is already stored in the storage unit 54 (step SC2: YES), the recording control unit 60 excludes the command related to the head image from the recording data 80 stored in the reception buffer 56. An image is recorded based on the command (step SC17). For example, when the state of the recording data 80 is the state shown in FIG. 4A, the recording control unit 60 sequentially reads and executes the commands except for the command group H1 and the command group H2, thereby executing image recording. Make a record. Thereby, it is possible to record an image without duplicating the head image.
In step SC17, the recording control unit 60 determines that the head of the commands included in the recording data 80 is based on the comparison result between the head image data 72 in the storage unit 54 and the recording data 80 stored in the reception buffer 56. A command other than the command related to the image is specified.
In step SC17, after the image is recorded on the thermal roll paper 22, the recording control unit 60 moves the processing procedure to step SC9, and records the leading image accompanying the conveyance for cutting.

以上説明したように、本実施形態によれば、先頭画像情報記憶部61は、ホストコンピューター3から制御コマンドを受信した場合、記録データ80に含まれる画像の情報に基づいて、記録媒体たる感熱ロール紙22に記録すべき画像のうち、先端部の所定の範囲に記録される画像である先頭画像の情報を抽出し、先頭画像データ72として記憶する。また、記録制御部60は、カッターユニット25により感熱ロール紙22を切断する場合、ホストコンピューター3から受信した、所定の搬送量の搬送を指示する搬送指示コマンドHC、及び、切断部による切断を指示する切断指示コマンドSCを読み捨てた上で、先頭画像情報記憶部61により記憶した先頭画像データ72に基づいて、感熱ロール紙22の切断位置の搬送方向上流側に、記録ヘッド24により先頭画像を記録させつつ、感熱ロール紙22の切断位置がカッターユニット25に対応する位置に至るまで感熱ロール紙22を搬送させて、カッターユニット25により感熱ロール紙22を切断する。
これによれば、プリンター2は、ホストコンピューター3から入力された制御コマンドに含まれる記録データ80から、先頭画像の情報を抽出して先頭画像データ72として記憶しておき、感熱ロール紙22を切断する際は、切断のための搬送と併せて、感熱ロール紙22における切断位置の搬送方向上流側に先頭画像を記録するため、記録ヘッド24の記録位置T1とカッターユニット25のカット位置T2との搬送方向における離間に起因して発生する感熱ロール紙22の先端と、感熱ロール紙22に記録される画像の先端とのマージンMをできるだけ縮小することが可能となる。
特に、ホストコンピューター3は、プリンター2に対して通常の制御コマンドを出力すれば、プリンター2側で、自動で、先頭画像の情報が先頭画像データ72として記憶され、以後は、先頭画像データ72に基づいて、感熱ロール紙22の切断のための搬送に伴う先頭画像の記録が実行されるため、ホストコンピューター3に対して改変を行う必要がない。
As described above, according to the present embodiment, when the head image information storage unit 61 receives a control command from the host computer 3, the head image information storage unit 61 is based on image information included in the recording data 80 and is a thermal roll as a recording medium. From the image to be recorded on the paper 22, information on the first image that is an image recorded in a predetermined range at the front end is extracted and stored as the first image data 72. In addition, when the thermal roll paper 22 is cut by the cutter unit 25, the recording control unit 60 receives the conveyance instruction command HC that instructs conveyance of a predetermined conveyance amount received from the host computer 3, and instructs cutting by the cutting unit. The cutting instruction command SC to be read is discarded, and the head image is recorded by the recording head 24 on the upstream side in the transport direction of the cutting position of the thermal roll paper 22 based on the head image data 72 stored in the head image information storage unit 61. The thermal roll paper 22 is conveyed until the cutting position of the thermal roll paper 22 reaches a position corresponding to the cutter unit 25, and the thermal roll paper 22 is cut by the cutter unit 25.
According to this, the printer 2 extracts the information of the head image from the recording data 80 included in the control command input from the host computer 3 and stores it as the head image data 72 and cuts the thermal roll paper 22. In order to record the leading image on the upstream side in the transport direction of the cutting position on the thermal roll paper 22 in conjunction with the transport for cutting, the recording position T1 of the recording head 24 and the cutting position T2 of the cutter unit 25 are The margin M between the leading edge of the thermal roll paper 22 generated due to the separation in the transport direction and the leading edge of the image recorded on the thermal roll paper 22 can be reduced as much as possible.
In particular, if the host computer 3 outputs a normal control command to the printer 2, the information on the top image is automatically stored as the top image data 72 on the printer 2 side. Based on this, the recording of the leading image accompanying the conveyance for cutting the thermal roll paper 22 is executed, so there is no need to modify the host computer 3.

また、本実施形態では、先頭画像情報記憶部61は、先頭画像データ72が記憶されていない状態のときに制御コマンドを受信した場合、先頭画像データ72を記憶する。
これによれば、先頭画像データ72が記憶されていない状態のときに、制御コマンドに基づく先頭画像データ72の記憶が行われ、以後は、記憶した先頭画像データ72に基づく先頭画像の記録が行われることとなり、先頭画像の情報の記録に係る処理の回数を削減でき、処理効率が向上する。
なお、先頭画像データ72が記憶されていない場合としては、例えば、初めて制御コマンドを受信した場合や、先頭画像データ72をRAM等の不揮発性メモリーに記憶する構成としたときに、電源をオフした後、再投入する場合等が想定されている。
In the present embodiment, the head image information storage unit 61 stores the head image data 72 when a control command is received when the head image data 72 is not stored.
According to this, when the head image data 72 is not stored, the head image data 72 is stored based on the control command, and thereafter, the head image is recorded based on the stored head image data 72. As a result, the number of processes relating to recording of the information of the head image can be reduced, and the processing efficiency is improved.
In addition, when the first image data 72 is not stored, for example, when the control command is received for the first time or when the first image data 72 is configured to be stored in a nonvolatile memory such as a RAM, the power is turned off. It is assumed that it will be re-entered later.

また、本実施形態では、記録制御部60は、感熱ロール紙22の切断に伴って先頭画像を記録した後、新たに前記制御コマンドを受信した場合、新たな制御コマンドの記録データ80に含まれるコマンド(画像の情報)のうち、先頭画像情報記憶部61により記憶した先頭画像データに含まれるコマンド以外のコマンドに基づいて、感熱ロール紙22への記録を行う。
これによれば、先頭画像データ72に基づいて、切断のための搬送に伴う先頭画像の記録を実行した後に、新たな制御コマンドを受信した場合に、既に記録された先頭画像を重複して記録することなく、記録すべき画像を過不足なく記録可能となる。
In the present embodiment, when the recording control unit 60 newly receives the control command after recording the head image as the thermal roll paper 22 is cut, it is included in the recording data 80 of the new control command. Recording on the thermal roll paper 22 is performed based on commands other than commands included in the head image data stored in the head image information storage unit 61 among the commands (image information).
According to this, when a new control command is received after executing the recording of the leading image accompanying conveyance for cutting based on the leading image data 72, the previously recorded leading image is recorded in duplicate. Thus, the image to be recorded can be recorded without excess or deficiency.

また、本実施形態では、記録データ80における先頭画像の情報は、所定の文字コードからなる文字列を含んで構成される情報である。具体的には、記録データ80における先頭画像の情報は、記録すべき文字列を含んで構成される文字列記録指示コマンドを含んでいる。
そして、先頭画像情報記憶部61は、記録データ80から、予め設定された所定の文字列であるキーワード文字列を検出し、当該キーワード文字列に至るまでの情報を抽出して、先頭画像データ72として記憶部54に記憶する。
これによれば、設定されたキーワード文字列を利用して、記録データ80に含まれる画像の情報から、先頭画像の情報を具体的に特定することが可能となる。特に、記録データ80に含まれる画像の情報から、キーワード文字列を検出し、当該情報の先頭からキーワード文字列に至るまでの情報を抽出する、という非常に簡易な手段で、先頭画像の情報を特定できる。
つまり、本実施形態では、先頭画像が文字列で構成されている点、及び、記録データ80において、先頭画像を構成する文字列の各文字が所定の文字コードで表現されており、文字列検索が可能な点を活用し、容易な手段で、確実に、記録データ80における先頭画像の情報を特定可能である。
In the present embodiment, the information of the head image in the recording data 80 is information including a character string composed of a predetermined character code. Specifically, the information of the head image in the recording data 80 includes a character string recording instruction command including a character string to be recorded.
Then, the head image information storage unit 61 detects a keyword character string that is a predetermined character string set in advance from the recording data 80, extracts information up to the keyword character string, and starts the head image data 72. Is stored in the storage unit 54.
According to this, it is possible to specifically specify the information of the head image from the information of the image included in the recording data 80 using the set keyword character string. In particular, the information of the head image is obtained by a very simple means of detecting the keyword character string from the image information included in the recording data 80 and extracting the information from the head of the information to the keyword character string. Can be identified.
In other words, in the present embodiment, the leading image is composed of a character string, and in the recorded data 80, each character of the character string constituting the leading image is represented by a predetermined character code. Therefore, it is possible to identify the information of the head image in the recording data 80 with certainty by using an easy means.

また、本実施形態では、先頭画像は、1又は複数の行の文字列を含んで構成されている。
そして、記録制御部60は、感熱ロール紙22の切断位置の搬送方向上流側に、記録ヘッド24により先頭画像を記録させつつ、感熱ロール紙22の切断位置がカット位置T2に対応する位置に至るまで間寝るロール紙を搬送させる際、いずれかの行の文字列に基づく画像の記録が完了し、かつ、次の文字列が存在する場合は当該次の文字列に基づく画像の記録が開始されていない状態で、感熱ロール紙22の切断位置がカット位置T2に至るように、切断の前に記録を行うべき文字列の行を決定する。
これによれば、いずれかの行の文字列に基づく画像の記録が完了し、かつ、次の文字列が存在する場合は当該次の文字列に基づく画像の記録が開始されていない状態で、感熱ロール紙22の切断位置がカット位置T2に至って切断が行われることとなるため、印刷品質の低下を効果的に抑制することが可能となる。
In the present embodiment, the top image includes a character string of one or more lines.
Then, the recording control unit 60 records the leading image by the recording head 24 on the upstream side in the transport direction of the cutting position of the thermal roll paper 22, and the cutting position of the thermal roll paper 22 reaches a position corresponding to the cutting position T2. When transporting the roll paper that sleeps until the image recording based on the character string of one line is completed and the next character string exists, the image recording based on the next character string is started. In such a state, the character string row to be recorded is determined before cutting so that the cutting position of the thermal roll paper 22 reaches the cutting position T2.
According to this, when the recording of the image based on the character string of any line is completed, and the next character string exists, the recording of the image based on the next character string is not started, Since the cutting position of the heat-sensitive roll paper 22 reaches the cutting position T2 and the cutting is performed, it is possible to effectively suppress the deterioration of the printing quality.

また、本実施形態では、先頭画像情報記憶部61は、記録データ80に、先頭画像を構成する文字列の装飾に係る文字列装飾コマンド(付加情報)が含まれている場合は、当該コマンドも併せて記憶する。
これによれば、先頭画像に施すことが想定された装飾を適切に施した上で、切断のための搬送に伴って先頭画像を記録することが可能となる。
In the present embodiment, the head image information storage unit 61 also stores the command if the record data 80 includes a character string decoration command (additional information) related to the decoration of the character string constituting the head image. Also memorize.
According to this, it is possible to record the head image along with the conveyance for cutting after appropriately applying the decoration assumed to be applied to the head image.

<第2実施形態>
次いで、第2実施形態について説明する。
Second Embodiment
Next, a second embodiment will be described.

図11は、本実施形態に係るPOS端末1の機能的構成を示すブロック図である。
図11と、図3との比較で明らかなように、本実施形態に係るホストコンピューター3のプリンタードライバー実行部40bは、キーワード文字列変更部90を備え、また、プリンター2の制御部50は、キーワード文字列設定部91を備えている。
本実施形態に係るプリンター2は、上述した第1実施形態に係るプリンター2と同様、キーワード文字列を利用して、記録データ80のうち、先頭画像にかかる部分を抽出する。そして、第1実施形態に係るプリンター2では、キーワード文字列が、キーワード文字列データ73として、記憶部54に記憶されており、ホストコンピューター3側からその値を変更することができなかったが、本実施形態では、ユーザーが、ホストコンピューター3に対して所定の操作を行うことにより、プリンター2の記憶部54に記憶されたキーワード文字列の値を自由に変更可能である。
FIG. 11 is a block diagram showing a functional configuration of the POS terminal 1 according to the present embodiment.
As is clear from comparison between FIG. 11 and FIG. 3, the printer driver execution unit 40 b of the host computer 3 according to the present embodiment includes a keyword character string changing unit 90, and the control unit 50 of the printer 2 includes: A keyword character string setting unit 91 is provided.
Similar to the printer 2 according to the first embodiment described above, the printer 2 according to the present embodiment uses the keyword character string to extract a portion related to the head image from the recording data 80. In the printer 2 according to the first embodiment, the keyword character string is stored as the keyword character string data 73 in the storage unit 54, and the value cannot be changed from the host computer 3 side. In the present embodiment, the user can freely change the value of the keyword character string stored in the storage unit 54 of the printer 2 by performing a predetermined operation on the host computer 3.

詳述すると、ホストコンピューター3のキーワード文字列変更部90は、ユーザーが、変更したいキーワード文字列を入力するためのユーザーインターフェイスを提供する。当該ユーザーインターフェイスでは、ディスプレー12に、変更したいキーワード文字列を入力するための所定の表示画面が表示される。ユーザーは、キーワード文字列を変更する場合、ホストコンピューター3に対して所定の操作をすることにより、ディスプレー12に当該表示画面を表示させた上で、当該表示画面を参照しつつ、キー入力部14等の入力デバイスを操作して、キーワード文字列を入力する。
キーワード文字列が入力され、当該入力が確定したことを検出したキーワード文字列変更部90は、プリンター2の記憶部54に記憶されたキーワード文字列データ73の値を、入力されたキーワード文字列の値へと変更することを指示する専用のキーワード設定コマンドを生成し、プリンター2に出力する。
キーワード文字列変更部90の機能は、プリンタードライバーにより実現されるものである。
当該キーワード設定コマンドが入力されると、プリンター2の制御部50のキーワード文字列設定部91は、当該キーワード設定コマンドに基づいて、キーワード文字列データ73の値を書き換える。これにより、以後は、書き換え後のキーワード文字列データ73が示すキーワード文字列により、記録データ80のうち、先頭画像に係る部分を抽出する処理が行われる。
この場合、図8のステップSC2において、先頭画像データ72が記憶部54に既に記憶されているか否かの判別と併せて、直近にキーワード文字列データ73の書き換えが行われたか否かを判別し、直近にキーワード文字列データ73の書き換えが行われている場合は、処理手順をステップSC3へと移行し、行われていない場合は、処理手順をステップSC17へと移行し、記録データ80から新たに抽出した先頭画像に係るデータに基づいて、既存の先頭画像データ72を書き換えるようにすれば、キーワード文字列データ73の書き換えに応じて、適切に、先頭画像データ72を書き換えることが可能となる。
More specifically, the keyword character string changing unit 90 of the host computer 3 provides a user interface for the user to input a keyword character string to be changed. In the user interface, a predetermined display screen for inputting a keyword character string to be changed is displayed on the display 12. When changing the keyword character string, the user performs a predetermined operation on the host computer 3 to display the display screen on the display 12, and then refers to the display screen while the key input unit 14. The keyword character string is input by operating the input device such as.
When the keyword character string is input and the keyword character string changing unit 90 detects that the input is confirmed, the keyword character string changing unit 90 calculates the value of the keyword character string data 73 stored in the storage unit 54 of the printer 2 as the input keyword character string. A dedicated keyword setting command for instructing to change to a value is generated and output to the printer 2.
The function of the keyword character string changing unit 90 is realized by a printer driver.
When the keyword setting command is input, the keyword character string setting unit 91 of the control unit 50 of the printer 2 rewrites the value of the keyword character string data 73 based on the keyword setting command. As a result, thereafter, a process for extracting a portion related to the head image from the recorded data 80 by the keyword character string indicated by the rewritten keyword character string data 73 is performed.
In this case, in step SC2 of FIG. 8, it is determined whether or not the keyword character string data 73 has been rewritten most recently, in addition to whether or not the head image data 72 has already been stored in the storage unit 54. If the keyword character string data 73 has been rewritten most recently, the processing procedure shifts to step SC3. If not, the processing procedure shifts to step SC17, and new recording data 80 is added. If the existing leading image data 72 is rewritten based on the data relating to the leading image extracted in step S1, the leading image data 72 can be appropriately rewritten according to the rewriting of the keyword character string data 73. .

本実施形態の場合、入力されたキーワード文字列の値へと変更することを指示するキーワード設定コマンドを生成し、プリンター2に出力する機能をホストコンピューター3に追加する必要が生じるものの、ホストコンピューター3を利用して簡易な手段で自由にキーワード文字列の内容を変更することが可能となり、非常に利便性が向上する。   In the case of the present embodiment, although it is necessary to add a function for generating a keyword setting command for instructing to change to the value of the input keyword character string and outputting it to the printer 2 to the host computer 3, the host computer 3 This makes it possible to freely change the contents of the keyword character string by simple means, thereby greatly improving convenience.

以上説明したように、本実施形態によれば、ホストコンピューター3は、キーワード文字列の変更を入力可能に構成されると共に、当該入力に基づいて、キーワード文字列の設定を変更するためのキーワード設定コマンドを出力可能に構成さている。
そして、プリンター2のキーワード文字列変更部90は、入力されたキーワード設定コマンドに基づいて、設定されたキーワード文字列を変更する。
これによれば、ホストコンピューター3に対して、キーワード文字列の変更を入力することにより、設定されたキーワード文字列を変更することが可能となり、利便性が向上する。
As described above, according to the present embodiment, the host computer 3 is configured to be able to input a change of the keyword character string, and the keyword setting for changing the setting of the keyword character string based on the input. The command can be output.
Then, the keyword character string changing unit 90 of the printer 2 changes the set keyword character string based on the input keyword setting command.
According to this, it is possible to change the set keyword character string by inputting the change of the keyword character string to the host computer 3, and the convenience is improved.

<第3実施形態>
次いで、第3実施形態について説明する。
上述した第1実施形態に係るプリンター2は、記憶部54に先頭画像データ72が記憶されている場合は、当該先頭画像データ72に基づいて、切断のための搬送に伴う先頭画像の記録を実行していた。
しかしながら、本実施形態に係るプリンター2は、1の制御コマンドに基づいて、当該1の制御コマンドの次の制御コマンドを受信している場合において、当該次のコマンドが所定の条件を満たしている場合は、当該1の制御コマンドの記録データ80に基づいて画像を記録した後、切断のための搬送に伴う画像の記録を行わず、感熱ロール紙22を切断した後、当該次のコマンドの記録データ80に基づいて画像の記録を行う構成となっている。
<Third Embodiment>
Next, a third embodiment will be described.
When the first image data 72 is stored in the storage unit 54, the printer 2 according to the first embodiment described above executes recording of the first image accompanying the conveyance for cutting based on the first image data 72. Was.
However, when the printer 2 according to the present embodiment receives a control command next to the one control command based on the one control command, the next command satisfies a predetermined condition. After recording an image based on the recording data 80 of the first control command, after recording the thermal roll paper 22 without recording the image accompanying the conveyance for cutting, the recording data of the next command 80 is configured to record an image.

図12は、本実施形態に係るプリンター2の動作を説明するフローチャートである。
図12に示すように、プリンター2は、1の制御コマンドを受信し、当該1の制御コマンドを受信バッファー56に格納した後(ステップSD1)、連続して次の制御コマンドを受信し、受信バッファー56に格納する(ステップSD2)。
なお、ホストコンピューター3は、プリンター2側の処理の進み具合にかかわらず、生成したコマンドを順次、プリンター2に送信し、プリンター2側で、一旦、受信バッファー56に制御コマンドを格納し、制御コマンドに含まれる各コマンドを順次読み出して実行する構成のため、プリンター2は、複数の制御コマンドを連続して受信し、かつ、これら制御コマンドに基づいて、連続してレシート10を発行することが可能である。
次いで、プリンター2の記録制御部60は、次の制御コマンドが所定の条件を満たしているか否かを判別する(ステップSD3)。なお、このステップSD3の処理のタイミングは、1の制御コマンドに係るレシート10の発行における切断のための搬送が開始される前の任意のタイミングでよい。
所定の条件とは、1の制御コマンドに係るレシート10の発行に係る処理について、感熱ロール紙22の切断のための搬送に伴う先頭画像の記録を行わないと判別するために事前に設けられた条件である。
所定の条件としては、例えば、関連するレシート10を連続して発行する場合、先に発行するレシート10には、上述した定型の先頭画像を記録する一方、次に発行するレシート10には、定型の先頭画像に代えて、当該レシート10が前に発行したレシート10と関連性のあるレシート10である旨の文言やマークを記録するものと定められており、かつ、互いに関連するレシート10を連続して発行する場合には、1のレシート10の発行に係る1の制御コマンドの受信後、所定の経過時間以内に、次のレシート10の発行に係る次の制御コマンドの受信が開始されるものとされている場合において、1の制御コマンドの受信が完了してから、次の制御コマンドの受信が開始されるまでの時間が、上記所定の経過時間以内である場合等である。
また、所定の条件とは、次の制御コマンドにその旨を明示するコマンドや、所定のデータが含まれている場合等である。
FIG. 12 is a flowchart for explaining the operation of the printer 2 according to this embodiment.
As shown in FIG. 12, the printer 2 receives one control command, stores the one control command in the reception buffer 56 (step SD1), then continuously receives the next control command, and receives the next control command. 56 (step SD2).
The host computer 3 sequentially transmits the generated commands to the printer 2 regardless of the progress of processing on the printer 2 side, and temporarily stores the control commands in the reception buffer 56 on the printer 2 side. The printer 2 can sequentially read and execute each command included in the printer 2 so that the printer 2 can continuously receive a plurality of control commands and issue a receipt 10 based on these control commands. It is.
Next, the recording control unit 60 of the printer 2 determines whether or not the next control command satisfies a predetermined condition (step SD3). Note that the timing of the processing in step SD3 may be any timing before the conveyance for cutting in the issuance of the receipt 10 relating to one control command is started.
The predetermined condition is provided in advance for determining that the process of issuing the receipt 10 related to one control command is not to record the leading image accompanying the conveyance for cutting the thermal roll paper 22. It is a condition.
As a predetermined condition, for example, when related receipts 10 are continuously issued, the above-mentioned standard top image is recorded on the receipt 10 to be issued first, while the next receipt 10 to be issued has a fixed form. In place of the first image, the receipt 10 is determined to record a word or mark indicating that the receipt 10 is related to the previously issued receipt 10, and the related receipts 10 are continuously recorded. In the case of issuance, the reception of the next control command relating to the issuance of the next receipt 10 is started within a predetermined elapsed time after the receipt of one control command relating to the issuance of one receipt 10. If the time from the completion of reception of one control command to the start of reception of the next control command is within the predetermined elapsed time, etc. That.
In addition, the predetermined condition is a case where a command indicating that fact is included in the next control command or a case where predetermined data is included.

所定の条件が満たされている場合、記録制御部60は、1の制御コマンドに基づくレシート10の発行に際し、切断のための搬送に伴う先頭画像の記録を実行しないと判別する(ステップSD4)。
一方、所定の条件が満たされていない場合、記録制御部60は、1の制御コマンドに基づくレシート10の発行に際し、先頭画像データ72を利用した切断のための搬送に伴う先頭画像の記録を実行すると判別する(ステップSD5)
When the predetermined condition is satisfied, the recording control unit 60 determines that the recording of the leading image accompanying the conveyance for cutting is not executed when issuing the receipt 10 based on one control command (step SD4).
On the other hand, when the predetermined condition is not satisfied, the recording control unit 60 performs recording of the leading image accompanying the conveyance for cutting using the leading image data 72 when issuing the receipt 10 based on one control command. Then, it is determined (step SD5).

以上説明したように、本実施形態では、記録制御部60は、1の制御コマンドに係る感熱ロール紙22の切断を開始する前に、当該1の制御コマンドの次の制御コマンドを受信している場合であって、当該次の制御コマンドが所定の条件を満たす場合は、先頭画像データ72に基づく先頭画像の記録を伴わずに感熱ロール紙22を切断した後、当該次の制御コマンドに従って感熱ロール紙22への記録を行う。
これによれば、無条件に切断のための搬送に伴う先頭画像の記録を行うのではなく、所定の条件の場合は、当該先頭画像の記録を行わないことが可能となるため、記録装置に状況に応じた処理を行わせることが可能となる。
As described above, in the present embodiment, the recording control unit 60 receives the control command next to the one control command before starting the cutting of the thermal roll paper 22 related to the one control command. If the next control command satisfies a predetermined condition, the thermal roll paper 22 is cut without recording the leading image based on the leading image data 72, and then the thermal roll according to the next control command. Recording on paper 22 is performed.
According to this, since it is not possible to unconditionally record the leading image accompanying the conveyance for cutting, it is possible to not record the leading image in the case of a predetermined condition. It becomes possible to perform processing according to the situation.

<第4実施形態>
次いで、第4実施形態について説明する。
上述した第1実施形態では、先頭画像情報記憶部61は、キーワード文字列を利用して、記録データ80から先頭画像の情報を抽出する構成であった。この場合、先頭画像が文字列で構成されているときは、適切に先頭画像の情報の抽出が可能であるものの、先頭画像がグラフィック画像である場合は、当該方法では、先頭画像の情報の抽出ができない、という問題があった。
以上を踏まえ、本実施形態に係る先頭画像情報記憶部61は、記録データ80から先頭画像の情報を抽出する際、以下の動作を実行する。
<Fourth embodiment>
Next, a fourth embodiment will be described.
In the first embodiment described above, the head image information storage unit 61 is configured to extract information of the head image from the recording data 80 using a keyword character string. In this case, when the top image is composed of character strings, it is possible to appropriately extract the information of the top image. However, when the top image is a graphic image, the method extracts the information of the top image. There was a problem that it was not possible.
Based on the above, the leading image information storage unit 61 according to the present embodiment executes the following operation when extracting the leading image information from the recording data 80.

図13は、図10と同様の座標系を示す図である。
まず、先頭画像情報記憶部61は、記録データ80に基づいて感熱ロール紙22に画像を記録した場合における、当該画像の描画データを、座標系に展開する。その際、グラフィック画像や、文字列に係る画像について、これら画像に施すべき装飾を反映した上で、描画データを座標系に展開する。
例えば、記録データ80に係る画像の描画データを座標系に展開した状態が、図13に示す状態であったものとする。
図13の例では、感熱ロール紙22の先端部に定型的に記録される先頭画像が、文字列に係る画像ではなく、グラフィック画像である。さらに、グラフィック画像たる先頭画像は、感熱ロール紙22の先端(切断位置)からマージンMmin離れた位置から、当該先端からギャップG離れた位置に挟まれた範囲に記録されるものと予め定められている。
記録データ80に係る画像の描画データを座標系に展開した後、先頭画像情報記憶部61は、座標系において、仮想直線KT1、及び、仮想直線KT2で挟まれた範囲に記録された画像を特定する。ここで特定された画像は、「先頭画像は、感熱ロール紙22の先端(切断位置)からマージンMmin離れた位置から、当該先端からギャップG離れた位置に挟まれた範囲に記録される」という前提のため、先頭画像に該当する。
さらに、先頭画像情報記憶部61は、記録データ80に含まれるコマンドのうち、特定した画像を記録するためのコマンド群を抽出し、抽出したコマンド群を先頭画像の情報たる先頭画像データ72として、記憶部54に記憶する。その際、上述した第1実施形態と同様に、先頭画像の装飾に係るコマンドが存在する場合は、先頭画像データ72に含めて記憶する。
そして、記録制御部60は、感熱ロール紙22を切断する際、切断のための搬送に伴って、先頭画像データ72に基づいて、グラフィック画像たる先頭画像を記録する。これにより、先頭画像データ72が文字列に構成されていない場合であっても、感熱ロール紙22の先端部に定型的に記録される先頭画像を、切断のための搬送に伴って記録することが可能となり、マージンMの縮小を図ることができる。
FIG. 13 is a diagram showing a coordinate system similar to FIG.
First, the head image information storage unit 61 develops drawing data of the image in the coordinate system when an image is recorded on the thermal roll paper 22 based on the recording data 80. At that time, with respect to the graphic image and the image related to the character string, the drawing data is developed in the coordinate system after reflecting the decoration to be applied to these images.
For example, it is assumed that the state in which the drawing data of the image related to the recording data 80 is developed in the coordinate system is the state shown in FIG.
In the example of FIG. 13, the leading image that is routinely recorded at the leading end of the thermal roll paper 22 is not an image relating to a character string but a graphic image. Further, the top image as a graphic image is determined in advance to be recorded in a range sandwiched between a position away from the leading edge (cutting position) of the thermal roll paper 22 by a margin Mmin and a position away from the leading edge by the gap G. Yes.
After developing the drawing data of the image related to the recording data 80 in the coordinate system, the head image information storage unit 61 specifies the image recorded in the range between the virtual straight line KT1 and the virtual straight line KT2 in the coordinate system. To do. The image specified here is “the leading image is recorded in a range sandwiched between a position away from the leading edge (cutting position) of the thermal roll paper 22 by a margin Mmin and a position away from the leading edge by the gap G”. Because it is a premise, it corresponds to the top image.
Further, the head image information storage unit 61 extracts a command group for recording the specified image from the commands included in the recording data 80, and uses the extracted command group as head image data 72 as information of the head image. Store in the storage unit 54. At this time, as in the first embodiment described above, if there is a command related to decoration of the head image, it is included in the head image data 72 and stored.
Then, when cutting the thermal roll paper 22, the recording control unit 60 records the leading image, which is a graphic image, based on the leading image data 72 along with the conveyance for cutting. As a result, even if the leading image data 72 is not configured in a character string, the leading image that is routinely recorded on the leading end of the thermal roll paper 22 is recorded along with the conveyance for cutting. Thus, the margin M can be reduced.

以上説明したように、本実施形態では、先頭画像情報記憶部61は、記録データ80から、カット位置T2に感熱ロール紙22の先端が位置しているとした場合に、カット位置T2と記録位置T1とで挟まれた領域に対応するコマンド群を抽出し、先頭画像データ72として記憶する。
ここで、ギャップGに起因したマージンMを縮小するという目的を達成するためには、先頭画像の情報として、少なくとも、カット位置T2に感熱ロール紙22の先端が位置しているとした場合に、カット位置T2と記録位置T1とで挟まれた領域に対応する画像の情報を記憶しておき、当該情報に基づいて、当該画像を記録する必要がある。
これを踏まえ、上記構成によれば、先頭画像として記憶しておく必要がある情報を確実に記憶することが可能となる。
特に、本実施形態では、先頭画像がグラフィック画像であっても、先頭画像データ72を適切に記憶部54に記憶可能である。
As described above, in the present embodiment, the leading image information storage unit 61 determines that the cutting position T2 and the recording position when the leading edge of the thermal roll paper 22 is located at the cutting position T2 from the recording data 80. A command group corresponding to a region sandwiched between T1 is extracted and stored as head image data 72.
Here, in order to achieve the purpose of reducing the margin M caused by the gap G, when it is assumed that the leading edge of the thermal roll paper 22 is located at least at the cut position T2 as information of the top image, It is necessary to store image information corresponding to an area sandwiched between the cut position T2 and the recording position T1 and record the image based on the information.
Based on this, according to the above configuration, it is possible to reliably store information that needs to be stored as the head image.
In particular, in the present embodiment, even if the head image is a graphic image, the head image data 72 can be appropriately stored in the storage unit 54.

また、本実施形態では、先頭画像情報記憶部61は、記録データ80に画像の装飾に係る所定の装飾を反映して、記録データ80の画像に係る描画データを座標系に展開した上で、先頭画像に対応する描画データの特定を行っている。
これによれば、装飾を反映して適切に、先頭画像に対応する画像の特定、及び、記録データ80からの先頭画像の情報の抽出が可能となる。
In the present embodiment, the head image information storage unit 61 reflects the predetermined decoration related to the decoration of the image in the recording data 80 and develops the drawing data related to the image of the recording data 80 in the coordinate system. The drawing data corresponding to the head image is specified.
According to this, it is possible to appropriately identify the image corresponding to the head image and extract the information of the head image from the recording data 80, reflecting the decoration.

なお、上述した実施の形態は、あくまでも本発明の一態様を示すものであり、本発明の範囲内で任意に変形および応用が可能である。
例えば、図3や図11に示す各機能部はハードウェアとソフトウェアの協働により任意に実現可能であり、特定のハードウェア構成を示唆するものではない。
また、上記実施形態では、プリンター2自身が記録制御部60や、先頭画像情報記憶部61、キーワード文字列設定部91等を有する制御部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 FIGS. 3 and 11 can be arbitrarily realized by cooperation of hardware and software, and does not suggest a specific hardware configuration.
In the above embodiment, the printer 2 itself includes the control unit 50 including the recording control unit 60, the head image information storage unit 61, the keyword character string setting unit 91, and the like. Alternatively, another apparatus externally connected to the printer 2 may be provided.
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…感熱ロール紙(記録媒体)、24…記録ヘッド、25…カッターユニット(切断部)、40…ホスト側制御部、40a…POSアプリケーション実行部、40b…プリンタードライバー実行部、50…制御部、51…プリントエンジン、60…記録制御部、61…先頭画像情報記憶部、72…先頭画像データ(先頭画像の情報)、80…記録データ、90…キーワード文字列変更部、91…キーワード文字列設定部。   DESCRIPTION OF SYMBOLS 2 ... Printer (recording apparatus), 3 ... Host computer (control apparatus), 10 ... Receipt, 22 ... Thermal roll paper (recording medium), 24 ... Recording head, 25 ... Cutter unit (cutting part), 40 ... Host side control 40a ... POS application execution unit, 40b ... printer driver execution unit, 50 ... control unit, 51 ... print engine, 60 ... recording control unit, 61 ... first image information storage unit, 72 ... first image data (information of first image) ), 80... Recorded data, 90... Keyword character string changing unit, 91.

Claims (5)

記録ヘッドと、
記録媒体を搬送方向に搬送する搬送部と、
前記記録ヘッドの前記搬送方向下流に配置され、前記記録媒体を切断する切断部と、
前記記録媒体の先端部の所定の範囲に記録され、文字列を含む第1の画像の情報及び前記所定の範囲と異なる範囲に記録させる第2の画像の情報を含む制御コマンドを受信する受信部と、
前記受信部で受信した前記制御コマンドに基づいて、前記記録ヘッドでの前記記録媒体への記録、前記搬送部での前記記録媒体の搬送、及び、前記切断部での前記記録媒体の切断を制御する記録制御部と、
前記受信部で前記制御コマンドを受信した場合、前記制御コマンドに含まれる画像の情報から、予め設定された所定の文字列であるキーワード文字列を検出し、前記画像の情報の先頭から前記キーワード文字列に至るまでの情報を、前記第1の画像の情報として抽出し、記憶する先頭画像情報記憶部と、を備え、
前記記録制御部は、
前記切断部での前記記録媒体の切断を制御する場合、
前記先頭画像情報記憶部で記憶した前記第1の画像の情報に基づいて、前記記録媒体の切断位置の前記搬送方向上流側に、前記記録ヘッドで前記第1の画像の情報を記録させ、前記記録媒体の切断位置が前記切断部に対応する位置に至るまで前記搬送部で前記記録媒体を搬送させて、前記切断部で前記記録媒体を切断させ、
前記第1の画像を記録した後、前記受信部により新たに前記制御コマンドを受信した場合、新たな前記制御コマンドに含まれる前記画像の情報のうち、前記先頭画像情報記憶部で記憶した前記第1の画像の情報以外の情報に基づいて、記録した前記第1の画像に続けて画像の記録を行う
ことを特徴とする記録装置。
A recording head;
A transport unit for transporting the recording medium in the transport direction;
Disposed downstream of the conveying direction of the recording head, and a cutting unit for cutting the recording medium,
A receiving unit that receives a control command that is recorded in a predetermined range at the leading end of the recording medium and includes information on a first image that includes a character string and information on a second image that is recorded in a range different from the predetermined range When,
Based on the control command received by the receiving unit, the recording on the recording medium by the recording head, the conveyance of the recording medium by the conveying unit, and the cutting of the recording medium by the cutting unit are controlled. A recording control unit,
When the receiving unit receives the control command, the keyword character string, which is a predetermined character string set in advance, is detected from the image information included in the control command, and the keyword characters are detected from the head of the image information. A leading image information storage unit that extracts and stores information up to the column as information of the first image;
The recording control unit
When controlling the cutting of the recording medium at the cutting unit,
Wherein said stored at the top image information storage unit based on the first information of the image, the said upstream side in the conveying direction of the cutting position of the recording medium, to record information of the first image in the recording head, The recording medium is transported by the transport unit until the cutting position of the recording medium reaches a position corresponding to the cutting unit, and the recording medium is cut by the cutting unit,
When the control command is newly received by the receiving unit after recording the first image, the first image information stored in the head image information storage unit among the information of the image included in the new control command. A recording apparatus that records an image following the recorded first image based on information other than the information of one image.
前記先頭画像情報記憶部は、
前記第1の画像の情報が記憶されていない状態のときに前記受信部で前記制御コマンドを受信した場合、前記第1の画像の情報を記憶する請求項1に記載の記録装置。
The head image information storage unit
2. The recording apparatus according to claim 1, wherein information on the first image is stored when the receiving unit receives the control command when the information on the first image is not stored. 3.
前記先頭画像情報記憶部は、
前記第1の画像の情報に、前記第1の画像を構成する文字列の装飾に係る付加情報が含まれている場合は、前記付加情報を記憶する請求項1又は2に記載の記録装置。
The head image information storage unit
3. The recording apparatus according to claim 1, wherein the additional information is stored when the information of the first image includes additional information related to a decoration of a character string constituting the first image.
記録媒体の先端部の所定の範囲に記録され、文字列を含む第1の画像の情報及び前記所定の範囲と異なる範囲に記録させる第2の画像の情報を含む制御コマンドを受信部で受信し、
前記制御コマンドに含まれる画像の情報から、予め設定された所定の文字列であるキーワード文字列を検出し、前記画像の情報の先頭から前記キーワード文字列に至るまでの情報を、前記第1の画像の情報として抽出して記憶し、
記録ヘッドで前記第1の画像の情報及び前記第2の画像の情報を記録し、
前記記録媒体を搬送し、
前記記録ヘッドで前記第1の画像の情報を前記記録媒体に記録し、
前記記録媒体の切断位置が切断部に対応する位置に至るまで前記記録媒体を搬送し、
前記切断部で前記記録媒体を切断し、
前記受信部新たに前記制御コマンドを受信した場合、新たな前記制御コマンドに含まれる前記画像の情報のうち、憶した前記第1の画像の情報以外の情報に基づいて、記録した前記第1の画像に続けて画像の記録を行う
ことを特徴とする記録装置の制御方法。
A receiving unit receives a control command that is recorded in a predetermined range at the leading end of the recording medium and includes information on a first image that includes a character string and information on a second image that is recorded in a range different from the predetermined range. ,
A keyword character string, which is a predetermined character string set in advance, is detected from image information included in the control command, and information from the top of the image information to the keyword character string is detected as the first character string. Extract and store as image information,
Recording the information of the first image and the information of the second image with a recording head;
Conveying the recording medium,
Recording the information of the first image on the recording medium with the recording head;
Transport the recording medium until the cutting position of the recording medium reaches a position corresponding to the cutting portion;
Cutting the recording medium at the cutting unit;
When receiving the newly the control command by the reception unit, among the information of the image included in the new said control command, based on remembers the first information other than the information of the image, the first recorded A method for controlling a recording apparatus, comprising: recording an image after one image.
記録ヘッドと、記録媒体を搬送方向に搬送する搬送部と、前記記録ヘッドの前記搬送方向下流に配置され、前記記録媒体を切断する切断部と、前記記録媒体の先端部の所定の範囲に記録され、文字列を含む第1の画像の情報及び前記所定の範囲と異なる範囲に記録させる第2の画像の情報を含む制御コマンドを受信する受信部と、を備える記録装置を制御する制御部で実行されるプログラムであって、
前記制御コマンドを前記受信部に受信させ、
前記制御コマンドに含まれる画像の情報から、予め設定された所定の文字列であるキーワード文字列を検出し、前記画像の情報の先頭から前記キーワード文字列に至るまでの情報を、前記第1の画像の情報として抽出して記憶させ、
前記記録ヘッドで前記第1の画像の情報及び前記第2の画像の情報を記録させ、
前記搬送部で前記記録媒体を搬送させ、
前記記録ヘッドで前記第1の画像の情報を前記記録媒体に記録させ、
前記記録媒体の切断位置が前記切断部に対応する位置に至るまで前記記録媒体を前記搬送部で搬送させ、
前記切断部で前記記録媒体を切断させ、
前記第1の画像を記録した後、前記受信部新たに前記制御コマンドを受信した場合、新たな前記制御コマンドに含まれる前記画像の情報のうち、憶した前記第1の画像の情報以外の情報に基づいて、記録した前記第1の画像に続けて画像の記録を行わせる
ことを特徴とするプログラム。
A recording head, a conveyance unit for conveying the recording medium in the conveying direction, are arranged downstream of the transport direction of the recording head, and a cutting unit for cutting the recording medium in a predetermined range of the front end portion of the recording medium A control unit for controlling the recording apparatus, the receiving unit receiving a control command including information of a first image recorded and including a character string and information of a second image to be recorded in a range different from the predetermined range A program executed in
Causing the receiving unit to receive the control command;
A keyword character string, which is a predetermined character string set in advance, is detected from image information included in the control command, and information from the top of the image information to the keyword character string is detected as the first character string. Extract and store as image information,
Recording the information of the first image and the information of the second image with the recording head,
Transport the recording medium in the transport unit;
Recording the information of the first image on the recording medium with the recording head;
The recording medium is conveyed by the conveyance unit until the cutting position of the recording medium reaches a position corresponding to the cutting unit,
Cutting the recording medium at the cutting unit;
After recording the first image, when receiving a new said control command by the reception unit, among the information of the image included in the new said control commands, except remembers the information of the first image A program for recording an image subsequent to the recorded first image based on the information.
JP2011099826A 2011-04-27 2011-04-27 RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM Expired - Fee Related JP5862045B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011099826A JP5862045B2 (en) 2011-04-27 2011-04-27 RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011099826A JP5862045B2 (en) 2011-04-27 2011-04-27 RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM

Publications (3)

Publication Number Publication Date
JP2012228847A JP2012228847A (en) 2012-11-22
JP2012228847A5 JP2012228847A5 (en) 2014-05-22
JP5862045B2 true JP5862045B2 (en) 2016-02-16

Family

ID=47430819

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011099826A Expired - Fee Related JP5862045B2 (en) 2011-04-27 2011-04-27 RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM

Country Status (1)

Country Link
JP (1) JP5862045B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107640619A (en) * 2016-07-20 2018-01-30 东芝泰格有限公司 Printer and control method, terminal device and machinable medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6070233B2 (en) * 2013-02-06 2017-02-01 株式会社リコー Image forming apparatus
JP6281400B2 (en) * 2014-04-23 2018-02-21 セイコーエプソン株式会社 Printing apparatus and printing method of printing apparatus

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07182565A (en) * 1993-12-24 1995-07-21 Pfu Ltd Method for controlling print of receipt in pos terminal
JP3263619B2 (en) * 1997-01-06 2002-03-04 シャープ株式会社 Stamp logo printing device
JP2005059502A (en) * 2003-08-19 2005-03-10 Star Micronics Co Ltd Printer
JP2005096103A (en) * 2003-09-22 2005-04-14 Brother Ind Ltd Tape printing apparatus
JP4506280B2 (en) * 2004-05-25 2010-07-21 セイコーエプソン株式会社 Printing apparatus, printer interface, POS system, program, and printing apparatus control method
JP2007047898A (en) * 2005-08-08 2007-02-22 Seiko Epson Corp Control method of printer, printer, and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107640619A (en) * 2016-07-20 2018-01-30 东芝泰格有限公司 Printer and control method, terminal device and machinable medium

Also Published As

Publication number Publication date
JP2012228847A (en) 2012-11-22

Similar Documents

Publication Publication Date Title
JP5810609B2 (en) RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
JP5909871B2 (en) Recording device
JP2010017933A (en) Printer, printer control method, and driver
KR101429850B1 (en) Recording device and control method of a recording device
JP5862045B2 (en) RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
EP2796986A1 (en) Control device, control system, and control method of a control device
US9058133B2 (en) Control device, control method for a control device, and recording medium
US20130318145A1 (en) Media Processing Device and POS System
JP2012113608A (en) Control device, recording system, control method of control device, and program
JP2015189104A (en) Printer and control method of the same
US10510059B2 (en) Printer device
JP2012198613A (en) Output device, journal generation system, journal generation method and program
JP5810616B2 (en) RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
JP5754307B2 (en) CONTROL DEVICE, CONTROL DEVICE CONTROL METHOD, AND PROGRAM
JP2012123704A (en) Control apparatus, control method of control apparatus, and program
JP2012106431A (en) Recording apparatus, recording system, method for controlling of recording apparatus, and program
JP7012476B2 (en) Printer
JP2006079396A (en) Print controller, registration print data registration method for print controller, program, and printer
JP2013257805A (en) Control device, control method of control device, and program
JP6051559B2 (en) RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
JP6019749B2 (en) Medium processing apparatus and POS system
JP5838742B2 (en) CONTROL DEVICE, CONTROL DEVICE CONTROL METHOD, AND PROGRAM
JP5987415B2 (en) RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
JP2013114292A (en) Control device, control method of the same and program
JP2012174094A (en) Electronic apparatus, control method for electronic apparatus, and program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140409

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140409

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150210

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150212

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150407

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150929

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20151008

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: 20151201

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20151214

R150 Certificate of patent or registration of utility model

Ref document number: 5862045

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

LAPS Cancellation because of no payment of annual fees