JPH0944322A - Printing device - Google Patents

Printing device

Info

Publication number
JPH0944322A
JPH0944322A JP8217112A JP21711296A JPH0944322A JP H0944322 A JPH0944322 A JP H0944322A JP 8217112 A JP8217112 A JP 8217112A JP 21711296 A JP21711296 A JP 21711296A JP H0944322 A JPH0944322 A JP H0944322A
Authority
JP
Japan
Prior art keywords
control code
control
code table
candidate
data 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.)
Granted
Application number
JP8217112A
Other languages
Japanese (ja)
Other versions
JP3045077B2 (en
Inventor
Masaaki Hori
雅明 堀
Masashi Suzuki
正史 鈴木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP8217112A priority Critical patent/JP3045077B2/en
Publication of JPH0944322A publication Critical patent/JPH0944322A/en
Application granted granted Critical
Publication of JP3045077B2 publication Critical patent/JP3045077B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)
  • Record Information Processing For Printing (AREA)

Abstract

(57)【要約】 【課題】 送信されるデータに含まれる制御コードの制
御コード体系に最適な制御コードテーブルを自動的に選
択し得るような印字装置を提供すること。 【解決手段】 プリンタの初期状態では、第1制御コー
ドテーブル22が選択され、通常のプリンタの印字動作
を第1制御コードテーブル22に従って行うとともに、
印字するために受信されたデータより、第1制御コード
テーブル22を検索し、未定義コードのカウント値Nが
所定値(例えば、「2」)に到達したときに、第2制御
コードテーブル23を選択し、以後の印字は、第2制御
コードテーブル23に従って行うとともに、印字するた
めに受信されたデータより、第2制御コードテーブル2
3を検索するようにする。そして、未定義コードのカウ
ント値nが所定値(例えば、「2」)に到達したとき
に、第1制御コードテーブル22を選択し、以後、この
動作を繰り返す。
(57) Abstract: To provide a printer capable of automatically selecting a control code table most suitable for a control code system of a control code included in transmitted data. In a printer initial state, a first control code table 22 is selected, and a normal printer printing operation is performed in accordance with the first control code table 22.
The first control code table 22 is searched from the data received for printing, and when the count value N of undefined codes reaches a predetermined value (for example, “2”), the second control code table 23 is displayed. Printing after the selection is performed according to the second control code table 23, and the second control code table 2 is selected from the data received for printing.
Try to search for 3. Then, when the count value n of the undefined code reaches a predetermined value (for example, "2"), the first control code table 22 is selected, and thereafter, this operation is repeated.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は印字装置に関し、特
に送信されるデータに含まれる制御コードの制御コード
体系に最適な制御コードテーブルを、複数の制御コード
テーブルの中から選択するようにしたものに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a printing apparatus, and more particularly, to a control code table optimal for a control code system of control codes included in transmitted data, which is selected from a plurality of control code tables. Regarding

【0002】[0002]

【従来の技術】一般に、汎用性のあるシリアルプリンタ
などは、大型コンピュータやパーソナルコンピュータ等
のホストコンピュータに接続され、ホストコンピュータ
から出力される各種のデータやプログラムデータを印字
用紙に印字するようになっている。
2. Description of the Related Art Generally, a general-purpose serial printer or the like is connected to a host computer such as a large computer or a personal computer, and various data and program data output from the host computer are printed on a printing paper. ing.

【0003】前記パーソナルコンピュータでは、使用す
るソフトウェアの種類に応じて、出力されるデータの制
御コード体系(コマンド体系)も変更されるので、パー
ソナルコンピュータに接続されるプリンタにはパーソナ
ルコンピュータから出力される制御コードの制御コード
体系に合致するように複数の制御コードテーブルが設け
られている。そして、パーソナルコンピュータのソフト
ウェアの変更に伴って変更後の制御コードテーブルを選
択させるためのスイッチを操作し、且つ電源を再度投入
するか或はリセット操作するようになっている。
In the personal computer, the control code system (command system) of the output data is also changed according to the type of software used, so that the printer connected to the personal computer outputs from the personal computer. A plurality of control code tables are provided so as to match the control code system of the control code. When the software of the personal computer is changed, the switch for selecting the changed control code table is operated, and the power is turned on again or the reset operation is performed.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、 前記
プリンタにおいては、まず、パーソナルコンピュータか
ら出力される制御コードの制御コード体系が異なること
をオペレータが認識しなければならない。そして、オペ
レータは、制御コードテーブルを変更する毎にスイッチ
操作やリセット操作或は電源の再投入操作等の煩雑な操
作をしなければならない。さらに、制御コードテーブル
を変更させるスイッチの誤操作により、不適当な制御コ
ードテーブルを選択する場合があるという問題がある。
However, in the printer, the operator must first recognize that the control code systems of the control codes output from the personal computer are different. Then, every time the operator changes the control code table, the operator has to perform a complicated operation such as a switch operation, a reset operation, or a power-on operation. Further, there is a problem that an inappropriate control code table may be selected due to an erroneous operation of a switch for changing the control code table.

【0005】本発明の目的は、送信されるデータに含ま
れる制御コードの制御コード体系に最適な制御コードテ
ーブルを自動的に選択し得るような印字装置を提供する
ことである。
An object of the present invention is to provide a printing apparatus capable of automatically selecting the optimum control code table for the control code system of the control code included in the transmitted data.

【0006】[0006]

【課題を解決するための手段】この目的を達成するため
に、請求項1記載の印字装置では、ホストコンピュータ
から送信されるデータを記憶するデータバッファと、制
御コード体系毎に複数の制御コードと各制御コードに対
応しプリンタの機能動作を示す内部コードとを格納した
複数の制御コードテーブルとを備え、選択された制御コ
ード体系の制御コードテーブルから読み出される制御コ
ードに基づいて制御するようにした印字装置において、
候補テーブル選択手段によって、前記複数の制御コード
テーブルの内の一つの制御コードテーブルが選択候補と
して選択される。そして、判定手段によって、前記デー
タバァファに記憶されたデータに含まれる制御コード
と、前記候補テーブル選択手段により選択された一つの
制御コードテーブルとが比較され、所定の条件が満たさ
れているか否かが判定される。
To achieve this object, in a printer according to a first aspect, a data buffer for storing data transmitted from a host computer and a plurality of control codes for each control code system are provided. A plurality of control code tables that store internal codes indicating the functional operation of the printer corresponding to each control code are provided, and control is performed based on the control code read from the control code table of the selected control code system. In the printing device,
One of the plurality of control code tables is selected as a selection candidate by the candidate table selection means. Then, the determining means compares the control code contained in the data stored in the data buffer with the one control code table selected by the candidate table selecting means to determine whether or not a predetermined condition is satisfied. To be judged.

【0007】前記判定手段により所定の条件が満たされ
ていると判定されたときには、テーブル選択手段によっ
て、前記候補テーブル選択手段により選択された一つの
制御コードテーブルが前記データバァファに記憶された
制御コードの制御コード体系に最適な制御コードテーブ
ルとして選択される。前記判定手段により所定の条件が
満たされていないと判定されたときには、前記候補テー
ブル選択手段によって、前記複数の制御コードテーブル
の内の別の一つの制御コードテーブルが選択候補として
選択され、その制御コードテーブルについて前記判定手
段による判定が行われる。
When the determining means determines that the predetermined condition is satisfied, the table selecting means selects one control code table selected by the candidate table selecting means from among the control codes stored in the data buffer. It is selected as the optimum control code table for the control code system. When the determining unit determines that the predetermined condition is not satisfied, the candidate table selecting unit selects another control code table from the plurality of control code tables as a selection candidate and controls it. The code table is judged by the judging means.

【0008】また、請求項2記載の印字装置では、請求
項1記載の印字装置における判定手段が、前記データバ
ッファに記憶されたデータに含まれる制御コードを順々
に読み出す読出し手段を備え、その読出し手段により読
み出された制御コードを順々に前記候補テーブル選択手
段により選択された一つの制御コードテーブルと比較
し、前記データバッファに記憶された全ての制御コード
について比較をする前に、所定の条件が満たされていな
いことが判明した場合には、その時点で前記読出し手段
による制御コードの読出しを中止し、所定の条件が満た
されていないと判定する。
According to a second aspect of the present invention, the determining means in the first aspect of the present invention comprises a reading means for sequentially reading out the control code contained in the data stored in the data buffer. The control codes read by the reading means are sequentially compared with one control code table selected by the candidate table selecting means, and all the control codes stored in the data buffer are compared with each other by a predetermined value. If it is found that the condition (1) is not satisfied, the reading of the control code by the reading means is stopped at that time, and it is determined that the predetermined condition is not satisfied.

【0009】さらに、請求項3記載の印字装置では、請
求項1記載の印字装置における判定手段が、前記データ
バッファに記憶されたデータに含まれる制御コードを順
々に読み出す読出し手段と、その読出し手段により読み
出された各制御コードが前記候補テーブル選択手段によ
り選択された一つの制御コードテーブル中に存在するか
否かをそれぞれ検索する検索手段と、その検索手段によ
る検索結果に基づいて、制御コードテーブル中に存在し
ない制御コードの数を計数する計数手段とを備えてい
る。そして、前記判定手段は、前記計数手段による計数
結果が所定値に到達した場合には、所定の条件が満たさ
れていないと判定する。
Further, in the printing apparatus according to the third aspect, the determining means in the printing apparatus according to the first aspect sequentially reads the control code included in the data stored in the data buffer, and the reading means. Search means for searching whether each control code read by the means exists in one control code table selected by the candidate table selection means, and control based on the search result by the search means. And a counting means for counting the number of control codes not existing in the code table. Then, the determination means determines that the predetermined condition is not satisfied when the counting result of the counting means reaches a predetermined value.

【0010】[0010]

【発明の実施の形態】以下、本発明の実施の形態につい
て図面を参照して説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings.

【0011】図1は本発明を適用したシリアルプリンタ
(以下、プリンタという)を示すものである。
FIG. 1 shows a serial printer (hereinafter referred to as a printer) to which the present invention is applied.

【0012】プリンタ1の本体フレーム2内には、プラ
テン3が回転可能に支持され、その前部下方にはキャリ
ッジ(図示略)を移動可能に支持する一対のガイド軸
(図示略)が配設されている。また、キャリッジにはワ
イヤドット式印字ヘッド4がプラテン3に対向するよう
に載値され、プラテン3の前方と後方とには夫々印字用
紙を移送するための一対の紙送りローラ(図示略)が配
設されており、通常のプリンタと同様のものである。
A platen 3 is rotatably supported in a main body frame 2 of the printer 1, and a pair of guide shafts (not shown) for movably supporting a carriage (not shown) is provided below a front portion of the platen 3. Has been done. A wire dot print head 4 is mounted on the carriage so as to face the platen 3, and a pair of paper feed rollers (not shown) for transporting print paper are provided in front of and behind the platen 3, respectively. It is provided and is similar to a normal printer.

【0013】本体フレーム2の右端部には、電源スイッ
チ、改頁キー、改行キーなど各種の機能スイッチを設け
た操作部5が配設されている。
At the right end of the main body frame 2, there is provided an operation unit 5 provided with various function switches such as a power switch, a page feed key, and a line feed key.

【0014】次にプリンタ1の制御系の全体構成につい
て、図2のブロック図に基いて説明する。
Next, the overall configuration of the control system of the printer 1 will be described with reference to the block diagram of FIG.

【0015】プリンタ1は、基本的には操作部5、印字
ヘッド4、紙送りローラ駆動モータ6、キャリッジ駆動
モータ7、駆動回路4a・6a・7a及び制御装置C等
で構成され、操作部5、駆動回路4a・6a・7aはデ
ータバス等を介して制御装置Cの入出力インターフェイ
ス11に接続されている。
The printer 1 is basically composed of an operation unit 5, a print head 4, a paper feed roller drive motor 6, a carriage drive motor 7, drive circuits 4a, 6a and 7a, a control device C and the like. The drive circuits 4a, 6a, 7a are connected to the input / output interface 11 of the control device C via a data bus or the like.

【0016】駆動回路4aは、印字ヘッド4に備えた複
数のワイヤの夫々を駆動する複数のソレノイドに接続さ
れている。駆動回路6aは、紙送りローラを駆動する紙
送りローラ駆動モータ6に接続されている。駆動回路7
aは、キャリッジを駆動するキャリッジ駆動モータ7に
接続されている。
The drive circuit 4a is connected to a plurality of solenoids that drive each of a plurality of wires provided in the print head 4. The drive circuit 6a is connected to the paper feed roller drive motor 6 that drives the paper feed roller. Drive circuit 7
Reference character a is connected to a carriage drive motor 7 that drives the carriage.

【0017】制御装置Cは、CPU(中央演算装置)9
と、そのCPU9にデータバス等を介して接続されたキ
ャラクタジェネレータ10、ROM(リード・オンリ・
メモリ)20、RAM(ランダム・アクセス・メモリ)
30、入出力インターフェイス11、通信用インターフ
ェイス12とから構成されている。
The controller C has a CPU (central processing unit) 9
And a character generator 10 connected to the CPU 9 via a data bus or the like, a ROM (read only
Memory) 20, RAM (random access memory)
It comprises an input / output interface 30, a communication interface 12, and a communication interface 12.

【0018】キャラクタジェネレータ10には、多数の
文字・記号のドットマトリックスデータがコードデータ
に対応して記憶されている。
The character generator 10 stores dot matrix data of a large number of characters / symbols corresponding to code data.

【0019】ROM20には、通信用インターフェイス
12を介してパーソルコンピュータ13から出力される
データを入力するための通信規約、各駆動回路4a・6
a・7aを駆動制御するための制御プログラム、後述の
制御コードテーブル選択制御の制御プログラムなどを記
憶したプログラムメモリ21、第1制御コード体系に基
く複数の制御コードと各制御コードの機能動作とを格納
した第1制御コードテーブル22、第2制御コード体系
に基く複数の制御コードと各制御コードの機能動作とを
格納した第2制御コードテーブル23などが記憶されて
いる。
The ROM 20 has a communication protocol for inputting the data output from the persol computer 13 via the communication interface 12, and the driving circuits 4a and 6a.
a control program for driving and controlling a. 7a, a program memory 21 storing a control program for control code table selection control described later, a plurality of control codes based on the first control code system, and a functional operation of each control code. A stored first control code table 22, a second control code table 23 storing a plurality of control codes based on the second control code system and the functional operation of each control code are stored.

【0020】パーソナルコンピュータ13からは、送信
するデータやプログラムの種類に応じて各種のデータや
プログラムのダンプなどを第1制御コード体系或いは第
2制御コード体系で出力することができる。
From the personal computer 13, it is possible to output various kinds of data or a dump of the program according to the type of the data or the program to be transmitted in the first control code system or the second control code system.

【0021】RAM30には、パーソナルコンピュータ
13から入力されたデータを一時的に記憶するデータバ
ッファ31、データバッファ31に記憶されたデータの
うち制御コードの先頭アドレスをデータバッファ31の
先頭アドレスから順次指示する制御コードポインタ3
2、制御コードポインタ32で指示するデータバッファ
31内の制御コードを一時的に記憶する制御コードバッ
ファ33、データバッファ31内の制御コードについて
第1制御コードテーブル22を検索した結果、未定義の
制御コードの数を計数するNカウンタ34、データバッ
ファ31内の制御コードについて第2制御コードテーブ
ル23を検索した結果、未定義の制御コードの数を計数
するnカウンタ35、CPU9で演算処理した結果を一
時的に記憶する各種メモリ等が設けられている。
In the RAM 30, the data buffer 31 for temporarily storing the data input from the personal computer 13, and the start address of the control code among the data stored in the data buffer 31 are sequentially designated from the start address of the data buffer 31. Control code pointer 3
2, a control code buffer 33 for temporarily storing the control code in the data buffer 31 designated by the control code pointer 32, and a search of the first control code table 22 for the control code in the data buffer 31 as a result of undefined control As a result of searching the second control code table 23 for the control code in the data buffer 31, the N counter 34 that counts the number of codes, the n counter 35 that counts the number of undefined control codes, and the result of arithmetic processing by the CPU 9 Various memories for temporary storage are provided.

【0022】ここで、このプリンタ1は第1制御コード
体系に基いた第1制御コード及び第2制御コード体系に
基いた第2制御コードを受信することができる。
Here, the printer 1 can receive the first control code based on the first control code system and the second control code based on the second control code system.

【0023】ROM20に格納されている第1制御コー
ドテーブル22に記憶している各制御コード及び機能動
作の概要を表1に示し、第2制御コードテーブル23に
記憶している各制御コード及び機能動作の概要を表2に
示す。
Each control code and function stored in the first control code table 22 stored in the ROM 20 is summarized in Table 1, and each control code and function stored in the second control code table 23. Table 2 shows the outline of the operation.

【0024】尚、第1制御コードテーブル22及び第2
制御コードテーブル23では機能動作として、機能動作
の動作内容を夫々記載したが、実際には各機能動作をさ
せるためのサブルーチンの先頭アドレス(内部コード)
が格納されている。
The first control code table 22 and the second control code table 22
In the control code table 23, the operation contents of the functional operations are described as the functional operations, but in reality, the start address (internal code) of the subroutine for performing each functional operation.
Is stored.

【0025】[0025]

【表1】 [Table 1]

【0026】[0026]

【表2】 [Table 2]

【0027】次に、プリンタ1の制御装置Cで行われる
制御コードテーブル選択制御のルーチンについて、図3
のフローチャートに基いて説明する。
Next, the control code table selection control routine executed by the control device C of the printer 1 will be described with reference to FIG.
A description will be given based on the flowchart of FIG.

【0028】電源スイッチを操作して電源が投入される
とこの制御が開始され、ステップS1(以下、単にS1
で表し、他のステップも同様に扱う)へ移行し、バッフ
ァやメモリ等をクリアするなどの初期設定が実行されて
S2へ移行する。データ転送に伴う制御信号に基いて、
データの送信が開始されたことを確認したとき(S2)
には、先ずデータバッファ31の末尾アドレスに基いて
データバッファ31のデータはフルか否かが判定され
(S3)、データを書き込む余裕がある時にはパーソナ
ルコンピュータ13から送信されるデータがデータバッ
ファ31に順次書き込まれ(S4)、S3〜S4が繰り
返され、データバッファ31のデータがフルになったと
きには、その旨を示すビジー信号がプリンタから出力さ
れ、ホストコンピュータからのデータ送信が一時的に中
止される(S5)。そして、制御コードポインタ32が
指示するデータバッファ31内のデータに基いて制御コ
ードが有るか否かが判定され(S6)、制御コードが有
るときには制御コードポインタ32が指示するアドレス
より下位側の制御コードのアドレスが制御コードのポイ
ンタ32に書き込まれ(S7)、その制御コードポイン
タ32が指示する制御コードが制御コードバッファ33
に書き込まれ(S8)、制御コードバッファ33に書き
込まれた制御コードについて、先ず第1制御コードテー
ブル22の各制御コードが検索される(S9)。
When the power switch is operated to turn on the power, this control is started, and step S1 (hereinafter simply referred to as S1
, And other steps are handled in the same manner), the initial settings such as clearing the buffer and memory are executed, and the process proceeds to S2. Based on the control signal accompanying data transfer,
When it is confirmed that data transmission has started (S2)
First, it is determined whether or not the data in the data buffer 31 is full based on the end address of the data buffer 31 (S3). When there is room to write the data, the data transmitted from the personal computer 13 is stored in the data buffer 31. When data is sequentially written (S4) and S3 to S4 are repeated and the data in the data buffer 31 is full, a busy signal indicating that is output from the printer, and data transmission from the host computer is temporarily stopped. (S5). Then, it is determined whether or not there is a control code based on the data in the data buffer 31 designated by the control code pointer 32 (S6), and when there is a control code, control lower than the address designated by the control code pointer 32 is performed. The code address is written in the control code pointer 32 (S7), and the control code designated by the control code pointer 32 is stored in the control code buffer 33.
(S8), the control code written in the control code buffer 33 is searched for each control code in the first control code table 22 (S9).

【0029】そして、検索の結果、第1制御コードテー
ブル22に定義していない未定義の制御コードが検出さ
れたか否かが判定され(S10)、定義されているとき
にはS6に戻り、S6〜S10が繰り返される。
Then, as a result of the search, it is judged whether or not an undefined control code which is not defined in the first control code table 22 is detected (S10), and when it is defined, the process returns to S6 and S6 to S10. Is repeated.

【0030】例えば、表1に示すように、(0D)、
(0A)、(09)などの制御コードのときにはS10
でNoと判定される。
For example, as shown in Table 1, (0D),
When the control code is (0A), (09), etc., S10
Is determined as No.

【0031】しかし、第1制御コードテーブル22に定
義していない(1B,48)、(1B,4C)などの未
定義の制御コードのときにはS10でYesと判定され
てNカウンタ34がインクリメントされ(S11)、S
6に戻る。そして、データバッファ31の全ての制御コ
ードについて検索されたとき(S6)には、制御コード
ポインタ32がクリアされ(S12)、S13〜S17
を経て制御コードポインタ32が指示する制御コードに
ついて第2制御コードテーブル23の各制御コードが検
索される。
However, in the case of an undefined control code such as (1B, 48) or (1B, 4C) which is not defined in the first control code table 22, it is determined as Yes in S10 and the N counter 34 is incremented ( S11), S
Return to 6. When all the control codes in the data buffer 31 have been searched (S6), the control code pointer 32 is cleared (S12) and S13 to S17.
Then, each control code in the second control code table 23 is searched for the control code pointed to by the control code pointer 32.

【0032】そして、検索の結果、第2制御コードテー
ブル23に定義していない未定義の制御コードが検出さ
れたとき(S17)にはnカウンタ35がインクリメン
トされ(S18)、S13に戻る。例えば、表2に示す
ように、(1B,50)、(1B,6C)などの制御コ
ードのときにはnカウンタ35がインクリメントされ
る。
Then, as a result of the search, when an undefined control code not defined in the second control code table 23 is detected (S17), the n counter 35 is incremented (S18), and the process returns to S13. For example, as shown in Table 2, when the control code is (1B, 50) or (1B, 6C), the n counter 35 is incremented.

【0033】次に、Nカウンタ34のカウント値Nとn
カウンタ35のカウント値nとに基いて、カウント値N
がカウント値nよりも小さいとき(S19)には第1制
御コードテーブル22が選択され(S20)、第1制御
コードテーブル22に基いてデータバッファ31から読
出された制御コードに対応する動作機能に従って、紙送
りローラ駆動モータ6やキャリッジ駆動モータ7が駆動
制御され(S21)、送信された全てのデータが処理さ
れた後、Nカウンタ34、nカウンタ35、制御コード
ポインタ32が夫々クリアされると共に前記ビジー信号
の送出が停止され(S22)、S2に戻る。
Next, the count value N and n of the N counter 34
Based on the count value n of the counter 35, the count value N
Is smaller than the count value n (S19), the first control code table 22 is selected (S20), and according to the operation function corresponding to the control code read from the data buffer 31 based on the first control code table 22. , The paper feed roller drive motor 6 and the carriage drive motor 7 are drive-controlled (S21), and after all the transmitted data are processed, the N counter 34, the n counter 35, and the control code pointer 32 are cleared respectively. The transmission of the busy signal is stopped (S22), and the process returns to S2.

【0034】S19でNoと判定されたときには、第2
制御コードテーブル23が選択され(S23)、第2制
御コードテーブル23に基いてデータバッファ31から
読出された制御コードに対応する機能に従って、紙送り
ローラ駆動モータ6やキャリッジ駆動モータ7が駆動制
御され(S24)、送信された全てのデータが処理され
た後、Nカウンタ34、nカウンタ35、制御コードポ
インタ32が夫々クリアされると共に前記ビジー信号の
送出が停止され(S22)、S2に戻る。
When it is determined No in S19, the second
The control code table 23 is selected (S23), and the paper feed roller drive motor 6 and the carriage drive motor 7 are drive-controlled in accordance with the function corresponding to the control code read from the data buffer 31 based on the second control code table 23. After all the transmitted data are processed (S24), the N counter 34, the n counter 35, and the control code pointer 32 are each cleared, and the sending of the busy signal is stopped (S22), and the process returns to S2.

【0035】以上説明したように、データバッファ31
に書き込まれた制御コードについて第1制御コードテー
ブル22及び第2制御コードテーブル23が検索され、
未定義の制御コードの数の少ない方の制御コードテーブ
ルが選択されるので、制御コードテーブルの選択が正確
になると共に、スイッチ操作などを必要とせず、操作性
や作業効率が向上する。
As described above, the data buffer 31
The first control code table 22 and the second control code table 23 are searched for the control code written in
Since the control code table having the smaller number of undefined control codes is selected, the selection of the control code table becomes accurate, and the switch operation is not required, so that the operability and work efficiency are improved.

【0036】また、前述した実施の形態では、データバ
ッファ31がフルになったときに制御がS5に移り、デ
ータバッファ31に書き込まれた制御コードについて第
1制御コードテーブル22および第2制御コードテーブ
ル23が検索され、未定義の制御コードの数の少ない方
の制御コードテーブルが選択されると述べた。しかし、
プリンタの操作部5に押下操作により前記ビジー信号を
送出すると共にデータバッファ31に書き込まれたデー
タを処理するオフラインスイッチを設け、操作者がその
オフラインスイッチを押下することにより、制御がS5
に移り、データバッファ31に書き込まれた制御コード
について第1制御コードテーブル22および第2制御コ
ードテーブル23が検索され、未定義の制御コードの数
の少ない方の制御コードテーブルが選択されるようにし
てもよい。
Further, in the above-described embodiment, when the data buffer 31 becomes full, the control shifts to S5, and the control codes written in the data buffer 31 are controlled by the first control code table 22 and the second control code table. 23 is searched and the control code table having the smaller number of undefined control codes is selected. But,
An offline switch for transmitting the busy signal to the operation unit 5 of the printer and processing the data written in the data buffer 31 is provided on the operation unit 5 of the printer, and the operator presses the offline switch to control S5.
The first control code table 22 and the second control code table 23 are searched for the control code written in the data buffer 31, and the control code table having the smaller number of undefined control codes is selected. May be.

【0037】尚、データバッファ31がフルになったと
き或いはデータの送信が開始されたときに、制御コード
ポインタ32で指示する制御コードについて第1制御コ
ードテーブル22と第2制御コードテーブル23とを夫
々検索するようにし、カウント値Nか或いはカウント値
nの何れかが早く所定値(例えば「2」に到達したとき
に、カウント値の小さいNカウンタ34に対応する第1
制御コードテーブル22或いはカウント値の小さいnカ
ウンタ35に対応する第2制御コードテーブル23に基
いて印字処理するようにしてもよい。
When the data buffer 31 is full or when data transmission is started, the control code indicated by the control code pointer 32 is stored in the first control code table 22 and the second control code table 23. When the count value N or the count value n reaches a predetermined value (for example, "2" early), the first counter corresponding to the N counter 34 having a smaller count value is searched.
The printing process may be performed based on the control code table 22 or the second control code table 23 corresponding to the n counter 35 having a small count value.

【0038】また、プリンタの初期状態では、第1制御
コードテーブル22が選択され、通常のプリンタの印字
動作を第1制御コードテーブル22に従って行うととも
に、印字するために受信されたデータより、第1制御コ
ードテーブル22を検索し、カウント値Nが所定値(例
えば、「2」)に到達したときに、第2制御コードテー
ブル23を選択し、以後の印字は、第2制御コードテー
ブル23に従って行うとともに、印字するために受信さ
れたデータより、第2制御コードテーブル23を検索す
るようにする。そして、カウント値nが所定値(例え
ば、「2」)に到達したときに、第1制御コードテーブ
ル22を選択し、以後、この動作を繰り返すようにして
もよい。
Further, in the initial state of the printer, the first control code table 22 is selected, the normal printer printing operation is performed in accordance with the first control code table 22, and the first data is received from the data received for printing. The control code table 22 is searched, and when the count value N reaches a predetermined value (for example, “2”), the second control code table 23 is selected, and the subsequent printing is performed according to the second control code table 23. At the same time, the second control code table 23 is searched from the data received for printing. Then, when the count value n reaches a predetermined value (for example, "2"), the first control code table 22 may be selected, and thereafter, this operation may be repeated.

【0039】尚、3種類以上の制御コードテーブルを備
え、3種類以上の制御コード体系に基くデータの受信が
可能なプリンタにも本発明を同様に適用し得ることは勿
論である。
It is needless to say that the present invention can be similarly applied to a printer having three or more types of control code tables and capable of receiving data based on three or more types of control code systems.

【0040】尚、本発明はサーマルプリンタやデイジィ
ホイール式プリンタや活字ボール式プリンタなど各種の
プリンタに適用し得ることも可能である。
The present invention can also be applied to various printers such as a thermal printer, a daisy wheel printer, and a character ball printer.

【0041】[0041]

【発明の効果】以上説明したことから明かなように、請
求項1記載の印字装置では、候補テーブル選択手段によ
って選択候補とされた制御コードテーブルが、判定手段
によって所定の条件を満たしているか否かが判定され、
所定の条件を満たしていると判定された場合は、選択候
補とされた制御コードテーブルが、コードテーブル選択
手段によって、データバァファに記憶された制御コード
の制御コード体系に最適な制御コードテーブルとして選
択される。一方、判定手段によって所定の条件が満たさ
れていないと判定された場合には、候補テーブル選択手
段によって別の制御コードテーブルが選択候補とされ、
その制御コードテーブルが判定手段によって所定の条件
を満たしているか否かが判定される。
As is apparent from the above description, in the printing apparatus according to the first aspect, whether or not the control code table selected as a selection candidate by the candidate table selection means satisfies the predetermined condition by the determination means. Is determined,
When it is determined that the predetermined condition is satisfied, the control code table selected as the selection candidate is selected by the code table selection means as the optimum control code table for the control code system of the control code stored in the data buffer. It On the other hand, when the determination unit determines that the predetermined condition is not satisfied, the candidate table selection unit determines another control code table as a selection candidate,
The determination means determines whether or not the control code table satisfies a predetermined condition.

【0042】従って、請求項1記載の印字装置によれ
ば、ホストコンピュータから送信されるデータに含まれ
る制御コードの制御コード体系に最適な制御コードテー
ブルを、複数の制御コードテーブルの中から自動的に選
択することができ、制御コードテーブルの選択が正確に
なると共に、制御コードテーブルを変更する際に、スイ
ッチ操作やリセット操作あるいは電源の再投入操作をす
る等の煩わしい操作を必要とせず、操作性や作業能率が
向上する。
Therefore, according to the printing apparatus of the first aspect, a control code table optimal for the control code system of the control code included in the data transmitted from the host computer is automatically selected from the plurality of control code tables. The control code table can be selected accurately, and when changing the control code table, the operation does not require a cumbersome operation such as a switch operation, a reset operation, or a power cycle operation. Productivity and work efficiency are improved.

【0043】また、選択候補とされた制御コードテーブ
ルが所定の条件を満たしていると判定されれば、その制
御コードテーブルが選択されるので、必ずしも全ての制
御コードテーブルについて判定をする必要がなく、制御
コードテーブルの選択に要する時間を短縮することがで
きる。
If it is determined that the control code table selected as a selection candidate satisfies a predetermined condition, the control code table is selected, so that it is not necessary to make a determination for all control code tables. The time required for selecting the control code table can be shortened.

【0044】また、請求項2記載の印字装置では、請求
項1記載の印字装置において、データバッファから読み
出された制御コードが順々に選択候補とされた一つ制御
コードテーブルと比較され、データバッファに記憶され
た全ての制御コードについて比較をする前に、所定の条
件が満たされていないことが判明した場合には、その時
点で所定の条件が満たされていないと判定される。
According to a second aspect of the present invention, in the printer according to the first aspect, the control codes read from the data buffer are sequentially compared with one control code table selected as a selection candidate. If it is found that the predetermined condition is not satisfied before comparing all the control codes stored in the data buffer, it is determined that the predetermined condition is not satisfied at that time.

【0045】従って、請求項2記載の印字装置よれば、
選択候補とされた一つの制御コードテーブルが所定の条
件を満たしているか否かを判定する際に、必ずしもデー
タバッファに記憶された全ての制御コードについて選択
候補とされた制御コードテーブルと比較する必要がない
ので、請求項1記載の印字装置の効果に加えて、判定処
理に要する時間も短縮することができ、制御コードテー
ブルの選択に要する時間をより短縮することができる。
Therefore, according to the printing device of the second aspect,
When determining whether one control code table selected as a selection candidate satisfies a predetermined condition, it is necessary to compare all control codes stored in the data buffer with the control code table selected as a selection candidate. Therefore, in addition to the effect of the printing apparatus according to the first aspect, the time required for the determination process can be shortened and the time required for selecting the control code table can be further shortened.

【0046】さらに、請求項3記載の印字装置では、請
求項1記載の印字装置において、データバッファから順
々に読み出された各制御コードが、選択候補とされたさ
れた一つの制御コードテーブル中に存在するか否かが検
索され、選択候補とされた制御コードテーブル中に存在
しない制御コードの数が所定値に到達した場合には、所
定の条件が満たされていないと判定される。
Further, in the printing apparatus according to the third aspect, in the printing apparatus according to the first aspect, each control code sequentially read from the data buffer is selected as one selection candidate control code table. Whether or not the control code table is present in the control code table is searched, and when the number of control codes that do not exist in the control code table selected as the selection candidate reaches a predetermined value, it is determined that the predetermined condition is not satisfied.

【0047】従って、請求項3記載の印字装置よれば、
選択候補とされた一つの制御コードテーブルが所定の条
件を満たしているか否かを判定する際に、必ずしもデー
タバッファに記憶された全ての制御コードについて選択
候補とされた制御コードテーブルと比較する必要がない
ので、請求項1記載の印字装置の効果に加えて、判定処
理に要する時間も短縮することができ、制御コードテー
ブルの選択に要する時間をより短縮することができる。
Therefore, according to the printing apparatus of the third aspect,
When determining whether one control code table selected as a selection candidate satisfies a predetermined condition, it is necessary to compare all control codes stored in the data buffer with the control code table selected as a selection candidate. Therefore, in addition to the effect of the printing apparatus according to the first aspect, the time required for the determination process can be shortened and the time required for selecting the control code table can be further shortened.

【0048】さらに、制御コードテーブル中に存在しな
い制御コードの数、即ち、エラーを発生させる可能性が
ある未定義の制御コードの数に基づいて判定処理がなさ
れるので、エラーが発生する可能性の低い最適な制御コ
ードテーブルを選択することができる。
Further, since the determination process is performed based on the number of control codes that do not exist in the control code table, that is, the number of undefined control codes that may cause an error, an error may occur. It is possible to select an optimum control code table having a low value.

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

【図1】シリアルプリンタの斜視図である。FIG. 1 is a perspective view of a serial printer.

【図2】シリアルプリンタの制御系のブロック図であ
る。
FIG. 2 is a block diagram of a control system of a serial printer.

【図3】制御コードテーブル選択制御のルーチンのフロ
ーチャートである。
FIG. 3 is a flowchart of a control code table selection control routine.

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

1 シリアルプリンタ 9 CPU 13 パーソナルコンピュータ 20 ROM 22 第1制御コードテーブル 23 第2制御コードテーブル 30 RAM 31 データバッファ 34 Nカウンタ 35 nカウンタ C 制御装置 1 Serial Printer 9 CPU 13 Personal Computer 20 ROM 22 First Control Code Table 23 Second Control Code Table 30 RAM 31 Data Buffer 34 N Counter 35 n Counter C Controller

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 ホストコンピュータから送信されるデー
タを記憶するデータバッファと、制御コード体系毎に複
数の制御コードと各制御コードに対応しプリンタの機能
動作を示す内部コードとを格納した複数の制御コードテ
ーブルとを備え、選択された制御コード体系の制御コー
ドテーブルから読み出される制御コードに基づいて制御
するようにした印字装置において、 前記複数の制御コードテーブルの内の一つの制御コード
テーブルを選択候補として選択する候補テーブル選択手
段と、 前記データバァファに記憶されたデータに含まれる制御
コードと、前記候補テーブル選択手段により選択された
一つの制御コードテーブルとを比較し、所定の条件が満
たされているか否かを判定する判定手段と、 その判定手段により所定の条件が満たされていると判定
されたときには、前記候補テーブル選択手段により選択
された一つの制御コードテーブルを、前記データバァフ
ァに記憶された制御コードの制御コード体系に最適な制
御コードテーブルとして選択するテーブル選択手段とを
備え、 前記判定手段により所定の条件が満たされていないと判
定されたときには、前記候補テーブル選択手段は、前記
複数の制御コードテーブルの内の別の一つの制御コード
テーブルを選択候補として選択することを特徴とする印
字装置。
1. A plurality of controls which store a data buffer for storing data transmitted from a host computer, a plurality of control codes for each control code system, and an internal code corresponding to each control code and indicating a functional operation of a printer. In a printing device having a code table and controlled based on a control code read from a control code table of a selected control code system, one control code table among the plurality of control code tables is a selection candidate. The candidate table selecting means for selecting as a candidate, the control code included in the data stored in the data buffer, and the one control code table selected by the candidate table selecting means are compared to determine whether a predetermined condition is satisfied. The judging means for judging whether or not the predetermined condition is satisfied by the judging means. When it is determined that one of the control code tables selected by the candidate table selection means is selected as the optimum control code table for the control code system of the control code stored in the data buffer, the table selection means is selected. When the determination unit determines that the predetermined condition is not satisfied, the candidate table selection unit selects another one of the plurality of control code tables as a selection candidate. A printing device characterized by.
【請求項2】 前記判定手段は、前記データバッファに
記憶されたデータに含まれる制御コードを順々に読み出
す読出し手段を備え、 その読出し手段により読み出された制御コードを順々に
前記候補テーブル選択手段により選択された一つの制御
コードテーブルと比較し、前記データバッファに記憶さ
れた全ての制御コードについて比較をする前に、所定の
条件が満たされていないことが判明した場合には、その
時点で前記読出し手段による制御コードの読出しを中止
し、所定の条件が満たされていないと判定することを特
徴とする請求項1記載の印字装置。
2. The determining means includes a reading means for sequentially reading out control codes included in the data stored in the data buffer, and the control codes read by the reading means are sequentially arranged in the candidate table. If it is found that the predetermined condition is not satisfied before comparing with one control code table selected by the selecting means and comparing all the control codes stored in the data buffer, The printing apparatus according to claim 1, wherein the reading of the control code by the reading unit is stopped at a point of time, and it is determined that a predetermined condition is not satisfied.
【請求項3】 前記判定手段は、前記データバッファに
記憶されたデータに含まれる制御コードを順々に読み出
す読出し手段と、 その読出し手段により読み出された各制御コードが前記
候補テーブル選択手段により選択された一つの制御コー
ドテーブル中に存在するか否かをそれぞれ検索する検索
手段と、 その検索手段による検索結果に基づいて、制御コードテ
ーブル中に存在しない制御コードの数を計数する計数手
段とを備え、 前記計数手段による計数結果が所定値に到達した場合に
は、所定の条件が満たされていないと判定することを特
徴とする請求項1記載の印字装置。
3. The determining means sequentially reads out control codes included in the data stored in the data buffer, and each control code read by the reading means is read by the candidate table selecting means. Retrieval means for retrieving whether or not the control code table is present in one selected control code table, and counting means for counting the number of control codes not present in the control code table based on the retrieval result by the retrieval means. 2. The printing apparatus according to claim 1, further comprising: a determination device that determines that a predetermined condition is not satisfied when the counting result of the counting unit reaches a predetermined value.
JP8217112A 1996-08-19 1996-08-19 Printing device Expired - Fee Related JP3045077B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8217112A JP3045077B2 (en) 1996-08-19 1996-08-19 Printing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8217112A JP3045077B2 (en) 1996-08-19 1996-08-19 Printing device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP63005339A Division JP2910768B2 (en) 1988-01-12 1988-01-12 Printing device

Publications (2)

Publication Number Publication Date
JPH0944322A true JPH0944322A (en) 1997-02-14
JP3045077B2 JP3045077B2 (en) 2000-05-22

Family

ID=16699047

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8217112A Expired - Fee Related JP3045077B2 (en) 1996-08-19 1996-08-19 Printing device

Country Status (1)

Country Link
JP (1) JP3045077B2 (en)

Also Published As

Publication number Publication date
JP3045077B2 (en) 2000-05-22

Similar Documents

Publication Publication Date Title
US5021975A (en) Printer with improved image printing function
EP0156392B1 (en) Printing apparatus
EP0446928A2 (en) Label printer
JP3039152B2 (en) Printer with automatic emulation switching function
JPH04192030A (en) printer buffer device
JP2615137B2 (en) Printing device
JPH01235680A (en) Electronic typewriter
JP3045077B2 (en) Printing device
JP2910768B2 (en) Printing device
US5666478A (en) Method and apparatus for processing characters based on previously- used scalable font data
JPH05177885A (en) Printer control device
JPS59167745A (en) printer
JP2780974B2 (en) Printer
JPH01150568A (en) Printer device
JPH0920050A (en) Printing equipment
JP2744025B2 (en) Printing control device
JP3299210B2 (en) Page selection output device
JP2650193B2 (en) Data processing device
JP2597709B2 (en) Character processing apparatus and method
JP2907697B2 (en) Printer control device
JPH10114127A (en) Printer
JP3158693B2 (en) Printer control device
JP3069384B2 (en) Document processing apparatus and method
JP2865494B2 (en) Cache control method
JP3137196B2 (en) Page selection printer

Legal Events

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