JP2001270143A - Line printer - Google Patents

Line printer

Info

Publication number
JP2001270143A
JP2001270143A JP2000085334A JP2000085334A JP2001270143A JP 2001270143 A JP2001270143 A JP 2001270143A JP 2000085334 A JP2000085334 A JP 2000085334A JP 2000085334 A JP2000085334 A JP 2000085334A JP 2001270143 A JP2001270143 A JP 2001270143A
Authority
JP
Japan
Prior art keywords
print
data
dot
line
dots
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
JP2000085334A
Other languages
Japanese (ja)
Inventor
Shigeaki Suzuki
茂晃 鈴木
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.)
Toshiba TEC Corp
Original Assignee
Toshiba 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 Toshiba TEC Corp filed Critical Toshiba TEC Corp
Priority to JP2000085334A priority Critical patent/JP2001270143A/en
Publication of JP2001270143A publication Critical patent/JP2001270143A/en
Pending legal-status Critical Current

Links

Landscapes

  • Electronic Switches (AREA)

Abstract

PROBLEM TO BE SOLVED: To normally print a bar code or the like even when a line head has a defective dot. SOLUTION: An operating condition of each of dot elements forming a line head is checked by each element and information about an operable or inoperable condition of each dot element is stored in a memory. When print data is inputted, it is checked whether or not each of dots to be printed in the print data is positioned on the dot element in the inoperable condition. When a dot to be printed is in a position of the dot element in the inoperable condition, the print data is shifted in a direction of the line to the extent that the dots to be printed are out of the position of the dot element in the inoperable condition. The print data which is shifted in the direction of the line is outputted to the line head to print on a print medium.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、バーコード等を印
字するラインプリンタに関する。
The present invention relates to a line printer for printing bar codes and the like.

【0002】[0002]

【従来の技術】ラインプリンタ,例えばサーマルライン
プリンタは、印字データの1ドットの対応した発熱素子
を複数個、印字媒体のライン方向に1列に配列してなる
サーマルラインヘッドを備え、このサーマルラインヘッ
ドの各発熱素子を選択的に通電して発熱させるととも
に、このサーマルラインヘッドに対して印字媒体を前記
ライン方向とは直交する方向に順次フィードさせて、前
記印字媒体に印字を行うものである。
2. Description of the Related Art A line printer, for example, a thermal line printer includes a thermal line head in which a plurality of heating elements corresponding to one dot of print data are arranged in a line in a line direction of a print medium. Each heating element of the head is selectively energized to generate heat, and a printing medium is sequentially fed to the thermal line head in a direction orthogonal to the line direction to print on the printing medium. .

【0003】より詳しくは、ドット展開された印字デー
タを1ラインずつ取込み、その都度、その1ラインデー
タの印字ドットに対応する発熱素子を通電して発熱させ
る。発熱素子が発熱すると、その発熱素子と相対する媒
体面にドットが印字される。このドットの集合により、
文字,記号等が形成される。
More specifically, print data obtained by developing dots is fetched line by line, and each time, a heating element corresponding to a print dot of the one line data is energized to generate heat. When the heating element generates heat, dots are printed on the medium surface facing the heating element. With this set of dots,
Characters, symbols, etc. are formed.

【0004】したがって、サーマルラインヘッドを構成
する発熱素子の1つが壊れて発熱しなくなると、その壊
れた発熱素子と相対する媒体面にはドットが決して印字
されなくなる。このような状態をドット抜けと称してお
り、ドット抜けが発生すると正常な印字を行えなくな
る。
Therefore, if one of the heat generating elements constituting the thermal line head is broken and no longer generates heat, dots will never be printed on the medium surface facing the broken heat generating element. Such a state is referred to as a missing dot. If a missing dot occurs, normal printing cannot be performed.

【0005】特に、印字媒体のライン方向に白黒のバー
が交互に並べられるバーコードを印字するラインプリン
タにおいて、黒バーの印字位置に相対する発熱素子が壊
れてドット抜けが発生すると、その発熱素子に相対する
部分が結果的に白バーとなるため、バーコードの情報が
別の意味合いを持つ情報に変化してしまう。このため従
来は、ラインヘッドにドット抜けが1箇所でも発生する
とラインヘッドを交換しており、その分の経費がかかっ
ていた。
In particular, in a line printer that prints a bar code in which black and white bars are alternately arranged in the line direction of a print medium, if a heating element corresponding to a printing position of a black bar is broken and dot missing occurs, the heating element As a result, the portion corresponding to the white bar becomes a white bar, so that the barcode information changes to information having another meaning. For this reason, in the related art, if even one dot dropout occurs in the line head, the line head is replaced, which costs much.

【0006】[0006]

【発明が解決しようとする課題】このように、従来のラ
インプリンタにおいては、ドット素子の不良によりドッ
ト抜けが発生したラインヘッドでは正常な印字を行うこ
とができなくなり、印字品質を確保するためにはライン
ヘッドを交換しなければならないので経費がかかるとい
う問題があった。
As described above, in the conventional line printer, it is impossible to perform normal printing with a line head in which dot missing has occurred due to defective dot elements. However, there is a problem that it is expensive because the line head has to be replaced.

【0007】本発明はこのような事情に基づいてなされ
たもので、その目的とするところは、ラインヘッドにド
ット抜けが発生しても正常な印字を行うことができるラ
インプリンタを提供しようとするものである。
The present invention has been made in view of such circumstances, and it is an object of the present invention to provide a line printer which can perform normal printing even if a dot dropout occurs in a line head. Things.

【0008】[0008]

【課題を解決するための手段】本願請求項1記載の発明
は、複数のドット素子を印字媒体のライン方向に配列し
てなるラインヘッドに対し、印字媒体をライン方向とは
直交する方向にフィードさせて印字媒体に印字を行うラ
インプリンタにおいて、ラインヘッドを構成する各ドッ
ト素子の動作状態を1素子ずつチェックしてドット素子
毎に動作可または動作不可の情報を記憶するヘッドチェ
ック手段と、印字媒体に印字する印字データが入力され
るとその印字データの印字ドットがラインヘッドの動作
不可状態にあるドット素子の位置にあるか否かをチェッ
クするデータチェック手段と、このデータチェック手段
により印字データの印字ドットが全てラインヘッドの動
作可状態にあるドット素子の位置にあると判定されたと
き、印字データをラインヘッドに出力して印字媒体に印
字させる正常印字制御手段と、データチェック手段によ
り印字データの印字ドットがラインヘッドの動作不可状
態にあるドット素子の位置にあると判定されたとき、印
字データを印字ドットが動作不可状態にあるドット素子
の位置から外れるまでライン方向にシフトさせる印字デ
ータシフト手段と、この印字データシフト手段によりラ
イン方向にシフトされた印字データをラインヘッドに出
力して印字媒体に印字させるシフト印字制御手段とを備
えたものである。このような構成により、印字データの
印字ドットがラインヘッドの動作不可状態にあるドット
素子の位置にあった場合には、印字ドットが動作不可状
態にあるドット素子の位置から外れるまで印字データが
ライン方向にシフトされる。したがって、ラインヘッド
にドット抜けが発生しても、印字データの印字ドット
は、全てラインヘッドの動作可状態にあるドット素子に
よって印字されるようになる。
According to the first aspect of the present invention, a printing medium is fed in a direction perpendicular to the line direction to a line head having a plurality of dot elements arranged in the line direction of the printing medium. In a line printer that prints on a print medium by performing printing, a head check unit that checks the operating state of each dot element constituting the line head one element at a time and stores information indicating whether or not operation is possible for each dot element, and printing. When print data to be printed on a medium is input, data check means for checking whether or not a print dot of the print data is at a position of a dot element in which the line head is inoperable, and print data is output by the data check means. When it is determined that all the print dots are located at the positions of the dot elements in the line head operable state, the print data is When the normal print control means for outputting to the in-head and printing on the print medium and the data check means determine that the print dot of the print data is at the position of the dot element in which the line head is inoperable, the print data is output. A print data shift means for shifting the print dots in the line direction until the print dots deviate from the positions of the dot elements in the inoperable state, and output the print data shifted in the line direction by the print data shift means to a line head and print the print data on a print medium. Shift printing control means for printing. With such a configuration, when the print dot of the print data is located at the position of the dot element in which the line head is inoperable, the print data remains in the line until the print dot deviates from the position of the dot element in which the line head is inoperable. Is shifted in the direction. Therefore, even if a dot dropout occurs in the line head, all the print dots of the print data are printed by the dot elements in the operable state of the line head.

【0009】また、本願請求項2記載の発明は、上記請
求項1記載の発明において、印字データシフト手段を、
印字データの印字ドットが動作不可状態にあるドット素
子の位置から外れるまで印字データをライン方向の相反
する方向に交互に数ドットずつシフトさせるようにした
ものである。このような構成により、印字データの印字
ドットがラインヘッドの動作不可状態にあるドット素子
の位置であった場合に、印字ドットが動作不可状態にあ
るドット素子の位置から外れるまで印字データがライン
方向にシフトされるが、そのシフト量は必要最小限に抑
制される。
According to a second aspect of the present invention, in the first aspect of the present invention, the print data shift means comprises:
The print data is alternately shifted by several dots in the opposite direction of the line direction until the print dots of the print data deviate from the positions of the dot elements in the inoperable state. With such a configuration, when the print dot of the print data is at the position of the dot element in which the line head is inoperable, the print data is transferred in the line direction until the print dot deviates from the position of the dot element in which the operation of the line head is inoperable. , But the shift amount is suppressed to a necessary minimum.

【0010】また、本願請求項3記載の発明は、上記請
求項1記載の発明において、データチェック手段及び印
字データシフト手段のうち少なくとも印字データシフト
手段を、バーコードのように、印字媒体のライン方向に
対して直交する方向に直線を引く印字データであるとき
に機能するようにしたものである。このような構成によ
り、ドット抜けの影響が小さい文字などの印字の際に
は、データチェック手段及び印字データシフト手段のう
ち少なくとも印字データシフト手段が機能しないので、
印字を高速に行えるようになる。
According to a third aspect of the present invention, in the first aspect of the invention, at least the print data shift means of the data check means and the print data shift means is provided with a line of a print medium such as a bar code. It is designed to function when print data draws a straight line in a direction perpendicular to the direction. With this configuration, at the time of printing a character or the like that is less affected by missing dots, at least the print data shift unit of the data check unit and the print data shift unit does not function.
Printing can be performed at high speed.

【0011】[0011]

【発明の実施の形態】以下、本発明の一実施の形態を図
面を用いて説明する。なお、この実施の形態は、図3に
示すように、印字媒体である感熱用紙1のライン方向X
に対して白黒のバーが交互に並べられたバーコードデー
タ2と、文字列データ3とを印字するサーマルラインプ
リンタに、本発明を適用する場合である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below with reference to the drawings. In this embodiment, as shown in FIG. 3, the thermal paper 1 which is a printing medium
In this case, the present invention is applied to a thermal line printer that prints bar code data 2 in which black and white bars are alternately arranged and character string data 3.

【0012】図1はサーマルラインプリンタの要部構成
を示すブロック図であり、このプリンタは、制御部本体
としてCPU(Central Processing Unit )11を搭載
している。また、プログラムデータやキャラクタジェネ
レータデータなどを予め格納したROM(Read Only Me
mory)12、可変的なデータを一時格納するための各種
メモリエリアが形成されるRAM(Random Access Memo
ry)13、ホスト装置14から伝送ケーブルを介して送
信される印字データやコマンドデータを受信する通信イ
ンタフェース15、外付けのキーボードを接続可能なキ
ーボードインタフェース16、サーマルラインヘッド1
7の駆動を制御するヘッド駆動制御部18、フィードモ
ータ19の駆動を制御するモータ駆動制御部20、各種
センサ21からの信号を入力するとともに、LEDなど
の表示部22に駆動信号を出力するI/O(Input/Outp
ut)ポート23などを搭載している。そして、前記CP
U11と、ROM12,RAM13,通信インタフェー
ス15,キーボードインタフェース16,ヘッド駆動制
御部18,モータ駆動制御部20及びI/O(Input/Ou
tput)ポート23とを、アドレスバス,データバスなど
のバスライン24で接続して、制御回路を構成してい
る。
FIG. 1 is a block diagram showing a configuration of a main part of a thermal line printer. This printer has a CPU (Central Processing Unit) 11 as a control unit main body. Also, a ROM (Read Only Memories) in which program data and character generator data are stored in advance.
mory) 12, a RAM (Random Access Memory) in which various memory areas for temporarily storing variable data are formed.
ry) 13, a communication interface 15 for receiving print data and command data transmitted from a host device 14 via a transmission cable, a keyboard interface 16 to which an external keyboard can be connected, and a thermal line head 1.
7, a head drive control unit 18 for controlling the drive of the motor 7, a motor drive control unit 20 for controlling the drive of the feed motor 19, and a signal from various sensors 21 and a drive signal to a display unit 22 such as an LED. / O (Input / Outp
ut) The port 23 and the like are mounted. And the CP
U11, ROM 12, RAM 13, communication interface 15, keyboard interface 16, head drive control unit 18, motor drive control unit 20, and I / O (Input / Ou).
tput) port 23 is connected by a bus line 24 such as an address bus and a data bus to form a control circuit.

【0013】前記サーマルラインヘッド17は、印字デ
ータの1ドットの対応した発熱素子を複数個(本実施の
形態では416個とする)、印字媒体である感熱用紙1
のライン方向Xに1列に配列したものである。
The thermal line head 17 has a plurality of heating elements (416 in the present embodiment) corresponding to one dot of print data, and the thermal paper 1 as a printing medium.
Are arranged in one line in the line direction X.

【0014】前記フィードモータ19は、前記サーマル
ラインヘッド17に対して感熱用紙1をライン方向Xと
は直交する方向Yに1ステップずつフィードさせる用紙
送り機構の駆動源である。前記各種センサ21は、前記
サーマルラインヘッド17の各発熱素子を通電した際の
電流値を測定する電流センサを含む。
The feed motor 19 is a driving source of a paper feed mechanism that feeds the thermal paper 1 to the thermal line head 17 step by step in a direction Y orthogonal to the line direction X. The various sensors 21 include a current sensor that measures a current value when each heating element of the thermal line head 17 is energized.

【0015】かかる構成のサーマルラインプリンタにお
いて、前記RAM3には、図2に示すように、ホスト装
置14から受信した文字やバーコード等の印字データを
一時格納する受信バッファ31や、文字やバーコードの
印字データがドット展開されるイメージバッファ32の
他、テストデータメモリ33、編集データメモリ34、
左右の余白ドット数メモリ35、ドットカウンタnのカ
ウンタメモリ36、シフト方向フラグfのフラグメモリ
37、左右のシフト回数カウンタa,bのカウンタメモ
リ38、シフト数カウンタcのカウンタメモリ39など
の各種メモリエリアを形成している。
In the thermal line printer having such a configuration, as shown in FIG. 2, the RAM 3 has a receiving buffer 31 for temporarily storing print data such as characters and bar codes received from the host device 14, a character and bar code. In addition to the image buffer 32 in which the print data of the dot data is expanded into dots, a test data memory 33, an edit data memory
Various memories such as a left and right margin dot number memory 35, a counter memory 36 for a dot counter n, a flag memory 37 for a shift direction flag f, a counter memory 38 for left and right shift counters a and b, and a counter memory 39 for a shift counter c. Forming an area.

【0016】ここで、テストデータメモリ33は、前記
サーマルラインヘッド17を構成する複数の発熱素子に
それぞれ対応する同数のビットデータを記憶するエリア
で、各ビットデータは、対応する発熱素子が動作可のと
き“1”となり、動作不可のとき“0”となる。
Here, the test data memory 33 is an area for storing the same number of bit data corresponding to a plurality of heating elements constituting the thermal line head 17, respectively. At this time, it becomes "1", and when operation is disabled, it becomes "0".

【0017】編集データメモリ34は、印字データの1
ラインデータを記憶するエリアで、本実施の形態では、
この1ラインデータの印字ドットが前記サーマルライン
ヘッド17の動作不可状態にある発熱素子の位置から外
れるまで当該1ラインデータをライン方向の相反する方
向に交互に数ドットずつシフトさせるものとなってい
る。
The edit data memory 34 stores the print data 1
An area for storing line data. In the present embodiment,
Until the print dots of the one-line data deviate from the positions of the heating elements in the inoperable state of the thermal line head 17, the one-line data is alternately shifted by several dots in the opposite direction of the line direction. .

【0018】余白ドット数メモリ35は、前記編集デー
タメモリ34に記憶した1ラインデータの左右の非印字
領域を形成するドット数R(右余白ドット数),L(左
余白ドット数)を記憶するエリアである。フラグメモリ
37で記憶するシフトフラグfは、前記編集データメモ
リ34に記憶した1ラインデータのシフト方向を指定す
るフラグで、“0”のときは右方向を指定し、“1”の
ときは左方向を指定する。
The margin dot number memory 35 stores the number of dots R (the number of right margin dots) and L (the number of left margin dots) forming the left and right non-printing areas of the one-line data stored in the editing data memory 34. Area. The shift flag f stored in the flag memory 37 specifies the shift direction of the one-line data stored in the edit data memory 34. When "0", the shift flag f specifies the right direction, and when "1", the left direction is specified. Specify the direction.

【0019】しかして、サーマルラインプリンタは、ホ
スト装置14からヘッドテストを指令するコマンドが入
力されるか、若しくはキーボードインタフェース16に
外付けされる専用キーボードのキー操作により同ヘッド
テストを指令するコマンドが入力されると、CPU11
が図5の流れ図に示す処理を実行するものとなってい
る。
In the thermal line printer, a command for instructing a head test is input from the host device 14, or a command for instructing the head test is issued by a key operation of a dedicated keyboard externally connected to the keyboard interface 16. When input, the CPU 11
Execute the processing shown in the flowchart of FIG.

【0020】すなわちCPU11は、上記ヘッドテスト
を指令するコマンドの入力に応じてこの処理を開始する
と、先ず、ST(ステップ)1としてテストデータメモ
リ33の全ビットデータを“0”にクリアする。また、
ST2としてカウンタメモリ36のドットカウンタnを
「0」に初期化する。
That is, when this processing is started in response to the input of the command for instructing the head test, the CPU 11 first clears all bit data of the test data memory 33 to "0" as ST (step) 1. Also,
In ST2, the dot counter n of the counter memory 36 is initialized to "0".

【0021】次に、ST3として上記ドットカウンタn
を「1」だけカウントアップしたならば、ST4として
このドットカウンタnが前記サーマルラインヘッド17
のドット総数,つまり発熱素子の数(本実施の形態では
416)を超えたか否かを判断する。初めは越えていな
いのでST5に進む。
Next, as ST3, the dot counter n
Is counted up by "1", the dot counter n is read by the thermal line head 17 as ST4.
, That is, the number of heating elements (416 in this embodiment) is determined. At first, it does not exceed the value, so the process proceeds to ST5.

【0022】ST5では前記サーマルラインヘッド17
のnドット目(nはドットカウンタの値)の発熱素子を
通電する。このとき、当該nドット目の発電素子が正常
に動作する場合には電流が流れるので、ST6としてサ
ーマルラインヘッド17の電流値を測定し、所定の電流
が流れたことを検知した場合には、ST7としてテスト
データメモリ33のn番目のビットデータを“0”から
“1”に切換える。ST6にて所定の電流が流れたこと
を検知できなかった場合には、ST7の処理を行わず、
テストデータメモリ33のn番目のビットデータを
“0”のままとする。
In ST5, the thermal line head 17
Is turned on (n is the value of the dot counter). At this time, since the current flows when the power generating element of the n-th dot operates normally, the current value of the thermal line head 17 is measured in ST6, and when it is detected that the predetermined current has flowed, In ST7, the n-th bit data of the test data memory 33 is switched from "0" to "1". When it is not detected that the predetermined current has flowed in ST6, the process of ST7 is not performed, and
The n-th bit data of the test data memory 33 remains "0".

【0023】しかる後、ST3に戻り、ドットカウンタ
nを「1」だけカウントアップしたならば、このドット
カウンタnが前記サーマルラインヘッド17のドット総
数を超えたか否かを判断する。そして、超えていない場
合にはサーマルラインヘッド17のnドット目の発熱素
子を通電し、所定の電流が流れたことを検知した場合に
は、テストデータメモリ33のn番目のビットデータを
“0”から“1”に切換える。
Thereafter, returning to ST3, if the dot counter n is counted up by "1", it is determined whether or not the dot counter n has exceeded the total number of dots of the thermal line head 17. If not exceeded, the heating element of the n-th dot of the thermal line head 17 is energized. If it is detected that a predetermined current has flowed, the n-th bit data of the test data memory 33 is set to "0". From "1" to "1".

【0024】以後、ドットカウンタnを順次カウントア
ップし、サーマルラインヘッド17のドット総数を超え
るまで上記処理を繰り返す(ヘッドチェック手段)。そ
して、ドットカウンタnがサーマルラインヘッド17の
ドット総数を超えたならばST8に進む。ST8ではテ
ストデータメモリ33のビットデータをチェックして、
データ“0”のビットデータの総数Kを算出する。そし
て、ST9としてこの総数Kが予め設定された1以上の
規定値(本実施の形態では2とする)を超えるか否かを
判断する。ここで、データ“0”のビットデータの総数
Kが規定値以下の場合には、サーマルラインヘッド17
をそのまま使用するので、この処理を終了する。
Thereafter, the dot counter n is sequentially counted up, and the above processing is repeated until the total number of dots of the thermal line head 17 is exceeded (head check means). If the dot counter n exceeds the total number of dots of the thermal line head 17, the process proceeds to ST8. In ST8, the bit data of the test data memory 33 is checked,
The total number K of bit data of data “0” is calculated. Then, in ST9, it is determined whether or not the total number K exceeds one or more prescribed values (2 in this embodiment) set in advance. Here, if the total number K of bit data of data “0” is equal to or smaller than a specified value, the thermal line head 17
Is used as it is, and thus this processing ends.

【0025】これに対し、データ“0”のビットデータ
の総数Kが規定値を超える場合には、サーマルラインヘ
ッド17には規定値を超える数のドット抜けが発生して
おりヘッドの交換を要するので、ST10として表示部
22にヘッド異常の警告表示を行わせて、この処理を終
了する。
On the other hand, when the total number K of the bit data of data "0" exceeds the specified value, the thermal line head 17 has missing dots exceeding the specified value, and the head needs to be replaced. Therefore, the display unit 22 is caused to display a head abnormality warning in ST10, and the process is terminated.

【0026】また、サーマルラインプリンタは、ホスト
装置14から印字データを受信すると、CPU11の制
御によりその印字データを受信バッファ31に一旦格納
した後、イメージバッファ32にドット展開する。
Upon receiving print data from the host device 14, the thermal line printer temporarily stores the print data in the reception buffer 31 under the control of the CPU 11, and then develops the dots in the image buffer 32.

【0027】ここで、印字データが文字データの場合に
は、CPU11は、イメージバッファ32の先頭アドレ
スからドットデータを1ラインずつ取込み、ヘッド駆動
制御部18に与える。ヘッド駆動制御部18は、サーマ
ルラインヘッド17を構成する各発熱素子のうちドット
データの印字ドットに対応した発熱素子を選択的に通電
して発熱させ、印字媒体にドットを印字させる。またC
PU11は、1ラインのドットデータをヘッド駆動制御
部18に与える毎に、モータ駆動制御部20に1ステッ
プのフィードコマンドを与える。モータ駆動制御部20
は、フィードコマンドに応じてフィードモータ19を駆
動させ、印字媒体を1ステップずつフィードさせる。こ
れにより、印字媒体にドットの集合からなる文字が形成
されるようになる。
If the print data is character data, the CPU 11 fetches dot data line by line from the head address of the image buffer 32 and supplies it to the head drive controller 18. The head drive control unit 18 selectively energizes the heating elements corresponding to the print dots of the dot data among the heating elements constituting the thermal line head 17 to generate heat, and prints the dots on the print medium. Also C
The PU 11 gives a one-step feed command to the motor drive control unit 20 every time one line of dot data is given to the head drive control unit 18. Motor drive control unit 20
Drives the feed motor 19 in response to the feed command to feed the print medium one step at a time. As a result, characters consisting of a set of dots are formed on the print medium.

【0028】一方、印字データがバーコードデータの場
合には、CPU11は、図6乃至図9の流れ図に示す処
理を実行するものとなっている。先ず、ST1としてイ
メージバッファ32の先頭アドレスからドットデータを
1ラインだけ取込み、編集データメモリ34に格納す
る。次に、ST2として編集データメモリ34の先頭ア
ドレスからドットデータをチェックし、最初に印字ドッ
トが現われるまでの非印字ドットの数を計数する。そし
て、この非印字ドットの数を左余白ドット数Lとして余
白ドット数メモリ35に格納する。同様に、編集データ
メモリ34の最終アドレスからドットデータを逆方向に
チェックし、最初に印字ドットが現われるまでの非印字
ドットの数を計数する。そして、この非印字ドットの数
を右余白ドット数Lとして余白ドット数メモリ35に格
納する。
On the other hand, when the print data is bar code data, the CPU 11 executes the processing shown in the flowcharts of FIGS. First, as ST1, one line of dot data is fetched from the head address of the image buffer 32 and stored in the edit data memory 34. Next, as ST2, dot data is checked from the head address of the edit data memory 34, and the number of non-print dots until the first appearance of a print dot is counted. Then, the number of non-print dots is stored in the blank dot number memory 35 as the left blank dot number L. Similarly, the dot data is checked in the reverse direction from the last address of the edit data memory 34, and the number of non-print dots until the first appearance of a print dot is counted. Then, the number of non-print dots is stored in the blank dot number memory 35 as the right blank dot number L.

【0029】次に、ST3としてフラグメモリ37のシ
フト方向フラグfを“0”にリセットする。また、ST
4としてカウンタメモリ38及び39の左右のシフト回
数カウンタa,bとシフト数カウンタcとを“0”に初
期化する。
Next, as ST3, the shift direction flag f of the flag memory 37 is reset to "0". ST
As 4, the left and right shift counters a and b and the shift counter c of the counter memories 38 and 39 are initialized to “0”.

【0030】次に、ST5として編集データメモリ34
に格納された1ライン分のドットデータと、テストデー
タメモリ33に格納されている各ビットデータとを、そ
れぞれ先頭アドレスのデータから順に対比する。そし
て、1ライン分のドットデータの印字ドットに対応する
ビットデータが全て“1”か否かをチェックする(デー
タチェック手段)。
Next, as ST5, the edit data memory 34
And the bit data stored in the test data memory 33 are compared in order from the data of the head address. Then, it is checked whether or not all the bit data corresponding to the print dots of the dot data for one line are "1" (data check means).

【0031】ここで、ST6として印字ドットに対応す
るビットデータが全て“1”、つまり各印字ドットに対
応するサーマルラインヘッド17の発熱素子が全て正常
に動作する場合には、図9のST29に進む(正常印字
制御手段)。これに対し、少なくとも1つの印字ドット
に対応するビットデータが“0”、つまりその印字ドッ
トに対応する発熱素子が正常に動作しない場合には、S
T7として前記シフト数カウンタcを「1」だけカウン
トアップする。
If the bit data corresponding to the print dots are all "1" in ST6, that is, if all the heating elements of the thermal line head 17 corresponding to each print dot operate normally, the process proceeds to ST29 in FIG. Proceed (normal printing control means). On the other hand, if the bit data corresponding to at least one print dot is “0”, that is, if the heating element corresponding to the print dot does not operate normally, S
At T7, the shift counter c is counted up by "1".

【0032】次に、ST8として前記シフト方向フラグ
fを調べる。この場合、シフト方向フラグfが“0”に
リセットされているのでST9に進み、カウンタメモリ
38の右シフト回数カウンタaを「1」だけカウントア
ップする。しかる後、ST10としてこの右シフト回数
カウンタaと前記余白ドット数メモリ35内の右余白ド
ット数Rとを比較する。そして、右シフト回数カウンタ
aが右余白ドット数R以下であることを確認したなら
ば、ST11として編集データメモリ34内のドットデ
ータを右方向(最終アドレスの方向)にcドット(シフ
ト数カウンタcのカウント値に相当するドット数)だけ
シフトする。このとき、シフトによって空いた先頭アド
レス側のcドット分の領域には、非印字ドットをセット
する(印字データシフト手段)。
Next, at step ST8, the shift direction flag f is checked. In this case, since the shift direction flag f has been reset to "0", the process proceeds to ST9, and the right shift counter a of the counter memory 38 is counted up by "1". Thereafter, in ST10, the right shift counter a is compared with the right margin dot number R in the margin dot number memory 35. If it is confirmed that the right shift number counter a is equal to or less than the right margin dot number R, the dot data in the edit data memory 34 is shifted rightward (toward the last address) by c dots (shift number counter c) in ST11. (The number of dots corresponding to the count value). At this time, a non-printing dot is set in the c-dot area on the head address side vacated by the shift (print data shifting means).

【0033】その後、ST12として前記シフト方向フ
ラグfを“1”にセットしたならば、ST5に戻り、編
集データメモリ34内のドットデータと、テストデータ
メモリ33内の各ビットデータとを、それぞれ先頭アド
レスのデータから順に対比する。その結果、印字ドット
に対応するビットデータが全て“1”であった場合に
は、図9のST29に進む(シフト印字制御手段)。
After that, if the shift direction flag f is set to "1" in ST12, the process returns to ST5, where the dot data in the edit data memory 34 and each bit data in the test data memory 33 are read at the beginning. The comparison is performed in order from the address data. As a result, if all the bit data corresponding to the print dots are "1", the process proceeds to ST29 in FIG. 9 (shift print control means).

【0034】これに対し、依然として少なくとも1つの
印字ドットに対応するビットデータが“0”の場合に
は、シフト数カウンタcを「1」だけカウントアップし
た後、シフト方向フラグfを調べる。この場合、シフト
方向フラグfが“1”にセットされているのでST13
に進み、カウンタメモリ38の左シフト回数カウンタb
を「1」だけカウントアップする。しかる後、ST14
としてこの左シフト回数カウンタbと前記余白ドット数
メモリ35内の左余白ドット数Lとを比較する。そし
て、左シフト回数カウンタbが左余白ドット数L以下で
あることを確認したならば、ST15として編集データ
メモリ34内のドットデータを左方向(先頭アドレスの
方向)にcドットだけシフトする。このとき、シフトに
よって空いた最終アドレス側のcドット分の領域には、
非印字ドットをセットする(印字データシフト手段)。
On the other hand, when the bit data corresponding to at least one print dot is still "0", the shift number counter c is counted up by "1" and the shift direction flag f is checked. In this case, since the shift direction flag f is set to "1", ST13
To the left shift counter b in the counter memory 38.
Is incremented by "1". After a while, ST14
Then, the left shift number counter b is compared with the left margin dot number L in the margin dot number memory 35. If it is confirmed that the left shift counter b is equal to or less than the left margin dot number L, the dot data in the edit data memory 34 is shifted leftward (in the direction of the head address) by c dots in ST15. At this time, the c-dot area on the last address side vacated by the shift is
Set non-printing dots (print data shift means).

【0035】その後、ST16として前記シフト方向フ
ラグfを“0”にリセットしたならば、ST5に戻り、
編集データメモリ34内のドットデータと、テストデー
タメモリ33内の各ビットデータとを、それぞれ先頭ア
ドレスのデータから順に対比する。その結果、印字ドッ
トに対応するビットデータが全て“1”であった場合に
は、図9のST29に進む(シフト印字制御手段)。
Thereafter, if the shift direction flag f is reset to "0" in ST16, the process returns to ST5.
The dot data in the edit data memory 34 and each bit data in the test data memory 33 are compared in order from the data of the head address. As a result, if all the bit data corresponding to the print dots are "1", the process proceeds to ST29 in FIG. 9 (shift print control means).

【0036】これに対し、依然として少なくとも1つの
印字ドットに対応するビットデータが“0”の場合に
は、シフト数カウンタcを「1」だけカウントアップし
た後、シフト方向フラグfを調べる。そして、シフト方
向フラグfが“0”にリセットされていた場合には前記
ST9,10,11,12の処理を実行し、ST5に戻
る。シフト方向フラグfが“1”にセットされていた場
合には前記ST13,14,15,16の処理を実行
し、ST5に戻る。
On the other hand, if the bit data corresponding to at least one print dot is still "0", the shift number counter c is counted up by "1", and then the shift direction flag f is checked. If the shift direction flag f has been reset to "0", the processes of ST9, 10, 11, and 12 are executed, and the process returns to ST5. If the shift direction flag f has been set to "1", the processes of ST13, 14, 15, and 16 are executed, and the process returns to ST5.

【0037】なお、図6のST10にて右シフト回数カ
ウンタaが右余白ドット数Rを超えた場合には、図7の
ST17に進む。ST17では、カウンタメモリ38の
左シフト回数カウンタbを「1」だけカウントアップす
る。しかる後、ST18としてこの左シフト回数カウン
タbと前記余白ドット数メモリ35内の左余白ドット数
Lとを比較する。そして、左シフト回数カウンタbが左
余白ドット数L以下であることを確認したならば、ST
19として編集データメモリ34内のドットデータを左
方向(先頭アドレスの方向)に1ドットだけシフトす
る。このとき、シフトによって空いた最終アドレス側の
1ドット分の領域には、非印字ドットをセットする(印
字データシフト手段)。
If the right shift counter a exceeds the right blank dot number R in ST10 of FIG. 6, the process proceeds to ST17 of FIG. In ST17, the left shift counter b of the counter memory 38 is counted up by "1". Thereafter, as ST18, the left shift counter b is compared with the left margin dot number L in the margin dot number memory 35. If it is confirmed that the left shift number counter b is equal to or less than the left margin dot number L, ST
As 19, the dot data in the edit data memory 34 is shifted by one dot to the left (toward the head address). At this time, a non-print dot is set in an area for one dot on the last address side vacated by the shift (print data shift means).

【0038】しかる後、ST20として編集データメモ
リ34内のドットデータと、テストデータメモリ33内
の各ビットデータとを、それぞれ先頭アドレスのデータ
から順に対比する。その結果、印字ドットに対応するビ
ットデータが全て“1”であった場合には、図9のST
29に進む(シフト印字制御手段)。
Thereafter, as ST20, the dot data in the edit data memory 34 and each bit data in the test data memory 33 are compared in order from the data of the head address. As a result, if all the bit data corresponding to the print dots are “1”, the ST in FIG.
Go to 29 (shift print control means).

【0039】これに対し、依然として少なくとも1つの
印字ドットに対応するビットデータが“0”の場合に
は、ST17に戻る。そして、左シフト回数カウンタb
を「1」だけカウントアップした後、この左シフト回数
カウンタbと左余白ドット数Lとを比較する。
On the other hand, if the bit data corresponding to at least one print dot is still "0", the process returns to ST17. Then, the left shift number counter b
Is counted up by “1”, the left shift counter b is compared with the number L of left margin dots.

【0040】ここで、左シフト回数カウンタbが左余白
ドット数L以下である場合には、ST19,20,21
の処理を実行する。ST18にて左シフト回数カウンタ
bが左余白ドット数Lを超えた場合には、ST22とし
て表示部22にバーコード印字不可の警告表示を行わせ
て、この処理を終了する。
If the left shift counter b is equal to or smaller than the left margin dot number L, ST19, ST20, ST21 are executed.
Execute the processing of If the left shift counter b has exceeded the left margin dot number L in ST18, the display unit 22 is caused to display a warning indicating that bar code printing is not possible in ST22, and this processing ends.

【0041】また、図6のST14にて左シフト回数カ
ウンタbが左余白ドット数Lを超えた場合には、図8の
ST23に進む。ST23では、カウンタメモリ38の
右シフト回数カウンタaを「1」だけカウントアップす
る。しかる後、ST24としてこの右シフト回数カウン
タaと前記余白ドット数メモリ35内の右余白ドット数
Rとを比較する。そして、右シフト回数カウンタaが右
余白ドット数R以下であることを確認したならば、ST
25として編集データメモリ34内のドットデータを右
方向(最終アドレスの方向)に1ドットだけシフトす
る。このとき、シフトによって空いた先頭アドレス側の
1ドット分の領域には、非印字ドットをセットする(印
字データシフト手段)。
If the left shift counter b exceeds the left margin dot number L in ST14 of FIG. 6, the process proceeds to ST23 of FIG. In ST23, the right shift counter a of the counter memory 38 is counted up by "1". Thereafter, in ST24, the right shift number counter a is compared with the right blank dot number R in the blank dot number memory 35. If it is confirmed that the right shift number counter a is equal to or less than the right margin dot number R, ST
As 25, the dot data in the edit data memory 34 is shifted rightward (toward the last address) by one dot. At this time, a non-print dot is set in an area for one dot on the head address side vacated by the shift (print data shift means).

【0042】しかる後、ST26として編集データメモ
リ34内のドットデータと、テストデータメモリ33内
の各ビットデータとを、それぞれ先頭アドレスのデータ
から順に対比する。その結果、印字ドットに対応するビ
ットデータが全て“1”であった場合には、図9のST
29に進む(シフト印字制御手段)。
Thereafter, as ST26, the dot data in the edit data memory 34 and the respective bit data in the test data memory 33 are compared in order from the data of the head address. As a result, if all the bit data corresponding to the print dots are “1”, the ST in FIG.
Go to 29 (shift print control means).

【0043】これに対し、依然として少なくとも1つの
印字ドットに対応するビットデータが“0”の場合に
は、ST23に戻る。そして、右シフト回数カウンタa
を「1」だけカウントアップした後、この右シフト回数
カウンタaと右余白ドット数Rとを比較する。
On the other hand, if the bit data corresponding to at least one print dot is still "0", the process returns to ST23. And a right shift counter a
Is counted up by "1", the right shift number counter a is compared with the right margin dot number R.

【0044】ここで、右シフト回数カウンタaが右余白
ドット数R以下である場合には、ST25,26,27
の処理を実行する。ST24にて右シフト回数カウンタ
aが右余白ドット数Rを超えた場合には、ST28とし
て表示部22にバーコード印字不可の警告表示を行わせ
て、この処理を終了する。
Here, if the right shift number counter a is equal to or smaller than the right margin dot number R, ST25, 26, 27
Execute the processing of If the right shift counter a exceeds the right margin dot number R in ST24, the display unit 22 is caused to display a warning indicating that bar code printing is not possible in ST28, and the process ends.

【0045】図9のST29では、前記シフト数カウン
タcが“0”に初期化されたままか否かを判断する。
“0”に初期化されたままの場合には、バーコードデー
タをシフトする必要がないのでST33に進み、イメー
ジバッファ32にドット展開されているバーコードデー
タの印字処理を行う(正常印字制御手段)。
In step ST29 of FIG. 9, it is determined whether or not the shift number counter c has been initialized to "0".
If it is still initialized to "0", there is no need to shift the barcode data, so the process proceeds to ST33, where the barcode data dot-developed in the image buffer 32 is printed (normal print control means). ).

【0046】ST29にてシフト数カウンタcが1以上
にカウントアップされている場合には、ST30として
シフト方向フラグfをチェックする。そして、シフト方
向フラグfが“0”にリセットされていた場合には、バ
ーコードデータのシフト方向として右方向が指定されて
いるので、ST31としてイメージバッファ32にドッ
ト展開されているバーコードデータをライン毎にそれぞ
れ右方向にaドット(右シフト回数カウンタaのカウン
ト値に相当するドット数)だけシフトする。
When the shift number counter c has counted up to 1 or more in ST29, the shift direction flag f is checked in ST30. If the shift direction flag f has been reset to "0", the right direction is designated as the shift direction of the barcode data. Each line is shifted rightward by a dot (the number of dots corresponding to the count value of the right shift counter a).

【0047】これに対し、ST30にてシフト方向フラ
グfが“1”にセットされていた場合には、バーコード
データのシフト方向として左方向が指定されているの
で、ST32としてイメージバッファ32にドット展開
されているバーコードデータをライン毎にそれぞれ左方
向にbドット(左シフト回数カウンタbのカウント値に
相当するドット数)だけシフトする。その後、ST33
に進み、イメージバッファ32にドット展開されている
バーコードデータの印字処理を行う(シフト印字制御手
段)。
On the other hand, if the shift direction flag f is set to "1" in ST30, the left direction is specified as the shift direction of the bar code data. The developed barcode data is shifted leftward by b dots (the number of dots corresponding to the count value of the left shift counter b) for each line. After that, ST33
Then, the printing process of the bar code data dot-developed in the image buffer 32 is performed (shift printing control means).

【0048】このように本実施の形態のサーマルライン
プリンタにおいては、例えば、ホスト装置14からヘッ
ドテストを指令するコマンドが入力されると、サーマル
ラインヘッド17を構成する各発熱素子を1素子ずつ順
に通電し、そのときに流れる電流量から各発熱素子の動
作状態をチェックする。そして、テストデータメモリ3
3上の各ビットデータのうち、所定値以上の電流が流れ
た動作可能な発熱素子に対応するビットデータを“1
“とし、動作不可能な発熱素子に対応するビットデータ
を“0”とすることで、発熱素子毎に動作可または動作
不可の情報を記憶するようになっている。
As described above, in the thermal line printer of this embodiment, for example, when a command for instructing a head test is input from the host device 14, the heating elements constituting the thermal line head 17 are sequentially turned on one by one. The operation state of each heating element is checked from the amount of current flowing at that time. Then, the test data memory 3
3 of the bit data corresponding to an operable heating element in which a current equal to or more than a predetermined value has flowed, is set to “1”.
By setting "0" and the bit data corresponding to the non-operable heating element to "0", information indicating whether or not operation is possible is stored for each heating element.

【0049】また、ホスト装置14から印字データとし
てバーコードデータを受信すると、そのバーコードデー
タの1ライン分のドットデータを編集データメモリ34
に格納する。そして、この編集データメモリ34に格納
した1ライン分のドットデータと、テストデータメモリ
33に格納している各ビットデータとを、それぞれ先頭
アドレスのデータから順に対比して、1ライン分のドッ
トデータの印字ドットに対応するビットデータが全て
“1”か否かをチェックする。その結果、印字ドットに
対応するビットデータが全て“1”であった場合には、
イメージバッファ32に展開したバーコードデータをそ
のまま印字出力する。
When bar code data is received as print data from the host device 14, dot data for one line of the bar code data is stored in the edit data memory 34.
To be stored. The dot data for one line stored in the edit data memory 34 and the bit data stored in the test data memory 33 are compared in order from the data of the head address, and the dot data for one line is compared. It is checked whether or not all the bit data corresponding to the print dots are “1”. As a result, when all the bit data corresponding to the print dots are “1”,
The barcode data developed in the image buffer 32 is printed out as it is.

【0050】これに対し、少なくとも1つの印字ドット
に対応するビットデータが“0”であった場合には、編
集データメモリ34内の1ライン分のドットデータを、
当該ドットデータの印字ドットに対応するビットデータ
が全て“1”になるまで、ライン方向の相反する方向に
交互に1ドットずつシフトさせる。そして、印字ドット
に対応するビットデータが全て“1”になった場合に
は、イメージバッファ32に展開したバーコードデータ
を同じドット数だけ同じ方向にシフトした後、印字出力
するものとなっている。
On the other hand, if the bit data corresponding to at least one print dot is “0”, the dot data for one line in the edit data memory 34 is
Until all the bit data corresponding to the print dots of the dot data become “1”, the dots are alternately shifted by one dot in the opposite direction of the line direction. When all the bit data corresponding to the print dots become "1", the barcode data developed in the image buffer 32 is shifted by the same number of dots in the same direction and then printed. .

【0051】例えば、416個の発熱素子を配列してな
るサーマルラインヘッド17を備えたサーマルラインプ
リンタにおいて、左から9番目の発熱素子が動作不可状
態にあったとする。そうすると、テストデータメモリ3
3には、図4(a)に示すように9番目の発熱素子に対
応したビットデータが“0”で、他の発熱素子に対応す
る各ビットデータがいずれも“1”のデータ列が記憶さ
れる。
For example, suppose that in a thermal line printer provided with a thermal line head 17 in which 416 heating elements are arranged, the ninth heating element from the left is in an inoperable state. Then, the test data memory 3
3 stores a data string in which the bit data corresponding to the ninth heating element is “0” and the bit data corresponding to the other heating elements are all “1” as shown in FIG. Is done.

【0052】この状態で、左から7〜10番目の発熱素
子に対応する位置に黒バーを印字し、左から11〜13
番目の発熱素子に対応する位置に白バーを形成するバー
コードデータ(左から14番目以降の発熱素子に対応す
る位置のバーは任意)2がホスト装置14から送られて
きたとすると、先ず、編集データメモリ34には、図4
(b)に示すように、1〜6番目のドットデータと11
〜13番目のドットデータが非印字ドット(「0」と示
す)となり、7〜10番目のドットデータが印字ドット
(「1」と示す)となる1ライン分のドットデータが格
納される。このとき、左余白ドット数Lは「6」であ
る。なお、右余白ドット数Rは5以上とする。
In this state, black bars are printed at positions corresponding to the seventh to tenth heating elements from the left, and 11 to 13 from the left.
Assuming that bar code data 2 for forming a white bar at a position corresponding to the first heating element (the bar at a position corresponding to the 14th heating element from the left is arbitrary) 2 is sent from the host device 14, first, edit In the data memory 34, FIG.
As shown in (b), the first to sixth dot data and 11
The 1st to 13th dot data are non-printing dots (indicated as “0”), and the 7th to 10th dot data are printing dots (indicated as “1”). At this time, the left margin dot number L is “6”. Note that the number R of right margin dots is 5 or more.

【0053】この場合、テストデータメモリ33内のビ
ットデータと編集データメモリ33内のドットデータと
を先頭アドレスより順に対比すると、動作不可状態の発
熱素子に対応するビットデータ,つまりテストデータメ
モリ33内の左から9番目のビットデータと対比される
編集データメモリ33内のドットデータが印字ドットな
ので、図4(c)に示すように、編集データメモリ33
内のドットデータが右方向(図中矢印R方向)に1ドッ
トだけシフトされる。
In this case, when the bit data in the test data memory 33 and the dot data in the edit data memory 33 are compared in order from the head address, the bit data corresponding to the inoperable heating element, ie, the test data memory 33 Since the dot data in the edit data memory 33 which is compared with the ninth bit data from the left of FIG. 3 is a print dot, as shown in FIG.
Are shifted by one dot in the right direction (the direction of arrow R in the figure).

【0054】そして、ドットデータのシフト後、再度、
テストデータメモリ33内のビットデータと編集データ
メモリ33内のドットデータとが対比される。そして、
この場合も、動作不可状態の発熱素子に対応するビット
データと対比されるドットデータが印字ドットなので、
図4(d)に示すように、編集データメモリ33内のド
ットデータが左方向(図中矢印L方向)に2ドットだけ
シフトされる。つまり、図4(b)に示した初期状態よ
り左方向に1ドットだけシフトされる。
After the dot data has been shifted,
The bit data in the test data memory 33 and the dot data in the edit data memory 33 are compared. And
Also in this case, the dot data to be compared with the bit data corresponding to the heating element in the inoperable state is a print dot.
As shown in FIG. 4D, the dot data in the edit data memory 33 is shifted by two dots to the left (in the direction of the arrow L in the figure). That is, it is shifted by one dot to the left from the initial state shown in FIG.

【0055】そして、再度、テストデータメモリ33内
のビットデータと編集データメモリ33内のドットデー
タとが対比される。そして、この場合も、動作不可状態
の発熱素子に対応するビットデータと対比されるドット
データが印字ドットなので、図4(e)に示すように、
編集データメモリ33内のドットデータが右方向(図中
矢印R方向)に3ドットだけシフトされる。つまり、図
4(b)に示した初期状態より右方向に2ドットだけシ
フトされる。
Then, the bit data in the test data memory 33 and the dot data in the edit data memory 33 are compared again. In this case as well, the dot data to be compared with the bit data corresponding to the heating element in the inoperable state is a print dot, and therefore, as shown in FIG.
The dot data in the edit data memory 33 is shifted rightward (in the direction of arrow R in the figure) by three dots. That is, it is shifted by two dots to the right from the initial state shown in FIG.

【0056】そして、再度、テストデータメモリ33内
のビットデータと編集データメモリ33内のドットデー
タとが対比される。そして、この場合も、動作不可状態
の発熱素子に対応するビットデータと対比されるドット
データが印字ドットなので、図4(f)に示すように、
編集データメモリ33内のドットデータが左方向(図中
矢印L方向)に4ドットだけシフトされる。つまり、図
4(b)に示した初期状態より左方向に2ドットだけシ
フトされる。
Then, the bit data in the test data memory 33 and the dot data in the edit data memory 33 are compared again. In this case as well, the dot data to be compared with the bit data corresponding to the heating element in the inoperable state is a print dot, and therefore, as shown in FIG.
The dot data in the edit data memory 33 is shifted by four dots to the left (in the direction of the arrow L in the figure). That is, it is shifted by two dots to the left from the initial state shown in FIG.

【0057】そして、再度、テストデータメモリ33内
のビットデータと編集データメモリ33内のドットデー
タとが対比される。このとき、初めて動作不可状態の発
熱素子に対応するビットデータと対比されるドットデー
タが非印字ドットとなる。そして、シフト方向フラグf
は“1”にセットされており、左シフト回数カウンタb
は「2」までカウントアップしている。
Then, the bit data in the test data memory 33 and the dot data in the edit data memory 33 are compared again. At this time, the dot data which is compared with the bit data corresponding to the heating element in the inoperable state for the first time becomes the non-printing dot. Then, the shift direction flag f
Is set to "1" and the left shift counter b
Is counting up to “2”.

【0058】その結果、イメージバッファ32にドット
展開されていたバーコードデータ2は、1ライン毎に左
方向に2ドットだけシフトされた後、サーマルラインヘ
ッド17に印加されて、印字媒体に印字出力される。つ
まり、バーコード全体が左に2ドット分シフトされて印
字される。
As a result, the bar code data 2 that has been dot-developed in the image buffer 32 is shifted to the left by two dots for each line, and then applied to the thermal line head 17 to be printed out on a print medium. Is done. That is, the entire bar code is printed shifted by two dots to the left.

【0059】これにより、左から7〜10番目の発熱素
子に対応する位置に指定された黒バーは、左から5〜8
番目の発熱素子に対応する位置にシフトされて印字され
る。また、11〜13番目の発熱素子に対応する位置に
指定された白バーは、左から9〜11番目の発熱素子に
対応する位置にシフトされて形成される。したがって、
動作不可状態にある左から9番目の発熱素子はバーコー
ドデータの印字に作用しないので、正常なバーコードを
印字することができる。
As a result, the black bars specified at the positions corresponding to the seventh to tenth heating elements from the left are 5 to 8 from the left.
The print is shifted to the position corresponding to the third heating element. Further, the white bars specified at the positions corresponding to the 11th to 13th heating elements are formed by shifting to the positions corresponding to the 9th to 11th heating elements from the left. Therefore,
The ninth heating element from the left in the inoperable state does not affect the printing of barcode data, so that a normal barcode can be printed.

【0060】しかも、バーコードデータの印字ドットが
動作不可状態にある発熱素子の位置から外れるまでバー
コードデータをライン方向の相反する方向に交互に1ド
ットずつシフトさせているので、シフト量を必要最小限
にできる。その結果、シフト前の印字位置にできる限り
近い位置に正常なバーコードを印字させることができ
る。
Further, since the bar code data is alternately shifted one dot at a time in the opposite direction of the line direction until the print dot of the bar code data deviates from the position of the heating element in the inoperative state, a shift amount is required. Can be minimized. As a result, a normal barcode can be printed at a position as close as possible to the printing position before the shift.

【0061】一方、ホスト装置14から送られてきた印
字データが文字列データ3の場合には、シフトすること
なく印字される。文字列データはドット抜けが1〜2ド
ット程度あっても文字列全体を認識可能であり影響が小
さいので、バーコードデータ2のときのような煩雑なシ
フト処理を行わないことにより、印字時間を短縮でき
る。
On the other hand, if the print data sent from the host device 14 is the character string data 3, it is printed without shifting. The character string data can recognize the entire character string even if there is one or two dots of missing dots, and the effect is small. Therefore, the printing time can be reduced by not performing complicated shift processing as in the case of the bar code data 2. Can be shortened.

【0062】なお、本発明はバーコードの印字に限定さ
れるものではなく、罫線のように印字媒体のライン方向
に対して直交する方向に直線を引く印字データであると
きに適用して好都合なものである。
The present invention is not limited to the printing of bar codes, but is advantageous when applied to print data in which a straight line is drawn in a direction perpendicular to the line direction of the print medium, such as a ruled line. Things.

【0063】また、印字データをライン方向の相反する
方向にシフトさせる際のドット数を2以上の複数ドット
として、処理の高速化を図ることも可能である。
It is also possible to increase the processing speed by setting the number of dots when shifting the print data in the direction opposite to the line direction to a plurality of dots of two or more.

【0064】[0064]

【発明の効果】以上詳述したように、本願請求項1乃至
3記載の各発明によれば、ラインヘッドにドット抜けが
発生しても、印字データの印字ドットは全てラインヘッ
ドの動作可状態にあるドット素子によって印字されるの
で、ラインヘッドにドット抜けが発生しても正常な印字
を行うことができるラインプリンタを提供できる。ま
た、本願請求項2記載の発明によれば、印字データをラ
イン方向にシフトする際のシフト量を最小限にできるの
で、ラインヘッドにドット抜けが発生してもできる限り
生データに近い位置で正常な印字を行うことができる効
果を奏する。また、本願請求項3記載の発明によれば、
ドット抜けの影響が小さい文字などの印字の際には、デ
ータチェック手段及び印字データシフト手段のうち少な
くとも印字データシフト手段が機能しないので、印字を
高速に行える利点がある。
As described above in detail, according to each of the first to third aspects of the present invention, even if a dot dropout occurs in the line head, all the print dots of the print data are in the operable state of the line head. Since the printing is performed by the dot elements in the line head, it is possible to provide a line printer capable of performing normal printing even if a dot missing occurs in the line head. According to the second aspect of the present invention, the shift amount when the print data is shifted in the line direction can be minimized. Therefore, even if a dot dropout occurs in the line head, the shift amount is as close to the raw data as possible. This produces an effect that normal printing can be performed. According to the invention described in claim 3 of the present application,
At the time of printing characters or the like that are less affected by missing dots, at least the print data shift means out of the data check means and the print data shift means does not function, so that there is an advantage that printing can be performed at high speed.

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

【図1】 本発明の一実施の形態であるサーマルライン
プリンタの要部構成を示すブロック図。
FIG. 1 is a block diagram showing a main configuration of a thermal line printer according to an embodiment of the present invention.

【図2】 同実施の形態におけるサーマルラインプリン
タのRAMに形成される主要なメモリエリアを示す図。
FIG. 2 is a view showing main memory areas formed in a RAM of the thermal line printer according to the embodiment.

【図3】 同実施の形態でサーマルラインプリンタによ
り印字可能なデータの一例を示す図。
FIG. 3 is a view showing an example of data printable by a thermal line printer in the embodiment.

【図4】 同実施の形態の作用説明に用いるメモリのデ
ータ構成を示す図。
FIG. 4 is an exemplary view showing the data configuration of a memory used for describing the operation of the embodiment.

【図5】 同実施の形態におけるサーマルラインプリン
タのCPUが実行するヘッドテスト処理の要部を示す流
れ図。
FIG. 5 is a flowchart showing a main part of a head test process executed by the CPU of the thermal line printer according to the embodiment.

【図6】 同実施の形態におけるサーマルラインプリン
タのCPUが実行するバーコード印字処理の要部を示す
流れ図。
FIG. 6 is a flowchart showing a main part of a barcode printing process executed by the CPU of the thermal line printer according to the embodiment.

【図7】 図6中ST10で[右シフト回数カウンタa
>右余白ドット数R]が成立した後の処理を示す流れ
図。
FIG. 7 shows [Right shift counter a in ST10 in FIG.
FIG. 9 is a flowchart showing a process after the right margin dot number R is satisfied.

【図8】 図6中ST14で[左シフト回数カウンタb
>左余白ドット数L]が成立した後の処理を示す流れ
図。
FIG. 8 shows a left shift counter b in ST14 in FIG.
FIG. 9 is a flowchart showing a process after the condition of >> left margin dot number L] is satisfied.

【図9】 図6中ST6及び図7中ST21及び図8中
ST27で[編集データの印字ドットに対応するテスト
データがすべて“1”のとき]の後処理を示す流れ図。
9 is a flowchart showing post-processing in ST6 in FIG. 6, ST21 in FIG. 7, and ST27 in FIG. 8 [when all test data corresponding to print dots of the edit data are “1”].

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

11…CPU 14…ホスト装置 15…通信インタフェース 17…サーマルラインヘッド 19…フィードモータ 33…テストデータメモリ 34…編集データメモリ 11 CPU 14 Host device 15 Communication interface 17 Thermal line head 19 Feed motor 33 Test data memory 34 Edit data memory

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 複数のドット素子を印字媒体のライン方
向に配列してなるラインヘッドに対し、前記印字媒体を
前記ライン方向とは直交する方向にフィードさせて前記
印字媒体に印字を行うラインプリンタにおいて、 前記ラインヘッドを構成する各ドット素子の動作状態を
1素子ずつチェックしてドット素子毎に動作可または動
作不可の情報を記憶するヘッドチェック手段と、 前記印字媒体に印字する印字データが入力されるとその
印字データの印字ドットが前記ラインヘッドの動作不可
状態にあるドット素子の位置にあるか否かをチェックす
るデータチェック手段と、 このデータチェック手段により前記印字データの印字ド
ットが全て前記ラインヘッドの動作可状態にあるドット
素子の位置にあると判定されたとき、前記印字データを
前記ラインヘッドに出力して前記印字媒体に印字させる
正常印字制御手段と、 前記データチェック手段により前記印字データの印字ド
ットが前記ラインヘッドの動作不可状態にあるドット素
子の位置にあると判定されたとき、前記印字データを印
字ドットが前記動作不可状態にあるドット素子の位置か
ら外れるまで前記ライン方向にシフトさせる印字データ
シフト手段と、 この印字データシフト手段により前記ライン方向にシフ
トされた印字データを前記ラインヘッドに出力して前記
印字媒体に印字させるシフト印字制御手段と、を具備し
たことを特徴とするラインプリンタ。
1. A line printer that prints on a print medium by feeding the print medium in a direction perpendicular to the line direction to a line head having a plurality of dot elements arranged in the line direction of the print medium. A head checking means for checking an operation state of each dot element constituting the line head one element at a time and storing information indicating whether or not operation is possible for each dot element; and inputting print data to be printed on the print medium. Then, data check means for checking whether or not the print dots of the print data are at the positions of the dot elements in which the line head is inoperable, and all the print dots of the print data are When it is determined that the print data is at the position of the dot element in the operable state of the line head, the print data is A normal print control unit that outputs to the line head and prints on the print medium; and when the data check unit determines that the print dot of the print data is located at the position of the dot element in which the line head is inoperable. Print data shift means for shifting the print data in the line direction until the print dots deviate from the positions of the dot elements in the inoperable state, and print data shifted in the line direction by the print data shift means. And a shift print control means for outputting to a line head to print on the print medium.
【請求項2】 印字データシフト手段は、印字データの
印字ドットが動作不可状態にあるドット素子の位置から
外れるまで前記印字データをライン方向の相反する方向
に交互に数ドットずつシフトさせることを特徴とする請
求項1記載のラインプリンタ。
2. The printing data shifting means according to claim 1, wherein said printing data is alternately shifted by several dots in the opposite direction of the line direction until the printing dots of the printing data deviate from the positions of the dot elements in the inoperable state. The line printer according to claim 1, wherein
【請求項3】 データチェック手段及び印字データシフ
ト手段のうち少なくとも印字データシフト手段は、印字
媒体のライン方向に対して直交する方向に直線を引く印
字データであるときに機能することを特徴とする請求項
1記載のラインプリンタ。
3. The print data shift means of the data check means and the print data shift means functions at least when the print data has a straight line drawn in a direction perpendicular to the line direction of the print medium. The line printer according to claim 1.
JP2000085334A 2000-03-24 2000-03-24 Line printer Pending JP2001270143A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000085334A JP2001270143A (en) 2000-03-24 2000-03-24 Line printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000085334A JP2001270143A (en) 2000-03-24 2000-03-24 Line printer

Publications (1)

Publication Number Publication Date
JP2001270143A true JP2001270143A (en) 2001-10-02

Family

ID=18601688

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000085334A Pending JP2001270143A (en) 2000-03-24 2000-03-24 Line printer

Country Status (1)

Country Link
JP (1) JP2001270143A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006044027A (en) * 2004-08-04 2006-02-16 Matsushita Electric Ind Co Ltd Printer and method of printing
JP2011207076A (en) * 2010-03-30 2011-10-20 Seiko Epson Corp Method of printing barcode using line print head, and printing device
US11279160B2 (en) 2019-03-27 2022-03-22 Brother Kogyo Kabushiki Kaisha Printing apparatus
US11577525B2 (en) 2020-07-17 2023-02-14 Brother Kogyo Kabushiki Kaisha Printer, control method of printer, and non-transitory computer readable medium storing control program of printer
EP3950360B1 (en) * 2020-08-05 2024-06-12 Illinois Tool Works, Inc. Label printer with barcode shifting and scale incorporating such a label printer

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006044027A (en) * 2004-08-04 2006-02-16 Matsushita Electric Ind Co Ltd Printer and method of printing
JP2011207076A (en) * 2010-03-30 2011-10-20 Seiko Epson Corp Method of printing barcode using line print head, and printing device
US8662615B2 (en) 2010-03-30 2014-03-04 Seiko Epson Corporation Method of printing a barcode using a line printhead, and a printing
US11279160B2 (en) 2019-03-27 2022-03-22 Brother Kogyo Kabushiki Kaisha Printing apparatus
US11577525B2 (en) 2020-07-17 2023-02-14 Brother Kogyo Kabushiki Kaisha Printer, control method of printer, and non-transitory computer readable medium storing control program of printer
EP3950360B1 (en) * 2020-08-05 2024-06-12 Illinois Tool Works, Inc. Label printer with barcode shifting and scale incorporating such a label printer

Similar Documents

Publication Publication Date Title
JPS61206663A (en) Printing method in thermal printer
JP2001270143A (en) Line printer
EP0331033A2 (en) Printing system for dot-matrix printer
JPH05205084A (en) Bar code printer
JPS6151365A (en) Printing apparatus
JP2645170B2 (en) Line printer printing method
JP2907573B2 (en) Label printer
JP3076612B2 (en) Line thermal printer
JPH02258364A (en) Printer
JPS6043528B2 (en) electronic typewriter
JPH04325266A (en) Printer
JP3165346B2 (en) Serial printer
JP3044134B2 (en) Printing device
JPH0398115A (en) Sentence processor
JPH01214464A (en) Electronic typewriter
JP2003154716A (en) Printer
JPH05116363A (en) Thermal printer
KR910009595B1 (en) System for magnifying dimension of character in a daisy wheel typewriter
JPH1158873A (en) Page printer
JP2645165B2 (en) Slip printer
JPH11268355A (en) Line printer
JP2502448B2 (en) Printer
JPS59174363A (en) Printing system for dot printer
JPS60116465A (en) Printer
JPH0532243A (en) Label printer

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050817

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050823

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051019

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060328