JPH08290636A - Printer - Google Patents
PrinterInfo
- Publication number
- JPH08290636A JPH08290636A JP7098954A JP9895495A JPH08290636A JP H08290636 A JPH08290636 A JP H08290636A JP 7098954 A JP7098954 A JP 7098954A JP 9895495 A JP9895495 A JP 9895495A JP H08290636 A JPH08290636 A JP H08290636A
- Authority
- JP
- Japan
- Prior art keywords
- language
- discrimination
- command
- data
- control
- 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
- 238000012545 processing Methods 0.000 claims abstract description 79
- 238000000034 method Methods 0.000 abstract description 56
- 230000008569 process Effects 0.000 description 30
- 230000015654 memory Effects 0.000 description 24
- 238000010586 diagram Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 8
- 230000010365 information processing Effects 0.000 description 5
- 230000008901 benefit Effects 0.000 description 3
- 238000012850 discrimination method Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 230000004913 activation Effects 0.000 description 2
- 239000000470 constituent Substances 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000007639 printing Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 235000010724 Wisteria floribunda Nutrition 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000003213 activating effect Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000003795 chemical substances by application Substances 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 239000002131 composite material Substances 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 238000003860 storage Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000003936 working memory Effects 0.000 description 1
Landscapes
- Accessory Devices And Overall Control Thereof (AREA)
- Record Information Processing For Printing (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、プリンタ装置に係り、
特にホストコンピュータなどの上位装置から受信したデ
ータを記述する制御言語を解釈し、当該制御言語の解釈
に基づいて印字出力を行うプリンタ装置に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a printer device,
In particular, the present invention relates to a printer device that interprets a control language that describes data received from a host device such as a host computer and prints out based on the interpretation of the control language.
【0002】[0002]
【従来の技術】従来、プリンタ装置において、ホストコ
ンピュータ等から受信した制御言語の種類を判別する手
段として、以下に述べる特開平5−282109号公
報、特開104825号公報、特開平4−323069
号公報、特開平96823号公報及び特開平5−888
22号公報等に開示された技術があった。2. Description of the Related Art Conventionally, in a printer, as means for discriminating the type of control language received from a host computer or the like, the following JP-A-5-282109, JP-A-104825, and JP-A-4-323069 are available.
Japanese Patent Application Laid-Open No. 96823/96, and Japanese Patent Application Laid-Open No. 5-888
There was a technique disclosed in Japanese Patent Laid-Open No. 22 and the like.
【0003】特開平5−282109号公報によれば、
制御言語の種類を各モード固有の特徴コードに基づいて
識別する技術が開示されている。この技術は、前述した
方法でも識別できない場合は、当該装置の内蔵モードの
特徴コードにて識別し、さらにその方法でも識別できな
い場合にはカードモードの特徴コードにて識別し、それ
でも識別できなかった場合に識別不能とする方法を採用
している。According to Japanese Patent Laid-Open No. 5-282109,
A technique for identifying the type of control language based on a characteristic code unique to each mode is disclosed. If this technique cannot be identified by the method described above, it is identified by the feature code of the built-in mode of the device, and if it is not identified by the method, it is identified by the feature code of the card mode, and still cannot be identified. In this case, the method of making it indistinguishable is adopted.
【0004】特開平5−104825号公報によれば、
入力データ内の制御コード、例えばエスケープシーケン
ス等を判断し、所定部分がすべてキャラクタで構成され
ている場合には、文字列でプリンタを制御する言語(Po
st Script)のエミュレーションを解析の対象とする技術
が開示されている。According to Japanese Patent Laid-Open No. 5-104825,
If the control code in the input data, such as an escape sequence, is judged, and the specified part is entirely composed of characters, the language that controls the printer with a character string (Po
A technology in which the emulation of st Script) is the target of analysis is disclosed.
【0005】特開平4−323069号公報によれば、
制御言語の種類毎に出現頻度の高い命令コードのテーブ
ルを用意し、比較して一致する命令コードの多い方で制
御言語の種類を決める方法が開示されている。According to Japanese Patent Laid-Open No. 4-3203069,
There is disclosed a method in which a table of instruction codes having a high appearance frequency is prepared for each type of control language, and the type of control language is determined by comparing and comparing the instruction codes with the larger number of instruction codes.
【0006】特開平5−96823号公報によれば、各
エミュレーション別に比較用のテーブルを持ち、ホスト
コンピュータから送られてきたデータ内の細かなデータ
列単位を各テーブルから検索し、一致する毎にそれらに
設定された重みを加算して、最終的に最も大きい加算値
を示したエミュレーションを選択するという判別方法が
開示されている。この判別方法では、判別結果を決定す
る判断基準時として、いずれかのエミュレーションが所
定値以上の加算値に達した時、或いは2番目に大きい加
算値との差が所定値以上になった時等が採用される。According to Japanese Unexamined Patent Publication No. 5-96823, a table for comparison is provided for each emulation, and a fine data string unit in the data sent from the host computer is searched from each table, and each time a match is found. A determination method is disclosed in which the weights set to them are added to finally select the emulation having the largest addition value. In this discriminating method, when any emulation reaches an addition value of a predetermined value or more, or when the difference from the second largest addition value is a predetermined value or more, as a judgment reference time for determining the judgment result, etc. Is adopted.
【0007】特開平5−88822号公報によれば、次
のような判別方法が開示されている。即ち、入力データ
に含まれる制御文字が、優先順位の低いコマンド体系か
ら順にその体系に存在するか否かを判断していき、存在
しなければそのコマンド体系を選択対象から外してい
く。そして、残ったコマンド体系が1つになった時、そ
れを判別結果として選択し、2つ以上ある時は、他の制
御文字を残っているコマンド体系から検索し、当該制御
文字の有無により判別を行う。また、所要量のデータを
検索していった結果、2つ以上のコマンド体系が残った
場合には、優先順位の高いコマンド体系を選択する。な
お、上記所要量とは、受信バッファ容量分又は全頁分の
データ量をいい、全頁分とは、データ受信間隔が基準時
間以上となった時までの受信データ分をいう。According to Japanese Patent Laid-Open No. 5-88822, the following discrimination method is disclosed. That is, it is determined whether or not the control character included in the input data exists in the command system in the order of priority, and if there is not, the command system is excluded from the selection targets. Then, when the remaining command system becomes one, it is selected as the discrimination result, and when there are two or more, another control character is searched from the remaining command system, and it is discriminated by the presence or absence of the control character. I do. If two or more command systems remain as a result of retrieving the required amount of data, the command system with the higher priority is selected. It should be noted that the above-mentioned required amount refers to the reception buffer capacity or the data amount of all pages, and the entire page refers to the amount of received data until the data reception interval becomes equal to or longer than the reference time.
【0008】[0008]
【発明が解決しようとする課題】しかしながら、上記従
来技術には、次のような問題点があった。However, the above-mentioned conventional technique has the following problems.
【0009】特開平5−282109号公報に開示され
た技術では、使用頻度の高いと予想される内蔵モードを
先にチェックしているが、どのモードの使用頻度が高い
かは使用しているユーザによって異なり、判別処理のス
ピードが考慮されていないという問題点がある。In the technique disclosed in Japanese Patent Laid-Open No. 5-282109, the built-in mode that is expected to be used frequently is checked first, but which mode is used frequently is determined by the user who is using the mode. However, there is a problem in that the speed of the discrimination process is not taken into consideration.
【0010】また、特開平5−104825号公報に開
示された技術では、制御コードを判別する段階と、所定
部分がすべてキャラクタで構成されていることを判別す
る段階との2段階で判別が行われており、判別処理に時
間がかかるという問題がある。Further, in the technique disclosed in Japanese Patent Application Laid-Open No. 5-104825, the discrimination is performed in two stages, that is, the stage of discriminating the control code and the stage of discriminating that the predetermined portion is entirely composed of characters. Therefore, there is a problem that the determination process takes time.
【0011】また、特開平4−323069号公報に開
示された技術では、1つの制御言語に特有のユニークな
命令コードに基づいた判別処理を行っているため、当該
命令コードを単なるデータとして有している他の制御言
語との区別ができず、誤判定が非常に大きくなるという
問題がある。Further, in the technique disclosed in Japanese Patent Laid-Open No. 4-323069, since the discrimination processing is performed based on the unique instruction code peculiar to one control language, the instruction code is stored as mere data. However, there is a problem that it cannot be distinguished from other control languages, and erroneous determination becomes very large.
【0012】さらに、特開平5−96823号公報及び
特開平5−88822号公報に開示された技術では、上
記技術と同様に、各制御言語とも制御文字やデータ列等
の加算値等に基づいて制御言語を判別するという方法で
あり、各制御言語毎に判別方法が最適化されておらず、
処理時間がかかるという問題点を必然的に孕んでいる。Further, in the techniques disclosed in Japanese Patent Laid-Open No. 5-96823 and Japanese Patent Laid-Open No. 5-88822, each control language is based on the added value of control characters, data strings, etc., as in the above technique. It is a method of discriminating the control language, and the discrimination method is not optimized for each control language,
Inevitably there is a problem that it takes processing time.
【0013】本発明は上記事実を考慮し、制御言語毎に
最適な判別ルールを設定することによって、制御言語を
決定するための処理時間を短縮させると共に、誤判定の
可能性を大幅に減じたプリンタ装置を提供することを目
的とする。In consideration of the above facts, the present invention shortens the processing time for determining the control language by setting the optimum discrimination rule for each control language, and greatly reduces the possibility of misjudgment. It is an object to provide a printer device.
【0014】[0014]
【課題を解決するための手段】上記目的を達成するため
に、請求項1の発明は、入力データが入力される入力手
段と、 前記入力データを記述する可能性のある制御言
語群を複数のグループに分類する分類手段と、前記分類
手段により分類されたグループ毎に互いに異なる判別ル
ールを前記入力データに対して適用することにより、前
記入力データを記述する制御言語の種類を決定する決定
手段と、前記決定手段により決定された制御言語の種類
に基づいて前記入力データを解釈して出力する出力手段
と、を含んで構成されている。In order to achieve the above object, the invention of claim 1 comprises a plurality of input means for inputting input data and a plurality of control language groups that may describe the input data. Classifying means for classifying into groups, and determining means for determining the type of control language describing the input data by applying different discrimination rules to the input data for each group classified by the classifying means. Output means for interpreting and outputting the input data on the basis of the type of control language determined by the determining means.
【0015】請求項2の発明は、請求項1の前記決定手
段を、前記グループ毎の判別ルールを、判別処理速度の
速い順番に適用することにより、前記入力データを記述
する制御言語の種類を決定するようにしたものである。According to a second aspect of the present invention, by applying the determination means of the first aspect to the determination rule for each group in the order of faster determination processing speed, the type of control language for describing the input data is determined. It was decided to decide.
【0016】請求項3の発明は、請求項1の前記決定手
段が、前記入力データを構成するコードを読み取るコー
ド読取手段を備え、前記コード別の出現順序に基づいて
制御言語の種類を決定する判別ルールを少なくとも1つ
有するようにしたものである。According to a third aspect of the present invention, the determining means of the first aspect includes code reading means for reading a code forming the input data, and determines the type of control language based on the appearance order of each code. It has at least one discrimination rule.
【0017】請求項4の発明は、請求項1の前記決定手
段が、前記入力データを構成するコードを読み取るコー
ド読取手段を備え、前記コード別の出現数に基づいて制
御言語の種類を決定する判別ルールを少なくとも1つ有
するようにしたものである。According to a fourth aspect of the present invention, the determining means of the first aspect includes code reading means for reading a code forming the input data, and determines the type of control language based on the number of appearances of each code. It has at least one discrimination rule.
【0018】[0018]
【作用】請求項1の発明によれば、分類手段は、入力デ
ータを記述する可能性のある制御言語群を複数のグルー
プに分類する。そして、入力手段により入力された入力
データに対して、決定手段は、分類手段により分類され
たグループ毎に互いに異なる判別ルールを適用すること
により、入力データを記述する制御言語の種類を決定す
る。そして、出力手段は、決定手段により決定された制
御言語の種類に基づいて入力データを解釈して出力す
る。これにより、従来のように一律に同様の判別ルール
を適用する判別方法と比べて、それぞれの制御言語に最
適な判別ルールを各々設定することができるので、判別
に要する処理時間の短縮化と判別精度の向上が同時に達
成できる。According to the invention of claim 1, the classification means classifies the control language group that may describe the input data into a plurality of groups. Then, for the input data input by the input means, the determining means determines the type of control language that describes the input data by applying different discrimination rules to each group classified by the classifying means. Then, the output means interprets and outputs the input data based on the type of the control language determined by the determining means. As a result, it is possible to set the optimal discrimination rule for each control language, as compared to the conventional discrimination method that uniformly applies the same discrimination rule. Improved accuracy can be achieved at the same time.
【0019】請求項2の発明によれば、決定手段は、グ
ループ毎の判別ルールを、判別処理速度の速い順番に適
用することにより、入力データを記述する制御言語の種
類を決定する。これにより、直列に判別ルールを適用し
ていく場合には、判別に要する処理時間を短縮できる。According to the second aspect of the present invention, the determining means determines the type of control language that describes the input data by applying the discrimination rules for each group in the order of faster discrimination processing speed. As a result, when the discrimination rules are applied in series, the processing time required for discrimination can be shortened.
【0020】請求項3の発明によれば、決定手段は、入
力データに対して、コード読取手段により読み取られた
コード別の出現順序に基づいて制御言語の種類を決定す
る判別ルールを少なくとも1回適用する。これにより、
単純にユニークなコマンドの有無による判別よりも大幅
に判別精度を向上させることができる。According to the third aspect of the present invention, the determining means determines the type of control language based on the order of appearance of each code read by the code reading means in the input data at least once. Apply. This allows
It is possible to greatly improve the discrimination accuracy as compared with the discrimination based on the presence / absence of a unique command.
【0021】請求項4の発明によれば、決定手段は、入
力データに対して、コード読取手段により読み取られた
コード別の出現数に基づいて制御言語の種類を決定する
判別ルールを少なくとも1回適用する。これにより、単
にユニークなコマンドの有無に基づく判別ルールよりも
誤判定の可能性を少なくさせることができる。According to the invention of claim 4, the determining means determines the type of the control language based on the number of appearances of each code read by the code reading means for the input data at least once. Apply. As a result, the possibility of erroneous determination can be reduced as compared with the determination rule based on the presence / absence of a unique command.
【0022】[0022]
(第1実施例)以下、図面を参照して本発明の実施例を
詳細に説明する。図1に示すように、本発明の出力装置
としての画像記録装置11は、画像の記録を行う記録部
12、記録部12に画像情報を供給する画像供給装置1
3、電源部14、及び外部からの指示を入力するための
操作パネル15を備えている。(First Embodiment) An embodiment of the present invention will be described in detail below with reference to the drawings. As shown in FIG. 1, an image recording device 11 as an output device of the present invention includes a recording unit 12 that records an image, and an image supply device 1 that supplies image information to the recording unit 12.
3, a power supply unit 14, and an operation panel 15 for inputting an instruction from the outside.
【0023】記録部12は、例えばレーザプリンタ等か
ら構成され、画像供給装置13からの動作指令信号26
に基づき、画像供給装置13から供給された画像情報2
7を記録用紙23に印字出力(画像記録)する。この画
像記録を正常に実行させるために、記録部12は、図示
しないカセットトレイに収容された記録用紙23の種類
や図示しない定着部が定着温度に達したか否か等を示す
状態信号24を画像供給装置に13に送出する。また、
記録部12は、画像情報の転送について記録部12と同
期をとるための同期パルス25を画像供給装置13に送
出する。The recording unit 12 is composed of, for example, a laser printer, and has an operation command signal 26 from the image supply device 13.
Based on the image information 2 supplied from the image supply device 13
7 is printed out on the recording paper 23 (image recording). In order to execute this image recording normally, the recording unit 12 sends a status signal 24 indicating the type of the recording paper 23 accommodated in the cassette tray (not shown) and whether the fixing unit (not shown) has reached the fixing temperature. It is sent to the image supply device 13. Also,
The recording unit 12 sends to the image supply device 13 a synchronization pulse 25 for synchronizing the transfer of image information with the recording unit 12.
【0024】画像供給装置13には、ホストインターフ
ェイス端子17及び入力端子18が接続されている。ホ
ストインターフェイス端子17は、図示しないホストイ
ンターフェイスから印字データを入力させるための端子
であり、入力端子18は、図示しないネットワークから
印字データを入力させるための端子である。このホスト
インターフェイス端子17又は入力端子18を介して印
字データを2系統で入力することができる。なお、入力
端子18には、ネットワーク上の複数の装置が印字デー
タの供給源として接続される場合もある。A host interface terminal 17 and an input terminal 18 are connected to the image supply device 13. The host interface terminal 17 is a terminal for inputting print data from a host interface (not shown), and the input terminal 18 is a terminal for inputting print data from a network (not shown). Print data can be input in two systems via the host interface terminal 17 or the input terminal 18. Note that the input terminal 18 may be connected to a plurality of devices on the network as a print data supply source.
【0025】画像供給装置13は、記録部12から送ら
れてきた状態信号24及び同期パルス25に基づいて、
動作指令信号26を送出して記録部12を動作させると
共に、ホストインターフェイス端子17又は入力端子1
8から入力された印字データを画像情報27として記録
部12に送出して、画像記録を制御する。The image supply device 13 is based on the status signal 24 and the sync pulse 25 sent from the recording section 12,
The operation command signal 26 is sent to operate the recording unit 12, and the host interface terminal 17 or the input terminal 1
The print data input from 8 is sent to the recording unit 12 as the image information 27 to control the image recording.
【0026】操作パネル15は、キーやスイッチ等の入
力部と、液晶ディスプレイ(LCD)や発行ダイオード
(LED)等で構成された表示部とから構成され、オペ
レータの操作により画像供給装置13に記録に関する必
要な指示情報19を送出する。また、指示情報19を受
けた画像供給装置13から返送された応答情報21を表
示する。The operation panel 15 is composed of an input section such as keys and switches and a display section composed of a liquid crystal display (LCD), an emitting diode (LED) and the like, and is recorded in the image supply device 13 by an operator's operation. The necessary instruction information 19 regarding the above is transmitted. Further, the response information 21 returned from the image supply device 13 that has received the instruction information 19 is displayed.
【0027】電源部14は、商用電源(AC)を所定の
直流又は交流に変換して、記録部12及び画像供給装置
13に電力を供給する。The power supply unit 14 converts a commercial power supply (AC) into a predetermined direct current or alternating current and supplies electric power to the recording unit 12 and the image supply device 13.
【0028】画像供給装置13は、図2に示すように、
各種制御の中枢的役割を果たすと共にシステムバス32
に接続されたCPU(中央処理装置)31を備えてい
る。システムバス32には、パネルI/F(インターフ
ェイス)回路33、ホストI/F回路34が接続されて
いる。The image supply device 13 is, as shown in FIG.
The system bus 32 plays a central role in various controls.
CPU (Central Processing Unit) 31 connected to the. A panel I / F (interface) circuit 33 and a host I / F circuit 34 are connected to the system bus 32.
【0029】パネルI/F回路33は、操作パネル15
とのインターフェイスをとるための回路であり、オペレ
ータが操作パネル15のキーを操作すると、これに対応
した信号が操作パネル15から出力され、パネルI/F
回路33を介してシステムバス32上を転送される。ま
た、システムバス32の表示情報は、パネルI/F回路
33を介して操作パネル15に転送され、表示が行われ
る。The panel I / F circuit 33 is provided on the operation panel 15
When the operator operates a key on the operation panel 15, a signal corresponding to this is output from the operation panel 15 and the panel I / F
It is transferred on the system bus 32 via the circuit 33. Further, the display information of the system bus 32 is transferred to the operation panel 15 via the panel I / F circuit 33 and displayed.
【0030】ホストI/F回路34は、ホストコンピュ
ータ等の上位装置とのインターフェイスをとるための回
路であり、例えば、ホストコンピュータから入力する印
字データをRS232C規格やセントロニクス準拠に基
づいて受信する回路で構成されている。The host I / F circuit 34 is a circuit for interfacing with a host device such as a host computer. For example, the host I / F circuit 34 is a circuit for receiving print data input from the host computer based on the RS232C standard or the Centronics standard. It is configured.
【0031】さらに、この画像供給装置13は、複数の
ホストインターフェイス端子を持つことが可能であり、
必要とするホストインターフェイスに合わせてホストI
/F回路35を増設できる。増設可能なインターフェイ
スとしては、例えば、セントロニクスインターフェイス
やイーサネット等がある。これにより、複数のホストイ
ンターフェイスから印字データを入力できる。Further, the image supply device 13 can have a plurality of host interface terminals,
Host I according to the required host interface
The / F circuit 35 can be added. Examples of expandable interfaces include Centronics interface and Ethernet. This allows print data to be input from multiple host interfaces.
【0032】また、システムバス32には、不揮発性メ
モリ(NVM)37、RAM38、プログラムメモリ3
9、文字パターンメモリ41、記録部I/F回路43及
びビットマップコントローラ44が接続されている。The system bus 32 has a non-volatile memory (NVM) 37, a RAM 38, and a program memory 3.
9, a character pattern memory 41, a recording unit I / F circuit 43, and a bitmap controller 44 are connected.
【0033】NVM37は、図示しない電池によってバ
ックアップされたメモリであり、画像記録装置11自体
の電源がオフになった状態でも必要なデータを保持する
ことができる。The NVM 37 is a memory backed up by a battery (not shown), and can hold necessary data even when the image recording apparatus 11 itself is powered off.
【0034】RAM38は、CPU31の作業用のメモ
リであり、画像記録装置11の各種の制御を行う上で必
要となるデータを保持する。また、RAM38は、ホス
トI/F回路34やホストI/F回路35から入力され
た印字データを一時的に保持する受信バッファとしても
機能する。なお、このRAM38には、発生した文字パ
ターン、イメージ等を記録用紙1ページに対応させて張
りつけて電子的な編集を行うためのビットデータを格納
するビットマップメモリ42が含まれている。The RAM 38 is a working memory of the CPU 31, and holds data necessary for performing various controls of the image recording device 11. The RAM 38 also functions as a reception buffer that temporarily holds the print data input from the host I / F circuit 34 or the host I / F circuit 35. The RAM 38 includes a bit map memory 42 that stores bit data for electronically editing the generated character pattern, image, etc. in association with one page of recording paper.
【0035】プログラムメモリ39は、CPU31によ
る画像記録装置11の制御を行うためのプログラムを格
納したメモリである。なお、このプログラムメモリ39
に格納されているプログラムは、画像記録装置11の電
源がオンされた際に、CPU31により読み取られる。The program memory 39 is a memory in which a program for controlling the image recording device 11 by the CPU 31 is stored. The program memory 39
The program stored in is read by the CPU 31 when the power of the image recording apparatus 11 is turned on.
【0036】文字パターンメモリ41は、プリントアウ
トを行う時の文字パターンを格納したメモリであり、い
わゆるフォントメモリと呼ばれるメモリである。The character pattern memory 41 is a memory that stores a character pattern when printing out, and is a so-called font memory.
【0037】記録部I/F回路43は、記録部12との
インターフェイスをとるための回路であり、例えば、ビ
ットマップメモリ42に展開されたビットデータを、画
像情報27として記録部12に供給したり、また、状態
信号24、同期パルス25及び動作指令信号26を送受
するインターフェイスとしての役割を有する。The recording section I / F circuit 43 is a circuit for interfacing with the recording section 12. For example, the bit data expanded in the bit map memory 42 is supplied to the recording section 12 as image information 27. It also serves as an interface for transmitting and receiving the status signal 24, the synchronization pulse 25 and the operation command signal 26.
【0038】ビットマップコントローラ44は、ビット
マップメモリ42と記録部I/F回路43との間の画像
情報の転送に関する制御を行うための回路である。The bitmap controller 44 is a circuit for controlling the transfer of image information between the bitmap memory 42 and the recording section I / F circuit 43.
【0039】プログラムメモリ46及び文字パターンメ
モリ47は、それぞれプログラムメモリ39及び文字パ
ターンメモリ41と同様にプログラム及び文字パターン
を格納しておくためのメモリであるが、ユーザの要求に
合わせて選択的に画像記録装置11に接続できるように
なっている。プログラムメモリ46及び文字パターンメ
モリ47としては、着脱自在のICカード形式又はSI
MM形式のROM等を用いることができる。これによ
り、各種のホストコンピュータから送られてくる印字デ
ータや制御データに対応したプログラムや文字パターン
に幅広く対応可能となる。The program memory 46 and the character pattern memory 47 are memories for storing a program and a character pattern similarly to the program memory 39 and the character pattern memory 41, respectively, but selectively according to the user's request. It can be connected to the image recording device 11. As the program memory 46 and the character pattern memory 47, a removable IC card format or SI
An MM format ROM or the like can be used. As a result, it is possible to widely support programs and character patterns corresponding to print data and control data sent from various host computers.
【0040】ハードディスク48は、大量のデータを記
憶しておくための磁気記録装置であり、文字パターンの
追加、フォームデータ及びロゴデータの保存、ホストコ
ンピュータからの入力データの保存等に使用される。こ
のハードディスク48もユーザが必要に応じて接続する
ことが可能である。The hard disk 48 is a magnetic recording device for storing a large amount of data, and is used for adding character patterns, saving form data and logo data, saving input data from the host computer, and the like. The hard disk 48 can also be connected by the user as needed.
【0041】次に、プロブラムメモリ39に記憶されて
いるプログラム、すなわちソフトウエアの構造を図3に
示す。図3に示すように、最下層には、ハードディスク
48等の各周辺機器を個別に制御するためのソフトウェ
ア群であるデバイス・ドライバーが位置している。Next, FIG. 3 shows the structure of the program stored in the program memory 39, that is, the software. As shown in FIG. 3, a device driver, which is a software group for individually controlling each peripheral device such as the hard disk 48, is located in the lowermost layer.
【0042】次の階層には、OS(operating system)
が位置し、画像記録装置11を制御するソフトウェアの
中核的役割を果たしている。このOSは、タスク管理、
記憶管理、入出力管理等を行うことにより、CPU3
1、RAM38、各周辺機器等のハードウェアを管理す
る。また、ハードウェア資源の管理を土台として、ファ
イル管理、プログラム管理、通信制御等を行うことによ
り、ファイル、上位のプログラム等の論理資源を管理す
る。このような構成をとることによって、ハードウェア
の変更による上位の階層のソフトウェアの修正を最小化
できる。In the next layer, an OS (operating system)
Is located and plays a core role of software for controlling the image recording device 11. This OS is for task management,
By performing storage management, input / output management, etc., the CPU 3
1, managing the hardware such as the RAM 38 and each peripheral device. Further, the logical resources such as files and upper programs are managed by performing file management, program management, communication control, etc. based on the management of hardware resources. By adopting such a configuration, it is possible to minimize the modification of the software of the upper layer due to the change of the hardware.
【0043】OSの上位には、制御用ライブラリー、ア
プリケーション・プログラム(application program )
が位置している。制御用ライブラリには、最上層にある
アプリケーション・プログラムに使用される制御用のプ
ログラム群が格納されている。A control library and an application program are provided above the OS.
Is located. The control library stores a control program group used for the application programs in the uppermost layer.
【0044】アプリケーション・プログラムは、画像記
録装置11がユーザ所望の動作を実行するように作成さ
れた応用的なプログラムである。制御言語としてのプリ
ンタ言語を解釈し、画像に展開するデコンポーザは、こ
のアプリケーション・プログラムに属する。The application program is an application program created so that the image recording device 11 executes the operation desired by the user. A decomposer that interprets a printer language as a control language and develops it into an image belongs to this application program.
【0045】図4に、アプリケーション・プログラムを
基本的な機能ブロックで示す。コントロール60はシス
テム全体の制御を行うもので、イン62及びアザーズ6
8からのジョブ開始の要求に基づいて、データプロセス
64及びアザーズ68を制御する。FIG. 4 shows an application program as basic functional blocks. The control 60 controls the entire system, and includes the in 62 and the others 6
The data process 64 and the others 68 are controlled based on the job start request from 8.
【0046】このコントロール60は、以下の(1)〜
(4)のモジュールから構成されている。なお、本実施
例では、コントロール60をシステム制御部と呼称す
る。 (1)システム・コントローラ 設定情報をチェック
し、各タスクを起動する。 (2)ジョブ・コントローラ ジョブを実行制御す
る。 (3)ページ・コントローラ ビットマップメモリを
管理する。 (4)タイマー・コントローラ メッセージによるタイ
マーを管理する。This control 60 has the following (1)-
It is composed of the module (4). In this embodiment, the control 60 will be referred to as a system control unit. (1) Check the system controller setting information and start each task. (2) Job controller Controls execution of jobs. (3) Page controller Manages bitmap memory. (4) Timer controller Manages the timer by message.
【0047】イン62は、ホストコンピュータとのデー
タの入出力を管理するものである。このような入出力を
行うため、イン62は、データプロセス64にデータを
受渡し、又はデータプロセス64からデータを受け取
る。さらに、データを受け渡したり、受け取ったりする
と、コントロール60にジョブの開始を要求する。The in 62 manages data input / output with the host computer. In order to perform such input / output, the IN 62 passes data to the data process 64 or receives data from the data process 64. Further, when data is transferred or received, the control 60 is requested to start a job.
【0048】また、イン62は、例えば、以下のような
モジュールから構成されている。 (1)インターフェイスA ローカル・インターフェ
イスA (2)インターフェイスB ローカル・インターフェ
イスB (3)インターフェイスC ネットワーク・インター
フェイスC (4)インターフェイスD ネットワーク・インター
フェイスD (5)インターフェイスE ネットワーク・インター
フェイスE なお、ローカル・インターフェイスとしては、セントロ
ニクス、RS−232C等、ネットワーク・インターフ
ェイスとしては、イーサネット、ローカルトーク等が使
用できる。Further, the in 62 is composed of, for example, the following modules. (1) Interface A Local Interface A (2) Interface B Local Interface B (3) Interface C Network Interface C (4) Interface D Network Interface D (5) Interface E Network Interface E For example, Centronics, RS-232C, etc., and as the network interface, Ethernet, local talk, etc. can be used.
【0049】データプロセス64は、データを処理する
ものである。この処理すべきデータはイン62から受け
取ったデータであり、処理結果は、イン62又はアウト
66に受け渡す。The data process 64 processes data. The data to be processed is the data received from the in 62, and the processing result is passed to the in 62 or the out 66.
【0050】また、データプロセス64は、本実施例で
規定する制御言語解釈部と同意語であり、本実施例で
は、デコンポーザと呼称する。The data process 64 is synonymous with the control language interpretation unit defined in this embodiment, and is called a decomposer in this embodiment.
【0051】デコンポーザは、データプロセス64とし
て実装され、下記の種類がある。これらは、それぞれ1
つ以上のタスクとして動作する。 (1)自動判別パーサ プリンタ言語(制御言
語)を判別するタスクである。 (2)言語Aデコンポーザ プリンタ言語A(製品ネ
イティブなページ記述言語)を解釈し実行するタスク群
である。 (3)言語Bデコンポーザ プリンタ言語B(業界標
準のページ記述言語)を解釈し実行するタスク群であ
る。 (4)言語Cデコンポーザ プリンタ言語C(X社開
発プロッタ制御言語)を解釈し実行するタスク群であ
る。 (5)言語Dデコンポーザ プリンタ言語D(Y社開
発ワイヤドットプリンタ制御言語)を解釈し実行するタ
スク群である。 (6)言語Eデコンポーザ プリンタ言語E(Z社開
発ワイヤドットプリンタ制御言語)を解釈し実行するタ
スク群である。 (7)ダンプ 16進ダンプの画像を形
成するタスクである。 (8)プリント・ユーテイ リテイ ・フォーマッタタスク 各種プリント・ユーティリティの画像を形成するタスク
である。The decomposer is implemented as the data process 64 and has the following types. These are 1
Operates as one or more tasks. (1) Automatic discrimination parser This is a task for discriminating the printer language (control language). (2) Language A Decomposer A group of tasks for interpreting and executing the printer language A (product native page description language). (3) Language B Decomposer A group of tasks for interpreting and executing printer language B (an industry standard page description language). (4) Language C Decomposer This is a task group for interpreting and executing the printer language C (plotter control language developed by X company). (5) Language D Decomposer A group of tasks for interpreting and executing the printer language D (wire dot printer control language developed by Y company). (6) Language E decomposer This is a group of tasks for interpreting and executing the printer language E (wire dot printer control language developed by Z company). (7) Dump This is a task for forming a hexadecimal dump image. (8) Print utility formatter task This is a task to form images of various print utilities.
【0052】アウト66は、データプロセス64の処理
結果のデータを出力するものである。このアウト66
は、以下のモジュールから構成されている。 (1)エンジン・コントローラ プリンタエンジン
(記録部)を制御する。Out 66 outputs the data of the processing result of the data process 64. This out 66
Is composed of the following modules: (1) Engine controller Controls the printer engine (recording unit).
【0053】アザーズ68は、上述以外の他の各種機能
や複合的な機能を実行するものである。このアザーズ6
8は、以下のモジュールから構成されている。 (1)UI パネル15の制御を
行う。 (2)プリンタ管理エージェント ネットワークでのプ
リンタ管理システムを実現するための機能を有する。例
えば、クライアントに対して、プリンタ・リソース、状
態の設定、提供等の機能である。The others 68 execute various functions other than those described above and composite functions. This Others 6
8 is composed of the following modules. (1) The UI panel 15 is controlled. (2) Printer management agent It has the function to realize the printer management system in the network. For example, functions such as printer resource, status setting, and provision to the client.
【0054】以上のように、アプリケーションプログラ
ムは、いくつかの構成要素からなり、各構成要素は、さ
らにいくつかの機能モジュールから構成されている。こ
れらの機能モジュールは実際には1つ又は複数のタスク
から構成されている。デコンポーザもいくつかのタスク
群を構成している。As described above, the application program is composed of some constituent elements, and each constituent element is further composed of some functional modules. These functional modules actually consist of one or more tasks. The decomposer also constitutes some tasks.
【0055】これらのタスク群は、制御用ライブラリと
して用意されている様々な関数を使ってタスク間の同期
を取っている。デコンポーザも、制御用ライブラリを使
ってコントロール60、イン62及びアウト66を構成
するタスク群との同期を取りながらプリント機能を実現
している。These task groups are synchronized with each other by using various functions prepared as a control library. The decomposer also realizes the print function by synchronizing with the task group forming the control 60, the in 62, and the out 66 by using the control library.
【0056】次に、画像記録装置11の作用について説
明する。各種のホストコンピュータやワークステーショ
ン等の情報処理装置から出力された印字データ及びその
印字データを如何に出力するかを定めた制御言語から構
成される制御データは、ホストインターフェイス端子1
7又は入力端子18を介して画像供給装置13に入力さ
れる。情報処理装置には多くの種類があるため、入力さ
れた制御データは、必ずしも統一されていない。例え
ば、ある情報処理装置が送出する制御データは、記録用
紙のサイズや文字の大きさ等を細かく指定できても、他
の装置の制御データはこのような指定を行うことができ
ない場合がある。Next, the operation of the image recording device 11 will be described. The control data composed of print data output from an information processing device such as various host computers and workstations and a control language that defines how to output the print data is the host interface terminal 1
The image is supplied to the image supply device 13 via the input terminal 7 or the input terminal 18. Since there are many types of information processing devices, the input control data is not always unified. For example, the control data sent by a certain information processing device may be able to specify the size of a recording sheet, the size of a character, and the like in detail, but the control data of another device may not be able to perform such a specification.
【0057】後者のように制御データに指定が無かった
場合、パネル15の表示部には、その旨が表示される。
そこで、オペレータがパネル15により当該記録に関す
る必要なデータをキー入力すると、当該指示情報19
が、画像供給装置13に伝達され、指示情報19に基づ
く記録制御が可能となる。When there is no designation in the control data as in the latter case, that fact is displayed on the display portion of the panel 15.
Then, when the operator key-inputs the necessary data regarding the recording on the panel 15, the instruction information 19
Is transmitted to the image supply device 13, and recording control based on the instruction information 19 becomes possible.
【0058】なお、情報処理装置側で記録を行う用紙の
サイズや文字の大きさ等を制御データとして指定してき
た場合においても、パネル15からキー操作等により指
示情報19を入力することも可能である。このような場
合には、情報処理装置側の指示を常に優先させることも
できるし、パネル15側の入力を優先させることもでき
る。また、時間的に後で指示を与えた方を優先させるこ
とも可能である。Even when the size of the paper or the size of the characters to be recorded is designated as the control data on the side of the information processing apparatus, it is possible to input the instruction information 19 from the panel 15 by a key operation or the like. is there. In such a case, the instruction on the information processing device side can always be prioritized, or the input on the panel 15 side can be prioritized. It is also possible to give priority to a person who gives an instruction later in time.
【0059】次に、画像供給装置13は、指示情報19
と記録部12からの状態信号とに基づいて印字可能か否
か等の判断を行い、その旨を応答情報21としてパネル
15に表示させる。例えば、指示情報19によって指示
されたサイズの用紙が記録部12にセットされていない
場合には、そのサイズの用紙をセットするように促す応
答をパネル15に表示させる。Next, the image supply device 13 sends the instruction information 19
Based on the status signal from the recording unit 12, whether or not printing is possible is determined, and the fact is displayed on the panel 15 as response information 21. For example, when the paper of the size instructed by the instruction information 19 is not set in the recording unit 12, the panel 15 displays a response prompting to set the paper of that size.
【0060】以上のようにして記録準備が整うと、画像
供給装置13は、動作指令信号26を記録部12に送出
し、記録部12を制御データに基づいて動作させると共
に、記録部12からの同期パルス25により出力のタイ
ミングをとりながら入力された印字データを画像情報2
7として記録部12に転送する。When the preparation for recording is completed as described above, the image supply device 13 sends the operation command signal 26 to the recording section 12 to operate the recording section 12 on the basis of the control data, and at the same time, the recording section 12 outputs the signal. The print data input while synchronizing the output timing with the synchronization pulse 25 is used as the image information 2
7 is transferred to the recording unit 12.
【0061】次に、アプリケーションプログラムの全体
動作、特にジョブ開始にあたって起動されるデコンポー
ザの作用について説明する。ジョブ開始にあたって起動
されるデコンポーザは、入力ポート毎に設定されている
プリンタ言語(制御言語)のデコンポーザである。ジョ
ブの入力ポートに対して設定されている制御言語が自動
判別を指定するものであれば、自動判別パーサが起動さ
れ(自動判別モード)、自動判別が指定されていなけれ
ば、設定されている制御言語のデコンポーザが起動され
る(プリンタ言語固定モード)。以下、この2つの場合
におけるデコンポーザの処理について各々説明する。な
お、対象となるデコンポーザは、上記の言語A、言語
B、言語C、言語D、言語Eについてのデコンポーザ及
びダンプである。Next, the overall operation of the application program, particularly the operation of the decomposer activated at the start of the job, will be described. The decomposer activated at the start of the job is a decomposer of the printer language (control language) set for each input port. If the control language set for the job input port specifies automatic discrimination, the automatic discrimination parser is started (automatic discrimination mode), and if automatic discrimination is not specified, the set control The language decomposer is started (printer language fixed mode). The processing of the decomposer in these two cases will be described below. Note that the target decomposers are the decomposers and dumps for the above language A, language B, language C, language D, and language E.
【0062】まず、プリンタ言語固定モードの処理を図
5のフローチャート及び図6のブロック図を参照して説
明する。なお、図6において、インタスク74はイン6
2によるタスク、アウトタスク76はアウト66による
タスク、ジョブコントローラ72は前述したコントロー
ル60の1つの機能モジュール、デコンポーザ70は、
当該ジョブを実行する1つのデコンポーザである。First, the printer language fixed mode processing will be described with reference to the flowchart of FIG. 5 and the block diagram of FIG. In FIG. 6, the in-task 74 is an in-task 74.
2, the out task 76 is a task according to the out 66, the job controller 72 is one functional module of the control 60 described above, and the decomposer 70 is
It is one decomposer that executes the job.
【0063】インタスク74がジョブを検出したか否か
を判定し(ステップ300)、否定判定の場合はジョブ
が検出されるまで、デコンポーザ70の待ち状態が保た
れる。ジョブが検出されると、インタスク74は、該当
入力ポートのプリンタ言語設定を参照して、対応するデ
コンポーザのジョブとしてジョブコントローラ72にジ
ョブを要求する(ステップ302)。なお、ジョブが検
出されたとは、あるインターフェイスに一連のデータが
入力されたことを意味する。The in-task 74 determines whether or not a job is detected (step 300). If the determination is negative, the wait state of the decomposer 70 is maintained until a job is detected. When the job is detected, the in-task 74 refers to the printer language setting of the corresponding input port and requests the job from the job controller 72 as the job of the corresponding decomposer (step 302). Note that the job being detected means that a series of data has been input to a certain interface.
【0064】ジョブコントローラ(システム制御部)7
2は、インタスク74からのジョブ要求を受けて、その
デコンポーザ70にジョブ実行指示を出力する(ステッ
プ304)。Job controller (system control unit) 7
2 receives the job request from the in-task 74 and outputs a job execution instruction to the decomposer 70 (step 304).
【0065】非同期イベントとしてジョブ実行指示を受
けたデコンポーザ70は、デコンポーザ処理を開始する
(ステップ306)。このデコンポーザ70によるデコ
ンポーザ処理によって、インタスク74により受信され
た受信バッファ(RAM38)内のプリンタ言語は、設
定されたプリンタ言語に解釈されていく。Upon receiving the job execution instruction as the asynchronous event, the decomposer 70 starts the decomposer processing (step 306). By the decomposer processing by the decomposer 70, the printer language in the reception buffer (RAM 38) received by the in-task 74 is interpreted as the set printer language.
【0066】デコンポーザ70が、受信バッファ内のプ
リンタ言語を読み取っている際にデータの終わりを示す
EOJが検出されたか否かが判定される(ステップ30
8)。EOJが検出されない場合は、デコンポーザ処理
(ステップ306)が続行され、EOJが検出される
と、デコンポーザ70はジョブの終了処理を行う。な
お、EOJは、ジョブの終了を示すデータの入力、デー
タ入力待ち時間のタイムアウト、パネル15からの強制
排出指示の入力、ファイルの終了、ネットワークコネク
ションの終了等を検出することで判断できる。It is determined whether the decomposer 70 detects EOJ indicating the end of data while reading the printer language in the reception buffer (step 30).
8). If the EOJ is not detected, the decomposer processing (step 306) is continued, and if the EOJ is detected, the decomposer 70 performs the job end processing. The EOJ can be determined by detecting the input of data indicating the end of the job, the timeout of the data input waiting time, the input of the forced ejection instruction from the panel 15, the end of the file, the end of the network connection, and the like.
【0067】ジョブの終了処理として、デコンポーザ7
0は、先ずアウトタスク76にジョブ終了通知を出す
(ステップ310)。これにより、エンジンコントロー
ラは、当該処理データ以降の該当ジョブの出力依頼のな
いことを検出でき(ステップ312)、出力終了の準備
が可能となる。As the job end processing, the decomposer 7
0 first issues a job end notification to the out task 76 (step 310). As a result, the engine controller can detect that there is no output request for the job after the processing data (step 312), and prepare for the end of output.
【0068】そして、デコンポーザ70は、ジョブコン
トローラ72に対してジョブ終了報告を行う(ステップ
314)。Then, the decomposer 70 reports the job completion to the job controller 72 (step 314).
【0069】以上のようにデコンポーザ処理の終了で、
デコンポーザ70は非同期イベント待ち状態に移行し
(ステップ316)、新たなデコンポーザ処理の実行指
示を待つ(ステップ304)。As described above, at the end of the decomposer processing,
The decomposer 70 shifts to the asynchronous event wait state (step 316) and waits for an instruction to execute a new decomposer process (step 304).
【0070】次に、自動判別モードにおける処理を図7
のフローチャート、このフローチャートに現れる機能ブ
ロックと制御の流れとを示す図8及び図9を参照して説
明する。なお、図8は自動判別ができた場合、図9は自
動判別ができなかった場合を示し、新たに付加された自
動判別パーサ78は、前述したデータプロセス64とし
て実装されるプリンタ言語判別タスクである。Next, the process in the automatic discrimination mode is shown in FIG.
The flowchart of FIG. 8 and the functional blocks and control flow appearing in this flowchart will be described with reference to FIGS. 8 and 9. Note that FIG. 8 shows a case where automatic discrimination is possible, and FIG. 9 shows a case where automatic discrimination is not possible. The newly added automatic discrimination parser 78 is a printer language discrimination task implemented as the data process 64 described above. is there.
【0071】先ず、インタスク74がジョブを検出した
か否かが判定され(ステップ318)、否定判定の場合
は、ジョブが検出されるまで、デコンポーザ70の待ち
状態が保たれる。ジョブが検出されると、インタスク7
4は、ジョブコントローラ72に対して自動判別パーサ
78のジョブとしてジョブ要求を行う(ステップ32
0)。First, it is determined whether or not the intask 74 has detected a job (step 318). In the case of a negative determination, the wait state of the decomposer 70 is maintained until a job is detected. If a job is detected, in task 7
4 issues a job request to the job controller 72 as a job of the automatic discrimination parser 78 (step 32).
0).
【0072】ジョブ要求を受けたジョブコントローラ7
2は、自動判別パーサ78にジョブ実行指示を出す(ス
テップ322)。Job controller 7 which has received a job request
2 issues a job execution instruction to the automatic discrimination parser 78 (step 322).
【0073】ジョブ実行指示を受けた自動判別パーサ7
8は、下記の、のいずれかの条件が満たされた時
に、受信した所定数のデータ又はEOJ検出までのデー
タを対象として自動判別処理を実行する(ステップ32
4)。Automatic discrimination parser 7 which has received a job execution instruction
When any one of the following conditions is satisfied, 8 executes the automatic discrimination processing for the received predetermined number of data or the data up to the EOJ detection (step 32).
4).
【0074】 所定数のデータを受信した場合 EOJを検出した場合 この自動判別処理の詳細については後述する。When a predetermined number of data is received When EOJ is detected Details of this automatic discrimination processing will be described later.
【0075】自動判別パーサ78が自動判別処理を終了
すると、入力されたプリンタ言語がどの言語であるかが
判別できたか否かが判定される(ステップ326)。入
力されたプリンタ言語がどの言語であるかが判別できた
場合は、自動判別パーサ78は、ジョブコントローラ7
2に対して判別結果のプリンタ言語に対応するデコンポ
ーザ70への切替え要求を出し(ステップ334)、ジ
ョブコントローラ72は当該デコンポーザ70を起動さ
せるべくジョブ実行指示を出す(ステップ304)。こ
れ以降は、制御が当該デコンポーザ70に移行し、ステ
ップ304を含めた以後のステップは、図5のプリンタ
固定モードと同じであるので、図5と対応する部分には
同一符号を付して説明を省略する。When the automatic discrimination parser 78 finishes the automatic discrimination processing, it is judged whether or not the language of the inputted printer language can be discriminated (step 326). When it is possible to determine which language the input printer language is, the automatic determination parser 78 determines that the job controller 7
A request for switching to the decomposer 70 corresponding to the printer language of the determination result is issued to 2 (step 334), and the job controller 72 issues a job execution instruction to activate the decomposer 70 (step 304). After that, the control shifts to the decomposer 70, and the steps including step 304 are the same as those in the printer fixed mode of FIG. 5, and therefore, the portions corresponding to those of FIG. Is omitted.
【0076】なお、自動判別パーサ78が判別したプリ
ンタ言語のデコンポーザがオプション・ソフトで装着さ
れているか否かの判断と処置は、自動判別パーサ78で
はなく、ジョブコントローラ72が行う。The job controller 72, not the automatic determination parser 78, determines and takes action whether or not the decomposer of the printer language determined by the automatic determination parser 78 is installed by the option software.
【0077】一方、ステップ326で、入力されたプリ
ンタ言語がどの言語であるか判別できなかった場合は、
自動判別パーサ78がジョブコントローラ72に対して
アボート(ABORT)要求を出す(ステップ32
8)。なお、この際、プリントログにプリント言語判別
不可である旨を登録する。On the other hand, if it is not possible to determine which language the input printer language is in step 326,
The automatic discrimination parser 78 issues an ABORT request to the job controller 72 (step 32).
8). At this time, the fact that the print language cannot be determined is registered in the print log.
【0078】アボート要求を受け取ったジョブコントロ
ーラ72は、自動判別パーサ78にアボート指示を出す
(ステップ330)。これにより、自動判別パーサ78
の処理が終了となる(ステップ332)。即ち、デコン
ポーザ71が非同期イベント待ち状態に移行する(図9
参照)。なお、この時、解放されたデコンポーザは特定
のものを指さず複数あるため、図9ではデコンポーザ7
1として単一のデコンポーザ70と区別している。Upon receiving the abort request, the job controller 72 issues an abort instruction to the automatic discrimination parser 78 (step 330). As a result, the automatic discrimination parser 78
Processing ends (step 332). That is, the decomposer 71 shifts to the asynchronous event waiting state (FIG. 9).
reference). At this time, since there are a plurality of released decomposers without pointing to a specific one, the decomposer 7 shown in FIG.
1 is distinguished from the single decomposer 70.
【0079】そして、処理を終えた自動判別パーサ78
は、ジョブコントローラ72にアボート終了報告を行い
(ステップ333)、これにより自動判別処理は終了
し、最初のステップ318に戻る。なお、この時点では
まだアウトタスク76に対し出力依頼を行っていないた
め、判別ができた時とは異なり、アウトタスク76に対
してはジョブ終了を通知しない(図9参照)。Then, the automatic discrimination parser 78 which has completed the processing
Sends an abort completion report to the job controller 72 (step 333), whereby the automatic determination processing ends, and the process returns to the first step 318. At this point, since the output request has not been made to the out task 76 yet, the job completion is not notified to the out task 76, unlike when the determination can be made (see FIG. 9).
【0080】以上の自動判別モードを使用すれば、ホス
トコンピュータより受信されたデータがどのプリンタ言
語で記述されているか自動的に識別されるので、ユーザ
がプリンタ言語を指定しなくても、画像記録装置11は
受信されたデータに合わせて適切なプリンタ言語処理系
を選択し、プリント処理を行うことができる。By using the above automatic discrimination mode, it is possible to automatically identify in which printer language the data received from the host computer is described. Therefore, even if the user does not specify the printer language, the image recording can be performed. The device 11 can select an appropriate printer language processing system according to the received data and perform print processing.
【0081】次に、上記自動判別パーサ78内部の構成
と詳細な制御の流れについて説明する。図10に示すよ
うに、自動判別パーサ78は、ジョブコントローラ72
とのインターフェイスをとるためのジョブコントローラ
インターフェイス80を備えている。Next, the internal structure of the automatic discrimination parser 78 and the detailed control flow will be described. As shown in FIG. 10, the automatic determination parser 78 uses the job controller 72.
A job controller interface 80 is provided for interfacing with the.
【0082】また、ジョブコントローラインターフェイ
ス80は、判別器コントローラ82にジョブ実行指示に
基づく判別開始指示を与えると共に、判別器コントロー
ラ82から送出された判別結果を受信する。また、ジョ
ブコントローラインターフェイス80は、ジョブコント
ローラ72からのジョブ実行指示を受信すると共に、デ
コンポーザ切替え要求やアボート要求をジョブコントロ
ーラ72に送出する。Further, the job controller interface 80 gives a discrimination start instruction to the discriminator controller 82 based on the job execution instruction and receives the discrimination result sent from the discriminator controller 82. Further, the job controller interface 80 receives the job execution instruction from the job controller 72 and sends a decomposer switching request or an abort request to the job controller 72.
【0083】判別器コントローラ82は、ジョブコント
ローラインターフェイス80からの判別開始指示に基づ
いて、受信データが特定のプリンタ言語であるか否かを
判別する判別器の各々に起動指示を与えると共に、各判
別器からの判別結果(成功、失敗及び不定のいずれか)
を受け取る。The discriminator controller 82 gives a start instruction to each of the discriminators that determine whether or not the received data is in a specific printer language, based on the determination start instruction from the job controller interface 80. Result from the vessel (either success, failure or indefinite)
To receive.
【0084】本実施例では、言語A判別器84、言語B
判別器86、言語C判別器88、言語D判別器90及び
言語E判別器92の5つの判別器が設けられ、受信デー
タが言語A、言語B、言語C、言語D及び言語Eで記述
されているか否かを各々判別する。In this embodiment, the language A discriminator 84 and the language B are used.
Five discriminators, a discriminator 86, a language C discriminator 88, a language D discriminator 90 and a language E discriminator 92, are provided, and the received data are described in language A, language B, language C, language D and language E. Whether or not each is determined.
【0085】言語A判別器84、言語B判別器86及び
言語C判別器88は、各々直接判別器コントローラ82
と接続されており、判別器コントローラ82からの起動
指示により、各々対象とするプリンタ言語の判別を行
い、判別結果を判別器コントローラ82に送出する。The language A discriminator 84, the language B discriminator 86, and the language C discriminator 88 are each a direct discriminator controller 82.
The target printer language is determined according to the activation instruction from the discriminator controller 82, and the discrimination result is sent to the discriminator controller 82.
【0086】言語D判別器90及び言語E判別器92
は、グループ判別制御部94を介して判別器コントロー
ラ82と接続されており、グループ判別制御部94を介
して入力される起動指示により、各々対象とするプリン
タ言語の判別を行い、その判別結果をグループ判別制御
部94を介して判別器コントローラ82に送出する。Language D discriminator 90 and language E discriminator 92
Are connected to the discriminator controller 82 via the group discrimination control unit 94, and each of the target printer languages is discriminated by a start instruction input via the group discrimination control unit 94, and the discrimination result is displayed. It is sent to the discriminator controller 82 via the group discrimination control unit 94.
【0087】なお、判別器同士を1つのグループで構成
するか否かは、例えば、対象とするプリンタ言語が互い
に共通のコマンドを持つことが1つの基準となり、共通
のコマンドを持つ場合には1つのグループで構成する。Whether or not the discriminators are formed into one group is based on, for example, that the target printer languages have common commands, and if they have common commands, then 1 It consists of two groups.
【0088】また、これらの判別器は、バッファ96と
接続されており、バッファに格納されている受信データ
を読み取ってその判別対象としている。このバッファ9
6はローカルなメモリであって、ここに格納されている
受信データは、受信バッファ(図2でいうRAM38)
から転送されてきたものである。Further, these discriminators are connected to the buffer 96, and read the received data stored in the buffer as the discrimination target. This buffer 9
Reference numeral 6 is a local memory, and the reception data stored therein is a reception buffer (RAM 38 in FIG. 2).
It has been transferred from.
【0089】各判別器は、受信データを所定のバイト数
だけ順次読み取り、各判別器が対象とする言語で用いら
れるコマンドがあるか否かを検索する。また、各判別器
は受信データを各判別器が対象とする言語であると仮定
して文法エラーがあるか否かも検索する。そして、「コ
マンドがあるか」「文法エラーがあるか」の2種類の検
索結果の組み合わせに基づいて以下の「成功」、「不
定」、「失敗」のいずれかの判別結果を出力する。Each discriminator sequentially reads the received data by a predetermined number of bytes, and searches each discriminator for a command used in the target language. Each discriminator also searches the received data for a grammatical error, assuming that the received data is in the target language. Then, based on the combination of the two types of search results, "whether there is a command" and "whether there is a syntax error", the following determination result of "success", "undefined", or "failure" is output.
【0090】 「成功」 : 「文法エラーなし」かつ「コマンドあ
り」 「不定」 : 「文法エラーなし」かつ「コマンドな
し」 「失敗」 : 「文法エラーあり」 「成功」の場合には、受信データのプリンタ言語は、当
該判別器の対象とする言語であり、「不定」の場合に
は、当該言語であるか否かが分からない状態、「失敗」
の場合には、受信データのプリンタ言語は当該言語では
ないということを示している。“Success”: “No syntax error” and “Command exists” “Undefined”: “No syntax error” and “No command” “Fail”: “Syntax error” “Success”, the received data The printer language of is the language targeted by the discriminator, and in the case of "indefinite", it is not known whether or not it is the language, "failure"
In the case of, it indicates that the printer language of the received data is not the language.
【0091】以上のように判別結果を定義することによ
り、「失敗」の場合には、「文法エラー」を検出した時
点で判別器による判別処理を打ち切ることが可能とな
る。これにより、該当しない制御言語のための判別処理
を最小限に抑えることができ、判別処理を高速化でき
る。By defining the discrimination result as described above, in the case of "failure", the discrimination processing by the discriminator can be terminated when the "syntax error" is detected. As a result, it is possible to minimize the discrimination processing for the control language that does not apply, and it is possible to speed up the discrimination processing.
【0092】また、「文法エラー」を検出することによ
り、たまたま文字列として他の制御言語のコマンドを含
んでいる場合でも、誤判定を防止できるので、判別精度
を向上させることができる。Further, by detecting the "grammar error", it is possible to prevent the erroneous determination even when the command of the other control language is accidentally included as the character string, so that the determination accuracy can be improved.
【0093】なお、この「文法エラー」は、制御言語と
しての矛盾が検出されたことを意味し、次のようにして
検出される。すなわち、各判別器は、受信データを記述
する制御言語の中から、その判別器が対象とする制御言
語にありえないような命令コードを検出した場合、又
は、その制御言語ではありえないような命令コードの組
み合わせを検出した場合に、「文法エラー」の判別結果
を出力する。また、ある特定の命令コードがデータ列の
特定の位置にあったり、命令コードの順番が定まってい
る制御言語の場合で当該位置にその命令コードがなかっ
た時も「文法エラー」に相当する。The "grammar error" means that a contradiction as a control language has been detected, and is detected as follows. That is, each discriminator detects, from the control language describing the received data, an instruction code which cannot be in the control language targeted by the discriminator, or an instruction code which cannot be in the control language. When a combination is detected, the "grammar error" determination result is output. Further, when a certain instruction code is located at a particular position in a data string, or in the case of a control language in which the order of the instruction code is fixed, there is no such instruction code at that position, which corresponds to a "grammar error".
【0094】次に、自動判別パーサ78の処理の流れに
ついて図11のフローチャートに沿って説明する。Next, the flow of processing of the automatic discrimination parser 78 will be described with reference to the flowchart of FIG.
【0095】受信バッファ(RAM38)に一定量以上
受信データが格納されると、ローカルなメモリであるバ
ッファ96に所定数分の当該受信データ、例えば256
バイトや1024バイト分の受信データが転送される
(ステップ340)。但し、当該所定数未満で受信デー
タの終わりを示すEOJが検出された場合には、EOJ
までの受信データが転送される(ステップ340)。When a certain amount or more of received data is stored in the receive buffer (RAM 38), a predetermined number of the received data, for example 256, is stored in the buffer 96 which is a local memory.
Bytes or 1024 bytes of received data are transferred (step 340). However, if EOJ indicating the end of received data is detected with less than the predetermined number, EOJ is detected.
The received data up to are transferred (step 340).
【0096】そして、ジョブコントローラインターフェ
イス80にジョブコントローラ72からジョブ実行指示
があると、ジョブコントローラインターフェイス80
は、判別器コントローラ82に判別開始指示を与える。
そして、判別開始指示を受けた判別器コントローラ80
は、各判別器に起動指示を与え、順番に起動させる。When the job controller 72 receives a job execution instruction from the job controller 72, the job controller interface 80
Gives a discrimination start instruction to the discriminator controller 82.
Then, the discriminator controller 80 that receives the discrimination start instruction
Gives an activation instruction to each discriminator and activates them in order.
【0097】先ず、言語A判別器84が起動され(ステ
ップ342)、バッファ96内の受信データが言語Aで
あるか否かの判別処理が行われる。判別処理が終了する
と、その結果が判別器コントローラ82に伝達され、判
別結果の判定が行われる(ステップ344)。First, the language A discriminator 84 is activated (step 342), and a discrimination process as to whether or not the received data in the buffer 96 is the language A is performed. When the discrimination process is completed, the result is transmitted to the discriminator controller 82, and the discrimination result is discriminated (step 344).
【0098】ステップ344の判定が「成功」の場合
は、言語Aが受信データのプリンタ言語であると判断さ
れる(ステップ372)。そして、その判別結果が言語
Aであるという情報がジョブコントローラインターフェ
イス80に伝達され、そこからその判別結果がシステム
に通知される(ステップ374)。又は、ジョブコント
ローラインターフェイス80よりジョブコントローラ7
2に言語Aを解釈するデコンポーザへの切替え要求が送
出される。If the determination in step 344 is "success", it is determined that language A is the printer language of the received data (step 372). Then, the information that the discrimination result is the language A is transmitted to the job controller interface 80, and the system is notified of the discrimination result (step 374). Alternatively, from the job controller interface 80 to the job controller 7
2. A request for switching to the decomposer that interprets the language A is sent to 2.
【0099】ステップ344の判定が「失敗」または
「不定」の場合は、次の言語B判別器86が起動され
(ステップ346)、バッファ96内の受信データが言
語Bであるか否かの判別が行われる。If the determination in step 344 is "failure" or "undefined", the next language B discriminator 86 is activated (step 346) and it is determined whether the received data in the buffer 96 is language B or not. Is done.
【0100】その判別結果の判定(ステップ348)が
成功の場合は、言語Bが受信データのプリンタ言語であ
ると判断され、上記と同様の処理が実行される。If the determination result (step 348) is successful, it is determined that the language B is the printer language of the received data, and the same processing as above is executed.
【0101】ステップ348の判定が「失敗」又は「不
定」の場合には、次の言語C判別器88が起動され(ス
テップ350)、バッファ96内の受信データが言語C
であるか否かの判別が行われる。If the determination in step 348 is "failure" or "undefined", the next language C discriminator 88 is activated (step 350), and the received data in the buffer 96 is the language C.
Is determined.
【0102】その判別結果の判定(ステップ352)が
成功の場合は、言語Cが受信データのプリンタ言語であ
ると判断され、上記と同様の処理が実行される。If the determination result (step 352) is successful, it is determined that the language C is the printer language of the received data, and the same processing as above is executed.
【0103】このように、1つの判別器が「成功」と判
断した時点で自動判別処理を完了させることにより、該
当しない制御言語のための判別処理を行わなくて済み、
判別処理を高速化できる。By thus completing the automatic discrimination processing when one discriminator judges "success", it is not necessary to perform discrimination processing for a control language not applicable,
The discrimination process can be speeded up.
【0104】ところが、ステップ352の判定が「失
敗」又は「不定」の場合には、判別器コントローラ82
は、グループ判別制御部94に起動指示を与え、言語D
・言語E判別処理を実行させる(ステップ354)。こ
の言語D・言語E判別処理は、次のようなステップから
構成される。先ず、言語D判別器90により、受信デー
タが言語Dであるか否かの判別処理(ステップ356)
が行われ、その判別結果がグループ判別制御部94に送
出され、そこで一旦保持される。次に、言語E判別器9
2により、受信データが言語Eであるか否かの判別処理
(ステップ358)が行われ、その判別結果がグループ
判別制御部94に送出される。グループ判別制御部94
は、言語D判別器90と言語E判別器92による判別結
果とをルールに照らして比較して、どちらに合致する
か、又はいずれでもないかを判別する(ステップ36
0)。例えば、一方の言語のみの判別が成功し、他方が
「失敗」又は「不定」の場合には、前者の言語を判別結
果とする。また、両者共に「成功」の場合は言語Dを判
別結果とし、両者共に「不定」の場合は、言語Eを判別
結果とする。そして、両者共に「失敗」の場合には判別
結果を「失敗」とし、一方が「不定」で他方が「失敗」
の場合には、判別結果を「不定」とする。However, if the determination in step 352 is "failure" or "undefined", the discriminator controller 82
Gives a start instruction to the group discrimination control unit 94, and the language D
-Language E discrimination processing is executed (step 354). This language D / language E discrimination processing is composed of the following steps. First, the language D discriminator 90 determines whether or not the received data is in the language D (step 356).
Is performed, the determination result is sent to the group determination control unit 94, and is temporarily held there. Next, the language E discriminator 9
2, the discrimination processing of whether or not the received data is the language E (step 358) is performed, and the discrimination result is sent to the group discrimination control unit 94. Group discrimination control unit 94
Compares the discrimination results by the language D discriminator 90 and the language E discriminator 92 in accordance with the rules, and discriminates which one is the same or which is neither (step 36).
0). For example, when only one language is successfully discriminated and the other is “failure” or “indefinite”, the former language is set as the discrimination result. If both are “successful”, the language D is the determination result, and if both are “indefinite”, the language E is the determination result. When both are "failure", the determination result is "failure", one is "undefined" and the other is "failure".
In the case of, the determination result is “undefined”.
【0105】判別結果が出ると、グループ判別制御部9
4は、その判別結果と「成功」の場合にはその言語の別
を判別器コントローラ82に通知する。そして、その判
別結果が判定され(ステップ362)、「成功」の場合
には、言語Dと言語Eのいずれかの言語がプリンタ言語
と判断され(ステップ372)、システムに通知される
(ステップ374)。一方、ステップ362の判定で、
「失敗」又は「不定」の場合には、「全て失敗」かそれ
とも「不定あり」かが判定される(ステップ366)。
全て失敗の場合には、判別結果が「エラー」とされ(ス
テップ370)、「不定あり」の場合には、判別結果が
言語Eとされて(ステップ368)、システムに通知さ
れる(ステップ374)。この言語Eは、前述したよう
にワイヤドットプリンタ制御言語の1つで、単純なテキ
スト出力(文字列と復帰・改行等のコマンドの組み合わ
せ)が可能な言語であるため、かかる処理が可能とな
る。When the discrimination result is obtained, the group discrimination control unit 9
4 notifies the discriminator controller 82 of the discrimination result and, in the case of "success", the language. Then, the determination result is determined (step 362), and if “successful”, either language D or language E is determined to be the printer language (step 372) and the system is notified (step 374). ). On the other hand, in the determination of step 362,
In the case of "failure" or "undefined", it is determined whether "all failed" or "undefined" (step 366).
If all are unsuccessful, the determination result is "error" (step 370), and if "indeterminate", the determination result is language E (step 368) and the system is notified (step 374). ). This language E is one of the wire dot printer control languages as described above, and is a language capable of simple text output (combination of a character string and a command such as carriage return / line feed). Therefore, such processing is possible. .
【0106】このように、相互に共通のコマンドがある
制御言語は1つのグループとして扱い、同じグループ内
の制御言語の判別については、これらの判別器による判
別が全て終了した時に、判別結果を出力するようにした
ので、同じグループ内の制御言語との誤判定が防止され
る。また、当該グループに属さない他の制御言語との誤
判定も避けられる。As described above, the control languages having commands common to each other are treated as one group, and the discrimination results of the control languages in the same group are output when all the discriminations by these discriminators are completed. Since this is done, it is possible to prevent erroneous determination as a control language within the same group. Further, it is possible to avoid misjudgment with other control languages that do not belong to the group.
【0107】さらに、ステップ360やステップ368
において扱ったように、プリンタ言語を特徴づけるコマ
ンドを含まずデータのみの「不定」の場合でも、ルール
として定めた適切な制御言語を当てはめることにより、
印字可能となる。Furthermore, step 360 and step 368
As described in Section 2, even if the data is "indefinite" without the command that characterizes the printer language, by applying the appropriate control language defined as a rule,
Can be printed.
【0108】なお、ステップ360において、同じグル
ープ内の複数の判別器が「成功」を出力した場合には、
グループ判別制御部94は、次のような方法によって判
別結果を出力するようにしてもよい。When a plurality of discriminators in the same group output "success" in step 360,
The group discrimination control unit 94 may output the discrimination result by the following method.
【0109】先ず、個々の制御言語における命令コード
をユニークコマンドと共通コマンドとに分類し、この共
通コマンドについては各判別器毎に重み付テーブルを用
意し、入力された制御言語の命令コードと一致する毎に
各判別器毎にそれらに設定された重みを加算していく。
そして、最終的な加算結果を判別結果「成功」の補助情
報として利用する。即ち、グループ内のすべての判別器
の加算結果が出た後、「成功」を検出した判別器が複数
あった場合、それら判別器毎の加算結果の大小でグルー
プのどの制御言語であるかを決定するという方法であ
る。共通コマンドは、制御上の意味、重要度が各制御言
語毎に異なるため、この方法によって、グループ内の識
別ができ、判別精度を向上させることができる。First, the instruction codes in each control language are classified into a unique command and a common command. For this common command, a weighting table is prepared for each discriminator, and the instruction code of the input control language is matched. Each time, the weights set for each discriminator are added.
Then, the final addition result is used as auxiliary information for the determination result “success”. That is, if there are multiple discriminators that have detected “success” after the addition results of all the discriminators in the group have been output, the control language of the group is determined by the size of the addition result for each discriminator. It is a method of making a decision. Since the common command has different meanings and importance in control for each control language, this method enables identification within a group and improves discrimination accuracy.
【0110】さらにグループ内の制御言語群において、
予め優先順序を付けておき、グループ内でのすべての判
別器の結果が出た後、矛盾する命令コードを含んでいる
ことを検出した判別器を除き、この優先順序に従ってグ
ループのどの制御言語であるかを決定する方法も有効で
ある。この方法は、特にある制御言語にとって共通コマ
ンド(群)の制御上の意味が他の制御言語より重要であ
る場合に適用できる。即ち、グループ内で「成功」を検
出した判別器が複数あった場合、このことは入力データ
として共通のコマンドを含んでいることを意味する。よ
って、共通コマンド(群)の制御上の意味が他の制御言
語より重要である場合には、優先順序を確からしさの尺
度とみなすことができる。Further, in the control language group in the group,
Prioritize in advance, and after all discriminators in the group have obtained the results, except for the discriminator that detects that the discriminant instruction code is included, in which control language of the group according to this priority order A method of determining if there is also effective. This method can be applied especially when the control meaning of the common command (s) is more important for one control language than another control language. That is, when there are a plurality of discriminators that have detected “success” in the group, this means that a common command is included as input data. Therefore, when the control meaning of the common command (group) is more important than other control languages, the priority order can be regarded as a measure of certainty.
【0111】この方法によれば、前述した方法と比べ
て、ユニークコマンドと共通コマンドの分類、重み検
索、加算処理が省略でき、処理時間が短縮されるという
利点がある。According to this method, the classification of the unique command and the common command, the weight search, and the addition processing can be omitted and the processing time can be shortened as compared with the above-mentioned method.
【0112】また、上記の例では、各制御言語を判別す
るための判別ルールは、すべてコマンドの有無と命令コ
ードの矛盾の有無の検索であったが、制御言語毎に各々
定められた判別ルールを適用するようにしてもよい。即
ち、各判別器において実行される判別ルールをその対象
とする制御言語の判別にとって最適な判別ルールとする
ものであり、制御言語の種類によって判別ルールは異な
ったり同じものであったりする。これにより、無用な検
索の必要性などが少なくなり、処理時間の短縮化が図れ
ると共に、当該制御言語に最適な判別ルールによって判
別精度が向上するという更なる効果が得られる。Further, in the above example, the discrimination rules for discriminating each control language are all searches for the presence / absence of commands and the inconsistency of instruction codes. However, the discrimination rules determined for each control language are the same. May be applied. That is, the discrimination rule executed in each discriminator is the optimal discrimination rule for discrimination of the target control language, and the discrimination rule may be different or the same depending on the type of control language. As a result, the need for an unnecessary search is reduced, the processing time can be shortened, and the discrimination accuracy can be improved by the discrimination rule most suitable for the control language.
【0113】このような制御言語毎に異なる判別ルール
の例について、図12と図13に示す。12 and 13 show examples of discrimination rules that are different for each control language.
【0114】図12のフローチャートは、言語A判別器
84における判別ルールを示したものであり、この判別
ルールは、コマンドの出現順序によって言語Aを特定す
るというものである。言語Aでは、コマンドをセグメン
トと呼ばれる階層でレベル受信しているので1番目と2
番目に受信されるコマンドが決まっており、そのため、
コマンドの出現順序により言語が特定できる。The flowchart of FIG. 12 shows the discrimination rule in the language A discriminator 84, and this discrimination rule specifies the language A by the appearance order of the commands. In language A, commands are received in layers called segments, so the first and second
The command to be received second is fixed, so
The language can be specified by the order of appearance of commands.
【0115】図12によれば、先ず、入力データを構成
するコードが読み取られ、コマンド区切りチェックが行
われることにより、1番目のコマンドが取得される(ス
テップ376前段)。この時、コメント文は読み捨て処
理される(ステップ376後段)。According to FIG. 12, first, the code forming the input data is read, and the command delimiter check is performed, whereby the first command is acquired (the first stage of step 376). At this time, the comment text is read and discarded (the latter stage of step 376).
【0116】次に、判別すべきデータが終了したか否か
がチェックされる(ステップ378)。データが終了し
た場合には、判別結果は不定とされ(ステップ40
4)、言語A判別器84の処理が終了される。Next, it is checked whether or not the data to be discriminated has been completed (step 378). When the data is completed, the determination result is undefined (step 40).
4) The processing of the language A discriminator 84 is ended.
【0117】終了していない場合は、1番目のコマンド
チェックが行われ(ステップ380)、言語Aのデータ
において1番目に出現すべきコマンドとして正しいか否
かが判定される(ステップ382)。If the command has not been completed, the first command check is performed (step 380), and it is determined whether or not the command to appear first in the language A data is correct (step 382).
【0118】1番目のコマンドチェックの結果がエラー
であった場合には、判別結果は失敗とされ(ステップ4
02)、言語A判別器84の処理が終了される。If the result of the first command check is an error, the determination result is a failure (step 4
02), the processing of the language A discriminator 84 is ended.
【0119】1番目のコマンドチェックの結果が正しか
った場合には、読み取られたコードに対してパラメータ
区切りチェックが行われることにより、パラメータが取
得される(ステップ384前段)。この時もコメント文
は読み捨て処理される(ステップ384後段)。If the result of the first command check is correct, a parameter delimitation check is performed on the read code to acquire the parameter (previous stage of step 384). At this time, the comment sentence is also read and discarded (the latter stage of step 384).
【0120】次に、判別すべきデータが終了したか否か
がチェックされる(ステップ386)。データが終了し
た場合には、判別結果は不定とされ(ステップ40
4)、言語A判別器84の処理が終了される。Next, it is checked whether or not the data to be discriminated has been completed (step 386). When the data is completed, the determination result is undefined (step 40).
4) The processing of the language A discriminator 84 is ended.
【0121】終了していない場合は、1番目のコマンド
のパラメータチェックが行われ(ステップ388)、言
語Aのデータにおいて1番目に出現すべきコマンドのパ
ラメータとして正しいか否かが判定される(ステップ3
90)。If not completed, the parameter check of the first command is performed (step 388), and it is determined whether the parameter of the command that should appear first in the language A data is correct (step). Three
90).
【0122】パラメータチェックの結果がエラーであっ
た場合には、判別結果は失敗とされ(ステップ40
2)、言語A判別器84の処理が終了される。If the parameter check result is an error, the determination result is a failure (step 40).
2) The processing of the language A discriminator 84 is ended.
【0123】パラメータチェックの結果が正しかった場
合には、2番目のコマンドが取得される(ステップ39
2)。この2番目のコマンドの取得方法も1番目のコマ
ンドと同様である。If the result of the parameter check is correct, the second command is acquired (step 39).
2). The method of acquiring the second command is similar to that of the first command.
【0124】次に、判別すべきデータが終了したか否か
がチェックされる(ステップ394)。データが終了し
た場合には、判別結果は不定とされ(ステップ40
4)、言語A判別器84の処理が終了される。Next, it is checked whether or not the data to be discriminated has been completed (step 394). When the data is completed, the determination result is undefined (step 40).
4) The processing of the language A discriminator 84 is ended.
【0125】終了していない場合は、2番目のコマンド
チェックが行われ(ステップ396)、言語Aのデータ
において2番目に出現すべきコマンドとして正しいか否
かが判定される(ステップ398)。If not completed, the second command check is performed (step 396), and it is determined whether or not the command to appear second in the data of language A is correct (step 398).
【0126】2番目のコマンドチェックの結果がエラー
であった場合には、判別結果は失敗とされ(ステップ4
02)、言語A判別器84の処理が終了される。If the result of the second command check is an error, the determination result is a failure (step 4
02), the processing of the language A discriminator 84 is ended.
【0127】2番目に来るべきコマンドが正しければ、
判別結果は「成功」とされ、制御言語は言語Aとみなさ
れる(ステップ400)。If the second command to come is correct,
The determination result is "success", and the control language is regarded as language A (step 400).
【0128】以上のように、コマンドの出現順序によっ
て言語を判別する場合には、単に当該言語に特有なコマ
ンドのみを検索する場合と比べて、たまたまデータ列と
して当該コマンドと同じコードを持っている場合との混
同が避けられるので、判別精度が大幅に向上する。しか
も、図12に示したように、コマンドの出現する順序や
位置が異なれば、その時点で直ちに判別結果を「失敗」
として当該判別器の処理を終了できるので、処理時間の
短縮化も可能となる。As described above, when a language is discriminated by the order of appearance of commands, it happens to have the same code as the command as a data string, as compared with the case where only the command peculiar to the language is retrieved. Since the confusion with the case can be avoided, the discrimination accuracy is significantly improved. Moreover, as shown in FIG. 12, if the order or position of the appearance of the command is different, the determination result is immediately "failed" at that time.
As a result, the processing of the discriminator can be completed, and the processing time can be shortened.
【0129】次に、図13のフローチャートは、言語C
判別器88における判別ルールを示したものであり、こ
の判別ルールは、言語Cのコマンドの出現数が所定数以
上になったことによって言語Cを特定するというもので
ある。Next, the flowchart of FIG. 13 shows the language C.
The discrimination rule in the discriminator 88 is shown. The discrimination rule specifies the language C when the number of appearances of the command of the language C exceeds a predetermined number.
【0130】図13によれば、先ず、コマンドの取得が
行われる(ステップ406前段)。コマンドの取得方法
は、アルファベットの検索を行い、検出できたら次の1
バイトまでを取り出す。即ち、2バイト毎のデータを判
別すべきデータより取得する。また、検出したものがア
ルファベットではなく、ESC(1Bh)コードである
場合は、次の1バイトが(2Eh)であることを確認
し、さらに次の1バイトを取り出す。従って、判別デー
タより3バイトを取得する。According to FIG. 13, first, the command is acquired (the first stage of step 406). The command can be obtained by searching the alphabet, and if found
Take out up to a byte. That is, the data of every 2 bytes is acquired from the data to be discriminated. If the detected character is not an alphabet but an ESC (1Bh) code, it is confirmed that the next 1 byte is (2Eh), and the next 1 byte is extracted. Therefore, 3 bytes are acquired from the discrimination data.
【0131】次に、判別データが終了したか否かがチェ
ックされる(ステップ408)。データが終了した場合
には、判別結果は不定とされ(ステップ428)、言語
C判別器88の処理が終了される。Next, it is checked whether or not the discrimination data has ended (step 408). When the data is completed, the determination result is indefinite (step 428), and the processing of the language C discriminator 88 is terminated.
【0132】終了していない場合は、コマンドチェック
が行われ(ステップ410)、言語Cのコマンドとして
正しいか否かが判定される(ステップ412)。If not completed, a command check is performed (step 410) and it is determined whether or not the command of language C is correct (step 412).
【0133】コマンドチェックの結果がエラーであった
場合、即ち、コマンド取得がエラー終了又は取得された
コマンドが言語Cのものではないと判定された場合に
は、判別結果は失敗とされ(ステップ414)、言語C
判別器88の処理が終了される。If the result of the command check is an error, that is, if the command acquisition ends in error or it is determined that the acquired command does not belong to language C, the determination result is a failure (step 414). ), Language C
The processing of the discriminator 88 is ended.
【0134】コマンドチェックの結果が正しかった場合
には、コマンド数のカウントアップ(ステップ416)
が行われる。なお、このコマンド数は、言語C判別器8
8の起動時にゼロクリアーされている。If the result of the command check is correct, the command number is counted up (step 416).
Is done. Note that this command count is determined by the language C discriminator 8
It has been cleared to zero when starting up 8.
【0135】次に、コマンド数のカウント値が5に達し
たか否かが判定される(ステップ418)。肯定判定、
即ち、コマンド数のカウント値が5に達した場合は、判
別結果は「成功」とされ、制御言語は言語Cとして扱わ
れる(ステップ420)。Next, it is determined whether or not the count value of the number of commands has reached 5 (step 418). Affirmative judgment,
That is, when the count value of the number of commands reaches 5, the determination result is "success" and the control language is treated as the language C (step 420).
【0136】否定判定の場合は、コマンドチェックを行
ったコマンドが文字をパラメータとするコマンドか否か
が判定される(ステップ422)。文字パラメータのコ
マンドではない場合には、ステップ406に戻って判別
データから次のコマンド取得が行われ、いずれかの判別
結果が出るまで同様の処理が繰り返される。In the case of a negative determination, it is determined whether or not the command for which the command check is performed is a command having a character as a parameter (step 422). If the command is not a character parameter command, the process returns to step 406 to acquire the next command from the determination data, and the same processing is repeated until any determination result is obtained.
【0137】文字パラメータのコマンドの場合には、ス
テップ406のコマンド取得でパラメータをコマンドと
して解釈しないようにするため、文字パラメータの読み
捨て処理が行われる(ステップ424)。In the case of the command of the character parameter, the character parameter is read and discarded so that the parameter is not interpreted as a command in the command acquisition in step 406 (step 424).
【0138】このパラメータの読み捨て処理で、判別デ
ータが終了したか否かの判定が行われ(ステップ42
6)、終了した場合には、判別結果を「不定」として言
語C判別器88の処理を終了させる。終了していない場
合には、ステップ406に戻って判別データから次のコ
マンド取得が行われ、いずれかの判別結果が出るまで同
様の処理が繰り返される。In this parameter read-and-discard processing, it is judged whether or not the judgment data has ended (step 42).
6) When the processing is finished, the determination result is set to "undefined", and the processing of the language C discriminator 88 is ended. If not completed, the process returns to step 406, the next command is acquired from the determination data, and the same processing is repeated until any determination result is obtained.
【0139】以上のように、コマンドの出現数によって
言語を判別する場合には、単に当該言語に特有なコマン
ドの有無のみを検出する場合と比べて、判別精度が向上
するという利点がある。このような判別ルールを採用す
る場合において、図13で示したようにパラメータの読
み捨て処理を行えば、たまたまデータ列として当該コマ
ンドと同じコードを持っている場合との混同が避けられ
るので、判別精度が低下するおそれはなくなる。As described above, when the language is discriminated by the number of appearances of the command, there is an advantage that the discrimination accuracy is improved as compared with the case where only the presence or absence of the command peculiar to the language is detected. In the case of adopting such a discrimination rule, if the parameter read-and-discard processing is performed as shown in FIG. 13, confusion with the case where the data string happens to have the same code as the command concerned can be avoided. Is no longer a concern.
【0140】また、上記のようにコマンドの出現数によ
って判別される制御言語同士がグループを形成する場
合、例えば上記言語Dと言語Eのような場合には、前述
したように、2つの判別を別々に行うと誤判別の可能性
が高くなる。例えば、言語Dのコマンドには、言語E判
別器92でエラーを発生しないものが存在するため、言
語Eは言語Dの判別を行わないと、最終的に言語Eであ
ると判別することができない。Further, when the control languages which are discriminated by the number of appearances of commands form a group as described above, for example, when the languages D and E are mentioned above, two discriminations are made as described above. If they are performed separately, the possibility of misjudgment increases. For example, some language D commands do not cause an error in the language E discriminator 92, so that the language E cannot be finally discriminated as the language E unless the language D is discriminated. .
【0141】かかるグループ判別の場合の最終的な判定
処理の流れを具体的に図14のフローチャートに示す。
なお、言語D判別器90と言語E判別器92の処理は、
コマンドのエラーチェックとコマンド数のカウントのみ
である。The flow of the final determination process in the case of such group determination is specifically shown in the flowchart of FIG.
The processes of the language D discriminator 90 and the language E discriminator 92 are
Only command error checking and command count counting.
【0142】図14によれば、先ず、言語D判別器90
によって、入力データが言語Dで記述されているか否か
の判別処理が行われる(ステップ430)。処理が終わ
ると、言語D判別器90がエラー終了したか否かが判定
され(ステップ432)、エラー終了の場合は、次の言
語E判別器92による判別処理に移行し(ステップ43
8)、エラー終了ではない場合は、言語D特有のコマン
ドの有無がチェックされる(ステップ434)。According to FIG. 14, first, the language D discriminator 90
Thus, it is determined whether the input data is described in the language D (step 430). When the processing is completed, it is determined whether or not the language D discriminator 90 ends in error (step 432), and if the error ends, the process moves to the discrimination processing by the next language E discriminator 92 (step 43).
8) If it is not an error end, the presence or absence of a command peculiar to language D is checked (step 434).
【0143】言語D特有のコマンドがある場合には、判
別結果は「成功」とされ、制御言語は言語Dとして扱わ
れる。一方、言語D特有のコマンドがない場合には、次
の言語E判別器92による判別処理に移行する(ステッ
プ438)。When there is a command peculiar to language D, the determination result is "success", and the control language is treated as language D. On the other hand, if there is no command peculiar to language D, the process proceeds to the discrimination process by the next language E discriminator 92 (step 438).
【0144】言語E判別器92によって、入力データが
言語Dで記述されているか否かの判別処理が行われ(ス
テップ438)、当該処理が終わると、言語E判別器9
2がエラー終了したか否かが判定される(ステップ44
0)。エラー終了の場合は、判別結果は「失敗」とされ
(ステップ446)、エラー終了ではない場合は、言語
E特有のコマンドの有無がチェックされる(ステップ4
42)。The language E discriminator 92 discriminates whether or not the input data is described in the language D (step 438). When the process is finished, the language E discriminator 9 is executed.
It is determined whether or not 2 ends in error (step 44).
0). If it is an error end, the determination result is "failure" (step 446). If it is not an error end, the presence or absence of a command specific to the language E is checked (step 4).
42).
【0145】言語E特有のコマンドがある場合には、判
別結果は「成功」とされ、制御言語は言語Eとして扱わ
れる。一方、言語E特有のコマンドがない場合には、判
別結果は「不定」とされる(ステップ448)。When there is a command specific to the language E, the determination result is "success" and the control language is treated as the language E. On the other hand, if there is no command specific to language E, the determination result is "undefined" (step 448).
【0146】このように、グループに属する制御言語群
の最終的な判定を行うことにより、グループ内の誤判別
を避けることができ、判定精度を向上させることができ
る。By thus making the final judgment of the control language group belonging to the group, erroneous judgment within the group can be avoided and the judgment accuracy can be improved.
【0147】なお、上記のように各判別器毎に判別ルー
ルを有し、かつ、「成功」を出力した時点で判別処理を
終了させるような場合には、処理時間の速い判別器の順
に処理を進めていくようにすると、処理時間の短縮化に
資することとなる。例えば、コマンドの出現順序をチェ
ックする方法が最も処理が速く、以下にコマンド数によ
るチェック、ユニークコマンドの有無のチェックとなる
ので、各判別器による判別ルールの起動をこの順にすれ
ば、最も処理の繰り返される回数の多い先頭付近の判別
器の処理時間が短いので、平均的な判別処理時間は短縮
される。In the case where each discriminator has a discrimination rule as described above and the discrimination processing is ended when "success" is output, the discriminators having the fastest processing time are processed in order. If this is done, the processing time will be shortened. For example, the method of checking the appearance order of commands is the fastest, and the following check is based on the number of commands and whether or not there is a unique command. Therefore, if the discrimination rules are activated by each discriminator in this order, Since the processing time of the discriminator near the beginning, which is frequently repeated, is short, the average discrimination processing time is shortened.
【0148】また、各判別器を起動させる順番は不変と
してもよいが、可変にすることも可能である。例えば、
直前に判別したものを先に判別する方法、どの制御言語
かの判別結果をカウントしておき、カウント値の大きい
順に判別する方法、ユーザがコマンド又は操作パネルに
よって判別する順番を指定する方法等がある。このよう
に順番を可変にすることにより、より処理時間を短縮化
させることができる。The order of activating each discriminator may be invariable, but may be variable. For example,
There are a method of first determining the one determined immediately before, a method of counting the determination result of which control language and determining in descending order of the count value, a method in which the user specifies the order of determination by the command or the operation panel, etc. is there. By making the order variable in this way, the processing time can be further shortened.
【0149】(第2実施例)第1実施例では、各判別器
毎、即ち制御言語毎に、1つの判別ルールを有する場合
の例について詳述したが、各判別器毎に複数の判別ルー
ルを適用するようにしてもよい。これを第2実施例とし
て以下に開示する。なお、プリンタ装置の構成、ソフト
ウェアの構成については、第1実施例と同様であるの
で、同一の番号を付して説明を省略する。(Second Embodiment) In the first embodiment, an example in which one discriminator is provided for each discriminator, that is, for each control language has been described in detail. However, a plurality of discriminant rules is provided for each discriminator. May be applied. This will be disclosed below as a second embodiment. Since the configuration of the printer device and the configuration of the software are the same as those in the first embodiment, the same numbers are assigned and the description is omitted.
【0150】第2実施例では、各判別器毎に複数の判別
ルールを有している。例えば言語A判別器84では、デ
ータの1番目及び2番目のコマンド順序が正しい時、又
は、言語Aに特定のコマンド群が検出された時に言語A
を確定する判別ルールを持っている。従って、判別ルー
ルが適用されるコマンド群が判別ルール毎に異なり、そ
れぞれに対応するグループを構成している。例えば、言
語A判別器84の場合には、コマンド群は表1のように
分類される。In the second embodiment, each discriminator has a plurality of discrimination rules. For example, in the language A discriminator 84, when the first and second command sequences of the data are correct, or when a command group specific to the language A is detected, the language A
Has a discrimination rule to determine Therefore, the command group to which the discrimination rule is applied differs for each discrimination rule, and forms a corresponding group. For example, in the case of the language A discriminator 84, the command group is classified as shown in Table 1.
【0151】なお、各判別器は、各判別器毎に与えられ
た判別ルールに従って、読み取られたコマンドを各グル
ープに分類する機能を持っている。Each discriminator has a function of classifying the read commands into each group according to the discrimination rule given to each discriminator.
【表1】 表1のグループ分類に基づく言語A判別器84の動作に
ついて、図15のフローチャートで説明する。[Table 1] The operation of the language A discriminator 84 based on the group classification in Table 1 will be described with reference to the flowchart of FIG.
【0152】コマンドの出現順序を検知するため、判別
開始時にコマンド数カウンターが初期化される(ステッ
プ450)。In order to detect the appearance order of the commands, the command number counter is initialized at the start of discrimination (step 450).
【0153】次に、入力データから文字列が取得される
(ステップ452)。文字列とは、言語Aが定義するデ
リミターが検出されるまでの一続きのデータ列をいう。Next, a character string is obtained from the input data (step 452). The character string is a series of data strings until the delimiter defined by the language A is detected.
【0154】文字列が取得されている間にデータが終了
したか否かが判定され(ステップ454)、データが終
了した場合には、判別結果が「不定」とされ(ステップ
472)、判別が終了する。It is determined whether or not the data is completed while the character string is being acquired (step 454). If the data is completed, the determination result is "undefined" (step 472), and the determination is made. finish.
【0155】データが終了しない場合には、取得された
コマンドが正常であるか否かがチェックされ(ステップ
456)、正常なコマンドが検出できなければ、判別結
果が「失敗」とされ(ステップ474)、判別が終了す
る。If the data has not ended, it is checked whether the acquired command is normal (step 456). If a normal command cannot be detected, the determination result is "failure" (step 474). ), The determination is completed.
【0156】正常なコマンドが検出できたら、コマンド
数カウンターに1が加算される(ステップ458)。When a normal command is detected, 1 is added to the command number counter (step 458).
【0157】次に、検出されたコマンドがグループに
属するか否かがチェックされる(ステップ460)。グ
ループに属するコマンド、即ち即座に言語を確定すべ
きコマンドであれば、判別結果が「成功」とされ(ステ
ップ476)、判別が終了する。Next, it is checked whether or not the detected command belongs to the group (step 460). If the command belongs to the group, that is, if the command is to immediately determine the language, the determination result is "success" (step 476), and the determination ends.
【0158】グループに属さないコマンドであれば、
取得されたコマンドの出現順序が1番目か2番目かによ
って分岐する(ステップ462)。If the command does not belong to a group,
It branches depending on whether the appearance order of the acquired command is the first or the second (step 462).
【0159】検出されたコマンドの出現順序が1番目で
あり、かつ、当該コマンドがグループに属するコマン
ド、即ちデータの1番目にあるべきコマンドであれば
(ステップ464肯定判定)、次のコマンドを取得する
ために文字列取得処理(ステップ452)に戻る。ま
た、検出されたコマンドがデータの1番目にあるにもか
かわらず、グループに属さないコマンド、即ちデータ
の1番目にあるべきではないコマンドであれば(ステッ
プ464否定判定)、判別結果が「失敗」とされ、判別
処理が終了する。If the detected command has the first appearance order and the command belongs to the group, that is, should be the first command in the data (step 464 affirmative judgment), the next command is acquired. To do so, the process returns to the character string acquisition process (step 452). If the detected command is the first command in the data, but the command does not belong to the group, that is, the command should not be the first command in the data (No determination in step 464), the determination result is “failure”. The determination processing ends.
【0160】検出されたコマンドの出現順序が2番目で
あり、かつ、当該コマンドがグループに属するコマン
ド、即ちデータの2番目にあるべきコマンドであれば
(ステップ466肯定判定)、判別結果が「成功」とさ
れ、言語Aが制御言語として扱われる。また、検出され
たコマンドがデータの2番目にあるにもかかわらず、グ
ループに属さないコマンド、即ちデータの2番目にあ
るべきではないコマンドであれば(ステップ466否定
判定)、判別結果が「失敗」とされ、判別処理が終了す
る。If the order of appearance of the detected commands is the second, and the command is a command belonging to a group, that is, a command that should be the second command in the data (Yes in step 466), the determination result is "successful". , And the language A is treated as a control language. Even if the detected command is the second command in the data, if the command does not belong to the group, that is, the command should not be the second command in the data (No judgment at step 466), the determination result is “failure”. The determination processing ends.
【0161】以上が第2実施例に係る言語A判別器84
の動作であるが、このような処理を行うことによって、
判別に要する平均時間を短縮化できるという効果があ
る。即ち、第1実施例では、言語Aを出現順序のみによ
って判別し、少なくとも2データを検出しなければなら
なかったところ、第2実施例では、例えば、データ列中
の1番目に言語Aにのみ特有のコマンドがあった場合、
この時点で判別結果を出すことができ、1データの検出
で済む。また、検知すべきデータが少なくなるというこ
とは、データが途中で終了して判別結果が不定となるお
それも少なくなり、判別精度が向上するという利点もあ
る。The above is the language A discriminator 84 according to the second embodiment.
It is the operation of, but by performing such processing,
There is an effect that the average time required for the discrimination can be shortened. That is, in the first embodiment, the language A must be discriminated only by the appearance order and at least two data must be detected. In the second embodiment, for example, only the first language A in the data string is to be detected. If there is a specific command,
At this point, the determination result can be obtained, and only one data need be detected. In addition, the fact that there is less data to be detected also has the advantage that there is less risk that the data will end halfway and the determination result will be indeterminate, and that the determination accuracy will improve.
【0162】次に言語Cの判別例について説明する。言
語C判別器88の判別ルールは、第1実施例では、コマ
ンドの出現数が基準であったが、第2実施例では、これ
に加えて、言語Cにのみ特有のコマンドによる判別も実
行できるようになっている。従って、言語Cのコマンド
群は表2のように分類される。Next, an example of determining the language C will be described. In the first embodiment, the discrimination rule of the language C discriminator 88 is based on the number of appearances of commands, but in the second embodiment, in addition to this, discrimination by a command peculiar to only the language C can be executed. It is like this. Therefore, the command group of language C is classified as shown in Table 2.
【0163】[0163]
【表2】 表2のグループ分類に基づく言語C判別器88の動作に
ついて、図16のフローチャートで説明する。[Table 2] The operation of the language C discriminator 88 based on the group classification in Table 2 will be described with reference to the flowchart of FIG.
【0164】コマンドの出現順序を検知するため、判別
開始時にコマンド数カウンターが初期化される(ステッ
プ478)。In order to detect the order of appearance of commands, the command number counter is initialized at the start of discrimination (step 478).
【0165】次に、入力データから文字列が取得される
(ステップ480)。なお、文字列とは、言語Cが定義
するデリミターが検出されるまでの一続きのデータ列を
いう。Next, a character string is obtained from the input data (step 480). The character string is a continuous data string until the delimiter defined by the language C is detected.
【0166】文字列が取得されている間にデータが終了
したか否かが判定され(ステップ482)、データが終
了した場合には、判別結果が「不定」とされ(ステップ
494)、判別が終了する。It is judged whether or not the data is ended while the character string is being acquired (step 482). If the data is ended, the judgment result is "undefined" (step 494), and the judgment is made. finish.
【0167】データが終了しない場合には、取得された
コマンドが正常であるか否かがチェックされ(ステップ
484)、正常なコマンドが検出できなければ、判別結
果が「失敗」とされ(ステップ496)、判別が終了す
る。When the data is not completed, it is checked whether or not the acquired command is normal (step 484). If the normal command cannot be detected, the determination result is "failure" (step 496). ), The determination is completed.
【0168】正常なコマンドが検出できたら、当該コマ
ンドがグループに属するか否かがチェックされる(ス
テップ486)。グループに属するコマンド、即ち即
座に言語を確定すべきコマンドであれば、判別結果が
「成功」とされ(ステップ498)、判別が終了する。
この場合、制御言語は言語Cとして扱われる。When a normal command is detected, it is checked whether the command belongs to the group (step 486). If the command belongs to the group, that is, if the command is to immediately determine the language, the determination result is "success" (step 498), and the determination ends.
In this case, the control language is treated as language C.
【0169】グループに属するコマンド、即ち出現数
をカウントすべきコマンドの場合、コマンド数カウンタ
ーに1が加えられる(ステップ488)。When the command belongs to the group, that is, the command whose number of appearances is to be counted, 1 is added to the command number counter (step 488).
【0170】次に、コマンド数カウンターのコマンド数
が5に達したか否かが判定され(ステップ490)、5
にに達していない場合には、文字列取得処理(ステップ
480)に戻って同様の処理が繰り返される。Next, it is judged whether or not the number of commands in the command number counter has reached 5 (step 490), 5
If not, the process returns to the character string acquisition process (step 480) and the same process is repeated.
【0171】コマンド数が5に達した場合には、判別結
果が「成功」とされ(ステップ492)、制御言語が言
語Cとして扱われる。When the number of commands reaches 5, the determination result is "success" (step 492), and the control language is treated as the language C.
【0172】以上が第2実施例に係る言語C判別器88
の動作であるが、このような処理を行うことによって、
判別に要する平均時間を短縮化できるという効果があ
る。即ち、第1実施例では、言語Cを出現数のみによっ
て判別し、5つのコマンドを検出しなければならなかっ
たところ、第2実施例では、例えば、5つのコマンドを
検出する前に言語Cにのみ特有のコマンドがあった場
合、この時点で判別結果を出すことができる。また、検
知すべきデータが少なくなるということは、データが途
中で終了して判別結果が不定となるおそれも少なくな
り、判別精度が向上するという利点もある。The above is the language C discriminator 88 according to the second embodiment.
It is the operation of, but by performing such processing,
There is an effect that the average time required for the discrimination can be shortened. That is, in the first embodiment, the language C must be discriminated only by the number of appearances and five commands must be detected. However, in the second embodiment, for example, the language C is detected before five commands are detected. If there is a unique command only, the determination result can be issued at this point. In addition, the fact that there is less data to be detected also has the advantage that there is less risk that the data will end halfway and the determination result will be indeterminate, and that the determination accuracy will improve.
【0173】以上が、本発明に係る実施例であるが、上
記の例に限定されるわけではない。例えば、上記実施例
で示した制御言語を判別する判別器は、上記の制御言語
の種類や数に限定されない。また、判別ルールも、出現
順序やコマンド数のチェックに限られず、例えば、各コ
マンドについての重み付け加算結果や優先順序を利用す
るようにしてもよい。The above is an embodiment of the present invention, but the present invention is not limited to the above embodiment. For example, the discriminator for discriminating the control language shown in the above embodiment is not limited to the type and number of the control language. Further, the discrimination rule is not limited to the check of the appearance order and the number of commands, and for example, the weighted addition result or priority order of each command may be used.
【0174】さらに、回路構成、機能ブロック、ソフト
ウェアの構成、制御や入出力の流れ等も任意好適に変更
可能である。例えば、自動判別処理等をゲートアレイで
実現することによって、より高速化を達成することもで
きる。Furthermore, the circuit configuration, functional blocks, software configuration, control, input / output flow, etc. can be arbitrarily changed. For example, by realizing the automatic discrimination processing and the like with a gate array, higher speed can be achieved.
【0175】[0175]
【発明の効果】以上詳細に説明したように、請求項1の
発明では、グループ毎に互いに異なる判別ルールを適用
することにより、入力データを記述する制御言語の種類
を決定するようにしたので、それぞれの制御言語に最適
な判別ルールを各々設定でき、判別に要する処理時間の
短縮化と判別精度の向上が同時に達成できる、という効
果が得られる。As described in detail above, according to the first aspect of the present invention, the type of control language that describes input data is determined by applying different discrimination rules to each group. It is possible to set the optimum discrimination rule for each control language, and it is possible to reduce the processing time required for the discrimination and improve the discrimination accuracy at the same time.
【0176】請求項2の発明では、グループ毎の判別ル
ールを、判別処理速度の速い順番に適用するようにした
ので、判別に要する処理時間を短縮できる、という効果
が得られる。According to the second aspect of the present invention, the discrimination rules for each group are applied in the order in which the discrimination processing speed is high. Therefore, the processing time required for discrimination can be shortened.
【0177】請求項3の発明では、コード別の出現順序
に基づいて制御言語の種類を決定する判別ルールを少な
くとも1回適用するようにしたので、単純にユニークな
コマンドの有無による判別よりも大幅に判別精度を向上
させることができる、という効果が得られる。According to the third aspect of the invention, the discrimination rule for determining the type of control language based on the appearance order of each code is applied at least once. Therefore, it is more significant than the discrimination based on the presence / absence of a unique command. In addition, it is possible to improve the discrimination accuracy.
【0178】請求項4の発明では、コード別の出現数に
基づいて制御言語の種類を決定する判別ルールを少なく
とも1回適用するようにしたので、単にユニークなコマ
ンドの有無に基づく判別ルールよりも誤判定の可能性を
少なくさせることができる、という効果が得られる。According to the fourth aspect of the invention, the discrimination rule for determining the type of control language based on the number of occurrences of each code is applied at least once. Therefore, the discrimination rule based on the presence / absence of a unique command is simply used. The effect that the possibility of erroneous determination can be reduced is obtained.
【図1】第1実施例に係る画像記録装置の概略の構成を
示すブロック図である。FIG. 1 is a block diagram showing a schematic configuration of an image recording apparatus according to a first embodiment.
【図2】第1実施例に係る画像記録装置の回路構成図で
ある。FIG. 2 is a circuit configuration diagram of the image recording apparatus according to the first embodiment.
【図3】第1実施例に係る画像記録装置のソフトウェア
の構造を示す図である。FIG. 3 is a diagram illustrating a software structure of the image recording apparatus according to the first embodiment.
【図4】アプリケーション・プログラムにおける基本的
な機能ブロック図である。FIG. 4 is a basic functional block diagram in an application program.
【図5】プリンタ言語固定モードにおける画像記録装置
の処理の流れを示すフローチャートである。FIG. 5 is a flowchart showing a processing flow of the image recording apparatus in a printer language fixed mode.
【図6】プリンタ言語固定モードにおける画像記録装置
の機能ブロック図である。FIG. 6 is a functional block diagram of the image recording apparatus in a printer language fixed mode.
【図7】自動判別モードにおける画像記録装置の処理の
流れを示すフローチャートである。FIG. 7 is a flowchart showing a processing flow of the image recording apparatus in the automatic determination mode.
【図8】自動判別モードで正常動作した場合における画
像記録装置の機能ブロック図である。FIG. 8 is a functional block diagram of the image recording device in the case where the image recording apparatus normally operates in the automatic determination mode.
【図9】自動判別モードでアボート要求が出された場合
における画像記録装置の機能ブロック図である。FIG. 9 is a functional block diagram of the image recording apparatus when an abort request is issued in the automatic determination mode.
【図10】自動判別パーサの構成を示したブロック図で
ある。FIG. 10 is a block diagram showing a configuration of an automatic discrimination parser.
【図11】自動判別パーサの処理の流れを示したフロー
チャート図である。FIG. 11 is a flowchart showing a processing flow of an automatic discrimination parser.
【図12】言語A判別器84における判別ルールの流れ
を示したフローチャートである。12 is a flowchart showing the flow of discrimination rules in the language A discriminator 84. FIG.
【図13】言語C判別器88における判別ルールの流れ
を示したフローチャートである。13 is a flowchart showing the flow of discrimination rules in the language C discriminator 88. FIG.
【図14】グループを形成する言語Dと言語Eの最終的
な判別ルールの流れを示したフローチャートである。FIG. 14 is a flowchart showing the flow of a final discrimination rule for languages D and E forming a group.
【図15】第2実施例に係る言語A判別器84における
判別ルールの流れを示したフローチャートである。FIG. 15 is a flowchart showing a flow of discrimination rules in the language A discriminator 84 according to the second example.
【図16】第2実施例に係る言語C判別器88における
判別ルールの流れを示したフローチャートである。FIG. 16 is a flowchart showing the flow of discrimination rules in the language C discriminator 88 according to the second example.
70 デコンポーザ 78 自動判別パーサ 82 判別器コントローラ 84 言語A判別器 86 言語B判別器 88 言語C判別器 90 言語D判別器 92 言語E判別器 94 グループ判別制御部 70 Decomposer 78 Automatic Discrimination Parser 82 Discriminator Controller 84 Language A Discriminator 86 Language B Discriminator 88 Language C Discriminator 90 Language D Discriminator 92 Language E Discriminator 94 Group Discrimination Control Unit
───────────────────────────────────────────────────── フロントページの続き (72)発明者 今野 一郎 埼玉県岩槻市府内3丁目7番1号 富士ゼ ロックス株式会社岩槻事業所内 (72)発明者 塩見 雄仁 埼玉県岩槻市府内3丁目7番1号 富士ゼ ロックス株式会社岩槻事業所内 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Ichiro Konno 3-7-1, Iwatsuki-shi, Saitama Prefecture Fuji-Zerox Co., Ltd. Iwatsuki Plant (72) Inhito Yuhito 3-7-1, Iwatsuki-shi, Saitama Prefecture No. Fuji Xerox Co., Ltd. Iwatsuki Office
Claims (4)
数のグループに分類する分類手段と、 前記分類手段により分類されたグループ毎に互いに異な
る判別ルールを前記入力データに対して適用することに
より、前記入力データを記述する制御言語の種類を決定
する決定手段と、 前記決定手段により決定された制御言語の種類に基づい
て前記入力データを解釈して出力する出力手段と、 を含むプリンタ装置。1. An input unit for inputting input data, a classifying unit for classifying a control language group that may describe the input data into a plurality of groups, and each group classified by the classifying unit. Applying different discrimination rules to the input data to determine the type of control language that describes the input data, and determining the input data based on the type of control language determined by the determining unit. A printer device including: an output unit that interprets and outputs.
ルールを、判別処理速度の速い順番に適用することによ
り、前記入力データを記述する制御言語の種類を決定す
る請求項1に記載のプリンタ装置。2. The printer according to claim 1, wherein the determining unit determines the type of control language that describes the input data by applying the determination rule for each group in the order of increasing determination processing speed. apparatus.
するコードを読み取るコード読取手段を備え、前記コー
ド別の出現順序に基づいて制御言語の種類を決定する判
別ルールを少なくとも1つ有する請求項1に記載のプリ
ンタ装置。3. The determining means comprises code reading means for reading a code forming the input data, and has at least one discrimination rule for determining the type of control language based on the appearance order of each code. 1. The printer device according to item 1.
するコードを読み取るコード読取手段を備え、前記コー
ド別の出現数に基づいて制御言語の種類を決定する判別
ルールを少なくとも1つ有する請求項1に記載のプリン
タ装置。4. The determining means comprises code reading means for reading a code forming the input data, and has at least one discrimination rule for determining the type of control language based on the number of appearances of each code. 1. The printer device according to item 1.
Priority Applications (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP7098954A JP2785742B2 (en) | 1995-04-24 | 1995-04-24 | Printer device |
| KR1019960012411A KR100199430B1 (en) | 1995-04-24 | 1996-04-23 | Output control device |
| TW085104843A TW307846B (en) | 1995-04-24 | 1996-04-23 | |
| US08/636,438 US5854940A (en) | 1995-04-24 | 1996-04-23 | Output control system for interpreting input data according to a specific control language based upon outputs from a plurality of control language determining devices |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP7098954A JP2785742B2 (en) | 1995-04-24 | 1995-04-24 | Printer device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH08290636A true JPH08290636A (en) | 1996-11-05 |
| JP2785742B2 JP2785742B2 (en) | 1998-08-13 |
Family
ID=14233493
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP7098954A Expired - Fee Related JP2785742B2 (en) | 1995-04-24 | 1995-04-24 | Printer device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2785742B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7973954B2 (en) | 2006-08-28 | 2011-07-05 | Sharp Laboratories Of America, Inc. | Method and apparatus for automatic language switching for an imaging device |
-
1995
- 1995-04-24 JP JP7098954A patent/JP2785742B2/en not_active Expired - Fee Related
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7973954B2 (en) | 2006-08-28 | 2011-07-05 | Sharp Laboratories Of America, Inc. | Method and apparatus for automatic language switching for an imaging device |
| US8218187B2 (en) | 2006-08-28 | 2012-07-10 | Sharp Laboratories Of America, Inc. | Method and apparatus for automatic language switching for an imaging device |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2785742B2 (en) | 1998-08-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7199890B2 (en) | Print control method and apparatus | |
| EP0834800B1 (en) | Method and apparatus for controlling output of a printer | |
| US6437869B1 (en) | Printer apparatus, printer system and control method therefor | |
| KR100199430B1 (en) | Output control device | |
| EP0750250B1 (en) | Print control apparatus, print control method, information processing apparatus, information processing method, and storage medium storing control program | |
| JP4401662B2 (en) | Print control apparatus and print control method | |
| EP0702289B1 (en) | A method of automatically recognizing a language in which digital data are received | |
| JPH10333846A (en) | Output control method and device | |
| US6879410B1 (en) | Data processing with power saving function | |
| JPH05177884A (en) | Printer control device | |
| US8441670B2 (en) | In-line system for the validation of a page description language within a print data stream | |
| US6496279B2 (en) | Image processing apparatus, method and memory medium therefor | |
| US7764394B2 (en) | Data processing apparatus, data processing method, and data processing program | |
| EP0608115B1 (en) | Output control method and apparatus | |
| JP2785742B2 (en) | Printer device | |
| EP0545648B1 (en) | Automatic language determination control for printer | |
| JPH08290635A (en) | Output control apparatus | |
| JPH1124865A (en) | Print control apparatus, print control method, and storage medium storing computer-readable program | |
| JP3610194B2 (en) | Print control apparatus, print control method, and storage medium storing computer-readable program | |
| JPH08290637A (en) | Data processor | |
| JPH08292852A (en) | Printer device | |
| KR100334102B1 (en) | Method for management of history in the printer | |
| JPH07121318A (en) | Remote printing system | |
| JPH082067A (en) | Printing apparatus and control method thereof | |
| HK1009535B (en) | Method and apparatus for controlling output of a printer |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090529 Year of fee payment: 11 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100529 Year of fee payment: 12 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110529 Year of fee payment: 13 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110529 Year of fee payment: 13 |
|
| LAPS | Cancellation because of no payment of annual fees |