JPH05169736A - Printer and printer controlling method - Google Patents

Printer and printer controlling method

Info

Publication number
JPH05169736A
JPH05169736A JP3343288A JP34328891A JPH05169736A JP H05169736 A JPH05169736 A JP H05169736A JP 3343288 A JP3343288 A JP 3343288A JP 34328891 A JP34328891 A JP 34328891A JP H05169736 A JPH05169736 A JP H05169736A
Authority
JP
Japan
Prior art keywords
emulation
printer
data
switching
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.)
Pending
Application number
JP3343288A
Other languages
Japanese (ja)
Inventor
Koji Fukunaga
耕司 福長
Atsushi Taneda
淳 種田
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP3343288A priority Critical patent/JPH05169736A/en
Priority to US07/994,923 priority patent/US20030156129A1/en
Priority to ES92311819T priority patent/ES2127747T3/en
Priority to EP92311819A priority patent/EP0549369B1/en
Priority to DE69228593T priority patent/DE69228593T2/en
Publication of JPH05169736A publication Critical patent/JPH05169736A/en
Priority to US08/506,339 priority patent/US6081663A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To print with correct emulation by providing a means for switching an emulation based on emulation information and a determining means for determining a break-point of a printing data. CONSTITUTION:At a step S500, it is determined whether an emulation switch setup flag is set or not. When it is set, the program proceeds to a step S501 so as to determine whether a time-out is designated or not. When the time-out is designated, the program proceeds to a step S502 so as to determine whether the time-out flag is set or not. When the time-out is set, the program proceeds to a step S503 where the emulation switch flag is set and returned. When the time-out is not designated at the S501, the program proceeds to a step S504. When a page end is designated, the program proceeds to a step S505. When a page flag is set, the program proceeds to a step S506 where the emulation switch flags set and returned. When the page flag is not set, it is returned.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、エミュレーションを切
り替えることができるプリンタ及びプリンタ制御方法に
関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a printer capable of switching emulation and a printer control method.

【0002】[0002]

【従来の技術】従来、プリンタのエミュレーション切り
替えはプリンタに付加されたスイッチの切り替えで行な
うか、印字を制御するコマンドをプリンタに送信するこ
とにより行なわれるように構成されている。また、エミ
ュレーション切り替えと印字データの転送とが誤りの無
いように同期して行なわれる必要があった。
2. Description of the Related Art Conventionally, the emulation of the printer is switched by switching a switch added to the printer or by sending a command for controlling printing to the printer. Further, the emulation switching and the transfer of the print data have to be performed synchronously so that there is no error.

【0003】[0003]

【発明が解決しようとしている課題】しかしながら、上
記従来例では、ホスト側からプリンタ側のエミュレーシ
ョン切替えが出来ないか、あるいはホスト側からプリン
タ側のエミュレーション選択状態を知る手段が無かった
ため、ホスト側からはプリンタ側の状態を無視してエミ
ュレーション切り替えを行なっていた。このため不必要
なエミュレーション切り替えにより、予め設定された情
報やデータ等が失われることもあった。
However, in the above-described conventional example, the host side cannot switch the emulation of the printer side, or there is no means for the host side to know the emulation selection state of the printer side. The emulation switching was performed while ignoring the printer status. For this reason, preset information and data may be lost due to unnecessary emulation switching.

【0004】また、エミュレーション切り替えと印字デ
ータの転送とが正しく行なわれないと、印字データの途
中で別のエミュレーションが実行され、所望の印字が得
られないことが発生していた。
If the emulation switching and the transfer of the print data are not performed correctly, another emulation is executed in the middle of the print data, and the desired print cannot be obtained.

【0005】[0005]

【課題を解決するための手段(及び作用)】本発明によ
れば、ホスト側からプリンタ側のエミュレーション切替
えが出来、ホスト側からプリンタ側のエミュレーション
選択状態を知ることが出来るようにしたものである。ま
た、本発明によれば、エミュレーション切り替えと印字
データの転送とが同期していない場合でも、印字データ
の区切れを判定して正しいエミュレーションで印字が行
なわれるようにしたものである。
According to the present invention, the host side can switch the emulation of the printer side and the host side can know the emulation selection state of the printer side. .. Further, according to the present invention, even when the emulation switching and the transfer of the print data are not synchronized, the break of the print data is determined and the printing is performed by the correct emulation.

【0006】本発明によればホストから指定されるエミ
ュレーション情報を記憶する記憶手段、前記記憶手段に
記憶されたエミュレーション情報に基づいて、エミュレ
ーションを切り替えるエミュレーション切り替え手段、
印字データの区切れを判定する判定手段とを有するプリ
ンタを提供できる様にしたものである。
According to the present invention, storage means for storing emulation information designated by the host, emulation switching means for switching emulation based on the emulation information stored in the storage means,
It is possible to provide a printer having a determination means for determining the break of print data.

【0007】本発明によれば、ホストから指定されるエ
ミュレーション情報を記憶し、前記記憶されるエミュレ
ーション情報と、印字データの区切れに基づいて、エミ
ュレーションの切り替えを行なうプリンタ制御方法を提
供できる様にしたものである。
According to the present invention, it is possible to provide a printer control method for storing emulation information designated by the host and switching the emulation based on the stored emulation information and the division of the print data. It was done.

【0008】[0008]

【実施例】【Example】

(実施例1)以下、添付図面を参照して本発明の好適な
実施例を詳細に説明する。尚、本発明でいう国指定は、
言語別、地域別等、文書処理に係るある条件で特定され
る複数のグループの中から所望のグループを指定するこ
とをいう。尚、グループはイギリスという指定でイギリ
ス、米国等の複数を含める場合もあれば、日本という国
を指定して、その国1つを指定する場合もあるが、ほぼ
使用言語に対応しているものである。
(Embodiment 1) Hereinafter, a preferred embodiment of the present invention will be described in detail with reference to the accompanying drawings. The country designation in the present invention is
Designating a desired group from a plurality of groups specified by certain conditions related to document processing, such as language and region. In addition, the group may include a plurality of countries such as the United Kingdom and the United States by designating the United Kingdom, or may specify the country of Japan and one of the countries, but it corresponds to almost all the languages used. Is.

【0009】図1は本発明の実施例としての情報処理装
置としてのパーソナルコンピュータ(以下パソコンと略
す)を示す斜視図である。パソコン1は、装置本体10
1、キーボード102、表示部103を備える上カバー
104、及びプリンタ2等の各部によって構成される。
上カバー104は、装置本体101に対して、その後縁
の両端に設けられたヒンジ104aを介して回動可能に
取り付けられている。これにより本装置の使用時には、
上カバー104は、その回動によって表示部103が視
易くなる位置まで開けられ、また、不使用時は閉じられ
てカバーとして機能することができる。表示部103の
表示素子としては、表示部を薄く構成できることから液
晶表示素子が用いられる。
FIG. 1 is a perspective view showing a personal computer (hereinafter abbreviated as a personal computer) as an information processing apparatus as an embodiment of the present invention. PC 1 is the device body 10
1, a keyboard 102, an upper cover 104 including a display unit 103, a printer 2, and the like.
The upper cover 104 is rotatably attached to the apparatus main body 101 via hinges 104a provided at both ends of its rear edge. As a result, when using this device,
The upper cover 104 can be opened to a position where the display 103 can be easily seen by the rotation thereof, and can be closed when not in use to function as a cover. As the display element of the display section 103, a liquid crystal display element is used because the display section can be made thin.

【0010】[Host−Printerの概略ブロッ
ク図]図2に、ホストコンピュータとプリンタの概略ブ
ロック図を示す。
[Schematic Block Diagram of Host-Printer] FIG. 2 shows a schematic block diagram of a host computer and a printer.

【0011】まずホストコンピュータにおいては、主制
御をつかさどっているのが中央処理装置(CPU)であ
り、その基本的な制御を指示するのがBIOS ROM
(Basic Input Output Syste
m ROM)である。フロッピーディスク(FDD)や
ハードディスク(HDD)からフロッピーディスクコン
トローラ(FDC)やハードディスクコントローラ(H
DC)を経由してアプリケーション プログラムを読み
出し、システムメモリ(RAM)を利用してプログラム
の実行を行なう。この時、画面の表示方法としてはLC
Dコントローラ(LCDC)を使って液晶(LCD)に
キャラクタ等の表示を行ない、キーボード(KB)から
のキー入力はキーボードコントローラ(KBC)を経由
して行なわれる。ここで、数値演算プロセッサ(FP
U)はCPUに対して演算処理のサポートを行なうもの
である。また、リアルタイムクロック(RTC)は現時
点の経過時間を示すものでシステム全体の電源が切られ
た状態においても、専用バッテリーにより動作は行なわ
れる。DMAコントローラ(DMAC)は、メモリ〜メ
モリ間、メモリ〜I/O間、I/O〜I/O間において
高速にデータの転送を行なう為に、CPUの介在なしで
データ転送を行なう。割り込みコントローラ(IRQ
C)は各I/Oからの割り込みを受け付け、優先順位に
従って処理を行なう。タイマ(TIMER)は、数チャ
ンネルのフリーランニングタイマを持ち、種々の時間管
理を行なう。その他に外部につながる、シリアルインタ
フェース(SIO)、拡張ポート(PORT)や、ユー
ザに動作状況を伝えるLEDがある。
First, in the host computer, it is the central processing unit (CPU) that controls the main control, and it is the BIOS ROM that directs the basic control.
(Basic Input Output System
m ROM). From floppy disk (FDD) or hard disk (HDD) to floppy disk controller (FDC) or hard disk controller (H
The application program is read via the DC) and the program is executed using the system memory (RAM). At this time, the screen display method is LC
Characters and the like are displayed on the liquid crystal (LCD) using the D controller (LCDC), and key input from the keyboard (KB) is performed via the keyboard controller (KBC). Here, the numerical processor (FP
U) supports arithmetic processing for the CPU. The real-time clock (RTC) indicates the elapsed time at the present time, and the operation is performed by the dedicated battery even when the power of the entire system is turned off. The DMA controller (DMAC) transfers data at high speed between memories, between memories, between memories and I / O, and between I / O and I / O, so that data transfer is performed without intervention of the CPU. Interrupt controller (IRQ
C) accepts interrupts from each I / O and performs processing according to the priority order. The timer (TIMER) has a free-running timer of several channels and manages various times. In addition, there are a serial interface (SIO), an expansion port (PORT), and an LED that communicates the operating status to the user, which are connected to the outside.

【0012】一般のパソコンが持つ上記の各制御に加え
て、ノートブック型パーソナルコンピュータ(パソコ
ン)に於ては、ACアダプター/電池の少なくとも2電
源に対応する必要があり、特に電池使用時の省電力が必
要となり、以下の構成を有する。ELのインバータ回路
のon−off/FDDへの電源供給/HDDへの電源
供給/printer−off/RAM及びVRAM以
外のディバイスへの電源供給の各時間制御や、CPU等
のCLOCK制御、サスペンド/レジューム時の電源制
御手順等を制御するホストパワーマネージメント部(ホ
ストPM部)と、ホストPM部の指示信号によりRAM
及びVRAMをサスペンド時とcpu−clock動作
時とで切り替えてrefreshするためのリフレッシ
ュコントローラと、2次電池をチャージしながらホスト
側も駆動可能なチャージコントローラよりなる。
In addition to the above-mentioned controls of a general personal computer, it is necessary for a notebook personal computer (personal computer) to support at least two power sources of an AC adapter / battery. It requires power and has the following configuration. Each time control of power supply to on-off / FDD of EL inverter circuit / power supply to HDD / printer-off / power supply to devices other than RAM and VRAM, CLOCK control of CPU, suspend / resume. A host power management unit (host PM unit) that controls the power supply control procedure at the time, and a RAM by an instruction signal from the host PM unit
And a refresh controller for switching and refreshing the VRAM between suspend and cpu-clock operations, and a charge controller capable of driving the host side while charging the secondary battery.

【0013】プリンタは、ホストコンピュータ対して汎
用のパラレルインタフェースでつながる形になり、I/
Oポートのレジスタレベルでデータ送受信を行ない、接
続のイメージとしては外部プリンタとやり取りした時と
同等となる。
The printer is connected to the host computer through a general-purpose parallel interface, and I / O
Data transmission / reception is performed at the register level of the O port, and the image of connection is the same as when exchanged with an external printer.

【0014】●[Printerのブロック図]図3は
プリンタ部の制御系の構成を示すブロック図で主な構成
は以下の通りである。
[Block Diagram of Printer] FIG. 3 is a block diagram showing the configuration of the control system of the printer section, and the main configuration is as follows.

【0015】ここでCPU−Pはプリンタ部の主制御を
なすマイクロプロセッサ形態のCPUで有り、プリンタ
ーコントロール&ステータスポート部のPST/IOレ
ジスタを介してホスト側からアクセス可能なPST/I
Oレジスタとの間でプリンターのステータス情報やエミ
ュレーション設定の情報授受を行ない、この状態設定に
基づきホスト側から後述のパラレルIFアダプタ部のP
IO/IOレジスタを介して得られるプリンタコマンド
やデータに従って所望の状態処理及び印字処理を後述の
ROM−Pにあらかじめマイクロコード化して格納され
たプログラムやデータに則りCPU−P上のディバイス
/レジスター/メモリーを用いて行なう。ROM−Pは
CPU−Pが実行する記録制御手順及び印字制御手順等
に対応したプログラム、キャラクタージェネレータ(C
G)、その他のテーブル及びデフォルト値等の固定デー
タを格納するROM(リードオンリーメモリー)であ
る。TIMER1ーPは紙送りモータ(FM)/ヒータ
等の駆動相時間及びその他の時間タイミングを得る為の
TIMERで、RTC−Pは回復動作の経過時間を知る
ためのRTC(リアルタイムクロック)である。また、
複合制御UNITは、IF転送制御/省電力制御/RA
Mアクセス制御/プリンタコントロール&ステータス制
御/プリンタポート制御等から構成され、この内RAM
アクセス制御/プリンタコントロール&ステータス制御
/省電力制御等はCPU−Pの制御によらずCPU−P
のクロック停止及びフォルト中であっても独立した制御
が可能である。以上の構成がCPU−PのBUSに接続
されている。RAM−Pはレジスタとして用いるワーク
領域、1ライン分の印字データを格納する為のラインバ
ッファ、ドットに再展開されたドット展開バッファ、パ
ラレルIFからのINPUTバッファ、エミュレーショ
ン情報記録等の領域を有するRAM(ランダムアクセス
メモリー)で、複合制御UNITとの間をRAM bu
sによって接続され、複合制御UNITのRAM制御部
によりRAM−Pが後述するCPU−Pをはじめ複数の
制御部からのアクセスが可能となっている。複合制御U
NITからは各プリンタ駆動制御信号が出力され、FM
駆動回路/CM駆動回路/ヘッドドライバー/ヒータド
ライバではFM/CM/BJ−Head/ヒータ等の駆
動レベルに変換し、プリンタのFM(フィードモータ
ー)/CM(キャリアモーター)/BJ−Head各部
が駆動される。省電力制御信号として複合制御UNIT
からVcc1P−off/Vcc2P−off/Vp−
offの電源コントロール信号と、入力信号としてPr
inter−off/プリンタセンサー類/操作パネル
SW、出力信号として操作パネルのLED駆動信号等を
持つ。このうちPrinter−off信号のアクティ
ブからインアクティブの変化のみによってVcc1−P
の電源供給がなされて、複合制御UIT/CPU−P/
RAM−Pのみに電源供給が可能となる。また、Vcc
1P−offはprinter−off信号をプリンタ
の駆動状況に合わせて、変更したOFFタイミングでV
cc1Pなる電源を切ることが可能となっている、即ち
ヘッドがキャップオープン状態で電源が切れてしまい、
致命的な障害を及ぼすことがないのである。
Here, the CPU-P is a microprocessor type CPU that performs the main control of the printer unit, and the PST / I accessible from the host side via the PST / IO register of the printer control & status port unit.
Printer status information and emulation setting information are exchanged with the O-register, and based on this status setting, the host side P
A device / register / on the CPU-P according to a program or data pre-microcoded and stored in a ROM-P, which will be described later, according to a printer command or data obtained via the IO / IO register. Use memory. The ROM-P is a program, a character generator (C) corresponding to the recording control procedure and the print control procedure executed by the CPU-P.
G), a ROM (Read Only Memory) for storing fixed data such as other tables and default values. TIMER1-P is a TIMER for obtaining the drive phase time of the paper feed motor (FM) / heater and the like and other time timings, and RTC-P is an RTC (real time clock) for knowing the elapsed time of the recovery operation. Also,
Combined control UNIT is IF transfer control / power saving control / RA
RAM consisting of M access control / printer control & status control / printer port control
Access control / printer control & status control / power saving control, etc. do not depend on CPU-P control.
Independent control is possible even during the clock stop and fault. The above configuration is connected to the BUS of the CPU-P. RAM-P is a RAM having a work area used as a register, a line buffer for storing print data for one line, a dot expansion buffer re-developed into dots, an INPUT buffer from a parallel IF, and an emulation information recording area. (Random access memory), RAM bu to and from the composite control unit
The RAM control unit of the composite control unit allows the RAM-P to be accessed from a plurality of control units including the CPU-P described later. Combined control U
Each printer drive control signal is output from NIT, and FM
The drive circuit / CM drive circuit / head driver / heater driver converts the drive level to FM / CM / BJ-Head / heater, etc., and drives the FM (feed motor) / CM (carrier motor) / BJ-Head parts of the printer. To be done. Combined control unit as power saving control signal
To Vcc1P-off / Vcc2P-off / Vp-
Off power control signal and Pr as input signal
It has inter-off / printer sensors / operation panel SW and an LED driving signal of the operation panel as an output signal. Of these, Vcc1-P is generated only by the change of the Printer-off signal from active to inactive.
Power is supplied to the composite control UIT / CPU-P /
Power can be supplied only to the RAM-P. Also, Vcc
1P-off is V at the changed OFF timing according to the printer driving status of the printer-off signal.
It is possible to turn off the power of cc1P, that is, the head is in the cap open state and the power is turned off,
It does not cause fatal damage.

【0016】図4に複合制御UNITの構成図を示す。FIG. 4 shows a block diagram of the composite control unit.

【0017】機能ブロックとしては、主としてホスト側
からのIFアダプタとして機能するパラレルIFアダプ
タ、パラレルIFアダプタを介してRAM−Pのinp
ut−buffer上にパラレルデータの格納を行なう
IFデータ取込み制御部、主としてホスト側から直接プ
リンタの状態を確認コントロールする為のプリンタコン
トロール&ステータスポート部、RAM−Pのリフレッ
シュタイミングを発生するリフレッシュ制御部、RAM
−P上の1ラインドット展開データを読みだしてBJヘ
ッドを駆動印字しつつ合わせてキャリアの相励磁も制御
するBJ−ヘッド/CM制御部と、FM/ヒータ/LE
D等を駆動するプリンタポート制御部と、IFデータ取
り込み制御部とリフレッシュ制御部とBJ−ヘッド/C
M制御部とCPU−Pの4つのアクセス要求に対して優
先度別にアクセス権を持つRAMアクセス制御部と、省
電力制御を行なうプリンタPM部で構成される。省電力
制御については後述するがCPU−Pをフォルト状態で
供給クロックを停止させる低消費電力モードからの通常
処理状態への復帰は、PM制御部で集中して管理される
各種割り込みによってもたらされ、CPU−Pを復帰さ
せる条件がととのったのちINTとして出力されCPU
−Pは再開して処理を行なう。
As a functional block, a parallel IF adapter mainly functions as an IF adapter from the host side, and an inp of the RAM-P via the parallel IF adapter.
IF data fetching control unit for storing parallel data on ut-buffer, printer control & status port unit mainly for confirming and controlling the printer state directly from the host side, refresh control unit for generating RAM-P refresh timing , RAM
-BJ-head / CM control unit that reads out the 1-line dot development data on P and drives and prints the BJ head while also controlling the phase excitation of the carrier, and FM / heater / LE
Printer port control unit for driving D, etc., IF data acquisition control unit, refresh control unit, BJ-head / C
An M control unit and a RAM access control unit that has access rights according to priority for four access requests of the CPU-P, and a printer PM unit that performs power saving control. Although power saving control will be described later, the return from the low power consumption mode in which the supply clock is stopped in the CPU-P fault state to the normal processing state is brought about by various interrupts centrally managed by the PM control unit. , CPU-P return condition is output and then output as INT
-P resumes processing.

【0018】図5にはパラレルIFアダプタ部のホスト
側からみえるIOレジスタ(PIO/IO)の構成を示
すが、IF send data/IF receiv
edata/IF status/Buffer SP
/IFコントロールの各レジスタからなりホスト→プリ
ンタ部へのパラレルIF転送制御用のレジスタ群であ
る。
FIG. 5 shows the configuration of the IO register (PIO / IO) seen from the host side of the parallel IF adapter section. IF send data / IF receive
data / IF status / Buffer SP
/ IF control registers for controlling parallel IF transfer from the host to the printer unit.

【0019】図6は、IFデータ取り込み制御部でプリ
ンタ側からみえるIOレジスタ(PIF/IO)の構成
を示すが、IB start/IB end/IB P
OINT/IBstatus/IB制御情報/IB s
end dataの各レジスタからなり、各レジスタの
機能については後述する。
FIG. 6 shows the configuration of the IO register (PIF / IO) which can be seen from the printer side in the IF data fetching control unit. IB start / IB end / IB P
OINT / IBstatus / IB control information / IB s
The register is composed of end data registers, and the function of each register will be described later.

【0020】図7は、プリンタポート制御部でプリンタ
側からみえるIOレジスタ(PFM/IO)の構成を示
すが、FM相砺磁/SHヒータ信号/LEDコントロー
ルの各レジスタで構成される。
FIG. 7 shows the configuration of the IO register (PFM / IO) that can be seen from the printer side in the printer port control unit, which is composed of FM phase susceptibility / SH heater signal / LED control registers.

【0021】図8は、BJ−ヘッド/CM制御部でプリ
ンタ側からみえるIOレジスタ(PBJ/IO)の構成
を示すが、PB start/PB end/PB P
OINT/PB status/PB制御情報/CM相
砺磁情報の各レジスタからなる。
FIG. 8 shows the configuration of the IO register (PBJ / IO) which can be seen from the printer side in the BJ-head / CM control section. PB start / PB end / PBP
It consists of each register of OINT / PB status / PB control information / CM phase magnetic field information.

【0022】図9は、プリンタPM部でプリンタ側から
みえるIOレジスタ(PFM/IO)の構成を示すが、
PPM status/PPM制御情報の各レジスタで
構成される。
FIG. 9 shows the configuration of the IO register (PFM / IO) seen from the printer side in the printer PM section.
It is configured by each register of PPM status / PPM control information.

【0023】図10は、プリンタコントロール&ステー
タスポート部でホスト側からみえるIOレジスタ(PS
T/IO)の構成を示すが、PSステータス/EMコン
トロール/EMステータスの各レジスタで構成される。
FIG. 10 shows an IO register (PS) which can be seen from the host side in the printer control & status port section.
(T / IO), it is composed of PS status / EM control / EM status registers.

【0024】図11は、プリンタコントロール&ステー
タスポート部でCPU−P側からみえるIOレジスタ
(HWR/IO)の構成を示すが、IPSステータス/
IEMコントロール/IEMコンディションの各レジス
タで構成される。前述のPST/IOレジスタとHWR
/IOレジスタとの関係は、プリンタコントロール&ス
テータスポート部の制御により以下の通りに処理され
る。
FIG. 11 shows the configuration of the IO register (HWR / IO) seen from the CPU-P side in the printer control & status port section.
It is composed of IEM control / IEM condition registers. The above-mentioned PST / IO register and HWR
The relationship with the / IO register is processed as follows by the control of the printer control & status port section.

【0025】CPU−Pにより書込まれるプリンタ状態
及びエミュレーションハンドシェーク状態を示すHWR
/IOのIPSステータスレジスタはそのままPST/
IOのPSステータスレジスタでホストCPUにより確
認することができる。また、PST/IOのEMコント
ロールレジスタ及びEMコンディションレジスタはホス
トCPUがプリンタ部のエミュレーションモード設定及
び個々のエミュレーションに係わる各種の設定条件を変
更する目的で用いられる。即ち、ホストCPUからEM
コントロールレジスタにエミュレーションモードの書き
込みがあると、プリンタのCPU−Pに割り込みが発生
し、この割り込み処理で設定されたエミュレーションモ
ードをIEMコントロールレジスタから読みだしてプリ
ンタのパラレルIFより転送されるコマンドの解析を設
定されたエミュレーションモードに切り換えると共に、
新しく設定されたエミュレーションモード及び変更モー
ドにおける各種のプリンタ設定情報をIEMコントロー
ルレジスタ及びIEMコントロールレジスタ及びIEM
コンディションレジスタに書き込む、この情報はEMコ
ントロールレジスタ及びEMコンディションレジスタに
見えているのでホストCPUは変更されたエミュレーシ
ョンモードに対する各種のプリンタ設定情報を確認する
ことができる。同様に今度はプリンタ設定情報を変更し
たい場合にはEMコンディションレジスタにホストCP
Uは変更する各種のプリンタ設定情報を書き込むことで
変更が完了する。PSステータスレジスタのEMセット
レディイ及びEMアクノレッジビットは上記のハンドシ
ェークの為に用いられていて、それぞれEMコントロー
ルレジスタ及びEMコンディションレジスタへの書き込
み可と、変更が完了してEMコントロールレジスタ及び
EMコンディションレジスタへ変更後の状態情報が確定
していることを示す。またこれらのビツトはHWR/I
OレジスタのIPSステータスレジスタのIEMセット
レディイ及びIEMアクノレッジビットのCPU−Pか
らの書き込みにそれぞれ対応している。
HWR indicating printer status and emulation handshake status written by CPU-P
/ IO IPS status register is PST /
It can be confirmed by the host CPU in the IO PS status register. The EM control register and EM condition register of the PST / IO are used for the purpose of the host CPU changing emulation mode setting of the printer unit and various setting conditions relating to each emulation. That is, from the host CPU to EM
When the emulation mode is written in the control register, an interrupt occurs in the CPU-P of the printer, the emulation mode set by this interrupt processing is read from the IEM control register, and the command transferred from the parallel IF of the printer is analyzed. While switching to the set emulation mode,
Various printer setting information in the newly set emulation mode and change mode is displayed in the IEM control register, the IEM control register, and the IEM.
This information written in the condition register is visible in the EM control register and the EM condition register, so that the host CPU can confirm various printer setting information for the changed emulation mode. Similarly, if you want to change the printer setting information this time, set the host CP in the EM condition register.
The change is completed by the U writing various printer setting information to be changed. The EM set ready and EM acknowledge bits of the PS status register are used for the above handshake. Writing to the EM control register and EM condition register is possible, and the EM control register and EM condition register have been changed. Indicates that the status information after change to has been confirmed. Also, these bits are HWR / I
It corresponds to the writing from the IEM set ready of the IPS status register of the O register and the IEM acknowledge bit from the CPU-P, respectively.

【0026】図12はプリンタのI/Oデータレジスタ
のマップを示す。
FIG. 12 shows a map of the printer I / O data register.

【0027】この中でモータコントロールポートは、レ
ジスタの値を直接書き換えることによりポートを制御
し、各モータを駆動するものである(CM1〜CM4、
FM1〜FM4)。
Among them, the motor control port controls the port by directly rewriting the value of the register to drive each motor (CM1 to CM4,
FM1 to FM4).

【0028】印字バッファエリアは、印字に必要なデー
タ領域を設定するもので、開始アドレス(PB STA
RT)と終了アドレス(PB END)を設定すること
により、その範囲内で印字バッファコントローラによっ
て開始アドレスから順番に印字データを読み出し、終了
アドレスに至るまでRAM−Pから印字データを読み出
し、ヘッドドライバに制御信号を送出する。この時、印
字データアドレスポインタ(PB POINT)は現在
データ送出中のデータアドレスを示している。
The print buffer area is for setting a data area required for printing, and has a start address (PB STA
RT) and end address (PB END) are set, the print buffer controller sequentially reads the print data from the start address within the range, and the print data is read from the RAM-P until the end address, and the print data is read to the head driver. Send a control signal. At this time, the print data address pointer (PB POINT) indicates the data address currently being sent out.

【0029】受信データバッファエリアも同様に、受信
に必要なデータ領域を設定するもので、開始アドレス
(IB START)と終了アドレス(IB END)
を設定することにより、その範囲内で受信バッファコン
トローラによって開始アドレスから順番に受信データを
書き込み、終了アドレスに至るまでRAM−Pへ受信デ
ータを書き込む。この時、受信データアドレスポインタ
(IB POINT)は現在データ受信済になっている
データアドレスを示している。
Similarly, the reception data buffer area also sets a data area required for reception, and has a start address (IB START) and an end address (IB END).
By setting, the reception buffer controller writes the reception data in order from the start address within the range, and the reception data is written to the RAM-P up to the end address. At this time, the reception data address pointer (IB POINT) indicates the data address that has already received the data.

【0030】図13では上記動作におけるRAM−P上
での印字バッファ(PB)と受信バッファ(IB)のア
ドレス領域をおのおの示している。各アドレスは、図1
2に示す様に、プリンタI/Oレジスタにおいて、指示
されている。インターフェース領域は、ホストコンピュ
ータとプリンタ間での共通I/O領域である。
FIG. 13 shows the address areas of the print buffer (PB) and the receive buffer (IB) on the RAM-P in the above operation. Each address is shown in Figure 1.
As shown in 2, the instruction is given in the printer I / O register. The interface area is a common I / O area between the host computer and the printer.

【0031】インターフェース領域の部分は、ホストコ
ンピュータとのデータのやり取りを行なう領域であり、
ホストコンピュータにおいてはパラレルインターフェー
スポートに相当する。
The interface area is an area for exchanging data with the host computer.
It corresponds to a parallel interface port in the host computer.

【0032】インターフェース領域については、図14
においてホストコンピュータとプリンタのインターフェ
ース領域における相関関係を示した図で説明する。
The interface area is shown in FIG.
Will be described with reference to a diagram showing the correlation in the interface area between the host computer and the printer.

【0033】ホスト側におけるI/Fデータ、I/Fス
テータス、I/Fコントロールのレジスタが、プリンタ
側のI/Fデータ、I/Fステータス、I/Fコントロ
ールのレジスタと同一のアドレスを示すように、ホスト
側から見た(n,n+1,n+2)のアドレスが、プリ
ンタ側から見た(m,m+1,m+2)のアドレスと対
応が取れる様にアドレスマップが設定されている。
The I / F data, I / F status, and I / F control registers on the host side show the same addresses as the I / F data, I / F status, and I / F control registers on the printer side. In addition, the address map is set so that the address (n, n + 1, n + 2) seen from the host side can correspond to the address (m, m + 1, m + 2) seen from the printer side.

【0034】すなわち、この部分のアドレスは双方向で
読み書きできるレジスタになっている。
That is, the address of this portion is a register which can be read and written bidirectionally.

【0035】尚、ホストコンピュータ側にも図17に示
す様に、周辺機器を制御するためのI/Oレジスタを備
えていて、ホストコンピュータ内でのI/O制御に使わ
れている。すなわち図2に示した各ブロックのI/O領
域をもっていて、その中のインターフェースの制御領域
についてのみが、プリンタ側のI/Oレジスタのインタ
ーフェース領域と共通になっているという構成になって
いる。
As shown in FIG. 17, the host computer side is also provided with an I / O register for controlling peripheral devices, which is used for I / O control in the host computer. That is, the I / O area of each block shown in FIG. 2 is provided, and only the control area of the interface therein is shared with the interface area of the I / O register on the printer side.

【0036】図15は、本発明が実施もしくは適用され
たインクジェット記録方式を用いたプリンタユニット
(図2)の内部構成を説明するための斜視図である。図
15において、5001はインクタンクであり、501
2はそれに結合された記録ヘッドである。5001のイ
ンクタンクと5012の記録ヘッドで一体型の交換可能
なカートリッジを形成するものである。5014は、そ
のカートリッジをプリンター本体に取り付けるためのキ
ャリッジであり、5003はそのキャリッジを副走査方
向に走査するためのガイドである。
FIG. 15 is a perspective view for explaining the internal structure of a printer unit (FIG. 2) using an ink jet recording system to which the present invention is applied or applied. In FIG. 15, reference numeral 5001 denotes an ink tank, and 501
2 is a recording head coupled to it. The ink tank 5001 and the recording head 5012 form an integral replaceable cartridge. Reference numeral 5014 is a carriage for attaching the cartridge to the printer main body, and reference numeral 5003 is a guide for scanning the carriage in the sub-scanning direction.

【0037】5000は、記録紙3を主走査方向に走査
させるためのプラテンローラである。5024は、プラ
テンローラを回転させるための紙送りモータである。な
お、キャリッジ5014には、記録ヘッド5012に対
して駆動のための信号パルス電流やヘッド温調用電流を
流すためのフレキシブルケーブル(図示せず)が、プリ
ンターをコントロールするための電気回路を具備したプ
リント板(図示せず)に接続されている。
Reference numeral 5000 denotes a platen roller for scanning the recording paper 3 in the main scanning direction. Reference numeral 5024 is a paper feed motor for rotating the platen roller. The carriage 5014 is provided with a flexible cable (not shown) for supplying a signal pulse current for driving and a current for head temperature control to the recording head 5012, and a print circuit provided with an electric circuit for controlling the printer. It is connected to a plate (not shown).

【0038】さらに、上記構成のプリンタユニット2を
詳細に説明する。駆動モータ5013の正逆回転に連動
して駆動力伝達ギア5011、5009を介して回転す
るリードスクリュー5005の螺旋溝5004に対して
係合するキャリッジ5014はピン(不図示)を有し、
矢印a、b方向に往復移動される。5002は紙押え板
であり、キャリッジ移動方向にわたって紙をプラテン5
000に対して押圧する。5007、5008はフォト
カプラでキャリッジ5014のレバー5006のこの域
での存在を確認してモータ5013の回転方向切換等を
行なうためのホームポジション検知手段である。501
6は記録ヘッドの前面をキャップするキャップ部材50
22を支持する部材で、5015はこのキャップ内を吸
引する吸引手段であり、キャップ内開口5023を介し
て記録ヘッド5012の吸引回復を行なう。
Further, the printer unit 2 having the above configuration will be described in detail. The carriage 5014 that engages with the spiral groove 5004 of the lead screw 5005 that rotates via the driving force transmission gears 5011 and 5009 in conjunction with the forward / reverse rotation of the drive motor 5013 has a pin (not shown),
It is reciprocated in the directions of arrows a and b. Reference numeral 5002 denotes a paper pressing plate which holds the paper in the platen 5 in the carriage movement direction.
Press against 000. Reference numerals 5007 and 5008 denote home position detecting means for confirming the existence of the lever 5006 of the carriage 5014 in this area by a photocoupler and switching the rotation direction of the motor 5013. 501
6 is a cap member 50 for capping the front surface of the recording head.
Reference numeral 5015 is a member for supporting the inside of the cap, and 5015 is a suction means for sucking the inside of the cap.

【0039】5017は、クリーニングブレードで、5
019はこのブレード5017を前後方向に移動可能に
する部材であり、本体支持板5018にこれらは支持さ
れている。ブレードは、この形態でなく周知のクリーニ
ングブレードが本例に適用できることはいうまでもな
い。また、5021は、吸引回復の吸引を開始するため
のレバーで、キャリッジ5014と係合するカム502
0の移動に伴って移動し、駆動モータからの駆動力がク
ラッチ切換等の公知の伝達手段で移動制御される。
5017 is a cleaning blade.
Reference numeral 019 is a member that allows the blade 5017 to move in the front-rear direction, and these members are supported by the main body support plate 5018. Needless to say, a well-known cleaning blade can be applied to this example instead of this form. Reference numeral 5021 is a lever for starting suction for suction recovery, and a cam 502 that engages with the carriage 5014.
It moves along with the movement of 0, and the driving force from the driving motor is movement-controlled by a known transmission means such as clutch switching.

【0040】即ち、駆動モータ5013をキャリッジ5
014のホームポジションから逆回転することにより、
動力伝達ギア5011を5010に切り替え(不図
示)、駆動モータ5013からの駆動力がカム5020
を介してレバー5021に伝わり、記録ヘッド5012
のキャッピング及びクリーニング、吸引回復が行なえる
ように構成されている。
That is, the drive motor 5013 is connected to the carriage 5
By rotating backward from the home position of 014,
The power transmission gear 5011 is switched to 5010 (not shown), and the driving force from the drive motor 5013 is applied to the cam 5020.
Is transmitted to the lever 5021 via the recording head 5012.
Capping, cleaning, and suction recovery can be performed.

【0041】図16は図2のホスト側のRAM上のメモ
リーマップの詳細な配置を示す。RAMは標準領域とし
てアドレス0000h〜A0000h、拡張領域として
100000h〜FE0000hとがあり、それぞれ6
40KB、15MBの大きさをもつ領域となる。RAM
はこれらの領域に配置されるようにメモリマッピングさ
れる。
FIG. 16 shows the detailed arrangement of the memory map on the RAM on the host side in FIG. The RAM has addresses 0000h to A0000h as standard areas and 100000h to FE0000h as extended areas, each having 6 areas.
The area has a size of 40 KB and 15 MB. RAM
Are memory-mapped to be placed in these areas.

【0042】RAMの標準領域の先頭部分00000h
〜000400hには、割り込み用のベクタを保存する
エリアがあり、この中に割り込みに対する各処理のエン
トリーアドレスが保存される。
Head portion 00000h of standard area of RAM
At ˜000400h, there is an area for storing the vector for interrupt, and the entry address of each processing for the interrupt is stored in this area.

【0043】図16のビデオRAM領域、及びビデオB
IOS ROM領域は、図2のVGACの中に配置さ
れ、ビデオBIOS ROM領域内にはビデオ制御のた
めのプログラムが保持され、ビデオRAM領域には、ビ
デオ表示データが保持される。
Video RAM area of FIG. 16 and video B
The IOS ROM area is arranged in the VGAC of FIG. 2, a video control program is held in the video BIOS ROM area, and video display data is held in the video RAM area.

【0044】C8000h〜E0000hまでの領域
は、拡張ROM領域となり、拡張ボード等により使用さ
れるROM領域となる。
The area from C8000h to E0000h is an expansion ROM area, which is a ROM area used by an expansion board or the like.

【0045】F0000h〜10000hまでの領域
は、ROM、BIOSに配置され、各種I/Oの処理を
行なうBIOSプログラムを保持している。
Areas from F0000h to 10000h are arranged in the ROM and the BIOS and hold the BIOS programs for performing various I / O processing.

【0046】図17に各I/Oのアドレスマップを示
す。各々のハードウェアに設定されたアドレスポートへ
のデータのリード、ライトにより各々のハードウェアと
のデータのやりとりが行なわれる。一例としてキーボー
ドについて説明すると、キーボードコントローラとのデ
ータのやりとりは60h〜64hのアドレスに配置され
たポートを介して行ない、このうちのデータ受取りポー
トを読み出すことにより、キーボードからのデータを受
けることができる。
FIG. 17 shows an address map of each I / O. Data is exchanged with each hardware by reading and writing data to the address port set in each hardware. Taking a keyboard as an example, data is exchanged with a keyboard controller through a port arranged at an address of 60h to 64h, and a data receiving port can be read out to receive data from the keyboard. ..

【0047】他のアドレスについても、同様に扱うこと
が出きる。
The same applies to other addresses.

【0048】ここでパラレルポート1〜3で示されるの
がインターフェース領域を示していて、前記図14に示
した様に、プリンタのインターフェース領域と共通のI
/O空間になっている。
The interface areas are indicated by the parallel ports 1 to 3, and as shown in FIG. 14, the I area common to the interface area of the printer is used.
/ O space.

【0049】図18、19は、図13の割り込みベクタ
の内容を詳細に示した図で、Oh〜Fhまでがハードウ
ェア割り込み、10h以降をソフトウェアに割り込みに
割り当てている。
18 and 19 are diagrams showing in detail the contents of the interrupt vector shown in FIG. 13, in which Ohh to Fh are hardware interrupts, and 10h and later are assigned to software interrupts.

【0050】各割り込みに対して各エントリーに登録さ
れたアドレスのプログラムが実行される。各エントリー
には、ROM BIOSのプログラム、あるいはRAM
内にあるプログラムへのアドレスがセットされ、ハード
ウェア割り込み時、及びソフトウェア割り込み時に各処
理が実行され、それぞれの処理が行なわれる。
The program of the address registered in each entry is executed for each interrupt. Each entry has a ROM BIOS program or RAM
An address to a program inside is set, each process is executed at the time of a hardware interrupt and a software interrupt, and each process is performed.

【0051】以下、本体側電源投入後の各処理について
説明する。
Each process after turning on the power of the main body will be described below.

【0052】図20に電源投入時のフローチャートで、
まずステップS1に進む。キーボードによるソフトリセ
ット処理も電源投入時と同様に、ステップS1へ入って
来る。ステップS1でPOST処理が行なわれ、POS
T処理はpower onself−testで、各ハ
ードウェアのテスト初期化を実行する。次にステップS
2へ進みシステムプログラム起動のための、ブートプロ
グラムのロードが行なわれる。ブートプログラムはFD
(フロピィディスク)あるいはHD(ハードディスク)
などに保存され、例えば、トラック0、セクタ0に配置
される。トラック0、セクタ0をメモリ内に読み込むこ
とでブートプログラムのロードが行なわれる。ステップ
S1からステップS2まではROM BIOS内に存在
する。次にステップS3へ進み、ロードされたブートプ
ログラムが実行される。ブートプログラムは、FD、あ
るいはHDからOSプログラムをロードするためのプロ
グラムをロードするプログラムで、次にステップS4へ
進み、OSロードプログラムをロードする。次にステッ
プS5へ進み、OSロードプログラムを実行する。OS
ロードプログラムは、OSをメモリ内にロードするため
のプログラムで、まずステップS6でI/Oドライバを
ロードする。I/Oドライバというのは、I/Oを制御
するためのプログラムで、I/OドライバによりOS
は、各種I/Oとのデータのやりとりを行なう。次にス
テップS7へ進み、I/Oのテストと初期化を行なう。
次にステップS8へ進みOSをメモリへロードする。こ
こまでのステップでOSが実行される準備がととのい次
にステップS9へ進んで、OSが実行に移される。OS
は、キーボードからの入力を処理し、各種メッセージを
表示器に表示し、操作者とのやりとりを行なう。OSは
操作者の各種コマンドの入力に従って各種コマンド処理
の実行を行なう。
FIG. 20 is a flowchart when the power is turned on.
First, the process proceeds to step S1. The soft reset process by the keyboard also comes to step S1 similarly to when the power is turned on. In step S1, the POST processing is performed, and the POS
The T process is power on self-test, and the test initialization of each hardware is executed. Then step S
The process proceeds to step 2 and the boot program is loaded to start the system program. The boot program is FD
(Floppy disk) or HD (hard disk)
And is stored in, for example, track 0 and sector 0. The boot program is loaded by reading track 0 and sector 0 in the memory. Steps S1 to S2 exist in the ROM BIOS. Next, in step S3, the loaded boot program is executed. The boot program is a program for loading a program for loading an OS program from the FD or HD, and then proceeds to step S4 to load the OS loading program. Next, in step S5, the OS load program is executed. OS
The load program is a program for loading the OS in the memory, and first loads the I / O driver in step S6. The I / O driver is a program for controlling the I / O, and the I / O driver operates the OS.
Exchanges data with various I / Os. Next, in step S7, I / O test and initialization are performed.
Next, in step S8, the OS is loaded into the memory. When the OS is ready to be executed in the steps so far, the process proceeds to step S9, and the OS is executed. OS
Processes input from the keyboard, displays various messages on the display, and interacts with the operator. The OS executes various command processes according to the input of various commands by the operator.

【0053】図21は、図20のS1のPOSTを詳細
に説明するフローチヤートで、CPU(図2のFPU数
値演算プロセッサ)のテストを行なう(ステップS1
0)。次にROMのテストを行なう(ステップS1
1)。次に電源、バッテリィのチェックを行なう(ステ
ップS12)。次にLCD、LCDアダプタのテストと
初期化を行なうLCDアダプタには、RAM、ROMを
含みそれらのチェックも行なう(ステップS13)。次
に割り込みコントローラのテストと初期化を行なう(ス
テップS14)。次にタイマのテストを行なう(ステッ
プS15)。次にDMAコントローラのテストを行なう
(ステップS16)。次にキーボード、キーボードコン
トローラのテストを行なう(ステップS17)。次にシ
リアルパラレルポートのテスト、初期化を行なう(ステ
ップS18)。次にソフトリセットかどうかをチェック
する(ステップS19)。ソフトリセットならば、ステ
ップS20のRAMのテストと初期化処理をスキップし
ステップS21へ進む。ソフトリセットでない場合ステ
ップS20へ進みRAMのテストと初期化を行なう。次
にFDのテストを行なう(ステップS21)。次にHD
のテストを行なう(ステップS22)。次にリアルタイ
ムクロックのテストを行なう(ステップS23)。次に
プリンタのテストを行なう。プリンタのテストは各種プ
リンタポートのチェックとプリンタ接続のチェックを行
なう(ステップS24)。次にLEDのテストを行なう
(ステップS25)。次に戻りとなる。以上の処理によ
り図20のS1で示すPOST処理が行なわれ、各装置
にエラー等があった場合、それらを知らしめる。
FIG. 21 is a flow chart for explaining the POST of S1 of FIG. 20 in detail, and tests the CPU (FPU numerical arithmetic processor of FIG. 2) (step S1).
0). Next, a ROM test is performed (step S1).
1). Next, the power source and battery are checked (step S12). Then, the LCD adapter for testing and initializing the LCD and the LCD adapter includes a RAM and a ROM and checks them (step S13). Next, the interrupt controller is tested and initialized (step S14). Next, a timer test is performed (step S15). Next, the DMA controller is tested (step S16). Next, the keyboard and keyboard controller are tested (step S17). Next, the serial / parallel port is tested and initialized (step S18). Next, it is checked whether it is a soft reset (step S19). If it is a soft reset, the RAM test and the initialization process in step S20 are skipped and the process proceeds to step S21. If it is not a soft reset, the process proceeds to step S20 to test and initialize the RAM. Next, the FD test is performed (step S21). Next HD
Is tested (step S22). Next, a real time clock test is performed (step S23). Then test the printer. In the printer test, various printer ports and printer connections are checked (step S24). Next, the LED is tested (step S25). Then return. With the above processing, the POST processing shown in S1 of FIG. 20 is performed, and if there is an error or the like in each device, they are notified.

【0054】次に、キーボード割り込み処理とキーコー
ド取得処理について説明する。キーボード割り込み処理
は、キーボードのキー押下に従って、キーボードコント
ローラから割り込みが発生し割り込みコントローラによ
り処理され、キーボード割り込み処理が実行される。キ
ーコード取得処理は、キーボード割り込みにより保存さ
れたキーコードをキーバッファから取り出し、キーコー
ドは必要とする処理に戻される。尚、キーバッファは、
図16のB10Sコモンエリア内に設けられている。キ
ーボード割り込み処理は、図18に示すハードウェア割
り込みのエントリ09hなどに割り当てられ、またキー
コード取得処理は、図18に示すソフトウェア割り込み
のエントリ16hなどに割り当てられる。それぞれキー
ボードから割り込み、ソフトウェア割り込みの呼出しに
より実行に移される。
Next, the keyboard interrupt processing and the key code acquisition processing will be described. In the keyboard interrupt processing, an interrupt is generated from the keyboard controller in accordance with the key press on the keyboard, the interrupt controller processes the interrupt, and the keyboard interrupt processing is executed. In the key code acquisition process, the key code saved by the keyboard interrupt is retrieved from the key buffer, and the key code is returned to the required process. The key buffer is
It is provided in the B10S common area in FIG. The keyboard interrupt process is assigned to the hardware interrupt entry 09h shown in FIG. 18, and the key code acquisition process is assigned to the software interrupt entry 16h shown in FIG. Each is executed by calling an interrupt or software interrupt from the keyboard.

【0055】図22は、キーボード割り込みが発生した
場合の処理に関するフローチャートを示す。同図におい
て、まずキーボード割り込みが発生すると、S30にお
いて、キースキャンコードをI/Oのキーボードに割り
当てられたポートから読みとる。読みとったコードはS
31においてソフトリセットに相当するコードであるか
どうか判断され、YesであればS32で印字バッファ
クリアコマンド送信を実行し、実行後実際のソフトリセ
ット動作を開始する。読みとったコードがソフトリセッ
トでない場合、S33においてキーボードバッファが一
杯でないかどうか確認する。一杯であれば、S34によ
って警告のためBeep音を発生し、処理を終了する。
一杯でなければ、S35によってキースキャンコードを
文字コードに対応したキーコードに変換し、さらに変換
されたキーコードをS36によってキーバッファにセッ
トして処理を終了する。
FIG. 22 is a flowchart showing the processing when a keyboard interrupt occurs. In the figure, first, when a keyboard interrupt occurs, in S30, the key scan code is read from the port assigned to the I / O keyboard. The read code is S
It is judged at 31 whether the code corresponds to the soft reset, and if Yes, the print buffer clear command transmission is executed at S32, and after execution, the actual soft reset operation is started. If the read code is not a soft reset, it is confirmed in S33 whether the keyboard buffer is full. If it is full, a beep sound is generated as a warning in S34, and the process ends.
If it is not full, the key scan code is converted into a key code corresponding to the character code in S35, the converted key code is set in the key buffer in S36, and the process is ended.

【0056】図23はキーコード取得処理に関するフロ
ーチャートを示す。
FIG. 23 is a flowchart showing the key code acquisition process.

【0057】同図において、キーコード取得が開始され
ると、まずS40においてキーボードバッファにキーコ
ードがあるかどうかチェックされる。なければS40を
くり返し、キーコードがキーボードバッファに入れられ
るのを待つ。キーコードが存在した場合、S41におい
てキーコードの変換が必要かどうかチェックされ、必要
な場合、S42によってキーコードの変換が行なわれる
(キーコードの変換は、主として国別にキーボードが異
なる場合などに発生する。)。
In the figure, when the key code acquisition is started, it is first checked in S40 whether or not there is a key code in the keyboard buffer. If not, S40 is repeated until the key code is stored in the keyboard buffer. If there is a key code, it is checked in S41 whether or not the key code needs to be converted, and if so, the key code is converted in S42 (the key code conversion occurs mainly when the keyboard is different for each country, etc.). Yes.).

【0058】キーコードの変換が必要でない時、また必
要でS42において変換が行なわれたあと、S43によ
ってキーコードがキーボードバッファにセットされ、処
理を終了する。
When it is not necessary to convert the key code or after the conversion is necessary in S42, the key code is set in the keyboard buffer in S43, and the process is terminated.

【0059】以上説明した様に、キーボード割り込み処
理内でソフトリセット実行時にプリンタにバッファクリ
アコマンド送信され、プリンタのバッファクリア処理が
行なわれる。
As described above, the buffer clear command is transmitted to the printer when the soft reset is executed in the keyboard interrupt process, and the buffer clear process of the printer is performed.

【0060】次に、国切替えコマンドが実行される場合
について説明する。OSは操作者からの国切替えコマン
ドの指定に従って、以下の国切替え処理を実行する。
Next, the case where the country switching command is executed will be described. The OS executes the following country switching process in accordance with the country switching command specified by the operator.

【0061】図24はホストにおける、キーから入力さ
れるコマンド解析処理のフローを示す図である。
FIG. 24 is a diagram showing a flow of a command analysis process in which a command is input from a key in the host.

【0062】コマンド解析処理が実行されると、S50
においてオペレーターによるキーボードなどからのコマ
ンド入力を受け取り、S51において受け取ったコマン
ドが国切替コマンドであるかどうかチェックする。YE
SであればS52において国切替印字コマンド送信処理
を実行し、再びコマンド入力を持つ。
When the command analysis processing is executed, S50
In step S51, the operator receives a command input from the keyboard, and in step S51, it is checked whether the command received is a country switching command. YE
If it is S, the country switching print command transmission process is executed in S52, and the command is input again.

【0063】NOであれば、S53において他のコマン
ドであるかチェックし、YESであれば、S54におい
て対応する処理が実行され再びコマンド入力を持つ。
If NO, it is checked in S53 whether it is another command. If YES, the corresponding process is executed in S54 and the command is input again.

【0064】S53〜S54は必要なコマンドの数だけ
類似の処理が拡張されているがここでは詳述しない。
In S53 to S54, similar processing is extended by the number of necessary commands, but it will not be described in detail here.

【0065】図25は図24のS52のホスト側におけ
る、国切替え印字コマンド送信処理のフローを示す図で
ある。
FIG. 25 is a diagram showing a flow of country switching print command transmission processing on the host side in S52 of FIG.

【0066】国切替え印字コマンド送信処理が実行され
ると、S60において、送られてきたコマンドに従って
ホスト側の現在の国別モード設定を所望された国別モー
ド設定へと変更する。その情報は、図2のRAMに格納
されている。変更が終了すると、S61において、周辺
機器に対して同様の国切替えを行う為に国切替え印字コ
マンドを送信して処理が終了する。
When the country switching print command transmission process is executed, in S60, the current country mode setting on the host side is changed to the desired country mode setting in accordance with the command sent. The information is stored in the RAM shown in FIG. When the change is completed, in S61, a country switch print command is transmitted to perform the same country switch to the peripheral device, and the process ends.

【0067】国切替え印字コマンド送信処理が実行され
ると、S70において図2の本体(ホスト)側のRAM
に格納された国情報に基づいて変更された国モードを調
べ、プリンタ側に送信すべく、対応する国No.を決定
する。
When the country switching print command transmission process is executed, the RAM on the main body (host) side of FIG.
In order to check the changed country mode based on the country information stored in, and send it to the printer side, the corresponding country number. To decide.

【0068】S71において、決定された国No.に応
じた国にプリンタを切替えるため、国切替え印字コマン
ドを送信して処理を終了する。
In S71, the determined country number. In order to switch the printer to the country corresponding to the above, the country switching print command is transmitted and the processing is ended.

【0069】図27は図25のS61の国切替印字コマ
ンド送信処理をエミュレーションで行なう場合のフロー
を示す図である。
FIG. 27 is a diagram showing a flow in the case where the country switching print command transmission process of S61 of FIG. 25 is performed by emulation.

【0070】国切替印字コマンド送信処理が実行される
と、S80において本体(ホスト)側の図2のRAMに
保存された変更された国情報を調べ、それに対応するエ
ミュレーションNo.を決定する。そのエミュレーショ
ンNo.は、国情報に対応して、テーブル形式で図2の
RAMに格納されている。
When the country switching print command transmission process is executed, the changed country information stored in the RAM of the main body (host) side in FIG. 2 is checked in S80, and the corresponding emulation number. To decide. The emulation No. Are stored in the RAM of FIG. 2 in a table format corresponding to country information.

【0071】S81において、決定されたエミュレーシ
ョンにプリンタを切替えるためにエミュレーション切替
え印字コマンドをプリンタ側へ送信し、処理を終了す
る。
In S81, an emulation switching print command is transmitted to the printer side in order to switch the printer to the decided emulation, and the process is terminated.

【0072】以上により、国切替えコマンドの発行によ
り、ホストの国別モード切替えと、同時にプリンタ側の
国切替えあるいは、プリンタ側のエミュレーション切替
えを行なうことができる。プリンタ側の制御は、後述の
図46で説明する。
As described above, by issuing the country switch command, it is possible to switch the country mode of the host and simultaneously switch the country on the printer side or switch the emulation on the printer side. The control on the printer side will be described later with reference to FIG.

【0073】次にプリンタ側について説明する。Next, the printer side will be described.

【0074】図28は図3に示したRAM−Pで表わさ
れ、バッファ、フラグ等を含むリード/ライトメモリの
詳細を示した図である。図中、受信バッファは本体から
プリンタへ転送された印字コマンド、印字データを受信
するためのバッファで、プリンタの入力ポートに入力し
たデータが保持される。これは図13において説明し
た。印字データエリアは、印字に必要なフラグ、レジス
タを含んだデータエリアで、印字はこのエリアに保持さ
れた値、例えばマージン情報等を用いて行なわれる。
FIG. 28 is a diagram showing details of the read / write memory represented by the RAM-P shown in FIG. 3 and including buffers, flags and the like. In the figure, a reception buffer is a buffer for receiving print commands and print data transferred from the main body to the printer, and holds data input to the input port of the printer. This is explained in FIG. The print data area is a data area including flags and registers necessary for printing, and printing is performed using the value held in this area, for example, margin information.

【0075】図29に図28に示した印字データエリア
内の詳細な内容をしめす。I/Oレジスタの書き込み状
況を示す状態遷移フラグ、データ受取りのタイムアウト
を示すタイムアウトフラグ、エミュレーション切替え要
求を示すエミュレーション切替えフラグ、エミュレーシ
ョン切替え準備フラグ印字データの有無を示す印字デー
タフラグなどのフラグを含む。また、国コードを保持す
る国コード、紙のフィード量を保持するフィード量、デ
ータ受取りのタイムアウトをカウントするタイムアウト
カウンタ、切替えるエミュレーションNo.を保持する
エミュレーションNo.エミュレーション切替えモード
を保持するエミュレーションモード、エミュレーション
切替え条件を保持するエミュレーション条件などのレジ
スタを含む。
FIG. 29 shows the detailed contents in the print data area shown in FIG. The status transition flag indicating the write status of the I / O register, the time-out flag indicating the time-out of data reception, the emulation switching flag indicating the emulation switching request, the emulation switching preparation flag, and the print data flag indicating the presence or absence of print data are included. Also, a country code that holds a country code, a feed amount that holds a paper feed amount, a time-out counter that counts a time-out of data reception, an emulation No. to switch. Emulation No. It includes registers such as the emulation mode that holds the emulation switching mode and the emulation conditions that hold the emulation switching conditions.

【0076】エミュレーションデータエリアはエミュレ
ーションに必要なフラグ、レジスタ、エミュレーション
情報を含んだデータエリアで、エミュレーション処理
は、このエリアに保持された値を用いてエミュレーショ
ンを行なう。さらにこのエミュレーションデータエリア
の内容を図30に詳細に示す。ワークバッファは印字、
エミュレーションで一時的に使用されるワークエリア
で、データの加工、変更等の仕事に利用される。印字バ
ッファ1〜3は印字するためのデータを保持するエリア
で、エミュレーションで作成された印字イメージデータ
が蓄えられ、この印字バッファに保持されたデータが印
字部に転送され印字が実行される。印字にバッファ1〜
3は1つが1度の印字に必要なサイズのデーが保存出
来、本実施例においては、1〜3の3つのバッファを有
する。印字バッファが複数用意されているのは、1つの
印字バッファが実際に印字されている間に他のバッファ
に印字イメージを展開出来る様にするためで、印字バッ
ファへのデータ展開と印字とが平行して行なうことが出
来る。ダウンロードフォントバッファはプリンタ内に持
つフォントデータ以外のフォントを印字する際に本体か
らのフォントデータの転送により、これらの印字を行な
うための、フォントバッファエリアで、このダウンロー
ドフォントにフォントが転送されると、このエリアに保
持されたフォントで印字が行なわれる。
The emulation data area is a data area containing flags, registers, and emulation information necessary for emulation, and the emulation processing uses the value held in this area to perform emulation. Further, the contents of this emulation data area are shown in detail in FIG. The work buffer is printed,
This work area is temporarily used for emulation, and is used for work such as data processing and modification. The print buffers 1 to 3 are areas for holding data to be printed, in which print image data created by emulation is stored, and the data held in the print buffer is transferred to the printing unit to execute printing. Buffer 1 to print
3 can store data of a size required for one printing, and in this embodiment, it has three buffers of 1 to 3. Multiple print buffers are provided so that the print image can be expanded to another buffer while one print buffer is actually being printed. Data expansion to the print buffer and printing are parallel. You can do it. The download font buffer is a font buffer area for printing fonts other than the font data stored in the printer, by transferring font data from the main unit. , Printing is performed with the font held in this area.

【0077】図30はエミュレーションデータエリアの
詳細を示した図で、エミュレーションフラグEMFLA
Gはエミュレーションの番号を保持している。EMFL
AGは2つのビツトB0、B1を用いてエミュレーショ
ンの対応NOは示す。B0、B1は0〜3までの値を持
つことが出来、0がエミュレーション1、1がエミュレ
ーション2、2がエミュレーション3を示す。本実施例
においてはエミュレーション1〜3までに対応してお
り、各エミュレーションはこのエミュレーションフラグ
EMFLAGに登録された値に対応している。EMFL
AGはエミュレーションの切替えコマンドの実行に際し
て指定されたエミュレーションNo.のセットが行なわ
れる。国フラグCNTFLAGは、国番号を保持するバ
ッファで、B0〜B3の4ビットで国のNo.が保持さ
れている。B0〜B3で0〜15までの値をとることが
出来、この値で国のNo.を表わすことができる。本実
施例においては日本、USAの2ヵ国に対しているた
め、値が0ならばUSA、1であれば日本となる。他の
国々についても個別の値を持つことが可能となる。国設
定コマンドに従って国フラグに国No.が設定される。
エミュレーション情報1〜3は各エミュレーションが保
持するエミュレーション情報を保持するエリアで、B0
〜B23の24ビットで表わされるエリアとなる。B0
〜B23の各ビツトはそれぞれのエミュレーションにお
いて必要となる情報、例えば、文字品位やページ長の指
定に使用する。その他、各エミュレーションに用いられ
る初期値となる値を保持し、これらの情報は各情報の設
定、変更コマンドにより設定、変更が可能で、現実行中
のエミュレーションに対応した情報の書換えが行なわれ
る。本実施例では各ビットの内容については説明は省略
するが、必要なエミュレーション情報を持てる。エミュ
レーション情報1〜3はそれぞれ同様の形式をもつが、
ビツトの内容に対する設定は各エミュレーションで特定
することが出来る。
FIG. 30 is a diagram showing the details of the emulation data area, and emulation flag EMFLA.
G holds the emulation number. EMFL
The AG uses two bits B0 and B1 to indicate the corresponding emulation NO. B0 and B1 can have values from 0 to 3, with 0 indicating emulation 1, 1 indicating emulation 2 and 2 indicating emulation 3. In this embodiment, the emulations 1 to 3 are supported, and each emulation corresponds to the value registered in the emulation flag EMFLAG. EMFL
AG is the emulation No. specified when the emulation switching command is executed. Is set. The country flag CNTFLAG is a buffer that holds the country code, and is a 4-bit B0 to B3 bit that indicates the country number. Is held. B0 to B3 can take values from 0 to 15, and with this value the national No. Can be represented. In this embodiment, two countries, Japan and USA, are used. Therefore, if the value is 0, the value is USA, and if the value is 1, it is Japan. It is possible to have individual values for other countries. According to the country setting command, the country No. Is set.
The emulation information 1 to 3 are areas for holding emulation information held by each emulation, and B0
The area is represented by 24 bits of B23 to B23. B0
Bits B23 to B23 are used to specify information necessary for each emulation, such as character quality and page length. In addition, it holds initial values used for each emulation, and these information can be set and changed by setting and changing commands for each information, and the information corresponding to the emulation currently being executed is rewritten. In this embodiment, description of the contents of each bit is omitted, but necessary emulation information can be held. The emulation information 1 to 3 have the same format,
Settings for bit content can be specified for each emulation.

【0078】図31にエミュレーション情報の具体例を
示す。この例ではB0〜B2ビットを用いて各ビツトに
文字品位、縮小文字、文字コードの機能を持たせ、各ビ
ツトが0、1によりそれぞれのエミュレーションでの各
機能の設定を表わしている。各エミュレーションでは同
様の形式にすることも、別々の形式にすることも可能で
ある。複数のビツトを用いていくつかの値を持つ様な分
類を行なうことも出来る。
FIG. 31 shows a specific example of emulation information. In this example, bits B0 to B2 are used to give each bit a function of character quality, reduced character, and character code, and each bit represents 0 or 1 to indicate the setting of each function in each emulation. Each emulation can have a similar format or a separate format. It is also possible to use several bits to perform classification such that some values are included.

【0079】以上、エミュレーションデータエリアに保
持された値に従って各エミュレーションが実行される。
As described above, each emulation is executed according to the value held in the emulation data area.

【0080】図32は、エミュレーション実行のためテ
ーブルを示した図で、図3中のROM−P(プリンタ
側)内に保持される。エミュレーション選択テーブルは
各エミュレーションコントロールテーブルを指すポイン
タを含んでおり、各1〜3のテーブルに対応している。
エミュレーションコントロールテーブル1〜3はエミュ
レーション1〜3の各エミュレーションの管理テーブル
でそれぞれのエミュレーションに対応している。エミュ
レーション初期情報1〜3はそれぞれのエミュレーショ
ン情報の初期値を保持するテーブルで各エミュレーショ
ンに対応して初期値を持つ。この初期値は、コマンド指
定時及び情報未設定時の初期値として用いられ、図30
のエミュレーション情報1〜3のエリアへセットされる
ための値である。エミュレーションプログラム1〜3は
各エミュレーションのプログラムを保持しており、各エ
ミュレーション実行に際してエミュレーションプログラ
ム1〜3のいずれかのエミュレーションが実行される。
FIG. 32 shows a table for emulation execution, which is held in the ROM-P (on the printer side) in FIG. The emulation selection table includes a pointer pointing to each emulation control table and corresponds to each of the tables 1 to 3.
The emulation control tables 1 to 3 are management tables for each emulation of emulations 1 to 3 and correspond to each emulation. The emulation initial information 1 to 3 is a table holding the initial value of each emulation information and has the initial value corresponding to each emulation. This initial value is used as an initial value when a command is specified and when information is not set.
Is a value to be set in the areas of emulation information 1 to 3 of. The emulation programs 1 to 3 hold programs for each emulation, and any one of the emulation programs 1 to 3 is executed when each emulation is executed.

【0081】図33は図32に示したテーブル類の構成
を示した図で、→はポインタを示し、そのアドレスを保
持する。エミュレーション選択テーブルはa〜cのエミ
ュレーションコントロールテーブルへのポインタを有す
る。エミュレーションコントロールテーブルはエミュレ
ーションID、EMIDを有し、これは各エミュレーシ
ョンに対応するエミュレーションの識別子で、各エミュ
レーションに対して個別の値を持つ。エミュレーション
名はエミュレーションの名前を示す文字例で、エミュレ
ーションの名前を知りたい場合に利用することが出来
る。初期情報ポインタはエミュレーション初期情報の初
期値を含んだテーブルを示すポインタで、各初期情報の
テーブルを指す。情報ポインタは各エミュレーション情
報、図30のエミュレーション情報を指すポインタで、
現在のエミュレーション情報を示し、このポインタの先
に在るデータをもとにエミュレーションを実行する。プ
ログラムポインタは、エミュレーションプログラムを指
すポインタで、各エミュレーションが実行するプログラ
ムを示す。このポインタを各エミュレーションの切替え
時に、各プログラムのアドレスとして用いる。
FIG. 33 is a diagram showing the structure of the tables shown in FIG. 32. The symbol .fwdarw. Indicates a pointer and holds its address. The emulation selection table has pointers to the emulation control tables a to c. The emulation control table has emulation IDs and EMIDs, which are identifiers of emulations corresponding to each emulation, and have individual values for each emulation. The emulation name is a character example showing the name of the emulation and can be used when you want to know the name of the emulation. The initial information pointer is a pointer indicating a table containing the initial value of the emulation initial information, and points to each initial information table. The information pointer is a pointer to each emulation information and the emulation information of FIG.
The current emulation information is shown, and emulation is executed based on the data existing at the end of this pointer. The program pointer is a pointer that points to an emulation program and indicates a program executed by each emulation. This pointer is used as the address of each program when switching each emulation.

【0082】図34に図3のROM−P内の図33のエ
ミュレーション初期情報に設定された初期値を示した図
で、この図は、図30のエミュレーション情報に対応し
ており、この実施例の場合の初期値とを示している。こ
のエミュレーションの場合、高品位、普通、カタカナの
設定が初期値となり、このテーブルの内容がエミュレー
ション情報の初期値となる。
FIG. 34 is a diagram showing the initial values set in the emulation initial information of FIG. 33 in the ROM-P of FIG. 3, and this diagram corresponds to the emulation information of FIG. 30. And the initial value in the case of. In the case of this emulation, high-quality, normal, and katakana settings are initial values, and the contents of this table are the initial values of emulation information.

【0083】以上、エミュレーション実行テーブルを用
いて実際のエミュレーションの切替え管理が行なわれ
る。
As described above, actual emulation switching management is performed using the emulation execution table.

【0084】図35はプリンタユニット3の初期化制御
を示すフローチャートである。初期化には3つの項目が
あり、まず始めにキャリッジ5014の初期化を行なう
(S101)。キャリッジ初期化とは、キャリッジ50
14を移動させ、フォトカプラ5007、5008でキ
ャリッジ5014の存在を確認してキャリッジ5014
をホームポジションに位置づけることである。詳細を図
36に示す。
FIG. 35 is a flow chart showing the initialization control of the printer unit 3. There are three items for initialization. First, the carriage 5014 is initialized (S101). Carriage initialization means carriage 50
14 is moved, the presence of the carriage 5014 is confirmed by the photocouplers 5007 and 5008, and the carriage 5014
Is to be placed in the home position. Details are shown in FIG.

【0085】次にキャッピングを行なう(S102)。
キャッピングとはキャップ部材5022で記録ヘッド5
012の前面をキャップする動作であり、記録ヘッド5
012の乾燥を防止する役目を果たす。記録ヘッド50
12は印字している間を除き、キャップ部材5022で
キャップされていなければならない。キャッピング動作
の詳細を図33に示す。
Next, capping is performed (S102).
What is capping is the cap member 5022 and the recording head 5.
012 is an operation of capping the front surface of the recording head 5
It serves to prevent the 012 from drying out. Recording head 50
12 must be capped with a cap member 5022 except during printing. Details of the capping operation are shown in FIG.

【0086】最後に紙送り初期化を行なう(S10
3)。紙送り初期化とは、紙送りモータ5024の初期
化であり、印字行位置を確定するために行なう。本実施
例では詳述しない。
Finally, the paper feed is initialized (S10).
3). Paper feed initialization is initialization of the paper feed motor 5024, and is performed to determine the print line position. It will not be described in detail in this embodiment.

【0087】図36はキャリッジ初期化の詳細フローで
ある。これは図3のCPU−Pによる制御である。キャ
リッジ5014に付属するレバー5006がフォトカプ
ラ5007、5008(HPセンサ)を横切っている
(HPセンサon)ことによってキャリッジ5014が
ホームポジション側領域にあるかが検出でき、HPセン
サがoffからonになった位置がキャリアのホームポ
ジション(HP)となる。
FIG. 36 is a detailed flow of carriage initialization. This is control by the CPU-P in FIG. By the lever 5006 attached to the carriage 5014 crossing the photocouplers 5007 and 5008 (HP sensor) (HP sensor on), it can be detected whether the carriage 5014 is in the home position side area, and the HP sensor is turned off. The position that has become the home position (HP) of the carrier.

【0088】まず、S201でキャリッジ5014が既
にホームポジション側領域にあるかを判定する。すでに
ホームポジション側領域にあればS202に進み、駆動
モータ5013を順方向に45パルス回転(キャリッジ
5014を右方向に45パルス分移動)させ、キャリッ
ジ5014をホームポジション側領域外に移動させる。
S201でHPセンサがonでなければS203、S2
04に進み、駆動モータ5013を逆方向に1パルスず
つ回転(キャリッジ5014を左方向に1パルス分ずつ
移動)させ、キャリッジ5014がホームポジション側
領域になるまで移動させる。S205、S206では再
度、HPセンサがoffなるまでキャリッジ5014を
右方向に1パルス分ずつ移動させ、S207でさらに右
方向に20パルス分移動させる。そしてS208、S2
09でキャリッジ5014を左方向に1パルス分ずつ移
動させ、HPセンサがoffからonになったところで
キャリッジ5014の移動を止め初期化を終了する。
First, in S201, it is determined whether the carriage 5014 is already in the home position side area. If it is already in the home position side area, the process proceeds to S202, the drive motor 5013 is rotated by 45 pulses in the forward direction (the carriage 5014 is moved by 45 pulses in the right direction), and the carriage 5014 is moved to the outside of the home position side area.
If the HP sensor is not on in S201, S203 and S2
In step 04, the drive motor 5013 is rotated in the reverse direction by one pulse (the carriage 5014 is moved in the left direction by one pulse), and the carriage 5014 is moved to the home position side area. In steps S205 and S206, the carriage 5014 is moved rightward by one pulse until the HP sensor is turned off again, and in step S207, the carriage 5014 is further moved rightward by 20 pulses. And S208, S2
At 09, the carriage 5014 is moved leftward by one pulse, and when the HP sensor is turned off, the carriage 5014 is stopped moving and the initialization is completed.

【0089】図37はキャッピングの詳細フローであ
る。駆動モータ5013をキャリッジ5014のホーム
ポジションから逆方向に回転させることによって動力伝
達ギアを切り替え、カム5020を介してレバー502
1を移動させる。レバー5021をキャッピング位置に
移動させるためにキャッピングフローとして以下の3つ
の制御(S301〜S303)が必要となる。まずキャ
リッジ5014がホームポジションにあると駆動モータ
5013を逆方向に34ステップ回転させ、駆動伝達ギ
ア5010、5011を切り替える(S301)。次に
さらに逆方向に11ステップ回転し、キャップ部材50
22を記録ヘッド5012から一度遠ざけ(S30
2)、さらに逆方向に45ステップ回転してキャップ部
材5022を記録ヘッド5012の表面に押しあてて、
キャッピングを完了する(S303)。
FIG. 37 is a detailed flow of capping. By rotating the drive motor 5013 from the home position of the carriage 5014 in the reverse direction, the power transmission gear is switched, and the lever 502 is switched via the cam 5020.
Move 1 In order to move the lever 5021 to the capping position, the following three controls (S301 to S303) are required as a capping flow. First, when the carriage 5014 is at the home position, the drive motor 5013 is rotated in the reverse direction by 34 steps to switch the drive transmission gears 5010 and 5011 (S301). Then, the cap member 50 is further rotated in the opposite direction by 11 steps.
22 from the recording head 5012 once (S30
2) Further, the cap member 5022 is pressed against the surface of the recording head 5012 by rotating in the opposite direction by 45 steps,
Capping is completed (S303).

【0090】次に、プリンタ側のエミュレーション処理
について説明を行なう。プリンタは、3つのエミュレー
ション処理を持ち、各プログラムを切替えることが出来
る。
Next, the emulation processing on the printer side will be described. The printer has three emulation processes and can switch each program.

【0091】図38は、本実施例の印字処理を示したフ
ローチャートで、まずステップS400で初期化処理を
行なう。初期化処理は印字バッファのクリア等の処理を
行なう。次にステップS401へ進み、エミュレーショ
ン選択処理を行なう。この選択処理の詳細は図39に示
す。ステップS401の選択処理によりエミュレーショ
ン1〜3のうちのいずれかが選択され、実行に移され
る。ステップS402〜S404の3つのエミュレーシ
ョンのうちの1つのエミュレーションが行なわれる。各
エミュレーションは、一連の動作が各エミュレーション
内で完結する様に動くため、エミュレーション切替えコ
マンドが実行されると各エミュレーションが終了して、
エミュレーション選択処理ステップS401へ進む。以
上くり返し実行する。
FIG. 38 is a flow chart showing the printing process of this embodiment. First, the initialization process is performed in step S400. In the initialization process, the print buffer is cleared. Next, in step S401, emulation selection processing is performed. Details of this selection processing are shown in FIG. Any one of the emulations 1 to 3 is selected by the selection processing in step S401, and is executed. One of the three emulations of steps S402 to S404 is performed. Since each emulation moves so that a series of operations is completed within each emulation, when the emulation switching command is executed, each emulation ends,
The flow proceeds to emulation selection processing step S401. Repeat the above.

【0092】図39は図38のステップS401の詳細
を示したフローチヤートで、まず、ステップS410で
図30に示すエミュレーションフラグEMFLAGにセ
ットされたエミュレーションNo.を取り出す。エミュ
レーションフラグEMFLAGは、図30に示してあ
り、B0〜B1にエミュレーションNo.がセットされ
ている。次にステップS411へ進み、エミュレーショ
ンフラグEMFLAGのエミュレーションNo.に対応
したエミュレーション選択テーブルから、対応したエミ
ュレーションコントロールテーブルを選択する。選択さ
れたエミュレーションコントロールテーブルから、エミ
ュレーションプログラムのポインタを取り出す。次にス
テップS412へ進み、ステップS411で取り出した
プログラムアドレスの先へ分岐し、各エミュレーション
プログラムの実行に移る。以上の処理により、エミュレ
ーションの選択処理が実行され、エミュレーションが選
択される。
FIG. 39 is a flow chart showing the details of step S401 in FIG. 38. First, in step S410, the emulation number EMFLAG set in the emulation flag EMFLAG shown in FIG. 30 is set. Take out. The emulation flag EMFLAG is shown in FIG. Is set. Next, in step S411, the emulation flag EMFLAG emulation number. Select the corresponding emulation control table from the emulation selection table corresponding to. The pointer of the emulation program is fetched from the selected emulation control table. Next, proceeding to step S412, the program branches to the end of the program address fetched at step S411, and execution of each emulation program starts. Through the above processing, emulation selection processing is executed and emulation is selected.

【0093】図40は、図38のステップS402〜S
404に示したエミュレーションを詳細に説明するフロ
ーチヤートで、各エミュレーションで共通な部分を示し
ている。まず、ステップS420で初期化処理を実行す
る。初期化処理は各エミュレーションで必要なデータエ
リアの初期化等を実行する。次にステップS421へ進
み、コマンド解析処理を実行する。コマンド解析処理は
プリンタへ送られた印字データ、印字コマンドの解析を
行ない印字を実際に行なうもので、図41に詳細なフロ
ーチャートを示す。次に、ステップS422へ進み、エ
ミュレーション切替えチェック処理を実行する。エミュ
レーション切替えチェック処理は、印字データ、印字コ
マンドの解析の実行中にエミュレーション切替え指示が
有ったかどうかをチェックし、エミュレーション切替え
の条件を満たしているかどうかをチェックする。条件に
合致する場合、エミュレーション切替えフラグがセット
される。図47に詳細のフローチャートを示す。次に、
ステップS423へ進み、エミュレーション切替えかど
うかの判定を行なう。この判定は、エミュレーション切
替えフラグがセットされているかどうかで行なう。エミ
ュレーション切替えフラグがセットされていない場合、
ステップS421へ進み以下の処理を繰り返し行なう。
エミュレーション切替えフラグがセットされている場
合、ステップS424へ進みエミュレーション終了処理
を行なう。エミュレーション終了処理は、エミュレーシ
ョン切替えの際に、残りの印字データを印字するなどの
処理を行なう。図49に詳細のフローチャート示す。
FIG. 40 shows steps S402 to S402 of FIG.
A flow chart that describes in detail the emulation shown at 404, showing the portions that are common to each emulation. First, in step S420, initialization processing is executed. The initialization processing executes initialization of the data area required for each emulation. Next, proceeding to step S421, command analysis processing is executed. In the command analysis processing, print data and print commands sent to the printer are analyzed and printing is actually performed. A detailed flowchart is shown in FIG. Next, proceeding to step S422, emulation switching check processing is executed. In the emulation switching check process, it is checked whether an emulation switching instruction has been issued during the execution of the analysis of print data and print commands, and whether the conditions for emulation switching are satisfied. If the conditions are met, the emulation switch flag is set. FIG. 47 shows a detailed flowchart. next,
In step S423, it is determined whether the emulation is switched. This determination is made based on whether the emulation switching flag is set. If the emulation switch flag is not set,
The process proceeds to step S421 and the following process is repeated.
If the emulation switching flag is set, the flow advances to step S424 to perform emulation end processing. The emulation end process is a process such as printing the remaining print data when the emulation is switched. FIG. 49 shows a detailed flowchart.

【0094】以上の処理により一連のエミュレーション
の実行とエミュレーションの切替え処理とが実行出来
る。
Through the above processing, a series of emulation execution and emulation switching processing can be executed.

【0095】図41は、コマンド解析処理の詳細を示し
た図で、エミュレーションの実行に際して実行される。
まずステップS430でデータの取込み処理を行なう。
データはホストからI/Oポートに書込まれ、書込まれ
たデータは図28に示した受信バッファに保存される。
データの取込み処理では、この受信バッファに保存され
たデータを取り出す処理で、図42に詳細のフローチャ
ートを示す。次に、ステップS431へ進み、タイムア
ウトかどうかの判定を行なう。この判定は、タイムアウ
トフラグがセットされているかどうかで行なう。タイム
アウトフラグがセットされていない場合、ステップS4
32へ進む。タイムアウトフラグがセットされている場
合、戻りとなる。次に、ステップS432へ進み、ステ
ップS430で取込んだデータコントロールかどうかの
判定を行なう。この判定は、データが印字制御用のコン
トロールコードで有るかで行なう。本実施例ではコント
ロールコードとして、ESCコード(1Bh)などを用
いている。コントロールコードで有る場合、ステップS
433へ進み、コントロールコード処理を実行する。コ
ントロールコード処理は、各コントロールコードに対応
した印字処理を行なう。図43に詳細のフローチャート
を示す。コントロールコード処理実行後は、ステップS
436へ進み。ステップS432で、コントロールコー
ドでない場合、ステップS434へ進む。ステップS4
34では、ステップS430で取込んだデータが文字コ
ードかどうかの判定を行う。この判定は、データが印字
文字コードで有るかで行なう。本実施例では文字コード
として、印字制御用のコントロールコード以外のコード
として英数コードや漢字コードなどを用いている。文字
モードで有る場合、ステップS435へ進み、文字コー
ド処理を実行する。文字コード処理は、各文字コードに
対応した文字フォントデータを印字バッファに展開する
処理を行なう。文字コードでない場合、ステップS43
6へ進み、紙フィールド処理を実行する。紙フィールド
処理はコントロールコードなどで指定された紙フィール
ドを実行する。図48に詳細のフローチャートを示す。
FIG. 41 is a diagram showing details of the command analysis process, which is executed when emulation is executed.
First, in step S430, data acquisition processing is performed.
Data is written from the host to the I / O port, and the written data is stored in the reception buffer shown in FIG.
The data fetching process is a process for fetching the data stored in the reception buffer, and a detailed flowchart is shown in FIG. Next, in step S431, it is determined whether a time-out has occurred. This determination is made based on whether or not the timeout flag is set. If the timeout flag has not been set, step S4
Proceed to 32. Return if the timeout flag is set. Next, in step S432, it is determined whether or not the data control has been taken in in step S430. This determination is made based on whether the data is a control code for print control. In this embodiment, an ESC code (1Bh) or the like is used as the control code. If it is a control code, step S
In step 433, the control code process is executed. The control code process is a printing process corresponding to each control code. FIG. 43 shows a detailed flowchart. After executing the control code processing, step S
Proceed to 436. If the code is not the control code in step S432, the process proceeds to step S434. Step S4
At 34, it is determined whether the data fetched at step S430 is a character code. This determination is made based on whether the data is a print character code. In this embodiment, as the character code, an alphanumeric code or a kanji code is used as a code other than the control code for print control. If it is in the character mode, the process proceeds to step S435 to execute the character code process. In the character code processing, character font data corresponding to each character code is expanded in the print buffer. If it is not a character code, step S43
In step 6, the paper field process is executed. The paper field process executes a paper field designated by a control code or the like. FIG. 48 shows a detailed flowchart.

【0096】以上の処理により一連のコマンド解析の処
理が実行できる。
By the above processing, a series of command analysis processing can be executed.

【0097】図42は、データ取込み処理の詳細を示し
た図で、まずステップS440でタイムアウトカウント
のセットを行なう。タイムアウトカウントは、図29に
示したカウンタで受信バッファにデータ無い場合にタイ
ムアウトする最大の繰り返し回数を保持する。次に、ス
テップS441へ進み、エミュレーション切替え準備フ
ラグがオンどうかの判定を行なう。エミュレーション切
替え準備フラグがセットされている場合、ステップS4
42へ進む。ステップS442ではタイムアウトカウン
トを−1する。したがってエミュレーション切替え準備
フラグがオンの場合だけタイムアウトカウントが1減算
される。次に、ステップS443へ進む。ステップS4
41でエミュレーション切替え準備フラグがセットされ
ていない場合、ステップS443へ進む。ステップS4
43は、タイムアウトしたかどうかの判定を行なう。こ
の判定はタイムアウトカウントが0となったかどうかで
行なわれ、0ならばステップS444へ進みタイムアウ
トフラグをセットして戻りとなる。ステップS443で
タイムアウトでない場合、ステップS445へ進む。ス
テップS445は、状態遷移があったかどうかの判定を
行なう。この判定は状態遷移フラグがセットされたかど
うかで行なわれる。状態遷移フラグは、図10のHWR
/IOレジスタへの書き込みが起きた場合、割り込み処
理、図50でセットされる。状態遷移フラグがセットさ
れている場合は、ホストからのエミュレーション切替え
指示が有った可能性を示す。状態遷移があった場合、ス
テップS446へ進み、HWR/IOレジスタのIEM
コントロールを読み込む。次に、ステップS447へ進
み、ステップS446で読み込んだデータに変更がある
かどうかを判定する。変更が無い場合ステップS448
へ進み、その他の状態遷移処理を行なう。その他につい
ては、本実施例とは直接関係無いため説明は省略する。
次に、ステップS441へ戻る。ステップS447で変
更が有った場合ステップS449へ進み、エミュレーシ
ョン切替え準備フラグをオンとする。次に、ステップS
441へ戻る。ステップS445で、状態遷移が無かっ
た場合、ステップS450へ進み、受信バッファにデー
タが有るかどうかの判定を行なう。データが無い場合、
ステップS441へ戻る。データが有る場合、ステップ
S451へ進みデータの受信バッファからの読み込みを
行なう。次に、戻りとなる。
FIG. 42 is a diagram showing details of the data fetching process. First, in step S440, a timeout count is set. The timeout count holds the maximum number of times of repetition that the counter shown in FIG. 29 times out when there is no data in the reception buffer. Next, in step S441, it is determined whether the emulation switching preparation flag is on. If the emulation switching preparation flag is set, step S4
Proceed to 42. In step S442, the timeout count is decremented by one. Therefore, the timeout count is decremented by 1 only when the emulation switching preparation flag is on. Then, the process proceeds to step S443. Step S4
If the emulation switching preparation flag is not set at 41, the process proceeds to step S443. Step S4
43 determines whether or not a time-out has occurred. This determination is made based on whether or not the time-out count is 0. If it is 0, the process proceeds to step S444 and the time-out flag is set to return. If it is not timed out in step S443, the process proceeds to step S445. A step S445 decides whether or not there is a state transition. This determination is made based on whether the state transition flag is set. The state transition flag is the HWR of FIG.
When a write to the / IO register occurs, interrupt processing is set, as shown in FIG. If the state transition flag is set, it indicates that the host may have instructed to switch emulation. If there is a state transition, the process proceeds to step S446 and the IEM of the HWR / IO register
Load the control. Next, in step S447, it is determined whether the data read in step S446 has been changed. If there is no change, step S448
Then, the other state transition processing is performed. The other features are not directly related to the present embodiment, and the description thereof is omitted.
Then, the process returns to step S441. If there is a change in step S447, the flow advances to step S449 to turn on the emulation switching preparation flag. Next, step S
Return to 441. If there is no state transition in step S445, the flow advances to step S450 to determine whether there is data in the reception buffer. If there is no data,
It returns to step S441. If there is data, the flow advances to step S451 to read the data from the reception buffer. Then come back.

【0098】以上の処理によりデータ取込みの処理が実
行出来る。データの取込みの処理は、データが受信バッ
ファに有る場合か、ホストからのエミュレーション切替
え指示が有った場合でかつデータが受信バッファに無い
場合に終了しそれぞれの場合がフラグによって判定でき
るようになる。
With the above processing, the data acquisition processing can be executed. The process of fetching data ends when the data is in the receive buffer or when there is an emulation switching instruction from the host and when the data is not in the receive buffer, and each case can be determined by the flag. ..

【0099】図43は、コントロールコード処理の詳細
を示した図で、まずステップS460でESCのコント
ロールコードかどうかの判定を行なう。ESCのコント
ロールコードでない場合、ステップS461へ進み、そ
の他のコントロールコード処理を行なう。その他につい
ては、本実施例とは直接関係無いため説明は省略する。
次に、戻りとなる。ステップS460でESCのコント
ロールコードである場合、ステップS462へ進み、E
SCに続くデータの取込み処理を実行する。ESCに続
くデータにより各種のコマンドを区別する。次に、ステ
ップS463へ進み、タイムアウトかどうか判定し、タ
イムアウトならば戻りとなる。タイムアウトでなけれ
ば、ステップS464へ進み、ステップS462で取込
んだデータが国設定コマンドコードかどうかの判定を行
なう。国設定コマンドコードで有れば、ステップS46
5へ進み、国設定処理を行なう。国設定処理は、指定さ
れた国に国設定を変えるコマンドで、図44に詳細のフ
ローチャートを示す。次に、戻りとなる。ステップS4
64で国設定コマンドコードでなければ、ステップS4
66へ進み、紙フィードコマンドコードかどうかの判定
を行なう。紙フィードコマンドコードであれば、ステッ
プS467へ進み、フィード量指定処理を行なう。フィ
ード量指定処理は、指定されたフィード量で紙をフィー
ドするコマンドで、図45に詳細のフローチャートを示
す。次に戻りとなる。ステップS466で紙フィードコ
マンドコードでなければ、ステップS468へ進み、エ
ミュレーション切替えコードかどうかの判定を行なう。
エミュレーション切替えコードであれば、ステップS4
69へ進み、エミュレーション切替え処理を行なう。エ
ミュレーション切替え処理は、指定されたエミュレーシ
ョンに切替えを行なうコマンドで、図46に詳細のフロ
ーチャートを示す。次に戻りとなる。以下、各コマンド
に対しても同様の判定と処理を実行し、戻りとなる。
FIG. 43 is a diagram showing details of the control code processing. First, in step S460, it is determined whether the control code is an ESC control code. If it is not the ESC control code, the flow advances to step S461 to perform other control code processing. The other features are not directly related to the present embodiment, and the description thereof is omitted.
Then come back. If it is the ESC control code in step S460, the process proceeds to step S462, and E
The data acquisition process following the SC is executed. Various commands are distinguished by the data following the ESC. Next, proceeding to step S463, it is determined whether a time-out has occurred. If the time-out has occurred, the process returns. If not, the process proceeds to step S464, and it is determined whether the data fetched in step S462 is the country setting command code. If it is the country setting command code, step S46.
Proceed to step 5 to perform country setting processing. The country setting process is a command for changing the country setting to the designated country, and a detailed flowchart is shown in FIG. Then come back. Step S4
If the country setting command code is not 64, step S4
In step 66, it is determined whether the code is a paper feed command code. If it is a paper feed command code, the flow advances to step S467 to perform feed amount designation processing. The feed amount designation process is a command for feeding the paper with the designated feed amount, and a detailed flowchart is shown in FIG. Then return. If it is not the paper feed command code in step S466, the flow advances to step S468 to determine whether it is an emulation switching code.
If it is an emulation switching code, step S4
Proceeding to 69, emulation switching processing is performed. The emulation switching process is a command for switching to a specified emulation, and a detailed flowchart is shown in FIG. Then return. Hereinafter, the same determination and processing are executed for each command, and the process returns.

【0100】以上の処理により一連のコントロールコー
ドの処理が実行出来る。
With the above processing, a series of control code processing can be executed.

【0101】図44は、国設定処理の詳細を示した図
で、まずステップS470でESCに続くデータの取込
み処理を実行する。ESCに続くデータにより国の設定
値を得る。次に、ステップS471へ進み、タイムアウ
トかどうか判定し、タイムアウトならば戻りとなる。タ
イムアウトでなければ、ステップS472へ進み、ステ
ップS470で取込んだデータが指定範囲内であるかど
うかチェックする。指定範囲内でなければ戻りとなる。
指定範囲内ならば、ステップS471へ進み、ステップ
S470で取込んだデータを国コードとしてセットす
る。国コードは図29に示すデータ領域で、ここに設定
された値を用いて文字コードの入れ替え等が行なわれ
る。
FIG. 44 is a diagram showing the details of the country setting process. First, in step S470, a data fetching process following the ESC is executed. The country set value is obtained from the data following the ESC. Next, proceeding to step S471, it is determined whether or not a time-out has occurred. If the time-out has occurred, the process returns. If not, the flow advances to step S472 to check whether the data fetched in step S470 is within the specified range. If it is not within the specified range, it returns.
If it is within the specified range, the process proceeds to step S471, and the data captured in step S470 is set as the country code. The country code is a data area shown in FIG. 29, and character codes are exchanged using the value set here.

【0102】以上の処理により国設定の処理が実行出来
る。
With the above processing, the country setting processing can be executed.

【0103】図45は、フィード量設定処理の詳細を示
した図で、まずステップS480でESCに続くデータ
の取込み処理を実行する。ESCに続くデータによりフ
ィード量の設定値を得る。次に、ステップS481へ進
み、タイムアウトかどうか判定し、タイムアウトならば
戻りとなる。タイムアウトでなければ、ステップS48
2へ進み、ステップS480で取込んだデータをフィー
ド量としてセットする。フィード量は図29に示すデー
タ領域で、ここに設定された値を用いてフィードが行な
われる。
FIG. 45 is a diagram showing the details of the feed amount setting process. First, in step S480, a data fetching process following the ESC is executed. The set value of the feed amount is obtained from the data following the ESC. Next, proceeding to step S481, it is determined whether a time-out has occurred. If the time-out has occurred, the process returns. If not time out, step S48
The process proceeds to step 2 and the data fetched in step S480 is set as the feed amount. The feed amount is in the data area shown in FIG. 29, and the feed is performed using the value set here.

【0104】以上の処理によりフィード量設定の処理が
実行出来る。印字処理し際して、フィード量に設定され
た値を用いて紙フィードが行なわれる。
The feed amount setting process can be executed by the above process. During the printing process, the paper is fed using the value set for the feed amount.

【0105】図46は、エミュレーション切替え処理の
詳細を示した図で、まずステップS490でESCに続
くデータの取込み処理を実行する。ESCに続くデータ
により切替えするエミュレーションNOを得る。次に、
ステップS491へ進み、タイムアウトかどうか判定
し、タイムアウトならば戻りとなる。タイムアウトでな
ければ、ステップS492へ進み、ステップS490で
取込んだデータをエミュレーションNOとしてセットす
る。フィード量は図29に示すデータ領域で、ここに設
定された値を用いてフィードが行なわれる。次に、ステ
ップS493へ進み、データの取込み処理を実行する。
次に、ステップS494へ進み、タイムアウトかどうか
判定し、タイムアウトならば戻りとなる。タイムアウト
でなければ、ステップS495へ進み、ステップS49
0で取込んだデータをエミュレーション切替えモードと
してセットする。次に、ステップS496へ進み、ステ
ップS492でセットした値から切替えするエミュレー
ションNOを決定する。次に、ステップS497へ進
み、ステップS495で決定したエミュレーションNO
からエミュレーションテーブル決定する。次に、ステッ
プS498へ進み、エミュレーションフラグEMFLA
Gに切替えたエミュレーションNOをB0〜B1ビット
にセットし戻りとなる。
FIG. 46 is a diagram showing the details of the emulation switching process. First, in step S490, the process of fetching data following the ESC is executed. An emulation NO for switching is obtained according to the data following the ESC. next,
In step S491, it is determined whether a time-out has occurred. If the time-out has occurred, the process returns. If not, the process proceeds to step S492, and the data fetched in step S490 is set as the emulation NO. The feed amount is in the data area shown in FIG. 29, and the feed is performed using the value set here. Next, proceeding to step S493, a data acquisition process is executed.
Next, in step S494, it is determined whether a time-out has occurred. If the time-out has occurred, the process returns. If not, the process proceeds to step S495 and step S49.
The data fetched with 0 is set as the emulation switching mode. Next, proceeding to step S496, the emulation NO to switch from the value set at step S492 is determined. Next, the process proceeds to step S497, and the emulation NO determined in step S495.
Determine the emulation table from. Next, the processing proceeds to step S498, and the emulation flag EMFLA.
The emulation NO switched to G is set in bits B0 to B1 and the process returns.

【0106】以上の処理により印字制御コマンドによる
エミュレーション切替えの処理が実行出来る。
With the above processing, emulation switching processing by the print control command can be executed.

【0107】図47は、エミュレーション切替えチェッ
ク処理の詳細を示した図で、図40のステップS422
に対応する。まずステップS500で、エミュレーショ
ン切替え準備フラグがセットされているかどうか判定す
る。セットされていなければ、戻りとなる。エミュレー
ション切替え準備フラグがセットされている場合、ステ
ップS501へ進み、タイムアウト指定がされているか
どうかの判定を行なう。この指定は図29のエミュレー
ション切替え条件に設定された条件に従って行なう。タ
イムアウト指定ならば、ステップS502へ進み、タイ
ムアウトフラグがセットされているかどうかを判定す
る。セットされていなければ、戻りとなる。タイムアウ
トフラグがセットされている場合、ステップS503へ
進み、エミュレーション切替えフラグをセットし戻りと
なる。ステップS501でタイムアウト指定でない場
合、ステップS504へ進み、ページ終了指定がされて
いるかどうかの判定を行なう。この指定は図29のエミ
ュレーション切替え条件に設定された条件に従って行な
う。ページ終了指定ならば、ステップS505へ進み、
ページフラグがセットされているかどうかを判定する。
セットされていなければ、戻りとなる。ページ終了フラ
グがセットされている場合、ステップS506へ進み、
エミュレーション切替えフラグをセットし戻りとなる。
FIG. 47 is a diagram showing details of the emulation switching check processing, and is step S422 in FIG.
Corresponding to. First, in step S500, it is determined whether the emulation switching preparation flag is set. If not set, it returns. When the emulation switching preparation flag is set, the process proceeds to step S501, and it is determined whether a time-out is designated. This designation is performed according to the conditions set in the emulation switching conditions of FIG. If the time-out is designated, the process proceeds to step S502, and it is determined whether the time-out flag is set. If not set, it returns. If the time-out flag is set, the flow advances to step S503 to set the emulation switching flag and then return. If the time-out is not designated in step S501, the process proceeds to step S504, and it is determined whether or not the page end is designated. This designation is performed according to the conditions set in the emulation switching conditions of FIG. If the page end is designated, the process proceeds to step S505,
Determine if the page flag is set.
If not set, it returns. If the page end flag is set, the process proceeds to step S506,
Set the emulation switching flag and return.

【0108】以上の処理によりエミュレーション切替え
チェック処理が実行出来る。この処理によりエミュレー
ション切替えの条件を満たしているかどうかが判定でき
る。
The emulation switching check processing can be executed by the above processing. By this processing, it is possible to determine whether or not the condition for switching emulation is satisfied.

【0109】図48は、紙フィード処理の詳細を示した
図で、図40のステップS436に対応する。まずステ
ップS510で、フィード量がセットされているかどう
か判定する。セットされていなければ、戻りとなる。フ
ィード量がセットされている場合、ステップS511へ
進み、フィード量の合計がページ全体のフィード量を超
えるかどうかの判定を行なう。フィード量はフィードが
行なわれる毎に、合計量として加算される。フィード量
の合計がページ全体のフィード量を超える場合、ステッ
プS512へ進み、ページフラグをセットする。次に、
ステップS513へ進み、排紙処理を行ない戻りとな
る。ステップS511で、フィード量の合計がページ全
体のフィード量を超えない場合、ステップS514へ進
み、紙のフィードを行ない戻りとなる。
FIG. 48 is a diagram showing details of the paper feed process, and corresponds to step S436 in FIG. First, in step S510, it is determined whether the feed amount is set. If not set, it returns. If the feed amount is set, the process proceeds to step S511, and it is determined whether the total feed amount exceeds the feed amount of the entire page. The feed amount is added as a total amount each time the feed is performed. If the total feed amount exceeds the feed amount of the entire page, the process proceeds to step S512 and the page flag is set. next,
The process proceeds to step S513, the paper discharge process is performed, and the process returns. If the total feed amount does not exceed the feed amount of the entire page in step S511, the flow advances to step S514 to feed the paper and return.

【0110】以上の処理により紙フィード処理が実行出
来る。この処理により紙フィード処理とページフラグの
セットができる。
The paper feed process can be executed by the above process. By this process, the paper feed process and the page flag can be set.

【0111】図49は、エミュレーション終了処理の詳
細を示した図で、図41のステップS424に対応す
る。まずステップS520で、印字データがセットされ
ているかどうか判定する。セットされていなければ、ス
テップS522へ進む。印字データがセットされている
場合、ステップS521へ進み、印字起動処理を実行し
て印字バッファに残っている印字データの印字を行な
う。次に、ステップS521へ進み、エミュレーション
切替えフラグをオフし戻りとなる。
FIG. 49 is a diagram showing details of the emulation end processing, and corresponds to step S424 in FIG. First, in step S520, it is determined whether print data is set. If not set, the process proceeds to step S522. When the print data is set, the process proceeds to step S521, the print starting process is executed, and the print data remaining in the print buffer is printed. Next, the process proceeds to step S521, the emulation switching flag is turned off, and the process returns.

【0112】以上の処理によりエミュレーション終了処
理が実行出来る。この処理によりエミュレーション切替
え時に印字バッファに残った印字データを失われること
なく印字することができる。
The emulation end processing can be executed by the above processing. By this processing, the print data remaining in the print buffer can be printed without being lost when the emulation is switched.

【0113】図50は、プリンタの割り込み処理の詳細
を示した図で、各種割り込みに対する処理を行なう。ス
テップS530で、HWR/IOレジスタへの書き込み
が起きたどうかの判定を行なう。HWR/IOレジスタ
への書き込みでない場合、ステップS531へ進み、そ
の他の割り込み処理を実行する。次に、戻りとなる。そ
の他の割り込み処理については省略する。ステップS5
30で、HWR/IOレジスタへの書き込みの場合、ス
テップS532へ進み、状態遷移フラグがセットされて
いるかどうかの判定を行なう。状態遷移フラグがセット
されている場合、戻りとなり、なにも行なわない。ステ
ップS532で、状態遷移フラグがセットされていない
場合、ステップS533へ進み、状態遷移フラグをセッ
トする。
FIG. 50 is a diagram showing the details of the interrupt process of the printer, which processes various interrupts. In step S530, it is determined whether writing to the HWR / IO register has occurred. If not writing to the HWR / IO register, the process proceeds to step S531 to execute other interrupt processing. Then come back. The other interrupt processing will be omitted. Step S5
In the case of writing to the HWR / IO register at 30, the process proceeds to step S532, and it is determined whether or not the state transition flag is set. If the state transition flag is set, it returns and nothing is done. If the state transition flag is not set in step S532, the process proceeds to step S533 and the state transition flag is set.

【0114】以上の処理によりプリンタ割り込み処理が
実行出来る。この処理によりHWR/IOレジスタへの
書き込みによるエミュレーション切替え時に状態遷移フ
ラグをセットすることができる。
Printer interrupt processing can be executed by the above processing. By this processing, the state transition flag can be set at the time of emulation switching by writing to the HWR / IO register.

【0115】以上説明したように、I/Oレジスタへの
書き込みにより、プリンタのエミュレーション切替え可
能となる。また、国設定コマンドにより国設定処理が可
能となる。また、フィード量指定コマンドによりフィー
ド処理が可能となる。また、エミュレーション切替えコ
マンドによりエミュレーション切替え処理が可能とな
る。
As described above, writing to the I / O register makes it possible to switch the emulation of the printer. In addition, the country setting command enables the country setting process. Further, a feed amount designation command enables feed processing. Also, the emulation switching command enables emulation switching processing.

【0116】(実施例2)本実施例においては、タイム
アウトによりエミュレーション切替えとページの切り替
わりでのエミュレーション切替え条件について説明した
が、他の条件、例えば初期化コマンドの受取でエミュレ
ーション切替えを行なうことも可能である。エミュレー
ション切替え条件については、これらの限りではない。
(Embodiment 2) In the present embodiment, the emulation switching condition at the time of emulation switching and page switching due to a timeout has been described, but it is also possible to perform the emulation switching by receiving another condition, for example, receiving an initialization command. Is. The emulation switching conditions are not limited to these.

【0117】(実施例3)本実施例においては、1つの
コマンドが実行されて後にエミュレーション切替えが起
こるように説明したが、処理するコマンド数に限定が有
るものではない。
(Embodiment 3) In this embodiment, one command is executed and the emulation switching is performed later, but the number of commands to be processed is not limited.

【0118】以上、説明したように、プリンタ側にエミ
ュレーション情報をホストへ知らせ、また、印字データ
の区切れを判定することにより、ホストからのエミュレ
ーション切替え指示に従って、印字データの区切れまで
適切に印字を行なうことができるという効果がある。
As described above, by notifying the host of the emulation information on the printer side and determining the break of the print data, the print data is properly printed until the break of the print data according to the emulation switching instruction from the host. There is an effect that can be performed.

【0119】[0119]

【発明の効果】以上、詳述した様に本発明により、ホス
トから指定されるエミュレーション情報を記憶する記憶
手段、前記記憶手段に記憶されたエミュレーション情報
に基づいて、エミュレーションを切り替えるエミュレー
ション切替え手段、印字データの区切れを判定する判定
手段とを有するプリンタを提供することが可能となっ
た。
As described above in detail, according to the present invention, storage means for storing emulation information specified by the host, emulation switching means for switching emulation based on the emulation information stored in the storage means, printing It has become possible to provide a printer having a determination means for determining the break of data.

【0120】以上、詳述した様に本発明により、ホスト
から指定されるエミュレーション情報を記憶し、前記記
憶されるエミュレーション情報と、印字データの区切れ
に基づいて、エミュレーションの切替えを行なうプリン
タ制御方法を提供することが可能となった。
As described above in detail, according to the present invention, the emulation information designated by the host is stored, and the emulation information is switched based on the stored emulation information and the division of the print data. It has become possible to provide.

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

【図1】本発明を実施したパソコンを示す斜視図。FIG. 1 is a perspective view showing a personal computer embodying the present invention.

【図2】ホスト−プリンタ間概略ブロック図。FIG. 2 is a schematic block diagram between a host and a printer.

【図3】プリンタ1F部のブロック図。FIG. 3 is a block diagram of a printer 1F unit.

【図4】複合制御UNITの内部のブロック図。FIG. 4 is an internal block diagram of a combined control unit.

【図5】PIO/IFレジスタ構成図。FIG. 5 is a PIO / IF register configuration diagram.

【図6】PIF/IFレジスタ構成図。FIG. 6 is a PIF / IF register configuration diagram.

【図7】PFM/IFレジスタ構成図。FIG. 7 is a PFM / IF register configuration diagram.

【図8】PBJ/IFレジスタ構成図。FIG. 8 is a PBJ / IF register configuration diagram.

【図9】PPM/IFレジスタ構成図。FIG. 9 is a PPM / IF register configuration diagram.

【図10】HWR/IOレジスタ構成図。FIG. 10 is a block diagram of an HWR / IO register.

【図11】PST/IOレジスタ構成図。FIG. 11 is a PST / IO register configuration diagram.

【図12】プリンタI/Oレジスタを示す図。FIG. 12 is a diagram showing a printer I / O register.

【図13】プリンタのRAMのアドレスマップを示す
図。
FIG. 13 is a diagram showing an address map of a RAM of the printer.

【図14】ホスト−プリンタ間のI/Oレジスタを示す
図。
FIG. 14 is a diagram showing an I / O register between a host and a printer.

【図15】プリンタ内部ユニットの斜視図。FIG. 15 is a perspective view of a printer internal unit.

【図16】ホストのRAMのメモリマップを示す図。FIG. 16 is a diagram showing a memory map of a RAM of a host.

【図17】各IOのアドレスマップ。FIG. 17 is an address map of each IO.

【図18】割り込みベクタの内容を示した図。FIG. 18 is a diagram showing the contents of an interrupt vector.

【図19】割り込みベクタの内容を示した図。FIG. 19 is a diagram showing the contents of an interrupt vector.

【図20】電源投入時のフローチャートを示す図。FIG. 20 is a view showing a flowchart when the power is turned on.

【図21】POSTのフローチャートを示す図。FIG. 21 is a diagram showing a POST flowchart.

【図22】キーボード割り込み処理のフローチャートを
示す図。
FIG. 22 is a diagram showing a flowchart of keyboard interrupt processing.

【図23】キーコード取得処理のフローチャートを示す
図。
FIG. 23 is a diagram showing a flowchart of a key code acquisition process.

【図24】コマンド解析処理のフローチャートを示す
図。
FIG. 24 is a diagram showing a flowchart of command analysis processing.

【図25】ホストの国切替処理のフローチャートを示す
図。
FIG. 25 is a diagram showing a flowchart of host country switching processing.

【図26】プリンタ国切替え処理のフローチャートを示
す図。
FIG. 26 is a diagram showing a flowchart of printer country switching processing.

【図27】プリンタ国切替え処理のフローチャートを示
す図。
FIG. 27 is a diagram showing a flowchart of printer country switching processing.

【図28】プリンタ内のRAMの詳細を示した図。FIG. 28 is a diagram showing details of RAM in the printer.

【図29】印字データエリアの詳細を示した図。FIG. 29 is a diagram showing details of a print data area.

【図30】エミュレーションデータの詳細を示した図。FIG. 30 is a diagram showing details of emulation data.

【図31】エミュレーション情報の具体例を示した図。FIG. 31 is a diagram showing a specific example of emulation information.

【図32】エミュレーション実行のためのテーブルを示
した図。
FIG. 32 is a diagram showing a table for executing emulation.

【図33】エミュレーション実行のためのテーブルの構
成を示した図。
FIG. 33 is a diagram showing a configuration of a table for executing emulation.

【図34】エミュレーション初期情報の初期値を示した
図。
FIG. 34 is a view showing initial values of emulation initial information.

【図35】プリンタユニットの初期化制御を示すフロー
チャートを示した図。
FIG. 35 is a view showing a flowchart showing initialization control of the printer unit.

【図36】キャリッジ初期化の詳細を示すフローチャー
トを示した図。
FIG. 36 is a view showing a flowchart showing details of carriage initialization.

【図37】キャッピングの詳細フローを示した図。FIG. 37 is a diagram showing a detailed flow of capping.

【図38】印字処理を示すフローチャートを示した図。FIG. 38 is a diagram showing a flowchart showing a printing process.

【図39】エミュレーション選択処理のフローチャート
を示す図。
FIG. 39 is a diagram showing a flowchart of emulation selection processing.

【図40】エミュレーションの詳細を示すフローチャー
ト。
FIG. 40 is a flowchart showing details of emulation.

【図41】コマンド解析の詳細を示すフローチャート。FIG. 41 is a flowchart showing details of command analysis.

【図42】データ取り込みの詳細を示すフローチャー
ト。
FIG. 42 is a flowchart showing details of data acquisition.

【図43】コントロールコード処理の詳細を示すフロー
チャート。
FIG. 43 is a flowchart showing details of control code processing.

【図44】国設定処理の詳細を示すフローチャート。FIG. 44 is a flowchart showing details of country setting processing.

【図45】フィード量設定処理の詳細を示すフローチャ
ート。
FIG. 45 is a flowchart showing details of feed amount setting processing.

【図46】エミュレーション切替え処理の詳細を示すフ
ローチャート。
FIG. 46 is a flowchart showing details of emulation switching processing.

【図47】エミュレーション切替えチェック処理の詳細
を示すフローチャート。
FIG. 47 is a flowchart showing details of emulation switching check processing.

【図48】紙フィード処理の詳細を示すフローチャー
ト。
FIG. 48 is a flowchart showing details of paper feed processing.

【図49】エミュレーション終了処理の詳細を示すフロ
ーチャート。
FIG. 49 is a flowchart showing details of emulation end processing.

【図50】プリンタ割り込み処理の詳細を示すフローチ
ャート。
FIG. 50 is a flowchart showing details of printer interrupt processing.

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

CPU−P プリンタ部の制御CPU PB 印字バッファ HWR/IO CPU−P側からみえるIOレジスタ PST/IO ホスト側からみえるIOレジスタ CPU-P Printer control CPU PB Print buffer HWR / IO CPU-P side IO register PST / IO Host side IO register

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 ホストから指定されるエミュレーション
情報を記憶する記憶手段、前記記憶手段に記憶されたエ
ミュレーション情報に基づいて、エミュレーションを切
り替えるエミュレーション切り替え手段、印字データの
区切れを判定する判定手段とを有することを特徴とする
プリンタ。
1. Storage means for storing emulation information specified by a host, emulation switching means for switching emulation based on the emulation information stored in the storage means, and determination means for determining breaks in print data. A printer having.
【請求項2】 前記判定手段は印字データの区切れが良
いか否かを判定し、良いと判定された場合、前記エミュ
レーション切り替え手段によりエミュレーション切り替
えを実行することを特徴とする請求項1記載のプリン
タ。
2. The emulation switching unit executes the emulation switching when it is determined that the division of the print data is good. Printer.
【請求項3】 ホストから指定されるエミュレーション
情報を記憶し、前記記憶されるエミュレーション情報
と、印字データの区切れに基づいて、エミュレーション
の切り替えを行なうことを特徴とするプリンタ制御方
法。
3. A printer control method, wherein emulation information designated by a host is stored, and the emulation is switched based on the stored emulation information and a break in print data.
【請求項4】 前記判定は、適切な印字データの区切れ
を判定し、それに基づいて、エミュレーションは切り替
えられることを特徴とする請求項3記載のプリンタ制御
方法。
4. The printer control method according to claim 3, wherein the determination determines an appropriate break of print data, and the emulation is switched based on the determination.
【請求項5】 前記ホストとプリンタは、汎用のパラレ
ルインタフェースを介して接続されていることを特徴と
する請求項1及び3記載のプリンタ及びプリンタ制御方
法。
5. The printer and printer control method according to claim 1, wherein the host and the printer are connected via a general-purpose parallel interface.
JP3343288A 1991-12-25 1991-12-25 Printer and printer controlling method Pending JPH05169736A (en)

Priority Applications (6)

Application Number Priority Date Filing Date Title
JP3343288A JPH05169736A (en) 1991-12-25 1991-12-25 Printer and printer controlling method
US07/994,923 US20030156129A1 (en) 1991-12-25 1992-12-22 Information processing method and apparatus
ES92311819T ES2127747T3 (en) 1991-12-25 1992-12-24 METHOD AND DEVICE FOR THE CONTROL OF EMULATION IN A PRINTER.
EP92311819A EP0549369B1 (en) 1991-12-25 1992-12-24 Printer emulation control method and apparatus
DE69228593T DE69228593T2 (en) 1991-12-25 1992-12-24 Method and device for emulation control of a printer
US08/506,339 US6081663A (en) 1991-12-25 1995-07-24 Information processing method and apparatus having a power-saving control feature

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3343288A JPH05169736A (en) 1991-12-25 1991-12-25 Printer and printer controlling method

Publications (1)

Publication Number Publication Date
JPH05169736A true JPH05169736A (en) 1993-07-09

Family

ID=18360361

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3343288A Pending JPH05169736A (en) 1991-12-25 1991-12-25 Printer and printer controlling method

Country Status (1)

Country Link
JP (1) JPH05169736A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6559957B1 (en) 1992-07-23 2003-05-06 Canon Kabushiki Kaisha Discriminating a rule for processing data
US7640368B2 (en) 2003-12-15 2009-12-29 Samsung Electronics Co., Ltd. Automatic driver installation method and system
JP2011062834A (en) * 2009-09-15 2011-03-31 Seiko Epson Corp Recording device, control method for recording device, and program
JP2012059165A (en) * 2010-09-13 2012-03-22 Seiko Epson Corp Electronic apparatus, electronic apparatus control method and program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6559957B1 (en) 1992-07-23 2003-05-06 Canon Kabushiki Kaisha Discriminating a rule for processing data
US7640368B2 (en) 2003-12-15 2009-12-29 Samsung Electronics Co., Ltd. Automatic driver installation method and system
JP2011062834A (en) * 2009-09-15 2011-03-31 Seiko Epson Corp Recording device, control method for recording device, and program
JP2012059165A (en) * 2010-09-13 2012-03-22 Seiko Epson Corp Electronic apparatus, electronic apparatus control method and program

Similar Documents

Publication Publication Date Title
EP0549369B1 (en) Printer emulation control method and apparatus
EP1134645B1 (en) Power saving method and device for display
EP0526189B1 (en) Print controller with power saving control
US5844813A (en) Information processing apparatus and method with setting of power off state and with recognition of printer operating state
JPH05169736A (en) Printer and printer controlling method
EP0526183B1 (en) Computer-printer data transfer method
JP3093342B2 (en) Power saving method and printing apparatus
JPH0535421A (en) Method and processor for information processing
JP3227188B2 (en) Information processing method and apparatus
JPH0532016A (en) Mode switching and device therefor
JPH08310086A (en) Information processing device and its printing method
JPH06262809A (en) Printer control device
JPH08278867A (en) Information processor and method for starting and controlling information processor
JPH0532013A (en) Information processing and device therefor
JPS61259368A (en) Word processor
JP3278174B2 (en) Printing apparatus and initialization method
JPH0532014A (en) Information processing and device therefor
JP2916225B2 (en) Information output device
JP3210046B2 (en) Information processing apparatus and method
JPH0728585A (en) Stylus pen and pen input type computer using the same
JP3542443B2 (en) Host computer and data transfer method
JPH0532012A (en) Information processing and device therefor
JPH044171A (en) Printer control device
JPH0532010A (en) Printing process and device
JPH0338118B2 (en)

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20000912