JP3019306B2 - Printing device - Google Patents

Printing device

Info

Publication number
JP3019306B2
JP3019306B2 JP62177874A JP17787487A JP3019306B2 JP 3019306 B2 JP3019306 B2 JP 3019306B2 JP 62177874 A JP62177874 A JP 62177874A JP 17787487 A JP17787487 A JP 17787487A JP 3019306 B2 JP3019306 B2 JP 3019306B2
Authority
JP
Japan
Prior art keywords
data
interrupt
printing
input
input buffer
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
JP62177874A
Other languages
Japanese (ja)
Other versions
JPS6421528A (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.)
Brother Industries Ltd
Original Assignee
Brother Industries 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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP62177874A priority Critical patent/JP3019306B2/en
Publication of JPS6421528A publication Critical patent/JPS6421528A/en
Application granted granted Critical
Publication of JP3019306B2 publication Critical patent/JP3019306B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Record Information Processing For Printing (AREA)

Description

【発明の詳細な説明】 【産業上の利用分野】 本発明は1つのファイルデータを印字している時に、
割り込んで他のファイルデータを印字できる印字装置に
関する。 【従来技術】 最近のプリンタには、ホストコンピュータが一定量の
データを印字動作と無関係に連続して送信でき送信待ち
時間を少なくするために、定量の大きな入力バッファが
設けられている。 係る入力バッファを有したプリンタを使用する場合に
は、ホストコンピュータは印字対象の1つのファイルデ
ータの全てを入力バッファに送信した後、印字動作を完
了を待つことなく、別のジョブを実行することができ
る。このように、入力バッファの容量が大きいと、ホス
トコンピュータの動作効率が良いという利点がある。 【発明が解決しようとする問題点】 ところが、1つのファイルデータを印字している時
に、緊急で他のファイルデータを印字したい場合がある
が、従来のプリンタは割込印字機能がないため、入力バ
ッファの容量が大きいと入力バッファに記憶されている
データが全て印字されるまで長期間待つ必要があった。
このため、特に緊急を要する場合には、印字動作中にプ
リンタの電源を落として、強制的に印字動作を中止し
て、他のファイルデータを印字するより方法がなかっ
た。このため、プリンタの使用性が悪く、作業効率が低
下するという問題があった。 本発明は、上記の問題点を解決するために成されたも
のであり、その目的とするところは、簡単な操作によ
り、印字動作を一時中断させ他のファイルデータの割込
印字を可能とすることである。 【問題点を解決するための手段】 上記問題点を解決するための発明の構成は、第1図に
示すように、入力バッファに入力されたデータに従って
印字する印字装置において、割込信号を発生する割込信
号発生手段と、割込信号を検出する割込検出手段と、入
力バッファの空き領域量を検出する空き領域量検出手段
と、入力バッファに入力されているデータの印字動作中
に、割込検出手段によって割込信号が検出された時であ
って、空き領域量検出手段により検出された空き領域量
が所定領域量以上である場合、頁末まで印字した後、印
字動作を中断する割込制御手段と、印字動作が中断され
た時の書式データを退避させる書式データ退避手段と、
割込んで印字される割込データを入力バッファの空き領
域に入力する割込データ入力手段と、割込データに従っ
て印字を行う割込データ印字手段と、割込データの印字
終了後に、書式データ退避手段に退避された書式データ
を現在の書式データとし、入力バッファに記憶されてい
る印字動作が中断された後の次頁の印字データから印字
を再開する割込解除手段とを備えたことを特徴とする。 【作用】 入力バッファに入力されたデータに従って印字動作が
実行されている時、割込印字を行いたい場合には、割込
信号発生手段が操作される。割込信号発生手段から発生
された割込信号が割込検出手段により検出されると、入
力バッファの空き領域量が空き領域量検出手段により検
出される。そして、割込信号が検出され、且つ、空き領
域量検出手段により検出された空き領域量が所定領域量
以上である場合には、割込制御手段により、頁末まで印
字された後、印字動作が中断される。そして、書式デー
タ退避手段により現在印字中のファイルデータの書式デ
ータが退避記憶される。その後、割込データ入力手段に
よりホストコンピュータから割込印字の対象となるファ
イルデータが受信され、そのデータは入力バッファの空
領域に入力され、割込データ印字手段により割込データ
が印字される。そして、割込データの印字が終了する
と、割込解除手段により書式データ退避手段に退避され
た書式データが現在の書式データとして設定され、入力
バッファに記憶されている印字動作が中断された後の次
頁の印字データから印字動作が再開される。 以上の作用により割込信号発生手段を操作するだけ
で、切りの良い頁末まで印字が完了した後に、他のファ
イルデータの割込印字が可能となり、元のファイルの印
字が再開される時には、切りの良い中断された頁の次の
頁からデータが印字される。このため、プリンタの使用
性と作業効率が改善される。又、入力バッファの空き領
域量が所定領域量以上となる頁末の印字が完了した後
に、印字が中断されるので、割込印字のためのデータ
が、一定量だけ確実に入力バッファに入力されることか
ら、割込印字の効率が向上する。 【実施例】 以下、本発明を具体的な実施例に基づいて説明する。 第2図は実施例に係るプリンタの電気的構成を示した
ブロックダイヤグラムである。 プリンタPの制御装置を構成する中央処理装置(以下
「CPU」と記す)1にアドレスバス、データバス、制御
バスを介してROM2、RAM3、入出力インタフェース4,5,6
がそれぞれ接続されている。ROM2には、各種の機能処理
ルーチンを含む印字制御プログラム、フォントパターン
等が記憶されている。又、RAM3には、入力データを一時
記憶するFIFO(First In First Out)構成の入力バッフ
ァ31と、1行分の文字パターンを作成するラインバッフ
ァ32と、割込信号が検出されプリンタPを割込印字モー
ドに設定する割込フラグ33と、印字動作が中断されるフ
ァイルデータの現在の書式データを記憶する書式データ
メモリ34とが設けられている。 又、入出力インターフェース4,5,6には、それぞれ駆
動装置7,8,9が接続されており、各駆動装置には、被送
りのためのLFモータ10、印字ヘッドを搭載したキャリッ
ジを移動させるCRモータ11、インパクトワイヤを駆動す
る印字ソレノイド12が、それぞれ接続されている。 又、入出力インタフェース6には割込信号発生手段を
構成する割込スイッチ13と割込印字モードであることを
表示する割込表示ランプ14とが接続されている。 又、プリンタPの入力インタフェオス15はホストコン
ピュータ17側の入出力インタフェース16と接続されてお
り、ホストコンピュータ17側のRAM18に記憶された印字
データはホストコンピュータ17によりプリンタPに送信
され、入力バッファ31に記憶され、そのデータはプリン
タPのCPU1の処理により印字される。 次に、プリンタPのCPU1の処理手順を第3図のタイミ
ングチャート、第4図及び第5図のフローチャート及び
第6図の入力バッファのメモリマップに従って説明す
る。 プリンタPの電源の投入又はリセットにより、第5図
のメインプログラムが起動される。ステップ20(以下、
「S20」と記す。以下のステップも同様)で、各種の初
期設定と共に入力バッファ31がクリアされ割込フラグ33
がオフに初期設定され、次のS21でアクティブハイのBUS
Y信号がLレベルとされる。即ち、第3図のタイミング
チャートにおいて、時刻t1でBUSY信号がLレベルとな
り、プリンタPはNOT BUSYとなり、ホストコンピュータ
17からデータの受信が可能と状態となる。 次に、S22へ移行して入力バッファ31にデータが有る
か否かが判定される。最初の実行サイクルでは入力バッ
ファ31にはデータが存在しないためS22の判定結果はNO
となり、S21へ戻る。最初の実行サイクルでは既にBUSY
信号はLレベルとされており、BUSY信号の信号レベルは
一度設定されると次に設定されるまでラッチされる。従
って、プリンタPの電源が投入されて、ホストコンピュ
ータ17からデータが受信されるまでの間は、S21、S22の
処理が繰り返される。 一方、ホストコンピュータ17においてプリンタ出力ル
ーチンが実行されると、そのプリンタ出力ルーチンでは
BUSY信号のレベル判定が行われる。BUSY信号がLレベル
の時はプリンタPは受信可能状態であることを意味して
おり、時刻t2において、BUSY信号がLレベルにあること
が検出されて8ビットパラレルのDATA信号が出力され、
時刻t3においてその信号の読込タイミングを付与するア
クティブローの▲ ̄▼信号が出力
される。 このアクティブローの▲ ̄▼信
号が入出力インタフェース15に入力されると、その▲
 ̄▼信号が割込信号としてCPU1に入
力され、第4図に示す割込プログラムが実行される。 S1の実行される時刻t3において、ホストコンピュータ
17から次のデータの送信を禁止するため、BUSY信号がH
レベルとされる。そして、次のS2で割込フラグ33がオン
か否かが判定されるが、最初の実行サイクルでは割込フ
ラグ33はオフであるので、S2の判定はNOとなりS3へ移行
する。S3では入出力インタフェース15に入力された1文
字分のデータが読み込まれ、そのデータは入力バッファ
31に記憶され、次のS4で入力バッファ31の先頭データア
ドレス、終端データアドレス、データ長等のFIFOパメー
タが更新される。 次に、S5において、データ受信の確認をホストコンピ
ュータ17に通知するために、S5が実行される時刻t4で▲
▼信号がLレベルとされ、S6が実行される時刻t5
で▲▼信号がHレベルとされる。結局、負パル
ス、アクティブローの▲▼信号がホストコンピュ
ータ17に入出力インタフェース15を介して出力される。 そして、S7で入力バッファ31に空領域が存在するか否
かが判定されるが、最初の実行サイクルでは入力バッフ
ァ31には空領域が存在するため、S8へ移行して次のデー
タの受信許可をホストコンピュータ17に通知するため、
S8の実行される時刻t5において入出力インタフェース15
を介してBUSY信号がLレベルとされ、本割込プログラム
の処理が終了する。割込プログラムが終了すると、CPU1
は第5図のメインプログラムのS21、S22のループに復帰
する。 一方、ホストコンピュータ17は、BUSY信号がLレベル
になったことを検出して送信データが有れば、時刻t6に
おいて次の8ビットパラレルのDATA信号が出力され、時
刻t7において▲ ̄▼信号がプリン
タPに出力される。そして、CPU1はその▲ ̄
▼信号により、再度、第4図の割込プログラ
ムを実行し、データの受信処理が行われる。このよう
に、上記割込プログラムのS1〜S8の処理の繰り返しによ
り、入力バッファ31には、第6図(a)に示すように、
印字するファイルAのデータが全て記憶される。 次に、第5図に戻り、入力バッファ31にデータが入力
されS22の判定がYESとなると、S23へ移行して割込フラ
グ33がオフか否かが判定される。S23の最初の実行サイ
クルでは割込フラグ33はオフであるので、S23の判定がY
ESとなりS24へ移行して、入力バッファ31から1行分の
データが読込まれ、ラインバッファ32にその1行分の印
字パターンが形成され、1行の印字処理が行われる。そ
して、次のS25で印字された1行印字データが入力バッ
ファ31から削除され、次のS26で入力バッファ31のFIFO
パラメータが更新され、次のS27で割込スイッチ13がオ
ンか否かが判定される。割込スイッチ13がオンに操作さ
れない場合には、割込スイッチ13はオフと判定されS22
へ戻り、上記した処理により次行の印字処理が順次実行
される。印字処理の進行に伴い入力バッファ31のメモリ
マップは第6図(b)に示すように、印字が完了したデ
ータが入力バッファ31から削除され、その領域は空領域
に開放される。 このようにして、入力バッファ31に入力されているフ
ァイルAのデータが印字されている時に、割込スイッチ
13が操作されると、S27の判定がYESとなり、次のS28に
て、割込スイッチ13を受けることを示すために、割込表
示ランプ14を点滅させる。そして、S29にてファイルA
のデータは頁末まで印字されたか否かが判定される。
尚、割込スイッチ13のオンオフ状態は1回の操作毎に反
転し、次に操作されるまでそのオンオフ状態はラッチさ
れている。ファイルAのデータが頁末まで印字完了して
いない場合には、S22へ戻りS29で頁末まで印字が完了す
るまで上記した印字処理が継続されると共に割込ランプ
14が点滅している。 S29で頁末まて印字されたと判定され、次のS30で入力
バッファ31の空領域が割込印字が可能なだけの所定容量
以上か否かが判定され、所定容量以上存在しない場合に
はS22へ戻り入力バッファ31の空領域が所定容量以上と
なる頁末まで印字が継続され、割込ランプ14が点滅して
いる。 又、入力バッファ31の空領域が所定容量以上となった
場合には、S30の判定がYESとなりS31へ移行する。S31で
は割込表示ランプ14が点灯され、次のS32でその時の状
態の入力バッファ31に記憶されているファイルAの先頭
データアドレス、データエンドアドレス、データ長が記
憶され、S33でファイルAの現書式データが書式データ
メモリ34に記憶される。この時、入力バッファ31のメモ
リマップは第6図(c)に示す状態となり、S34におい
て入力バッファ31の空領域が割込印字を行うファイルB
のデータを入力するためのサブバッファとして定義さ
れ、そのサブバッファの先頭データアドレス、エンドデ
ータアドレス等のサブバッファのFIFOパラメータが初期
設定される。そして、S35で割込フラグ33がオンに設定
され、S23に戻る。 この時、割込フラグ33はS35でオンに設定されたのでS
23の安定はNOとなり、S36へ移行する。S36ではサブバッ
ファにデータが存在するか否かが判定されるが、最初の
実行サイクルではサブバッファにデータが存在しないの
で、S36の判定がNOとなり、S37へ移行して割込スイッチ
13がオフか否かが判定され、割込スイッチ13がオフでな
い場合にはS21へ戻り、BUSY信号がLレベルとされる。
そして、S36でサブバッファにデータが入力されたと判
定されるまで、S21、S22、S23、S36、S37が繰り返し実
行される。 この間、BUSY信号はLレベルであるので、ホストコン
ピュータ17からファイルBのデータの送信が可能な状態
となり、ホストコンピュータ17からデータの送信が行わ
れると、▲ ̄▼信号に同期して第
4図の割込プログラムが起動される。第4図において、
S1でBUSY信号がHレベルとされ、S2で割込フラグ33がオ
ンか否かが判定されるが、この時、割込フラグ33はオン
であるので、S9へ移行して入出力インタフェース15に受
信されたデータはサブバッファに記憶され、次のS10で
そのサブバッファのFIFOパラメータが更新される。そし
て、S5以下に移行して上述した▲▼信号が出力さ
れ、次のデータを受信するためBUSY信号がLレベルとさ
れる。 このようにして、サブバッファには第6図(d)に示
すように、ファイルBのデータが記憶される。サブバッ
ファにデータが入力されると、第5図のメインプログラ
ムのS36の判定がYESとなり、S38へ移行してS24と同様に
してサブバッファのデータの1行印字処理が実行され
る。そして、次のS39で、第6図(e)に示すように、
サブバッファから印字された1行印字データが削除さ
れ、S40でサブバッファのFIFOパラメータが更新され
る。次に、S41において、サブバッファはデータエンド
か否かが判定され、データエンドでない場合にはS36へ
戻り上記したようにサブバッファに入力されたファイル
Bの印字処理が継続される。 S41でサブバッファがデータエンドと判定されると、S
40へ移行して割込スイッチ13がオフか否かが判定され
る。割込スイッチ13がオフでない場合には、更に、ファ
イルBに続いて割込印字するファイルCが存在するとみ
なして、上述したようにS34、S35の処理を実行した後、
S23へ戻る。その後、上述したように、S23、S36、S37、
S21、S22のステップが繰り返される。この間に、ホスト
コンピュータ17からファイルCのデータが入力されれ
ば、そのファイルCのデータが上述したファイルBのデ
ータと同様にして印字される。 一方、ファイルBの印字中又はファイルCのデータの
受信待ち中(S23、S36、S37、S21、S22を実行中)に、
割込スイッチ13がオフされると、印字終了後のS42又は
データ受信待ち中のS37の判定がYESとなり、S43へ移行
する。S43ではS32で退避されたファイルAに関する入力
バッファ31のFIFOパラメータが復元され、次のS44ではS
33で書式データメモリ34に退避されたファイルAの印字
中断時の書式データが復元される。そして、S45で割込
表示ランプ14が消灯され、S46で割込フラグがオフとさ
れS23に戻る、この時、入力バッファ31のメモリマップ
は第6図(f)に示すようになり、割込フラグ33はS46
でオフとされたので、S23の判定がYESとなり、上述した
S24以下が実行される。即ち、入力バッファ31に残され
ているファイルAのデータの印字が再開されることにな
り、入力バッファ31は第6図(g)に示すようにファイ
ルAのデータが印字の進行に伴い順次入力バッファ31か
ら消去される。 又、ファイルAの印字を再開した後に、又割込スイッ
チ13がオンに操作されれば、再度、他のファイルを割込
印字することが可能となる。 上記実施例ではファイルAの全てのデータを一度に入
力バッファ31に入力しているため、印字動作中はホスト
コンピュータ17は既にファイルAの印字プログラムを終
了している。従って、割込スイッチ13を操作した後にホ
ストコンピュータ17で他のファイルBの印字プログラム
を実行させれば良いため、割込スイッチ13のオンオフ状
態をホストコンピュータに通知する必要がない。 しかし、割込スイッチ13のオンオフ状態をホストコン
ピュータ17に通知するようにすれば、ホストコンピュー
タ17は割込スイッチ13のオン状態を検出してファイルA
の印字プログラムの実行を一時中断して、ファイルBの
印字プログラムを実行させることができるので、ファイ
ルAの全データを一度に入力バッファ31に送信しておく
必要はない。 割込印字モードに設定するための割込信号発生手段は
ホストコンピュータ17から割込コマンドを送信する手段
で構成してもよい。この場合には、第4図の割込プログ
ラムで1文字データが入力された時に入力データを判別
し、割込コマンドが受信された場合に、割込印字モード
に設定するようにしてもよい。 又、第7図に示すように、割込スイッチ13がオンとな
り割込印字されるデータを入力する場合に、入力バッフ
ァ31に記憶されている最初のファイルデータを入力バッ
ファ31の先頭アドレスから再配置させ、空領域からなる
サブバッファをその後に形成するようにしてもよい。 【発明の効果】 本発明は、入力バッファの空き領域量を検出する空き
領域量検出手段と、データの印字動作中に割込信号が検
出され、且つ、入力バッファの検出された空き領域量が
所定領域量以上である場合には、頁末まで印字した後、
印字動作を中断する割込制御手段と、印字動作が中断さ
れた時の書式データを退避させる書式データ退避手段
と、割込データを入力バッファの空き領域に入力する割
込データ入力手段と、割込データ印字手段と、割込デー
タの印字終了後に、書式データ退避手段に退避された書
式データを現在の書式データとし、印字動作が中断され
た後の次頁の印字データから印字を再開する割込解除手
段とを有している。従って、1つのファイルデータを印
字している時に、入力バッファに割込印字のためのデー
タの入力領域を確実に確保されるような、切りの良い頁
末まで印字が完了した後に、他のファイルデータの割込
印字が可能となる。このため、割込み印字のデータ量を
所定量以上確保できるので、割込み印字の効率が向上す
る。又、元のファイルの印字が再開される時には、切り
の良い中断された頁の次の頁からデータが印字されるの
で、プリンタの使用性と作業効率が改善される。 特に、頁単位で中断されることから、印字用紙の分類
管理が容易となる。又、割込印字をするファイルデータ
は、元のファイルのデータを記憶している入力バッファ
の空き領域に入力され、その空き領域に入力されたデー
タが割込印字されることから、入力バッファの利用効率
が高くなり、プリンタの製造コストを低減させることが
できる。 さらに、入力バッファの空領域が所定容量以上となる
頁末の印字が完了した後に、印字を中断する場合には、
割込印字のためのデータが、一定容量だけ確実に入力バ
ッファに入力されることから、割込印字の効率が向上す
る。
Description: BACKGROUND OF THE INVENTION The present invention relates to a method for printing one file data.
The present invention relates to a printer capable of printing other file data by interruption. 2. Description of the Related Art In recent printers, an input buffer with a large amount is provided so that a host computer can continuously transmit a fixed amount of data irrespective of a printing operation and reduce transmission waiting time. In the case of using a printer having such an input buffer, the host computer transmits all of one file data to be printed to the input buffer, and then executes another job without waiting for completion of the printing operation. Can be. Thus, when the capacity of the input buffer is large, there is an advantage that the operation efficiency of the host computer is good. [Problems to be Solved by the Invention] However, when one file data is being printed, there is a case where it is urgent to print another file data. If the capacity of the buffer is large, it is necessary to wait for a long time until all the data stored in the input buffer is printed.
For this reason, especially in the case of urgent need, there is no other method than turning off the printer during the printing operation, forcibly stopping the printing operation, and printing other file data. For this reason, there is a problem that the usability of the printer is poor and the working efficiency is reduced. SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and an object of the present invention is to enable a simple operation to temporarily suspend a printing operation and enable interruption printing of other file data. That is. [Means for Solving the Problems] A configuration of the invention for solving the above problems is to generate an interrupt signal in a printing apparatus that prints according to data input to an input buffer as shown in FIG. Interrupt signal generating means, an interrupt detecting means for detecting an interrupt signal, a free space amount detecting means for detecting a free space amount of an input buffer, and a printing operation of data input to the input buffer. When the interrupt signal is detected by the interrupt detection means, and when the free space amount detected by the free space amount detection means is equal to or greater than the predetermined area amount, the printing operation is interrupted after printing to the end of the page. Interrupt control means, format data saving means for saving format data when the printing operation is interrupted,
Interrupt data input means for inputting interrupt data to be printed in an empty area of the input buffer, interrupt data printing means for performing printing in accordance with the interrupt data, and saving of format data after interrupt data printing is completed. Interrupt release means for using the format data saved in the means as the current format data and restarting printing from the print data of the next page after the printing operation stored in the input buffer is interrupted. And When a print operation is being executed in accordance with the data input to the input buffer, an interrupt signal generating means is operated to perform interrupt printing. When the interrupt signal generated by the interrupt signal generating means is detected by the interrupt detecting means, the free area amount of the input buffer is detected by the free area amount detecting means. If the interrupt signal is detected and the free space amount detected by the free space amount detecting means is equal to or greater than the predetermined area amount, the printing is performed by the interrupt control means after the end of the page is printed. Is interrupted. Then, the format data of the currently printed file data is saved and stored by the format data saving means. Thereafter, file data to be subjected to interrupt printing is received from the host computer by the interrupt data input means, the data is input to an empty area of the input buffer, and the interrupt data printing means prints the interrupt data. When the printing of the interrupt data is completed, the format data saved in the format data saving means by the interrupt canceling means is set as the current format data, and after the printing operation stored in the input buffer is interrupted. The printing operation is restarted from the printing data of the next page. Only by operating the interrupt signal generating means by the above operation, after printing is completed to the end of the page with good cutting, interrupt printing of other file data becomes possible, and when printing of the original file is resumed, Data is printed from the next page after the interrupted page. Therefore, usability and work efficiency of the printer are improved. Further, after the printing at the end of the page where the free space amount of the input buffer is equal to or more than the predetermined area amount is completed, the printing is interrupted, so that a certain amount of data for the interrupt printing is surely input to the input buffer. Therefore, the efficiency of interrupt printing is improved. EXAMPLES Hereinafter, the present invention will be described based on specific examples. FIG. 2 is a block diagram showing an electrical configuration of the printer according to the embodiment. A central processing unit (hereinafter, referred to as a “CPU”) 1 constituting a control device of the printer P has a ROM 2, a RAM 3, an input / output interface 4, 5, 6 via an address bus, a data bus and a control bus.
Are connected respectively. The ROM 2 stores a print control program including various function processing routines, font patterns, and the like. The RAM 3 also has an input buffer 31 having a FIFO (First In First Out) configuration for temporarily storing input data, a line buffer 32 for creating a character pattern for one line, and a printer P which is detected when an interrupt signal is detected. There is provided an interrupt flag 33 for setting the print mode, and a format data memory 34 for storing the current format data of the file data for which the printing operation is interrupted. Drive units 7, 8, and 9 are connected to the input / output interfaces 4, 5, and 6, respectively, and each drive unit moves a LF motor 10 for feeding and a carriage equipped with a print head. A CR motor 11 to be driven and a printing solenoid 12 for driving an impact wire are connected to each other. Further, the input / output interface 6 is connected to an interrupt switch 13 constituting an interrupt signal generating means and an interrupt display lamp 14 for displaying that the apparatus is in an interrupt print mode. The input interface 15 of the printer P is connected to the input / output interface 16 of the host computer 17, and the print data stored in the RAM 18 of the host computer 17 is transmitted to the printer P by the host computer 17 and the input buffer The data is stored in the CPU 31 and printed by the processing of the CPU 1 of the printer P. Next, the processing procedure of the CPU 1 of the printer P will be described with reference to the timing chart of FIG. 3, the flowcharts of FIGS. 4 and 5, and the memory map of the input buffer of FIG. By turning on or resetting the power of the printer P, the main program shown in FIG. 5 is started. Step 20 (below,
Indicated as “S20”. In the following steps, the input buffer 31 is cleared together with various initial settings, and the interrupt flag 33 is set.
Is initially set to off, and the next high S21 BUS
The Y signal is set to the L level. That is, in the timing chart of FIG. 3, the BUSY signal becomes L level at time t1, the printer P becomes NOT BUSY, and the host computer
It becomes possible to receive data from 17. Next, the process proceeds to S22, where it is determined whether or not there is data in the input buffer 31. In the first execution cycle, since there is no data in the input buffer 31, the determination result in S22 is NO.
And returns to S21. BUSY already in the first execution cycle
The signal is at L level, and once the signal level of the BUSY signal is set, it is latched until the next setting. Therefore, the processes of S21 and S22 are repeated until the power of the printer P is turned on and the data is received from the host computer 17. On the other hand, when the host computer 17 executes the printer output routine, the printer output routine executes
The level of the BUSY signal is determined. When the BUSY signal is at the L level, it means that the printer P is in a receivable state. At time t2, it is detected that the BUSY signal is at the L level, and an 8-bit parallel DATA signal is output.
At time t3, an active-low  ̄ signal giving the signal read timing is output. When this active-low ▲  ̄ ▼ signal is input to the input / output interface 15,
(4) The signal is input to the CPU 1 as an interrupt signal, and the interrupt program shown in FIG. 4 is executed. At time t3 when S1 is executed, the host computer
The BUSY signal goes high to prohibit the next data transmission from 17.
Level. Then, in the next S2, it is determined whether or not the interrupt flag 33 is on. However, in the first execution cycle, since the interrupt flag 33 is off, the determination in S2 is NO and the process shifts to S3. In S3, the data for one character input to the input / output interface 15 is read and the data is stored in the input buffer.
The FIFO parameters such as the start data address, end data address, and data length of the input buffer 31 are updated in the next S4. Next, in S5, in order to notify the host computer 17 of the confirmation of the data reception, at time t4 when S5 is executed,
Time t5 when the signal goes low and S6 is executed
The signal is changed to H level. As a result, a negative pulse and an active low signal are output to the host computer 17 via the input / output interface 15. Then, in S7, it is determined whether or not an empty area exists in the input buffer 31.Since an empty area exists in the input buffer 31 in the first execution cycle, the process proceeds to S8 and the reception of the next data is permitted. To notify the host computer 17
At time t5 when S8 is executed, input / output interface 15
And the BUSY signal is changed to the L level, and the processing of the interrupt program ends. When the interrupt program ends, CPU1
Returns to the loop of S21 and S22 of the main program of FIG. On the other hand, if the host computer 17 detects that the BUSY signal has become L level and there is transmission data, the next 8-bit parallel DATA signal is output at time t6, and the ▲  ̄ ▼ signal is output at time t7. Output to the printer P. And CPU1
In response to the signal, the interrupt program shown in FIG. 4 is executed again to perform data reception processing. In this way, by repeating the processing of S1 to S8 of the interrupt program, as shown in FIG.
All data of the file A to be printed are stored. Next, returning to FIG. 5, when data is input to the input buffer 31 and the determination in S22 is YES, the process proceeds to S23, where it is determined whether or not the interrupt flag 33 is off. Since the interrupt flag 33 is off in the first execution cycle of S23, the determination in S23 is Y
The flow then goes to S24, where the data for one line is read from the input buffer 31, the print pattern for one line is formed in the line buffer 32, and the print processing for one line is performed. Then, the one-line print data printed in the next S25 is deleted from the input buffer 31, and in the next S26, the FIFO in the input buffer 31 is deleted.
The parameters are updated, and it is determined in next S27 whether or not the interrupt switch 13 is on. If the interrupt switch 13 is not turned on, the interrupt switch 13 is determined to be off and S22
Then, the printing processing of the next line is sequentially executed by the above processing. As the printing process progresses, the memory map of the input buffer 31 deletes the data for which printing has been completed from the input buffer 31 as shown in FIG. In this way, when the data of the file A input to the input buffer 31 is being printed, the interrupt switch
When the button 13 is operated, the determination in S27 becomes YES, and in the next S28, the interruption display lamp 14 is blinked to indicate that the interruption switch 13 is received. Then, in S29, file A
It is determined whether the data has been printed to the end of the page.
The on / off state of the interrupt switch 13 is inverted each time the operation is performed, and the on / off state is latched until the next operation. If the data of the file A has not been printed to the end of the page, the flow returns to S22, and the above-described printing process is continued until the printing to the end of the page is completed in S29.
14 is blinking. In S29, it is determined that the end of the page has been printed, and in the next S30, it is determined whether or not the empty area of the input buffer 31 has a predetermined capacity or more capable of performing interrupt printing. Then, the printing is continued until the end of the page where the empty area of the input buffer 31 is equal to or larger than the predetermined capacity, and the interrupt lamp 14 is blinking. If the empty area of the input buffer 31 is equal to or larger than the predetermined capacity, the determination in S30 is YES, and the process shifts to S31. At S31, the interrupt indicator lamp 14 is turned on. At the next S32, the head data address, data end address, and data length of the file A stored in the input buffer 31 at that time are stored. The format data is stored in the format data memory 34. At this time, the memory map of the input buffer 31 is in the state shown in FIG. 6 (c).
Is defined as a sub-buffer for inputting the data of the sub-buffer, and FIFO parameters of the sub-buffer such as a head data address and an end data address of the sub-buffer are initialized. Then, the interrupt flag 33 is set on in S35, and the process returns to S23. At this time, since the interrupt flag 33 was set to ON in S35, S
The stability at 23 becomes NO, and the flow shifts to S36. In S36, it is determined whether or not data exists in the sub-buffer.However, in the first execution cycle, there is no data in the sub-buffer, so the determination in S36 becomes NO, and the process proceeds to S37 to execute the interrupt switch.
It is determined whether or not the interrupt switch 13 is off. If the interrupt switch 13 is not off, the process returns to S21, and the BUSY signal is set to the L level.
Then, S21, S22, S23, S36, and S37 are repeatedly executed until it is determined in S36 that data has been input to the sub-buffer. During this time, the BUSY signal is at the L level, so that the file data of the file B can be transmitted from the host computer 17. When the data is transmitted from the host computer 17, the BUSY signal is synchronized with the ▲  ̄ ▼ signal in FIG. Is started. In FIG.
At S1, the BUSY signal is set to the H level, and at S2, it is determined whether or not the interrupt flag 33 is on. At this time, since the interrupt flag 33 is on, the process proceeds to S9 and the input / output interface 15 The received data is stored in the sub-buffer, and in the next S10, the FIFO parameter of the sub-buffer is updated. Then, the process proceeds to S5 and thereafter, the above-mentioned signal is output, and the BUSY signal is set to the L level to receive the next data. Thus, the data of the file B is stored in the sub-buffer as shown in FIG. 6 (d). When the data is input to the sub-buffer, the determination in S36 of the main program in FIG. 5 becomes YES, and the flow shifts to S38 to execute the one-line printing process of the data in the sub-buffer in the same manner as in S24. Then, in the next S39, as shown in FIG.
The one-line print data printed from the sub-buffer is deleted, and the FIFO parameters of the sub-buffer are updated in S40. Next, in S41, it is determined whether or not the sub-buffer is at the data end. If not, the process returns to S36 and the printing process of the file B input to the sub-buffer is continued as described above. If the sub-buffer is determined to be data end in S41, S
The process proceeds to 40, where it is determined whether or not the interrupt switch 13 is off. If the interrupt switch 13 is not turned off, it is further assumed that there is a file C to be subjected to interrupt printing following the file B, and after executing the processing of S34 and S35 as described above,
Return to S23. Then, as described above, S23, S36, S37,
Steps S21 and S22 are repeated. During this time, if the data of the file C is input from the host computer 17, the data of the file C is printed in the same manner as the data of the file B described above. On the other hand, while printing file B or waiting for reception of data of file C (while executing S23, S36, S37, S21, S22),
When the interrupt switch 13 is turned off, the determination at S42 after the printing is completed or the determination at S37 during the data reception waiting is YES, and the process proceeds to S43. In S43, the FIFO parameters of the input buffer 31 relating to the file A saved in S32 are restored.
At 33, the format data at the time of interrupting the printing of the file A saved in the format data memory 34 is restored. Then, the interrupt display lamp 14 is turned off in S45, the interrupt flag is turned off in S46, and the process returns to S23. At this time, the memory map of the input buffer 31 becomes as shown in FIG. Flag 33 is S46
Was turned off, so the determination in S23 was YES, and
S24 and subsequent steps are executed. That is, the printing of the data of the file A remaining in the input buffer 31 is restarted, and the data of the file A is sequentially input to the input buffer 31 as the printing progresses as shown in FIG. Erase from buffer 31. If the interrupt switch 13 is turned on again after the printing of the file A is restarted, another file can be interrupt-printed again. In the above embodiment, since all the data of the file A is input to the input buffer 31 at one time, the host computer 17 has already finished the printing program of the file A during the printing operation. Therefore, since the host computer 17 only needs to execute the print program for another file B after operating the interrupt switch 13, it is not necessary to notify the host computer of the on / off state of the interrupt switch 13. However, if the on / off state of the interrupt switch 13 is notified to the host computer 17, the host computer 17 detects the on state of the interrupt switch 13 and
Since the execution of the printing program of the file B can be temporarily suspended and the printing program of the file B can be executed, it is not necessary to transmit all the data of the file A to the input buffer 31 at one time. The interrupt signal generating means for setting the interrupt print mode may be constituted by means for transmitting an interrupt command from the host computer 17. In this case, the input data may be determined when one character data is input by the interrupt program of FIG. 4, and the interrupt print mode may be set when an interrupt command is received. As shown in FIG. 7, when the interrupt switch 13 is turned on to input data to be subjected to interrupt printing, the first file data stored in the input buffer 31 is re-started from the head address of the input buffer 31. The sub-buffer composed of empty areas may be formed thereafter. According to the present invention, there is provided a free space amount detecting means for detecting a free space amount of an input buffer, and an interrupt signal is detected during a data printing operation, and the detected free space amount of the input buffer is detected. If it is more than the predetermined area amount, after printing to the end of the page,
Interrupt control means for interrupting a printing operation, format data saving means for saving format data when the printing operation is interrupted, interrupt data input means for inputting interrupt data to a free area of an input buffer; The print data printing means and, after the completion of the printing of the interrupt data, the format data saved in the format data saving means as the current format data, and the printing restarting from the print data of the next page after the printing operation is interrupted. Release means. Therefore, when one file data is being printed, after the printing is completed up to the end of a well-cut page so that the data input area for interrupt printing can be reliably secured in the input buffer, another file is printed. Interrupt printing of data becomes possible. For this reason, the data amount of the interrupt printing can be secured to a predetermined amount or more, and the efficiency of the interrupt printing is improved. Further, when printing of the original file is resumed, data is printed from the page following the interrupted page, which improves the usability and work efficiency of the printer. In particular, since the printing is interrupted in page units, it is easy to manage the classification of the printing paper. Also, the file data to be subjected to the interrupt printing is input to the empty area of the input buffer storing the data of the original file, and the data input to the empty area is interrupt-printed. The utilization efficiency is increased, and the manufacturing cost of the printer can be reduced. Further, when printing is interrupted after printing at the end of the page where the empty area of the input buffer is equal to or larger than the predetermined capacity,
Since the data for the interrupt printing is surely input to the input buffer by a certain amount, the efficiency of the interrupt printing is improved.

【図面の簡単な説明】 第1図は本発明の概念を示したブロックダイヤグラム。
第2図は本発明の具体的な一実施例に係る印字装置の電
気的構成を示したブロックダイヤグラム。第3図はプリ
ンタへのデータの入力を示したタイミングチャート。第
4図、第5図は、それぞれ、印字装置で使用されたCPU
の処理手順を示したフローチャート。第6図は入力バッ
ファのメモリ構成を示した説明図。第7図は他の変形例
に係る入力バッファのメモリ構成を示した説明図であ
る。 P……プリンタ、1……CPU、3……RAM、13……割込ス
イッチ、14……割込表示ランプ、15、16……入出力イン
タフェース、17……ホストコンピュータ、31……入力バ
ッファ、32……ラインバッファ、33……割込フラグ、34
……書式データメモリ
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing the concept of the present invention.
FIG. 2 is a block diagram showing an electrical configuration of a printing apparatus according to a specific embodiment of the present invention. FIG. 3 is a timing chart showing data input to the printer. 4 and 5 show the CPU used in the printing device, respectively.
5 is a flowchart showing the processing procedure of FIG. FIG. 6 is an explanatory diagram showing a memory configuration of an input buffer. FIG. 7 is an explanatory diagram showing a memory configuration of an input buffer according to another modification. P ... Printer, 1 ... CPU, 3 ... RAM, 13 ... Interrupt switch, 14 ... Interrupt indicator lamp, 15, 16 ... I / O interface, 17 ... Host computer, 31 ... Input buffer , 32 ... line buffer, 33 ... interrupt flag, 34
...... Format data memory

Claims (1)

(57)【特許請求の範囲】 1.入力バッファに入力されたデータに従って印字する
印字装置において、 割込信号を発生する割込信号発生手段と、 前記割込信号を検出する割込検出手段と、 前記入力バッファの空き領域量を検出する空き領域量検
出手段と、 前記入力バッファに入力されているデータの印字動作中
に、前記割込検出手段によって前記割込信号が検出され
た時であって、前記空き領域量検出手段により検出され
た空き領域量が所定領域量以上である場合、頁末まで印
字した後、印字動作を中断する割込制御手段と、 印字動作が中断された時の書式データを退避させる書式
データ退避手段と、 割込んで印字される割込データを前記入力バッファの空
き領域に入力する割込データ入力手段と、 前記割込データに従って印字を行う割込データ印字手段
と、 前記割込データの印字終了後に、前記書式データ退避手
段に退避された書式データを現在の書式データとし、前
記入力バッファに記憶されている印字動作が中断された
後の次頁の印字データから印字を再開する割込解除手段
と を備えることを特徴とする印字装置。 2.前記割込制御手段は、前記入力バッファに入力され
ているデータの印字動作中に、前記割込検出手段によっ
て前記割込信号が検出された時であって、前記空き領域
検出手段により検出された空き領域量が所定領域量以上
でない場合、前記入力バッファの空き領域量が所定領域
量以上となる頁末まで印字した後、印字動作を中断する
ことを特徴とする特許請求の範囲第1項に記載の印字装
置。
(57) [Claims] In a printing apparatus for printing in accordance with data input to an input buffer, an interrupt signal generating means for generating an interrupt signal, an interrupt detecting means for detecting the interrupt signal, and detecting a free space amount of the input buffer Empty area amount detecting means, when the interrupt signal is detected by the interrupt detecting means during the printing operation of the data input to the input buffer, and is detected by the empty area amount detecting means. Interrupt control means for interrupting the printing operation after printing to the end of the page when the empty space amount is equal to or more than the predetermined area amount; format data saving means for saving format data when the printing operation is interrupted; Interrupt data input means for inputting interrupt data to be printed by interruption into an empty area of the input buffer; interrupt data printing means for performing printing in accordance with the interrupt data; After the printing of the data is completed, the format data saved in the format data saving means is used as the current format data, and printing is restarted from the print data of the next page after the printing operation stored in the input buffer is interrupted. A printing device comprising: an interrupt canceling unit. 2. The interrupt control unit detects when the interrupt signal is detected by the interrupt detection unit during the printing operation of the data input to the input buffer and is detected by the free space detection unit. 2. The printing method according to claim 1, wherein when the free space amount is not equal to or more than the predetermined area amount, the printing operation is interrupted after printing to the end of the page where the free space amount of the input buffer is equal to or more than the predetermined area amount. The printing device according to the above.
JP62177874A 1987-07-16 1987-07-16 Printing device Expired - Fee Related JP3019306B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62177874A JP3019306B2 (en) 1987-07-16 1987-07-16 Printing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62177874A JP3019306B2 (en) 1987-07-16 1987-07-16 Printing device

Related Child Applications (4)

Application Number Title Priority Date Filing Date
JP8190338A Division JP2785814B2 (en) 1996-07-19 1996-07-19 Data output device
JP8190340A Division JPH08324041A (en) 1996-07-19 1996-07-19 Printing apparatus
JP8190337A Division JP2785813B2 (en) 1996-07-19 1996-07-19 Data output device
JP8190339A Division JPH08337019A (en) 1996-07-19 1996-07-19 Data outputting device

Publications (2)

Publication Number Publication Date
JPS6421528A JPS6421528A (en) 1989-01-24
JP3019306B2 true JP3019306B2 (en) 2000-03-13

Family

ID=16038568

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62177874A Expired - Fee Related JP3019306B2 (en) 1987-07-16 1987-07-16 Printing device

Country Status (1)

Country Link
JP (1) JP3019306B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2745514B2 (en) * 1988-01-07 1998-04-28 ミノルタ株式会社 Printer control device
JP3048575B2 (en) * 1988-01-07 2000-06-05 ミノルタ株式会社 Printer control device
JPH04193573A (en) * 1990-11-28 1992-07-13 Hitachi Ltd Printing confirming and correcting apparatus and printer
JPH08310062A (en) * 1995-05-23 1996-11-26 Nec Niigata Ltd Control method for registration character to be stored in printer
JPH09156165A (en) * 1995-12-06 1997-06-17 Nec Corp Printer
JP4401618B2 (en) 2002-04-15 2010-01-20 キヤノン株式会社 Recording apparatus and buffer management method
JP4018433B2 (en) 2002-04-15 2007-12-05 キヤノン株式会社 Recording device
JP6421556B2 (en) * 2014-11-20 2018-11-14 セイコーエプソン株式会社 Printing device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59136852A (en) * 1983-01-27 1984-08-06 Sharp Corp Preserving method of display and print mode in display and print device
JPS6045834A (en) * 1983-08-22 1985-03-12 Fujitsu Ltd Control system for print output
JPS60178529A (en) * 1984-02-24 1985-09-12 Fujitsu Ltd Interruption control system of writer

Also Published As

Publication number Publication date
JPS6421528A (en) 1989-01-24

Similar Documents

Publication Publication Date Title
JP2551011B2 (en) Printer
JPH07323643A (en) Error control device of printer
JP3019306B2 (en) Printing device
JP2774369B2 (en) Image recording device
JPH10138569A (en) Character information-processing apparatus
JP2785813B2 (en) Data output device
JP2000272203A (en) Printer apparatus
JP2851973B2 (en) Output method and device
JP2785814B2 (en) Data output device
JP3114935B2 (en) Printer
JPH08337019A (en) Data outputting device
JPH08324041A (en) Printing apparatus
JPH11138918A (en) Image forming system
JPH1017168A (en) Paper sheet cassette automatic switching method
JP2003300372A (en) Printer, method for processing error, computer readable storage medium and program
JP2803322B2 (en) Printer control device
JP2780974B2 (en) Printer
JP2003228472A (en) Image-forming and reading system
JP4496989B2 (en) Serial printer
JP2003285507A (en) Printer
JP2001010169A (en) Printing control device, its interruption printing control method and storage medium readable by computer storing its control program
JP2004062875A (en) Printing system, printer, and printing control method
JP3258130B2 (en) Print control device and printer control method
JPH06286271A (en) Control method of printer and device therefor
JPH0596822A (en) Forced printing method for page printer

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees