JPH0588822A - Printer - Google Patents
PrinterInfo
- Publication number
- JPH0588822A JPH0588822A JP3274666A JP27466691A JPH0588822A JP H0588822 A JPH0588822 A JP H0588822A JP 3274666 A JP3274666 A JP 3274666A JP 27466691 A JP27466691 A JP 27466691A JP H0588822 A JPH0588822 A JP H0588822A
- Authority
- JP
- Japan
- Prior art keywords
- data
- command system
- command
- printer
- company
- 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
Links
- 238000000034 method Methods 0.000 claims description 78
- 238000013500 data storage Methods 0.000 description 17
- 230000007717 exclusion Effects 0.000 description 16
- 230000005540 biological transmission Effects 0.000 description 14
- 238000010586 diagram Methods 0.000 description 3
- 101100325756 Arabidopsis thaliana BAM5 gene Proteins 0.000 description 1
- 101150046378 RAM1 gene Proteins 0.000 description 1
- 101100476489 Rattus norvegicus Slc20a2 gene Proteins 0.000 description 1
Abstract
Description
【0001】[0001]
【産業上の利用分野】この発明は、プリンタに関し、特
にホスト装置から送信されてくる拡張制御文字に続く文
字を含む制御文字が含まれているデータにもとづいて印
字処理を行うプリンタに関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a printer, and more particularly to a printer which performs printing processing based on data including control characters including characters following extended control characters transmitted from a host device.
【0002】この明細書においては、狭義の制御文字と
は拡張制御文字に続く文字とは別の通常の制御文字をい
い、広義の制御文字とは狭義の制御文字と拡張制御文字
に続く文字とを含めた文字をいうことにする。特許請求
の範囲において使用されている”制御文字”は、広義の
制御文字である。In this specification, a control character in a narrow sense is a normal control character different from a character following an extended control character, and a control character in a broad sense is a control character in a narrow sense and a character following an extended control character. I will refer to the characters including. "Control character" used in the claims is a control character in a broad sense.
【0003】[0003]
【0004】多くの機能を備えたプリンタにおいては、
単独の制御文字(contrrolcharacte
r)の他、制御命令の多様化を図るために拡張制御文字
(ESC:escape character)がよく
用いられている。拡張制御文字とは、後続する文字が、
それ単独の文字とは異なる意味を持つことを示す文字で
ある。In a printer with many functions,
A single control character (control characte
In addition to r), an extended control character (ESC: escape character) is often used in order to diversify control commands. Extended control characters are the following characters
It is a character that has a different meaning from that of a single character.
【0005】拡張制御文字につづく文字の意味は、各メ
ーカによって統一されていない。このため、特定メーカ
のコマンド体系に応じた印字プログラムのみを備えたプ
リンタにおいては、他のメーカのホストコンピュータを
接続した場合に正常に動作しなくなる。The meaning of the character following the extended control character is not unified by each maker. For this reason, a printer provided with only a printing program corresponding to the command system of a specific manufacturer will not operate normally when a host computer of another manufacturer is connected.
【0006】そこで、1台のプリンタに汎用性を持たせ
るために、拡張制御文字に続く文字の意味付けが異なる
複数のコマンド体系にそれぞれ対応した複数の印字プロ
グラムを有し、これらの印字プログラムのうちホストコ
ンピュータが使用しているコマンド体系に適合した印字
プログラムを選択するためのコマンド体系選択キーが設
けられたプリンタが開発されている。Therefore, in order to provide a single printer with versatility, a plurality of print programs corresponding to a plurality of command systems in which the meanings of the characters following the extended control characters are different are provided. Among them, a printer having a command system selection key for selecting a printing program suitable for the command system used by the host computer has been developed.
【0007】[0007]
【発明が解決しようとする課題】上記プリンタでは、操
作者がホストコンピュータが使用しているコマンド体系
に適合したプログラム種類を選択しなければならず、そ
の操作が面倒であるとともに操作者が選択操作を誤った
場合には、プリンタが正常に動作しないという問題があ
る。In the above printer, the operator has to select a program type suitable for the command system used by the host computer, and the operation is troublesome and the operator makes a selection operation. There is a problem in that the printer does not operate normally when is incorrect.
【0008】この発明は、拡張制御文字に続く文字の意
味付けが異なる複数のコマンド体系にそれぞれ対応した
複数の印字プログラムを備えたプリンタにおいて、送信
元のホスト装置が使用しているコマンド体系に適合した
印字プログラムが自動的に選択されるプリンタを提供す
ることを目的とする。The present invention is suitable for a command system used by a host device of a transmission source in a printer having a plurality of printing programs respectively corresponding to a plurality of command systems having different meanings of characters following an extended control character. To provide a printer in which the selected printing program is automatically selected.
【0009】[0009]
【課題を解決するための手段】この発明によるプリンタ
は、ホスト装置から送信されてくる拡張制御文字に続く
文字を含む制御文字が含まれているデータにもとづいて
印字処理を行うプリンタであって、拡張制御文字につづ
く文字の意味付けが異なる複数のコマンド体系に応じた
複数の印字プログラムが記憶されている第1記憶手段、
上記複数のコマンド体系に用いられているすべての制御
文字のうち、少なくともすべてのコマンド体系に共通し
て存在しているもの以外の制御文字の各々について、コ
マンド体系ごとにその存在の有無を記憶する第2記憶手
段、上記ホスト装置から送られてきたデータに含まれて
いる制御文字がいずれのコマンド体系に存在するかを上
記第2記憶手段に記憶されているデータに基づいて判別
することにより、上記ホスト装置から送られてきたデー
タが上記複数のコマンド体系のうちのいずれのコマンド
体系に属するかを判別する判別手段、ならびに上記ホス
ト装置から送られてきたデータが属すると判別されたコ
マンド体系に応じた印字プログラムを選択する選択手段
を備えていることを特徴とする。A printer according to the present invention is a printer which performs a printing process based on data containing control characters including characters following an extended control character transmitted from a host device, A first storage means for storing a plurality of printing programs according to a plurality of command systems in which meanings of characters following the extended control characters are different,
Among all the control characters used in the above command systems, at least for each control character other than the one that is common to all the command systems, the presence or absence of the existence for each command system is stored. By determining in which command system the control character included in the data sent from the second storage means, the host device exists, based on the data stored in the second storage means, The determination means for determining which of the plurality of command systems the data sent from the host device belongs to, and the command system determined to belong to the data sent from the host device It is characterized in that it is provided with a selecting means for selecting a corresponding printing program.
【0010】選択された印字プログラムが上記複数のコ
マンド体系のうちのいずれのコマンド体系であるかを表
示するための表示手段を設けることが好ましい。It is preferable to provide display means for displaying which command system of the plurality of command systems the selected printing program is.
【0011】上記複数のコマンド体系の優先順位を記憶
する第3記憶手段を設け、上記第2記憶手段に複数のコ
マンド体系に用いられているすべての制御文字の各々に
ついて、コマンド体系ごとにその存在の有無を記憶して
おき、上記判別手段が、上記ホスト装置から送られてき
たデータに含まれている制御文字が上記コマンド体系に
存在するか否かを、優先順位の低いコマンド体系から順
に判別していき、上記制御文字が存在しないと判別され
たコマンド体系を選択対象から除外していき、選択対象
から除外されていないコマンド体系が1つになったとき
には、その1つのコマンド体系を上記ホスト装置から送
られてきたデータが属するコマンド体系であると判別
し、全てのコマンド体系について上記制御文字がコマン
ド体系に存在するか否かの判別を行った結果、選択対象
から除外されていないコマンド体系が2以上ある場合に
は、ホスト装置から送られてきたデータに含まれている
他の制御文字について、その制御文字が選択対象として
残っている各コマンド体系に存在するか否かを判別する
ようなものでもよい。A third storage means for storing the priority of the plurality of command systems is provided, and the presence of each of the control characters used in the plurality of command systems in the second storage means for each command system. Whether or not the control character included in the data sent from the host device exists in the command system is stored in order from the command system with the lowest priority. Then, the command system determined that the control character does not exist is excluded from the selection target, and when there is only one command system not excluded from the selection target, the one command system is transferred to the host. It is determined that the command system to which the data sent from the device belongs belongs, and whether the above control characters exist in the command system for all command systems. As a result of the determination, if there are two or more command systems not excluded from the selection target, the control character is selected from other control characters included in the data sent from the host device. It is also possible to discriminate whether or not the remaining command system exists in each command system.
【0012】そして、所要量の受信データ中の制御文字
について、制御文字が上記各コマンド体系に存在するか
否かが判別された結果、選択対象から除外されていない
コマンド体系が2以上ある場合には、選択対象から除外
されていないコマンド体系のうち、優先順位が高い方の
コマンド体系を上記ホスト装置から送られてきたデータ
が属するコマンド体系であると判別するようにしてもよ
い。Then, as for the control characters in the required amount of received data, it is determined whether or not the control characters are present in each of the above command systems, and as a result, when there are two or more command systems not excluded from the selection target. The command system having the higher priority among the command systems not excluded from the selection target may be determined to be the command system to which the data sent from the host device belongs.
【0013】上記所要量の受信データを、全頁分のデー
タ量が受信バッファの容量以上である場合には、受信開
始後に受信バッファに記憶される受信バッファの容量分
の受信データとし、全頁分のデータ量が受信バッファの
容量より少なく、受信バツファの容量分の受信データが
受信バッファに記憶されることなく、全頁分のデータ受
信が終了する場合には、受信開始後に受信バッファに記
憶される全頁分の受信データとしてもよい。全頁分のデ
ータ受信が終了したか否かは、たとえば、データ受信間
隔があらかじめ定められた基準時間以上か否かによって
判別される。この基準時間は、たとえば、基準時間設定
手段によって設定される。When the data amount for all pages is equal to or more than the capacity of the reception buffer, the required amount of reception data is set as the reception data for the capacity of the reception buffer stored in the reception buffer after the start of reception, and all pages are received. If the amount of data for the entire page is less than the capacity of the receive buffer and the received data for the capacity of the receive buffer is not stored in the receive buffer and data reception for all pages is completed, the data is stored in the receive buffer after the start of reception. The received data of all pages to be processed may be used. Whether or not the data reception for all pages is completed is determined, for example, by whether or not the data reception interval is equal to or longer than a predetermined reference time. The reference time is set by the reference time setting means, for example.
【0014】上記優先順位を設定するための入力手段を
設けることが好ましい。また、選択された印字プログラ
ムが優先順位の最も高いものでないときに、選択された
印字プログラムの優先順位と現在優先順位の最も高い印
字プログラムとの優先順位を自動的に変更する手段を設
けてもよい。It is preferable to provide an input means for setting the priority. Further, when the selected printing program is not the one with the highest priority, a means for automatically changing the priority of the selected printing program and the printing program with the highest current priority may be provided. Good.
【0015】また、上記プリンタに複数のホスト装置を
同時に接続するための複数のホストインターフェースが
接続される場合には、上記優先順位を各ホストインター
フェース別に設定するための入力手段を設けてもよい。Further, when a plurality of host interfaces for simultaneously connecting a plurality of host devices are connected to the printer, an input means for setting the priority order for each host interface may be provided.
【0016】[0016]
【作用】第1記憶手段には、拡張制御文字につづく文字
の意味付けが異なる複数のコマンド体系に応じた複数の
印字プログラムが記憶されている。また、第2記憶手段
には、上記複数のコマンド体系に用いられているすべて
の制御文字のうち、少なくともすべてのコマンド体系に
共通して存在するもの以外の制御文字の各々について、
コマンド体系ごとにその存在の有無が記憶されている。The first storage means stores a plurality of printing programs corresponding to a plurality of command systems having different meanings of characters following the extended control characters. Further, in the second storage means, among all the control characters used in the plurality of command systems, at least each of the control characters other than those common to all the command systems,
Presence or absence of each command system is stored.
【0017】ホスト装置からデータが送られてくると、
ホスト装置から送られてきたデータに含まれている制御
文字(拡張制御文字につづく文字または通常の狭義の制
御文字)がいずれのコマンド体系に存在するか否かが第
2記憶手段に記憶されているデータに基づいて判別され
ることにより、ホスト装置から送られてきたデータが上
記複数のコマンド体系のうちのいずれのコマンド体系に
属するかが判別される。そして、ホスト装置から送られ
てきたデータが属すると判別されたコマンド体系に応じ
た印字プログラムが選択され、選択された印字プログラ
ムによって印字処理が実行される。When data is sent from the host device,
Whether the control character (a character following the extended control character or a normal narrow control character) contained in the data sent from the host device exists in which command system is stored in the second storage means. By determining based on the existing data, it is determined to which command system of the plurality of command systems the data sent from the host device belongs. Then, the print program corresponding to the command system determined to belong to the data sent from the host device is selected, and the print process is executed by the selected print program.
【0018】[0018]
【実施例】以下、図面を参照して、この発明の実施例に
ついて説明する。Embodiments of the present invention will be described below with reference to the drawings.
【0019】図1は、プリンタシステムの全体的な構成
を示している。FIG. 1 shows the overall configuration of the printer system.
【0020】プリンタは、CPU10によって制御され
る。CPU10には、バスを介してROM11、RAM
12、EEPROM13、操作パネル14、プリンタエ
ンジンインターフェース15等が接続されている。上記
バスには、さらにDMA制御回路16が接続されてい
る。プリンタエンジンインターフェース15には、プリ
ンタエンジン17が接続されている。The printer is controlled by the CPU 10. The CPU 10 includes a ROM 11 and a RAM via a bus.
12, an EEPROM 13, an operation panel 14, a printer engine interface 15, etc. are connected. A DMA control circuit 16 is further connected to the bus. A printer engine 17 is connected to the printer engine interface 15.
【0021】ROM11には、CPU10のプログラ
ム、その他のデータが記憶されている。プログラムに
は、拡張制御文字に続く文字の意味付けが異なる複数の
コマンド体系に対応した複数の印字プログラムが含まれ
ている。ここでは、拡張制御文字に続く文字の意味付け
が異なるA社、B社およびC社のコマンド体系に対応し
た複数の印字プログラムが記憶されているものとする。The ROM 11 stores the program of the CPU 10 and other data. The program includes a plurality of printing programs corresponding to a plurality of command systems in which the characters following the extended control characters have different meanings. Here, it is assumed that a plurality of print programs corresponding to the command systems of Company A, Company B, and Company C in which the meanings of the characters following the extended control characters are different are stored.
【0022】RAM12には、必要なデータが記憶され
る。EEPROM13には、所定の設定内容が記憶され
ている。操作パネル14は、基準時間設定キー、優先順
位設定キー等の各種操作キー、表示器等を備えている。The RAM 12 stores necessary data. The EEPROM 13 stores predetermined setting contents. The operation panel 14 includes various operation keys such as a reference time setting key and a priority setting key, a display device, and the like.
【0023】CPU10には、3つのホストインターフ
ェース21、22、23を介して3つのホストコンピュ
ータ31、32、33が接続されている。ホストインタ
ーフェース21はCPU10のP1ポートに、ホストイ
ンターフェース22はCPU10のP2ポートに、ホス
トインターフェース23はCPU10のP3ポートにそ
れぞれ接続されている。Three host computers 31, 32, 33 are connected to the CPU 10 via three host interfaces 21, 22, 23. The host interface 21 is connected to the P1 port of the CPU 10, the host interface 22 is connected to the P2 port of the CPU 10, and the host interface 23 is connected to the P3 port of the CPU 10.
【0024】表1はA社のコマンド体系に用いられる制
御文字表を、表2はB社のコマンド体系に用いられる制
御文字表を、表3はC社のコマンド体系に用いられる制
御文字表を、それぞれ示している。Table 1 is a control character table used for the command system of Company A, Table 2 is a control character table used for the command system of Company B, and Table 3 is a control character table used for the command system of Company C. , Respectively.
【0025】[0025]
【表1】 [Table 1]
【0026】[0026]
【表2】 [Table 2]
【0027】[0027]
【表3】 [Table 3]
【0028】各制御文字表において、上部の4行は狭義
の制御文字を、5行目以降は拡張制御文字に続いて用い
られる文字を示している。各制御文字表において、”N
ULL”は、文字が存在しないことを表している。In each control character table, the upper four lines show the control characters in a narrow sense, and the fifth and subsequent lines show the characters that are used following the extended control characters. In each control character table, "N
"ULL" indicates that no character exists.
【0029】また、各制御文字表の各位置(コード番
号)ごとに使用できる文字は決まっているが、各社によ
って拡張制御文字に続いて用いられる文字の意味は異な
っている。The characters that can be used are determined for each position (code number) in each control character table, but the meaning of the characters that are used after the extended control character differs depending on the company.
【0030】これら各社の各制御文字表をよくみると、
各制御文字表の同じ位置であっても会社によっては文字
が存在するものと存在しないものがある。たとえば、各
制御文字表の最終行の第1欄には、B社では文字”x”
が存在し、A社およびB社では文字が存在しない。Looking closely at each control character table of each of these companies,
Depending on the company, there are characters that do not exist and characters that do not exist even at the same position in each control character table. For example, in the first column of the last line of each control character table, company B has the character "x".
Exists, and no characters exist in Company A and Company B.
【0031】図2は、ROM11の内容の一部を示して
いる。FIG. 2 shows a part of the contents of the ROM 11.
【0032】ROM11には、各ホストコンピュータ3
1、32、33からのデータを受信バッファに記憶させ
るための入力ポート別割り込処理プログラム、全頁分の
データ受信が完了したか否かを判断するために用いられ
る基準時間を計時するための基準時間計時処理プログラ
ム、受信データに適合したA社、B社およびC社の印字
プログラムを自動的に選択するための印字プログラム自
動選択処理プログラム、A社、B社およびC社のコマン
ド体系に対応した複数の印字プログラム等が記憶されて
いる。In the ROM 11, each host computer 3
Input port-specific interrupt processing program for storing data from 1, 32, and 33 in the reception buffer, and for counting a reference time used for determining whether or not data reception for all pages is completed Standard time clock processing program, print program automatic selection processing program for automatically selecting print programs of company A, company B and company C that match the received data, compatible with command systems of company A, company B and company C A plurality of printing programs and the like are stored.
【0033】また、ROM11には、A社、B社および
C社の制御文字表において用いられるすべての制御文字
(広義の制御文字であって、拡張文字に続く文字および
狭義の制御文字を含む)の各々について、各社ごとにそ
の存在の有無を示すデータが記憶された会社別制御文字
有無テーブルが設けられている。さらに、ROM11に
は、受信開始後に送られてきたデータ量が受信バッファ
の容量分に達したか否かを判別するために用いられる基
準値Ko1が記憶されている。All the control characters used in the control character tables of companies A, B, and C are stored in the ROM 11 (control characters in a broad sense, including characters following the extended character and control characters in a narrow sense). For each of the above, a company-specific control character presence / absence table storing data indicating the presence / absence of each company is provided. Further, the ROM 11 stores a reference value Ko1 used to determine whether or not the amount of data sent after the start of reception reaches the capacity of the reception buffer.
【0034】図3は、RAM12の内容の一部を示して
いる。FIG. 3 shows a part of the contents of the RAM 12.
【0035】RAM12には、受信バッファとして用い
られる受信データ記憶エリア、ビットマップメモリとし
て用いられるビットマップ展開エリア、排他制御判別フ
ラグF1として用いられるエリア、受信バッファ満杯フ
ラグF2として用いられるエリア、全ポート受信禁止状
態フラグF3として用いられるエリア、送信終了判別フ
ラグF4として用いられるエリア、A社用コマンド体系
選択対象除外フラグFaとして用いられるエリア、B社
用コマンド体系選択対象除外フラグFbとして用いられ
るエリア、C社用コマンド体系選択対象除外フラグFc
として用いられるエリア、受信されたデータ量(1語分
のデータの受信回数)を計数するカウンタ(第1カウン
タ)として用いられるエリア、基準時間に対応した基準
値Ko2を記憶するエリア、基準時間を計時するための
カウンタ(第2カウンタ)として用いられるエリア、A
社、B社およびC社用コマンド体系の優先順位を記憶す
るためのエリア等が設けられている。The RAM 12 has a reception data storage area used as a reception buffer, a bitmap expansion area used as a bitmap memory, an area used as an exclusive control determination flag F1, an area used as a reception buffer full flag F2, and all ports. An area used as the reception prohibition state flag F3, an area used as the transmission end determination flag F4, an area used as the command system selection target exclusion flag Fa for A company, an area used as the command system selection target exclusion flag Fb for B company, Command system selection target exclusion flag Fc for company C
Area used as a counter, an area used as a counter (first counter) for counting the amount of received data (the number of times of receiving data for one word), an area for storing a reference value Ko2 corresponding to the reference time, and a reference time. An area used as a counter (second counter) for timing, A
Areas and the like are provided for storing the order of priority of command systems for companies B, C, and C.
【0036】排他制御判別フラグF1は、CPU10の
P1、P2およびP3ポートのうち、1つのポートのみ
が割込み解禁状態(enable)となっていることを
記憶するフラグである。受信バッファ満杯フラグF2
は、受信開始後に送られてきたデータ量が受信バッファ
の容量分に達したことを記憶するフラグである。全ポー
ト受信禁止状態フラグF3は、CPU10のP1、P2
およびP3ポートのすべてが割込み禁止状態(disn
able)になっていることを記憶するフラグである。
送信終了判別フラグF4は、全頁分のデータ受信が終了
したことを記憶するフラグである。The exclusive control determination flag F1 is a flag for storing that only one of the P1, P2 and P3 ports of the CPU 10 is in the interrupt-released state (enable). Receive buffer full flag F2
Is a flag for storing that the amount of data sent after the start of reception has reached the capacity of the reception buffer. The all-port reception prohibited state flag F3 is set to P1 and P2 of the CPU 10.
And all P3 ports are in interrupt disabled state (disn
This flag is a flag for storing that it has been set to "able".
The transmission end determination flag F4 is a flag for storing that the data reception for all pages has been completed.
【0037】A社用コマンド体系選択対象除外フラグF
aは、後述する印字プログラム自動選択処理の実行過程
において、A社用コマンド体系が選択対象から外された
ことを記憶するフラグである。B社用コマンド体系選択
対象除外フラグFbは、印字プログラム自動選択処理の
実行過程において、B社用コマンド体系が選択対象から
外されたことを記憶するフラグである。C社用コマンド
体系選択対象除外フラグFcは、印字プログラム自動選
択処理の実行過程において、C社用コマンド体系が選択
対象から外されたことを記憶するフラグである。Command system selection target exclusion flag F for company A
“A” is a flag for storing that the command system for company A has been excluded from the selection target in the execution process of the print program automatic selection process described later. The company B command system selection target exclusion flag Fb is a flag for storing that the company B command system is excluded from the selection targets during the execution process of the print program automatic selection processing. The command system selection target exclusion flag Fc for C company is a flag for storing that the command system for C company is excluded from the selection target in the execution process of the print program automatic selection processing.
【0038】各フラグF1、F2、F3、F4、Fa、
FbおよびFcならびに各カウンタk1およびk2は、
電源投入後の初期設定において、リセット(”0”)さ
れる。Each flag F1, F2, F3, F4, Fa,
Fb and Fc and respective counters k1 and k2 are
It is reset (“0”) in the initial setting after the power is turned on.
【0039】基準時間は、操作パネル14に設けられた
基準時間設定キーによって、たとえば、5秒〜55秒の
範囲内における5秒間隔の時間に操作者が設定できるよ
うになっている。The reference time can be set by the operator using a reference time setting key provided on the operation panel 14, for example, at intervals of 5 seconds within a range of 5 seconds to 55 seconds.
【0040】A社、B社およびC社用コマンド体系の優
先順位は、操作パネル14に設けられた優先順位設定キ
ーによって設定される。ここでは、優先順位の高い方か
らA社、B社、C社の順に、優先順位が設定されている
とする。The priorities of the command systems for the companies A, B, and C are set by the priority setting keys provided on the operation panel 14. Here, it is assumed that the priorities are set in the order of Company A, Company B, and Company C from the highest priority.
【0041】図4は、ホストコンピュータ31からホス
トインターフェース21を介してCPU10のP1ポー
トにデータが送られてきた場合のP1ポート用割込処理
手順を示している。FIG. 4 shows a P1 port interrupt processing procedure when data is sent from the host computer 31 to the P1 port of the CPU 10 via the host interface 21.
【0042】図5は、CPU10によって常時実行され
ている基準時間計時処理手順を示している。FIG. 5 shows a reference time counting processing procedure which is constantly executed by the CPU 10.
【0043】図6および図7は、CPU10によって実
行される印字プログラム自動選択処理手順を示してい
る。6 and 7 show the print program automatic selection processing procedure executed by the CPU 10.
【0044】図4のP1ポート用割込処理について説明
する。ホストコンピュータ31からホストインターフェ
ース21を介してCPU10のP1ポートに1語分のデ
ータが送られてくると、ホストコンピュータ31にBU
SY状態信号が送られるとともに排他制御判別フラグF
1がセット(F1=1)されているか否かが判別される
(ステップ1)。排他制御判別フラグF1がセットされ
ていなければ(F1=0)、P1、P2およびP3のす
べてが割込み解禁状態となっていると判断され、Bポー
トおよびCポートが割込み禁止状態(disable)
にされる(ステップ2)。また、CPU10のP1、P
2およびP3ポートのうち、P1ポートのみが割込み解
禁状態となったことを記憶するために排他制御判別フラ
グF1がセット(F1=1)される(ステップ3)。The P1 port interrupt processing of FIG. 4 will be described. When one word of data is sent from the host computer 31 to the P1 port of the CPU 10 via the host interface 21, the BU is sent to the host computer 31.
The SY state signal is sent and the exclusive control determination flag F
It is determined whether 1 is set (F1 = 1) (step 1). If the exclusive control determination flag F1 is not set (F1 = 0), it is determined that all of P1, P2, and P3 are in the interrupt-disabled state, and the B port and the C port are in the interrupt disabled state (disabled).
(Step 2). Also, P1 and P of the CPU 10
Of the 2 and P3 ports, the exclusive control determination flag F1 is set (F1 = 1) to store that only the P1 port is in the interrupt-prohibited state (step 3).
【0045】そして、1語分の受信データがRAM12
の受信データ記憶エリアに記憶され、BUSY状態が解
除される(ステップ4)。上記ステップ1において、排
他制御判別フラグF1がセット(F1=1)されている
ときには、CPU10のP1、P2およびP3ポートの
うち、P1ポートのみが割込み解禁状態となっていると
判断され、上記ステップ2および3の処理が行なわれる
ことなく、上記ステップ4に進み、受信データがRAM
12内の受信データ記憶エリアに記憶される。そして、
BUSY状態が解除される。The received data for one word is stored in the RAM 12
Is stored in the reception data storage area of and the BUSY state is released (step 4). In step 1, when the exclusive control determination flag F1 is set (F1 = 1), it is determined that only the P1 port of the P1, P2 and P3 ports of the CPU 10 is in the interrupt-prohibited state. Without performing steps 2 and 3, the process proceeds to step 4 and the received data is stored in the RAM.
It is stored in the reception data storage area in 12. And
The BUSY state is released.
【0046】ステップ4で受信データが受信データ記憶
エリアに記憶されると、受信されたデータ量を計数する
ための第1カウンタのカウント値k1がインクリメント
される(ステップ5)。すなわち、RAM12内の第1
カウンタとして用いられているエリアの内容k1が+1
される。そして、更新されたカウント値k1が、予め定
められた基準値Ko1に達したか否かが判別される(ス
テップ6)。When the received data is stored in the received data storage area in step 4, the count value k1 of the first counter for counting the amount of received data is incremented (step 5). That is, the first in the RAM 12
The content k1 of the area used as a counter is +1
To be done. Then, it is determined whether or not the updated count value k1 has reached a predetermined reference value Ko1 (step 6).
【0047】第1カウンタのカウント値k1が基準値K
o1に達していれば(k1≧Ko1)、受信データ量が
受信バッファ(RAM12の受信データ記憶エリア)の
容量分に達したと判断され、受信バッファ満杯フラグF
2がセット(F2=1)される(ステップ7)。そし
て、基準時間を計時するための第2カウンタがリセット
される(ステップ8)。すなわち、RAM12内の第2
カウンタとして用いられているエリアの内容k2が”
0”にされる。The count value k1 of the first counter is the reference value K.
If o1 is reached (k1 ≧ Ko1), it is determined that the amount of received data has reached the capacity of the receive buffer (received data storage area of the RAM 12), and the receive buffer full flag F
2 is set (F2 = 1) (step 7). Then, the second counter for measuring the reference time is reset (step 8). That is, the second in the RAM 12
The content k2 of the area used as a counter is "
It is set to 0 ".
【0048】上記ステップ6において第1カウンタのカ
ウント値k1が基準値Ko1に達していない場合には
(k1<Ko1)、受信バッファ満杯フラグF2がセッ
トされることなくステップ8に進み、第2カウンタがリ
セットされる。If the count value k1 of the first counter does not reach the reference value Ko1 in step 6 (k1 <Ko1), the process proceeds to step 8 without setting the reception buffer full flag F2, and the second counter Is reset.
【0049】ホストコンピュータ32からホストインタ
ーフェース22を介してCPU10のP2ポートにデー
タが送られてきた場合にも、図4と同様なP2ポート用
割込処理が行われるが、その場合には、ステップ2にお
いて、P1およびP3ポートが割り込み禁止状態にされ
る。また、ホストコンピュータ33からホストインター
フェース23を介してCPU10のP3ポートにデータ
が送られてきた場合にも、図4と同様なP3ポート用割
込処理が行われるが、その場合には、ステップ2におい
て、P1およびP2ポートが割り込み禁止状態にされ
る。Even when data is sent from the host computer 32 to the P2 port of the CPU 10 via the host interface 22, the same P2 port interrupt processing as in FIG. 4 is performed. At 2, the P1 and P3 ports are disabled. Also, when data is sent from the host computer 33 to the P3 port of the CPU 10 via the host interface 23, the same P3 port interrupt processing as in FIG. 4 is performed, but in that case, step 2 At, the P1 and P2 ports are disabled.
【0050】図5の基準時間計時処理について説明す
る。この処理においては、電源が入れられると、まず、
1秒間が経過するのを待ち(ステップ11)、1秒が経
過すると全ポート受信禁止状態フラグF3がセット(F
3=1)されているか否かが判別される(ステップ1
2)。全ポート受信禁止状態フラグF3は、CPU10
のA、BおよびCポートのすべてが割込み禁止状態(d
isnable)になっていることを記憶するためのフ
ラグである。この全ポート受信禁止状態フラグF3は、
プリント中である時、プリンタのカバーが開いている
時、記録紙がなくなっている時等において、P1、P2
およびP3のすべてのポートからのプリンタへのデータ
受信が禁止されたときにセットされ(F3=1)、これ
らの状態が回避されたときにリセットされる(F3=
0)。The reference time counting process of FIG. 5 will be described. In this process, when the power is turned on, first,
Wait for one second to elapse (step 11), and if one second elapses, all ports reception prohibited state flag F3 is set (F
3 = 1) is determined (step 1)
2). The all-port reception prohibited state flag F3 indicates that the CPU 10
All of the A, B and C ports of the
It is a flag for storing that it is "enabled". This all-port reception prohibited state flag F3 is
When printing is in progress, when the printer cover is open, or when there is no recording paper, P1, P2
Set when reception of data to the printer from all ports of P3 and P3 is prohibited (F3 = 1), and reset when these conditions are avoided (F3 =
0).
【0051】全ポート受信禁止状態フラグF3がセット
されていなければ(F3=0)、基準時間を計時するた
めの第2カウンタのカウント値k2がインクリメントさ
れる(ステップ13)。すなわち、RAM12内の第2
カウンタとして用いられているエリアの内容k2が+1
される。全ポート受信禁止状態フラグF3がセットされ
ていれば(F3=1)、P1、P2、P3の全ポートか
らのデータ受信が禁止されているので、この間の時間を
計時しないようにするためにカウント動作が行われずに
上記ステップ11に戻り、全ポート受信禁止状態フラグ
F3がリセットされるまで、上記ステップ11および1
2の処理が繰り返される。If the all port reception prohibition state flag F3 is not set (F3 = 0), the count value k2 of the second counter for counting the reference time is incremented (step 13). That is, the second in the RAM 12
The content k2 of the area used as a counter is +1
To be done. If the all-port reception prohibited flag F3 is set (F3 = 1), data reception from all ports P1, P2, and P3 is prohibited. The operation returns to step 11 without any operation, and steps 11 and 1 are repeated until the all-port reception prohibited state flag F3 is reset.
The process of 2 is repeated.
【0052】ステップ13でカウント値k2が更新され
ると、更新されたカウント値k2が、予め定められた基
準値Ko2に達したか否かが判別される(ステップ1
4)。第2カウンタのカウント値k2が基準値Ko2に
達していなければ(k2<Ko2)、ステップ11に戻
り、上記ステップ11〜14の処理が繰り返される。When the count value k2 is updated in step 13, it is determined whether or not the updated count value k2 has reached a predetermined reference value Ko2 (step 1
4). If the count value k2 of the second counter has not reached the reference value Ko2 (k2 <Ko2), the process returns to step 11, and the processes of steps 11 to 14 are repeated.
【0053】そして、カウント値k2が基準値Ko2に
達すると(k2≧Ko2)、印字プログラム自動選択処
理が実行されている途中か否かが判別される(ステップ
15)。印字プログラム自動選択処理が実行されている
途中でない場合、すなわち、前回の印字プログラム自動
選択処理が終了している場合には、次回の受信データに
対して、印字プログラム自動選択処理が実行されるよう
に、印字プログラム自動選択処理が再スタートされる
(ステップ16)。When the count value k2 reaches the reference value Ko2 (k2 ≧ Ko2), it is determined whether or not the print program automatic selection process is being executed (step 15). If the print program automatic selection process is not in the middle of execution, that is, if the previous print program automatic selection process is completed, the print program automatic selection process is executed for the next received data. Then, the print program automatic selection process is restarted (step 16).
【0054】また、P1、P2およびP3のすべてのポ
ートが割込み解禁状態にされた後(ステップ17)、排
他制御判別フラグF1がリセット(F1=0)される
(ステップ18)。そして、第2カウンタがリセットさ
れた後(ステップ21)、すなわち、RAM12内の第
2カウンタとして用いられているエリアの内容k2が”
0”にされた後、ステップ11に戻る。After all the ports P1, P2 and P3 are set to the interrupt-prohibited state (step 17), the exclusive control determination flag F1 is reset (F1 = 0) (step 18). Then, after the second counter is reset (step 21), that is, the content k2 of the area used as the second counter in the RAM 12 becomes "
After being set to 0 ", the process returns to step 11.
【0055】したがって、たとえば、P1ポート用割込
み処理のステップ2においてP2、P3ポートが割込み
禁止状態にされた後にステップ8で第2カウンタがリセ
ットされてから、次の1語分の受信データが送られてく
ることによりステップ8で第2カウンタが再度リセット
されるまでに、基準時間が経過した場合には、P2およ
びP3ポートが割込み解禁状態にされる。Therefore, for example, after the second counter is reset in step 8 after the P2 and P3 ports are set to the interrupt disabled state in step 2 of the P1 port interrupt processing, the next received data for one word is sent. When the reference time elapses before the second counter is reset again in step 8, the P2 and P3 ports are set to the interrupt-prohibited state.
【0056】つまり、P1、P2およびP3ポートは、
常時は、割込み解禁状態であり、何れか1つのポートに
データが送られてくると、他のポートが割り込禁止状態
にされる。そして、全頁分のデータ受信が終了すると、
P1、P2およびP3のすべてのポートが割込み解禁状
態にされる。全頁分のデータ受信が終了したか否かの判
別は、データ受信が途切れてから基準時間内に次のデー
タが受信されたか否かを判別することにによって行わ
れ、データ受信が途切れてから基準時間内に次のデータ
が受信されなかったときに全頁分のデータ受信が終了し
たと判断される。That is, the P1, P2 and P3 ports are
It is normally in the interrupt-disabled state, and when data is sent to any one of the ports, the other ports are disabled. When all pages of data have been received,
All ports P1, P2 and P3 are disabled. Whether or not the data reception for all pages is completed is performed by determining whether or not the next data is received within the reference time after the data reception is interrupted. When the next data is not received within the reference time, it is determined that the data reception for all pages is completed.
【0057】P1ポートの割り込処理が実行されている
ときに、他のポート、たとえばP2ポートにデータが送
られてきた場合には、P2ポートが割込み禁止状態にな
っているので、そのデータは取り込まれずにP2ポート
に保持される。また、この場合には、BUSY状態信号
がホストコンピュータ32に送られるので、それに続く
データがP2ポートに送られなくなる。BUSY状態
は、P2ポートに保持されたデータが取り込まれたのち
に解除される。If data is sent to another port, for example, the P2 port while the P1 port interrupt process is being executed, the P2 port is in the interrupt disabled state, and therefore the data is It is not captured and is held in the P2 port. Further, in this case, since the BUSY status signal is sent to the host computer 32, the subsequent data is not sent to the P2 port. The BUSY state is released after the data held in the P2 port is fetched.
【0058】上記ステップ2で、P2、P3ポートを割
込み禁止状態にする代わりに、P2、P3ポートに対応
するホストコンピュータ32、33にBUSY状態信号
を送り、上記ステップ15において、すべてのポートを
割込み解禁状態にする代わりに、すべてのホストコンピ
ュータ31、32、33に対するBUSY状態を解除す
るようにしてもよい。この場合においても、各ポートに
データが送られてくると送信元にBUSY状態信号が送
られ、データが取り込まれると送信元に対するBUSY
状態が解除されることについては代わりはない。In Step 2, instead of setting the P2 and P3 ports to the interrupt disabled state, a BUSY status signal is sent to the host computers 32 and 33 corresponding to the P2 and P3 ports, and in Step 15, all ports are interrupted. The BUSY state for all the host computers 31, 32, 33 may be released instead of the unlocked state. Even in this case, a BUSY status signal is sent to the sender when data is sent to each port, and a BUSY for the sender when the data is taken in.
There is no substitute for the condition being released.
【0059】上記ステップ15において、印字プログラ
ム自動選択処理が実行されている途中である場合には、
第1カウンタのカウント値k1が0か否かが判別される
(ステップ19)。第1カウンタのカウント値k1が0
のときには(k1=0)、印字プログラム自動選択処理
が開始されてはいるがCPU10にホストコンピュータ
31、32または33からデータが送信されていないと
判断され、第2カウンタがリセットされ(ステップ2
1)、ステップ11に戻る。If it is determined in step 15 that the automatic print program selection process is being executed,
It is determined whether or not the count value k1 of the first counter is 0 (step 19). The count value k1 of the first counter is 0
If (k1 = 0), it is determined that the print program automatic selection processing has started but no data is transmitted to the CPU 10 from the host computer 31, 32, or 33, and the second counter is reset (step 2).
1) Return to step 11.
【0060】第1カウンタのカウント値k1が0でない
場合、すなわち1以上である場合には、全頁分のデータ
受信が終了したと判断され、送信終了判別フラグF4が
セット(F4=1)される(ステップ20)。そして、
第2カウンタがリセット(k2=0)された後(ステッ
プ21)、ステップ11に戻る。When the count value k1 of the first counter is not 0, that is, when it is 1 or more, it is determined that the data reception for all pages is completed, and the transmission completion determination flag F4 is set (F4 = 1). (Step 20). And
After the second counter is reset (k2 = 0) (step 21), the process returns to step 11.
【0061】図6および図7の印字プログラム自動選択
処理手順について説明する。この処理は、電源が投入さ
れたときおよび基準時間計時処理のステップ16で印字
プログラム自動選択処理が再スタートされたときに実行
される。The print program automatic selection processing procedure of FIGS. 6 and 7 will be described. This processing is executed when the power is turned on and when the print program automatic selection processing is restarted in step 16 of the reference time counting processing.
【0062】この処理においては、まず、選択対象除外
フラグFa、Fb、Fc、受信バッファ満杯フラグF
2、送信終了フラグF4および第1カウンタがリセット
される(ステップ31)。そして、RAM12の受信デ
ータ記憶エリア内の最後に受信したデータが書き込まれ
た記憶場所(最終記憶場所)が、最終検索場所としてセ
ットされる(ステップ32)。In this process, first, the selection exclusion flags Fa, Fb, Fc and the reception buffer full flag F are selected.
2. The transmission end flag F4 and the first counter are reset (step 31). Then, the storage location (final storage location) where the last received data is written in the received data storage area of the RAM 12 is set as the final search location (step 32).
【0063】そして、コマンド体系判別のためのキーデ
ータを選択するための処理が行われる。すなわち、RA
M12の受信データ記憶エリア内の最後に受信したデー
タが書き込まれた記憶場所(最終記憶場所)と、キーデ
ータ選択のためにすでに検索された記憶場所のうちの最
後に検索された記憶場所(最終検索場所)とが同じであ
るか否かが判別される(ステップ33)。Then, processing for selecting key data for command system discrimination is performed. That is, RA
The storage location where the last received data is written (final storage location) in the received data storage area of M12, and the storage location that was searched last for the key data selection (final storage location) (final storage location). It is determined whether the search location) is the same (step 33).
【0064】最終記憶場所と最終検索場所とが同じであ
る場合には、受信開始後から受信されたデータ量が受信
データ記憶エリアの容量分に達したことを記憶する受信
バツファ満杯フラグF2がセットされているか否かが判
別される(ステップ34)。受信バツファ満杯フラグF
2がセットされていなければ(F2=0)、全頁分のデ
ータ受信が終了したことを記憶する送信終了判別フラグ
F4がセットされているか否かが判別される(ステップ
35)。そして、送信終了判別フラグF4がセットされ
ていなければ(F4=0)、ステップ33に戻る。When the final storage location and the final search location are the same, the reception buffer full flag F2 for storing that the amount of data received after the start of reception has reached the capacity of the reception data storage area is set. It is determined whether or not it has been done (step 34). Receive buffer full flag F
If 2 is not set (F2 = 0), it is determined whether or not the transmission end determination flag F4 that stores the end of data reception for all pages is set (step 35). If the transmission end determination flag F4 is not set (F4 = 0), the process returns to step 33.
【0065】印字プログラム自動選択処理が開始された
後、データが送られてきていない状態においては、上記
ステップ32において最終検索場所が最終記憶場所にセ
ットされているため、上記ステップ33でYESとな
り、上記ステップ34でNOとなり、上記ステップ35
でNOとなる。したがって、印字プログラム自動選択処
理が開始されてからデータが送られてくるまでは、上記
ステップ33、34および35の処理が繰り返される。After the print program automatic selection process is started, when no data has been sent, the final search location is set to the final storage location in step 32, so YES is returned in step 33. If NO in step 34, then step 35
Results in NO. Therefore, the steps 33, 34 and 35 are repeated until data is sent after the print program automatic selection process is started.
【0066】印字プログラム自動選択処理が開始された
後にデータが送られてきてRAM12の受信データ記憶
エリアに受信データが記憶されると、最終記憶場所が変
化するため、最終記憶場所と最終検索場所とが一致しな
くなるので、上記ステップ33でNOとなり、RAM1
2の受信データ記憶エリアのうちの現在の最終検索場所
の次の記憶場所のデータが検索される。そして、検索さ
れたデータがコマンド体系を判別するためのキーデータ
か否かが判別される(ステップ37)。すなわち、検索
されたデータが制御文字(広義の制御文字であり、拡張
制御文字の次の文字および制御文字を含む)か否かが判
別される。When data is sent after the print program automatic selection process is started and the received data is stored in the received data storage area of the RAM 12, the final storage location changes, so that the final storage location and the final search location are changed. Are no longer in agreement, the result in step 33 is NO and RAM1
The data in the storage location next to the current final search location in the two received data storage areas is searched. Then, it is judged whether or not the searched data is key data for judging the command system (step 37). That is, it is determined whether or not the retrieved data is a control character (a control character in a broad sense, including the character next to the extended control character and the control character).
【0067】検索されたデータがキーデータでなけれ
ば、上記ステップ33に戻る。検索されたデータがキー
データであれば、このキーデータに基づくコマンド体系
選択処理が実行される。すなわち、判断対象としてまず
優先順位が最も低いコマンド体系、この例ではC社のコ
マンド体系が選択される(ステップ38)。If the retrieved data is not key data, the process returns to step 33. If the retrieved data is key data, the command system selection processing based on this key data is executed. That is, the command system having the lowest priority, that is, the command system of company C in this example, is selected as the determination target (step 38).
【0068】そして、選択されたコマンド体系について
の選択対象除外フラグ、ここではフラグFcの状態に基
づいて、C社のコマンド体系が選択対象から除外されて
いるか否かが判別される(ステップ39)。C社のコマ
ンド体系が選択対象から除外されていなければ(Fc=
0)、選択されたキーデータがC社の制御文字表に存在
するか否かが判別される(ステップ40)。つまり、R
OM11内のC社用制御文字有無テーブル中のキーデー
タに対応するエリアを参照することにより、選択された
キーデータがC社の制御文字表に存在するか否かが判別
される。Then, it is judged whether or not the command system of the company C is excluded from the selection target based on the state of the selection target exclusion flag for the selected command system, here the flag Fc (step 39). .. Unless the command system of company C is excluded from the selection target (Fc =
0), it is determined whether or not the selected key data exists in the control character table of company C (step 40). That is, R
By referring to the area corresponding to the key data in the control character presence / absence table for C company in OM11, it is determined whether or not the selected key data exists in the control character table of C company.
【0069】選択されたキーデータがC社の制御文字表
に存在していない場合には、選択対象からC社のコマン
ド体系が除外される(ステップ41)。具体的には、C
社についての選択対象除外フラグFcがセット(Fc=
1)される。そして、A社、B社およびC社の選択対象
除外フラグFa、Fb、Fcの状態に基づいて、選択対
象として残っているコマンド体系が1つか否かが判別さ
れる(ステップ42)。If the selected key data does not exist in the control character table of company C, the command system of company C is excluded from the selection targets (step 41). Specifically, C
Selection target exclusion flag Fc for a company is set (Fc =
1) is done. Then, based on the states of the selection target exclusion flags Fa, Fb, and Fc of the companies A, B, and C, it is determined whether or not there is only one command system remaining as a selection target (step 42).
【0070】選択対象として残っているコマンド体系が
1つでない場合、すなわち2以上ある場合には、現在判
断対象として選択されているコマンド体系が優先順位の
もっとも高いコマンド体系か否かが判別される(ステッ
プ43)。When there is not one command system remaining as the selection target, that is, when there are two or more command systems, it is determined whether or not the command system currently selected as the determination target is the command system with the highest priority. (Step 43).
【0071】上記ステップ39において選択対象外であ
ると判別された場合または上記ステップ40においてキ
ーデータが制御文字表に存在すると判別された場合に
は、ステップ43に移行し、判断対象として現在選択さ
れているコマンド体系が優先順位のもっとも高いコマン
ド体系か否かが判別される。If it is determined in step 39 that the key data does not exist in the selection target, or if it is determined in step 40 that the key data exists in the control character table, the process proceeds to step 43 and is currently selected as the determination target. It is determined whether or not the command system in use has the highest priority.
【0072】判断対象として現在選択されているコマン
ド体系が優先順位のもっとも高いコマンド体系でない場
合には、判断対象として現在選択されているコマンド体
系よりも優先順位が1つ高いコマンド体系、この例では
B社のコマンド体系が判断対象として選択される(ステ
ップ44)。When the command system currently selected as the determination target is not the command system with the highest priority, the command system having one higher priority than the command system currently selected as the determination target, in this example. The command system of company B is selected as a judgment target (step 44).
【0073】そして、ステップ39に戻り、B社につい
ての選択対象除外フラグFbの状態に基づいて、B社の
コマンド体系が選択対象から除外されているか否かが判
別される。B社のコマンド体系が選択対象から除外され
ていなければ(Fb=0)、B社用制御文字有無テーブ
ルに基づいて、選択されたキーデータがB社の制御文字
表に存在するか否かか判別される(ステップ40)。そ
して、選択されたキーデータがB社の制御文字表に存在
しない場合には、選択対象からB社のコマンド体系が除
外される(ステップ41)。具体的には、B社について
の選択対象フラグFbがセット(Fb=1)される。Then, returning to step 39, it is judged whether or not the command system of the company B is excluded from the selection target based on the state of the selection target exclusion flag Fb for the company B. If the command system of company B is not excluded from the selection target (Fb = 0), whether the selected key data exists in the control character table of company B based on the control character presence / absence table for company B. It is determined (step 40). Then, if the selected key data does not exist in the control character table of company B, the command system of company B is excluded from the selection targets (step 41). Specifically, the selection target flag Fb for company B is set (Fb = 1).
【0074】そして、選択対象として残っているコマン
ド体系が1つか否かが判別される(ステップ42)。選
択対象として残っているコマンド体系が2以上存在する
場合(ステップ42でNO)、すなわちC社とB社のコ
マンド体系のうちの少なくとも1つが除外されていない
場合、C社のコマンド体系が選択対象として残っており
かつ上記ステップ39においてB社のコマンド体系が選
択対象外であると判別された場合または上記ステップ4
0においてキーデータがB社の制御文字表に存在すると
判別された場合には、判断対象として現在選択されてい
るコマンド体系が優先順位のもっとも高いコマンド体系
か否かが判別される(ステップ43)。Then, it is judged whether or not there is only one command system remaining as a selection target (step 42). If there are two or more command systems remaining as selection targets (NO in step 42), that is, if at least one of the command systems of company C and company B is not excluded, the command system of company C is the selection target. If it is determined that the command system of company B is not selected in step 39, or step 4 above.
When it is determined that the key data exists in the control character table of the company B in 0, it is determined whether or not the command system currently selected as the determination target is the command system with the highest priority (step 43). ..
【0075】そして、現在選択されているコマンド体系
が優先順位のもっとも高いコマンド体系でない場合に
は、次の優先順位であるコマンド体系、この例ではA社
のコマンド体系が選択される(ステップ44)。If the currently selected command system is not the command system having the highest priority, the command system having the next priority, that is, the command system of the company A in this example is selected (step 44). ..
【0076】そして、A社についての選択対象除外フラ
グFaの状態に基づいて、A社のコマンド体系が選択対
象から除外されているか否かが判別される(ステップ3
9)。A社のコマンド体系が選択対象から除外されてい
なければ(Fa=0)、A社用制御文字有無テーブルに
基づいて、選択されたキーデータがA社の制御文字表に
存在するか否かか判別される(ステップ40)。そし
て、選択されたキーデータがA社の制御文字表に存在し
ない場合には、選択対象からA社のコマンド体系が除外
される(ステップ41)。具体的には、A社についての
選択対象除外フラグFaがセット(Fa=1)される。Then, based on the state of the selection object exclusion flag Fa for the company A, it is judged whether the command system of the company A is excluded from the selection objects (step 3).
9). If the command system of the company A is not excluded from the selection target (Fa = 0), whether the selected key data exists in the control character table of the company A based on the control character presence / absence table for the company A. It is determined (step 40). Then, if the selected key data does not exist in the control character table of the company A, the command system of the company A is excluded from the selection targets (step 41). Specifically, the selection target exclusion flag Fa for company A is set (Fa = 1).
【0077】そして、選択対象として残っているコマン
ド体系が1つか否かが判別される(ステップ42)。選
択対象として残っているコマンド体系が2以上存在する
場合、C社およびB社のコマンド体系の両方が選択対象
として残っておりかつ上記ステップ39においてA社の
コマンド体系が選択対象外であると判別された場合また
は上記ステップ40においてキーデータが制御文字表に
存在すると判別された場合には、判断対象として現在選
択されているコマンド体系が優先順位のもっとも高いコ
マンド体系か否かが判別される(ステップ43)。Then, it is judged whether or not there is only one command system remaining as a selection target (step 42). When there are two or more command systems remaining as selection targets, it is determined that both the command systems of company C and company B remain as selection targets, and the command system of company A is not selected in step 39 above. If it is determined that the key data exists in the control character table in step 40, it is determined whether the command system currently selected as the determination target is the command system with the highest priority ( Step 43).
【0078】判断対象として現在選択されているコマン
ド体系が優先順位のもっとも高いコマンド体系である場
合には、ステップ33に戻り、RAM12の受信データ
記憶エリアのうち受信データが書き込まれた記憶場所の
最終記憶場所と、キーデータ選択のためにすでに検索さ
れた記憶場所の最終の検索場所とが同じであるか否かが
判別される。If the command system currently selected as the determination target is the command system having the highest priority, the process returns to step 33, and the last received data is written in the storage area of the RAM 12 where the received data is written. It is determined whether the storage location is the same as the last search location of the storage locations already searched for the key data selection.
【0079】受信データの最終記憶場所と最終検索場所
とが異なる場合には、すなわちキーデータ選択のために
まだ検索されていないデータが受信データ記憶エリアに
残っている場合には、最終の検索場所の次の記憶場所の
データが検索され(ステップ36)、検索されたデータ
がキーデータであれば(ステップ37)、ステップ38
に移り、そのキーデータに基づいて上記ステップ38〜
44のコマンド体系選択処理が行われれる。キーデータ
でなければステップ33に戻る。If the final storage location of the received data and the final search location are different, that is, if there is data in the received data storage area that has not been searched for the key data selection, the final search location The data in the storage location next to is retrieved (step 36), and if the retrieved data is key data (step 37), step 38
Then, based on the key data, the above steps 38-
44 command system selection processing is performed. If it is not key data, the process returns to step 33.
【0080】上記ステップ33において、受信データの
最終記憶場所と最終検索場所とが同じである場合には、
受信バッファ満杯フラグF2の状態に基づいて、受信開
始後に受信されたデータ量が受信データ記憶エリアの容
量分に達しているか否かが判別される(ステップ3
4)。In step 33, if the final storage location of the received data and the final search location are the same,
Based on the state of the reception buffer full flag F2, it is determined whether the amount of data received after the start of reception has reached the capacity of the reception data storage area (step 3).
4).
【0081】受信バッファ満杯フラグF2がセットされ
ているときには(F2=1)、すなわち、受信開始後に
受信されたデータ量が受信データ記憶エリアの容量分に
達していているときには、受信が開始されてから受信デ
ータ記憶エリアの容量分の受信データ中のすべてのキー
データについて、ステップ38〜44のコマンド体系選
択処理が行われた結果、2以上のコマンド体系が選択対
象として残っていると判断され、ステップ45に移る。When the reception buffer full flag F2 is set (F2 = 1), that is, when the amount of data received after the start of reception reaches the capacity of the reception data storage area, reception is started. From the result, after the command system selection processing of steps 38 to 44 is performed for all the key data in the received data for the capacity of the received data storage area, it is determined that two or more command systems remain to be selected, Go to step 45.
【0082】受信バッファ満杯フラグF2がセットされ
ていないときには(F2=0)、すなわち、受信開始後
に受信されたデータ量が受信データ記憶エリアの容量分
に達していないときには、送信終了判別フラグF4の状
態に基づいて、全頁分のデータ受信が終了したか否かが
判別される(ステップ34)。When the reception buffer full flag F2 is not set (F2 = 0), that is, when the amount of data received after the start of reception has not reached the capacity of the reception data storage area, the transmission end determination flag F4 is set. Based on the state, it is determined whether or not the data reception for all pages has been completed (step 34).
【0083】送信終了判別フラグF4がセツトされてい
なければ(F4=0)、全頁分のデータ送信が終了して
いないと判断され、ステップ33に戻る。送信終了判別
フラグF4がセツトされていれば(F4=1)、全頁分
のデータ送信が終了したと判断され、ステップ45に移
る。If the transmission end determination flag F4 is not set (F4 = 0), it is determined that the data transmission for all pages has not been completed, and the process returns to step 33. If the transmission end determination flag F4 is set (F4 = 1), it is determined that the data transmission for all pages has been completed, and the process proceeds to step 45.
【0084】上記ステップ42において、選択対象とし
て残っているコマンド体系が1つである場合もステップ
45に移る。If there is only one command system that remains to be selected in step 42, the process proceeds to step 45.
【0085】つまり、選択対象として残っているコマン
ド体系が1つである場合(ステップ42でYES)、受
信データ記憶エリアの容量分の受信データ中のすべての
キーデータについて上記ステップ38〜44のコマンド
体系選択処理が終了し、選択対象として残っているコマ
ンド体系が2以上ある場合(ステップ34でYES)ま
たは全頁分の受信データ量が受信データ記憶エリアの容
量以下でかつ受信データ中のすべてのキーデータについ
てのコマンド体系選択処理が終了し、選択対象として残
っているコマンド体系が2以上ある場合(ステップ35
でYES)に、ステップ45の処理が行われる。In other words, if there is only one command system remaining as a selection target (YES in step 42), the commands in steps 38 to 44 are executed for all the key data in the received data for the capacity of the received data storage area. When the system selection process is completed and there are two or more command systems that remain to be selected (YES in step 34), the received data amount for all pages is less than or equal to the capacity of the received data storage area and all of the received data are included. When the command system selection processing for the key data is completed and there are two or more command systems remaining as selection targets (step 35).
If YES), the process of step 45 is performed.
【0086】ステップ45においては、優先順位の最も
高いコマンド体系、この例ではA社のコマンド体系が選
択される。A社のコマンド体系が選択対象になっている
か否かが、A社についての選択対象除外フラグFaの状
態に基づいて判別される(ステップ46)。A社のコマ
ンド体系が選択対象になっていれば(Fa=0)、A社
の印字プログラムが選択され(ステップ48)、印字プ
ログラム自動選択処理は終了する。そして、A社の印字
プログラムに基づいてプリント処理が実行される。At step 45, the command system having the highest priority, that is, the command system of the company A in this example is selected. Whether or not the command system of the company A is the selection target is determined based on the state of the selection target exclusion flag Fa for the company A (step 46). If the command system of company A is selected (Fa = 0), the print program of company A is selected (step 48), and the print program automatic selection processing ends. Then, the printing process is executed based on the printing program of company A.
【0087】A社のコマンド体系が選択対象になってい
なければ(Fa=1)、それより優先順位が1つ低いコ
マンド体系、この例ではB社のコマンド体系が選択され
(ステップ47)、B社のコマンド体系が選択対象にな
っているか否かが、B社ついての選択対象除外フラグF
bの状態に基づいて判別される(ステップ46)。B社
のコマンド体系が選択対象になっていれば(Fb=
0)、B社の印字プログラムが選択され(ステップ4
8)、印字プログラム自動選択処理は終了する。そし
て、B社の印字プログラムに基づいてプリント処理が実
行される。If the command system of the company A is not the selection target (Fa = 1), the command system having a lower priority by one, that is, the command system of the company B is selected in this example (step 47). Whether the command system of company B is selected or not depends on the selection exclusion flag F for company B.
A determination is made based on the state of b (step 46). If the command system of company B is selected (Fb =
0), the printing program of company B is selected (step 4
8), the print program automatic selection processing ends. Then, the printing process is executed based on the printing program of company B.
【0088】B社のコマンド体系が選択対象になってい
なければ(Fa=1)、それより優先順位が1つ低いコ
マンド体系、この例ではC社のコマンド体系が選択され
(ステップ47)、C社のコマンド体系が選択対象にな
っているか否かが、C社についての選択対象除外フラグ
Fbの状態に基づいて判別される(ステップ46)。A
社とB社のコマンド体系が選択対象になっていないとき
には、このステップ46においては、かならずC社のコ
マンド体系が選択対象になっているので(Fc=0)、
C社の印字プログラムが最終的に選択され(ステップ4
8)、印字プログラム自動選択処理は終了する。そし
て、C社の印字プログラムに基づいてプリント処理が実
行される。If the command system of company B is not the selection target (Fa = 1), the command system of which the priority is one lower than that, that is, the command system of company C is selected (step 47), and C is selected. Whether or not the command system of the company is the selection target is determined based on the state of the selection target exclusion flag Fb for the C company (step 46). A
When the command systems of the company B and the company B are not the selection target, the command system of the company C is always the selection target in this step 46 (Fc = 0).
The printing program of company C is finally selected (step 4
8), the print program automatic selection processing ends. Then, the print processing is executed based on the print program of company C.
【0089】上記図4〜図7の各処理の関係を明確にす
るために、全体的な処理の流れについて説明する。図6
および図7の印字プログラム自動選択処理が開始された
後、データが送信されてくるまでの間は、ステップ3
3、34および35の処理が繰り返される。そして、た
とえばP1ポートに1語分のデータが送られてくると、
図4の割込み処理(ステップ1〜8)が開始され、受信
データの記憶と、第1カウンタによる受信回数の計数お
よび第2カウンタのリセットが行われる。また、図5の
基準時間計時処理のステップ11〜14において、基準
時間を計時するための第2カウンタの値k2が更新され
ていくが、全頁分のデータ受信が終了するまでは、基準
時間が経過する前に1語分のデータが送られ、その度
に、割込み処理のステップ8において第2カウンタがリ
セットされるので、カウント値k2は基準値Ko2に達
しない。In order to clarify the relationship between the processes shown in FIGS. 4 to 7, the overall process flow will be described. Figure 6
And, after the print program automatic selection process of FIG. 7 is started and until data is transmitted, step 3
The processes of 3, 34 and 35 are repeated. Then, for example, when one word of data is sent to the P1 port,
The interrupt process (steps 1 to 8) of FIG. 4 is started, storage of received data, counting of the number of receptions by the first counter, and resetting of the second counter are performed. Further, in steps 11 to 14 of the reference time counting process of FIG. 5, the value k2 of the second counter for counting the reference time is updated, but until the data reception for all pages is completed, The data for one word is sent before the time elapses, and the second counter is reset in step 8 of the interrupt processing each time, so that the count value k2 does not reach the reference value Ko2.
【0090】データ受信が開始されると、印字プログラ
ム自動選択処理のステップ33でNOとなり、キーデー
タが検索される(ステップ33〜37)。キーデータが
検索されると、検索されたキーデータに基づいてステッ
プ38〜44のコマンド体系選択処理が行われる。そし
て、選択対象として残っているコマンド体系が1つにな
るとステップ45〜48の印字プログラム決定処理が行
われ、所定の印字プログラムが選択され、印字プログラ
ム自動選択処理は終了する。そして、選択された印字プ
ログラムに基づいて印字処理が行われる。When the data reception is started, the result is NO in step 33 of the print program automatic selection processing, and the key data is searched (steps 33 to 37). When the key data is searched, the command system selection process of steps 38 to 44 is performed based on the searched key data. When there is only one command system remaining as a selection target, the print program determination process of steps 45 to 48 is performed, a predetermined print program is selected, and the print program automatic selection process ends. Then, the printing process is performed based on the selected printing program.
【0091】印字プログラム自動選択処理が終了した後
に、全頁分のデータの受信が終了すると、次回のデータ
が送られてくるまでは、割込み処理が行われなくなり、
第2カウンタがリセットされなくなる。したがって、全
頁分のデータの最終データが受信された後に基準時間が
経過すると、基準時間計時処理のステップ14でYES
となり、ステップ15に進む。ステップ15において
は、印字プログラム自動選択処理がすでに終了している
のでNOとなり、ステップ16、17、18に進む。こ
の結果、印字プログラム自動選択処理が再スタートさ
れ、全ポートが割込み解禁状態にされ、排他制御判別フ
ラグF1がリセットされる。After the printing program automatic selection processing is completed, when the reception of the data for all pages is completed, the interrupt processing is not performed until the next data is sent.
The second counter will not be reset. Therefore, if the reference time elapses after the final data of the data for all pages is received, YES in step 14 of the reference time counting process.
Therefore, the process proceeds to step 15. In step 15, since the print program automatic selection process has already been completed, the result is NO, and the process proceeds to steps 16, 17, and 18. As a result, the print program automatic selection process is restarted, all ports are set to the interrupt-prohibited state, and the exclusive control determination flag F1 is reset.
【0092】検索されたキーデータに基づいてステップ
38〜44のコマンド体系選択処理が行われた結果、選
択対象として残っているコマンド体系が2以上の場合に
は、ステップ33、36、37により次のキーデータが
検索され、再度ステップ38〜44のコマンド体系選択
処理が行われる。また、ステップ33で最終記憶場所と
最終検索場所とが同じであり、受信データ量が受信バッ
ファの容量分に達していず、全頁分のデータ受信が終了
していない場合には、ステップ33、34、35の処理
が繰り返される。As a result of the command system selection processing in steps 38 to 44 being performed based on the retrieved key data, if there are two or more command systems remaining as selection targets, steps 33, 36 and 37 are followed. Key data is retrieved, and the command system selection processing of steps 38 to 44 is performed again. If the final storage location and the final search location are the same in step 33, the received data amount has not reached the capacity of the reception buffer, and the data reception for all pages has not been completed, step 33, The processes of 34 and 35 are repeated.
【0093】印字プログラム自動選択処理が行われてい
るときに、受信データ量が受信バッファの容量に達する
と割込み処理のステップ7で受信バッファ満杯フラグF
2がセットされる。したがって、全頁分の受信データ量
が受信バッファの容量以上の場合において、受信バッフ
ァの容量分のデータ中のすべてのキーデータについてコ
マンド体系選択処理が行われ、2以上のコマンド体系が
選択対象として残っている場合には、ステップ34でY
ESとなり、ステップ45〜49の印字プログラム決定
処理によって所定の印字プログラムが選択され、印字プ
ログラム自動選択処理は終了する。そして、選択された
印字プログラムに基づいて印字処理が行われる。If the amount of received data reaches the capacity of the receive buffer while the print program automatic selection process is being performed, the receive buffer full flag F is set in step 7 of the interrupt process.
2 is set. Therefore, when the amount of received data for all pages is greater than or equal to the capacity of the receive buffer, command system selection processing is performed for all key data in the data for the capacity of the receive buffer, and two or more command systems are selected. If it remains, Y in step 34
The process becomes ES, a predetermined print program is selected by the print program determination process of steps 45 to 49, and the print program automatic selection process ends. Then, the printing process is performed based on the selected printing program.
【0094】また、全頁分の受信データ量が受信バッフ
ァの容量より少ない場合において、全頁分のデータの受
信が終了し、全頁分の受信データ中のすべてのキーデー
タについてコマンド体系選択処理が行われ、2以上のコ
マンド体系が選択対象として残っている場合には、ステ
ップ33、34、35の処理が繰り返される。そして、
全頁分のデータの受信が終了した後に基準時間が経過し
て基準時間計時処理のステップ14からステップ15に
進んだ時には、印字プログラム自動選択処理の33〜3
5の処理が実行されているので、ステップ15でYES
となり、ステップ19、20と進み、送信終了フラグF
4がセットされる。この結果、印字プログラム自動選択
処理のステップ35でYESとなり、ステップ45〜4
9の印字プログラム決定処理によって所定の印字プログ
ラムが選択され、印字プログラム自動選択処理は終了す
る。そして、選択された印字プログラムに基づいて印字
処理が行われる。When the amount of received data for all pages is smaller than the capacity of the receive buffer, the reception of data for all pages is completed, and the command system selection processing is performed for all key data in the received data for all pages. Is performed, and when two or more command systems remain to be selected, the processes of steps 33, 34, and 35 are repeated. And
When the reference time elapses after the reception of data for all pages and the process proceeds from step 14 to step 15 of the reference time counting process, 33 to 3 of the automatic printing program selection process are performed.
Since step 5 is being executed, YES in step 15
Then, the process proceeds to steps 19 and 20, and the transmission end flag F
4 is set. As a result, YES in step 35 of the print program automatic selection processing, and steps 45 to 4
A predetermined print program is selected by the print program determination processing of 9, and the print program automatic selection processing ends. Then, the printing process is performed based on the selected printing program.
【0095】印字プログラム自動選択処理が終了した後
に、第2カウンタのカウント値k2が基準値Ko2に達
すると、ステップ14でYES、ステップ15でNOと
なり、ステップ16、17、18に進む。したがって、
印字プログラム自動選択処理が再スタートされ、全ポー
トが割込み解禁状態にされ、排他制御フラグF1がリセ
ットされる。When the count value k2 of the second counter reaches the reference value Ko2 after the print program automatic selection processing is completed, YES is obtained in step S14, NO is obtained in step S15, and the process proceeds to steps S16, S17 and S18. Therefore,
The print program automatic selection processing is restarted, all ports are set to the interrupt-prohibited state, and the exclusive control flag F1 is reset.
【0096】なお、全頁分の受信データ量が受信バッフ
ァの容量以上の場合において、印字処理が実行された場
合には、印字用のデータを作成するために受信バッファ
からデータが読み込まれる毎に、次の受信データが受信
バッファに読み込まれる。When the amount of received data for all pages is equal to or larger than the capacity of the receiving buffer, and when the printing process is executed, every time data is read from the receiving buffer to create printing data. , The next received data is read into the receive buffer.
【0097】上記実施例では、ホストコンピュータ3
1、32、33から送られてきたデータに含まれている
キーデータが各社のコマンド体系に存在するか否かが、
優先順位の低いコマンド体系から順に判別され、キーデ
ータが存在しないと判別されたコマンド体系が選択対象
から除外される(上記ステップ38〜44)。そして、
選択対象として残っているコマンド体系が1つになった
ときには(上記ステップ42でYES)、その1つのコ
マンド体系をホストコンピュータ31、32、33から
送られてきたデータが属するコマンド体系であると判別
されている(上記ステップ45〜48)。In the above embodiment, the host computer 3
Whether the key data contained in the data sent from 1, 32, 33 exists in the command system of each company,
The command system having the lowest priority is determined in order, and the command system determined to have no key data is excluded from the selection targets (steps 38 to 44). And
When only one command system remains as a selection target (YES in step 42), it is determined that the one command system is the command system to which the data sent from the host computers 31, 32, 33 belongs. (Steps 45 to 48 above).
【0098】一方、全てのコマンド体系についてキーデ
ータがコマンド体系に存在するか否かの判別を行った結
果、選択対象として残っているコマンド体系が2以上あ
る場合には(上記ステップ43でYES)、ホストコン
ピュータ31、32、33から送られてきたデータに含
まれている他のキーデータについて、そのキーデータが
選択対象として残っている各コマンド体系に存在するか
否かが再度判別されている。このようにして、選択対象
として残っているコマンド体系が1つになったときに
は、その1つのコマンド体系をホスト装置から送られて
きたデータが属するコマンド体系であると判別されてい
る(上記ステップ45〜48)。On the other hand, as a result of determining whether or not the key data exists in the command system for all the command systems, if there are two or more command systems remaining to be selected (YES in step 43 above). For other key data included in the data sent from the host computers 31, 32, 33, it is again determined whether or not the key data exists in each command system that remains to be selected. .. In this way, when there is only one command system that remains to be selected, it is determined that this one command system is the command system to which the data sent from the host device belongs (step 45 above). ~ 48).
【0099】全頁分の受信データ量が受信バッファの容
量より多い場合には受信開始後から受信バッファの容量
分の受信データ中のすべてのキーデータの各々につい
て、全頁分の受信データ量が受信バッファの容量より少
ない場合にはその受信データ中のすべてのキーデータの
各々について、コマンド体系選択処理が行われた結果、
選択対象として残っているコマンド体系が2以上ある場
合には(上記ステップ34または35でYES)、優先
順位の高い方のコマンド体系がホストコンピュータ3
1、32、33から送られてきたデータが属するコマン
ド体系であると判別されている(上記ステップ45〜4
8)。When the amount of received data for all pages is larger than the capacity of the receiving buffer, the amount of received data for all pages is equal to that of all the key data in the received data for the amount of receiving buffer after the start of reception. If it is smaller than the receive buffer capacity, the result of command system selection processing for each of all the key data in the received data,
If there are two or more command systems that remain to be selected (YES in step 34 or 35 above), the command system with the higher priority is the host computer 3
It is determined that the command system to which the data sent from 1, 32, 33 belongs belongs (steps 45 to 4 above).
8).
【0100】受信データ量が受信バッファの容量より少
ない場合に全頁分のデータ受信が終了したか否かの判別
は、データ受信が途切れてから基準時間内に次のデータ
が受信されたか否かを判別することに行われ、データ受
信が途切れてから基準時間内に次のデータが受信されな
かったときに全頁分のデータ受信が終了したと判断され
る(上記ステップ35)。When the amount of received data is smaller than the capacity of the receiving buffer, it is determined whether the data reception for all pages is finished or not, and whether the next data is received within the reference time after the data reception is interrupted. When the next data is not received within the reference time after the data reception is interrupted, it is judged that the data reception for all pages is completed (step 35).
【0101】上記ステップ48において選択された印字
プログラムに対応するコマンド体系が優先順位の最も高
いものでない場合には、その選択された印字プログラム
に対応するコマンド体系の優先順位と、現在優先順位の
最も高いコマンド体系との優先順位を自動的に交換して
もよい。If the command system corresponding to the print program selected in step 48 is not the highest in priority, the priority of the command system corresponding to the selected print program and the current priority are the highest. Priority with a higher command system may be automatically exchanged.
【0102】また、ステップ48において選択された印
字プログラムがどのコマンド体系に対応するものかを表
示器に表示するようにしてもよい。Further, the command program to which the printing program selected in step 48 corresponds may be displayed on the display.
【0103】また、ホストインターフェース21、2
2、23ごとに、コマンド体系の優先順位を設定できる
ようにしてもよい。この場合には、印字プログラム自動
選択処理において、データが送られてくるホストインタ
ーフェース21、22、23に対応した優先順位が用い
られる。In addition, the host interfaces 21, 2
The priority order of the command system may be set for every 2 and 23. In this case, in the print program automatic selection processing, the priority order corresponding to the host interfaces 21, 22, 23 to which the data is sent is used.
【0104】[0104]
【発明の効果】この発明によれば、送信元のホスト装置
が使用しているコマンド体系に適合した印字プログラム
が自動的に選択されるようになる。According to the present invention, the printing program suitable for the command system used by the host device of the transmission source is automatically selected.
【図1】プリンタシステムの構成を示す電気ブロック図
である。FIG. 1 is an electrical block diagram showing the configuration of a printer system.
【図2】ROM11の内容の一部を示す図である。FIG. 2 is a diagram showing a part of the contents of ROM 11;
【図3】RAM12の内容の一部を示す図である。FIG. 3 is a diagram showing a part of the contents of RAM 12;
【図4】CPU10による割込み処理手順を示すフロー
チャートである。FIG. 4 is a flowchart showing an interrupt processing procedure by the CPU 10.
【図5】CPU10による基準時間計時処理手順を示す
フローチャートである。FIG. 5 is a flowchart showing a reference time counting process procedure by the CPU 10.
【図6】CPU10による印字プログラム自動選択処理
処理手順を示すフローチャートである。FIG. 6 is a flowchart showing a print program automatic selection processing procedure by the CPU 10.
【図7】CPU10による印字プログラム自動選択処理
処理手順を示すフローチャートである。FIG. 7 is a flowchart showing a print program automatic selection processing procedure by the CPU 10.
10 CPU 11 ROM 12 RAM 14 操作パネル 10 CPU 11 ROM 12 RAM 14 Operation panel
Claims (10)
文字に続く文字を含む制御文字が含まれているデータに
もとづいて印字処理を行うプリンタであって、拡張制御
文字につづく文字の意味付けが異なる複数のコマンド体
系に応じた複数の印字プログラムが記憶されている第1
記憶手段、上記複数のコマンド体系に用いられているす
べての制御文字のうち、少なくともすべてのコマンド体
系に共通して存在しているもの以外の制御文字の各々に
ついて、コマンド体系ごとにその存在の有無を記憶する
第2記憶手段、上記ホスト装置から送られてきたデータ
に含まれている制御文字がいずれのコマンド体系に存在
するかを上記第2記憶手段に記憶されているデータに基
づいて判別することにより、上記ホスト装置から送られ
てきたデータが上記複数のコマンド体系のうちのいずれ
のコマンド体系に属するかを判別する判別手段、ならび
に上記ホスト装置から送られてきたデータが属すると判
別されたコマンド体系に応じた印字プログラムを選択す
る選択手段を備えているプリンタ。1. A printer that performs print processing based on data including control characters including characters following extended control characters transmitted from a host device, wherein the meaning of characters following extended control characters is defined. The first printing program in which a plurality of printing programs corresponding to different command systems are stored
Storage means, among all control characters used in the above-mentioned plurality of command systems, presence / absence of each control character other than those which are common to all command systems A second storage means for storing the information, and which command system the control character included in the data sent from the host device exists in is discriminated based on the data stored in the second storage means. Thus, it is determined that the data sent from the host device belongs to the command system out of the plurality of command systems, and that the data sent from the host device belongs to. A printer provided with a selection unit for selecting a printing program according to a command system.
のコマンド体系のうちのいずれのコマンド体系であるか
を表示するための表示手段が設けられていることを特徴
とする請求項1記載のプリンタ。2. The printer according to claim 1, further comprising display means for displaying which command system of the plurality of command systems the selected print program is.
憶する第3記憶手段が設けられ、上記第2記憶手段に複
数のコマンド体系に用いられているすべての制御文字の
各々について、コマンド体系ごとにその存在の有無が記
憶されており、上記判別手段は、上記ホスト装置から送
られてきたデータに含まれている制御文字が上記コマン
ド体系に存在するか否かを、優先順位の低いコマンド体
系から順に判別していき、上記制御文字が存在しないと
判別されたコマンド体系を選択対象から除外していき、
選択対象から除外されていないコマンド体系が1つにな
ったときには、その1つのコマンド体系を上記ホスト装
置から送られてきたデータが属するコマンド体系である
と判別し、全てのコマンド体系について上記制御文字が
コマンド体系に存在するか否かの判別を行った結果、選
択対象から除外されていないコマンド体系が2以上ある
場合には、ホスト装置から送られてきたデータに含まれ
ている他の制御文字について、その制御文字が選択対象
として残っている各コマンド体系に存在するか否かを判
別することを特徴とする請求項1記載のプリンタ。3. A third storage means for storing the priority order of the plurality of command systems is provided, and for each of the control characters used for the plurality of command systems in the second storage means, for each command system. The presence or absence thereof is stored in the command system, and the determination means determines whether or not the control character included in the data sent from the host device is present in the command system with a low priority. From the command system that is determined that the control character does not exist, it is excluded from the selection target,
When there is only one command system that is not excluded from the selection targets, it is determined that the one command system is the command system to which the data sent from the host device belongs, and the above control characters for all command systems. If there are two or more command systems that are not excluded from the selection results as a result of determining whether or not exists in the command system, another control character included in the data sent from the host device. 2. The printer according to claim 1, wherein it is determined whether or not the control character exists in each command system that remains as a selection target.
が設けられていることを特徴とする請求項3記載のプリ
ンタ。4. The printer according to claim 3, further comprising input means for setting the priority order.
最も高いものでないときには、選択された印字プログラ
ムの優先順位と現在優先順位の最も高い印字プログラム
との優先順位を自動的に変更する手段が設けられている
ことを特徴とする請求項3記載のプリンタ。5. A means for automatically changing the priority of the selected print program and the print program of the highest current priority when the selected print program is not the highest priority. The printer according to claim 3, wherein the printer is provided.
に接続するための複数のホストインターフェースが接続
されており、上記優先順位を各ホストインターフェース
別に設定するための入力手段が設けられていることを特
徴とする請求項3記載のプリンタ。6. The printer is connected with a plurality of host interfaces for simultaneously connecting a plurality of host devices, and input means is provided for setting the priority order for each host interface. The printer according to claim 3,
て、制御文字が上記各コマンド体系に存在するか否かが
判別された結果、選択対象から除外されていないコマン
ド体系が2以上ある場合には、選択対象から除外されて
いないコマンド体系のうち、優先順位が高い方のコマン
ド体系を上記ホスト装置から送られてきたデータが属す
るコマンド体系であると判別する請求項3記載のプリン
タ。7. When the control character in the required amount of received data is determined as to whether or not the control character exists in each of the command systems, and as a result, there are two or more command systems not excluded from the selection target. 4. The printer according to claim 3, wherein the command system having a higher priority among the command systems not excluded from the selection target is the command system to which the data sent from the host device belongs.
ータ量が受信バッファの容量以上である場合には、受信
開始後に受信バッファに記憶される受信バッファの容量
分の受信データであり、全頁分のデータ量が受信バッフ
ァの容量より少なく、受信バツファの容量分の受信デー
タが受信バッファに記憶されることなく、全頁分のデー
タ受信が終了する場合には、受信開始後に受信バッファ
に記憶される全頁分の受信データであることを特徴とす
る請求項7記載のプリンタ。8. The required amount of received data is the received data for the capacity of the receiving buffer stored in the receiving buffer after the start of reception when the data amount for all pages is equal to or more than the capacity of the receiving buffer. , If the amount of data for all pages is less than the capacity of the receive buffer and the received data for the amount of the receive buffer is not stored in the receive buffer and the data reception for all pages is completed, receive after the start of reception. 8. The printer according to claim 7, wherein the received data is for all pages stored in the buffer.
が、データ受信間隔があらかじめ定められた基準時間以
上か否かによって判別されることを特徴とする請求項8
記載のプリンタ。9. The method according to claim 8, wherein whether or not the data reception for all pages is completed is determined by whether or not the data reception interval is equal to or longer than a predetermined reference time.
The listed printer.
間設定手段が設けられていることを特徴とする請求項9
記載のプリンタ。10. A reference time setting means for setting the reference time is provided.
The listed printer.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP3274666A JP2698252B2 (en) | 1991-09-25 | 1991-09-25 | Printer |
US07/944,330 US5668936A (en) | 1991-09-25 | 1992-09-14 | Printer for exclusively selecting a host apparatus and a command system for use with the selected host apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP3274666A JP2698252B2 (en) | 1991-09-25 | 1991-09-25 | Printer |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH0588822A true JPH0588822A (en) | 1993-04-09 |
JP2698252B2 JP2698252B2 (en) | 1998-01-19 |
Family
ID=17544869
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP3274666A Expired - Fee Related JP2698252B2 (en) | 1991-09-25 | 1991-09-25 | Printer |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2698252B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5854940A (en) * | 1995-04-24 | 1998-12-29 | Fuji Xerox Co., Ltd. | Output control system for interpreting input data according to a specific control language based upon outputs from a plurality of control language determining devices |
US6559957B1 (en) | 1992-07-23 | 2003-05-06 | Canon Kabushiki Kaisha | Discriminating a rule for processing data |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH02201629A (en) * | 1989-01-31 | 1990-08-09 | Toshiba Corp | Mode switching system for dual mode printer |
-
1991
- 1991-09-25 JP JP3274666A patent/JP2698252B2/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH02201629A (en) * | 1989-01-31 | 1990-08-09 | Toshiba Corp | Mode switching system for dual mode printer |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6559957B1 (en) | 1992-07-23 | 2003-05-06 | Canon Kabushiki Kaisha | Discriminating a rule for processing data |
US5854940A (en) * | 1995-04-24 | 1998-12-29 | Fuji Xerox Co., Ltd. | Output control system for interpreting input data according to a specific control language based upon outputs from a plurality of control language determining devices |
Also Published As
Publication number | Publication date |
---|---|
JP2698252B2 (en) | 1998-01-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0130018B1 (en) | Electronic conference system | |
US3422401A (en) | Electric data handling apparatus | |
JPH02267634A (en) | Interrupt system | |
US4517643A (en) | Interrupt control apparatus for a data processing system | |
JPS6217876Y2 (en) | ||
JPH0519969A (en) | Input control method | |
US5668936A (en) | Printer for exclusively selecting a host apparatus and a command system for use with the selected host apparatus | |
US5343557A (en) | Workstation controller with full screen write mode and partial screen write mode | |
JPH0588822A (en) | Printer | |
US5247640A (en) | Dual access control system including plural magnetic disk control units and contention control circuitry | |
US5717931A (en) | Method and apparatus for communicating between master and slave electronic devices where the slave device may be hazardous | |
JPH0588820A (en) | Printer | |
CN111708500A (en) | Drawing printing method and device, electronic equipment and storage medium | |
KR100615694B1 (en) | Control system to control multiple function blocks | |
US5832277A (en) | System for arbitrating demand on memory during configuration of a computer add-on card | |
US5517647A (en) | Communication control system and information processing system | |
US4937779A (en) | Information retrieving apparatus capable of rearranging information stored in memory | |
US5640557A (en) | Method and system for processing logic blocks in a data processing system | |
CN113760793A (en) | Automatic data transmission method, device and storage medium | |
JP2878201B2 (en) | Printer device | |
JPS622344A (en) | Information transmission equipment | |
JP3126129B2 (en) | Priority control device | |
EP0485759A2 (en) | Data loading device with cache memory | |
JP2814849B2 (en) | Communication control device | |
CN114880269A (en) | Board card ID configuration and identification method, microcontroller and control system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20070919 Year of fee payment: 10 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080919 Year of fee payment: 11 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080919 Year of fee payment: 11 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090919 Year of fee payment: 12 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090919 Year of fee payment: 12 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100919 Year of fee payment: 13 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110919 Year of fee payment: 14 |
|
LAPS | Cancellation because of no payment of annual fees |