JP2913942B2 - Printer control device - Google Patents

Printer control device

Info

Publication number
JP2913942B2
JP2913942B2 JP3266344A JP26634491A JP2913942B2 JP 2913942 B2 JP2913942 B2 JP 2913942B2 JP 3266344 A JP3266344 A JP 3266344A JP 26634491 A JP26634491 A JP 26634491A JP 2913942 B2 JP2913942 B2 JP 2913942B2
Authority
JP
Japan
Prior art keywords
emulation
printer
data
printing
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP3266344A
Other languages
Japanese (ja)
Other versions
JPH05104826A (en
Inventor
攻 五十嵐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP3266344A priority Critical patent/JP2913942B2/en
Publication of JPH05104826A publication Critical patent/JPH05104826A/en
Application granted granted Critical
Publication of JP2913942B2 publication Critical patent/JP2913942B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明はホストコンピュータ等の
プリント情報源から送られてきたデータの印字を行わせ
るためのプリンタ装置に係わり、詳細には区切られた印
刷可能なある文字列によりプリンタを制御するプリント
制御言語で送られてきたデータに対しても適正なエミュ
レーションの選択を可能にしたプリンタ制御装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a printer device for printing data sent from a print information source such as a host computer, and more particularly, to a printer device using a delimited printable character string. The present invention relates to a printer control device capable of selecting an appropriate emulation even for data transmitted in a print control language to be controlled.

【0002】[0002]

【従来の技術】図7は、プリント情報源の一例としての
ホストコンピュータとプリンタ装置との一般的な接続関
係を表わしたものである。ホストコンピュータ11とプ
リンタ装置12とは通信ケーブル13によって接続さ
れ、この通信ケーブル13を介して画像データや各種の
制御コードが伝送されるようになっている。プリンタ装
置12内にはプリンタ制御装置14と印字機構としての
印字部15とが配置されている。プリンタ制御装置14
は、印字のためのイメージの展開処理を行ったり印字部
15の印字制御を行うようになっている。
2. Description of the Related Art FIG. 7 shows a general connection relationship between a host computer as an example of a print information source and a printer. The host computer 11 and the printer device 12 are connected by a communication cable 13, and image data and various control codes are transmitted via the communication cable 13. In the printer device 12, a printer control device 14 and a printing unit 15 as a printing mechanism are arranged. Printer control device 14
Is designed to perform image expansion processing for printing and to control printing of the printing unit 15.

【0003】このようなプリントシステムで、ホストコ
ンピュータ11とプリンタ装置12が同一年代に製造さ
れた同一メーカの製品で両者がセットで販売されている
ようなものであれば、ホストコンピュータ11から供給
される画像データをプリンタ装置12が印字する際に特
に問題が生じることはない。
In such a printing system, if the host computer 11 and the printer device 12 are products of the same maker manufactured in the same age and both are sold as a set, the host computer 11 and the printer device 12 are supplied from the host computer 11. There is no particular problem when the printer device 12 prints image data.

【0004】ところが、現実にはホストコンピュータ1
1とプリンタ装置12の製造メーカが同一ではなかった
り、同一メーカの製造に係わるものでも製造された年代
が異なるような場合が多い。このような場合でもホスト
コンピュータ11側が送出した制御コードをプリンタ装
置のプリンタ制御装置14が正しく解読して印字作業を
行う必要がある。
However, in reality, the host computer 1
In many cases, the manufacturers of the printer 1 and the printer device 12 are not the same, or the date of manufacture differs even if they are related to the manufacture of the same manufacturer. Even in such a case, it is necessary for the printer control device 14 of the printer device to correctly decode the control code sent from the host computer 11 and perform the printing operation.

【0005】そこで従来からコントローラ内に複数のエ
ミュレーションと、これらの切換スイッチを配置したプ
リンタ装置が存在している。このようなプリンタ装置で
は、接続先のホストコンピュータの種類によってスイッ
チを切り換えて適切なエミュレーションを選択するよう
になっている。
Therefore, there has conventionally been a printer device in which a plurality of emulations and a changeover switch are arranged in a controller. In such a printer device, an appropriate emulation is selected by switching a switch depending on the type of a host computer to be connected.

【0006】ところがこのようにスイッチでエミュレー
ションの切り換えを行うプリンタ装置では、ホストコン
ピュータが変更されるたびにスイッチ操作が必要であ
り、煩わしいばかりでなくスイッチの操作を間違えると
プリンタ装置が誤動作を行ったり印字を全く行うことが
できないといった問題があった。
[0006] However, in the printer device in which the emulation is switched by the switch, the switch operation is required every time the host computer is changed. Not only is the operation troublesome, but if the switch operation is mistaken, the printer device malfunctions. There was a problem that printing could not be performed at all.

【0007】このような問題点を解決するためにエミュ
レーションの切り換えを自動化したプリンタ装置が提案
されている。このうち特開平1−314177号公報に
記載の印字装置では、装置内部に複数のエミュレーショ
ンを配置しておき、外部から受信された制御コマンドコ
ードとこれら複数種類のエミュレーションとを照合する
ようになっている。そして、最も適合するエミュレーシ
ョンを自動的に選択し、制御コマンドの変換を行うよう
になっている。
In order to solve such a problem, there has been proposed a printer apparatus in which emulation switching is automated. In the printing apparatus described in JP-A-1-314177, a plurality of emulations are arranged inside the apparatus, and a control command code received from the outside is compared with the plurality of types of emulations. I have. Then, the most suitable emulation is automatically selected, and the control command is converted.

【0008】また特開平1−287727号公報では、
同様に装置内部に複数のエミュレーションを配置してお
く。そして、これらのエミュレーションが選択された回
数を不揮発性の記憶手段に格納しておき、電源投入時等
の所定の場合には選択回数が最大となっているエミュレ
ーションの選択を行うようになっている。
In Japanese Patent Application Laid-Open No. 1-287727,
Similarly, a plurality of emulations are arranged inside the device. Then, the number of times these emulations are selected is stored in a non-volatile storage means, and in a predetermined case such as when the power is turned on, the emulation having the maximum number of selections is selected. .

【0009】[0009]

【発明が解決しようとする課題】ところで特開平1−3
14177号公報に記載の印字装置では、エミュレーシ
ョンの選択をプリンタ制御言語における制御コマンドの
識別によって行っている。ところが、プリンタ制御言語
によっては、例えばポストスクリプトのように、このよ
うな識別可能な特別の制御コマンドを使用せず、通常の
キャラクタのみで制御を行うようにしたものとがある。
特開平1−314177号公報に記載の印字装置ではこ
のようなキャラクタのみを使用したプリンタ制御言語で
送信されてきた印字用のデータを解析することができ
ず、最適なエミュレーションを選択することができな
い。
SUMMARY OF THE INVENTION Incidentally, Japanese Patent Laid-Open Publication No. 1-3
In the printing apparatus described in Japanese Patent Application Publication No. 14177, emulation is selected by identifying a control command in a printer control language. However, some printer control languages do not use such identifiable special control commands as in PostScript, for example, and perform control using only normal characters.
The printing device described in JP-A-1-314177 cannot analyze printing data transmitted in a printer control language using only such characters, and cannot select an optimal emulation. .

【0010】これに対して、特開平1−287727号
公報に記載の装置では、今までに一番多く使用したエミ
ュレーションを初期設定するので、区切られた印刷可能
なある文字列によりプリンタを制御するプリンタ制御言
語で送信されてきた印字用のデータに対しても、エミュ
レーションの初期設定を行うことができる。しかしなが
ら、その選択されたエミュレーションが最適のものであ
るかどうかは全く別の問題であり、一番多く使用されて
いるプリンタ制御言語以外の言語のデータが送信されて
きた場合にはエミュレーションの選択が確実に間違って
しまうという欠点があった。
On the other hand, in the apparatus described in Japanese Patent Application Laid-Open No. 1-287727, the emulation which has been used most frequently is initialized, so that the printer is controlled by a certain printable character string. The emulation initialization can be performed on the print data transmitted in the printer control language. However, whether or not the selected emulation is optimal is a completely different matter, and if data in a language other than the most frequently used printer control language is transmitted, the emulation selection will not be possible. There was a disadvantage that it was definitely wrong.

【0011】そこで本発明の目的は、区切られた印刷可
能なある文字列によりプリンタを制御するプリンタ制御
言語からなる印字用のデータが送られてきた場合にこれ
を識別して処理を行うことのできるプリンタ制御装置を
提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to perform processing by identifying print data consisting of a printer control language for controlling a printer by a certain printable character string. It is an object of the present invention to provide a printer control device capable of performing the above.

【0012】[0012]

【課題を解決するための手段】請求項1記載の発明で
は、区切られた印字可能な文字コード列によりプリンタ
を制御する第1の制御言語によって記述された印字用の
データをエミュレーションする第1のエミュレーション
プログラムと、印字不可能な文字コードを含む文字コー
ド列によりプリンタを制御する第2の制御言語によって
記述された印字用のデータをエミュレーションする第2
のエミュレーションプログラムとを備え、ホスト装置等
のプリント情報源から送られてくる印字用のデータの制
御言語に対応するエミュレーションプログラムを選択し
てエミュレーションするプリンタ制御装置に、(イ)ホ
スト装置等のプリント情報源から送られてくる印字用の
データを順次格納する格納部と、(ロ)この格納部に格
納されている印字用のデータが印字可能な文字コードで
構成されているか否かを逐次読み出して判断する判断手
段と、(ハ)この判断手段により最初に読み出した所定
単位の印字用のデータが全て印字可能な文字コードで構
成されていると判断したときには第1のエミュレーショ
ンプログラムを選択するエミュレーションプログラム初
期選択手段と、(ニ)このエミュレーションプログラム
初期選択手段が第1のエミュレーションプログラムを選
択してエミュレーションを行っているときに判断手段が
格納手段からその後読み出された印字用のデータに印字
不可能な文字コードが含まれていると判断したときには
少なくともその時点から第2のエミュレーションプログ
ラムにプログラムの切り替えを行うプログラム切替手段
とを具備させたものである。
According to the first aspect of the present invention, a printer is provided with a printable character code string separated.
For printing described in a first control language for controlling
First emulation to emulate data
Programs and character codes containing non-printable character codes
By a second control language that controls the printer by the
Second emulation of the described data for printing
Host device etc.
Of print data sent from print information sources
Select an emulation program corresponding to your language
(B) to the printer controller that emulates
For printing sent from a printing information source such as
A storage unit for sequentially storing data, and (b) a storage unit for storing the data.
The print data stored is a printable character code.
Determining means to sequentially read and determine whether or not
And (c) the predetermined value read first by the determination means.
All print data in units are composed of printable character codes.
If it is determined that the first emulation
First emulation program to select
Period selection means and (d) this emulation program
The initial selection means selects the first emulation program.
When the emulation is selected
Prints on the data for printing that is subsequently read from the storage means
When it is determined that an impossible character code is included
At least from that point on the second emulation program
Program switching means for switching programs to rams
Are provided.

【0013】すなわち請求項1記載の発明では、プリン
ト情報源から送られてくる印字用のデータを順次格納す
る格納部から最初に読み出した所定単位の印字用のデー
タが全て印字可能な文字コードで構成されていると判断
したときには、区切られた印字可能な文字コード列によ
りプリンタを制御する第1の制御言語によって記述され
た印字用のデータをエミュレーションするための第1の
エミュレーションプログラムを使用するようにエミュレ
ーションプログラム初期選択手段で初期設定を行う。そ
して、このまま判断手段の判断がかわらない限り、第1
のエミュレーションプログラムが継続的に使用されてプ
リンタの制御が行われることになる。これに対して、エ
ミュレーションプログラム初期選択手段が第1のエミュ
レーションプログラムを選択してエミュレーションを行
っているときに判断手段が格納手段からその後読み出さ
れた印字用のデータに印字不可能な文字コードが含まれ
ていると判断したときには、プログラム切替手段が少な
くともその時点から第2のエミュレーションプログラム
にプログラムの切り替えを行うようにしている。これに
より、印字用のデータの最初の部分での判断が誤ってい
たような場合であっても、判断手段が少なくとも印字用
のデータに印字不可能な文字コードが含まれていると判
断したとき以後は正しいエミュレーションが行われるこ
とになる。
[0013] In this invention according to claim 1, purine
The printing data sent from the
The print data of the specified unit first read from the storage unit
Data is composed of all printable character codes
If you do, a printable character code string
Described in a first control language for controlling the printer.
The first for emulating the data for printing
Emulation to use an emulation program
Initial setting is performed by the initial selection means for the application program. So
Unless the judgment of the judgment means is changed, the first
Emulation program is continuously used
The control of the linter is performed. On the other hand,
The first emulation means selects the first emulation program.
Select an emulation program and execute emulation.
The judgment means is subsequently read from the storage means.
Unprintable character code is included in the
If it is determined that the
At least the second emulation program from that point
Program switching. to this
Is incorrect in the first part of the print data.
Even if such a case occurs, the judgment means must be at least
Data that contains unprintable character codes
After that, correct emulation is performed.
And

【0014】[0014]

【0015】[0015]

【0016】[0016]

【実施例】以下実施例につき本発明を詳細に説明する。DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described in detail below with reference to embodiments.

【0017】図1は本発明の一実施例におけるプリンタ
制御装置の回路構成の概要を表わしたものである。プリ
ンタ制御装置21は、通信ケーブル22を介してワーク
ステーション等からなる複数のホストコンピュータ23
1 〜23N と接続されており、印字用のデータの供給を
受けるようになっている。また、プリンタ制御装置21
は、作成された印字データを用いて印字を行うためのプ
リンタエンジン24を接続している。プリンタエンジン
24は、レーザプリンタとしての基本的な構成部分から
構成されている。そして、受信した印字データを用いて
レーザビームを変調し、図示しない感光ドラムにこれを
露光走査して静電潜像の形成を行わせる。静電潜像は図
示しない現像装置で現像されトナー像が作成される。こ
のトナー像は図示しない印字用紙に転写され定着されて
印字済みの用紙として図示しないトレイに排出されるこ
とになる。
FIG. 1 shows an outline of a circuit configuration of a printer control device according to an embodiment of the present invention. The printer control device 21 includes a plurality of host computers 23 such as workstations via a communication cable 22.
1 ~ 23 N and are connected, so that the receiving the data for printing. Also, the printer control device 21
Is connected to a printer engine 24 for printing using the created print data. The printer engine 24 is composed of basic components as a laser printer. Then, the laser beam is modulated using the received print data, and the photosensitive drum (not shown) is exposed and scanned to form an electrostatic latent image. The electrostatic latent image is developed by a developing device (not shown) to form a toner image. This toner image is transferred to a printing paper (not shown), fixed, and discharged as a printed paper to a tray (not shown).

【0018】プリンタ制御装置21は各種制御の中枢と
なるCPU31を備えている。CPU31はデータバス
等のバス32を介してROM33、RAM34、不揮発
性メモリ(NVM)35、ネットワークインタフェース
(I/F)部36、パネル制御部37、カートリッジ制
御部38および出力インターフェース部39と接続され
ている。
The printer control unit 21 has a CPU 31 which is a center of various controls. The CPU 31 is connected to a ROM 33, a RAM 34, a nonvolatile memory (NVM) 35, a network interface (I / F) unit 36, a panel control unit 37, a cartridge control unit 38, and an output interface unit 39 via a bus 32 such as a data bus. ing.

【0019】ここでROM(リード・オンリ・メモリ)
33には、このプリンタ制御装置21の各種制御を行う
ためのプログラムが格納されている。RAM(ランダム
・アクセス・メモリ)34は、CPU31が各種制御を
実行する上での一時的に必要とするデータを格納する作
業用メモリとしての役割を持っている他、イメージデー
タを展開するためのページメモリや受信した印字用のデ
ータを格納する受信バッファとしての役割も備えてい
る。ここで、イメージデータは印字のためにプリンタエ
ンジン24に送られるデータである。
Here, ROM (read only memory)
33 stores a program for performing various controls of the printer control device 21. A RAM (random access memory) 34 has a role as a work memory for storing data temporarily required for the CPU 31 to execute various controls, and also for developing image data. It also has a role as a page memory and a reception buffer for storing received print data. Here, the image data is data sent to the printer engine 24 for printing.

【0020】次に、本実施例で使用される不揮発性メモ
リ35は、書き換えが可能な不揮発性メモリであり、こ
こには一般に多用される複数のエミュレーションプログ
ラムと、これらのエミュレーションプログラムの選択の
際等に使用されるエスケープシーケンステーブルや、ト
ークンテーブルが格納されている。ここでトークンと
は、エミュレーションが解釈できる意味のある文字列単
位をいう。このメモリは不揮発性なので、電源を切って
もその内容が保存されるようになっている。書き換えが
可能な不揮発性メモリとしては、フラッシュ電気的消去
ROM(Flash E 2 PROM)や電気的消去ROM(E
2 PROM)あるいはハードディスク記憶装置が代表的
である。本実施例ではフラッシュ電気的消去ROMを不
揮発性メモリとして使用している。電池によってバック
アップされたRAMも、場合により不揮発性メモリとし
て使用することができる。
Next, the nonvolatile memo used in this embodiment will be described.
The memory 35 is a rewritable nonvolatile memory.
It contains several commonly used emulation programs.
And the selection of these emulation programs
Escape sequence table used when
Contains the kun table. Where the token and
Is a meaningful string unit that the emulation can interpret.
Means rank. This memory is non-volatile, so turn off the power
The contents are also saved. Rewriting
Possible non-volatile memory is flash electrical erase
ROM (Flash E TwoPROM) and electrically erasable ROM (E
TwoPROM) or hard disk storage device is typical
It is. In this embodiment, the flash electric erase ROM is not used.
Used as volatile memory. Back by battery
The upgraded RAM may also be used as non-volatile memory in some cases.
Can be used.

【0021】ネットワークインタフェース部36は、ネ
ットワークとの通信上のインタフェースをとるために用
意されたものである。ネットワークインタフェース部3
6は、ホストコンピュータ231 、……23N から送ら
れてきたデータを通信ケーブル22を通して取り込み、
CPU31が処理できる状態にするようになっている。
このネットワークインタフェース部36には図示しない
がFIFO(ファースト・イン・ファースト・アウト)
メモリが配置されており、データの転送速度の差を吸収
するようになっている。パネル制御部37はコントロー
ルパネル41を接続しており、各種キーと液晶ディスプ
レイに対するデータの入出力制御を行うようになってい
る。カートリッジ制御部38には必要に応じてエミュレ
ーションカートリッジ42が着脱自在に取りつけられる
ようになっている。エミュレーションカートリッジ42
は、不揮発性メモリ35に格納された複数のエミュレー
ションプログラムに追加する形で使用されるエミュレー
ションプログラムおよびそれらのエミュレーションテー
ブルを格納したメモリである。エミュレーションカート
リッジ42は、幾つかの種類に分かれており、使用する
ホストコンピュータ231 、……23N 等のプリント情
報源に対応させて最適と思われるものを選択してプリン
タ制御装置に装着できるようになっている。
The network interface unit 36 is provided to provide an interface for communication with a network. Network interface 3
6 takes in the data sent from the host computers 23 1 ,..., 23 N through the communication cable 22,
The state is such that the CPU 31 can perform processing.
Although not shown, the network interface unit 36 has a FIFO (first-in first-out).
A memory is arranged to absorb the difference in data transfer speed. The panel control unit 37 is connected to a control panel 41, and controls input and output of data to and from various keys and a liquid crystal display. An emulation cartridge 42 is detachably attached to the cartridge controller 38 as needed. Emulation cartridge 42
Is a memory storing an emulation program used in addition to a plurality of emulation programs stored in the nonvolatile memory 35 and their emulation tables. Emulation cartridge 42 is divided into several types, the host computer 23 1 to be used, select the one that seems best to correspond to the print information source such as ...... 23 N to be attached to the printer control unit It has become.

【0022】図2は、2つのエミュレーションA、Bに
ついてのプログラムが不揮発性メモリ35に格納されて
いる状態で、これらのエミュレーションA、Bの選択を
行うための処理手順を原理的に表わしたものである。た
だし、ここでエミュレーションAは、エスケープコード
あるいはその他の制御コードとそれに続く印刷可能な文
字とによりプリンタを制御するプリンタ制御言語である
とし、エミュレーションBは区切られた印刷可能なある
文字列によりプリンタを制御するプリンタ制御言語であ
るとする。
FIG. 2 shows a processing procedure for selecting the emulations A and B in a state where programs for the two emulations A and B are stored in the nonvolatile memory 35. It is. Here, emulation A is assumed to be a printer control language for controlling the printer by an escape code or other control code and subsequent printable characters, and emulation B is used to control the printer by a delimited printable character string. It is assumed that the language is a printer control language to be controlled.

【0023】まずCPU31はホストコンピュータ23
1 〜23N のいずれかから印字用のデータからなるファ
イルを受信したら(ステップS101;Y)、そのファ
イルの頭の部分の所定量のデータをRAM34の前記し
た受信バッファに蓄積する(ステップS102)。そし
て、この部分がすべて文字「a」、「b」、「c」等の
キャラクタとタブ文字および副改文字で構成されている
かどうかの判別を行う(ステップS103)。印刷可能
な文字、スペース文字、タブ文字および復改文字(復帰
文字または改行文字)のみで構成されている場合には
(Y)、エミュレーションBを選択する(ステップS1
04)。そして、ステップS101で受信したファイル
をRAM34の作業領域に順次に読み込んでエミュレー
ションBのプログラムによって解析する(ステップS1
05)。この解析の結果、ある確率で意味のある文字列
が出現しなかった場合には(ステップS106;N)、
エミュレーションの選択が間違ったものとして他方のエ
ミュレーションAの選択を行う(ステップS107)。
意味のある文字列が出現していた場合には(ステップS
106;Y)、出力インターフェース部39を通じて、
印字データをプリンタエンジン24に送出する(ステッ
プS108)。
First, the CPU 31 is connected to the host computer 23.
When a file composed of print data is received from any of 1 to 23 N (step S101; Y), a predetermined amount of data at the beginning of the file is stored in the reception buffer of the RAM 34 (step S102). . Then, it is determined whether or not this portion is all composed of characters such as characters "a", "b", "c", a tab character, and a sub-character (step S103). If it is composed of only printable characters, space characters, tab characters and carriage return / line feed characters (return characters or line feed characters) (Y), emulation B is selected (step S1)
04). Then, the files received in step S101 are sequentially read into the work area of the RAM 34 and analyzed by the emulation B program (step S1).
05). As a result of this analysis, if a meaningful character string does not appear with a certain probability (step S106; N),
The other emulation A is selected assuming that the emulation selection is wrong (step S107).
If a meaningful character string appears (step S
106; Y), through the output interface unit 39,
The print data is sent to the printer engine 24 (step S108).

【0024】一方、ステップS103で受信バッファに
印刷可能な文字、スペース文字、タブ文字および復改文
字(復帰文字または改行文字)以外のコード情報が格納
されていた場合には(N)、エミュレーションAの選択
を行う(ステップS107)。エミュレーションAが選
択された場合には、ステップS101で受信したファイ
ルをRAM34の作業領域に順次に読み込んでエミュレ
ーションAのプログラムによって解析を実行する(ステ
ップS109)。そして、この結果として得られた印字
データをプリンタエンジン24に送出する(ステップS
108)ことになる。
On the other hand, if code information other than printable characters, space characters, tab characters, and carriage return characters (return characters or line feed characters) is stored in the reception buffer in step S103 (N), the emulation A Is selected (step S107). When the emulation A is selected, the files received in step S101 are sequentially read into the work area of the RAM 34, and the analysis is executed by the emulation A program (step S109). Then, the print data obtained as a result is sent to the printer engine 24 (Step S).
108).

【0025】なお、この図2ではエスケープコードある
いはその他の制御コードとそれに続く印刷可能な文字と
によりプリンタを制御するプリンタ制御言語と区切られ
た印刷可能なある文字列によりプリンタを制御するプリ
ンタ制御言語をそれぞれ1つずつ用意した場合を説明し
たが、それぞれについて複数のエミュレーションプログ
ラムを用意している場合には、ステップS103で分離
した後にそれぞれのグループのエミュレーションプログ
ラムの間で最適なものを選択するようにすればよい。そ
して、区切られた印刷可能なある文字列によりプリンタ
を制御するプリンタ制御言語が選択された場合で、その
中のいずれのエミュレーションも不適格と判別されたと
きに、制御コマンドをもつ側のエミュレーションのグル
ープに切り替えるようにすればよい。
In FIG. 2, a printer control language for controlling the printer by an escape code or other control code and a printable character following the same and a printer control language for controlling the printer by a printable character string separated from the printer control language. Has been described, but if a plurality of emulation programs are prepared for each of them, it is necessary to separate the emulation programs in step S103 and select an optimum emulation program among the emulation programs of each group. What should I do? Then, when a printer control language for controlling the printer is selected by a delimited printable character string, and any of the emulations is determined to be inappropriate, the emulation of the side having the control command is determined. What is necessary is just to switch to a group.

【0026】図3〜図6は、図2に示した制御の流れを
具体化したものの一例を表わしたものである。このうち
図3および図4が主としてエミュレーションBの選択と
処理に関係し、図5および図6がエミュレーションAの
処理に関係している。
FIGS. 3 to 6 show an example of a concrete example of the control flow shown in FIG. 3 and 4 mainly relate to the selection and processing of emulation B, and FIGS. 5 and 6 relate to the processing of emulation A.

【0027】まず図3では、RAM34(図1)におけ
るファイルを格納するメモリ(以下ファイルメモリとい
う。)および前記した受信バッファに相当する領域をク
リアしておく(ステップS201)。そして、ファイル
の受信を待機し(ステップS202)、受信が行われた
ら(Y)、これをファイルバッファに格納する(ステッ
プS203)。また、ファイルバッファに格納されたデ
ータの先頭の128バイト分を受信バッファにも格納す
る(ステップS204)。この状態で、CPU31は受
信バッファに格納された全データが印刷可能な文字、ス
ペース文字、タブ文字および復改文字(復帰文字または
改行文字)を表わしているかどうかのチェックを行う
(ステップS205)。印刷可能な文字、スペース文
字、タブ文字および復改文字(復帰文字または改行文
字)のみを表わしている場合には、この受信したファイ
ルのためにエミュレーションBを選択する(ステップS
206)。そして受信バッファをクリアし(ステップS
207)、ポインタをファイルバッファの先頭に設定す
る(ステップS208)。
First, in FIG. 3, a memory (hereinafter referred to as a file memory) for storing a file in the RAM 34 (FIG. 1) and an area corresponding to the above-mentioned reception buffer are cleared (step S201). Then, it waits for a file to be received (step S202). When the file is received (Y), the file is stored in a file buffer (step S203). The first 128 bytes of data stored in the file buffer are also stored in the reception buffer (step S204). In this state, the CPU 31 checks whether all the data stored in the reception buffer represents printable characters, space characters, tab characters, and carriage return / line feed characters (return characters or line feed characters) (step S205). If only printable characters, space characters, tab characters, and carriage return / line feed characters (return characters or line feed characters) are represented, emulation B is selected for the received file (step S).
206). Then, the receiving buffer is cleared (step S
207), a pointer is set at the head of the file buffer (step S208).

【0028】この状態で、CPU31はポインタの示す
データを1バイト読み出し、これに伴ってポインタを次
の読み出しが行われる箇所まで進める(ステップS20
9)。そして、この読み出したデータが制御コマンドを
構成するエスケープ記号と一致するかどうかの判別を行
う(ステップS210)。エミュレーションBが適合す
る印字用のデータには、エスケープ記号が存在しないは
ずである(N)。そこで、この場合にはエミュレーショ
ンBで規定している区切り文字に該当するかどうかのチ
ェックが行われる(ステップS211)。該当していな
ければ(N)、この1バイト分のデータを受信バッファ
に格納する(ステップS212)。そしてステップS2
09に帰って同様の動作を繰り返す。このようにしてエ
ミュレーションBを規定している区切り文字に該当した
場合には(ステップS211;Y)、受信バッファに格
納された文字列を意味のある文字列単位としてのトーク
ンとする(ステップS213)。そして、エミュレーシ
ョンBについての前記したトークンテーブルの中に同一
のトークンが存在するかの検索を行う(ステップS21
4)。
In this state, the CPU 31 reads one byte of data indicated by the pointer, and advances the pointer to a position where the next reading is performed (step S20).
9). Then, it is determined whether or not the read data matches an escape symbol constituting the control command (step S210). There should be no escape symbol in the print data to which emulation B conforms (N). Therefore, in this case, it is checked whether or not the character corresponds to the delimiter specified by the emulation B (step S211). If not (N), this 1-byte data is stored in the reception buffer (step S212). And step S2
Returning to step 09, the same operation is repeated. If the character string corresponds to the delimiter character defining the emulation B (step S211; Y), the character string stored in the reception buffer is used as a token as a meaningful character string unit (step S213). . Then, a search is performed to determine whether the same token exists in the above-described token table for emulation B (step S21).
4).

【0029】この結果、トークンテーブルに一致するト
ークンが存在した場合には(ステップS215;Y)、
そのトークンを処理することになる(ステップS21
6)。このとき、そのトークンがファイルの終端を示す
ファイル終端記号であるか(ステップS217)と、プ
リンタエンジン24への出力命令であるか(ステップS
218)の2点について重ねてチェックする。そして、
ファイル終端記号であった場合には(ステップS21
7;Y)、処理を終了させる(エンド)。これに対し
て、出力命令であった場合には(ステップS218;
Y)、プリンタエンジン24に処理後の印字データを送
出する(ステップS219)。そして、1ページ分の印
字用に設けられていたページバッファの内容をクリアす
る(ステップS220)。そして、処理後の受信バッフ
ァの内容もクリアし(ステップS221)、再びステッ
プS209に戻って次のページの処理を開始することに
なる。
As a result, if there is a matching token in the token table (step S215; Y),
The token is processed (step S21).
6). At this time, whether the token is a file end symbol indicating the end of the file (step S217) and whether the token is an output command to the printer engine 24 (step S217)
218) are checked again. And
If it is a file end symbol (step S21
7; Y), end the process (END). On the other hand, if it is an output command (step S218;
Y), and sends the processed print data to the printer engine 24 (step S219). Then, the contents of the page buffer provided for printing one page are cleared (step S220). Then, the contents of the reception buffer after the processing are also cleared (step S221), and the process returns to step S209 again to start the processing of the next page.

【0030】一方、処理をしたトークンがファイル終端
記号でも出力命令でもなかった場合には(ステップS2
18;N)、その処理結果をページバッファに展開する
(ステップS222)。そして、処理後の受信バッファ
をクリアして(ステップS221)、同様にステップS
209に戻ることになる。このようにして、最終的にフ
ァイル終端記号が出現したとき(ステップS217;
Y)、すべての処理が終了することになる。
On the other hand, if the processed token is neither an end-of-file symbol nor an output instruction (step S2).
18; N), the processing result is developed in the page buffer (step S222). Then, the reception buffer after the processing is cleared (step S221), and similarly the step S221 is executed.
209 will be returned. In this way, when the end-of-file symbol finally appears (step S217;
Y), all the processing ends.

【0031】以上、エミュレーションBによる処理が順
調に行われた場合を説明した。これに対してステップS
205で受信バッファ内にキャラクタ以外のコードデー
タが入っていたような場合には(N)、図5に進んでエ
ミュレーションAの選択が行われる(ステップS22
3)。ステップS210でエスケープ記号が存在した場
合にも(Y)同様である。ただし、後者の場合にはエミ
ュレーションBの選択が一度行われた(ステップS20
6)ので、エミュレーションBによる文法エラーが発生
したことをコントロールパネル41(図1)に表示し
(ステップS224)、この後にエミュレーションAの
選択が行われる(ステップS223)。これと同様に、
図4のステップS215でエミュレーションBのトーク
ンテーブルに該当するトークンが存在しなかった場合に
は(N)、エミュレーションBによる文法のエラーを表
示した後、エミュレーションAが選択されることになる
(ステップS224、S223)。
The case where the processing by the emulation B is performed smoothly has been described above. Step S
If it is determined in 205 that code data other than characters is contained in the reception buffer (N), the process proceeds to FIG. 5 to select emulation A (step S22).
3). The same applies to the case where an escape symbol exists in step S210 (Y). However, in the latter case, the emulation B is selected once (step S20).
6) Therefore, the fact that a grammatical error has occurred due to emulation B is displayed on the control panel 41 (FIG. 1) (step S224), and thereafter emulation A is selected (step S223). Similarly,
If there is no corresponding token in the token table of the emulation B in step S215 of FIG. 4 (N), the grammar error by the emulation B is displayed, and then the emulation A is selected (step S224). , S223).

【0032】さて、図5のステップS223でエミュレ
ーションAが選択されたら、受信バッファの内容がクリ
アされる(ステップS225)。そして、ポインタをフ
ァイルバッファの先頭に設定する(ステップS22
6)。この状態で、CPU31はポインタの示すデータ
を1バイト読み出し、これに伴ってポインタを次の読み
出しが行われる箇所まで進める(ステップS227)。
そして、この読み出したデータがエスケープ記号と一致
するかどうかの判別を行う(ステップS228)。一致
する場合には(Y)、更に、ポインタの示すデータを1
バイト読み出し、これに伴ってポインタを次の読み出し
が行われる箇所まで進める(ステップS229)。そし
て、受信バッファのデータが4バイトになるまで(ステ
ップS230)、読み込んだデータを受信バッファに格
納していく(ステップS231、S229、S23
0)。
When emulation A is selected in step S223 of FIG. 5, the contents of the reception buffer are cleared (step S225). Then, the pointer is set at the head of the file buffer (step S22).
6). In this state, the CPU 31 reads one byte of data indicated by the pointer, and advances the pointer to a position where the next reading is performed (step S227).
Then, it is determined whether or not the read data matches the escape symbol (step S228). If they match (Y), the data indicated by the pointer is further changed to 1
The byte is read, and accordingly, the pointer is advanced to a position where the next reading is performed (step S229). Then, the read data is stored in the reception buffer until the data in the reception buffer becomes 4 bytes (step S230) (steps S231, S229, S23).
0).

【0033】受信バッファのデータが4バイトになった
ら(ステップS230;Y)、前記したエスケープシー
ケンステーブルと受信バッファの内容を比較する(ステ
ップS232)。そして、一致するエスケープシーケン
スがこのテーブル中に存在したら(ステップS233;
Y)、その処理を行う(ステップS234)。このと
き、CPU31はそのエスケープシーケンスがプリンタ
エンジン24への出力命令であるか(ステップS23
5)、あるいはファイルの終端を示すファイル終端記号
であるか(ステップS236)の2点について重ねてチ
ェックする。プリンタエンジン24への出力命令である
場合には(ステップS235;Y)、処理された印字デ
ータをプリンタエンジン24に送出し(ステップS23
7)、1ページ分の印字用に設けられていたページバッ
ファの内容をクリアする(ステップS238)。そし
て、処理後の受信バッファの内容もクリアし(ステップ
S239)、再びステップS227に戻って次のページ
の処理を開始することになる。これに対してファイル終
端記号であった場合には(ステップS236;Y)、図
4に示したようにその作業を終了させることになる(エ
ンド)。
When the data of the receiving buffer becomes 4 bytes (step S230; Y), the above-mentioned escape sequence table is compared with the contents of the receiving buffer (step S232). If a matching escape sequence exists in this table (step S233;
Y), the processing is performed (step S234). At this time, the CPU 31 determines whether the escape sequence is an output command to the printer engine 24 (step S23).
5) Or, it is checked whether it is a file end symbol indicating the end of the file (step S236). If the command is an output command to the printer engine 24 (step S235; Y), the processed print data is sent to the printer engine 24 (step S23).
7) The contents of the page buffer provided for printing one page are cleared (step S238). Then, the contents of the reception buffer after the processing are cleared (step S239), and the process returns to step S227 again to start the processing of the next page. On the other hand, if it is a file end symbol (step S236; Y), the work is ended as shown in FIG. 4 (end).

【0034】以上と異なり、出力命令でもファイル終端
記号でもなかった場合には(ステップS236;N)、
図5に戻ってその処理されたデータがページバッファに
展開される(ステップS240)。そして、この状態で
ページバッファが次のデータを受け入れられない状態
(フル)になったかどうかのチェックが行われる(ステ
ップS241)。フルになった場合にはステップS23
7に進んでそのページバッファから印字データが読み出
され、プリンタエンジン24による印字処理が行われる
ことになる。ページバッファがフルになっていない場合
には(ステップS241;N)、次のデータを受け入れ
るためにステップS227に処理が戻ることになる。
Contrary to the above, if neither the output command nor the end-of-file symbol is present (step S236; N),
Returning to FIG. 5, the processed data is expanded in the page buffer (step S240). Then, it is checked whether or not the page buffer is in a state (full) in which the next data cannot be received (step S241). If it is full, step S23
In step 7, the print data is read from the page buffer, and the print processing by the printer engine 24 is performed. If the page buffer is not full (step S241; N), the process returns to step S227 to accept the next data.

【0035】なお、図6のステップS233で一致する
エスケープシーケンスがなかった場合には(N)、エス
ケープ記号が識別されたにもかかわらず該当する制御コ
マンドが存在しないことになる。そこで、この場合には
プリントエラーをコントロールパネル41に表示して
(ステップS242)、全作業を終了させることになる
(エンド)。
If no matching escape sequence is found in step S233 of FIG. 6 (N), there is no corresponding control command even though the escape symbol is identified. Therefore, in this case, a print error is displayed on the control panel 41 (step S242), and all operations are ended (END).

【0036】[0036]

【発明の効果】このように請求項1記載の発明によれ
ば、印字用のデータの先頭部分等の所定の部分がすべて
文字コードで構成されているかどうかを調べて、すべて
文字コードで構成されていれば第1のエミュレーション
プログラムを選択することにしたので、印字用データの
最後まで調べてエミュレーションプログラムを選択する
場合と比べて印字作業を迅速に開始できるだけでなく、
印字用のデータの格納のためのメモリ容量を小型化でき
るという利点がある。また、エミュレーションプログラ
ム初期選択手段によるこの選択判断が誤っていて、その
後に格納手段から読み出された印字用のデータに印字不
可能な文字コードが含まれていると判断された場合に
は、プログラム切替手段が少なくともその時点から第2
のエミュレーションプログラムにプログラムの切り替え
を行うようにした。これにより、少なくともこれ以後は
正しいエミュレーションが行われることになる
As described above , according to the first aspect of the present invention, all the predetermined portions such as the head portion of the print data are
Check if it is composed of character codes,
First emulation if composed of character codes
I decided to select a program,
Go through and select an emulation program
Not only can you start printing faster than you can,
Memory capacity for storing printing data can be reduced.
The advantage is that Also, emulation programs
This selection decision by the initial
The print data read later from the storage
If it is determined that possible character codes are included
Means that the program switching means has at least
The program to another emulation program
To do. As a result, at least thereafter
Correct emulation will be performed .

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

【図1】 本発明の一実施例におけるプリンタ制御装置
の回路構成の概要を表わしたブロック図である。
FIG. 1 is a block diagram illustrating an outline of a circuit configuration of a printer control device according to an embodiment of the present invention.

【図2】 2つのエミュレーションA、Bについてのプ
ログラムが不揮発性メモリ35に格納されている状態
で、これらのエミュレーションA、Bの選択を行うため
の処理手順を原理的に表わした流れ図である。
FIG. 2 is a flowchart showing a processing procedure for selecting emulations A and B in a state where programs for two emulations A and B are stored in a nonvolatile memory 35 in principle.

【図3】 エミュレーションの選択制御とエミュレーシ
ョンBが選択された場合の処理の流れを示した流れ図で
ある。
FIG. 3 is a flowchart showing a flow of processing when emulation selection control and emulation B are selected.

【図4】 エミュレーションBが選択された場合の処理
の流れを示した流れ図である。
FIG. 4 is a flowchart showing the flow of processing when emulation B is selected.

【図5】 エミュレーションAが選択された場合の処理
の流れを示した流れ図である。
FIG. 5 is a flowchart showing the flow of processing when emulation A is selected.

【図6】 エミュレーションAが選択された場合の処理
の流れを示した流れ図である。
FIG. 6 is a flowchart showing the flow of processing when emulation A is selected.

【図7】 プリント情報源の一例としてのホストコンピ
ュータとプリンタ装置との一般的な接続関係を表わした
説明図である。
FIG. 7 is an explanatory diagram showing a general connection relationship between a host computer as an example of a print information source and a printer.

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

21…プリンタ制御装置、231 〜23N …ホストコン
ピュータ、24…プリントエンジン、31…CPU、3
3…ROM、34…RAM、35…不揮発性メモリ、3
6…ネットワークインターフェース部
21 ... printer controller, 23 1 ~ 23 N ... host computer, 24 ... print engine, 31 ... CPU, 3
3 ROM, 34 RAM, 35 nonvolatile memory, 3
6 Network interface

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 区切られた印字可能な文字コード列によ
りプリンタを制御する第1の制御言語によって記述され
た印字用のデータをエミュレーションする第1のエミュ
レーションプログラムと、印字不可能な文字コードを含
む文字コード列によりプリンタを制御する第2の制御言
語によって記述された印字用のデータをエミュレーショ
ンする第2のエミュレーションプログラムとを備え、ホ
スト装置等のプリント情報源から送られてくる印字用の
データの制御言語に対応するエミュレーションプログラ
ムを選択してエミュレーションする装置であって、 ホスト装置等のプリント情報源から送られてくる印字用
のデータを順次格納する格納部と、 この格納部に格納されている印字用のデータが印字可能
な文字コードで構成されているか否かを逐次読み出して
判断する判断手段と、 この判断手段により最初に読み出した所定単位の前記印
字用のデータが全て印字可能な文字コードで構成されて
いると判断したときには前記第1のエミュレーションプ
ログラムを選択するエミュレーションプログラム初期選
択手段と、 このエミュレーションプログラム初期選択手段が第1の
エミュレーションプログラムを選択してエミュレーショ
ンを行っているときに前記判断手段が前記格納手段から
その後読み出された印字用のデータに印字不可能な文字
コードが含まれていると判断したときには少なくともそ
の時点から前記第2のエミュレーションプログラムにプ
ログラムの切り替えを行うプログラム切替手段 とを具備
することを特徴とするプリンタ制御装置。
1. A printable character code string which is delimited.
Described in a first control language for controlling the printer.
Emulation of data for printing
Including a non-printable character code
A second control language for controlling the printer by a character code string
Emulation of print data described by
And a second emulation program
For printing sent from a printing information source such as
Emulation program corresponding to data control language
This is a device that selects and emulates a system, and is used for printing sent from a print information source such as a host device.
Storage unit for sequentially storing data for printing, and print data stored in this storage unit can be printed
Whether or not it is composed of various character codes
Determining means for determining, and the mark of a predetermined unit read first by the determining means
Character data consists of printable character codes.
The first emulation program
Emulation program initial selection to select program
Selection means and this emulation program initial selection means
Select an emulation program to emulate
When the judgment is made, the judgment means
Non-printable characters in the print data read afterwards
If you determine that the code is included, at least
From the point of the second emulation program
A printer control device comprising: a program switching unit for switching between programs .
JP3266344A 1991-10-15 1991-10-15 Printer control device Expired - Fee Related JP2913942B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3266344A JP2913942B2 (en) 1991-10-15 1991-10-15 Printer control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3266344A JP2913942B2 (en) 1991-10-15 1991-10-15 Printer control device

Publications (2)

Publication Number Publication Date
JPH05104826A JPH05104826A (en) 1993-04-27
JP2913942B2 true JP2913942B2 (en) 1999-06-28

Family

ID=17429634

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3266344A Expired - Fee Related JP2913942B2 (en) 1991-10-15 1991-10-15 Printer control device

Country Status (1)

Country Link
JP (1) JP2913942B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1995016950A1 (en) * 1993-12-14 1995-06-22 Apple Computer, Inc. Method and apparatus for transferring data between a computer and a peripheral storage device

Also Published As

Publication number Publication date
JPH05104826A (en) 1993-04-27

Similar Documents

Publication Publication Date Title
US6985257B2 (en) Job processing apparatus
JP3639685B2 (en) Printing apparatus and printing control method
US5297876A (en) Page printer with internal and external memories
JP2913941B2 (en) Printer control device
JP2913942B2 (en) Printer control device
JPH11191042A (en) Data processor, data processing method therefor, and storage medium stored with computer-readable program
US20020080383A1 (en) Output control method and apparatus therefor
JPH10297057A (en) Image forming apparatus, method thereof, information processing apparatus, method thereof, and memory medium
JP2913934B2 (en) Printer device
JP4366207B2 (en) PRINT CONTROL DEVICE, PRINT DEVICE, PROGRAM START METHOD, AND PROGRAM
JP2595978B2 (en) Font management device
JP3585206B2 (en) Output device and output method
JP3610194B2 (en) Print control apparatus, print control method, and storage medium storing computer-readable program
KR100366657B1 (en) Method of reverse-transforming print output image data to text data file and apparatus therefor
JPH01112424A (en) Electronic equipment
JP3073921B2 (en) Print control device and data processing method of print control device
JP4560172B2 (en) Partition information update system, partition information update device, partition information update method, and storage medium
JP2891857B2 (en) Printing apparatus and printing method
JPH0596824A (en) Printer device
JP2000015899A (en) Printer, printing system and environment setting method
JP2913943B2 (en) Printer control device
JPH11219268A (en) Printing system
JPH08282024A (en) Printing device
JPH10114127A (en) Printer
JP2958226B2 (en) Print control device and print control method

Legal Events

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