JPH07309039A - Printer - Google Patents

Printer

Info

Publication number
JPH07309039A
JPH07309039A JP10393094A JP10393094A JPH07309039A JP H07309039 A JPH07309039 A JP H07309039A JP 10393094 A JP10393094 A JP 10393094A JP 10393094 A JP10393094 A JP 10393094A JP H07309039 A JPH07309039 A JP H07309039A
Authority
JP
Japan
Prior art keywords
continuous paper
print
count value
counter
paper
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
JP10393094A
Other languages
Japanese (ja)
Inventor
Kunihiko Aoba
久仁彦 青葉
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.)
TEC CORP
Original Assignee
TEC 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 TEC CORP filed Critical TEC CORP
Priority to JP10393094A priority Critical patent/JPH07309039A/en
Publication of JPH07309039A publication Critical patent/JPH07309039A/en
Pending legal-status Critical Current

Links

Landscapes

  • Handling Of Sheets (AREA)
  • Handling Of Continuous Sheets Of Paper (AREA)

Abstract

PURPOSE:To accurately set a printing start position by detecting the black mark printed on the rear surface of continuous paper and controlling the feed of the continuous paper on the basis of the count value based on the black mark. CONSTITUTION:When the black mark printed on the rear surface of continuous paper a is detected by a mark detection sensor 14, the count value corresponding to the distance from a thermal head 21 to the mark detection sensor 14 is set and subtracted corresponding to the feed of the continuous paper 1. When the home feed command from a host computer is received, the home feed operation of the continuous paper 1 is started and a counter is substrated and, when the count value becomes 0, the home feed operation is completed. By this constitution, regardless of the size of one continuous paper 1, the printing start position of one paper can be accurately set to the printing position of the thermal head 21.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、連続用紙上の印字開
始位置を位置決めして印字を行うプリンタに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a printer which prints by positioning a print start position on continuous paper.

【0002】[0002]

【従来の技術】従来、制御装置としてのホストコンピュ
ータと回線を介して接続され、このホストコンピュータ
から送信されるコマンド及び印字データにより印字を行
うプリンタが知られている。
2. Description of the Related Art Conventionally, a printer is known which is connected to a host computer as a control device via a line and prints by a command and print data transmitted from the host computer.

【0003】また、プリンタは、チケットや領収書等の
用紙が複数枚連なっている連続用紙に印字するものが知
られている。このような連続用紙には、例えば切取用の
ミシン目が、チケットの1枚分の長さの間隔( 1ピッチ
)で形成されている。
Further, a printer is known that prints on a continuous paper in which a plurality of papers such as tickets and receipts are continuous. For such continuous paper, for example, perforations for cutting are provided at intervals (one pitch) for the length of one ticket.
).

【0004】このような連続用紙に印字を行うプリンタ
では、連続用紙の1枚分の用紙において印字したライン
数を記録しておき、ホストコンピュータからホームフィ
ードコマンドを受信すると、残りのライン数分の距離だ
け連続用紙をフィードすることによって、この連続用紙
の次の1枚分の用紙の印字開始位置を位置決めしてい
た。
In such a printer for printing on continuous paper, the number of lines printed on one continuous paper is recorded, and when a home feed command is received from the host computer, the remaining number of lines is printed. By feeding the continuous paper by the distance, the print start position of the next sheet of the continuous paper is positioned.

【0005】例えば、1枚分の用紙に11ライン印字可
能であったときに、連続用紙の1枚分の用紙に4ライン
印字した時に、ホストコンピュータからホームフィード
コマンドを受信したとすると、連続用紙を残りの7ライ
ン分フィードして、4ライン印字した1枚分の用紙の次
の1枚分の用紙の印字開始位置を位置決めする。
For example, if 11 lines can be printed on one sheet of paper and a home feed command is received from the host computer when 4 lines are printed on one sheet of continuous paper, the continuous paper Is fed for the remaining 7 lines, and the print start position of the next 1 sheet of paper after printing 4 lines is positioned.

【0006】[0006]

【発明が解決しようとする課題】このような従来の方法
では、連続用紙の各1枚分の用紙の長さが正確ならば問
題はないが、用紙毎に用紙の長さにばらつきが生じてい
る場合には、そのばらつきが1枚の用紙としては無視で
きる程度の誤差でも、印字しているうちに累積され、1
枚分の用紙の印字開始位置が印字ヘッドによる印字位置
からずれて位置決めされてしまうという問題があった。
In such a conventional method, there is no problem if the length of each continuous sheet is accurate, but the length of the sheet varies from one sheet to another. In this case, even if the error is negligible for one sheet of paper, it is accumulated during printing and 1
There is a problem that the print start position of the sheets of paper is displaced from the print position of the print head.

【0007】また、使用する1枚分の用紙のサイズによ
って、1ラインの印字ピッチ量( あるいは1枚分の用紙
の長さ )を正確に算出して、この印字ピッチ量に基づい
て、ホームフィードするための1枚分の用紙の印字ライ
ン数を設定しないと、1枚分の用紙の印字開始位置を印
字ヘッドによる印字開始位置に正確に位置決めできない
という問題があった。
Further, the print pitch amount of one line (or the length of one sheet of paper) is accurately calculated according to the size of one sheet of paper to be used, and the home feed is calculated based on this print pitch amount. There is a problem that the print start position of one sheet cannot be accurately positioned at the print start position of the print head unless the number of print lines for one sheet of paper is set.

【0008】そこでこの発明は、1枚分の用紙のサイズ
に関係なく、1枚分の用紙の印字開始位置を印字ヘッド
の印字位置に正確に位置決めすることができるプリンタ
を提供することを目的とする。
Therefore, an object of the present invention is to provide a printer capable of accurately positioning the print start position of one sheet of paper at the print position of the print head regardless of the size of one sheet of paper. To do.

【0009】[0009]

【課題を解決するための手段】この発明は、制御装置と
回線を介して接続されていると共に、印字ヘッドを備
え、制御装置から送信されたコマンドに基づいて複数の
用紙が連続して形成されている連続用紙に印字ヘッドに
より印字を行うプリンタにおいて、連続用紙に形成され
たブラックマークを検出する反射形光学式センサと、こ
の反射形光学式センサによりブラックマークが検出され
たときに、反射形光学式センサによるブラックマークの
検出状態から連続用紙の次の印字開始位置を印字ヘッド
の印字位置に位置決めするのに必要な搬送距離に対応す
るカウント値をカウンタに設定すると共に検出フラグを
設定する検出処理手段と、制御装置から連続用紙の次の
印字開始位置の位置決めを命令するコマンドを前記回線
を介して受信すると、検出フラグが設定された状態で連
続用紙をカウンタのカウント値に対応する距離分搬送し
て、連続用紙の印字開始位置を印字ヘッドの印字位置に
位置決めする位置決め制御手段と、連続用紙の印字開始
位置が印字位置に位置決めされると検出フラグを解除す
るフラグ解除手段とを設けたものである。
According to the present invention, a plurality of sheets are continuously formed on the basis of a command transmitted from a control unit, which is connected to a control unit via a line and has a print head. In a printer that prints on continuous paper with a print head, a reflective optical sensor that detects black marks formed on continuous paper and a reflective optical sensor that detects black marks when the reflective optical sensor detects black marks Detection that sets the count value corresponding to the transport distance required to position the next print start position on the continuous paper to the print position of the print head from the black mark detection state by the optical sensor and sets the detection flag When a command instructing the positioning of the next print start position of continuous paper is received from the processing means and the control device via the line. Positioning control means that conveys continuous paper for a distance corresponding to the count value of the counter with the detection flag set, and positions the print start position of the continuous paper at the print position of the print head, and the print start position of the continuous paper. Is provided with a flag releasing means for releasing the detection flag when it is positioned at the printing position.

【0010】[0010]

【作用】このような構成の本発明において、制御装置か
ら回線を介して連続用紙の次の印字開始位置を位置決め
を命令するコマンドが受信されたとき、位置決め制御手
段により連続用紙の搬送が開始される。
In the present invention having such a structure, when the command for instructing the positioning of the next print start position of the continuous paper is received from the control device through the line, the positioning control means starts the conveyance of the continuous paper. It

【0011】このとき、反射形光学式センサによりブラ
ックマークがまだ検出されていなかった場合、検出フラ
グは設定されていない。
At this time, if the black mark has not yet been detected by the reflective optical sensor, the detection flag is not set.

【0012】やがて、反射形光学式センサによりブラッ
クマークが検出されると、連続用紙の次の印字開始位置
を印字ヘッドの印字位置に位置決めするのに必要な搬送
距離に対応したカウント値がカウンタに設定されると共
に検出フラグが設定される。
When a black mark is detected by the reflection type optical sensor, the count value corresponding to the transport distance required to position the next print start position of the continuous paper at the print position of the print head is displayed in the counter. The detection flag is set as well as set.

【0013】位置決め制御手段により、連続用紙は、カ
ウンタのカウント値に対応する距離分搬送され、連続用
紙の次の用紙の印字開始位置が印字ヘッドの印字位置に
位置決めされる。またこの時、フラグ解除手段により検
出フラグが解除される。
By the positioning control means, the continuous paper is conveyed by the distance corresponding to the count value of the counter, and the print start position of the next paper of the continuous paper is positioned at the print position of the print head. At this time, the detection flag is canceled by the flag canceling means.

【0014】また、ホームフィードコマンドが受信され
た時に、反射形光学式センサによりブラックマークがす
でに検出されていた場合、すでに検出フラグが設定され
ており、カウンタには連続用紙の次の印字開始位置を印
字ヘッドの印字位置に位置決めするのに必要な搬送距離
に対応したカウント値が設定される。
If a black mark has already been detected by the reflective optical sensor when the home feed command is received, the detection flag has already been set and the counter indicates the next print start position of the continuous paper. A count value corresponding to the transport distance required to position the print head at the print position of the print head is set.

【0015】位置決め制御手段により、連続用紙は、カ
ウンタのカウント値に対応する距離分搬送され、連続用
紙の次の用紙の印字開始位置が印字ヘッドの印字位置に
位置決めされる。またこの時、フラグ解除手段により検
出フラグが解除される。
By the positioning control means, the continuous paper is conveyed by the distance corresponding to the count value of the counter, and the print start position of the next paper of the continuous paper is positioned at the print position of the print head. At this time, the detection flag is canceled by the flag canceling means.

【0016】[0016]

【実施例】以下、この発明の一実施例を図面を参照して
説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.

【0017】この発明を適用したプリンタで使用する連
続用紙1は、図1( a )及び図1(b )に示すように、
ミシン目2aが1枚分の用紙の長さ間隔に形成されてい
るものがある。
The continuous paper 1 used in the printer to which the present invention is applied is, as shown in FIGS. 1 (a) and 1 (b),
Some perforations 2a are formed at intervals of the length of one sheet.

【0018】そして、この連続用紙1の裏面( 非印字面
)には、各1枚分の用紙の先端、すなわち、各ミシン目
2aに、ブラックマーク3a,3b,3c,…が印刷さ
れている。
The back surface of the continuous paper 1 (non-printed surface
), Black marks 3a, 3b, 3c, ... Are printed on the leading edge of each sheet of paper, that is, on each perforation 2a.

【0019】図2は、この発明を適用したプリンタの要
部回路構成を示すブロック図である。
FIG. 2 is a block diagram showing a circuit configuration of a main part of a printer to which the invention is applied.

【0020】11は制御部本体を構成するCPU(centr
al processing unit) である。
Reference numeral 11 designates a CPU (centr
al processing unit).

【0021】このCPU11が行う処理のプログラムデ
ータが記憶されたROM(read onlymemory)12、前記
CPU11が処理を行うときに使用する各種メモリのエ
リアが形成されたRAM(random access memory)13、
反射形光学式センサとしてのマーク検出センサ14から
出力されるアナログ電気信号をデジタルデータに変換す
るA/D( analogue/digital )変換器15、制御装置と
してのホストコンピュータとのデータの伝送制御を回線
を介して行うRS−232Cドライバ16は、それぞれ
システムバス17を介して前記CPU11と接続されて
いる。
A ROM (read only memory) 12 in which program data for processing performed by the CPU 11 is stored, a RAM (random access memory) 13 in which areas of various memories used when the CPU 11 performs processing are formed,
An analog / digital (A / D) converter 15 for converting an analog electric signal output from the mark detection sensor 14 as a reflection type optical sensor into digital data, and a data transmission control with a host computer as a control device are connected. The RS-232C driver 16 connected via the CPU is connected to the CPU 11 via the system bus 17, respectively.

【0022】前記マーク検出センサ14は、前記連続用
紙1の裏面に光を照射し、この連続用紙1の裏面からの
反射光を検出するものであり、この検出レベルに変化に
より、前記連続用紙1の裏面に印刷されたブラックマー
ク3a,3b,…が検出される。
The mark detection sensor 14 irradiates the back surface of the continuous paper 1 with light and detects the reflected light from the back surface of the continuous paper 1, and the continuous paper 1 changes depending on the detection level. The black marks 3a, 3b, ... Printed on the back surface of the are detected.

【0023】前記CPU11は前記システムバス17を
介してゲートアレイ18と接続され、このゲートアレイ
18には、前記連続用紙1を搬送させるローラやプラテ
ン等の回転機構( 図示せず )を回転駆動させるためのパ
ルスモータ19を駆動させるモータドライバ20、印字
ヘッドとしてのサーマルヘッド21、フィードキー2
2、LED(light emitting diode)23が接続されてい
る。
The CPU 11 is connected to the gate array 18 via the system bus 17, and the gate array 18 rotationally drives a rotating mechanism (not shown) such as a roller or a platen for conveying the continuous paper 1. Motor driver 20 for driving a pulse motor 19 for the purpose, a thermal head 21 as a print head, a feed key 2
2. An LED (light emitting diode) 23 is connected.

【0024】前記RAM13には、ホストコンピュータ
から送信された印字データを描画(ドット展開する )た
めのイメージバッファ24、センサ検知フラグ25、カ
ウンタ26が形成されている。
The RAM 13 is provided with an image buffer 24 for drawing (developing dots) the print data transmitted from the host computer, a sensor detection flag 25, and a counter 26.

【0025】図3は、前記CPU11が行うメイン処理
の流れを示す図である。
FIG. 3 is a diagram showing a flow of main processing performed by the CPU 11.

【0026】まず、ステップ1( ST1 )の処理とし
て、RAM13にホストコンピュータから送信された未
処理の印字データが有るか否かを判断する。
First, as step 1 (ST1) processing, it is determined whether or not there is unprocessed print data transmitted from the host computer to the RAM 13.

【0027】未処理の印字データが有れば、印字データ
をイメージバッファ24に描画して割込起動中か否かを
判断する。割込起動中であれば、再び前述のステップ1
の処理に戻るようになっており、割込起動中でなけれ
ば、割込みを起動させて、再び前述のステップ1の処理
に戻るようになっている。
If there is unprocessed print data, the print data is drawn in the image buffer 24 and it is determined whether or not the interrupt is being activated. If the interrupt is being activated, the above step 1 is performed again.
If the interrupt is not being activated, an interrupt is activated and the process returns to step 1 again.

【0028】また、前述のステップ1の処理で、未処理
の印字データがなければ、RAM13に未処理のコマン
ドがあるか否かを判断する。未処理のコマンドがなけれ
ば、再び前述のステップ1の処理に戻るようになってお
り、未処理のコマンドがあれば、そのコマンドがホーム
フィードコマンドか否かを判断する。ホームフィードコ
マンドでなければ、他のコマンド処理を行い、この他の
コマンド処理を終了すると、再び前述のステップ1の処
理に戻るようになっている。
If there is no unprocessed print data in the above-mentioned step 1, it is judged whether or not there is an unprocessed command in the RAM 13. If there is no unprocessed command, the process returns to the above-mentioned step 1 again, and if there is an unprocessed command, it is determined whether or not the command is a home feed command. If it is not a home feed command, another command process is performed, and when this other command process is completed, the process returns to the above-mentioned step 1 again.

【0029】また、RAM13の未処理のコマンドがホ
ームフィードコマンドならば、ホームフィードコマンド
をセットして、割込みが終了するまでの待機状態とな
る。この待機状態中に割込みがあると、その割込みを優
先して実行し、その割込みが終了すると、この待機状態
が解除される。
If the unprocessed command in the RAM 13 is a home feed command, the home feed command is set and a standby state is set until the interruption ends. If there is an interrupt in the waiting state, the interrupt is given priority and executed, and when the interrupt ends, the waiting state is released.

【0030】割込みが終了すると、再び前述のステップ
1の処理に戻るようになっている。
When the interruption ends, the process returns to the above-mentioned step 1 again.

【0031】図4は、前記CPU11が行う割込処理の
流れを示す図である。
FIG. 4 is a diagram showing the flow of the interrupt processing performed by the CPU 11.

【0032】まず、パルスモータ19を1パルス回転さ
せて、連続用紙1を1ステップ搬送し、ステップ2( S
T2 )の処理として、イメージバッファ24にまだ印字
のために出力されていない未処理の描画データがあるか
否かを判断する。
First, the pulse motor 19 is rotated by one pulse to convey the continuous paper 1 by one step, and then the step 2 (S
As the processing of T2), it is determined whether or not there is unprocessed drawing data in the image buffer 24 that has not been output for printing.

【0033】ここで、未処理の描画データが有れば、1
ライン分のイメージデータをゲートアレイ18を介して
サーマルヘッド21にセットし、イネーブル信号をON
させて、1ライン分の印字を実行させる。
If there is unprocessed drawing data, 1
Image data for a line is set in the thermal head 21 via the gate array 18, and the enable signal is turned on.
Then, printing for one line is executed.

【0034】次に、マーク検出センサ14によりブラッ
クマークが検出( 検知 )されたか否かを判断する。ここ
で、ブラックマークが検出されたならば、カウンタ26
にマーク検出センサ14からサーマルヘッド21までの
距離( センサ検出位置から印字位置までの距離 )に対応
するカウント値240を設定し、センサ検知フラグ25
にONを示すデータを設定し( 検出処理手段 )、次の割
込みをセットして、この割込処理を終了するようになっ
ている。
Next, it is determined whether or not the black mark has been detected (detected) by the mark detection sensor 14. Here, if a black mark is detected, the counter 26
Is set to a count value 240 corresponding to the distance from the mark detection sensor 14 to the thermal head 21 (the distance from the sensor detection position to the print position), and the sensor detection flag 25
Data indicating ON is set in (detection processing means), the next interrupt is set, and this interrupt processing is ended.

【0035】また、マーク検出センサ14によりブラッ
クマークが検出されなければ、カウンタ26のカウント
値に対して−1の減算処理を行い( 減算手段 )、カウン
タ26のカウント値が0か否かを判断する。ここで、カ
ウンタ26のカウント値が0でなければ、次の割込みを
セットして、この割込処理を終了するようになってい
る。また、カウンタ26のカウント値が0であれば、セ
ンサ検知フラグ25にOFFを示すデータを設定してか
ら( フラグ解除手段 )、次の割込みをセットして、この
割込処理を終了するようになっている。
If the black mark is not detected by the mark detecting sensor 14, the count value of the counter 26 is subtracted by -1 (subtracting means) to determine whether the count value of the counter 26 is 0 or not. To do. Here, if the count value of the counter 26 is not 0, the next interrupt is set and the interrupt process is ended. If the count value of the counter 26 is 0, data indicating OFF is set in the sensor detection flag 25 (flag canceling means), then the next interrupt is set, and this interrupt processing is ended. Has become.

【0036】前述したステップ2の処理で、イメージバ
ッファ24に未処理の描画データがなければ、RAM1
3に未処理のホームフィードコマンドが有るか否かを判
断し、未処理のホームフィードコマンドがなければ、搬
送( 印字 )停止の制御を行い、この割込処理を終了する
ようになっている。
If there is no unprocessed drawing data in the image buffer 24 in the process of step 2 described above, the RAM 1
It is determined whether or not there is an unprocessed home feed command in No. 3, and if there is no unprocessed home feed command, the conveyance (printing) stop control is performed and this interrupt processing is ended.

【0037】また、ホームフィードコマンドが有れば、
ステップ3( ST3 )の処理として、センサ検知フラグ
25にONを示すデータが設定されているか否かを判断
する。
If there is a home feed command,
As the processing of step 3 (ST3), it is determined whether or not the data indicating ON is set in the sensor detection flag 25.

【0038】ここで、センサ検知フラグ25にONを示
すデータが設定されていれば、カウンタ26のカウント
値に対して−1の減算処理を行い( 減算手段 )、カウン
タ26のカウント値が0か否かを判断する。ここで、カ
ウンタ26のカウント値が0であれば、センサ検知フラ
グ25にOFFを示すデータを設定し( フラグ解除手段
)、搬送( 印字 )停止の制御を行い( 位置決め制御手段
)、この割込処理を終了するようになっている。また、
カウンタ26のカウント値が0でなければ、次の割込み
をセットして、この割込処理を終了するようになってい
る。
If data indicating ON is set in the sensor detection flag 25, subtraction processing of -1 is performed on the count value of the counter 26 (subtraction means) to determine whether the count value of the counter 26 is 0 or not. Determine whether or not. Here, if the count value of the counter 26 is 0, data indicating OFF is set in the sensor detection flag 25 (flag releasing means
), And control the conveyance (printing) stop (positioning control means
), The interrupt process is completed. Also,
If the count value of the counter 26 is not 0, the next interrupt is set and this interrupt processing is ended.

【0039】前述したステップ3の処理で、センサ検知
フラグ25にONを示すデータが設定されていなけれ
ば、マーク検出センサ14によりブラックマークが検出
( 検知)されたか否かを判断する。ここで、ブラックマ
ークが検出されなければ、次の割込みをセットして、こ
の割込処理を終了するようになっている。
In the process of step 3 described above, if no data indicating ON is set in the sensor detection flag 25, a black mark is detected by the mark detection sensor 14.
Judge whether (detected) or not. If no black mark is detected, the next interrupt is set and the interrupt process is terminated.

【0040】また、センサ検出センサ14によりブラッ
クマークが検出されたならば、カウンタ26にマーク検
出センサ14からサーマルヘッド21までの距離に対応
するカウント値240を設定し( 検出処理手段 )、セン
サ検知フラグ25にONを示すデータを設定し、次の割
込みをセットして、この割込処理を終了するようになっ
ている。
When the sensor detection sensor 14 detects a black mark, the counter 26 is set with a count value 240 corresponding to the distance from the mark detection sensor 14 to the thermal head 21 (detection processing means), and the sensor detection is performed. Data indicating ON is set in the flag 25, the next interrupt is set, and this interrupt processing is ended.

【0041】なお、前記マーク検出センサ14と前記サ
ーマルヘッド21との概略の位置関係を図5に示す。す
なわち、前記サーマルヘッド21に対向してプラテン3
1が配置され、前記連続用紙1が前記サーマルヘッド2
1の印字位置まで搬送され、このサーマルヘッド21と
前記プラテン31との間に介挿されるようになってい
る。
The schematic positional relationship between the mark detection sensor 14 and the thermal head 21 is shown in FIG. That is, the platen 3 is opposed to the thermal head 21.
1 is arranged and the continuous paper 1 is the thermal head 2
1 is conveyed to the printing position and is inserted between the thermal head 21 and the platen 31.

【0042】前記連続用紙1の前記サーマルヘッド21
への搬送路には、前記マーク検出センサ14が配置さ
れ、搬送路を搬送される前記連続用紙1の裏面に印刷さ
れたブラックマークを検出する。
The thermal head 21 of the continuous paper 1
The mark detection sensor 14 is arranged on the conveyance path to, and detects the black mark printed on the back surface of the continuous paper 1 conveyed on the conveyance path.

【0043】このマーク検出センサ14によるブラック
マーク検出位置から前記サーマルヘッド21による印字
位置までの距離HSは、30mmに設計されている。な
お、前記連続用紙1のブラックマーク間距離( ブラック
マークピッチ )MPは、80mmである。
The distance HS from the black mark detection position by the mark detection sensor 14 to the print position by the thermal head 21 is designed to be 30 mm. The distance between black marks (black mark pitch) MP of the continuous paper 1 is 80 mm.

【0044】このような構成の本実施例においては、割
込処理により、マーク検出センサ14により、連続用紙
1の裏面に印刷されたブラックマークが検出されると、
カウンタ26にマーク検出センサ14からサーマルヘッ
ド21までの距離30mmに対応するカウント値240
が設定される。
In the present embodiment having such a structure, when the black mark printed on the back surface of the continuous paper 1 is detected by the mark detection sensor 14 by the interrupt processing,
The counter 26 has a count value 240 corresponding to a distance of 30 mm from the mark detection sensor 14 to the thermal head 21.
Is set.

【0045】この実施例の連続用紙1では、ブラックマ
ークの印刷位置は、連続用紙1の各1枚分の用紙間の境
界( ミシン目2a )近傍に設けられているので、ブラッ
クマークがサーマルヘッド21の印字位置にブラックマ
ークが位置すると、連続用紙1の位置決めが完了したこ
とになる。従って、カウンタ26には、ちょうどマーク
検出センサ14からサーマルヘッド21までの距離30
mmに対応するカウント値( 240 )が設定されること
になる。
In the continuous paper 1 of this embodiment, since the black mark printing position is provided in the vicinity of the boundary (perforation 2a) between the sheets of continuous paper 1, the black mark is printed in the thermal head. When the black mark is located at the print position of 21, the positioning of the continuous paper 1 is completed. Therefore, the counter 26 is exactly the distance 30 from the mark detection sensor 14 to the thermal head 21.
The count value (240) corresponding to mm will be set.

【0046】ブラックマークが連続用紙の各1枚分の用
紙間の境界近傍にない連続用紙の場合には、マーク検出
センサ14からサーマルヘッド21までの距離に対して
1枚分の用紙の印字開始位置( 例えば1枚分の用紙間の
境界 )からブラックマークまでの距離を加減算した距離
に対応するカウント値240が設定される。
In the case of continuous paper in which the black mark is not in the vicinity of the boundary between the sheets of continuous paper, printing of one sheet is started with respect to the distance from the mark detection sensor 14 to the thermal head 21. A count value 240 corresponding to the distance obtained by adding or subtracting the distance from the position (for example, the boundary between one sheet of paper) to the black mark is set.

【0047】このカウンタ26のカウント値は、印字時
及びフィード時に、連続用紙1の搬送に伴って、すなわ
ちパルスモータ19の1パルス駆動毎に、−1の減算処
理が行われる。
The count value of the counter 26 is subtracted by -1 at the time of printing and feeding, as the continuous paper 1 is conveyed, that is, every time the pulse motor 19 is driven by one pulse.

【0048】そして、ホストコンピュータから送信され
たホームフィードコマンドが受信されると、連続用紙1
の搬送を行って、カウンタ26のカウント値が0になる
と、次の割込みのセットが行われず、連続用紙1の搬送
を停止するようになっている。
When the home feed command transmitted from the host computer is received, the continuous paper 1
When the count value of the counter 26 becomes 0 after the conveyance of No. 2, the next interruption is not set and the conveyance of the continuous paper 1 is stopped.

【0049】例えば、図5( b )に示すような状態の
時、すなわち連続用紙1の次の用紙のブラックマーク3
bが、マーク検出センサ14により検出される前にホー
ムフィードコマンドが受信されると、カウンタ26には
カウント値が設定されないまま、連続用紙1が搬送され
る。図5( c )に示すように、マーク検出センサ14に
よりブラックマーク3bが検出されると、カウンタ26
には、サーマルヘッド21からマーク検出センサ14ま
での距離HS( 30mm )に対応したカウント値240
が設定され、連続用紙1のホームフィード動作が開始さ
れる( 次の割込みをセットすることによりホームフィー
ド動作が実行される。 )。
For example, in the state as shown in FIG. 5B, that is, the black mark 3 on the next sheet of the continuous sheet 1.
When the home feed command is received before b is detected by the mark detection sensor 14, the continuous paper 1 is conveyed without the count value being set in the counter 26. As shown in FIG. 5C, when the black mark 3b is detected by the mark detection sensor 14, the counter 26
Is a count value 240 corresponding to the distance HS (30 mm) from the thermal head 21 to the mark detection sensor 14.
Is set, and the home feed operation of continuous paper 1 is started (the home feed operation is executed by setting the next interrupt).

【0050】このホームフィードにおいて、カウンタ2
6のカウント値に対して、パルスモータ19の1パルス
駆動による連続用紙1の1ステップ搬送毎に−1の減算
処理が行われる。
In this home feed, the counter 2
With respect to the count value of 6, the subtraction processing of -1 is performed every one step conveyance of the continuous paper 1 by the one pulse drive of the pulse motor 19.

【0051】そして、カウンタ26のカウント値が0に
なると、連続用紙1の搬送が停止され、図5( d )に示
すように、ブラックマーク3bの近傍の1枚分の用紙の
近傍の印字開始位置が、サーマルヘッド21の印字位置
に位置決めされる。
When the count value of the counter 26 becomes 0, the conveyance of the continuous paper 1 is stopped, and as shown in FIG. 5 (d), the printing of the vicinity of one sheet of paper near the black mark 3b is started. The position is set to the print position of the thermal head 21.

【0052】また、図6( a )に示すように、連続用紙
1の次の用紙のブラックマーク3bが、マーク検出セン
サ14により検出されると、ホームフィードコマンドの
受信にかかわらず、カウンタ26にはカウント値240
が設定され、以降、パルスモータ19の1パルス駆動に
よる連続用紙1の1ステップ搬送毎に−1の減算処理が
行われる。
Further, as shown in FIG. 6 (a), when the black mark 3b on the next sheet of the continuous sheet 1 is detected by the mark detection sensor 14, the counter 26 is displayed regardless of the reception of the home feed command. Is the count value 240
Is set, and thereafter, a subtraction process of -1 is performed for each one-step conveyance of the continuous paper 1 by the one-pulse drive of the pulse motor 19.

【0053】この後、図6( b )に示すような状態の時
に、ホームフィードコマンドが受信されると、連続用紙
1のホームフィード動作が開始される。
After that, when the home feed command is received in the state as shown in FIG. 6 (b), the home feed operation of the continuous paper 1 is started.

【0054】そして、カウンタ26のカウント値が0に
なると、連続用紙1の搬送が停止され、図6( c )に示
すように、ブラックマーク3bの近傍の1枚分の用紙の
近傍の印字開始位置が、サーマルヘッド21の印字位置
に位置決めされる。
Then, when the count value of the counter 26 becomes 0, the conveyance of the continuous paper 1 is stopped, and as shown in FIG. 6 (c), the printing in the vicinity of one sheet of paper near the black mark 3b is started. The position is set to the print position of the thermal head 21.

【0055】このように本実施例によれば、連続用紙1
の裏面に印刷されたブラックマークを検出するマーク検
出センサ14と、このマーク検出センサ14によりブラ
ックマークが検出されるとサーマルヘッド21からマー
ク検出センサ14までの距離に対応したカウント値が設
定され、連続用紙1の搬送に応じてカウント値を減算さ
れるカウンタ26と、マーク検出センサ14によりブラ
ックマークが検出されるとONされ、カウンタ26のカ
ウント値が0になるとOFFされるセンサ検知フラグ2
5とを設け、ホストコンピュータからのホームフィード
コマンドが受信されると、連続用紙1のホームフィード
動作を開始し、センサ検知フラグがON状態でカウンタ
26のカウント値が0になるとホームフィード動作を終
了することにより、連続用紙1の1枚分の用紙のサイズ
に関係なく、各1枚分の用紙の印字開始位置をサーマル
ヘッド21の印字位置に正確に位置決めすることができ
る。
As described above, according to this embodiment, the continuous paper 1
A mark detecting sensor 14 for detecting a black mark printed on the back surface of the sheet, and a count value corresponding to the distance from the thermal head 21 to the mark detecting sensor 14 when the black mark is detected by the mark detecting sensor 14, A counter 26 whose count value is subtracted according to the conveyance of the continuous paper 1, and a sensor detection flag 2 which is turned on when a black mark is detected by the mark detection sensor 14 and is turned off when the count value of the counter 26 becomes 0.
5, the home feed operation of the continuous paper 1 is started when the home feed command is received from the host computer, and the home feed operation is ended when the count value of the counter 26 becomes 0 when the sensor detection flag is ON. By doing so, the print start position of each sheet of the continuous paper 1 can be accurately positioned at the print position of the thermal head 21 regardless of the size of the sheet of continuous paper 1.

【0056】[0056]

【発明の効果】以上詳述したようにこの発明によれば、
1枚分の用紙のサイズに関係なく、連続用紙の裏面に印
刷されたブラックマークを検出し、カウンタに位置決め
に必要な搬送距離に対応したカウント値を設定するとと
もに検出フラグを設定し、このカウント値に基づいて連
続用紙の搬送を制御することにより、1枚分の用紙の印
字開始位置を印字ヘッドの印字位置に正確に位置決めす
ることができるプリンタを提供できる。
As described above in detail, according to the present invention,
Regardless of the size of one sheet of paper, the black mark printed on the back side of continuous paper is detected, the count value corresponding to the transport distance required for positioning is set in the counter, and the detection flag is set. It is possible to provide a printer capable of accurately positioning the print start position of one sheet of paper at the print position of the print head by controlling the transport of continuous paper based on the value.

【図面の簡単な説明】[Brief description of drawings]

【図1】この発明の一実施例のプリンタで使用する連続
用紙を示す図。
FIG. 1 is a diagram illustrating continuous paper used in a printer according to an embodiment of the present invention.

【図2】同実施例のプリンタの要部回路構成を示すブロ
ック図。
FIG. 2 is a block diagram showing a circuit configuration of essential parts of the printer of the embodiment.

【図3】同実施例のプリンタが行うメイン処理の流れを
示す図。
FIG. 3 is a diagram showing a flow of main processing performed by the printer of the embodiment.

【図4】同実施例のプリンタが行う割込処理の流れを示
す図。
FIG. 4 is a diagram showing a flow of interrupt processing performed by the printer of the embodiment.

【図5】同実施例のプリンタでマーク検出センサによる
ブラックマークを検出する前に、ホームフィードコマン
ドを受信したときのホームフィード動作を示す図。
FIG. 5 is a diagram showing a home feed operation when a home feed command is received before the black mark is detected by the mark detection sensor in the printer of the embodiment.

【図6】同実施例のプリンタですでにマーク検出センサ
によるブラックマークを検出した後で、ホームフィード
コマンドを受信したときのホームフィード動作を示す
図。
FIG. 6 is a diagram showing a home feed operation when a home feed command is received after the printer of the embodiment has already detected a black mark by a mark detection sensor.

【符号の説明】[Explanation of symbols]

1…連続用紙、 3a,3b,3c,…ブラックマーク、 11…CPU、 14…マーク検出センサ、 19…パルスモータ、 21…サーマルヘッド、 25…センサ検知フラグ、 26…カウンタ。 1 ... Continuous paper, 3a, 3b, 3c, ... Black mark, 11 ... CPU, 14 ... Mark detection sensor, 19 ... Pulse motor, 21 ... Thermal head, 25 ... Sensor detection flag, 26 ... Counter.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 制御装置と回線を介して接続されている
と共に、印字ヘッドを備え、前記制御装置から送信され
たコマンドに基づいて複数の用紙が連続して形成されて
いる連続用紙に前記印字ヘッドにより印字を行うプリン
タにおいて、前記連続用紙に形成されたブラックマーク
を検出する反射形光学式センサと、この反射形光学式セ
ンサにより前記ブラックマークが検出されたときに、前
記反射形光学式センサによる前記ブラックマークの検出
状態から前記連続用紙の次の印字開始位置を前記印字ヘ
ッドの印字位置に位置決めするのに必要な搬送距離に対
応するカウント値をカウンタに設定すると共に検出フラ
グを設定する検出処理手段と、前記制御装置から前記連
続用紙の次の印字開始位置の位置決めを命令するコマン
ドを前記回線を介して受信すると、前記検出フラグが設
定された状態で前記連続用紙を前記カウンタのカウント
値に対応する前記距離分搬送して、前記連続用紙の印字
開始位置を前記印字ヘッドの印字位置に位置決めする位
置決め制御手段と、前記連続用紙の印字開始位置が前記
印字位置に位置決めされると前記検出フラグを解除する
フラグ解除手段とを設けたことを特徴とするプリンタ。
1. The printing is performed on continuous paper, which is connected to a control device via a line, has a print head, and is formed by continuously forming a plurality of papers based on a command transmitted from the control device. In a printer that prints with a head, a reflective optical sensor that detects a black mark formed on the continuous paper, and the reflective optical sensor when the black mark is detected by the reflective optical sensor Detection by setting the count value corresponding to the transport distance required to position the next print start position of the continuous paper to the print position of the print head from the detection state of the black mark by the counter and setting the detection flag A command for instructing the positioning of the next print start position of the continuous paper from the processing means and the control device via the line. When the reception flag is received, the continuous paper is conveyed by the distance corresponding to the count value of the counter with the detection flag set, and the print start position of the continuous paper is positioned at the print position of the print head. A printer provided with a control means and a flag releasing means for releasing the detection flag when the print start position of the continuous paper is positioned at the print position.
JP10393094A 1994-05-18 1994-05-18 Printer Pending JPH07309039A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10393094A JPH07309039A (en) 1994-05-18 1994-05-18 Printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10393094A JPH07309039A (en) 1994-05-18 1994-05-18 Printer

Publications (1)

Publication Number Publication Date
JPH07309039A true JPH07309039A (en) 1995-11-28

Family

ID=14367156

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10393094A Pending JPH07309039A (en) 1994-05-18 1994-05-18 Printer

Country Status (1)

Country Link
JP (1) JPH07309039A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003048349A (en) * 2001-08-08 2003-02-18 Sato Corp Printer
JP2007090677A (en) * 2005-09-29 2007-04-12 Toshiba Tec Corp Printing starting location setting method
JP2013212583A (en) * 2012-03-30 2013-10-17 Brother Industries Ltd Printing apparatus
JP2019209604A (en) * 2018-06-05 2019-12-12 日本金銭機械株式会社 Printer
CN115302959A (en) * 2022-08-05 2022-11-08 上海商米科技集团股份有限公司 Black label paper printing method and printer based on multi-path sensor

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003048349A (en) * 2001-08-08 2003-02-18 Sato Corp Printer
JP4705278B2 (en) * 2001-08-08 2011-06-22 株式会社サトー Printing device
JP2007090677A (en) * 2005-09-29 2007-04-12 Toshiba Tec Corp Printing starting location setting method
JP2013212583A (en) * 2012-03-30 2013-10-17 Brother Industries Ltd Printing apparatus
CN103358716A (en) * 2012-03-30 2013-10-23 兄弟工业株式会社 Printer
US8780405B2 (en) 2012-03-30 2014-07-15 Brother Kogyo Kabushiki Kaisha Printer and non-transitory computer-readable storage medium storing printing control program
JP2019209604A (en) * 2018-06-05 2019-12-12 日本金銭機械株式会社 Printer
CN115302959A (en) * 2022-08-05 2022-11-08 上海商米科技集团股份有限公司 Black label paper printing method and printer based on multi-path sensor
CN115302959B (en) * 2022-08-05 2024-03-08 上海商米科技集团股份有限公司 Black label printing method and printer based on multiple sensors

Similar Documents

Publication Publication Date Title
JP2633726B2 (en) Barcode label printer
JPH07309039A (en) Printer
JP3630715B2 (en) Printer
EP0699608B1 (en) Sheet conveyor
US5150977A (en) Recording apparatus with detector for paper edge and end of ribbon sensing
JP2007090677A (en) Printing starting location setting method
JPH06286239A (en) Method for processing of label printing in label printer
JP2007136949A (en) Image forming apparatus equipped with paper skewing judging means
JP4143001B2 (en) Label continuum and printer
JP4328194B2 (en) Printing device
JPH09109425A (en) Printer and recording paper used therein
JP2899456B2 (en) Label printer
JP4611164B2 (en) Printer and print control method
JPH0422668A (en) Printer fitted with paper width detector
US5450164A (en) Electrophotographic imaging device with marking function
US11775232B2 (en) Printer and printing system for reprinting low quality image and marking discard images
JPH04347670A (en) Label printer
JPH01218865A (en) Printer
JP3883821B2 (en) Printer
JP2005178093A (en) Printer, recording paper information reading method, detection method of remaining amount of recording paper and recording paper roll
JP3815711B2 (en) Printer
JP2641952B2 (en) Label printer
JPH08112953A (en) Printer
JPH07285248A (en) Paper end surface position detecting method of serial printer
JPH04329168A (en) Label printer