JP3038089B2 - Printer - Google Patents

Printer

Info

Publication number
JP3038089B2
JP3038089B2 JP4319013A JP31901392A JP3038089B2 JP 3038089 B2 JP3038089 B2 JP 3038089B2 JP 4319013 A JP4319013 A JP 4319013A JP 31901392 A JP31901392 A JP 31901392A JP 3038089 B2 JP3038089 B2 JP 3038089B2
Authority
JP
Japan
Prior art keywords
interrupt
program
processing
storage means
stored
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 - Lifetime
Application number
JP4319013A
Other languages
Japanese (ja)
Other versions
JPH06166249A (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.)
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 JP4319013A priority Critical patent/JP3038089B2/en
Publication of JPH06166249A publication Critical patent/JPH06166249A/en
Application granted granted Critical
Publication of JP3038089B2 publication Critical patent/JP3038089B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、一定周期で発生する
割込処理のためのパルス信号に基づいて、用紙の搬送処
理及び印字処理を行うプリンタに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a printer for carrying out a paper transport process and a printing process based on a pulse signal for an interrupt process generated at a constant period.

【0002】[0002]

【従来の技術】例えばサーマルプリンタでは、印字時に
おいて、用紙は、サーマルヘッドに対向配置されたプラ
テンをパルスモータにより回転駆動して、搬送されるよ
うになっていた。この時のパルスモータをステップ駆動
する搬送タイミングとサーマルヘッドへ通電する印字タ
イミングとを制御する方法として、制御部本体を構成す
るCPU(central processing unit )へ一定周期で割
込みのパルス信号(以下、割込信号と称する)を入力し
て、この割込信号により起動されるプログラム処理(以
下、割込処理と称する)で行う方法が知られている。
2. Description of the Related Art In a thermal printer, for example, during printing, a sheet is conveyed by rotating a platen opposed to a thermal head by a pulse motor. At this time, as a method of controlling the transport timing for stepwise driving the pulse motor and the printing timing for energizing the thermal head, a pulse signal (hereinafter, referred to as an interrupting signal) of a CPU (central processing unit) constituting a control unit main body at a fixed cycle is provided. There is known a method of inputting an interrupt signal (hereinafter referred to as an interrupt signal) and performing the program process (hereinafter, referred to as an interrupt process) started by the interrupt signal.

【0003】従来のサーマルプリンタでは、例えば図5
に示すように、周期T毎に発生する1つの割込信号によ
り、印字・紙送り、エラー監視及びセンサ監視の割込処
理が起動される。
In a conventional thermal printer, for example, FIG.
As shown in (1), one interrupt signal generated at each cycle T starts the interrupt processing of printing / paper feeding, error monitoring, and sensor monitoring.

【0004】すなわち、パルスモータを1ステップ駆動
して用紙を1ライン分搬送した後、サーマルヘッドに通
電を行うイネーブル信号を出力して1ライン印字を行
う。1ライン印字が終了すると、ラベルエンド、リボン
エンド、カットジャム等のエラーの発生の有無をチェッ
クし、さらに例えば、インクリボンの送り側ローラ又は
巻取り側ローラのインクリボンの径をチェックして、こ
のインクリボンを搬送するためのリボンモータの回転ト
ルクの設定を行い、また、サーマルヘッドの温度をチェ
ックして、このサーマルヘッドへの印加電圧及び通電パ
ルス幅の設定等を行うようになっていた。以上の処理が
全て行うと、この割込処理が終了するようになってい
る。
That is, after the pulse motor is driven by one step to convey the paper for one line, an enable signal for energizing the thermal head is output to perform one-line printing. When printing of one line is completed, it is checked whether an error such as a label end, a ribbon end, a cut jam has occurred, and further, for example, a diameter of the ink ribbon of a feeding roller or a winding roller of the ink ribbon is checked. The rotational torque of the ribbon motor for transporting the ink ribbon is set, the temperature of the thermal head is checked, and the applied voltage and energizing pulse width to the thermal head are set. . When all of the above processes have been performed, the interrupt process ends.

【0005】ところで、上述した割込処理が終了すると
通常のメイン処理に戻るようになっており、このメイン
処理は一般に、外部機器との通信処理や印字データの処
理(描画処理)等を行うようになっている。
[0005] By the way, when the above-described interrupt processing is completed, the processing returns to the normal main processing. This main processing generally performs communication processing with external equipment, processing of print data (drawing processing), and the like. It has become.

【0006】また、用紙を搬送するパルスモータをステ
ップ駆動する搬送タイミングとサーマルヘッドへ通電す
る印字タイミングとをそれぞれ異なる周期により制御す
るために、各タイミングに対応して2つの割込信号を使
用するサーマルプリンタも知られている。
Further, in order to control the transport timing for stepwise driving the pulse motor for transporting the paper and the print timing for energizing the thermal head at different periods, two interrupt signals are used corresponding to each timing. Thermal printers are also known.

【0007】このようなサーマルプリンタでは、用紙搬
送処理と印字処理の2つの割込処理のプログラムがRO
M(read only memory)等に記憶されており、各割込処
理のプログラムをそれぞれ起動する2つの割込信号が異
なる周期で入力されるようになっている。どちらか一方
の割込信号が入力されると、入力された割込信号に対応
する割込処理のプログラムが起動される。用紙搬送の割
込処理のプログラムが起動されると、パルスモータがス
テップ駆動して用紙が搬送され、また印字の割込処理の
プログラムが起動されると、サーマルヘッドへ通電を行
って印字が行われる。この2つの割込信号を使用するサ
ーマルプリンタにおいても、上述した各種エラーのチェ
ック及び各種センサからの検出信号による設定処理等
は、それぞれ用紙搬送の割込処理及び印字の割込処理の
中で適当に振り分けられて処理されるようになってい
る。
[0007] In such a thermal printer, two interrupt processing programs, a paper transport processing and a printing processing, are executed by an RO program.
Two interrupt signals, which are stored in an M (read only memory) or the like, and start the respective interrupt processing programs, are input at different periods. When either one of the interrupt signals is input, an interrupt processing program corresponding to the input interrupt signal is started. When the paper conveyance interrupt processing program is started, the pulse motor is step-driven to convey the paper, and when the print interrupt processing program is started, the thermal head is energized and printing is performed. Will be Even in the thermal printer using these two interrupt signals, the above-described various error checks and the setting process based on the detection signals from the various sensors are appropriately performed in the sheet transport interrupt process and the print interrupt process, respectively. And are processed.

【0008】[0008]

【発明が解決しようとする課題】ところで、ラベルエン
ドエラー及びリボンエンドエラー等の即時対応が必要な
エラーを除いて、カットジャムエラー等は、即時にエラ
ー監視処理を行う必要はなく、数ラインを印字を続行し
ても問題は生じない。
By the way, except for errors requiring immediate response, such as label end errors and ribbon end errors, cut jam errors and the like do not require immediate error monitoring processing, and require several lines. No problem occurs if printing is continued.

【0009】また、送り側ローラ及び巻取り側ローラの
インクリボンの径やサーマルヘッドの温度が極端に大き
く変化する可能性はほとんどないので、インクリボンの
回転トルクやサーマルヘッドへの印加電圧及び通電パル
ス幅は、用紙の搬送処理や印字処理のタイミングで頻繁
に設定変更する必要はない。
Also, since there is almost no possibility that the diameter of the ink ribbon of the feed roller and the take-up roller and the temperature of the thermal head change extremely greatly, the rotational torque of the ink ribbon, the voltage applied to the thermal head, It is not necessary to frequently change the setting of the pulse width at the timing of the sheet conveyance process or the printing process.

【0010】しかし、従来のサーマルプリンタでは、上
述したように、サーマルヘッドへ通電する印字タイミン
グとパルスモータをステップ駆動する搬送タイミングと
を制御するための割込処理の中で、各種エラー監視処理
及びセンサからの検出信号による設定処理等が全て行わ
れるようになっていた。
However, in the conventional thermal printer, as described above, in the interrupt processing for controlling the printing timing for energizing the thermal head and the transport timing for stepwise driving the pulse motor, various error monitoring processing and processing are performed. All the setting processes and the like based on the detection signal from the sensor have been performed.

【0011】従って、必ずしも搬送タイミング及び印字
タイミングで行う必要のないエラー監視処理やセンサか
らの検出信号による設定処理を、搬送タイミング及び印
字タイミングを制御する割込処理を起動する周期より長
い周期間隔で行うことができれば、エラー監視処理やセ
ンサからの検出信号による設定処理にかかっていた過剰
な処理時間を短縮することができる。その結果、搬送タ
イミング及び印字タイミングを制御する割込処理を起動
する周期をより短くすることが可能となり、印字速度の
より一層の高速化を実現することができる。
Therefore, the error monitoring processing and the setting processing based on the detection signal from the sensor, which are not necessarily performed at the transport timing and the print timing, are performed at intervals longer than the cycle for starting the interrupt processing for controlling the transport timing and the print timing. If it can be performed, the excessive processing time required for the error monitoring processing and the setting processing based on the detection signal from the sensor can be reduced. As a result, it is possible to further shorten the cycle for initiating the interrupt processing for controlling the transport timing and the print timing, and it is possible to further increase the print speed.

【0012】そこでこの発明は、搬送タイミング及び印
字タイミングで行う必要のないエラー監視処理やセンサ
からの検出信号による設定処理を、搬送タイミング及び
印字タイミングを制御する割込処理を起動する周期より
長い周期間隔で行うことができ、従って印字速度のより
一層の高速化を実現することができるプリンタを提供す
ることを目的とする。
Therefore, the present invention provides an error monitoring process and a setting process based on a detection signal from a sensor which do not need to be performed at a transport timing and a print timing, a cycle longer than a cycle for starting an interrupt process for controlling the transport timing and the print timing. It is an object of the present invention to provide a printer which can perform printing at intervals and therefore can realize a higher printing speed.

【0013】[0013]

【課題を解決するための手段】この発明は、用紙の搬送
及び用紙への印字をそれぞれ予め設定されたタイミング
で処理するプリンタにおいて、用紙の搬送及び用紙への
印字を実行する割込処理のプログラムが記憶された第1
のプログラム記憶手段と、この第1のプログラム記憶手
段に記憶された割込処理のプログラムを起動させるため
割込信号を予め設定された周期で発生させる第1の割
込手段と、予め設定された即時対処する必要のないエラ
ーの監視処理やセンサの検出信号による設定処理等を行
う割込処理のプログラムが記憶された第2のプログラム
記憶手段と、第1の割込手段により発生される割込信号
の周期より長い周期で、第2のプログラム記憶手段に記
憶されたプログラムを起動させるための割込信号を発生
させる第2の割込手段と、この第2の割込手段により割
込信号が発生されると第1のプログラム記憶手段に記憶
されたプログラムが実行中か否かを判断し、実行中でな
ければ第2のプログラム記憶手段に記憶されたプログラ
ムを起動させ、実行中であれば終了するまで待機してか
ら第2のプログラム記憶手段に記憶されたプログラムを
起動させる処理待機制御手段と、第2のプログラム記憶
手段に記憶されたプログラムを実行中に第1の割込信号
により割込信号が発生すると、その実行中のプログラム
を停止させて第1プログラム記憶手段に記憶されたプロ
グラムを起動させる処理切替制御手段とを設けたもので
ある。
SUMMARY OF THE INVENTION According to the present invention, there is provided a program for interrupt processing for executing paper transport and printing on a paper in a printer which processes paper transport and printing on the paper at predetermined timings. Is stored in the first
A program storage means, because activates the stored interrupt processing program to the first program storage means
A first interrupt means for generating an interrupt signal at a preset cycle, and an interrupt process for performing an error monitoring process which does not need to be dealt with immediately and a setting process based on a sensor detection signal. a second program storage means in which the program is stored, a longer period than the period of the interrupt signal generated by the first interrupt means, split for starting the program stored in the second program storage means and second interrupt means for generating an interruption signal, split by the second interrupt means
Generated in the first program storage means
Judge whether the executed program is running or not.
If the program stored in the second program storage means is
Start the program and wait for it to finish if running
From the program stored in the second program storage means.
Processing standby control means to be activated, and second program storage
A first interrupt signal during execution of the program stored in the means;
When an interrupt signal is generated by
Is stopped and the program stored in the first program storage means is stopped.
And a process switching control means for activating the program .

【0014】[0014]

【作用】このような構成の本発明において、第1の割込
手段により、割込信号が予め設定された周期で発生され
る。すると第1のプログラム記憶手段に記憶された割込
処理のプログラムが起動され、この起動したプログラム
によって、用紙の搬送処理及び印字処理が処理される。
従って、用紙の搬送及び用紙への印字が、それぞれ予め
設定されたタイミングで処理される。
In the present invention having such a configuration, an interrupt signal is generated at a preset cycle by the first interrupt means. Then, the interrupt processing program stored in the first program storage means is activated, and the activated program performs the sheet transport processing and the printing processing.
Therefore, the conveyance of the paper and the printing on the paper are each processed at a preset timing.

【0015】一方、第1の割込手段により発生される割
込信号の周期より長い周期で、第2の割込手段により割
込信号が発生される。この第2の割込手段により発生さ
れる割込信号は、第1の割込手段により発生される割込
信号より優先順位が低いので、この時、第1の割込手段
による割込信号により割込処理のプログラムが起動して
いると、そのプログラムが終了するまで、第2のプログ
ラム記憶手段に記憶された割込処理のプログラムは起動
されず、起動待機となる。その第1の割込手段による割
込信号により起動されたプログラムが終了すると、第2
のプログラム記憶手段に記憶されている割込処理のプロ
グラムが起動される。
On the other hand, an interrupt signal is generated by the second interrupt means at a cycle longer than the cycle of the interrupt signal generated by the first interrupt means. The priority of the interrupt signal generated by the second interrupt means is lower than that of the interrupt signal generated by the first interrupt means. If the interrupt processing program has been activated, the interrupt processing program stored in the second program storage unit is not activated until the program is terminated, and the program is on standby. When the program started by the interrupt signal by the first interrupt means ends, the second
The program of the interrupt processing stored in the program storage means is started.

【0016】また、第2の割込手段により割込信号が発
生され、第1の割込手段による割込信号により起動され
る割込処理のプログラムが起動していない時には、第2
のプログラム記憶手段に記憶された割込処理のプログラ
ムが起動される。
When an interrupt signal is generated by the second interrupt means and the interrupt processing program started by the interrupt signal by the first interrupt means is not started, the second
The interrupt processing program stored in the program storage means is started.

【0017】起動された第2のプログラム記憶手段に記
憶されている割込処理により、即時対処する必要のない
エラーの監視処理及びセンサの検出信号による設定処理
が行われる。
The interrupt processing stored in the activated second program storage means performs an error monitoring processing and a setting processing based on a detection signal of a sensor which need not be dealt with immediately.

【0018】[0018]

【実施例】以下、この発明の一実施例を図面を参照して
説明する。なおこの実施例はこの発明をサーマルプリン
タに適用したもので、図1に、このサーマルプリンタの
要部回路構成のブロック図を示す。
An embodiment of the present invention will be described below with reference to the drawings. In this embodiment, the present invention is applied to a thermal printer. FIG. 1 shows a block diagram of a circuit configuration of a main part of the thermal printer.

【0019】1は、制御部本体を構成するCPU(cent
ral processing unit )であり、このCPU1には、ア
ドレスバス2a及びデータバス2bが接続されている。
Reference numeral 1 denotes a CPU (cent
The CPU 1 is connected to an address bus 2a and a data bus 2b.

【0020】前記CPU1が行う処理のプログラムデー
タが記憶されたROM(read onlymemory)3、前記C
PU1が処理を行うときに使用する各種メモリのエリア
が形成されたRAM(random access memory)4、各キ
ャラクタコード毎にキャラクタ描画データが記憶された
C/G( character/generator )・ROM5、インク
リボンの残りの巻き径及びインクリボンの有無を検出す
るリボンセンサ6及び印字したラベルを後述するカッタ
ー18がホームポジションにあるか否かを検出するカッ
ターホームポジションセンサ7からの出力信号をそれぞ
れ入力するI/O(input/output)ポート8、印字デー
タの送信元としてのホストコンピュータ等の外部情報処
理装置と回線を介して接続された通信インターフェイス
9は、それぞれ前記アドレスバス2a及び前記データバ
ス2bを介して前記CPU1と接続されている。
A ROM (read only memory) 3 in which program data for processing performed by the CPU 1 is stored;
RAM (random access memory) 4 in which areas of various memories used when the PU 1 performs processing, C / G (character / generator) ROM 5 storing character drawing data for each character code, ink ribbon The input signal I from the ribbon sensor 6 for detecting the remaining winding diameter and the presence or absence of the ink ribbon and the output signal from the cutter home position sensor 7 for detecting whether or not the cutter 18 described later is at the home position. A / O (input / output) port 8 and a communication interface 9 connected via a line to an external information processing device such as a host computer as a transmission source of print data via the address bus 2a and the data bus 2b, respectively. Connected to the CPU 1.

【0021】ラベル用紙及びラベル用紙の台紙に貼着さ
れたラベルの有無を検出するラベルセンサ10及び後述
するサーマルヘッド13の温度を検出するサーミスタ1
1からの検出信号をデジタルデータに変換してそれぞれ
出力するA/D(analogue/digital )変換器12、サ
ーマルヘッド13を駆動するヘッドドライバ14、ラベ
ル用紙を搬送するための紙送りモータ15及びインクリ
ボンを搬送するためのリボンモータ16をそれぞれ駆動
するモータドライバ17、印字済みラベルを未印字ラベ
ルと切断分離するカッター18を駆動するカッタードラ
イバ19、周期T1毎に印字・紙送り割込信号を出力す
る第1の割込手段としての第1割込タイマ20a及び周
期T1より長い周期T2毎にエラー監視・センサ監視割
込信号を出力する第2の割込手段としての第2割込タイ
マ20b等により構成されたタイマ20もまた、それぞ
れ前記アドレスバス2a及び前記データバス2bを介し
て前記CPU1と接続されている。
A label sensor 10 for detecting the presence or absence of a label sheet and a label attached to a backing sheet of the label sheet, and a thermistor 1 for detecting the temperature of a thermal head 13 to be described later.
An A / D (analog / digital) converter 12 for converting the detection signal from the digital signal 1 into digital data and outputting the digital data, a head driver 14 for driving a thermal head 13, a paper feed motor 15 for transporting label paper, and ink A motor driver 17 for driving a ribbon motor 16 for transporting the ribbon, a cutter driver 19 for driving a cutter 18 for cutting and separating a printed label from an unprinted label, and outputting a print / paper feed interrupt signal every period T1 A first interrupt timer 20a as a first interrupting means, a second interrupting timer 20b as a second interrupting means for outputting an error monitoring / sensor monitoring interrupt signal at every cycle T2 longer than the cycle T1, etc. Is also connected to the CPU 1 via the address bus 2a and the data bus 2b, respectively. To have.

【0022】前記ROM3にはさらに、前記第1割込タ
イマ20aから出力された印字・紙送り割込信号により
起動される印字・紙送り割込処理のプログラムデータが
記憶された第1のプログラム記憶手段としての第1割込
エリア3aと、前記第2割込タイマ20bから出力され
たエラー監視・センサ監視割込信号により起動されるエ
ラー監視・センサ監視割込処理のプログラムデータが記
憶された第2のプログラム記憶手段としての第2割込エ
リア3bが設けられている。
The ROM 3 further stores a first program storing program data for a print / paper feed interrupt process activated by a print / paper feed interrupt signal output from the first interrupt timer 20a. A first interrupt area 3a as means and a program memory for storing program data of an error monitoring / sensor monitoring interrupt process activated by an error monitoring / sensor monitoring interrupt signal output from the second interrupt timer 20b are stored. A second interrupt area 3b is provided as a second program storage means.

【0023】また、前記RAM4にはさらに、前記通信
インターフェイス9により受信した印字情報に基づい
て、C/GROM5に記憶されたキャラクタ描画データ
を使用してイメージデータ(印字データ)が描画される
イメージバッファ4aが形成されている。
The RAM 4 further includes an image buffer for drawing image data (print data) using character drawing data stored in the C / GROM 5 based on the print information received by the communication interface 9. 4a are formed.

【0024】図2に、前記第1の割込タイマ20aから
印字・紙送り割込信号が出力されて、前記第1割込エリ
ア3aに記憶された印字・紙送り割込処理のプログラム
が起動することにより、前記CPU1が行う印字・紙送
り割込処理の流れを示す。
Referring to FIG. 2, a print / paper feed interrupt signal is output from the first interrupt timer 20a, and the print / paper feed interrupt processing program stored in the first interrupt area 3a is started. 2 shows the flow of the print / paper feed interruption process performed by the CPU 1.

【0025】まず、リボンモータ16を駆動(ON)さ
せ、紙送りモータ15を1ステップ駆動(1ステップシ
フト)させる。
First, the ribbon motor 16 is driven (ON), and the paper feed motor 15 is driven one step (one step shift).

【0026】次に、イメージバッファ4aに記憶されて
いるイメージデータ(印字データ)をヘッドドライバ1
4に転送して、イネーブル信号をONにして印字を行
う。この印字が終了すると、ラベルセンサ10からの検
出信号によりラベルエンドエラーが発生しているか否か
を判断し、ラベルエンドエラーが発生していなければ、
リボンセンサ6からの検出信号によりリボンエンドエラ
ーが発生しているか否かを判断する。
Next, the image data (print data) stored in the image buffer 4a is transferred to the head driver 1
4 and turns on the enable signal to perform printing. When the printing is completed, it is determined whether or not a label end error has occurred based on a detection signal from the label sensor 10.
It is determined whether a ribbon end error has occurred based on a detection signal from the ribbon sensor 6.

【0027】ここでラベルエンドエラーか又はリボンエ
ンドエラーの少なくとも一方が発生していれば、RAM
4にエラーフラグをセットして、ラベル用紙の搬送を停
止するためのパルスモータの減速処理を行うスローダウ
ンタイマをRAM4にセットして、この印字・紙送り割
込処理を終了するようになっている。
If at least one of a label end error and a ribbon end error has occurred, the RAM
Then, an error flag is set in the RAM 4, a slowdown timer for decelerating the pulse motor for stopping the transport of the label paper is set in the RAM 4, and the printing / paper feed interruption processing is completed. I have.

【0028】また、ラベルエンドエラー及びリボンエン
ドエラーのいずれもが発生していなければ、イメージバ
ッファ4aに未印字のイメージデータあるか否かにより
ラベル用紙の搬送を停止させるか否かを判断し、ラベル
用紙の搬送を停止させなければ、このまま印字・紙送り
割込処理を終了するようになっており、ラベル用紙の搬
送を停止させるならば、スローダウンタイマをRAM4
にセットして、この印字・紙送り割込処理を終了するよ
うになっている。
If neither a label end error nor a ribbon end error has occurred, it is determined whether or not to stop the transport of the label paper based on whether or not there is unprinted image data in the image buffer 4a. If the transport of the label paper is not stopped, the printing / paper feed interrupt processing is terminated as it is. If the transport of the label paper is stopped, the slowdown timer is set to RAM4.
To finish the print / paper feed interrupt processing.

【0029】図3に、前記第2の割込タイマ20bから
エラー監視・センサ監視割込信号が出力されて、前記第
2割込エリア3bに記憶されたエラー監視・センサ監視
割込処理のプログラムが起動することにより、前記CP
U1が行うエラー監視・センサ監視割込処理の流れを示
す。
FIG. 3 shows an error monitoring / sensor monitoring interrupt processing program in which an error monitoring / sensor monitoring interrupt signal is output from the second interrupt timer 20b and stored in the second interrupt area 3b. Is activated, the CP
9 shows the flow of an error monitoring / sensor monitoring interrupt process performed by U1.

【0030】まず、カットジャムを監視する処理を行
い、この監視処理による結果でカットジャムエラーが発
生しているか否かを判断する。ここで、カットジャムエ
ラーが発生していれば、RAM4にエラーフラグをセッ
トして、このエラー監視・センサ監視割込処理を終了す
るようになっている。
First, a process for monitoring a cut jam is performed, and it is determined whether or not a cut jam error has occurred as a result of the monitoring process. Here, if a cut jam error has occurred, an error flag is set in the RAM 4 and the error monitoring / sensor monitoring interrupt processing is terminated.

【0031】カットジャムエラーが発生していなけれ
ば、リボンセンサ6からの検出信号により、インクリボ
ンの残りの巻き径をチェックする処理を行い、このリボ
ン径チェック処理の結果から、リボンモータ16の回転
トルクを決定して設定する。
If a cut jam error has not occurred, a process for checking the remaining winding diameter of the ink ribbon based on the detection signal from the ribbon sensor 6 is performed. Determine and set the torque.

【0032】次に、サーミスタ11からの検出信号によ
り、サーマルヘッド13の温度検出処理を行い、この温
度検出処理の結果から、サーマルヘッド13の温度が異
常高温になっているか否かを判断する。ここで、サーマ
ルヘッド13の温度が異常高温になっていれば、RAM
4にエラーフラグをセットして、このエラー監視・セン
サ監視割込処理を終了するようになっている。
Next, the temperature of the thermal head 13 is detected based on a detection signal from the thermistor 11, and it is determined from the result of the temperature detection whether the temperature of the thermal head 13 is abnormally high. Here, if the temperature of the thermal head 13 is abnormally high, the RAM
4, an error flag is set, and this error monitoring / sensor monitoring interrupt processing is terminated.

【0033】また、サーマルヘッド13の温度が異常高
温になっていなければ、温度検出処理の結果に基づい
て、サーマルヘッド13に印加する電圧値及びその通電
パルス幅(通電時間)を決定して設定する。そして、こ
のエラー監視・センサ監視割込処理を終了するようにな
っている。
If the temperature of the thermal head 13 is not abnormally high, the voltage value to be applied to the thermal head 13 and the energizing pulse width (energizing time) are determined and set based on the result of the temperature detection processing. I do. Then, the error monitoring / sensor monitoring interrupt processing is terminated.

【0034】なお、エラーフラグがセットされると、割
込処理が行われていないときに、通常実行されるメイン
処理において、エラー処理が行われるようになってい
る。
When the error flag is set, the error processing is performed in the main processing which is normally executed when the interrupt processing is not performed.

【0035】このような構成の本実施例においては、図
4に示すタイミングで、紙送り・印字割込処理及びエラ
ー監視・センサ監視割込処理が行われる。
In this embodiment having such a configuration, the paper feed / print interruption processing, the error monitoring / sensor monitoring interruption processing are performed at the timing shown in FIG.

【0036】すなわち、第1割込タイマ20aから印字
・紙送り割込信号が周期T1で出力され、一方、第2割
込タイマ20bからエラー監視・センサ監視割込信号が
周期T1より長い周期T2で出力される。
That is, a print / paper feed interrupt signal is output from the first interrupt timer 20a at a period T1, while an error monitoring / sensor monitoring interrupt signal is output from the second interrupt timer 20b at a period T2 longer than the period T1. Is output.

【0037】印字・紙送り割込信号が出力されると、必
ずROM3の第1割込エリア3aに記憶された印字・紙
送り割込処理のプログラムが起動され、印字・紙送り割
込処理が実行される。
When the print / paper feed interrupt signal is output, the print / paper feed interrupt processing program stored in the first interrupt area 3a of the ROM 3 is always started, and the print / paper feed interrupt processing is started. Be executed.

【0038】この印字・紙送り割込処理では、インクリ
ボン及びラベル用紙の搬送が行われ、サーマルヘッド1
3による印字処理が行われる。さらにラベルエンドエラ
ー及びリボンエンドエラーの発生を判断して、少なくと
もどちらか一方のエラーが発生していれば、すぐにラベ
ル用紙の搬送を停止させるための処理としてスローダウ
ンタイマのセットが行われる。
In the printing / paper feed interruption process, the ink ribbon and the label paper are conveyed, and the thermal head 1
3 is performed. Further, it is determined whether a label end error or a ribbon end error has occurred. If at least one of the errors has occurred, a slowdown timer is set as a process for immediately stopping the conveyance of the label sheet.

【0039】次に、エラー監視・センサ監視割込信号が
出力された時に、時点Aのように、印字・紙送り割込処
理が行われていなければ、ROM3の第2割込エリア3
bに記憶されたエラー監視・センサ監視割込処理のプロ
グラムが起動され、エラー監視・センサ監視割込処理が
実行される。
Next, when the error monitoring / sensor monitoring interrupt signal is output and the printing / paper feed interrupting process has not been performed as in the time point A, the second interrupt area 3 of the ROM 3
The program of the error monitoring / sensor monitoring interrupt processing stored in b is started, and the error monitoring / sensor monitoring interrupt processing is executed.

【0040】このエラー監視・センサ監視割込処理で
は、カットジャムの監視を行い、インクリボンの残りの
巻き径をチェックして、リボンモータ16の回転トルク
設定を行い、サーマルヘッド13の温度検出を行って、
サーマルヘッド13への印加電圧値及び通電パルス幅の
設定を行う。
In this error monitoring / sensor monitoring interrupt processing, cut jam is monitored, the remaining winding diameter of the ink ribbon is checked, the rotational torque of the ribbon motor 16 is set, and the temperature of the thermal head 13 is detected. go,
The voltage value applied to the thermal head 13 and the energizing pulse width are set.

【0041】例えば、時点Bのように、エラー監視・セ
ンサ監視割込信号の出力された後、エラー監視・センサ
監視割込処理が終了する前に、時点Cのように、印字・
紙送り割込信号が出力すると、この印字・紙送り割込信
号がエラー監視・センサ監視割込信号より優先順位が高
いので、エラー監視・センサ監視割込処理が中断され、
印字・紙送り割込処理のプログラムが起動され、印字・
紙送り割込処理が実行される。この印字・紙送り割込処
理が終了すると、時点Dのように、中断されたエラー監
視・センサ監視割込処理が再開される。
For example, after the error monitoring / sensor monitoring interrupt signal is output at time B and before the error monitoring / sensor monitoring interrupt processing is completed, printing / printing at time C is completed.
When the paper feed interrupt signal is output, the printing / paper feed interrupt signal has a higher priority than the error monitoring / sensor monitoring interrupt signal, so the error monitoring / sensor monitoring interrupt processing is interrupted.
The print / paper feed interrupt processing program is started,
A paper feed interruption process is executed. When the printing / paper feed interrupting process is completed, the interrupted error monitoring / sensor monitoring interrupting process is restarted, as at time point D.

【0042】また、例えば時点Eのように、エラー監視
・センサ監視割込信号が出力されたときに、印字・紙送
り割込処理が実行されていれば、エラー監視・センサ監
視割込処理のプログラムはすぐには起動されず、印字・
紙送り割込処理が終了まで起動待機となる。印字・紙送
り割込処理が終了すると、時点Fのように、エラー監視
・センサ監視割込処理のプログラムが起動され、エラー
監視・センサ監視割込処理が実行される。
If the print / paper feed interrupt process is executed when the error monitor / sensor monitor interrupt signal is output, for example, at time E, the error monitor / sensor monitor interrupt process is executed. The program is not started immediately,
It is on standby until the paper feed interruption process is completed. When the printing / paper feed interrupting process is completed, an error monitoring / sensor monitoring interrupting program is started and the error monitoring / sensor monitoring interrupting process is executed at time F.

【0043】このように本実施例によれば、ROM3
に、印字・紙送り割込処理のプログラムデータを記憶す
る第1割込エリア3aを設けると共に、エラー監視・セ
ンサ監視割込処理のプログラムデータを記憶する第2割
込エリア3bを設け、第1の割込エリア3aに記憶され
た印字・紙送り割込処理のプログラムを起動させる印字
・紙送り割込信号を周期T1で出力する第1割込タイマ
20aと、その印字・紙送り割込信号より優先順位が低
く、第2割込エリア3bに記憶されたエラー監視・セン
サ監視割込処理のプログラムを起動させるエラー監視・
センサ監視割込信号を周期T1より長い周期T2で出力
する第2割込タイマ20bとを設けたことにより、カッ
トジャムの監視やリボンモータ16の回転トルク設定及
びサーマルヘッド13の印加電圧及び通電パルス幅の設
定等の用紙の搬送及び印字のタイミングで行う必要のな
い処理を、用紙の搬送及び印字のタイミングを制御する
割込処理を実行する周期より長い周期間隔で行うことが
できる。
As described above, according to this embodiment, the ROM 3
A first interrupt area 3a for storing the program data of the printing / paper feed interrupt processing, and a second interrupt area 3b for storing the program data of the error monitoring / sensor monitoring interrupt processing. A first interrupt timer 20a for outputting a print / paper feed interrupt signal at a period T1 for activating a print / paper feed interrupt processing program stored in the interrupt area 3a of the printer 1 and its print / paper feed interrupt signal Error monitoring, which has a lower priority and starts the error monitoring / sensor monitoring interrupt processing program stored in the second interrupt area 3b.
The provision of the second interrupt timer 20b for outputting the sensor monitoring interrupt signal at a cycle T2 longer than the cycle T1 enables monitoring of cut jams, setting of the rotational torque of the ribbon motor 16, application voltage of the thermal head 13, and energizing pulse. Processes that do not need to be performed at the timing of paper conveyance and printing, such as setting the width, can be performed at a longer period than the period at which the interrupt process for controlling the timing of paper conveyance and printing is executed.

【0044】すなわち、印字・紙送り割込信号より優先
順位の低いエラー監視・センサ監視割込信号でエラー監
視・センサ監視割込処理を行うので、印字・紙送り割込
処理が実行されている時に、エラー監視・センサ監視割
込信号が出力されても、印字・紙送り割込処理が終了す
るまでエラー監視・センサ監視割込処理は起動待機さ
せ、またエラー監視・センサ監視割込処理が実行されて
いる時に、印字・紙送り割込信号が出力されると、エラ
ー監視・センサ監視割込処理が中断されて、印字・紙送
り割込処理が実行される。従って、エラー監視・センサ
監視割込処理により印字・紙送り割込処理を実行する周
期を乱すことがなく、用紙の搬送タイミング及び印字タ
イミングは正確に確保される。そこで、エラー監視・セ
ンサ監視割込信号の周期をどのように設定しても、用紙
の搬送タイミング及び印字タイミングを乱すことがない
ので、エラー監視・センサ監視割込信号の周期をエラー
監視・センサ監視割込処理の必要性に適合して可能な限
り長くすることができる。
That is, since error monitoring / sensor monitoring interrupt processing is performed with an error monitoring / sensor monitoring interrupt signal having a lower priority than the printing / paper feeding interrupt signal, printing / paper feeding interrupt processing is executed. Even if the error monitoring / sensor monitoring interrupt signal is output, the error monitoring / sensor monitoring interrupt process is activated until the printing / paper feed interrupt process is completed. If a print / paper feed interrupt signal is output during execution, the error monitoring / sensor monitoring interrupt processing is interrupted, and the print / paper feed interrupt processing is executed. Therefore, the paper transport timing and the print timing are accurately secured without disturbing the cycle of executing the print / paper feed interrupt process by the error monitoring / sensor monitoring interrupt process. Therefore, no matter how the period of the error monitoring / sensor monitoring interrupt signal is set, the period of the sheet conveyance and printing is not disturbed. It can be as long as possible to accommodate the need for monitoring interrupt handling.

【0045】従って、カットジャムの監視やリボンモー
タ16の回転トルク設定及びサーマルヘッド13の印加
電圧及び通電パルス幅の設定等の用紙の搬送及び印字の
タイミングで行う必要のない処理にかかる時間を必要最
低限に抑えることができ、その結果、搬送タイミング及
び印字タイミングを制御する割込処理を起動する周期を
より短くすることができ、印字速度のより一層の高速化
を実現することができる。
Therefore, a time required for processing that is not necessary at the timing of paper transport and printing, such as monitoring of a cut jam, setting of the rotational torque of the ribbon motor 16 and setting of the applied voltage and the energizing pulse width of the thermal head 13 is required. As a result, it is possible to further shorten the cycle for initiating the interrupt process for controlling the transport timing and the print timing, and to further increase the print speed.

【0046】またこの実施例においては、エラー監視・
センサ監視割込処理が完全に用紙の搬送タイミング及び
印字タイミングとは独立しているので、印字速度を変更
しても、エラー監視・センサ監視割込処理を実行する周
期は変わらないという効果を得ることができる。
In this embodiment, error monitoring and
Since the sensor monitoring interrupt processing is completely independent of the paper conveyance timing and the printing timing, even if the printing speed is changed, the effect that the cycle of executing the error monitoring / sensor monitoring interrupt processing does not change is obtained. be able to.

【0047】なお、この実施例においては、用紙の搬送
タイミングと印字タイミングとを、1つの割込処理(割
込信号)により制御するようになっていたが、この発明
はこれに限定されるものではなく、独立した2つの割込
信号によりそれぞれ2つの割込処理を起動させて、用紙
の搬送タイミングと印字タイミングとをそれぞれ独立し
て制御するものについても適用できるものである。
In this embodiment, the paper transport timing and the print timing are controlled by one interrupt process (interrupt signal). However, the present invention is not limited to this. Instead, the present invention can also be applied to a system in which two interrupt processes are activated by two independent interrupt signals to control the paper transport timing and the print timing independently.

【0048】また、この実施例においては、エラー監視
・センサ監視割込処理で、カットジャム、リボンモータ
の回転トルク設定及び、サーマルヘッドの印加電圧及び
通電パルス幅の設定を処理するようになっていたが、こ
の発明はこれに限定されるものではなく、搬送タイミン
グ及び印字タイミングで行う必要のない各種エラー監視
処理や各種設定処理を処理するものならば適用可能であ
る。
In this embodiment, in the error monitoring / sensor monitoring interrupt processing, cut jam, setting of the rotational torque of the ribbon motor, and setting of the applied voltage and energizing pulse width of the thermal head are performed. However, the present invention is not limited to this, and can be applied to any processing that performs various error monitoring processes and various setting processes that do not need to be performed at the transport timing and the print timing.

【0049】[0049]

【発明の効果】以上詳述したようにこの発明によれば、
搬送タイミング及び印字タイミングで行う必要のないエ
ラー監視処理やセンサからの検出信号による設定処理
を、搬送タイミング及び印字タイミングを制御する割込
処理を実行する周期より長い周期間隔で行うことがで
き、従って印字速度のより一層の高速化を実現すること
ができるプリンタを提供できる。
As described in detail above, according to the present invention,
The error monitoring processing and the setting processing based on the detection signal from the sensor that are not required to be performed at the transport timing and the print timing can be performed at a longer cycle interval than the cycle at which the interrupt processing for controlling the transport timing and the print timing is performed. A printer capable of realizing a higher printing speed can be provided.

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

【図1】この発明の一実施例の要部回路構成を示すブロ
ック図。
FIG. 1 is a block diagram showing a main circuit configuration of an embodiment of the present invention.

【図2】同実施例の印字・紙送り割込処理の流れを示す
図。
FIG. 2 is a view showing the flow of a print / paper feed interruption process of the embodiment.

【図3】同実施例のエラー監視・センサ監視割込処理の
流れを示す図。
FIG. 3 is a view showing a flow of an error monitoring / sensor monitoring interrupt process of the embodiment.

【図4】同実施例の割込信号とこの割込信号により実行
される割込処理とのタイミングを示す図。
FIG. 4 is an exemplary view showing the timing of an interrupt signal according to the embodiment and an interrupt process executed by the interrupt signal;

【図5】従来例の割込信号とこの割込信号により実行さ
れる割込処理とのタイミングを示す図。
FIG. 5 is a diagram showing timings of a conventional interrupt signal and an interrupt process executed by the interrupt signal.

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

1…CPU、3a…第1割込エリア、3b…第2割込エ
リア、20a…第1割込タイマ、20b…第2割込タイ
マ。
1 ... CPU, 3a ... first interrupt area, 3b ... second interrupt area, 20a ... first interrupt timer, 20b ... second interrupt timer.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 用紙の搬送及び用紙への印字をそれぞれ
予め設定されたタイミングで処理するプリンタにおい
て、用紙の搬送及び用紙への印字を実行する割込処理の
プログラムが記憶された第1のプログラム記憶手段と、
この第1のプログラム記憶手段に記憶された割込処理の
プログラムを起動させるための割込信号を予め設定され
た周期で発生させる第1の割込手段と、予め設定された
即時対処する必要のないエラーの監視処理やセンサの検
出信号による設定処理等を行う割込処理のプログラムが
記憶された第2のプログラム記憶手段と、前記第1の割
込手段により発生される割込信号の周期より長い周期
で、前記第2のプログラム記憶手段に記憶されたプログ
ラムを起動させるための割込信号を発生させる第2の割
込手段と、この第2の割込手段により割込信号が発生さ
れると前記第1のプログラム記憶手段に記憶されたプロ
グラムが実行中か否かを判断し、実行中でなければ前記
第2のプログラム記憶手段に記憶されたプログラムを起
動させ、実行中であれば終了するまで待機してから前記
第2のプログラム記憶手段に記憶されたプログラムを起
動させる処理待機制御手段と、前記第2のプログラム記
憶手段に記憶されたプログラムを実行中に前記第1の割
込信号により割込信号が発生すると、その実行中のプロ
グラムを停止させて前記第1プログラム記憶手段に記憶
されたプログラムを起動させる処理切替制御手段とを具
備したことを特徴とするプリンタ。
1. A first program storing an interrupt processing program for executing paper conveyance and printing on a paper in a printer which processes paper conveyance and printing on the paper at predetermined timings, respectively. Storage means;
A first interrupt means for generating an interrupt signal. Used to start the stored interrupt processing program to the first program storage means at a preset period, to be immediately addressed preset without errors and the second program storage means for monitoring process and the sensor detection signal interrupt processing program for performing setting process due has been stored in the previous SL of the first interrupt signal generated by interrupt means A second interrupt means for generating an interrupt signal for activating a program stored in the second program storage means at a cycle longer than the cycle, and an interrupt signal generated by the second interrupt means ; Sa
The program stored in the first program storage means.
Judge whether the program is running or not.
Starts the program stored in the second program storage means.
If it is running, wait until it finishes, then
Starts the program stored in the second program storage means.
Processing standby control means to be activated, and the second program
During execution of the program stored in the storage means,
When an interrupt signal is generated by an interrupt signal, the
Stop the program and store it in the first program storage means.
Processing switching control means for activating the stored program.
Printer, characterized in that Bei was.
JP4319013A 1992-11-27 1992-11-27 Printer Expired - Lifetime JP3038089B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4319013A JP3038089B2 (en) 1992-11-27 1992-11-27 Printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4319013A JP3038089B2 (en) 1992-11-27 1992-11-27 Printer

Publications (2)

Publication Number Publication Date
JPH06166249A JPH06166249A (en) 1994-06-14
JP3038089B2 true JP3038089B2 (en) 2000-05-08

Family

ID=18105531

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4319013A Expired - Lifetime JP3038089B2 (en) 1992-11-27 1992-11-27 Printer

Country Status (1)

Country Link
JP (1) JP3038089B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014000679A (en) * 2012-06-15 2014-01-09 Seiko Epson Corp Printer and method for controlling the same

Also Published As

Publication number Publication date
JPH06166249A (en) 1994-06-14

Similar Documents

Publication Publication Date Title
JP3046257B2 (en) Printing system by automatic detection of paper length and control method thereof
JP3149168B2 (en) Printing device
JP3038089B2 (en) Printer
US5697539A (en) Label or tag sheet feeding apparatus with failure detection
KR100219601B1 (en) Ohp print face sensing device of heat transfer printer and method thereof
JPH08253219A (en) Label printer
JP2912723B2 (en) Label printer
JPS6260360A (en) Recording device
JP3323290B2 (en) Thermal transfer printer
JP2001301255A (en) Method for controlling paper-cutting of printer and printer
JP2898881B2 (en) Printing control method
JP2683238B2 (en) Recording device
JPH04347670A (en) Label printer
JPH10157232A (en) Printer
JP3174461B2 (en) Printer reception control method
JP2002086824A (en) Method of controlling paper feeding in printer
JPH1158899A (en) Printer
JP3118491B2 (en) Transfer type printer
JPS58128884A (en) Paper feed detector
JPS62299367A (en) Paper feed controlling system
JPH03231869A (en) Thermal printer
JPH02270577A (en) Printer
JPS63236665A (en) Recorder
JP2002114407A (en) Sheet feeder, and image forming apparatus
JPS62278078A (en) Recorder

Legal Events

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

Free format text: PAYMENT UNTIL: 20080225

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090225

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20100225

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20100225

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20110225

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20110225

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20120225

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20120225

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20130225

Year of fee payment: 13

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130225

Year of fee payment: 13