JP2012091425A - Recording apparatus, control method and program of the recording apparatus - Google Patents

Recording apparatus, control method and program of the recording apparatus Download PDF

Info

Publication number
JP2012091425A
JP2012091425A JP2010241407A JP2010241407A JP2012091425A JP 2012091425 A JP2012091425 A JP 2012091425A JP 2010241407 A JP2010241407 A JP 2010241407A JP 2010241407 A JP2010241407 A JP 2010241407A JP 2012091425 A JP2012091425 A JP 2012091425A
Authority
JP
Japan
Prior art keywords
recording
error
data
command
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2010241407A
Other languages
Japanese (ja)
Inventor
Yuji Saito
雄二 齋藤
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 JP2010241407A priority Critical patent/JP2012091425A/en
Publication of JP2012091425A publication Critical patent/JP2012091425A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

PROBLEM TO BE SOLVED: To find the cause of an error when the error occurs in a recording apparatus, and quickly confirm the recording result obtained when the error is eliminated.SOLUTION: A printer 1 includes a recording mechanism 40 to perform recording on a recording medium, and is configured to receive at least a command from a host computer 2, perform predetermined printing or predetermined operation with respect to the recording medium by means of the recording mechanism 40 based on the received command, detect whether the received command or either parameters or data included in the command shows a predetermined specified value or an error that is deviated from a value within a predetermined specified range, print information showing the cause of the error on the recording medium by means of the recording mechanism 40, correct the value, in which the error is detected, by either the predetermined specified value or the value within the predetermined specified range, and then, perform predetermined recording or predetermined operation with respect to the recording medium based on the corrected value.

Description

本発明は、記録媒体に記録を行う記録装置、記録装置の制御方法、及び、プログラムに関する。   The present invention relates to a recording apparatus that performs recording on a recording medium, a control method for the recording apparatus, and a program.

従来、表示部を備えた記録装置において、エラーが発生した場合に、発生したエラー内容を解析して、発生したエラーの分類を表示部に表示する装置が知られている(例えば、特許文献1参照)。   2. Description of the Related Art Conventionally, in a recording apparatus provided with a display unit, when an error occurs, an apparatus that analyzes the content of the generated error and displays a classification of the generated error on the display unit is known (for example, Patent Document 1). reference).

特開2009−134016号公報JP 2009-134016 A

しかしながら、表示部を備えていない記録装置はエラーの分類等を詳細にユーザーに知らせることはできないので、この種の記録装置を使用するユーザーは、エラーが発生したことしか知ることができない。また、エラーの分類が表示される場合であっても、そのエラーを解消した場合にどのような記録結果が得られるかは、エラーを解消した後で再度記録を行わなければ確認できない。
記録装置は、特定の記録や特定の記録装置の動作を指定する複数のコマンドに対応していて、一部のコマンドの中には、コマンドに従って、記録や動作の機能を指定するパラメーターや、記録するためのデータや動作するためのデータを含むものがある。
記録装置が受信したコマンドやパラメーター、データなどが、記録装置の規定するコマンドやパラメーター、データの仕様から外れていて適正でない場合、でたらめな文字を記録紙媒体からはみ出して記録するなど意図としない記録や、記録の途中で記録媒体を切断装置でカットしたり、長い紙送りをするなど意図としない記録装置の動作となって表れる。このようなエラーの結果から、その原因が、コマンドやパラメーター、データのどこにあるのかを突き止めることは、記録装置の仕様に熟知していない限り難しい。
さらに、記録装置が受信したコマンドやパラメーター、データ等が本来はエラーになる値ではあるものの、仮に上記のデータ等が適正値の範囲内であった場合にどのような記録や動作となるかを、記録装置の実際の動作により示すことができれば、適正値の場合の結果を容易に知ることができ、便利である。このことは、エラーを修正する際にも役に立つ。
本発明は、上述した事情に鑑みてなされたものであり、記録装置においてエラーが発生した場合にエラーの原因を知ることができ、かつ、エラーが解消した場合の記録結果を速やかに確認できるようにすることを目的とする。
However, since a recording device that does not include a display unit cannot notify the user of the details of the error classification or the like, the user who uses this type of recording device can only know that an error has occurred. Even when the error classification is displayed, what kind of recording result can be obtained when the error is eliminated cannot be confirmed unless recording is performed again after the error is eliminated.
The recording device supports multiple commands that specify a specific recording or operation of a specific recording device, and some commands specify parameters that specify the function of recording or operation according to the command, Some of them include data to do or data to operate.
If the command, parameter, or data received by the recording device is out of the specifications of the command, parameter, or data specified by the recording device and is not appropriate, unintentional recording such as recording random characters outside the recording paper medium In addition, it appears as an unintended operation of the recording apparatus, such as cutting a recording medium with a cutting device in the middle of recording or feeding a long paper. From the result of such an error, it is difficult to determine where the cause is in the command, parameter, or data unless you are familiar with the specifications of the recording apparatus.
Furthermore, although the commands, parameters, data, etc. received by the recording device are values that would normally cause an error, what kind of recording or operation will be performed if the above data, etc. are within the appropriate value range? If it can be shown by the actual operation of the recording apparatus, the result in the case of an appropriate value can be easily known, which is convenient. This is also useful for correcting errors.
The present invention has been made in view of the above-described circumstances, so that when an error occurs in the recording apparatus, the cause of the error can be known, and the recording result when the error is resolved can be quickly confirmed. The purpose is to.

上記目的を達成するために、本発明は、外部装置に接続可能な記録装置であって、記録媒体に記録する記録機構と、前記外部装置から少なくともコマンドを受信する受信手段と、前記受信手段により受信した前記コマンドに基づいて、前記記録機構により、前記記録媒体に所定の記録、または所定の動作をする記録制御手段と、前記コマンド、または、前記コマンドに含まれるもので、パラメーター若しくはデータのいずれかが、所定の規定された値、または所定の規定された範囲の値から外れているエラーかを検出するエラー処理手段と、を備え、前記エラー処理手段が前記エラーを検出した場合、前記記録制御手段は、前記エラーの原因を示す情報を前記記録機構により前記記録媒体に記録し、かつ、前記エラー処理手段により前記エラーとして検出された前記コマンドまたは前記パラメーター、前記データを、所定の規定された値、または所定の規定された範囲の値のいずれかに修正し、修正後の前記値に基づいて、前記記録媒体に所定の記録、または所定の動作をすること、を特徴とする。
本発明によれば、外部装置から受信したコマンド、または、このコマンドに含まれるパラメーター若しくはデータのいずれかが、所定の規定された値または所定の規定された範囲の値から外れている場合に、エラーを検出し、エラーの原因を示す情報を記録媒体に記録し、さらに適正でない値を適正値に修正して、修正後の値に基づいて所定の記録をする。これにより、エラーが発生した場合に記録媒体に記録される情報を見ればエラーの原因を知ることができ、かつ、エラーの原因となったデータを適正値にした場合に記録される記録結果を視認できる。このため、エラー発生時に操作のやり直しをしなくても、コマンド、パラメーター、データ等を修正するための多くの情報を得ることができ、速やかにコマンド等を修正して意図とした記録結果を得ることができる。
この際、所定の規定された値、または所定の規定された範囲の値から外れている場合、より近い方の規定値に修正すると、意図としたものにより近い結果を知ることができる。
In order to achieve the above object, the present invention provides a recording apparatus connectable to an external device, a recording mechanism for recording on a recording medium, a receiving means for receiving at least a command from the external apparatus, and the receiving means. Based on the received command, the recording mechanism performs a predetermined recording or a predetermined operation on the recording medium, a recording control means for performing the predetermined operation, and the command or any of the parameters or data included in the command. Error processing means for detecting whether the error is out of a predetermined specified value or a value in a predetermined specified range, and when the error processing means detects the error, the recording The control means records information indicating the cause of the error on the recording medium by the recording mechanism, and the error processing means records the error. The command or the parameter detected as, and the data are corrected to either a predetermined specified value or a predetermined specified range value, and on the recording medium based on the corrected value Predetermined recording or predetermined operation is performed.
According to the present invention, when a command received from an external device, or any of parameters or data included in the command is out of a predetermined specified value or a predetermined specified range, An error is detected, information indicating the cause of the error is recorded on the recording medium, an inappropriate value is corrected to an appropriate value, and predetermined recording is performed based on the corrected value. This allows you to know the cause of the error by looking at the information recorded on the recording medium in the event of an error, and the recording result that is recorded when the data that caused the error is set to an appropriate value. Visible. For this reason, it is possible to obtain a large amount of information for correcting commands, parameters, data, etc. without having to redo the operation when an error occurs, and promptly correct the commands to obtain the intended recording result. be able to.
At this time, when the value is out of the predetermined specified value or the value of the predetermined specified range, the result closer to the intended one can be known by correcting to a closer specified value.

本発明は、上記記録装置において、前記コマンドは、シンボル画像を記録することを指定するものであり、前記パラメーターは、前記シンボル画像の機能を指定するものであり、前記データは、前記シンボル画像を形成するものであり、前記エラー処理手段は、前記コマンドに含まれる前記パラメーター、または前記データのいずれかが、所定の規定された値、または所定の規定された範囲の値から外れているエラーかを検出し、前記エラー処理手段が前記エラーを検出した場合、前記記録制御手段は、前記エラー処理手段により前記エラーとして検出された前記パラメーターまたは前記データを示す情報を前記記録媒体に記録し、かつ、前記エラー処理手段により前記エラーとして検出された前記パラメーター、または前記データを、所定の規定された値、または所定の規定された範囲の値のいずれかに修正し、修正後の前記値に基づいて前記記録媒体に前記シンボル画像の記録をすること、を特徴とする。
シンボル画像は、例として、1次元バーコードや2次元コードなどを示す。パラメーターは、シンボル画像の種類や、全体のサイズ、最小バーや最小ピクセルのサイズ、記録位置、チェックサムや誤り訂正度の種類、文字の種類、などの機能を指定する。データは具体的に画像としての記録を表すものであり、データ数も指定される。
本発明によれば、前記コマンドに含まれる前記パラメーター、または前記データのいずれかが、所定の規定された値、または所定の規定された範囲の値から外れているエラーかを検出した場合、適正値でないパラメーターやデータを示す情報と、このパラメーターやデータを適正値に修正した場合のシンボル画像が記録されるので、適正でないパラメーターやデータを速やかに修正することができ、また、パラメーターやデータを修正する前に、修正した場合のシンボル画像を視認できる。
According to the present invention, in the recording apparatus, the command specifies recording of a symbol image, the parameter specifies a function of the symbol image, and the data includes the symbol image. The error processing means is configured to determine whether any of the parameter or the data included in the command is out of a predetermined specified value or a predetermined specified range. When the error processing means detects the error, the recording control means records information indicating the parameter or the data detected as the error by the error processing means on the recording medium, and , The parameter detected as the error by the error processing means, or the data, Defined values or modify any of the predetermined prescribed range of values, said to the recording of the symbol image, and wherein said recording medium based on the value after the correction.
The symbol image shows, for example, a one-dimensional barcode or a two-dimensional code. Parameters specify functions such as symbol image type, overall size, minimum bar and pixel size, recording position, checksum and error correction type, and character type. The data specifically represents recording as an image, and the number of data is also specified.
According to the present invention, when it is detected whether any of the parameter or the data included in the command is an error out of a predetermined specified value or a predetermined specified range, Information indicating parameters and data that are not values and symbol images when these parameters and data are corrected to appropriate values are recorded, so parameters and data that are not appropriate can be corrected quickly. Before the correction, the symbol image when the correction is made can be visually recognized.

また、本発明は、上記記録装置において、前記パラメーターは、シンボル画像の記録サイズを指定する値を含み、前記エラー処理手段は、前記パラメーターにより指定されたシンボル画像の記録サイズが前記記録媒体の記録可能領域を超える場合にエラーを検出し、前記記録制御手段は前記シンボル画像の記録サイズを前記記録可能領域内に収まるサイズに修正して、前記記録媒体にシンボル画像を記録することを特徴とする。
本発明によれば、指定されたシンボル画像のサイズが適正でなかった場合にエラーを検出し、シンボル画像のサイズが適正値に修正されてシンボル画像が記録されるので、適正でないシンボル画像のサイズを速やかに修正することができ、また、シンボル画像のサイズのデータを修正する前に、修正した場合のシンボル画像を視認できる。
In the recording apparatus, the parameter includes a value that specifies a recording size of a symbol image, and the error processing means has a recording size of the symbol image specified by the parameter that is recorded on the recording medium. An error is detected when the recordable area is exceeded, and the recording control unit corrects the recording size of the symbol image to a size that fits in the recordable area, and records the symbol image on the recording medium. .
According to the present invention, an error is detected when the size of the designated symbol image is not appropriate, and the symbol image is corrected to an appropriate value and the symbol image is recorded. Can be promptly corrected, and the symbol image in the corrected case can be visually recognized before correcting the data of the size of the symbol image.

また、本発明は、上記記録装置において、通常動作モードと開発モードとを切り替えて実行可能であり、前記記録制御手段は、前記開発モードで前記エラー処理手段がエラーを検出した場合に、前記エラーの原因を示す情報を前記記録媒体に記録し、かつ、前記エラー処理手段により前記エラーとして検出された前記コマンドまたは前記パラメーター、前記データを、所定の規定された値、または所定の規定された範囲の値のいずれかに修正し、修正後の前記値に基づいて、前記記録媒体に所定の記録、または所定の動作をし、前記通常動作モードで前記エラー処理手段がエラーを発生させた場合には、少なくとも前記記録機構による記録を中止させることを特徴とする。
本発明によれば、記録用データに適正値でないデータが含まれている場合、開発モードにおいてはエラーを検出するとともに、エラーの原因と修正されたデータに基づくシンボル画像が記録され、通常動作モードでは、エラーが発生して記録動作が停止される。このため、エラーの原因と修正した値に基づくシンボル画像の記録が必要ない場合には記録動作を停止するだけで、速やかに記録を再試行できる。
Further, the present invention can be executed by switching between a normal operation mode and a development mode in the recording apparatus, and the recording control unit is configured to detect the error when the error processing unit detects an error in the development mode. Information indicating the cause of the error is recorded on the recording medium, and the command or the parameter detected as the error by the error processing unit, the data, a predetermined specified value, or a predetermined specified range When the error processing means generates an error in the normal operation mode after performing a predetermined recording or a predetermined operation on the recording medium based on the corrected value. Is characterized in that at least recording by the recording mechanism is stopped.
According to the present invention, when the data for recording includes data that is not an appropriate value, an error is detected in the development mode, and a symbol image based on the cause of the error and the corrected data is recorded. Then, an error occurs and the recording operation is stopped. For this reason, when it is not necessary to record the symbol image based on the cause of the error and the corrected value, it is possible to quickly retry the recording simply by stopping the recording operation.

また、本発明は、上記記録装置において、前記コマンドに含まれる前記データを、前記記録機構で記録するために展開するバッファーメモリーを備え、前記エラー処理手段は、前記記録制御手段が前記バッファーメモリーに前記データを展開した際に、前記データが、所定の規定された値、または所定の規定された範囲の値から外れているエラーかを検出することを特徴とする。
本発明によれば、適正値でないデータを容易に、特別な処理を経ることなく、通常の記録処理の中で検出することができる。
The recording apparatus may further include a buffer memory that expands the data included in the command so as to be recorded by the recording mechanism, and the error processing means includes the recording control means in the buffer memory. When the data is expanded, it is detected whether the data is an error deviating from a predetermined specified value or a value of a predetermined specified range.
According to the present invention, data that is not an appropriate value can be easily detected in a normal recording process without going through a special process.

また、上記目的を達成するために、本発明は、外部装置に接続可能であり、記録媒体に記録する記録機構を備えた記録装置を制御して、前記外部装置から少なくともコマンドを受信し、受信した前記コマンドに基づいて、前記記録機構により、前記記録媒体に所定の記録、または所定の動作をし、前記コマンド、または、前記コマンドに含まれるもので、パラメーター若しくはデータのいずれかが、所定の規定された値、または所定の規定された範囲の値から外れているエラーかを検出し、前記エラーの原因を示す情報を前記記録機構により前記記録媒体に記録し、前記エラーが検出された前記コマンドまたは前記パラメーター、前記データを、所定の規定された値、または所定の規定された範囲の値のいずれかに修正し、修正後の前記値に基づいて、前記記録媒体に所定の記録、または所定の動作をすること、を特徴とする。
本発明の制御方法によれば、記録装置によって、外部装置から受信したに適正でないデータが含まれている場合に、エラーを発生し、エラーの原因を示す情報を記録媒体に記録し、さらに適正でないデータを適正値に修正して、修正後のデータに基づいてシンボル画像を記録する。これにより、エラーが発生した場合に記録媒体に記録される情報を見ればエラーの原因を知ることができ、かつ、エラーの原因となったデータを適正値にした場合に記録されるシンボル画像を視認できる。このため、エラー発生時に操作のやり直しをしなくても多くの情報を得ることができ、速やかにデータを修正して正しいシンボル画像を記録できる。
In order to achieve the above object, the present invention can connect to an external device, control a recording device having a recording mechanism for recording on a recording medium, receive at least a command from the external device, and receive the command Based on the command, the recording mechanism performs a predetermined recording or a predetermined operation on the recording medium, and the command or the command includes either a parameter or data, It is detected whether the error is out of a specified value or a value in a predetermined specified range, information indicating the cause of the error is recorded on the recording medium by the recording mechanism, and the error is detected. The command or the parameter or the data is corrected to either a predetermined specified value or a predetermined specified range value, and the corrected value is changed to the corrected value. Zui and, to a predetermined recording, or a predetermined operation on the recording medium, characterized by.
According to the control method of the present invention, when the recording device includes data that is not appropriate when received from the external device, an error is generated and information indicating the cause of the error is recorded on the recording medium, and further Non-corrected data is corrected to an appropriate value, and a symbol image is recorded based on the corrected data. Thus, when an error occurs, the cause of the error can be known by looking at the information recorded on the recording medium, and the symbol image recorded when the data causing the error is set to an appropriate value. Visible. Therefore, it is possible to obtain a large amount of information without having to redo the operation when an error occurs, and it is possible to quickly correct the data and record a correct symbol image.

また、上記目的を達成するために、本発明は、外部装置に接続可能であり、記録媒体に記録する記録機構と制御部を備えた記録装置を制御するプログラムであって、前記制御部を、外部装置から少なくともコマンドを受信する受信手段と、前記コマンド、または、前記コマンドに含まれるもので、パラメーター若しくはデータのいずれかが、所定の規定された値、または所定の規定された範囲の値から外れているエラーかを検出するエラー処理手段と、前記受信手段により受信した前記コマンドに基づいて、前記記録機構により、前記記録媒体に所定の記録、または所定の動作をし、前記エラー処理手段が前記エラーを検出した場合には、前記エラーの原因を示す情報を前記記録機構により前記記録媒体に記録し、かつ、前記エラー処理手段により前記エラーとして検出された前記コマンドまたは前記パラメーター、前記データを、所定の規定された値、または所定の規定された範囲の値のいずれかに修正し、修正後の前記値に基づいて、前記記録媒体に所定の記録、または所定の動作をする記録制御手段して機能させることを特徴とする。
本発明のプログラムを実行することにより、制御部は、外部装置から受信したコマンド、または、前記コマンドに含まれるもので、パラメーター若しくはデータのいずれかが、所定の規定された値、または所定の規定された範囲の値から外れている場合に、エラーを検出し、エラーの原因を示す情報を記録媒体に記録し、さらに適正でない値を適正値に修正して、修正後の値に基づいて所定の記録をする。これにより、エラーが発生した場合に記録媒体に記録される情報を見ればエラーの原因を知ることができ、かつ、エラーの原因となったデータを適正値にした場合に記録される記録結果を視認できる。このため、エラー発生時に操作のやり直しをしなくても、修正するための多くの情報を得ることができ、速やかにコマンド等を修正して意図とした記録結果を得ることができる。
In order to achieve the above object, the present invention is a program that can be connected to an external device and controls a recording apparatus that includes a recording mechanism and a control unit for recording on a recording medium, the control unit comprising: A receiving means for receiving at least a command from an external device, the command, or any of the parameters or data included in the command, from a predetermined specified value or a value of a predetermined specified range Based on the error received by the receiving unit and the command received by the receiving unit, the recording mechanism performs predetermined recording or predetermined operation on the recording medium, and the error processing unit When the error is detected, information indicating the cause of the error is recorded on the recording medium by the recording mechanism, and the error processing means The command or the parameter detected as the error or the data is corrected to either a predetermined specified value or a value of a predetermined specified range, and based on the corrected value, It is characterized by functioning as a recording control means for performing predetermined recording or predetermined operation on a recording medium.
By executing the program of the present invention, the control unit receives a command received from an external device, or is included in the command, and either a parameter or data is a predetermined specified value or a predetermined specified When the value is out of the specified range, an error is detected, the information indicating the cause of the error is recorded on the recording medium, the inappropriate value is corrected to an appropriate value, and a predetermined value is determined based on the corrected value. Make a record. This allows you to know the cause of the error by looking at the information recorded on the recording medium in the event of an error, and the recording result that is recorded when the data that caused the error is set to an appropriate value. Visible. Therefore, it is possible to obtain a large amount of information for correction without performing the operation again when an error occurs, and it is possible to quickly correct a command or the like and obtain an intended recording result.

本発明によれば、エラーが発生した場合にエラーの原因を知ることができ、さらに、エラーの原因となった値を適正値に修正した場合の記録結果を確認できる。   According to the present invention, when an error occurs, it is possible to know the cause of the error, and further, it is possible to confirm the recording result when the value causing the error is corrected to an appropriate value.

本発明の実施形態に係るプリンターの機能ブロック図である。FIG. 2 is a functional block diagram of a printer according to an embodiment of the invention. エラー修正用データの構成例を模式的に示す説明図である。It is explanatory drawing which shows the structural example of the data for error correction typically. プリンターの動作を示すフローチャートである。3 is a flowchart illustrating an operation of a printer. 印刷される帳票の例を示す図である。It is a figure which shows the example of the form printed.

以下、図面を参照して本発明の実施形態について説明する。
図1は、本発明を適用した実施形態に係るプリンター1の構成を示す機能ブロック図である。
記録装置としてのプリンター1は、外部装置を接続するインターフェイス(I/F)部13を備え、このインターフェイス部13を介してホストコンピューター2(外部装置)に接続されている。プリンター1は、制御部としてのCPU10によって各部を制御することにより、ホストコンピューター2から送信された印刷ジョブ(コマンド等を含む記録用データ)をインターフェイス部13により受信し、この印刷ジョブを実行して、記録媒体としてのロール紙に文字や画像等を印刷(記録)する。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a functional block diagram showing a configuration of a printer 1 according to an embodiment to which the present invention is applied.
The printer 1 as a recording apparatus includes an interface (I / F) unit 13 for connecting an external device, and is connected to the host computer 2 (external device) via the interface unit 13. The printer 1 receives a print job (recording data including commands and the like) transmitted from the host computer 2 by the interface unit 13 by controlling each unit by the CPU 10 as a control unit, and executes the print job. A character, an image, or the like is printed (recorded) on a roll paper as a recording medium.

CPU10は、ロール紙に印刷を行う記録機構40を備えている。記録機構40は、ロール紙を搬送する搬送ローラー(図示略)を回転させて、ロール紙を、その長手方向に搬送する搬送モーター41、ロール紙に有色のドットを形成して文字や画像を記録する記録ヘッド44、記録ヘッド44を搭載したキャリッジを、ロール紙の搬送方向に対して直交する方向(桁方向)に往復走査させるキャリッジ駆動モーター42、及び、印刷後のロール紙を切断するカッター機構(図示略)を駆動するカッター駆動モーター43を備えている。
CPU10は、不揮発性メモリー12に記憶された制御プログラム(図示略)を読み出して実行することにより、プリンター1の各部を制御して、上記の印刷動作等を実行させる。この印刷動作において、CPU10は、ゲートアレイ14から入力されるデータに基づき、用紙センサー31及びキャリッジ位置センサー32の検出値を取得し、これらの検出値をもとに、モータードライバー15及びヘッドドライバー16を制御して、記録機構40を駆動する。
The CPU 10 includes a recording mechanism 40 that performs printing on roll paper. The recording mechanism 40 rotates a transport roller (not shown) for transporting the roll paper, transports the roll paper in the longitudinal direction, forms colored dots on the roll paper, and records characters and images. Recording head 44, carriage driving motor 42 for reciprocally scanning the carriage on which the recording head 44 is mounted in a direction (digit direction) orthogonal to the roll paper transport direction, and a cutter mechanism for cutting the roll paper after printing A cutter drive motor 43 for driving (not shown) is provided.
The CPU 10 reads out and executes a control program (not shown) stored in the nonvolatile memory 12 to control each unit of the printer 1 and execute the above-described printing operation and the like. In this printing operation, the CPU 10 acquires the detection values of the paper sensor 31 and the carriage position sensor 32 based on the data input from the gate array 14, and based on these detection values, the motor driver 15 and the head driver 16 And the recording mechanism 40 is driven.

プリンター1において使用可能な記録媒体は、連続紙(ロール紙、ファンフォールド紙等)およびカット紙のいずれであってもよく、1枚のシートからなる用紙の他に、単票複写紙、連続複写紙、冊子を用いることも可能である。また、普通紙のほかに感熱紙や表面にコーティングが付された用紙を用いることができる。本実施形態では、80mm幅または58mm幅の普通紙からなるロール紙を用いる場合を例に挙げて説明する。
プリンター1は、ロール紙の残量が所定以上か否かを検出する用紙センサー31と、後述するキャリッジ駆動モーター42により、ロール紙の幅方向(桁方向)に走査されるキャリッジ(図示略)の桁位置を検出するキャリッジ位置センサー32を備えている。また、これらのセンサーが出力するアナログの出力値をデジタルデータに変換してCPU10に出力するゲートアレイ(G/A)14を備えている。
The recording medium that can be used in the printer 1 may be either continuous paper (roll paper, fanfold paper, etc.) or cut paper, in addition to single sheet paper, single sheet copy paper, continuous copy paper Paper and booklets can also be used. In addition to plain paper, thermal paper or paper with a coating on the surface can be used. In the present embodiment, a case where roll paper made of plain paper having a width of 80 mm or 58 mm is used will be described as an example.
The printer 1 has a carriage (not shown) that is scanned in the width direction (digit direction) of the roll paper by a paper sensor 31 that detects whether or not the remaining amount of roll paper is greater than or equal to a predetermined amount and a carriage drive motor 42 described later. A carriage position sensor 32 for detecting a digit position is provided. Further, a gate array (G / A) 14 for converting analog output values output from these sensors into digital data and outputting the digital data to the CPU 10 is provided.

また、プリンター1は、搬送モーター41、キャリッジ駆動モーター42及びカッター駆動モーター43を駆動するモータードライバー15と、記録ヘッド44を駆動するヘッドドライバー16とを備えている。本実施形態では、一例として、搬送モーター41及びカッター駆動モーター43はステッピングモーターとして構成され、モータードライバー15から入力される駆動電流及び駆動パルスに従って動作する。また、キャリッジ駆動モーター42はサーボモーターとして構成され、モータードライバー15から入力される駆動電流及によりキャリッジを移動させる。   The printer 1 also includes a motor driver 15 that drives a transport motor 41, a carriage drive motor 42, and a cutter drive motor 43, and a head driver 16 that drives a recording head 44. In the present embodiment, as an example, the transport motor 41 and the cutter drive motor 43 are configured as stepping motors, and operate according to a drive current and a drive pulse input from the motor driver 15. The carriage drive motor 42 is configured as a servo motor, and moves the carriage by the drive current input from the motor driver 15.

本実施形態のプリンター1はシリアルドットインパクトプリンターである。記録ヘッド44は、複数の記録ワイヤー(図示略)と、これら記録ワイヤーを記録媒体に向けて打突する突出機構(図示略)とを備え、インリボンカートリッジ(図示略)とともにキャリッジ(図示略)に搭載される。
記録ヘッド44は、ヘッドドライバー16から流れる駆動電流により突出機構を動作させ、インクリボンを介して記録ワイヤーをロール紙に打ち当てることでドットを形成することにより、文字や画像を印刷する。記録ヘッド44を搭載したキャリッジは、キャリッジ駆動モーター42によって、ロール紙の幅方向に往復走査される。キャリッジ駆動モーター42がキャリッジを移動させる移動速度と記録ヘッド44が記録ワイヤーを打突するタイミングとはCPU10によって制御可能であり、これにより、ロール紙に形成されるドットピッチすなわち印刷解像度を調整できる。
The printer 1 of this embodiment is a serial dot impact printer. The recording head 44 includes a plurality of recording wires (not shown) and a projecting mechanism (not shown) for projecting these recording wires toward a recording medium, and a carriage (not shown) together with an in-ribbon cartridge (not shown). Mounted on.
The recording head 44 prints characters and images by operating the protrusion mechanism by the drive current flowing from the head driver 16 and forming dots by hitting the recording wire against the roll paper via the ink ribbon. The carriage on which the recording head 44 is mounted is reciprocally scanned in the width direction of the roll paper by the carriage drive motor 42. The moving speed at which the carriage drive motor 42 moves the carriage and the timing at which the recording head 44 strikes the recording wire can be controlled by the CPU 10, thereby adjusting the dot pitch formed on the roll paper, that is, the printing resolution.

RAM11は、CPU10が実行するプログラムやデータを一時的に記憶する記憶領域を有し、ホストコンピューター2から受信したデータを一時的に記憶する受信バッファー、印刷する文字や画像をラスターデータに展開して保持するプリントバッファー等として機能する。
不揮発性メモリー12は、CPU10が実行する制御プログラムや、制御プログラムに関する各種設定値などのデータを記憶する。例えば、不揮発性メモリー12には、英数字フォントや日本語フォント等の通常フォント22が記憶され、これらのフォントのデータを用いて文字が印刷される。また、不揮発性メモリー12にはバーコードフォント23が記憶されている。このため、プリンター1は、ホストコンピューター2から受信した印刷ジョブに含まれるバーコードフォントを指定するパラメーターに基づき、バーコードフォント23を使用して、JANコード等の1次元バーコードや2次元バーコードを印刷できる。
さらに、不揮発性メモリー12は、ホストコンピューター2から受信した印刷ジョブに適正でない値のデータが含まれていた場合に、このデータを修正するためのエラー修正用データ24を記憶している。
The RAM 11 has a storage area for temporarily storing programs executed by the CPU 10 and data, a reception buffer for temporarily storing data received from the host computer 2, and developing characters and images to be printed into raster data. Functions as a print buffer to hold.
The nonvolatile memory 12 stores data such as a control program executed by the CPU 10 and various setting values related to the control program. For example, the non-volatile memory 12 stores normal fonts 22 such as alphanumeric fonts and Japanese fonts, and characters are printed using data of these fonts. In addition, a barcode font 23 is stored in the nonvolatile memory 12. For this reason, the printer 1 uses a barcode font 23 based on a parameter for specifying a barcode font included in a print job received from the host computer 2, and uses a one-dimensional barcode such as a JAN code or a two-dimensional barcode. Can be printed.
Further, the non-volatile memory 12 stores error correction data 24 for correcting this data when the print job received from the host computer 2 includes data of an inappropriate value.

図2は、エラー修正用データ24の構成例を模式的に示す説明図である。
この図2に示す例では、エラー修正用データ24は、印刷ジョブに含まれるデータのうち、1次元バーコード(シンボル画像)のパラメーターが適正でない値であった場合に、これを適正値に修正するためのデータと、バーコードのサイズ設定値が適正でない場合に修正するためのデータとを含んでいる。
CPU10は、印刷ジョブに1次元バーコードのパラメーターが含まれている場合、これらのパラメーターに基づきバーコードフォント23を配列してバーコードを生成する。1次元バーコードのパラメーターは、一般的には0〜9の数字であり、パラメーターとして$等の記号が含まれているとバーコードを印刷できない。このように適正値でないパラメーターが印刷ジョブに含まれていた場合、CPU10は、エラー修正用データ24を参照して、このパラメーターを修正値(図2の例では「1」)に置き換える。この置き換えを行うことで、CPU10は、バーコードを生成できる。
また、印刷ジョブにはバーコードのサイズを指定するデータが含まれ、CPU10は、生成したバーコードを拡大または縮小し、上記データにより指定されたサイズでロール紙に印刷する。但し、ロール紙のサイズ毎に、バーコードや文字を印刷可能な印刷可能領域の大きさが決まっており、CPU10は、現在セットされているロール紙の印刷可能領域を、センサーによる検出、或いはコマンドやディップスイッチによる設定等により取得することができ、この印刷可能領域を超えるサイズが指定された場合には、印刷不可能なためエラーを発生(検出)する。そして、CPU10は、エラー修正用データ24を参照して、バーコードのサイズのデータを修正値(図2の例では「4」)に置き換えて、修正値のサイズに合わせてバーコードを印刷する。なお、現在セットされているロール紙のサイズ、及び、このロール紙のサイズに対応する印刷可能領域に印刷可能なバーコードのサイズは、不揮発性メモリー12またはRAM11に記憶されている。
また、バーコードには桁数が規定されているものがあり、これを超えたデータ数や、足りないデータ数を受信した場合もデータエラー等のエラーを発生する。この場合の修正は、データ数をカットしたり、受信したデータの中の同じものを追加するなどして、規定したデータ数とすればよい。さらに、数字のみなど文字種も規定されているものもあり、異なる文字種のデータを受信した場合も、データエラー等のエラーを発生させ、規定された文字種のデータに置き換えて記録する。
FIG. 2 is an explanatory diagram schematically showing a configuration example of the error correction data 24.
In the example shown in FIG. 2, the error correction data 24 is corrected to an appropriate value when the parameter of the one-dimensional barcode (symbol image) is an inappropriate value among the data included in the print job. And data for correcting when the barcode size setting value is not appropriate.
When the print job includes one-dimensional barcode parameters, the CPU 10 generates a barcode by arranging the barcode font 23 based on these parameters. The parameters of the one-dimensional barcode are generally numbers from 0 to 9, and if a symbol such as $ is included as a parameter, the barcode cannot be printed. When a parameter that is not an appropriate value is included in the print job, the CPU 10 refers to the error correction data 24 and replaces the parameter with a correction value (“1” in the example of FIG. 2). By performing this replacement, the CPU 10 can generate a barcode.
The print job includes data specifying the barcode size, and the CPU 10 enlarges or reduces the generated barcode and prints it on the roll paper with the size specified by the data. However, the size of the printable area where barcodes and characters can be printed is determined for each roll paper size, and the CPU 10 detects the printable area of the currently set roll paper by a sensor or command. If a size exceeding this printable area is specified, an error is generated (detected) because printing is impossible. Then, the CPU 10 refers to the error correction data 24, replaces the barcode size data with the correction value (“4” in the example of FIG. 2), and prints the barcode according to the correction value size. . Note that the size of the currently set roll paper and the size of the barcode that can be printed in the printable area corresponding to the roll paper size are stored in the nonvolatile memory 12 or the RAM 11.
Some barcodes have a prescribed number of digits, and an error such as a data error also occurs when the number of data exceeding this number or an insufficient number of data is received. In this case, the correction may be performed by setting the specified number of data by cutting the number of data or adding the same received data. In addition, some character types such as only numbers are specified, and when data of a different character type is received, an error such as a data error is generated and replaced with data of the specified character type and recorded.

エラー修正用データ24には、修正対象のデータに対応付けてエラー要因が定義されている。このエラー要因は、エラーの原因を示す情報であり、具体的にはエラーの原因となったデータの種類である。1次元バーコードのパラメーターを修正した場合、CPU10は、ロール紙に「パラメーターエラー」が発生した旨を印刷する。また、バーコードのサイズのデータを修正した場合、CPU10は、ロール紙に「バーコードサイズオーバー」が発生した旨を印刷する。エラー修正用データ24には、プリンター1が英文フォントを使用する場合であってもエラー要因を印刷できるように、英字印刷用のエラー要因「Parameter Error」、「Width Size Over」も設定されている。   In the error correction data 24, an error factor is defined in association with the data to be corrected. This error factor is information indicating the cause of the error, and specifically, the type of data that caused the error. When the parameter of the one-dimensional barcode is corrected, the CPU 10 prints that “parameter error” has occurred on the roll paper. Further, when the barcode size data is corrected, the CPU 10 prints that “barcode size over” has occurred on the roll paper. In the error correction data 24, error factors “Parameter Error” and “Width Size Over” for alphabetic printing are also set so that the error factor can be printed even when the printer 1 uses an English font. .

また、プリンター1は、ホストコンピューター2から送信される印刷ジョブに従って印刷を行う通常動作モードと、開発モードとを切り換えて実行する。開発モードは、プリンター1のテスト、開発、メンテナンス用の動作モードであり、プリンター1のメンテナンス等を行える作業者が操作する。
動作モードの切替は、(1)ホストコンピューター2からモード切替コマンドを送信する、(2)プリンター1の操作パネル(図示略)において特定の操作を行う、等の方法により行われる。(1)の方法では、ホストコンピューター2からプリンター1へ開発モードコマンドを送信し、このときプリンター1が開発モードでない(通常動作モードである)場合は、プリンター1は開発モードに移行する。一方、開発モードコマンドを受信したときにプリンター1が開発モードであった場合、開発モードを解除して通常動作モードに移行する。この例では1つのコマンドにより開発モードへの移行と開発モードの解除を指示できる。(2)の操作は、通常は行われない特殊な操作であり、例えば、電源スイッチ、用紙送りボタン等の複数の操作子の操作の組み合わせや、これら操作子の操作とロール紙カバーの開閉操作とを組み合わせが挙げられる。
開発モードでは、作業者がプリンター1の動作状態や、プリンター1における各種設定を試行することができるように、プリンター1が種々の情報を提供する。例えば、ホストコンピューター2からプリンター1に送信した印刷ジョブのデータに不適切な値が含まれている場合に、プリンター1はエラーを発生し、さらに、エラーの原因を示す情報と、不適切な値を適切な値に修正した場合の印刷結果とを、ロール紙に印刷する。これにより、作業者が、プリンター1で発生したエラーの原因を知ることができ、かつ、エラーの原因となったデータを適正値にした場合に記録されるバーコードを視認できる。このため、エラー発生時に操作のやり直しをしなくても多くの情報を得ることができ、速やかにデータを修正して正しいバーコードを記録できるという利点がある。このような情報はプリンター1の設定等を行う作業者にとって特に有効であるため、開発モードでのみ印刷されるようになっている。
The printer 1 switches between a normal operation mode in which printing is performed according to a print job transmitted from the host computer 2 and a development mode. The development mode is an operation mode for testing, development, and maintenance of the printer 1 and is operated by an operator who can perform maintenance of the printer 1 and the like.
The operation mode is switched by a method such as (1) transmitting a mode switching command from the host computer 2 or (2) performing a specific operation on the operation panel (not shown) of the printer 1. In the method (1), when the development mode command is transmitted from the host computer 2 to the printer 1, and the printer 1 is not in the development mode (normal operation mode) at this time, the printer 1 shifts to the development mode. On the other hand, if the printer 1 is in the development mode when the development mode command is received, the development mode is canceled and the normal operation mode is entered. In this example, the transition to the development mode and the cancellation of the development mode can be instructed by one command. The operation (2) is a special operation that is not normally performed. For example, a combination of operations of a plurality of operators such as a power switch and a paper feed button, an operation of these operators, and a roll paper cover opening / closing operation. A combination is mentioned.
In the development mode, the printer 1 provides various information so that the operator can try the operation state of the printer 1 and various settings in the printer 1. For example, when the print job data transmitted from the host computer 2 to the printer 1 includes an inappropriate value, the printer 1 generates an error, and further indicates information indicating the cause of the error and an inappropriate value. The print result when the value is corrected to an appropriate value is printed on roll paper. Thereby, the operator can know the cause of the error that has occurred in the printer 1 and can visually recognize the barcode that is recorded when the data causing the error is set to an appropriate value. For this reason, there is an advantage that a lot of information can be obtained without re-operating the operation when an error occurs, and the correct barcode can be recorded by correcting the data promptly. Such information is particularly effective for an operator who performs setting of the printer 1 and the like, and is printed only in the development mode.

図3は、プリンター1及びホストコンピューター2の印刷動作を示すフローチャートであり、(A)はホストコンピューター2の動作を示し、(B)はプリンター1の動作を示す。
この図3に示す動作において、CPU10は、インターフェイス部13とともに受信手段として機能し、エラー処理手段、及び、記録制御手段としても機能する。
FIG. 3 is a flowchart showing the printing operation of the printer 1 and the host computer 2, (A) shows the operation of the host computer 2, and (B) shows the operation of the printer 1.
In the operation shown in FIG. 3, the CPU 10 functions as a receiving unit together with the interface unit 13, and also functions as an error processing unit and a recording control unit.

ホストコンピューター2は、プリンター1に対する印刷ジョブを送信する際に、まず、バーコードのデータを送信する(ステップS11)。このステップS11で送信されるデータは、QRコード(登録商標)などの2次元バーコードや、2次元バーコードを1次元バーコードに付加したコンポジットシンボルを印刷するためのバーコードの画像データである。従って、1次元バーコードのみを印刷する場合には、ステップS11のデータの送信は行われない。また、2次元バーコードやコンポジットシンボルを印刷する場合であっても、バーコードフォントのみを使用してバーコードを印刷する場合には、ステップS11のデータの送信は不要である。   When transmitting a print job to the printer 1, the host computer 2 first transmits barcode data (step S11). The data transmitted in step S11 is barcode image data for printing a two-dimensional barcode such as a QR code (registered trademark) or a composite symbol in which the two-dimensional barcode is added to the one-dimensional barcode. . Therefore, when only the one-dimensional barcode is printed, the data transmission in step S11 is not performed. Even when printing a two-dimensional barcode or composite symbol, if the barcode is printed using only the barcode font, the data transmission in step S11 is not necessary.

続いて、ホストコンピューター2は、プリンター1に対し、印刷実行を指示するバーコード印刷コマンドと、このコマンドに付随するデータとを送信する(ステップS12)。プリンター1により1次元バーコードを印刷させる場合は、このステップS12で1次元バーコードのパラメーターが送信される。ここでは、説明上、コマンドはパラメーターを含めたものとして説明する。
2次元バーコードまたはコンポジットシンボルを印刷する場合、ステップS11で送信されるバーコードデータとステップS12で送信されるコマンドとの組み合わせは印刷ジョブ(記録用データ)に相当する。また、1次元バーコードを印刷させる場合、ステップS12で送信されるコマンドとデータが印刷ジョブに相当する。
Subsequently, the host computer 2 transmits to the printer 1 a barcode print command for instructing execution of printing and data accompanying the command (step S12). When the printer 1 prints a one-dimensional barcode, the parameter of the one-dimensional barcode is transmitted in step S12. Here, for the sake of explanation, the command will be described as including parameters.
When printing a two-dimensional barcode or composite symbol, the combination of the barcode data transmitted in step S11 and the command transmitted in step S12 corresponds to a print job (recording data). When printing a one-dimensional barcode, the command and data transmitted in step S12 correspond to a print job.

ホストコンピューター2が2次元バーコードまたはコンポジットシンボルのバーコードデータを送信した場合、プリンター1のCPU10は、このバーコードデータをインターフェイス部13により受信して、バーコードの画像をRAM11に設けられるバッファーメモリーに格納する(ステップS21)。
また、ホストコンピューター2がバーコード印刷コマンドを送信した場合、CPU10は、このコマンドを受信してバッファーメモリーに格納する(ステップS22)。ここで、バーコード印刷コマンドとともにデータが送信された場合は、このデータをコマンドとともにバッファーメモリーに格納する。
When the host computer 2 transmits barcode data of a two-dimensional barcode or composite symbol, the CPU 10 of the printer 1 receives the barcode data by the interface unit 13 and a buffer memory provided in the RAM 11 with the barcode image. (Step S21).
When the host computer 2 transmits a barcode printing command, the CPU 10 receives this command and stores it in the buffer memory (step S22). Here, when data is transmitted together with the barcode printing command, this data is stored in the buffer memory together with the command.

CPU10は、バーコード印刷コマンドに応答して、バッファーメモリーに格納したバーコードデータまたは1次元バーコードのパラメーターに基づき、印刷するバーコードの画像データを生成して、RAM11に設けられるプリントバッファーに展開する(ステップS23)。
ここで、CPU10は、ステップS22で展開したデータを、現在セットされているロール紙に印刷可能か否かを判別する(ステップS24)。展開されたバーコードデータのサイズがロール紙の印刷可能領域を超えている場合や、1次元バーコードのパラメーターに異常値が含まれていてバーコードを展開できない場合、或いは、展開された1次元バーコードの桁数が多すぎてロール紙の印刷可能領域を超えている場合等、通常の印刷を行えない場合には、CPU10は印刷不可能と判別し(ステップS24;No)、エラーを発生する(ステップS25)。ここで、CPU10は、エラーが発生した旨を示すコマンドを、インターフェイス部13によってホストコンピューター2に送信してもよいし、プリンター1が備える操作パネル(図示略)のLEDを点灯させてエラーを報知してもよい。
In response to the barcode printing command, the CPU 10 generates barcode image data to be printed based on the barcode data stored in the buffer memory or the parameters of the one-dimensional barcode, and develops the image data in the print buffer provided in the RAM 11. (Step S23).
Here, the CPU 10 determines whether or not the data expanded in step S22 can be printed on the currently set roll paper (step S24). If the size of the expanded barcode data exceeds the printable area of the roll paper, or if the 1-D barcode parameter contains an abnormal value and cannot be expanded, or the expanded 1D When normal printing cannot be performed, for example, when the barcode has too many digits and exceeds the printable area of the roll paper, the CPU 10 determines that printing is impossible (step S24; No) and generates an error. (Step S25). Here, the CPU 10 may send a command indicating that an error has occurred to the host computer 2 through the interface unit 13 or notify an error by turning on an LED on an operation panel (not shown) of the printer 1. May be.

CPU10は、現在の動作モードが、開発モードか否かを判別し(ステップS26)、開発モードである場合(ステップS26;Yes)、ステップS25でエラーを発生する原因となったデータを特定し、このデータに対応するエラー要因をエラー修正用データ24から取得する(ステップS27)。続いて、CPU10は、エラーの要因となったデータを、エラー修正用データ24に設定された修正値に置き換えて修正し、修正後のデータに基づくバーコードをプリントバッファーに展開する(ステップS28)。
そして、CPU10は、記録機構40によって、エラー修正用データ24から取得したエラー要因と、修正してプリントバッファーに展開したバーコードとをロール紙に印刷し(ステップS29)、ロール紙を排出口まで搬送してカッター機構によりカットして(ステップS30)、本処理を終了する。
The CPU 10 determines whether or not the current operation mode is the development mode (step S26). If the current operation mode is the development mode (step S26; Yes), the CPU 10 identifies the data causing the error in step S25, An error factor corresponding to this data is acquired from the error correction data 24 (step S27). Subsequently, the CPU 10 corrects the data causing the error by replacing it with a correction value set in the error correction data 24, and develops a barcode based on the corrected data in the print buffer (step S28). .
Then, the CPU 10 uses the recording mechanism 40 to print the error factor acquired from the error correction data 24 and the barcode that has been corrected and developed in the print buffer on the roll paper (step S29), and the roll paper reaches the discharge port. The sheet is conveyed and cut by the cutter mechanism (step S30), and this process is terminated.

また、エラーが発生した場合にプリンター1が通常動作モードであった場合(ステップS26;No)、CPU10はバーコードの印刷を中止して、ステップS30に移行してロール紙を排出し、本処理を終了する。さらに、ホストコンピューター2から受信した印刷ジョブに基づいて展開したバーコードを印刷可能な場合(ステップS24;Yes)、CPU10は、展開したバーコードをロール紙に印刷して(ステップS31)、ステップS30に移行してロール紙を排出する。   If the printer 1 is in the normal operation mode when an error occurs (step S26; No), the CPU 10 stops printing the barcode, proceeds to step S30, and discharges the roll paper. Exit. Further, when the developed barcode can be printed based on the print job received from the host computer 2 (step S24; Yes), the CPU 10 prints the developed barcode on the roll paper (step S31), and step S30. The roll paper is discharged.

図4は、プリンター1により印刷される帳票の例を示す図であり、(A)はバーコードのパラメーターが適正値でない場合の例を示し、(B)はバーコードのサイズを指定するデータが適正値でない場合の例を示す。この図4(A)、(B)の例はいずれもプリンター1が開発モードで動作中に、エラーが発生した場合に出力される帳票を示している。   FIG. 4 is a diagram showing an example of a form printed by the printer 1, (A) shows an example when the barcode parameter is not an appropriate value, and (B) shows data specifying the barcode size. An example when the value is not appropriate is shown. 4A and 4B show forms that are output when an error occurs while the printer 1 is operating in the development mode.

図4(A)に示す帳票100には、先頭にエラー要因101が印刷されている。エラー要因101には、エラー修正用データ24に設定されたエラー要因である「Parameter Error」が印刷されている。エラー要因101に続けて、エラー要因データ102が印刷されている。エラー要因データ102は、エラーの原因となったデータ自体であり、この図4(A)の例では、コンポジットシンボルの1次元バーコードのパラメーターに含まれていた「a」と、2次元バーコードのパラメーターに含まれていた記号「|」と「$」がエラーの原因のデータとして印刷されている。
さらに、帳票100には入力データ103が印刷されている。入力データ103はホストコンピューター2から受信したデータ自体を印刷したものであり、1次元バーコード(RSS)と2次元バーコードを組み合わせたコンポジットシンボル(CC−A)を指定するデータと、1次元バーコードのパラメーターと2次元バーコードのパラメーターとが各々記載されている。この入力データ103のパラメーターは、数字0〜1で構成されるべきところ、図4(A)の例では適切でない値「a」、「|」、「$」が含まれている。入力データ103の下には修正データ104が印刷されている。修正データ104は、エラー修正用データ24に基づいて、エラー要因として検出されたデータを適正値に置き換えたデータである。入力データ103の適切でない値「a」、「|」、「$」が、それぞれ「1」に置き換えられている。そして、修正データ104の下方には、この置き換えられた修正データ104に基づいて生成されたコンポジットシンボル105が印刷されている。
An error factor 101 is printed at the top of the form 100 shown in FIG. In the error factor 101, “Parameter Error” which is an error factor set in the error correction data 24 is printed. Following the error factor 101, error factor data 102 is printed. The error factor data 102 is the data that caused the error. In the example of FIG. 4A, “a” included in the one-dimensional barcode parameter of the composite symbol and the two-dimensional barcode are included. The symbols “|” and “$” included in the parameters are printed as error cause data.
Further, input data 103 is printed on the form 100. The input data 103 is obtained by printing the data itself received from the host computer 2, and data specifying a composite symbol (CC-A) combining a one-dimensional barcode (RSS) and a two-dimensional barcode, and a one-dimensional bar code. A code parameter and a two-dimensional barcode parameter are described. The parameters of the input data 103 should be composed of numerals 0 to 1 and include values “a”, “|”, and “$” that are not appropriate in the example of FIG. Below the input data 103, correction data 104 is printed. The correction data 104 is data obtained by replacing data detected as an error factor with an appropriate value based on the error correction data 24. Inappropriate values “a”, “|”, and “$” of the input data 103 are respectively replaced with “1”. A composite symbol 105 generated based on the replaced correction data 104 is printed below the correction data 104.

同様に、図4(B)に示す帳票110には、先頭にエラー要因111「Width Size Over」が印刷されている。エラー要因111に続くエラー要因データ112には、バーコードの印刷サイズを指定するデータ「5」が、エラーの原因のデータとして印刷されている。
また、エラー要因データ112の下方には、1次元バーコード(RSS)と2次元バーコードを組み合わせたコンポジットシンボル(CC−A)を指定するデータと、バーコードの印刷サイズを指定するデータ「5」とが、入力データ113として各々印刷されている。この入力データ113のデータ「5」はロール紙の印刷可能領域を超えており、適切でない値である。そこで、入力データ113の下に、修正データ114として、エラー修正用データ24に基づいて適正な値「4」に置き換えられたデータが記載され、この修正データ114に基づいて生成されたコンポジットシンボル115が印刷されている。
Similarly, in the form 110 shown in FIG. 4B, an error factor 111 “Width Size Over” is printed at the top. In the error factor data 112 following the error factor 111, data “5” designating the print size of the barcode is printed as the error cause data.
Below the error factor data 112, data specifying a composite symbol (CC-A) combining a one-dimensional barcode (RSS) and a two-dimensional barcode, and data “5” specifying the print size of the barcode. Are printed as the input data 113. The data “5” of the input data 113 exceeds the printable area of the roll paper and is an inappropriate value. Therefore, under the input data 113, the data replaced with the appropriate value “4” based on the error correction data 24 is described as the correction data 114, and the composite symbol 115 generated based on the correction data 114 is written. Is printed.

以上のように、本発明を適用した実施形態に係るプリンター1によれば、ロール紙に記録する記録機構40と、ホストコンピューター2から少なくともコマンドを含む印刷ジョブを受信し、受信したコマンドに基づいて、記録機構40により、ロール紙にバーコードを印刷する動作、或いは印刷以外の所定の動作(例えば、ロール紙の搬送、カット等)を行い、印刷ジョブに含まれるコマンド、パラメーター或いはデータ(以下、データ等)から適正値でないデータ等を検出した場合にはエラーを発生させ、エラー要因をロール紙に記録し、かつ、検出された適正値でないデータ等を適正値に修正して、修正後のデータ等に基づいてロール紙にバーコードを印刷する。これにより、ホストコンピューター2から受信した印刷ジョブに適正でないデータ等が含まれている場合に、このデータ等をエラーの要因としてロール紙に印刷し、さらに適正でないデータ等を適正値に修正して、修正後のデータ等に基づいてバーコードを印刷する。従って、エラーが発生した場合にロール紙に印刷される情報を見ればエラーの原因を知ることができ、かつ、エラーの原因となったデータ等を適正値にした場合に印刷されるバーコードを視認できる。このため、エラー発生時に操作のやり直しをしなくても多くの情報を得ることができ、速やかにデータ等を修正して正しいバーコードを印刷できる。
この際、データ等が所定の規定された値、または所定の規定された範囲の値から外れている場合、このデータ等を、より近い方の規定値に修正すると、意図としたものにより近い結果を知ることができる。
As described above, according to the printer 1 according to the embodiment to which the present invention is applied, a print job including at least a command is received from the recording mechanism 40 that records on roll paper and the host computer 2, and based on the received command. The recording mechanism 40 performs an operation for printing a barcode on roll paper, or a predetermined operation other than printing (for example, conveyance of a roll paper, cutting, etc.), and includes commands, parameters, or data (hereinafter, referred to as print jobs) If an incorrect value is detected from the data, etc., an error is generated, the error factor is recorded on the roll paper, and the detected incorrect value is corrected to an appropriate value. A barcode is printed on the roll paper based on the data. As a result, if the print job received from the host computer 2 contains inappropriate data, etc., this data is printed on the roll paper as an error factor, and the inappropriate data is corrected to an appropriate value. The barcode is printed based on the corrected data. Therefore, if an error occurs, you can see the cause of the error by looking at the information printed on the roll paper, and the barcode that is printed when the data that caused the error is set to an appropriate value. Visible. Therefore, it is possible to obtain a large amount of information without performing the operation again when an error occurs, and it is possible to quickly correct data and print a correct barcode.
At this time, if the data, etc. is out of the specified range or the specified range, if the data is corrected to the closer specified value, the result closer to the intended result Can know.

また、プリンター1がホストコンピューター2から受信する印刷ジョブがバーコードフォントを指定するパラメーターを含む場合に、CPU10は、印刷ジョブに含まれるパラメーターのうち適正値でないパラメーターを検出してエラーを発生し、CPU10により検出されたパラメーターを示す情報をロール紙に印刷し、パラメーターを適正値に修正して修正後のパラメーターに基づいてロール紙にバーコードを印刷する。このため、バーコードフォントを指定するパラメーターが適正値でなかった場合に、エラーを発生し、さらに、適正値でないパラメーターを示す情報と、このパラメーターを適正値に修正した場合のバーコードが印刷される。従って、適正でないパラメーターを速やかに修正することができ、また、パラメーターを修正する前に、修正した場合のバーコードを視認できる。
つまり、プリンター1がホストコンピューター2から受信するコマンドは、シンボル画像を印刷することを指定するものであり、パラメーターは、シンボル画像の機能すなわちバーコードを指定するものであり、データは、シンボル画像を形成するデータである。この場合、コマンドに含まれるパラメーター、またはデータのいずれかが、所定の規定された値、または所定の規定された範囲の値から外れているエラーかを検出し、エラー処理手段がエラーを検出した場合、記録制御手段は、エラー処理手段によりエラーとして検出されたパラメーターまたはデータを示す情報を記録媒体に記録し、かつ、エラー処理手段によりエラーとして検出されたパラメーター、またはデータを、所定の規定された値、または所定の規定された範囲の値のいずれかに修正し、修正後の値に基づいてロール紙にシンボル画像の印刷をする。本実施形態では、例として、シンボル画像は、1次元バーコードや2次元コードなどを示す。パラメーターは、シンボル画像の種類や、全体のサイズ、最小バーや最小ピクセルのサイズ、印刷位置、チェックサムや誤り訂正度の種類、文字の種類、などの機能を指定する。上記データはバーコードを画像として印刷するためのデータであり、具体的にはバーコードフォントを指定するデータであって、データ数もコマンド等により指定される。この構成によれば、コマンドに含まれるパラメーター、またはデータのいずれかが、所定の規定された値、または所定の規定された範囲の値から外れているエラーかを検出した場合、適正値でないパラメーターやデータを示す情報と、このパラメーターやデータを適正値に修正した場合のシンボル画像が記録されるので、適正でないパラメーターやデータを速やかに修正することができ、また、パラメーターやデータを修正する前に、修正した場合のシンボル画像を視認できる。
In addition, when the print job received by the printer 1 from the host computer 2 includes a parameter that specifies a barcode font, the CPU 10 detects a parameter that is not an appropriate value from among the parameters included in the print job, and generates an error. Information indicating the parameter detected by the CPU 10 is printed on the roll paper, the parameter is corrected to an appropriate value, and a barcode is printed on the roll paper based on the corrected parameter. For this reason, an error occurs if the parameter that specifies the barcode font is not an appropriate value, and information indicating the parameter that is not an appropriate value and the barcode when this parameter is corrected to an appropriate value are printed. The Accordingly, it is possible to quickly correct an inappropriate parameter, and it is possible to visually recognize a barcode when the parameter is corrected before the parameter is corrected.
That is, the command received by the printer 1 from the host computer 2 is to specify that a symbol image is printed, the parameter is to specify the function of the symbol image, that is, the barcode, and the data is the symbol image. Data to be formed. In this case, it is detected whether any of the parameters or data included in the command is out of the predetermined specified value or the predetermined specified range, and the error processing means detects the error. In this case, the recording control means records information indicating the parameter or data detected as an error by the error processing means on the recording medium, and the parameter or data detected as an error by the error processing means is predetermined. Or a predetermined prescribed range value, and a symbol image is printed on the roll paper based on the corrected value. In the present embodiment, as an example, the symbol image indicates a one-dimensional barcode, a two-dimensional code, or the like. Parameters specify functions such as symbol image type, overall size, minimum bar and pixel size, print position, checksum and error correction type, and character type. The data is data for printing a barcode as an image, specifically, data for specifying a barcode font, and the number of data is also specified by a command or the like. According to this configuration, if any of the parameters or data included in the command detects an error that is out of the predetermined specified value or the predetermined specified range, the parameter is not an appropriate value. Information indicating data and data, and a symbol image when this parameter or data is corrected to an appropriate value are recorded, so that inappropriate parameters and data can be corrected quickly, and before parameters and data are corrected In addition, the symbol image when corrected can be visually recognized.

また、プリンター1がホストコンピューター2から受信する印刷ジョブがバーコードの印刷サイズを指定するデータを含む場合に、CPU10は、印刷ジョブにより指定されたバーコードの印刷サイズがロール紙の印刷可能領域を超える場合にエラーを発生し、バーコードの印刷サイズを印刷可能領域に収まるサイズに修正して、ロール紙にバーコードを印刷する。このため、指定されたバーコードのサイズが適正でなかった場合に、エラーを検出し、バーコードのサイズが適正値に修正され、修正後のサイズで印刷されるので、バーコードのサイズの誤りを速やかに修正でき、また、実際にホストコンピューター2においてバーコードのサイズのデータを修正する前に、修正後のバーコードを視認できる。   When the print job received by the printer 1 from the host computer 2 includes data specifying the barcode print size, the CPU 10 determines that the print size of the barcode specified by the print job is the printable area of the roll paper. If it exceeds, an error occurs, the barcode print size is corrected to a size that fits in the printable area, and the barcode is printed on the roll paper. For this reason, if the specified barcode size is not appropriate, an error is detected, the barcode size is corrected to the appropriate value, and the corrected size is printed. Can be promptly corrected, and the corrected barcode can be visually recognized before the host computer 2 actually corrects the barcode size data.

また、プリンター1は、通常動作モードと開発モードとを切り替えて実行可能であり、CPU10は、開発モードでエラーが発生した場合に、エラーの原因を示す情報を印刷し、適正値でないデータ等を修正して修正後のデータ等に基づくバーコードを印刷する。また、通常動作モードでエラーが発生した場合、CPU10は、記録機構40による印刷を中止させてロール紙を排紙する。このため、印刷ジョブに適正値でないデータが含まれている場合に、エラーの原因と修正したデータに基づくバーコードの印刷が必要ない場合には印刷動作を停止するだけで済むので、速やかに印刷を再試行できる。
また、プリンター1は、印刷ジョブに基づいて印刷されるバーコードのデータを展開するプリントバッファーをRAM11により形成し、CPU10は、プリントバッファーにバーコードのデータを展開した際に適正値でないデータを検出するので、適正値でないデータを容易に、特別な処理を経ることなく検出することができる。
In addition, the printer 1 can be executed by switching between the normal operation mode and the development mode, and when an error occurs in the development mode, the CPU 10 prints information indicating the cause of the error and outputs data that is not an appropriate value. Correct and print the barcode based on the corrected data. When an error occurs in the normal operation mode, the CPU 10 stops printing by the recording mechanism 40 and discharges the roll paper. For this reason, if the print job contains data that is not the correct value, and if it is not necessary to print the barcode based on the cause of the error and the corrected data, it is only necessary to stop the printing operation, so printing can be performed quickly. Can be retried.
The printer 1 forms a print buffer for expanding barcode data to be printed based on a print job by the RAM 11, and the CPU 10 detects data that is not an appropriate value when the barcode data is expanded in the print buffer. Therefore, data that is not an appropriate value can be easily detected without any special processing.

以上、本発明の一実施の形態について説明したが、本発明はこれに限定されるものではない。例えば、上記実施形態では、バーコードフォントを指定するパラメーターが適切でない場合と、バーコードの印刷サイズが印刷可能領域を超える場合を例に挙げて説明したが、本発明はこれに限定されるものではなく、設定コマンドにより指定されたバーコードの高さ、フォントの種類、列数、印刷位置等のデータが適正でない場合にエラーを発生してもよい。また、上記実施形態では、図4(A)、(B)に示したように、ロール紙にエラー要因101、111、エラー要因データ102、112、入力データ103、113、修正データ104、114、及びコンポジットシンボル105、115が、順に印刷される構成を例に挙げて説明したが、印刷順序、印刷書式、フォント等は任意に変更可能である。さらに、上記実施形態では適正値でないデータの例として誤ったバーコードフォントのパラメーターや印刷可能領域を超えるバーコードのサイズを例に挙げて説明したが、データの種類と、適正値の範囲または条件については、プリンター1の仕様等に合わせて任意に変更可能である。
また、上記実施形態では、シンボル画像の一例としてバーコードを挙げて説明したが、本発明はこれに限らない。外部装置から受信したコマンド、または、前記コマンドに含まれるもので、パラメーター若しくはデータのいずれかが、所定の規定された値、または所定の規定された範囲の値から外れている場合に、エラーを検出し、エラーの原因を示す情報を記録媒体に記録し、さらに適正でない値を適正値に修正して、修正後の値に基づいて所定の記録をするようにすることもできる。これにより、エラーが発生した場合に記録媒体に記録される情報を見ればエラーの原因を知ることができ、かつ、エラーの原因となったデータを適正値にした場合に記録される記録結果を視認できる。このため、エラー発生時に操作のやり直しをしなくても、修正するための多くの情報を得ることができ、速やかにコマンド等を修正して意図とした記録結果を得ることができる。また、上記実施形態において、コマンドを修正する動作としては、例えば、パラメーターやデータが2次元バーコードに対応したものであるにもかかわらず、コマンドが1次元のバーコードを示すものであった場合に、エラーを発生し、コマンドを2次元バーコードのものと置き換えて、修正したものを記録することもできる。この際、コマンド、パラメーター或いはデータ等が所定の規定された値、または所定の規定された範囲の値から外れている場合に、より近い方の規定値に修正すると、意図としたものにより近い結果を知ることができる。また、既に受信したコマンド、パラメーター、データ等のうち規定値に該当しているものを、修正値として使用して修正してもよい。
また、上記実施形態では、ロール紙に対して記録ヘッド44を搭載したキャリッジを走査させて印刷するシリアルドットインパクトプリンターを例に挙げて説明したが、本発明はこれに限定されるものではなく、熱昇華型やインクジェット式プリンターに本発明を適用することも可能であり、また、ラインヘッドを有するサーマルプリンターやドットインパクトプリンターに本発明を適用してもよい。その他、他の装置に組み込まれる各種プリンターにも本発明を適用可能である。また、上述の動作を行うCPU10が実行するプログラムは、プリンター1が備える不揮発性メモリー12に限らず、他の記憶装置、記憶媒体や外部装置の記憶媒体に記憶させ、CPU10により読み出して実行する構成としても良い。
Although one embodiment of the present invention has been described above, the present invention is not limited to this. For example, in the above embodiment, the case where the parameter for specifying the barcode font is not appropriate and the case where the barcode print size exceeds the printable area have been described as examples, but the present invention is not limited to this. Instead, an error may be generated when data such as the barcode height, font type, number of columns, and printing position specified by the setting command is not appropriate. In the above embodiment, as shown in FIGS. 4A and 4B, error factors 101 and 111, error factor data 102 and 112, input data 103 and 113, correction data 104 and 114, correction data 104, 114, In the above description, the composite symbols 105 and 115 are printed in order, but the print order, print format, font, and the like can be arbitrarily changed. Furthermore, in the above-described embodiment, as an example of data that is not an appropriate value, an incorrect barcode font parameter or barcode size that exceeds the printable area has been described as an example. However, the type of data and the range or condition of the appropriate value Can be arbitrarily changed according to the specifications of the printer 1.
In the above-described embodiment, the barcode is described as an example of the symbol image, but the present invention is not limited to this. An error is detected if a command received from an external device or one of the parameters or data included in the command is out of a predetermined specified value or a predetermined specified range. It is also possible to detect and record information indicating the cause of the error on the recording medium, further correct the inappropriate value to an appropriate value, and perform predetermined recording based on the corrected value. This allows you to know the cause of the error by looking at the information recorded on the recording medium in the event of an error, and the recording result that is recorded when the data that caused the error is set to an appropriate value. Visible. Therefore, it is possible to obtain a large amount of information for correction without performing the operation again when an error occurs, and it is possible to quickly correct a command or the like and obtain an intended recording result. In the above embodiment, as an operation for correcting a command, for example, when a command indicates a one-dimensional barcode even though parameters and data correspond to a two-dimensional barcode. In addition, an error can be generated and the corrected command can be recorded by replacing the command with that of the two-dimensional barcode. In this case, if the command, parameter, data, etc. are out of the prescribed prescribed value or the prescribed prescribed range, the result closer to the intended result will be obtained if it is corrected to the closer prescribed value. Can know. In addition, a command, parameter, data, or the like that has already been received that corresponds to the specified value may be used as a correction value for correction.
In the above embodiment, the serial dot impact printer that scans and prints the carriage on which the recording head 44 is mounted on the roll paper has been described as an example, but the present invention is not limited to this. The present invention can be applied to a thermal sublimation type or an ink jet printer, and the present invention may be applied to a thermal printer or a dot impact printer having a line head. In addition, the present invention can be applied to various printers incorporated in other apparatuses. The program executed by the CPU 10 that performs the above-described operation is not limited to the nonvolatile memory 12 included in the printer 1, but is stored in another storage device, a storage medium, or a storage medium of an external device, and is read and executed by the CPU 10. It is also good.

1…プリンター(記録装置)、2…ホストコンピューター(外部装置)、10…CPU(制御部、受信手段、エラー処理手段、記録制御手段)、12…不揮発性メモリー、13…インターフェイス部(受信手段)、24…エラー修正用データ、40…記録機構、44…記録ヘッド。   DESCRIPTION OF SYMBOLS 1 ... Printer (recording device), 2 ... Host computer (external device), 10 ... CPU (control part, receiving means, error processing means, recording control means), 12 ... Non-volatile memory, 13 ... Interface part (receiving means) 24 ... Data for error correction, 40 ... Recording mechanism, 44 ... Recording head.

Claims (7)

外部装置に接続可能な記録装置であって、
記録媒体に記録する記録機構と、
前記外部装置から少なくともコマンドを受信する受信手段と、
前記受信手段により受信した前記コマンドに基づいて、前記記録機構により、前記記録媒体に所定の記録、または所定の動作をする記録制御手段と、
前記コマンド、または、前記コマンドに含まれるもので、パラメーター若しくはデータのいずれかが、所定の規定された値、または所定の規定された範囲の値から外れているエラーかを検出するエラー処理手段と、を備え、
前記エラー処理手段が前記エラーを検出した場合、前記記録制御手段は、前記エラーの原因を示す情報を前記記録機構により前記記録媒体に記録し、かつ、前記エラー処理手段により前記エラーとして検出された前記コマンドまたは前記パラメーター、前記データを、所定の規定された値、または所定の規定された範囲の値のいずれかに修正し、修正後の前記値に基づいて、前記記録媒体に所定の記録、または所定の動作をすること、
を特徴とする記録装置。
A recording device connectable to an external device,
A recording mechanism for recording on a recording medium;
Receiving means for receiving at least a command from the external device;
Recording control means for performing predetermined recording or predetermined operation on the recording medium by the recording mechanism based on the command received by the receiving means;
Error processing means for detecting whether the command or any of the parameters or data included in the command is out of a predetermined specified value or a predetermined specified range of values; With
When the error processing means detects the error, the recording control means records information indicating the cause of the error on the recording medium by the recording mechanism, and is detected as the error by the error processing means. The command or the parameter and the data are corrected to either a predetermined specified value or a predetermined specified range value, and based on the corrected value, predetermined recording on the recording medium, Or perform a predetermined action,
A recording apparatus.
前記コマンドは、シンボル画像を記録することを指定するものであり、
前記パラメーターは、前記シンボル画像の機能を指定するものであり、
前記データは、前記シンボル画像を形成するものであり、
前記エラー処理手段は、前記コマンドに含まれる前記パラメーター、または前記データのいずれかが、所定の規定された値、または所定の規定された範囲の値から外れているエラーかを検出し、
前記エラー処理手段が前記エラーを検出した場合、前記記録制御手段は、前記エラー処理手段により前記エラーとして検出された前記パラメーターまたは前記データを示す情報を前記記録媒体に記録し、かつ、前記エラー処理手段により前記エラーとして検出された前記パラメーター、または前記データを、所定の規定された値、または所定の規定された範囲の値のいずれかに修正し、修正後の前記値に基づいて前記記録媒体に前記シンボル画像の記録をすること、
を特徴とする請求項1に記載の記録装置。
The command specifies recording a symbol image,
The parameter specifies the function of the symbol image,
The data forms the symbol image,
The error processing means detects whether the parameter or the data included in the command is an error that is out of a predetermined specified value or a predetermined specified range value,
When the error processing means detects the error, the recording control means records information indicating the parameter or the data detected as the error by the error processing means on the recording medium, and the error processing The parameter or the data detected as the error by the means is corrected to either a predetermined specified value or a value of a predetermined specified range, and the recording medium is based on the corrected value Recording the symbol image in
The recording apparatus according to claim 1.
前記パラメーターは、シンボル画像の記録サイズを指定する値を含み、
前記エラー処理手段は、前記パラメーターにより指定されたシンボル画像の記録サイズが前記記録媒体の記録可能領域を超える場合にエラーを検出し、
前記記録制御手段は前記シンボル画像の記録サイズを前記記録可能領域内に収まるサイズに修正して、前記記録媒体に前記シンボル画像を記録すること、
を特徴とする請求項1に記載の記録装置。
The parameter includes a value that specifies a recording size of the symbol image,
The error processing means detects an error when the recording size of the symbol image specified by the parameter exceeds the recordable area of the recording medium,
The recording control unit corrects the recording size of the symbol image to a size that fits in the recordable area, and records the symbol image on the recording medium;
The recording apparatus according to claim 1.
前記記録装置は、通常動作モードと開発モードとを切り替えて実行可能であり、
前記記録制御手段は、前記開発モードで前記エラー処理手段がエラーを検出した場合に、前記エラーの原因を示す情報を前記記録媒体に記録し、かつ、前記エラー処理手段により前記エラーとして検出された前記コマンドまたは前記パラメーター、前記データを、所定の規定された値、または所定の規定された範囲の値のいずれかに修正し、修正後の前記値に基づいて、前記記録媒体に所定の記録、または所定の動作をし、
前記通常動作モードで前記エラー処理手段がエラーを発生させた場合には、少なくとも前記記録機構による記録を中止させること、
を特徴とする請求項1に記載の記録装置。
The recording apparatus can be executed by switching between a normal operation mode and a development mode,
The recording control unit records information indicating the cause of the error on the recording medium when the error processing unit detects an error in the development mode, and is detected as the error by the error processing unit. The command or the parameter and the data are corrected to either a predetermined specified value or a predetermined specified range value, and based on the corrected value, predetermined recording on the recording medium, Or do the prescribed action,
If the error processing means generates an error in the normal operation mode, at least stop recording by the recording mechanism;
The recording apparatus according to claim 1.
前記コマンドに含まれる前記データを、前記記録機構で記録するために展開するバッファーメモリーを備え、
前記エラー処理手段は、前記記録制御手段が前記バッファーメモリーに前記データを展開する際に、前記データが、所定の規定された値、または所定の規定された範囲の値から外れているエラーかを検出すること、
を特徴とする請求項1または4のいずれかに記載の記録装置。
A buffer memory that expands the data included in the command to be recorded by the recording mechanism;
The error processing means determines whether the data is out of a predetermined prescribed value or a prescribed range of values when the recording control means develops the data in the buffer memory. Detecting,
The recording apparatus according to claim 1, wherein:
外部装置に接続可能であり、記録媒体に記録する記録機構を備えた記録装置を制御して、
前記外部装置から少なくともコマンドを受信し、
受信した前記コマンドに基づいて、前記記録機構により、前記記録媒体に所定の記録、または所定の動作をし、
前記コマンド、または、前記コマンドに含まれるもので、パラメーター若しくはデータのいずれかが、所定の規定された値、または所定の規定された範囲の値から外れているエラーかを検出し、
前記エラーの原因を示す情報を前記記録機構により前記記録媒体に記録し、
前記エラーが検出された前記コマンドまたは前記パラメーター、前記データを、所定の規定された値、または所定の規定された範囲の値のいずれかに修正し、修正後の前記値に基づいて、前記記録媒体に所定の記録、または所定の動作をすること、
を特徴とする記録装置の制御方法。
It can be connected to an external device and controls a recording device provided with a recording mechanism for recording on a recording medium,
Receiving at least a command from the external device;
Based on the received command, the recording mechanism performs a predetermined recording or a predetermined operation on the recording medium,
Detecting whether the command or any of the parameters or data included in the command is out of a prescribed value or a prescribed range of values,
Information indicating the cause of the error is recorded on the recording medium by the recording mechanism,
The command or the parameter in which the error is detected, and the data are corrected to a predetermined specified value or a value of a predetermined specified range, and the recording is performed based on the corrected value. Performing a predetermined recording or a predetermined operation on a medium,
A control method for a recording apparatus.
外部装置に接続可能であり、記録媒体に記録する記録機構と制御部を備えた記録装置を制御するプログラムであって、
前記制御部を、
外部装置から少なくともコマンドを受信する受信手段と、
前記コマンド、または、前記コマンドに含まれるもので、パラメーター若しくはデータのいずれかが、所定の規定された値、または所定の規定された範囲の値から外れているエラーかを検出するエラー処理手段と、
前記受信手段により受信した前記コマンドに基づいて、前記記録機構により、前記記録媒体に所定の記録、または所定の動作をし、
前記エラー処理手段が前記エラーを検出した場合には、前記エラーの原因を示す情報を前記記録機構により前記記録媒体に記録し、かつ、前記エラー処理手段により前記エラーとして検出された前記コマンドまたは前記パラメーター、前記データを、所定の規定された値、または所定の規定された範囲の値のいずれかに修正し、修正後の前記値に基づいて、前記記録媒体に所定の記録、または所定の動作をする記録制御手段と、
して機能させることを特徴とするプログラム。
A program that can be connected to an external device and that controls a recording device that includes a recording mechanism and a control unit for recording on a recording medium,
The control unit
Receiving means for receiving at least a command from an external device;
Error processing means for detecting whether the command or any of the parameters or data included in the command is out of a predetermined specified value or a predetermined specified range of values; ,
Based on the command received by the receiving means, the recording mechanism performs predetermined recording or predetermined operation on the recording medium,
When the error processing means detects the error, the information indicating the cause of the error is recorded on the recording medium by the recording mechanism, and the command detected as the error by the error processing means or the The parameter and the data are corrected to either a predetermined specified value or a predetermined specified range value, and based on the corrected value, predetermined recording or predetermined operation on the recording medium is performed. Recording control means for
A program characterized by making it function.
JP2010241407A 2010-10-27 2010-10-27 Recording apparatus, control method and program of the recording apparatus Pending JP2012091425A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010241407A JP2012091425A (en) 2010-10-27 2010-10-27 Recording apparatus, control method and program of the recording apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010241407A JP2012091425A (en) 2010-10-27 2010-10-27 Recording apparatus, control method and program of the recording apparatus

Publications (1)

Publication Number Publication Date
JP2012091425A true JP2012091425A (en) 2012-05-17

Family

ID=46385345

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010241407A Pending JP2012091425A (en) 2010-10-27 2010-10-27 Recording apparatus, control method and program of the recording apparatus

Country Status (1)

Country Link
JP (1) JP2012091425A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014168855A (en) * 2013-03-01 2014-09-18 Canon Inc Image formation apparatus, image formation method and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014168855A (en) * 2013-03-01 2014-09-18 Canon Inc Image formation apparatus, image formation method and program

Similar Documents

Publication Publication Date Title
JP6318747B2 (en) Printing system, printing control apparatus, and printing control method
JP6102604B2 (en) Printing apparatus and printing apparatus control method
JP2009075701A (en) Bar-code generation system, bar-code generation program, printer and test chart
JP5391956B2 (en) RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
JP5532848B2 (en) Recording control apparatus, control method, and program
US20150254479A1 (en) Printing Device, Printing System, and Control Method of a Printing Device
JP2012091425A (en) Recording apparatus, control method and program of the recording apparatus
JP2009066859A (en) Barcode generation system, barcode generation program, printing device, and test chart
JP6489258B2 (en) Printing system, printing control apparatus, and printing control method
JP2006281718A (en) Printing method of setting value, management method of setting value and printer
JP2016055595A (en) Printer and control method of the same
JP2011088373A (en) Recorder, control method for the same and program
JP5729446B2 (en) RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
JP5760375B2 (en) RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
CN113199876B (en) Printing apparatus and control method
JPH07228016A (en) Printer
JP2019006004A (en) Printer and printer system
JP2005306043A (en) Printer, print command generation device, and print system
JP2005254822A (en) Printer, printing command formation device and printing system
JPH07228015A (en) Printer
JP2012096420A (en) Recorder, control method for recorder, and program
JP3661785B2 (en) Serial recording device
JP2011084027A (en) Recording device, control method of recording device, and program
JP2006181977A (en) Printer and checking information printing method
JP2000355143A (en) Ink-jet recording apparatus and image forming device