JP3043042B2 - Thermal printer and print processing method thereof - Google Patents

Thermal printer and print processing method thereof

Info

Publication number
JP3043042B2
JP3043042B2 JP24566790A JP24566790A JP3043042B2 JP 3043042 B2 JP3043042 B2 JP 3043042B2 JP 24566790 A JP24566790 A JP 24566790A JP 24566790 A JP24566790 A JP 24566790A JP 3043042 B2 JP3043042 B2 JP 3043042B2
Authority
JP
Japan
Prior art keywords
signal
thermal
monitoring
thermal head
print
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP24566790A
Other languages
Japanese (ja)
Other versions
JPH04125166A (en
Inventor
孝 中島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP24566790A priority Critical patent/JP3043042B2/en
Publication of JPH04125166A publication Critical patent/JPH04125166A/en
Application granted granted Critical
Publication of JP3043042B2 publication Critical patent/JP3043042B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)
  • Electronic Switches (AREA)

Description

【発明の詳細な説明】 〔目次〕 概要 産業上の利用分野 従来の技術(第6図〜第8図) 発明が解決しようとする課題(第9図) 課題を解決するための手段(第1図) 作用 実施例(第2図〜第5図) 発明の効果 〔概要〕 サーマルプリンタ、特に感熱紙に熱印字をする発熱体
素子の保護機能に関し、 該発熱体素子の印字監視処理をする部品点数を多くす
ることなく、外付け回路の誤動作や制御系の暴走等を印
字制御プログラムのソフト上で監視し、これに基づいて
発熱体選択信号を出力し、該発熱体素子を保護すること
及び当該装置の低廉化を図ることを目的とし、 そのプリンタは、感熱紙を移動供給する感熱紙移動手
段と、前記感熱紙に印字をする複数の発熱体素子から成
るサーマルヘッドと、前記サーマルヘッドに発熱体選択
信号を出力するサーマルヘッド駆動制御手段と、前記サ
ーマルヘッド駆動制御手段の印字制御プログラムを監視
する信号監視手段と、前記感熱紙移動手段及びサーマル
ヘッド駆動制御手段の入出力を制御する制御手段とを具
備することを含み構成し、 前記プリンタにおいて、前記サーマルヘッド駆動制御
手段に、前記印字制御プログラムの暴走監視をする第1
のパルス幅の第1の制御信号を発生する第1の信号発生
手段と、前記サーマルヘッドを駆動する第2のパルス幅
の第2の制御信号を発生する第2の信号発生手段とが設
けられていることを含み構成する。
DETAILED DESCRIPTION OF THE INVENTION [Table of Contents] Overview Industrial application field Conventional technology (FIGS. 6 to 8) Problems to be solved by the invention (FIG. 9) Means for solving the problems (1st. Figure) Action Embodiment (FIGS. 2 to 5) Effects of the Invention [Overview] Regarding a thermal printer, in particular, a protection function of a heating element for performing thermal printing on thermal paper, a part for performing print monitoring processing of the heating element Without increasing the number of points, the malfunction of the external circuit, the runaway of the control system, etc. are monitored on the software of the print control program, and based on this, a heating element selection signal is output to protect the heating element. In order to reduce the cost of the apparatus, the printer includes a thermal paper moving unit that supplies thermal paper, a thermal head including a plurality of heating elements for printing on the thermal paper, and a thermal head. Output heating element selection signal A thermal head drive control means for controlling the thermal head drive control means, a signal monitoring means for monitoring a print control program of the thermal head drive control means, and a control means for controlling input and output of the thermal paper moving means and the thermal head drive control means. In the printer, the thermal head drive control unit includes a first control unit that monitors runaway of the print control program.
A first signal generating means for generating a first control signal having a pulse width of ??, and a second signal generating means for generating a second control signal having a second pulse width for driving the thermal head. It is configured to include.

〔産業上の利用分野〕[Industrial applications]

本発明は、サーマルプリンタ及びその印字処理方法に
関するものであり、更に詳しく言えば感熱紙に熱印字を
する発熱ヘッドの保護機能及び印字監視方法に関するも
のである。
The present invention relates to a thermal printer and a print processing method thereof, and more particularly, to a protection function of a heating head for performing thermal printing on thermal paper and a print monitoring method.

近年、感熱紙等を記録媒体として用いられる印刷機器
(以下サーマルプリンタという)が使用されている。
2. Description of the Related Art In recent years, printing apparatuses using thermal paper or the like as a recording medium (hereinafter referred to as a thermal printer) have been used.

これによれば、外付け回路の誤動作や制御系の印字プ
ログラムの暴走から発熱ヘッドを保護することができる
サーマルプリンタ及びその印字処理方法が望まれてい
る。
According to this, there is a demand for a thermal printer capable of protecting a heating head from malfunction of an external circuit and runaway of a control system print program, and a print processing method therefor.

〔従来の技術〕[Conventional technology]

第6〜第9図は、従来例に係る説明図である。 6 to 9 are explanatory diagrams according to a conventional example.

第6図は、従来例に係るサーマルプリンタの構成図を
示している。
FIG. 6 shows a configuration diagram of a thermal printer according to a conventional example.

図において、感熱紙10に熱印字をするサーマルプリン
タは、CPU1,モータ駆動制御回路2,モータ3,プラテン4,
インターフェース5,データバッファ6,文字パターン発生
回路7,印字処理監視回路8及びサーマルヘッド9から成
る。
In the figure, a thermal printer that performs thermal printing on thermal paper 10 includes a CPU 1, a motor drive control circuit 2, a motor 3, a platen 4,
It comprises an interface 5, a data buffer 6, a character pattern generation circuit 7, a print processing monitoring circuit 8, and a thermal head 9.

当該サーマルプリンタの機能は、まず、サーマルヘッ
ド9とプラテン4との間に感熱紙10が挿入され、プラテ
ン4に接続されたモータ3を介して該感熱紙10が順次送
り込まれる。次に、インターフェース5に入力された外
部入力データDINに基づいてデータバッファ6及び文字
パターン発生回路7から例えば、シリアルデータDinが
印字処理監視回路8に出力され、該データDinに基づい
て発熱体選択信号TRiがサーマルヘッド9に入力され
る。これにより、サーマルヘッド9とプラテン4との間
の感熱紙10に熱が供給され、その部分に印字することが
できる。
The function of the thermal printer is as follows. First, the thermal paper 10 is inserted between the thermal head 9 and the platen 4, and the thermal paper 10 is sequentially fed through the motor 3 connected to the platen 4. Next, for example, serial data Din is output from the data buffer 6 and the character pattern generation circuit 7 to the print processing monitoring circuit 8 based on the external input data DIN input to the interface 5, and the heating element is selected based on the data Din. The signal TRi is input to the thermal head 9. As a result, heat is supplied to the thermal paper 10 between the thermal head 9 and the platen 4, and printing can be performed on that portion.

第7図は、従来例に係る印字処理監視回路の構成図で
ある。
FIG. 7 is a configuration diagram of a print processing monitoring circuit according to a conventional example.

図において、外付け回路の誤動作や制御系の印字プロ
グラムの暴走から発熱抵抗体R1〜Rnを保護する印字処理
監視回路8は、マイクロプロッセサ(以下MPUという)8
Aと、ワンショットタイマ回路8B及び論理和反転出力回
路NA1〜NAnから成る。
In the figure, a print processing monitoring circuit 8 for protecting the heating resistors R1 to Rn from malfunctioning of an external circuit or runaway of a control system printing program includes a microprocessor (hereinafter referred to as MPU) 8
A, a one-shot timer circuit 8B and a logical sum inversion output circuit NA1 to NAn.

その機能は、MPU8Aからの印字制御信号SIをトリガ信
号として起動された印字タイミング信号TXと、シリアル
データDinを信号処理した発熱体選択信号TR1〜TRnと
を二入力NAND論理演算処理をし、複数の発熱抵抗体R1〜
Rnに出力するものである。
Its function is to perform two-input NAND logical operation processing on a print timing signal TX activated by using a print control signal SI from the MPU 8A as a trigger signal and a heating element selection signal TR1 to TRn obtained by signal processing of serial data Din. Heating resistor R1 ~
Output to Rn.

例えば、外付け回路の誤動作や制御系の印字プログラ
ムの暴走により、ある発熱抵抗体Riへの発熱体選択信号
TRi=「H」レベルが継続して出力された場合に、ワン
ショットタイマ回路8Bで発生する印字タイミング信号TX
に基づいて該発熱抵抗体Riに流れている駆動電流が断続
される。これにより、発熱抵抗体Riの保護を図ってい
る。
For example, when a heating element selection signal TRIi = “H” level is continuously output to a certain heating resistor Ri due to a malfunction of an external circuit or a runaway of a control system print program, the one-shot timer circuit 8B Generated print timing signal TX
, The driving current flowing through the heating resistor Ri is interrupted. Thereby, the heating resistor Ri is protected.

第8図は、従来例に係る印字処理方法のフローチャー
トであり、例えば、印字処理監視回路8のMPU8Aの動作
フローチャートを示している。
FIG. 8 is a flowchart of a print processing method according to a conventional example, and shows, for example, an operation flowchart of the MPU 8A of the print processing monitoring circuit 8.

図において、シリアルデータDinに基づいて複数の発
熱抵抗体R1〜Rnの選択制御をして感熱紙10に熱印字処理
をする場合、まず、ステップP1で初期設定処理をし、次
いで、ステップP2でデータ処理「Busy=L」により、シ
リアルデータDinを読み込み、ステップP3で該データDin
の入力の判断をする。この際に、入力終了の場合(YE
S)には、ステップP4でデータ処理「Busy=H」によ
り、読み込み処理を終了する。
In the figure, when performing the thermal printing process on the thermal paper 10 by performing selection control of the plurality of heating resistors R1 to Rn based on the serial data Din, first, an initial setting process is performed in Step P1, and then, in Step P2. The serial data Din is read by data processing “Busy = L”, and the data Din is read in step P3.
Judge input. At this time, if the input is completed (YE
In S), the reading process is terminated by the data process “Busy = H” in step P4.

また、ステップP5でシリアルデータDinの入力処理の
完了の判断をする。この際に、入力処理完了の場合(Y
ES)には、ステップP6で発熱抵抗体の選択処理をし、ス
テップP7で抵抗体駆動タイマの起動をする。これによ
り、選択された発熱抵抗素子Riに駆動電流が流れ、それ
が発熱することにより感熱紙10に熱を供給することがで
きる。
In step P5, it is determined whether the input processing of the serial data Din is completed. At this time, if the input processing is completed (Y
In ES), a heating resistor selection process is performed in step P6, and a resistor driving timer is started in step P7. As a result, a drive current flows through the selected heating resistance element Ri, and heat is generated to supply heat to the thermal paper 10.

その後、ステップP8で抵抗体駆動タイマの終了判断を
する。この際に、該タイマの終了の場合(YES)には、
ステップP9で発熱抵抗体R1〜Rnへの発熱体選択信号TRi
の供給をOFFして、その駆動停止処理をする。
After that, in Step P8, the termination of the resistor driving timer is determined. At this time, if the timer expires (YES),
At step P9, a heating element selection signal TRi to the heating resistors R1 to Rn.
Is turned off, and the drive stop processing is performed.

以後ステップP10で1ライン印字の終了判断,ステッ
プP11で印字処理の終了判断及びステップP12で制御処理
の終了判断をする。
Thereafter, it is determined in step P10 that one-line printing has been completed, in step P11 that printing has been completed, and in step P12 that control processing has been completed.

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

ところで、従来例によれば第9図に示すように、発熱
抵抗素子Riに駆動電流が流れる通電時間,すなわち、感
熱紙10への熱供給時間は、MPU8Aからの発熱体選択信号
TR1〜TRnの「H」レベルの継続期間に依存している。
By the way, according to the conventional example, as shown in FIG. 9, the energizing time during which the drive current flows through the heating resistance element Ri, that is, the heat supply time to the thermal paper 10, is determined by the heating element selection signals TR1 to TRn from the MPU 8A. It depends on the duration of the "H" level.

このため、発熱体選択信号TR1〜TRnが外来ノイズを
原因とする外付け回路の誤動作や制御系の印字プログラ
ムの暴走等により「H」レベルの期間が長く継続される
ことがあり、発熱抵抗素子Riが断続的に発熱をする。ま
た、その蓄熱量が多くなると焼損を招くことがある。こ
れは、ワンショットタイマ回路8Bで発生する印字タイミ
ング信号TXの「H」レベルの期間と「L」レベル期間と
の信号デューティ比(例えば、H:L=7:3)により、該発
熱抵抗体Riに流れる駆動電流が断続され、これによる発
熱抵抗体Riが異常発熱するためである。
For this reason, the heating element selection signals TR1 to TRn may continue for a long time at the "H" level due to malfunction of an external circuit due to external noise, runaway of a control system printing program, or the like. Ri intermittently generates heat. Further, when the heat storage amount increases, burning may occur. This depends on the signal duty ratio (for example, H: L = 7: 3) between the “H” level period and the “L” level period of the print timing signal TX generated by the one-shot timer circuit 8B. This is because the driving current flowing through Ri is intermittent, and the heating resistor Ri generates abnormal heat.

なお、印字タイミング信号TXのデューティ比は発熱抵
抗体Riの発熱特性(発熱対放熱特性)の関係,例えば、
感熱紙10に最適な熱印字処理をする熱量の関係から小さ
く設定することができない。また、このような印字時間
監視方式ではMPU8Aの外部に接続されるワンショットタ
イマ回路8Bや複数の論理和反転出力回路NA1〜NAnが必
要となる。
Note that the duty ratio of the print timing signal TX depends on the relationship between the heat generation characteristics (heat generation and heat radiation characteristics) of the heat generating resistor Ri, for example,
It cannot be set to a small value because of the amount of heat for performing the optimal thermal printing process on the thermal paper 10. In addition, such a print time monitoring method requires a one-shot timer circuit 8B connected to the outside of the MPU 8A and a plurality of logical sum inversion output circuits NA1 to NAn.

これにより、発熱抵抗体Riの異常発熱が原因となっ
て、貴重な印刷情報が欠落し、解像度の良い印字処理が
できない。このことから当該サーマルプリンタの信頼性
が低下したり、また、その低廉化の妨げとなるという問
題がある。
As a result, precious print information is lost due to abnormal heating of the heating resistor Ri, and printing processing with high resolution cannot be performed. As a result, there is a problem that the reliability of the thermal printer is reduced and that the thermal printer is hindered from being reduced in cost.

本発明は、かかる従来例の問題点に鑑みて創作された
ものであり、発熱体素子の印字監視処理をする部品点数
を多くすることなく、外付け回路の誤動作や制御系の暴
走等を印字制御プログラムのソフト上で監視し、これに
基づいて発熱体選択信号を出力し、該発熱体素子を保護
すること及び当該装置の低廉化を図ることが可能となる
サーマルプリンタ及びその印字処理方法の提供を目的と
する。
The present invention has been made in view of the problems of the conventional example, and prints out malfunctions of an external circuit or runaway of a control system without increasing the number of components for performing print monitoring processing of a heating element. A thermal printer and a print processing method for monitoring a software program of a control program and outputting a heating element selection signal based on the monitoring program to protect the heating element and reduce the cost of the apparatus. For the purpose of providing.

〔課題を解決するための手段〕[Means for solving the problem]

本発明のサーマルプリンタは、第1図に示すように、
感熱紙16を移動供給する感熱紙移動手段11と、前記感熱
紙16に印字をする複数の発熱体素子R1、R2、Ri、Rnから
成るサーマルヘッド12と、前記サーマルヘッド12に発熱
体選択信号TRiを出力するサーマルヘッド駆動制御手段
13と、前記サーマルヘッド駆動制御手段13の印字制御プ
ログラムを監視する信号監視手段14と、前記感熱紙移動
手段11及びサーマルヘッド駆動制御手段13の入出力を制
御する制御手段15とを具備し、前記サーマルヘッド駆動
制御手段13が前記印字制御プログラムの各処理ルーチン
数の計数処理をして該印字制御プログラムの実行状態の
良否を判断することを特徴とする。
The thermal printer of the present invention, as shown in FIG.
A thermal paper moving means 11 for supplying thermal paper 16, a thermal head 12 comprising a plurality of heating elements R1, R2, Ri, Rn for printing on the thermal paper 16, and a heating element selection signal to the thermal head 12; Thermal head drive control means for outputting TRi
13, a signal monitoring means 14 for monitoring the print control program of the thermal head drive control means 13, and a control means 15 for controlling the input and output of the thermal paper moving means 11 and the thermal head drive control means 13, The thermal head drive control means 13 counts the number of each processing routine of the print control program and determines whether the execution state of the print control program is good or not.

また、前記サーマルプリンタにおいて、前記信号監視
手段14は、前記サーマルヘッド駆動制御手段13からの被
監視信号TPRに基づいて前記印字制御プログラムを初期
設定する動作解除信号RSTを出力することを特徴とす
る。
In the thermal printer, the signal monitoring means 14 outputs an operation release signal RST for initializing the print control program based on the monitored signal TPR from the thermal head drive control means 13. .

また、感熱紙16を移動供給する感熱紙移動手段11と、
前記感熱紙16に印字をする複数の発熱体素子R1、R2、R
i、Rnから成るサーマルヘッド12と、前記サーマルヘッ
ド12に発熱体選択信号TRiを出力するサーマルヘッド駆
動制御手段13と、前記サーマルヘッド駆動制御手段13の
印字制御プログラムを監視する信号監視手段14と、前記
感熱紙移動手段11及びサーマルヘッド駆動制御手段13の
入出力を制御する制御手段15とを具備し、前記サーマル
ヘッド駆動制御手段13に、前記印字制御プログラムの暴
走を監視する第1のパルス幅φ1の第1の制御信号S1を
発生する第1の信号発生手段13Aと、前記発熱体選択信
号(TRi)を生成する第2のパルス幅φ2の第2の制御
信号S2を発生する第2の信号発生手段13Bとが設けら
れ、前記第1の制御信号S1のパルス幅φ1は前記第2の
制御信号S2のパルス幅φ2よりも長く、かつ、前記第1
の信号発生手段13Aの割り込み順位が前記第2の信号発
生手段13Bの割り込み順位よりも優先されることを特徴
とする。
A thermal paper moving means 11 for supplying thermal paper 16;
A plurality of heating elements R1, R2, R for printing on the thermal paper 16
i, Rn; a thermal head drive control means 13 for outputting a heating element selection signal TRi to the thermal head 12; a signal monitoring means 14 for monitoring a print control program of the thermal head drive control means 13. A control means 15 for controlling the input and output of the thermal paper moving means 11 and the thermal head drive control means 13. A first pulse for monitoring runaway of the print control program is provided to the thermal head drive control means 13. A first signal generating means 13A for generating a first control signal S1 having a width φ1, and a second signal generating means for generating a second control signal S2 having a second pulse width φ2 for generating the heating element selection signal (TRi). Signal generation means 13B, the pulse width φ1 of the first control signal S1 is longer than the pulse width φ2 of the second control signal S2, and
The priority of the interrupt of the signal generating means 13A is given priority over the priority of the interrupt of the second signal generating means 13B.

さらに、感熱紙16を移動供給する感熱紙移動手段11
と、前記感熱紙16に印字をする複数の発熱体素子R1、R
2、Ri、Rnから成るサーマルヘッド12と、前記サーマル
ヘッド12に発熱体選択信号TRiを出力するサーマルヘッ
ド駆動制御手段13と、前記サーマルヘッド駆動制御手段
13の印字制御プログラムを監視する信号監視手段14と、
前記感熱紙移動手段11及びサーマルヘッド駆動制御手段
13の入出力を制御する制御手段15とを具備し、前記サー
マルヘッド駆動制御手段13の印字制御プログラムの監視
処理をしながら印字データDinに基づいて発熱体素子R
1、R2、Ri、Rnの選択処理をし、前記選択処理に基づい
て感熱紙16に印字処理をすることを特徴とする。
Further, the thermal paper moving means 11 for moving and supplying the thermal paper 16
And a plurality of heating elements R1, R for printing on the thermal paper 16.
2, a thermal head 12 comprising Ri, Rn, a thermal head drive control means 13 for outputting a heating element selection signal TRi to the thermal head 12, and a thermal head drive control means
Signal monitoring means 14 for monitoring the print control program 13;
Thermal paper moving means 11 and thermal head drive control means
Control means 15 for controlling the input / output of the heating element element 13 based on the print data Din while monitoring the print control program of the thermal head drive control means 13.
1, R2, Ri, and Rn are selected, and printing is performed on the thermal paper 16 based on the selection.

〔作用〕[Action]

本発明のサーマルプリンタによれば、第1図に示すよ
うに、感熱紙移動手段11,複数の発熱体素子R1,R2,Ri,Rn
から成るサーマルヘッド12,サーマルヘッド駆動制御手
段13,信号監視手段14及び制御手段15とが具備され、該
駆動制御手段13に第1,第2の信号発生手段13Aが設けら
れている。
According to the thermal printer of the present invention, as shown in FIG. 1, the thermal paper moving means 11, a plurality of heating elements R1, R2, Ri, Rn.
A thermal head 12, a thermal head drive control means 13, a signal monitoring means 14 and a control means 15 are provided. The drive control means 13 is provided with first and second signal generation means 13A.

例えば、感熱紙移動手段11により移動供給される感熱
紙16に印字処理をする場合、複数の発熱体素子R1,R2,R
i,Rnから成るサーマルヘッド12に、サーマルヘッド駆動
制御手段13から第2のパルス幅φ2の第2の制御信号S2
に基づく発熱体選択信号TRiが出力される。この際に、
サーマルヘッド駆動制御手段13の印字制御プログラムが
信号監視手段14により監視される。
For example, when printing is performed on the thermal paper 16 which is moved and supplied by the thermal paper moving means 11, a plurality of heating elements R1, R2, R
The thermal head drive control means 13 sends a second control signal S2 having a second pulse width φ2 to the thermal head 12 comprising i, Rn.
Is output based on the heating element selection signal TRi. At this time,
The print control program of the thermal head drive control means 13 is monitored by the signal monitoring means 14.

すなわち、信号監視手段14は、サーマルヘッド駆動制
御手段13が印字制御プログラムを実行する際に発生する
被監視信号TPRを常に監視している。例えば、被監視信
号TPRはサーマルヘッド駆動制御手段13が印字制御プロ
グラムを実行する際に発生する信号であり、それが外付
け回路の誤動作や制御系の暴走等により異常となった場
合、印字制御プログラムを初期設定する動作解除信号R
STが信号監視手段14からサーマルヘッド駆動制御手段13
に出力される。
That is, the signal monitoring means 14 constantly monitors the monitored signal TPR generated when the thermal head drive control means 13 executes the print control program. For example, the monitored signal TPR is a signal generated when the thermal head drive control means 13 executes the print control program. If the signal TPR becomes abnormal due to malfunction of an external circuit or runaway of the control system, the print control signal TPR Operation release signal R for initializing the program
ST switches from signal monitoring means 14 to thermal head drive control means 13
Is output to

このため、感熱紙16への熱の供給タイミング制御をす
る発熱体選択信号TRi自体の出力処理が停止され、全発
熱体素子R1,R2,Ri,Rnに流れる駆動電流をOFFすること
が可能となる。なお、第1の制御信号S1のパルス幅φ1
が第2の制御信号S2のパルス幅φ2よりも長く、かつ、
第1の信号発生手段13Aの割り込み順位が第2の信号発
生手段13Bの割り込み順位よりも優先されているため、
正常時のリセット動作を防止することができる。
For this reason, the output processing of the heating element selection signal TRi itself for controlling the timing of supplying heat to the thermal paper 16 is stopped, and the drive current flowing through all the heating element R1, R2, Ri, Rn can be turned off. Become. Note that the pulse width φ1 of the first control signal S1 is
Is longer than the pulse width φ2 of the second control signal S2, and
Since the order of interruption of the first signal generating means 13A has priority over the order of interruption of the second signal generating means 13B,
The reset operation in a normal state can be prevented.

これにより、従来例の印字時間監視方式に比べて外付
け回路の誤動作や制御系の暴走等から発熱体素子R1,R2,
Ri,Rnを十分に保護することが可能となる。
As a result, compared to the conventional printing time monitoring method, the heating elements R1, R2,
Ri and Rn can be sufficiently protected.

さらに、本発明の印字処理方法によれば、サーマルヘ
ッド駆動制御手段13の印字制御プログラムの監視処理を
しながら印字データDinに基づいて発熱体素子R1,R2,Ri,
Rnの選択処理をしている。
Further, according to the print processing method of the present invention, the heating element R1, R2, Ri, based on the print data Din while monitoring the print control program of the thermal head drive control means 13.
Rn is being selected.

例えば、該監視処理は、サーマルヘッド駆動制御手段
13により、印字制御プログラムの各処理ルーチン数の計
数処理に基づいて認識処理される。
For example, the monitoring processing is performed by a thermal head drive control unit.
By 13, recognition processing is performed based on the count processing of each processing routine number of the print control program.

このため、入出力線レベル検出処理,発熱体素子選択
処理,暴走監視タイマ起動処理及び発熱体駆動タイマ起
動処理等の処理ルーチン数が予め設定された計数に達し
ない場合やそれを越える場合には、印字処理に移行せず
初期化設定をする例えば、無限処理ループに移行され
る。このことで、外付け回路の誤動作を原因とする印字
制御プログラムの暴走をソフト上で監視することが可能
となる。
Therefore, when the number of processing routines, such as the input / output line level detection processing, the heating element selection processing, the runaway monitoring timer activation processing, and the heating element driving timer activation processing, does not reach or exceeds a preset count, In this case, initialization is performed without shifting to the printing process. This makes it possible to monitor software runaway of the print control program caused by a malfunction of the external circuit.

これにより、従来例の印字時間監視方式に用いられて
いたワンショットタイマ回路8Bや複数の論理和反転出力
回路NA1〜NAnが不要となることから発熱体素子の印字
監視処理をする部品点数を削減することができ、当該プ
リンタの低廉化を図ることが可能となる。
This eliminates the need for the one-shot timer circuit 8B and the plurality of OR-inverted output circuits NA1 to NAn used in the conventional print time monitoring method, thereby reducing the number of components for performing print monitoring processing of the heating element. And the cost of the printer can be reduced.

〔実施例〕〔Example〕

次に図を参照しながら本発明の実施例について説明を
する。
Next, an embodiment of the present invention will be described with reference to the drawings.

第2〜5図は、本発明の実施例に係るサーマルプリン
タ及びその印字処理方法の説明図であり、第2図は、本
発明の実施例に係るサーマルプリンタの構成図を示して
いる。
2 to 5 are explanatory views of a thermal printer according to an embodiment of the present invention and a print processing method thereof, and FIG. 2 is a configuration diagram of the thermal printer according to the embodiment of the present invention.

図において、21A〜21Cは感熱紙移動手段11の一実施例
となるモータ制御駆動回路,モータ及びプラテンをそれ
ぞれ示している。その機能は、モータ制御駆動回路21A
によりモータ21Bが駆動されることにより、プラテン21C
に挿入された感熱紙16を移動供給するものである。
In the figure, reference numerals 21A to 21C denote a motor control drive circuit, a motor, and a platen, respectively, which are one embodiment of the thermal paper moving means 11. Its function is the motor control drive circuit 21A
The motor 21B is driven by the
The thermal paper 16 inserted into the paper is moved and supplied.

22はサーマルヘッド12の一実施例となる発熱ヘッド制
御部であり、複数の発熱体素子R1〜Rnの一例となるn個
の発熱抵抗体と、それを選択制御するスイッチングトラ
ンジスタTr1〜Trnから成る。発熱ヘッド制御部22の機能
は、MPU23からの複数の発熱体選択信号TR1〜TRnに基
づいて電源VPに接続された発熱抵抗体R1〜Rnを該トラン
ジスタTr1〜Trnを介して接地線0Vに接続するものであ
る。これにより、選択された該抵抗体R1〜Rnに駆動電流
が流れ、感熱紙16に熱を供給することができる。
Reference numeral 22 denotes a heating head control unit as an embodiment of the thermal head 12, which includes n heating resistors as an example of a plurality of heating elements R1 to Rn, and switching transistors Tr1 to Trn for selectively controlling the heating resistors. . The function of the heating head control unit 22 is to connect the heating resistors R1 to Rn connected to the power supply VP to the ground line 0V via the transistors Tr1 to Trn based on a plurality of heating element selection signals TR1 to TRn from the MPU 23. Is what you do. As a result, a drive current flows through the selected resistors R1 to Rn, and heat can be supplied to the thermal paper 16.

23はサーマルヘッド駆動制御手段13の一例となるMPU
であり、信号入出力部23A,RAM23B,演算処理部23C,監視
用タイマ23D,駆動用タイマ23E,データ認識・確認部23F,
クロック発生部23Gから成る。
An MPU 23 is an example of the thermal head drive control means 13.
Signal input / output unit 23A, RAM 23B, arithmetic processing unit 23C, monitoring timer 23D, driving timer 23E, data recognition / confirmation unit 23F,
It consists of a clock generator 23G.

すなわち、信号入出力部23Aは、外部制御信号S0,シリ
アルデータDin,複数の発熱体選択信号TR1〜TRn,動作
解除信号(以下リセット信号という)RST及び被監視信
号TPRの入出力をするものである。また、RAM(レジス
タ)23Bは印字処理ルーチンの順序付けと同時に、実行
処理ルーチン数を計数処理するものである。例えば、該
計数処理は入出力線レベル検出処理,発熱体素子選択処
理,暴走監視タイマ起動処理及び発熱体駆動タイマ起動
処理等の処理ルーチン数をカウント処理してプログラム
実行の良否を判断するものである。演算処理部23Cは各
種データの演算処理をするものである。例えば、予め設
定された計数と処理ルーチン数との比較処理をし、該比
較結果に応じて印字処理に移行せずにプログラムを初期
化設定するものである。
That is, the signal input / output unit 23A inputs and outputs the external control signal S0, the serial data Din, the plurality of heating element selection signals TR1 to TRn, the operation release signal (hereinafter referred to as a reset signal) RST, and the monitored signal TPR. is there. The RAM (register) 23B counts the number of execution processing routines simultaneously with the ordering of the printing processing routines. For example, the counting process counts the number of processing routines such as an input / output line level detection process, a heating element selection process, a runaway monitoring timer activation process, and a heating element drive timer activation process, and determines whether or not the program is executed. is there. The arithmetic processing unit 23C performs arithmetic processing of various data. For example, comparison processing is performed between a preset count and the number of processing routines, and a program is initialized and set according to the comparison result without shifting to printing processing.

さらに、監視用タイマ23Dは第1の信号発生手段13Aの
一例であり、第1のパルス幅φ1の第1の制御信号S1を
発生するものである。この第1の制御信号S1が本発明の
実施例では、暴走監視タイマ信号となる。また、駆動用
タイマ23Eは、第2の信号発生手段13Bの一例であり、第
2のパルス幅φ2の第2の制御信号S2を発生するもので
ある。本発明の実施例では、この第2の制御信号S2が抵
抗体駆動タイマ信号となる。これに基づいて複数の発熱
体選択信号TR1〜TRnが生成されている。なお、暴走監
視タイマ信号S1のパルス幅φ1が抵抗体駆動タイマ信号
S2のパルス幅φ2よりも長く設定されている。また、監
視用タイマ23Dの割り込み順位が駆動用タイマ23Eの割り
込み順位よりも優先されている。
Further, the monitoring timer 23D is an example of the first signal generating means 13A, and generates the first control signal S1 having the first pulse width φ1. This first control signal S1 is a runaway monitoring timer signal in the embodiment of the present invention. Further, the driving timer 23E is an example of the second signal generating means 13B, and generates the second control signal S2 having the second pulse width φ2. In the embodiment of the present invention, the second control signal S2 is a resistor driving timer signal. Based on this, a plurality of heating element selection signals TR1 to TRn are generated. Note that the pulse width φ1 of the runaway monitoring timer signal S1 is the resistor driving timer signal.
It is set longer than the pulse width φ2 of S2. In addition, the order of interruption of the monitoring timer 23D has priority over the order of interruption of the driving timer 23E.

さらに、データ命令・認識・確認部23Fは、信号入出
力部23Aで入出力する信号のレベルや印字制御プログラ
ムの正常・異常等を確認したり、被監視信号TPRの供給
指示をするものである。クロック発生部23Gは、基準ク
ロックCLKを発生するものである。なお、本発明の実施
例の被監視信号TPRは、基準クロックCLKに基づいて当
該MPU23が印字制御プログラムを実行する場合であっ
て、データ命令・認識・確認部23Fの供給指示により該M
PU23からリッセト回路装置24に出力されるものである。
この点が従来例のMPUの機能と異なるところである。
Further, the data command / recognition / confirmation unit 23F is for confirming the level of the signal input / output by the signal input / output unit 23A, the normality / abnormality of the print control program, and instructing the supply of the monitored signal TPR. . The clock generator 23G generates a reference clock CLK. The monitored signal TPR according to the embodiment of the present invention is used when the MPU 23 executes the print control program based on the reference clock CLK, and is supplied by the data command / recognition / confirmation unit 23F.
This is output from the PU 23 to the reset circuit device 24.
This is a point different from the function of the conventional MPU.

24は監視手段14の一実施例となるリセット回路装置
(ウオッチドッグ機能付リセットIC)であり、MPU23が
印字制御プログラムを実行する際に発生する被監視信号
TPRに基づいてリセット信号RSTを出力するものであ
る。例えば、被監視信号TPRを常に監視し、外付け回路
の誤動作や制御系の暴走等により該信号TPRが異常とな
った場合、リセット信号RSTを出力し、印字制御プログ
ラムを初期設定するものである(第3図(b)参照)。
Reference numeral 24 denotes a reset circuit device (reset IC with a watchdog function) as an embodiment of the monitoring means 14, which outputs a reset signal RST based on a monitored signal TPR generated when the MPU 23 executes the print control program. Things. For example, the monitored signal TPR is constantly monitored, and when the signal TPR becomes abnormal due to malfunction of an external circuit or runaway of a control system, a reset signal RST is output to initialize a print control program. (See FIG. 3 (b)).

25は制御手段15の一例となるホストCPUであり、モー
タ制御駆動回路21A,データバッファ26及びMPU23の入出
力を制御するものである。例えば、印字処理メインルー
チンを起動する外部制御信号S0を出力するものである。
Reference numeral 25 denotes a host CPU which is an example of the control means 15 and controls input and output of the motor control drive circuit 21A, the data buffer 26, and the MPU 23. For example, it outputs an external control signal S0 for starting a print processing main routine.

なお、26はデータバッファ,27は文字パターン発生回
路,28はインターフェースをそれぞれ示している。その
機能は、該CPU25や外部入力データDINに基づいてデー
タバッファ26が動作され、これにより、文字パターン発
生回路27からシリアルデータDinがMPU23に供給されるも
のである。
26 indicates a data buffer, 27 indicates a character pattern generation circuit, and 28 indicates an interface. The function is such that the data buffer 26 is operated based on the CPU 25 and the external input data DIN, whereby the serial data Din is supplied from the character pattern generation circuit 27 to the MPU 23.

このようにして、本発明の実施例に係るサーマルプリ
ンタによれば、第2図に示すように、モータ制御駆動回
路21A,モータ21B,プラテン21C,複数の発熱抵抗体R1,R2,
Ri,Rnから成る発熱ヘッド制御部22,MPU23,リセット回路
装置24,ホストCPU25,データバッファ26,文字パターン発
生回路27等が具備され、該MPU23に監視用タイマ(以下
タイマT1という)23D,駆動用タイマ(以下タイマT2とい
う)23Eが設けられている。
Thus, according to the thermal printer according to the embodiment of the present invention, as shown in FIG. 2, the motor control drive circuit 21A, the motor 21B, the platen 21C, the plurality of heating resistors R1, R2,
A heating head control unit 22 composed of Ri and Rn, an MPU 23, a reset circuit device 24, a host CPU 25, a data buffer 26, a character pattern generation circuit 27, and the like are provided. The MPU 23 has a monitoring timer (hereinafter, referred to as a timer T1) 23D. A timer (hereinafter referred to as timer T2) 23E is provided.

例えば、モータ制御駆動回路21A,モータ21B及びプラ
テン21Cにより移動供給される感熱紙16に印字処理をす
る場合、複数の発熱抵抗体R1,R2,Ri,Rnから成る発熱ヘ
ッド制御部22に、MPU23から第2のパルス幅φ2の第2
の制御信号S2に基づく発熱体選択信号TRiが出力され
る。この際に、MPU23の印字制御プログラムがリセット
回路装置24により監視される。
For example, when performing printing processing on the thermal paper 16 that is moved and supplied by the motor control drive circuit 21A, the motor 21B, and the platen 21C, the MPU 23 is provided to the heating head control unit 22 including a plurality of heating resistors R1, R2, Ri, and Rn. From the second pulse width φ2
A heating element selection signal TRi based on the control signal S2 is output. At this time, the print control program of the MPU 23 is monitored by the reset circuit device 24.

すなわち、第3図(a),(b)の監視動作タイムチ
ャートに示すように、リセット回路装置24は、MPU23が
印字制御プログラムを実行する際に発生する被監視信号
TPRを常に監視している。例えば、印字制御プログラム
が正常に実行されている場合には、被監視信号TPRが規
則正しくMPU23から出力されくる。これにより、発熱体
選択信号TR1〜TRnが各発熱抵抗体R1,R2,Ri,Rnに出力
される(同図(a)参照)。
That is, as shown in the monitoring operation time charts of FIGS. 3A and 3B, the reset circuit device 24 constantly monitors the monitored signal TPR generated when the MPU 23 executes the print control program. . For example, when the print control program is executed normally, the monitored signal TPR is regularly output from the MPU 23. Thus, the heating element selection signals TR1 to TRn are output to the respective heating resistors R1, R2, Ri, Rn (see FIG. 7A).

また、被監視信号TPRが外付け回路の誤動作や制御系
の暴走等により異常となった場合、印字制御プログラム
を初期設定するリセット信号RSTがリセット回路装置24
からMPU23に出力される。
If the monitored signal TPR becomes abnormal due to malfunction of an external circuit or runaway of a control system, a reset signal RST for initializing a print control program is output to the reset circuit device 24.
Is output to the MPU23.

このため、感熱紙16への熱の供給タイミング制御をす
る発熱体選択信号TR1〜TRn自体の出力処理が停止され
る(同図(b)参照)。このことで、全発熱体素子R1,R
2,Ri,Rnに流れる駆動電流をOFFすることが可能とな
る。なお、暴走監視タイマ信号S1のパルス幅φ1が抵抗
体駆動タイマ信号S2のパルス幅φ2よりも長く、かつ、
タイマT1の割り込み順位がタイマT2の割り込み順位より
も優先されている。このため、正常時のリセット動作を
防止することができる。
Therefore, the output processing of the heating element selection signals TR1 to TRn for controlling the timing of supplying heat to the thermal paper 16 is stopped (see FIG. 9B). As a result, all the heating elements R1, R
2. It becomes possible to turn off the drive current flowing through Ri and Rn. Note that the pulse width φ1 of the runaway monitoring timer signal S1 is longer than the pulse width φ2 of the resistor driving timer signal S2, and
The interrupt order of the timer T1 has priority over the interrupt order of the timer T2. For this reason, a normal reset operation can be prevented.

これにより、従来例の印字時間監視方式に比べて外付
け回路の誤動作や制御系の暴走等から発熱抵抗体R1,R2,
Ri,Rnを十分に保護することが可能となる。
As a result, compared to the conventional printing time monitoring method, the heating resistors R1, R2,
Ri and Rn can be sufficiently protected.

次に、本発明の実施例に係るサーマルプリンタの印字
処理方法について当該プリンタの動作を補足しながら説
明をする。
Next, a print processing method of the thermal printer according to the embodiment of the present invention will be described while supplementing the operation of the printer.

第4図は、本発明の実施例に係る印字処理方法のフロ
ーチャートであり、第5図は、そのプログラム順位確認
の処理フローチャートをそれぞれ示している。
FIG. 4 is a flowchart of the print processing method according to the embodiment of the present invention, and FIG. 5 is a flowchart of the processing for checking the program order.

例えば、第2図に示すようなシリアルデータDinに基
づいて複数の発熱抵抗体R1〜Rnの選択制御をして感熱紙
16にライン状に熱印字処理をするラインドット印字方式
の場合、第4図において、まず、ステップP1で被監視信
号TPR(以下TPR信号という)の供給指示をする。この
際に、ホストCPU25からの外部制御信号S0に基づいて、M
PU23のデータ命令・認識・確認部23Fの供給指示命令に
より、被監視信号TPRが該MPU23からリッセト回路装置2
4に出力される。
For example, based on the serial data Din as shown in FIG.
In the case of the line dot printing system in which the thermal printing process is performed in a line shape in FIG. 16, first, in FIG. At this time, based on an external control signal S0 from the host CPU 25, M
The monitored signal TPR is transmitted from the MPU 23 to the reset circuit device 2 by the data command of the PU 23 and the supply instruction command of the recognition / confirmation unit 23F.
Output to 4.

次いで、ステップP2で初期設定処理をする。この初期
設定処理は、印字制御プログラムの初期値をRAM23B(レ
ジスタ等)に設定するものである。
Next, an initial setting process is performed in Step P2. This initial setting process sets the initial value of the print control program in the RAM 23B (register, etc.).

次に、ステップP3でデータ処理「Busy=L」により、
シリアルデータDinを読み込み処理をする。この際に、
該CPU25や外部入力データDINに基づいてデータバッフ
ァ26が動作され、これにより、文字パターン発生回路27
からシリアルデータDinがMPU23に供給されるものであ
る。
Next, in step P3, the data processing “Busy = L”
Reads serial data Din and performs processing. At this time,
The data buffer 26 is operated based on the CPU 25 and the external input data DIN.
Is supplied to the MPU 23.

その後、ステップP4で該データDinの入力の判断をす
る。この際に、入力終了の場合(YES)には、ステップ
P6でデータ処理「Busy=H」により、読み込み処理を終
了する。入力終了でない場合(NO)には、ステップP5で
TPR信号の供給指示をする。
Thereafter, in step P4, the input of the data Din is determined. At this time, if the input is completed (YES), step
At P6, the reading process is completed by the data process “Busy = H”. If the input is not completed (NO), an instruction to supply a TPR signal is issued in step P5.

従って、入力終了の場合(YES)には、ステップP6で
データ処理「Busy=H」により、読み込み処理を終了す
る。
Therefore, when the input is completed (YES), the reading process is completed by the data process “Busy = H” in step P6.

さらに、ステップP7でシリアルデータDinの入力処理
の完了の判断をする。この際に、入力処理完了の場合
(YES)には、ステップP8に移行する。また、入力処理
完了でないの場合(NO)には、ステップP3に戻る。
Further, in step P7, it is determined whether the input processing of the serial data Din is completed. At this time, if the input processing is completed (YES), the flow shifts to Step P8. If the input process has not been completed (NO), the process returns to step P3.

従って、入力処理完了の場合(YES)には、ステップ
P8でTPR信号の供給指示をする。
Therefore, if the input processing is completed (YES), the step
At P8, a TPR signal supply instruction is issued.

その後、ステップP9で各信号線のレベルチェック処理
をする。この際に、データ命令・認識・確認部23Fが信
号入出力部23Aで入出力する信号のレベルを印字制御プ
ログラムに基づいて正常・異常等を確認する。
Thereafter, in step P9, a level check process for each signal line is performed. At this time, the data command / recognition / confirmation unit 23F confirms the level of the signal input / output by the signal input / output unit 23A as normal / abnormal based on the print control program.

次いで、ステップP10で発熱抵抗体R1,R2,Ri,Rnの選択
処理をする。この選択処理は、シリアルデータDinに基
づいて感熱紙16にライン状に熱印字処理をする発熱抵抗
体R1〜Rnを選択するものである。
Next, in step P10, a heating resistor R1, R2, Ri, Rn is selected. In this selection process, the heating resistors R1 to Rn for performing the thermal printing process on the thermal paper 16 in a line shape based on the serial data Din are selected.

次に、ステップP11で同一抵抗体R1,R2,Ri,Rnが継続し
て選択された否かの判断処理をする。この際に、第3図
(b)のに示すように、同一抵抗体R1,R2,Ri,Rnが継
続して選択された場合(YES)には、異常時であるため
ステップP23に移行する。また、それが継続して選択さ
れない場合(NO)には、正常時であるためステップP12
に移行する。
Next, in step P11, a determination is made as to whether or not the same resistors R1, R2, Ri, Rn have been continuously selected. At this time, as shown in FIG. 3 (b), if the same resistors R1, R2, Ri, Rn are continuously selected (YES), the process proceeds to step P23 because it is abnormal. . If it is not selected continuously (NO), it is normal and step P12
Move to

ここで、ステップP23に移行された場合(YES)に
は、各信号線の初期設定処理をし、ステップP24に移行
して、ホストCPU25にエラー表示をするとともに無限ル
ープに移行する。この際に、リセット回路装置24への被
監視信号TPRが同一抵抗体Riの継続選択時(異常)と
なることから該装置24からのリセット信号RSTが正常時
「H」レベルが「L」レベルに変化し、印字制御プログ
ラムを初期設定するものである。これにより、印字処理
実行せずに発熱体選択信号TR1〜TRnの供給が行われず
駆動停止される(第3図(b)参照)。
Here, if the process has proceeded to Step P23 (YES), an initial setting process for each signal line is performed, the process proceeds to Step P24, an error is displayed on the host CPU 25, and the process proceeds to an infinite loop. At this time, since the monitored signal TPR to the reset circuit device 24 is selected when the same resistor Ri is continuously selected (abnormal), the "H" level is changed to the "L" level when the reset signal RST from the device 24 is normal. And the print control program is initialized. As a result, the driving is stopped without supplying the heating element selection signals TR1 to TRn without executing the printing process (see FIG. 3B).

なお、同一抵抗体Riが継続して選択されない場合(N
O)には、正常時であるためステップP12でプログラム順
位の確認処理をする。この際に、第5図に示すように、
ステップP12Aで各信号線レベルチェックルーチンの第1
順位ビットの入力処理をする。これにより、計数1がRA
M23Bに書き込まれる。次いで、ステップP12Bで発熱体選
択処理ルーチンの第2順位ビットの入力処理をする。こ
れにより、計数1がRAM23Bに書き込まれる。さらに、ス
テップP12Cで暴走監視用タイマT1の起動処理ルーチンの
第3順位ビットの入力処理をする。これにより、計数1
がRAM23Bに書き込まれる。また、ステップP12Dで抵抗体
駆動用タイマT2の起動処理ルーチンの第4順位ビットの
入力処理をする。これにより、計数1がRAM23Bに書き込
まれる。
When the same resistor Ri is not continuously selected (N
In O), since the operation is normal, the program order is confirmed in step P12. At this time, as shown in FIG.
In step P12A, the first of the signal line level check routines
Performs input processing of rank bits. Thus, the count 1 becomes RA
Written to M23B. Next, in step P12B, input processing of the second order bit of the heating element selection processing routine is performed. Thereby, the count 1 is written into the RAM 23B. Further, in step P12C, input processing of the third order bit of the startup processing routine of the runaway monitoring timer T1 is performed. Thus, the count 1
Is written to the RAM 23B. In step P12D, the input processing of the fourth order bit of the activation processing routine of the resistor driving timer T2 is performed. Thereby, the count 1 is written into the RAM 23B.

その後、ステップP12Eで入力ビット計数の比較処理を
する。この際に、入力ビット計数が予め設定された計数
=4と同等となる場合(YES)には、処理ルーチン順位
正常であるためステップP13に移行する。また、それが
同等とならない場合(NO)には、処理ルーチン順位異常
であるためステップP23,P24に移行して印字処理を停止
する無限ループに移行する。
Thereafter, in step P12E, the input bit count is compared. At this time, if the input bit count is equal to the preset count = 4 (YES), the processing routine rank is normal, and the routine shifts to Step P13. On the other hand, if they are not equal (NO), the process routine order is abnormal, and the process proceeds to steps P23 and P24 to enter an infinite loop for stopping the printing process.

従って、計数=4と同等となる場合(YES)には、第
4図に戻ってステップP13で、暴走監視用タイマ1の起
動処理をする。この際に、タイマT1が第1のパルス幅φ
1の暴走監視タイマ信号S1を発生する。
Therefore, when the count becomes equal to 4 (YES), the process returns to FIG. 4, and in step P13, the runaway monitoring timer 1 is started. At this time, the timer T1 sets the first pulse width φ
A runaway monitoring timer signal S1 is generated.

その後、ステップP14で抵抗体駆動用タイマT2の起動
処理をする。この際に、タイマT2が第2のパルス幅φ2
の抵抗体駆動タイマ信号S2を発生する。これにより、抵
抗体駆動タイマ信号S2に基づいて複数の発熱体選択信号
TR1〜TRnが生成され、これにより選択された発熱抵抗
素子Riに駆動電流が流れ、それが発熱することにより感
熱紙16に熱を供給することができる。
After that, in step P14, a startup process of the resistor driving timer T2 is performed. At this time, the timer T2 sets the second pulse width φ2
Generates a resistor driving timer signal S2. As a result, a plurality of heating element selection signals TR1 to TRn are generated based on the resistor driving timer signal S2, and a driving current flows through the selected heating resistance element Ri. Heat can be supplied.

次いで、ステップP15でTPR信号の供給指示をする。 Next, in step P15, an instruction to supply a TPR signal is issued.

次に、ステップP16で抵抗体駆動用タイマT2の動作が
終了したか否かの判断処理をする。この際に、該タイマ
T2の動作が終了しない場合(NO)には、ステップP17に
移行する。また、それが終了した場合(YES)には、ス
テップP18に移行してTPR信号の供給指示をする。
Next, in step P16, it is determined whether or not the operation of the resistor driving timer T2 has been completed. At this time, the timer
When the operation of T2 is not completed (NO), the process shifts to Step P17. When the processing is completed (YES), the flow shifts to step P18 to instruct the supply of the TPR signal.

さらに、ステップP17では暴走監視用タイマT1の動作
が終了したか否かの判断処理をする。この判断処理は、
暴走監視が正常に行われているか否かを確認するもので
ある。これは、抵抗体駆動用タイマT2の動作しているの
にもかかわらず外付け回路の誤動作や制御系の暴走等に
より暴走監視用タイマT1の動作が停止をして、監視処理
が続行できなくなるのを防止するためである。
Further, in step P17, a determination is made as to whether or not the operation of the runaway monitoring timer T1 has been completed. This judgment process
This is to confirm whether runaway monitoring is normally performed. This is because despite the operation of the resistor driving timer T2, the malfunction of the external circuit or the runaway of the control system stops the runaway monitoring timer T1 and the monitoring process cannot be continued. This is to prevent the situation.

すなわち、抵抗体駆動用タイマT2が動作している期間
中に信号TPRが停止したか否かを確認処理するものであ
る。この際に、該タイマT1の動作が終了した場合(YE
S)には、印字制御プログラム実行異常時であるためス
テップP23,P24に移行して印字処理を停止する無限ルー
プに移行する。また、それが終了しない場合(NO)に
は、印字制御プログラム実行正常時であり、ステップP1
5に戻ってTPR信号の供給指示をする。
That is, a process for confirming whether or not the signal TPR has stopped during the period in which the resistor driving timer T2 is operating. At this time, when the operation of the timer T1 is completed (YE
In S), since the printing control program execution is abnormal, the process shifts to steps P23 and P24 to shift to an infinite loop for stopping the printing process. If it does not end (NO), it means that the print control program has been executed normally, and step P1
Returning to step 5, an instruction to supply a TPR signal is issued.

次いで、ステップP19で暴走監視用タイマT1の動作が
終了したか否かの判断処理をする。この際の判断処理
は、両タイマT1,T2の割り込み順位がT1>T2となってい
るための終了確認である。
Next, in step P19, a determination is made as to whether or not the operation of the runaway monitoring timer T1 has been completed. The determination process at this time is a termination confirmation because the interrupt order of both timers T1 and T2 is T1> T2.

すなわち、タイマT2が終了してからタイマT1が終了す
る。これは、第3図(b)ののように暴走監視タイマ
信号S1がMPU23の制御暴走により出力継続される恐れが
ある場合に、タイマT2が終了するとタイマT1を強制的に
出力を停止させるものである。
That is, the timer T1 ends after the timer T2 ends. This is to forcibly stop the output of the timer T1 when the timer T2 ends, when there is a possibility that the runaway monitoring timer signal S1 may continue to be output due to the control runaway of the MPU 23 as shown in FIG. 3 (b). It is.

従って、該タイマT1の動作が終了しない場合(NO)に
は、監視処理継続中であるためステップP18に戻ってTP
R信号の供給指示を継続する。また、それが終了した場
合(NO)には、ステップP20に移行し、発熱抵抗体R1〜R
nの正常時の停止処理をする。
Therefore, if the operation of the timer T1 does not end (NO), the monitoring process is continuing, and the process returns to step P18 to return to TP
The instruction to supply the R signal is continued. If the processing has been completed (NO), the processing shifts to step P20, where the heating resistors R1 to R1
Perform normal termination processing for n.

その後は、従来例のように、ステップP21で1ライン
印字の終了判断をし、ステップP22で印字処理の終了判
断をする。なお、ステップP25で制御処理の終了判断を
して印字処理を終了する。
Thereafter, as in the conventional example, the end of one-line printing is determined in step P21, and the end of the printing process is determined in step P22. In step P25, the control process is determined to be completed, and the printing process is completed.

これにより、MPU23の印字制御プログラムの監視処理
をしながら感熱紙16に印字処理をすることができる。
Thus, the printing process can be performed on the thermal paper 16 while monitoring the printing control program of the MPU 23.

このようにして、本発明の実施例に係る印字処理方法
によれば、MPU23の印字制御プログラムの監視処理をし
ながら印字データDinに基づいて発熱体素子R1,R2,Ri,Rn
の選択処理をしている。
Thus, according to the print processing method according to the embodiment of the present invention, the heating elements R1, R2, Ri, Rn based on the print data Din while monitoring the print control program of the MPU 23.
Of the selection process.

例えば、該監視処理は、ステップP9の各信号線のレベ
ルチェック確認処理,ステップP11の同一抵抗体R1,R2,R
i,Rnの継続選択時(異常)の確認処理,ステップP12
のプログラム順位異常の確認処理及びステップP19の
暴走監視用タイマT1の動作の確認処理をしている。
For example, the monitoring process includes a level check confirmation process for each signal line in step P9, and the same resistors R1, R2, R in step P11.
Confirmation processing when i and Rn are continuously selected (abnormal), step P12
And the operation of the runaway monitoring timer T1 in step P19.

このため、入出力線レベル検出処理,発熱体素子選択
処理,暴走監視タイマ起動処理及び発熱体駆動タイマ起
動処理等の処理ルーチン数が予め設定された計数に達し
ない場合やそれを越える場合には、印字処理に移行せず
ステップP23,24に移行して初期化設定をする無限処理ル
ープに収束される。このことで、外付け回路の誤動作を
原因とする印字制御プログラムの暴走をソフト上で監視
することが可能となる。
Therefore, when the number of processing routines, such as the input / output line level detection processing, the heating element selection processing, the runaway monitoring timer activation processing, and the heating element driving timer activation processing, does not reach or exceeds a preset count, Then, without going to the printing process, the process goes to Steps P23 and P24 to converge to an infinite processing loop for initialization setting. This makes it possible to monitor software runaway of the print control program caused by a malfunction of the external circuit.

これにより、従来例の印字時間監視方式に用いられて
いたワンショットタイマ回路8Bや複数の論理和反転出力
回路NA1〜NAnが不要となる。このことから発熱体素子
R1〜Rnの印字監視処理をする部品点数を削減することが
でき、当該プリンタの低廉化を図ることが可能となる。
This eliminates the need for the one-shot timer circuit 8B and the plurality of logical inversion output circuits NA1 to NAn used in the conventional print time monitoring method. From this, the heating element
The number of components for performing the print monitoring processing of R1 to Rn can be reduced, and the cost of the printer can be reduced.

〔発明の効果〕〔The invention's effect〕

以上説明したように、本発明のサーマルプリンタによ
れば、感熱紙移動手段,複数の発熱体素子から成るサー
マルヘッド,サーマルヘッド駆動制御手段,信号監視手
段及び制御手段とが具備され、信号監視手段が印字制御
プログラムを実行する際に発生する被監視信号を常に監
視をしている。
As described above, according to the thermal printer of the present invention, the thermal printer includes the thermal paper moving unit, the thermal head including a plurality of heating elements, the thermal head drive control unit, the signal monitoring unit, and the control unit. Monitors the monitored signal generated when the print control program is executed.

このため、外付け回路の誤動作や制御系の暴走等によ
り異常となった場合、印字制御プログラムを初期設定す
る動作解除信号が信号監視手段からサーマルヘッド駆動
制御手段に出力される。このことで、感熱紙への熱の供
給タイミング制御をする発熱体選択信号自体の出力処理
が停止され、全発熱体素子に流れる駆動電流を遮断する
ことが可能となる。
For this reason, when an error occurs due to a malfunction of an external circuit, a runaway of a control system, or the like, an operation release signal for initializing a print control program is output from the signal monitoring means to the thermal head drive control means. As a result, the output processing of the heating element selection signal itself for controlling the timing of supplying heat to the thermal paper is stopped, and the drive current flowing through all the heating elements can be cut off.

さらに、本発明の印字処理方法によれば、サーマルヘ
ッド駆動制御手段の印字制御プログラムの監視処理をし
ながら発熱体素子の選択処理をしている。
Further, according to the print processing method of the present invention, the heating element element is selected while monitoring the print control program of the thermal head drive control means.

このため、入出力線レベル検出処理,発熱体素子選択
処理,暴走監視タイマ起動処理及び発熱体駆動タイマ起
動処理等の処理ルーチン数が予め設定された計数に達し
ない場合やそれを越える場合には、印字処理に移行せず
初期化設定をする無限処理ループに移行される。このこ
とで、外付け回路の誤動作を原因とする印字制御プログ
ラムの暴走をソフト上で監視することが可能となる。
Therefore, when the number of processing routines, such as the input / output line level detection processing, the heating element selection processing, the runaway monitoring timer activation processing, and the heating element driving timer activation processing, does not reach or exceeds a preset count, Then, the process is shifted to an infinite processing loop for performing initialization setting without shifting to the printing process. This makes it possible to monitor software runaway of the print control program caused by a malfunction of the external circuit.

これにより、従来例の印字時間監視方式に比べて外付
け回路の誤動作や制御系の暴走等から発熱体素子を十分
に保護すること及びその部品点数を削減することがで
き、当該プリンタの低廉化を図ることが可能となる。
As a result, compared to the conventional printing time monitoring method, the heating element can be sufficiently protected from malfunction of the external circuit and runaway of the control system, and the number of parts can be reduced, thereby reducing the cost of the printer. Can be achieved.

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

第1図は、本発明に係るサーマルプリンタの原理図、 第2図は、本発明の実施例に係るサーマルプリンタの構
成図、 第3図は、本発明の実施例に係るサーマルプリンタの監
視動作タイムチャート、 第4図は、本発明の実施例に係る印字処理方法のフロー
チャート、 第5図は、本発明の実施例に係るプログラム順位確認の
処理フローチャート、 第6図は、従来例に係るサーマルプリンタの構成図、 第7図は、従来例に係る印字処理監視回路の構成図、 第8図は、従来例に係る印字処理方法のフローチャー
ト、 第9図は、従来例に係る問題点を説明する動作タイムチ
ャートである。 (符号の説明) 11……感熱紙移動手段、 12……サーマルヘッド、 13……サーマルヘッド駆動制御手段、 14……信号監視手段、 15……制御手段、 13A……第1の信号発生手段、 13B……第2の信号発生手段、 R1〜R2……発熱体素子、 TRi……発熱体選択信号、 TPR……被監視信号、 RST……動作解除信号、 S1……第1の制御信号、 S2……第2の制御信号、 φ1,φ2……第1,第2のパルス幅。
FIG. 1 is a principle diagram of a thermal printer according to the present invention, FIG. 2 is a configuration diagram of a thermal printer according to an embodiment of the present invention, and FIG. 3 is a monitoring operation of the thermal printer according to the embodiment of the present invention. FIG. 4 is a flowchart of a print processing method according to an embodiment of the present invention, FIG. 5 is a processing flowchart of program order confirmation according to an embodiment of the present invention, and FIG. FIG. 7 is a block diagram of a print processing monitoring circuit according to a conventional example, FIG. 8 is a flowchart of a print processing method according to a conventional example, and FIG. FIG. (Explanation of reference numerals) 11: thermal paper moving means 12, thermal head 13, thermal head drive control means 14, signal monitoring means 15, control means 13A first signal generation means .., 13B... Second signal generating means, R1 to R2... Heating element, TRi... Heating element selection signal, TPR... Monitored signal, RST... Operation release signal, S1. , S2... Second control signal, φ1, φ2... First and second pulse widths.

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) B41J 2/35 - 2/375 ──────────────────────────────────────────────────続 き Continued on front page (58) Field surveyed (Int.Cl. 7 , DB name) B41J 2/35-2/375

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】感熱紙(16)を移動供給する感熱紙移動手
段(11)と、前記感熱紙(16)に印字をする複数の発熱
体素子(R1、R2、Ri、Rn)から成るサーマルヘッド(1
2)と、前記サーマルヘッド(12)に発熱体選択信号
(TRi)を出力するサーマルヘッド駆動制御手段(13)
と、前記サーマルヘッド駆動制御手段(13)の印字制御
プログラムを監視する信号監視手段(14)と、前記感熱
紙移動手段(11)及びサーマルヘッド駆動制御手段(1
3)の入出力を制御する制御手段(15)とを具備し、 前記サーマルヘッド駆動制御手段(13)が前記印字制御
プログラムの各処理ルーチン数の計数処理をして該印字
制御プログラムの実行状態の良否を判断することを特徴
とするサーマルプリンタ。
A thermal paper moving means (11) for moving and supplying a thermal paper (16), and a thermal element comprising a plurality of heating elements (R1, R2, Ri, Rn) for printing on the thermal paper (16). Head (1
2) and thermal head drive control means (13) for outputting a heating element selection signal (TRi) to the thermal head (12)
A signal monitoring means (14) for monitoring a print control program of the thermal head drive control means (13); a thermal paper moving means (11); and a thermal head drive control means (1).
Control means (15) for controlling the input / output of 3), wherein the thermal head drive control means (13) counts each processing routine number of the print control program and executes the print control program A thermal printer for determining the quality of a printer.
【請求項2】請求項1記載のサーマルプリンタにおい
て、前記信号監視手段(14)は、前記サーマルヘッド駆
動制御手段(13)からの被監視信号(TPR)に基づいて
前記印字制御プログラムを初期設定する動作解除信号
(RST)を出力することを特徴とするサーマルプリン
タ。
2. A thermal printer according to claim 1, wherein said signal monitoring means initializes said print control program based on a monitored signal (TPR) from said thermal head drive control means. A thermal printer which outputs an operation release signal (RST).
【請求項3】感熱紙(16)を移動供給する感熱紙移動手
段(11)と、前記感熱紙(16)に印字をする複数の発熱
体素子(R1、R2、Ri、Rn)から成るサーマルヘッド(1
2)と、前記サーマルヘッド(12)に発熱体選択信号
(TRi)を出力するサーマルヘッド駆動制御手段(13)
と、前記サーマルヘッド駆動制御手段(13)の印字制御
プログラムを監視する信号監視手段(14)と、前記感熱
紙移動手段(11)及びサーマルヘッド駆動制御手段(1
3)の入出力を制御する制御手段(15)とを具備し、 前記サーマルヘッド駆動制御手段(13)に、前記印字制
御プログラムの暴走を監視する第1のパルス幅(φ1)
の第1の制御信号(S1)を発生する第1の信号発生手段
(13A)と、前記発熱体選択信号(TRi)を生成する第
2のパルス幅(φ2)の第2の制御信号(S2)を発生す
る第2の信号発生手段(13B)とが設けられ、 前記第1の制御信号(S1)のパルス幅(φ1)は前記第
2の制御信号(S2)のパルス幅(φ2)よりも長く、か
つ、前記第1の信号発生手段(13A)の割り込み順位が
前記第2の信号発生手段(13B)の割り込み順位よりも
優先されることを特徴とするサーマルプリンタ。
3. A thermal paper moving means (11) for moving and supplying a thermal paper (16) and a thermal element comprising a plurality of heating elements (R1, R2, Ri, Rn) for printing on the thermal paper (16). Head (1
2) and thermal head drive control means (13) for outputting a heating element selection signal (TRi) to the thermal head (12)
A signal monitoring means (14) for monitoring a print control program of the thermal head drive control means (13); a thermal paper moving means (11); and a thermal head drive control means (1).
Control means (15) for controlling the input / output of 3), wherein the thermal head drive control means (13) includes a first pulse width (φ1) for monitoring runaway of the print control program.
A first signal generating means (13A) for generating the first control signal (S1), and a second control signal (S2) for generating a second pulse width (φ2) for generating the heating element selection signal (TRi). ) For generating the first control signal (S1), the pulse width (φ1) of the second control signal (S2) being greater than the pulse width (φ2) of the second control signal (S2). Wherein the priority of the first signal generation means (13A) is higher than the priority of the second signal generation means (13B).
【請求項4】感熱紙(16)を移動供給する感熱紙移動手
段(11)と、前記感熱紙(16)に印字をする複数の発熱
体素子(R1、R2、Ri、Rn)から成るサーマルヘッド(1
2)と、前記サーマルヘッド(12)に発熱体選択信号
(TRi)を出力するサーマルヘッド駆動制御手段(13)
と、前記サーマルヘッド駆動制御手段(13)の印字制御
プログラムを監視する信号監視手段(14)と、前記感熱
紙移動手段(11)及びサーマルヘッド駆動制御手段(1
3)の入出力を制御する制御手段(15)とを具備し、 前記サーマルヘッド駆動制御手段(13)の印字制御プロ
グラムの監視処理をしながら印字データ(Din)に基づ
いて発熱体素子(R1、R2、Ri、Rn)の選択処理をし、前
記選択処理に基づいて感熱紙(16)に印字処理をするこ
とを特徴とするサーマルプリンタの印字処理方法。
4. A thermal paper moving means (11) for moving and supplying a thermal paper (16) and a thermal element comprising a plurality of heating elements (R1, R2, Ri, Rn) for printing on the thermal paper (16). Head (1
2) and thermal head drive control means (13) for outputting a heating element selection signal (TRi) to the thermal head (12)
A signal monitoring means (14) for monitoring a print control program of the thermal head drive control means (13); a thermal paper moving means (11); and a thermal head drive control means (1).
3) a control means (15) for controlling the input / output of the heating element (R1) based on the print data (Din) while monitoring the print control program of the thermal head drive control means (13). , R2, Ri, Rn), and performing a printing process on the thermal paper (16) based on the selection process.
JP24566790A 1990-09-14 1990-09-14 Thermal printer and print processing method thereof Expired - Fee Related JP3043042B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24566790A JP3043042B2 (en) 1990-09-14 1990-09-14 Thermal printer and print processing method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24566790A JP3043042B2 (en) 1990-09-14 1990-09-14 Thermal printer and print processing method thereof

Publications (2)

Publication Number Publication Date
JPH04125166A JPH04125166A (en) 1992-04-24
JP3043042B2 true JP3043042B2 (en) 2000-05-22

Family

ID=17137026

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24566790A Expired - Fee Related JP3043042B2 (en) 1990-09-14 1990-09-14 Thermal printer and print processing method thereof

Country Status (1)

Country Link
JP (1) JP3043042B2 (en)

Also Published As

Publication number Publication date
JPH04125166A (en) 1992-04-24

Similar Documents

Publication Publication Date Title
EP0295953B1 (en) Printing method of thermal printer
JP3217930B2 (en) Printer device
JP3254913B2 (en) Control method of print head
JP3043042B2 (en) Thermal printer and print processing method thereof
US6784909B2 (en) Auxiliary control device for managing printing in a thermal printer
JP2616323B2 (en) Line thermal head protection circuit
KR100398032B1 (en) small printer
JP3182789B2 (en) Printer control device, printer and control method therefor
JPS5929175A (en) Apparatus for controlling printing of thermal head
JP3612804B2 (en) Recording device
JP2784654B2 (en) Recording control device
JPS6075946A (en) History output device
JP2500136B2 (en) Double memory type dot printer
JP2823415B2 (en) Stepping motor control device
JPH0753461B2 (en) Printer
JPH085209B2 (en) Thermal head protection circuit
JP2958152B2 (en) Printer drive circuit
JP3301338B2 (en) Inkjet printer
JP2750683B2 (en) Control circuit for paper feed motor
JPH03278201A (en) Protection device for control system
JPH03146383A (en) Recorder
JPH05254222A (en) Apparatus for controlling printing
JPH0880631A (en) Printing device
JPS63112187A (en) Ribbon-controlling method for serial printer
JPH04115962A (en) Thermal head, thermal printer, and printing process thereof

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080310

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090310

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100310

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees