JP3747898B2 - Electronic device control method and program - Google Patents

Electronic device control method and program Download PDF

Info

Publication number
JP3747898B2
JP3747898B2 JP2002246708A JP2002246708A JP3747898B2 JP 3747898 B2 JP3747898 B2 JP 3747898B2 JP 2002246708 A JP2002246708 A JP 2002246708A JP 2002246708 A JP2002246708 A JP 2002246708A JP 3747898 B2 JP3747898 B2 JP 3747898B2
Authority
JP
Japan
Prior art keywords
printer
scanner
function
mfp
electronic device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2002246708A
Other languages
Japanese (ja)
Other versions
JP2004086564A (en
Inventor
政敏 門田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2002246708A priority Critical patent/JP3747898B2/en
Priority to US10/638,341 priority patent/US7831969B2/en
Publication of JP2004086564A publication Critical patent/JP2004086564A/en
Application granted granted Critical
Publication of JP3747898B2 publication Critical patent/JP3747898B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、電子機器の制御方法及びプログラムに関し、特に、複数の機能を備えた電子機器の複数の機能の制御方法及びプログラムに関する。
【0002】
【従来の技術】
従来から、複数の機能を有する電子機器は、ローカルデバイスとして端末装置に接続されて使用されたり、ネットワークデバイスとしてTCP/IP等を利用したネットワーク上に接続された複数のクライアントである端末装置から、直接或いは当該電子機器を接続したサーバにインストールされているオペレーティングシステムの共有機能を用いて当該サーバを介して使用されたりしている。そして、これらのクライアントである端末装置から電子機器を制御するには、電子機器側にIPアドレス等の設定を行うとともに、各端末装置に電子機器に関する複数の機能に関する設定の処理を行う必要がある。
ここで、共有機能とは、ネットワーク環境において、個々のクライアントやサーバにあるファイル、もしくはプリンタ等の周辺機器を、同じネットワークに接続されたほかの端末装置から利用できるようにすることをいい、LAN(LocalArea Network)等のネットワークの最も基本的な機能である。共有機能によれば、共有されているプリンタを利用するクライアントは、それがあたかも自分のものであるかのように利用できる。
【0003】
一方、ネットワークデバイスとして使用する場合、クライアントである端末装置で、電子機器のある機能(第一の機能とする。)に関する各種設定が行われていれば、当該クライアントである端末装置にインストールされているオペレーティングシステムが有する第一の機能を利用するためのプログラムインターフェースを用いることにより、そのクライアントである端末装置から電子機器の第一の機能を制御できるようになっている。
例えば、クライアントである端末装置にインストールされているオペレーティングシステムがWindows(登録商標)であり、電子機器が有する第一の機能がプリンタの機能である場合、クライアントである端末装置において電子機器のプリンタに関する設定が行われていれば、Windows(登録商標)のプリンタ用API(Application Program Interface)を用いてクライアントである端末装置から電子機器のプリンタを制御することができる。
【0004】
【発明の解決しようとする課題】
しかしながら、ネットワークデバイスとして使用する場合、電子機器が複数の機能、例えば、第一の機能と第二の機能を有する場合、第一の機能をネットワークデバイスとして利用することができたとしても、第二の機能をネットワークデバイスとして利用することができるとは限らず、別途、第二の機能に関する各種の設定の処理(例えば、第二の機能がスキャナの機能である場合は、ホスト名等の設定処理)を行わなければ、クライアントである端末装置から電子機器の第二の機能を制御することができない場合があり、ユーザに負担がかかっていたという問題があった。
また、かかる場合に、電子機器をネットワークデバイスではなく、各々の端末装置のローカルデバイスとして接続する方法も考えられるが、端末装置のそれぞれに電子機器を設置することは、無駄が多かったり、費用が多大になってしまったりするという問題もあった。
【0005】
本発明は、上記問題点に鑑みてなされたものであり、クライアントである端末装置において、ネットワーク上で使用される複数の機能を有する複合機についての複数の機能の各々についての設定を行うことなく、複数の機能を制御することができる電子機器の制御方法及びプログラムを提供するものである。
【0006】
【課題を解決するための手段】
上記課題を解決するために、請求項1の電子機器の制御方法は、少なくともプリンタ及びスキャナの機能を備えた電子機器と通信可能であり、プリンタにデータを書き込むプログラムインターフェース及びプリンタからデータを読み取るプログラムインターフェースを有するオペレーティングシステムがインストールされている端末装置から、前記スキャナの機能を制御する電子機器の制御方法であって、前記端末装置にインストールされたオペレーティングシステムが有するプリンタにデータを書き込むプログラムインターフェースを用いて、スキャナの読み取り指令を行うステップと、前記端末装置にインストールされたオペレーティングシステムが有するプリンタからデータを読み取るプログラムインターフェースを用いて、スキャナの読み取り結果の受け取り指令を行うステップと、を有することを特徴とする。
【0007】
請求項は、少なくともプリンタ及びスキャナの機能を備えた電子機器と通信可能であり、プリンタにデータを書き込むプログラムインターフェース及びプリンタからデータを読み取るプログラムインターフェースを有するオペレーティングシステムがインストールされている端末装置を、前記スキャナの機能を制御するように機能させるプログラムであって、前記端末装置にインストールされたオペレーティングシステムが有するプリンタにデータを書き込むプログラムインターフェースを用いて、スキャナの読み取り指令を行うステップと、前記端末装置にインストールされたオペレーティングシステムが有するプリンタからデータを読み取るプログラムインターフェースを用いて、スキャナの読み取り結果の受け取り指令を行うステップと、を前記端末装置に実行させるためのプログラムである。
【0008】
【0009】
請求項1及び3によると、スキャナの読み取り指令及び読み取り結果の受け取り指令について、それぞれプリンタにデータを書き込むプログラムインターフェース及びプリンタからデータを読み取るプログラムインターフェースを用いることにより、スキャナの機能をデバイスクラス上でプリンタの機能に偽装させて、プリンタの機能の送受信経路を利用することができる。従って、スキャナに関する面倒な設定を行うことなく、スキャナを制御することが可能となる。
【0010】
【0011】
【0012】
【0013】
【0014】
【0015】
【0016】
【0017】
【0018】
請求項の電子機器の制御方法は、請求項に記載の電子機器の制御方法であって、前記スキャナの読み取り結果の受け取り指令は、名前付きパイプ機能による通信を用いて行われることを特徴とする。
【0019】
請求項によると、プリンタの機能の送受信経路として、名前付きパイプ機能による通信を用いることができる。従って、端末装置にインストールされているオペレーティングシステムがスプーラ間の双方向通信をサポートしていない場合であっても、スキャナの読み取り指令及び読み取り結果の受け取りを行うことができる。
【0020】
尚、請求項に記載されているプログラムは、CD−ROM(Compact Disc Read Only Memory)、FD(Floppy Disk)(登録商標)、MO(Magneto-Optic)などのリムーバブル型記録媒体やハードディスクなどの固定型記録媒体に記録して配布可能である他、有線又は無線の電気通信手段によってインターネットなどの通信ネットワークを介して配布可能である。
【0021】
【発明の実施の形態】
以下、図面を参照しつつ、本発明の好適な実施の形態を説明する。
【0022】
まず、本実施の形態が適用されるネットワーク構成について図1に基づいて説明する。図1は、ネットワークの概略構成を描いたネットワーク構成図である。
【0023】
図1に示すネットワーク構成図では、複合機(Multifunction Peripheral:MFP)101と、端末装置102,103,104,105,106とを含んでいる。複合機101は、端末装置102に接続されており、端末装置102が複合機101のサーバに相当する。また、端末装置102〜106は、互いにネットワーク107を介して接続される。
尚、複合機(Multifunction Peripheral:MFP)101は電子機器に相当し、端末装置103〜106はクライアントである端末装置に相当する。
【0024】
複合機101は、公衆の電話回線に接続された通信先との通話を行うための電話の機能、通信先へ画像データを送信するためのファックスの機能、端末装置上のデータを主に紙に出力するプリンタの機能、紙やフィルムに描画(印刷)された画像(イメージ)を端末装置に取込むためのスキャナの機能等の複数の機能を備える。また、複合機101は、端末装置102とデータ通信を行うためのインターフェースを含んでいる。
【0025】
本実施の形態においては、端末装置102〜106としては、PC(Personal Computer)等を用いることができる。また、ネットワーク107としては、LANや無線LAN等を用いることができる。
端末装置102は、上述したプリンタの共有機能を有するオペレーティングシステム(OS)がインストールされている。プリンタの共有機能を有するオペレーティングシステムは、例えば、Windows(登録商標)や、Mac OS(登録商標)が相当する。また、端末装置102及び端末装置103〜106は、互いにネットワーク107を介してデータ通信を行うためのインターフェースを含んでいる。また、端末装置102は、複合機101とデータ通信を行うためのインターフェースを含んでいる。そして、端末装置103〜106においては、端末装置102の共有機能を用いて、複合機101の利用設定が行われている。
尚、上記オペレーティングシステムは、プリンタの共有機能を有するものの、プリンタ以外(例えば、スキャナ等)の共有機能は備えていない。
【0026】
次に、本実施の形態が適用されるシステムのブロック構成図について図2に基づいて説明する。図2は、システムの構成を示したブロック線図である。
図2に示すシステムは、電子機器であるMFP1と、電子機器のサーバであるPC2と、端末装置(クライアント)であるPC3とを有している。MFP1はPC2に接続されており、PC2とPC3はLAN4により接続されている。本実施形態においては、MFP1はプリンタの機能とスキャナの機能とを備える。
尚、MFP1は図1に示すネットワーク構成図の複合機101に相当し、PC2は図1に示すネットワーク構成図の端末装置102に相当し、PC3は図1に示すネットワーク構成図の端末装置103〜106に相当する。
【0027】
図2に示すように、MFP1は、CPU(Central Processing Unit)10と、ROM(Read Only Memory)11と、RAM(Random Access Memory)12と、NVRAM(Non Volatile RAM)13と、表示部14と、操作部15と、スキャナ部16と、印字部17と、PCインターフェース(PC I/F)18とを有しており、これらは、システムバス19によって互いに結合されている。
【0028】
CPU10は、MFP1を制御するための中央演算処理装置である。CPU10は、PC2からの受信した指令を解析して、後述するスキャナ部16に対してスキャナの機能を提供させたり、後述する印字部17に対してプリンタの機能を提供させたりする。
【0029】
ROM11は、読み出し専用記憶装置であり、CPU10が使用する主記憶空間の一部を構成するものである。RAM12は、ROM11と同様にCPU10が使用する主記憶空間の一部を構成するもので、読み出し・書き込み可能な揮発性記憶装置である。NVRAM13は、書き換えの必要なデータを保存するための不揮発性RAMである。
【0030】
表示部14は、ディスプレイ等により情報を出力して表示する表示装置で、図示省略の入出力インターフェースを介してシステムバス19に接続される。この表示部14は、印刷情報等のMFP1の各種機能に関する情報の表示に用いられる。表示部14は、例えば、液晶表示器等により構成される。
【0031】
操作部15は、外部からの入力操作を行うための、MFP1に設けられている入力装置であり、図示省略の入出力インターフェースを介してシステムバス19に接続される。この操作部15は、MFP1の各種機能に関する情報入力に用いられる。操作部15は、例えば、押圧式のスイッチを所定数並べた入力キーの構成をとるものである。
【0032】
スキャナ部16は、紙やフィルムに描画(印刷)された画像(イメージ)を端末装置に取込むためのスキャナ機能を提供する装置で、図示省略の入出力インターフェースを介してシステムバス19に接続される。このスキャナ部16は、CPU10からの指令により、MFP1の所定箇所にセットされた原稿についてスキャンを実行してスキャンデータ(ラスタデータ)を生成し、そのスキャンデータをホストであるPC2、またはホストであるPC2を介してPC3に転送すること等に用いられる。
【0033】
印字部17は、モノクロあるいはカラーによる文字または画像を印刷するためのプリンタの機能を提供する装置で、図示省略の入出力インターフェースを介してシステムバス19に接続される。この印字部17は、CPU10からの指令により、PC2またはPC2を介してPC3から転送された印刷データの印刷等に用いられる。
【0034】
PCインターフェース18は、後述するPC2のMFPインターフェース(MFP I/F)28に接続するもので、MFP1とPC2とのデータ通信を可能にするものである。指令の他、スキャンデータや印刷データ等の通信に用いられる。
【0035】
PC2は、CPU20と、ROM21と、RAM22と、HDD(Hard DiskDrive)23と、表示部24と、操作部25と、CD−ROMドライブ26と、LANインターフェース(LAN I/F)27と、MFPインターフェース28とを有しており、これらはシステムバス29によって互いに結合されている。
尚、PC2は、上述したプリンタの共有機能を有するオペレーティングシステム(OS)がインストールされており、MFP1が備えるプリンタ機能について、共有の設定が行われている。
【0036】
CPU20は、PC2を制御するための中央演算処理装置である。CPU20は、PC3からのMFP1に対するスキャン開始指令の送信等を行う。
【0037】
ROM21は、読み出し専用記憶装置であり、CPU20が使用する主記憶空間の一部を構成するものである。RAM22は、ROM21と同様にCPU20が使用する主記憶空間の一部を構成するもので、読み出し・書き込み可能な揮発性記憶装置である。HDD23は、読み出し・書き込み可能な記憶装置(ハードディスク)及びその読取装置であり、スプーラとして、MFP1に転送する印刷データや、MFP1から転送されたスキャンデータ等が格納される。
【0038】
表示部24は、ディスプレイ等により情報を出力して表示する表示装置で、図示省略の入出力インターフェースを介してシステムバス29に接続される。この表示部24は、PC2の各種機能に関する情報の表示に用いられる。表示部24は、例えば、CRT(Cathode Ray Tube)ディスプレイや液晶ディスプレイ等により構成される。
【0039】
操作部25は、外部からの入力操作を行うための、PC2に設けられている入力装置であり、図示省略の入出力インターフェースを介してシステムバス29に接続される。この操作部25は、PC2の各種機能に関する情報入力に用いられる。操作部25は、例えば、マウスやキーボード等により構成される。
【0040】
CD−ROMドライブ26は、CD−ROMに記録されたデータを読み出す装置で、図示省略の入出力インターフェースを介してシステムバス29に接続される。尚、CD−ROMドライブ26は、PC2の必須の構成要素ではなく、FDドライブであっても良い。
【0041】
LANインターフェース27は、LAN4を介して、後述するPC3のLAN
インターフェース37に接続するもので、PC2とPC3とのデータ通信を可能にするものである。MFP1に対する指令の他、スキャンデータや印刷データ等の通信に用いられる。
【0042】
MFPインターフェース28は、MFP1のPCインターフェース18に接続するもので、PC2とMFP1とのデータ通信を可能にするものである。指令の通信の他、スキャンデータや印刷データ等の通信に用いられる。
【0043】
PC3は、CPU30と、ROM31と、RAM32と、HDD(Hard DiskDrive)33と、表示部34と、操作部35と、CD−ROMドライブ36と、LANインターフェース(LAN I/F)37とを有しており、これらはシステムバス39によって互いに結合されている。
【0044】
CPU30は、PC3を制御するための中央演算処理装置である。CPU30は、PC2を介してMFP1に対してスキャン開始等の指令を送信したり、後述する電子機器(本実施形態ではMFP1)の制御処理を行ったりする。
【0045】
ROM31は、読み出し専用記憶装置であり、CPU30が使用する主記憶空間の一部を構成するものであり、後述する電子機器(本実施形態ではMFP1)の制御処理のためのプログラムを適宜HDD33から選択/読み込みし、CPU30が実行する。RAM32は、ROM31と同様にCPU30が使用する主記憶空間の一部を構成するもので、読み出し・書き込み可能な揮発性記憶装置である。HDD33は、読み出し・書き込み可能な記憶装置(ハードディスク)及びその読取装置であり、後述する電子機器(本実施形態ではMFP1)の制御処理のためのプログラムの他、PC2を介してMFP1に転送する印刷データや、PC2を介してMFP1から転送されたスキャンデータ等が格納される。
【0046】
表示部34は、ディスプレイ等により情報を出力して表示する表示装置で、図示省略の入出力インターフェースを介してシステムバス39に接続される。この表示部34は、PC3の各種機能に関する情報の表示に用いられる。表示部34は、例えば、CRTディスプレイや液晶ディスプレイ等により構成される。
【0047】
操作部35は、外部からの入力操作を行うための、PC3に設けられている入力装置であり、図示省略の入出力インターフェースを介してシステムバス39に接続される。この操作部35は、PC3の各種機能に関する情報入力に用いられる。操作部35は、例えば、マウスやキーボード等により構成される。
【0048】
CD−ROMドライブ36は、CD−ROMに記録されたデータを読み出す装置で、図示省略の入出力インターフェースを介してシステムバス39に接続される。尚、CD−ROMドライブ36は、PC3の必須の構成要素ではなく、FDドライブであっても良い。
【0049】
LANインターフェース37は、LAN4を介して、PC2のLANインターフェース27に接続するもので、PC3とPC2とのデータ通信を可能にするものである。MFP1に対する指令他、スキャンデータや印刷データ等の通信に用いられる。
【0050】
なお、本実施形態においては、HDD33に記憶されている電子機器(本実施形態ではMFP1)の制御処理のためのプログラムは、PC3に直接接続されるCD−ROM、FD、MO等のリムーバブル型記録媒体に記録されるようにしてもよく、他の装置上に記憶されるようにしてもよい。また、本実施形態におけるプログラムは、CD−ROM、FD、MO等のリムーバブル型記録媒体に記録する他、有線又は無線の電気通信手段によってインターネットなどの通信ネットワークを介して他のシステムや装置に供給することができる。
【0051】
次に、図2に示したシステムにおける印刷系の構成について図3に基づいて説明する。図3は、システムの印刷系の構成を示すブロック線図である。
【0052】
図3に示すように、PC2は、Microsoft Word(登録商標)等のアプリケーション2aと、MFP1のプリンタ用のドライバソフトであるプリンタドライバ2bと、印刷データを一時的にスプールするスプーラ2cと、印刷の進捗状況等を監視するランゲージモニタ2dと、印刷データを出力するポートを指定するポートモニタ2eと、MFP1を接続するポート2fとを有している。一方、PC3は、Microsoft Word(登録商標)等のアプリケーション3aと、MFP1のプリンタ用のドライバソフトであるプリンタドライバ3bと、MFP1のスキャナ用のドライバソフトであるTWAINドライバ3cとを有している。
【0053】
アプリケーション2a又はアプリケーション3aからの印刷指令は、プリンタドライバ2b或いはプリンタドライバ3bが、プリンタの機能を利用するためのプログラムインターフェース(オペレーティングシステムがWindows(登録商標)の場合は、プリンタにデータを書き込むAPIであるWritePrinter)を用いて、RPC(Remote Procedure Call)により、PC3のスプーラ2cに送られ、指定のプリンタ(MFP1)にデータを出力したことを通知する。出力されたデータは、スプーラ2cに一時的にスプールされる。そして、送られた指令に基づいて、ランゲージモニタ2dで印刷の進捗状況等を監視しつつ、ポートモニタ2eにより印刷データを出力するポートが指定され、ポート2fの先に接続されているMFP1にデータが送られる。
【0054】
また、オペレーティングシステムがスプーラ間の双方向通信をサポートしている(例えば、Windows XP(登録商標)、Windows 98(登録商標)等)場合は、図3の実線の矢印に示すように、プリンタドライバ2b或いはプリンタドライバ3bが、プリンタの機能を利用するためのプログラムインターフェース(オペレーティングシステムがWindows(登録商標)の場合は、プリンタからデータを読み取るAPIであるReadPrinter)を用いて、RPCにより、スプーラ2cから印刷指令を送ったPC2或いはPC3において、指定のプリンタ(MFP1)から情報を取得することができる。
一方、オペレーティングシステムがスプーラ間の双方向通信をサポートしていない場合は(例えば、Windows NT(登録商標)等)、図3の破線の矢印に示すように、名前付きパイプにより、ランゲージモニタ2dから印刷指令を送ったPC2或いはPC3において、指定のプリンタ(MFP1)から情報を取得することができる。
尚、名前付きパイプは、アプリケーション間の通信を行うための手段で、オペレーティングシステムにより提供される。これを用いることにより、別PC間の通信も可能となる。この手法は、ランゲージモニタから、プリンタドライバに付属するステータスモニタにデータを送る手法と同じである。
【0055】
本発明では、上述のシステムの印刷系の構成を利用し、MFP1のスキャナ用のドライバソフトであるTWAINドライバ3cに後に詳述する電子機器(本実施形態ではMFP1)の制御処理のためのプログラムを含ませることにより、アプリケーション3aからのスキャナの機能に基づく読み取り指令を、TWAINドライバ3cが、プリンタの機能を利用するためのプログラムインターフェース(オペレーティングシステムがWindows(登録商標)の場合は、プリンタ用APIであるWritePrinter)を用いて、RPC(Remote Procedure Call)により、PC3に送る。また、同様に、スキャナの機能に基づく読み取り結果の受け取り指令は、TWAINドライバ3cが、プリンタの機能を利用するためのプログラムインターフェース(オペレーティングシステムがWindows(登録商標)の場合は、プリンタ用APIであるReadPrinter)を用いて、RPC又は名前付きパイプにより、PC3から取得する。
尚、MFP1のスキャナ及びプリンタのポートは同じであり、プリンタドライバ或いはTWAINドライバの何れかにより、プリンタの機能を利用するためのプログラムインターフェース(オペレーティングシステムがWindows(登録商標)の場合は、プリンタ用APIであるWritePrinter)を用いて指令が送られた際に、プリンタの機能或いはスキャナの機能の何れを使用するかは、各ドライバから予め送られた信号によりMFP1において自動的に判別することができる。
【0056】
次に、図2に示したシステムにおける本実施の形態に係る電子機器の制御処理の手順について、図4〜図6を参照して説明する。図4は、端末装置(本実施の形態ではPC3)における電子機器(本実施の形態ではMFP1)の制御処理の手順を示したフローチャートである。図5は、電子機器(本実施の形態ではMFP1)における制御処理の手順を示したフローチャートである。図6は、端末装置(本実施の形態ではPC3)と電子機器(本実施の形態ではMFP1)における制御処理の動作シーケンスチャートである。
尚、以下の説明において、PC2、PC3にインストールされているオペレーティングシステムをWindows(登録商標)とする。
【0057】
まず、本発明である、スプーラ間の双方向通信がサポートされるオペレーティングシステムの場合の端末装置(本実施の形態ではPC3)における電子機器(本実施の形態ではMFP1)の制御処理の手順について、図4を参照して説明する。
【0058】
図4に示すとおり、始めに、アプリケーションよりスキャン指令がなされると(ステップS101)、TWAINドライバ3cが、スキャンモード移行コマンドを、プリンタ用APIであるWritePrinterによって、PC2を介してMFP1に送信する(ステップS102)。
【0059】
そして、TWAINドライバ3cが、MFP1からの主にデータ送受信時の確認を示す信号であるACK(ACKnowledgement)を取得するため、プリンタ用APIのReadPrinterを呼び出す。そして、MFP1から返されたACKは、PC2のスプーラシステムを介してPC3に渡り、ReadPrinterの処理結果として、TWAINドライバ3cに返される(ステップS103)。
【0060】
ACKの受信に失敗すると(ステップS104:失敗)、アプリケーションに対してスキャン失敗の表示を行い(ステップS111)、端末装置における電子機器の制御処理を終了する。
一方、ACKの受信に成功すると(ステップS104:成功)、アプリケーションに対して設定変更ダイアログの表示を行い(ステップS105)、ユーザからの設定変更入力を受け付ける(ステップS106)。
【0061】
設定変更入力が受け付けられると、TWAINドライバ3cが、スキャンの設定と開始コマンドをプリンタ用APIであるWritePrinterを、PC2を介してMFP1に送信する(ステップS107)。
【0062】
そして、TWAINドライバ3cが、MFP1からのデータの取得としてプリンタ用APIであるReadPrinterを呼び出して、ReadPrinterの処理結果として、MFP1から送信され、PC2のスプーラシステムを介して送信されたデータがTWAINドライバ3cに返される(ステップS108)。
【0063】
受信したデータがなければ(ステップS109:失敗)、アプリケーションに対してスキャン失敗の表示を行い(ステップS111)、端末装置における電子機器の制御処理を終了する。
【0064】
受信したデータがスキャンデータであれば(ステップS109:スキャンデータ)、ステップS108に戻り、用紙エンドステータスのデータを取得するまで、TWAINドライバ3cが、MFP1からのデータの取得としてプリンタ用APIであるReadPrinterを呼び出して、ReadPrinterの処理結果として、MFP1から送信され、PC2のスプーラシステムを介して送信されたデータがTWAINドライバ3cに返される。
【0065】
受信したデータが用紙エンドステータスのデータであれば(ステップS109:用紙エンドステータス)、アプリケーションに受信したスキャンデータを渡し(ステップS110)、端末装置における電子機器の制御処理を終了する。
尚、オペレーティングシステムがスプーラ間双方向通信をサポートしていない場合は、上記ReadPrinterの代わりに、名前付きパイプのリード処理を行うことになる。
【0066】
また、上述の端末装置における電子機器の制御処理の手順に対応した、電子機器(本実施の形態ではMFP1)における制御処理の手順について、図5を参照して説明する。
【0067】
図5に示すとおり、PC2を介してPC3からコマンドを受信すると(ステップS201)、コマンドの種類を解析する(ステップS202)。
【0068】
コマンドがスキャンモード移行の指令である場合は(ステップS202:スキャンモード移行)、スキャンモードに移行し(ステップS203)、PC2を介してACKをPC3に返信して(ステップS204)、コマンドの処理を終了する。
【0069】
コマンドがスキャン設定と開始の指令である場合は(ステップS202:スキャン設定・開始)、スキャンの設定(解像度・濃度等の設定)を行い(ステップS205)、セットされた原稿のスキャンを開始し(ステップS206)、PC2を介してスキャンデータをPC3に返信する(ステップS207)。
そして、未送信のスキャンデータがあるかどうかが判断される(ステップS208)。未送信のスキャンデータがある場合は(ステップS208:YES)、ステップS206に戻り、原稿のスキャンを続行する。一方、未送信のスキャンデータがない場合(ステップS208:NO)、PC2を介して用紙エンドステータスをPC3に返信して(ステップS209)、アイドルモードに移行して(ステップS210)、コマンドの処理を終了する。
【0070】
コマンドがその他の指令である場合は(ステップS202:その他)、その他の処理を行い(ステップS211)、コマンドの処理を終了する。
【0071】
次に、上述の端末装置における電子機器の制御処理の手順、及び電子機器における制御処理の手順に基づいた、端末装置(本実施の形態ではPC3)と電子機器(本実施の形態ではMFP1)における制御処理の動作について、図6を参照して説明する。
【0072】
PC3においてアプリケーションよりスキャン開始指令がなされると(ステップS301)、PC3のTWAINドライバ3cは、アイドルモード継続中であるMFP1(ステップS302)に対して、スキャンモード移行コマンドとしてプリンタ用APIであるWritePrinterを呼び出し、上記コマンドを、PC2を介して送信する(ステップS303)。スキャンモード移行コマンドを受信したMFP1は、スキャンモードに移行する(ステップS304)。
【0073】
PC3のTWAINドライバ3cは、MFP1からのACKの取得としてプリンタ用APIであるReadPrinterを呼び出し、MFP1からの返答を待つ(ステップS305)。そして、MFP1は、PC2を介してACKをPC3に送信する(ステップS306)。ACKを受信したPC3は、ユーザよりスキャン設定入力を受け付ける(ステップS307)。
【0074】
スキャン設定入力を受けたPC3のTWAINドライバ3cは、MFP1に対してスキャン設定と開始コマンドとして、プリンタ用APIであるWritePrinterを呼び出し、上記コマンドを、PC2を介して送信する(ステップS308)。スキャン設定と開始コマンドを受信したMFP1は、設定変更を行い(ステップS309)、スキャンを実行する(ステップS310)。
【0075】
そして、PC3のTWAINドライバ3cは、MFP1からのスキャンデータの取得として、プリンタ用APIであるReadPrinterを呼び出し、MFP1からの返答を待つ(ステップS311)。MFP1は、PC2を介してスキャンデータをPC3に送信する(ステップS312)。このステップS311及びステップS312は、1ページ分データ送信終了まで繰り返し行われる。
1ページ分のスキャンが終了すると(ステップS313)、MFP1は用紙エンドステータスを送信して(ステップS314)、アイドルモードに移行する(ステップS315)。
【0076】
このように、本実施形態の電子機器の制御方法、プログラム及び記録媒体によれば、スキャナの機能に関する指令を、スキャナの読み取り指令及び読み取り結果の受け取り指令を、オペレーティングシステムが有するプリンタの機能を利用するためのプログラムインターフェース(オペレーティングシステムがWindows(登録商標)である場合はAPI)を用いて行うことにより、プリンタの機能の送受信経路を利用している。
その結果、スキャナに関する面倒な設定を行うことなく、スキャナを制御することが可能となる。
【0077】
また、スキャナの読み取り指令及び読み取り結果の受け取り指令について、それぞれプリンタにデータを書き込むプログラムインターフェース(オペレーティングシステムがWindows(登録商標)である場合は、プリンタ用APIであるWritePrinter)及びプリンタからデータを読み取るプログラムインターフェース(オペレーティングシステムがWindows(登録商標)である場合は、プリンタ用APIであるReadPrinter)を用いることにより(図4のステップS102、S103、S107、S108)、スキャナの機能をデバイスクラス上でプリンタの機能に偽装させて、プリンタの機能の送受信経路を利用している。
その結果、スキャナに関する面倒な設定を行うことなく、スキャナを制御することが可能となる。
【0078】
更に、プリンタの機能の送受信経路として、名前付きパイプ機能による通信を用いることもできる。
その結果、端末装置にインストールされているオペレーティングシステムがスプーラ間の双方向通信をサポートしていない場合であっても、スキャナの読み取り指令及び読み取り結果の受け取りを行うことができる。
【0079】
以上、本発明の好適な実施の形態について説明したが、本発明は、前記実施の形態に限定されるものではなく、特許請求の範囲に記載した限りにおいてさまざまな変更が可能なものである。
【0080】
例えば、電子機器であるMFP1は、本実施形態においては、サーバであるPC2を介してネットワークに接続されているが、それに限らない。例えば、電子機器が直接ネットワークに接続されていても良い。この場合、電子機器は上述の電子機器のサーバであるPC2が有するスプーラ、ランゲージモニタ等(図3参照)を備えており、端末装置は電子機器に関するプリンタの機能(第一の機能)の設定が行われている必要がある。
【0081】
また、オペレーティングシステムがスプーラ間の双方向通信をサポートしていない場合は、本実施形態においては、名前付きパイプによりランゲージモニタ2dとTWAINドライバ3c間の通信を行っているが、それに限らない。例えば、メールスロット等により通信を行っても良い。
【0082】
また、電子機器であるMFP1は、本実施形態においては、プリンタの機能とスキャナの機能とを備えるものであるが、それに限らない。例えば、ファックスの機能とスキャナの機能とを備える複合機であってもよいし、その他であっても2以上の機能を備えるものであればよい。
【0083】
【発明の効果】
以上に説明したように、請求項1及び3によると、スキャナの読み取り指令及び読み取り結果の受け取り指令について、それぞれプリンタにデータを書き込むプログラムインターフェース及びプリンタからデータを読み取るプログラムインターフェースを用いることにより、スキャナの機能をデバイスクラス上でプリンタの機能に偽装させて、プリンタの機能の送受信経路を利用することができる。従って、スキャナに関する面倒な設定を行うことなく、スキャナを制御することが可能となる。
【0084】
【0085】
【0086】
【0087】
請求項によると、プリンタの機能の送受信経路として、名前付きパイプ機能による通信を用いることができる。従って、端末装置にインストールされているオペレーティングシステムがスプーラ間の双方向通信をサポートしていない場合であっても、スキャナの読み取り指令及び読み取り結果の受け取りを行うことができる。
【図面の簡単な説明】
【図1】 ネットワークの概略構成を描いたネットワーク構成図である。
【図2】 システムの構成を示すブロック線図である。
【図3】 システムの印刷系の構成を示すブロック線図である。
【図4】 端末装置における電子機器の制御処理の手順を示したフローチャートである。
【図5】 電子機器における制御処理の手順を示したフローチャートである。
【図6】 端末装置と電子機器における制御処理の動作シーケンスチャートである。
【符号の説明】
1 MFP(電子機器)
3 PC(端末装置)
16 スキャナ部(第二の機能)
17 印字部(第一の機能)
[0001]
BACKGROUND OF THE INVENTION
  The present invention relates to a method for controlling an electronic device.as well asProgramToIn particular, a method for controlling a plurality of functions of an electronic device having a plurality of functionsas well asProgramToRelated.
[0002]
[Prior art]
  Conventionally, an electronic device having a plurality of functions is used by being connected to a terminal device as a local device, or from a terminal device that is a plurality of clients connected on a network using TCP / IP or the like as a network device, It is used via the server directly or using the sharing function of the operating system installed in the server connected to the electronic device. In order to control the electronic device from the terminal device as these clients, it is necessary to set the IP address and the like on the electronic device side, and to perform setting processing related to a plurality of functions related to the electronic device in each terminal device. .
  Here, the sharing function means that in a network environment, files on individual clients or servers, or peripheral devices such as printers can be used from other terminal devices connected to the same network. This is the most basic function of a network such as (Local Area Network). According to the sharing function, a client using a shared printer can use it as if it were their own.
[0003]
  On the other hand, when used as a network device, if various settings relating to a certain function (first function) of the electronic device are made in the terminal device that is the client, it is installed in the terminal device that is the client. By using a program interface for using the first function of a certain operating system, the first function of the electronic device can be controlled from the terminal device as the client.
  For example, when the operating system installed in the terminal device that is the client is Windows (registered trademark) and the first function of the electronic device is the function of the printer, the terminal device that is the client relates to the printer of the electronic device. If the setting is made, the printer of the electronic device can be controlled from the terminal device as the client by using a Windows (registered trademark) printer API (Application Program Interface).
[0004]
[Problem to be Solved by the Invention]
  However, when used as a network device, if the electronic device has a plurality of functions, for example, a first function and a second function, even if the first function can be used as a network device, Is not always available as a network device, and separately performs various setting processes related to the second function (for example, if the second function is a scanner function, the host name setting process, etc.) If this is not done, the second function of the electronic device may not be controlled from the terminal device, which is a client, and there is a problem that the user is burdened.
  In such a case, a method of connecting an electronic device as a local device of each terminal device instead of a network device is conceivable. However, installing an electronic device in each terminal device is wasteful and expensive. There was also a problem that it would become enormous.
[0005]
  The present invention has been made in view of the above problems, and in a terminal device that is a client, without setting each of a plurality of functions for a multi-function device having a plurality of functions used on a network. Electronic device control method capable of controlling multiple functionsas well asProgramTheIt is to provide.
[0006]
[Means for Solving the Problems]
  In order to solve the above-described problem, a control method for an electronic device according to claim 1 is:The function of the scanner can be communicated from a terminal device capable of communicating with at least an electronic device having the functions of a printer and a scanner and installed with an operating system having a program interface for writing data to the printer and a program interface for reading data from the printer. A method for controlling an electronic device to be controlled, the step of issuing a scanner reading command using a program interface for writing data to a printer of an operating system installed in the terminal device, and an operating system installed in the terminal device Using a program interface for reading data from a printer included in the system, and issuing a command for receiving a reading result of the scanner.It is characterized by that.
[0007]
  Claim3IsA terminal device in which an operating system capable of communicating with at least a printer and a scanner equipped with an operating system having a program interface for writing data to the printer and a program interface for reading data from the printer is installed is provided. A program that functions to control, a step of issuing a scanner reading command using a program interface that writes data to a printer of an operating system installed in the terminal device, and an operating system installed in the terminal device Using a program interface for reading data from a printer included in the system, and issuing an instruction to receive a reading result of the scanner; To the end deviceThis is a program to be executed.
[0008]
[0009]
  Claim 1And 3according to,By using the program interface for writing data to the printer and the program interface for reading data from the printer for the scanner reading command and the reading result receiving command, respectively, the function of the scanner is disguised as the function of the printer on the device class. The transmission / reception path of the function can be used. Therefore, it is possible to control the scanner without making troublesome settings regarding the scanner.
[0010]
[0011]
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
  Claim2The electronic device control method is claimed in claim1The electronic device control method according to claim 1, wherein the scanner read result reception command is performed using communication using a named pipe function.
[0019]
  Claim2According to this, communication by the named pipe function can be used as a transmission / reception path for the function of the printer. Therefore, even when the operating system installed in the terminal device does not support bidirectional communication between the spoolers, it is possible to receive a reading command and a reading result of the scanner.
[0020]
  Claims3Are recorded on removable recording media such as CD-ROM (Compact Disc Read Only Memory), FD (Floppy Disk) (registered trademark), MO (Magneto-Optic), and fixed recording media such as hard disks. In addition to being able to be recorded and distributed, it can be distributed via a communication network such as the Internet by wired or wireless telecommunication means.
[0021]
DETAILED DESCRIPTION OF THE INVENTION
  Hereinafter, preferred embodiments of the present invention will be described with reference to the drawings.
[0022]
  First, a network configuration to which the present embodiment is applied will be described with reference to FIG. FIG. 1 is a network configuration diagram illustrating a schematic configuration of a network.
[0023]
  The network configuration diagram shown in FIG. 1 includes a multifunction peripheral (MFP) 101 and terminal devices 102, 103, 104, 105, and 106. The multifunction device 101 is connected to the terminal device 102, and the terminal device 102 corresponds to the server of the multifunction device 101. The terminal devices 102 to 106 are connected to each other via the network 107.
  Note that a multifunction peripheral (MFP) 101 corresponds to an electronic device, and the terminal devices 103 to 106 correspond to terminal devices that are clients.
[0024]
  The multifunction machine 101 mainly uses a telephone function for making a call with a communication destination connected to a public telephone line, a fax function for transmitting image data to the communication destination, and data on the terminal device mainly on paper. It has a plurality of functions such as a printer function for output and a scanner function for taking an image drawn on paper or film into a terminal device. The multifunction machine 101 also includes an interface for performing data communication with the terminal device 102.
[0025]
  In the present embodiment, a PC (Personal Computer) or the like can be used as the terminal devices 102 to 106. As the network 107, a LAN, a wireless LAN, or the like can be used.
  The terminal device 102 is installed with an operating system (OS) having the above-described printer sharing function. An operating system having a printer sharing function corresponds to, for example, Windows (registered trademark) or Mac OS (registered trademark). The terminal device 102 and the terminal devices 103 to 106 include an interface for performing data communication with each other via the network 107. The terminal device 102 includes an interface for performing data communication with the multifunction machine 101. In the terminal devices 103 to 106, the use setting of the multifunction device 101 is performed using the sharing function of the terminal device 102.
  The operating system has a printer sharing function, but does not have a sharing function other than the printer (for example, a scanner).
[0026]
  Next, a block diagram of a system to which the present embodiment is applied will be described with reference to FIG. FIG. 2 is a block diagram showing a system configuration.
  The system shown in FIG. 2 includes an MFP 1 that is an electronic device, a PC 2 that is a server of the electronic device, and a PC 3 that is a terminal device (client). MFP 1 is connected to PC 2, and PC 2 and PC 3 are connected via LAN 4. In the present embodiment, the MFP 1 has a printer function and a scanner function.
  The MFP 1 corresponds to the MFP 101 in the network configuration diagram shown in FIG. 1, the PC 2 corresponds to the terminal device 102 in the network configuration diagram shown in FIG. 1, and the PC 3 corresponds to the terminal devices 103 to 103 in the network configuration diagram shown in FIG. 106.
[0027]
  As shown in FIG. 2, the MFP 1 includes a CPU (Central Processing Unit) 10, a ROM (Read Only Memory) 11, a RAM (Random Access Memory) 12, an NVRAM (Non Volatile RAM) 13, and a display unit 14. , An operation unit 15, a scanner unit 16, a printing unit 17, and a PC interface (PC I / F) 18, which are coupled to each other by a system bus 19.
[0028]
  The CPU 10 is a central processing unit for controlling the MFP 1. The CPU 10 analyzes a command received from the PC 2 and provides a scanner function to a later-described scanner unit 16 or provides a printer function to a later-described printing unit 17.
[0029]
  The ROM 11 is a read-only storage device and constitutes a part of the main storage space used by the CPU 10. The RAM 12 constitutes a part of the main storage space used by the CPU 10 like the ROM 11 and is a readable / writable volatile storage device. The NVRAM 13 is a non-volatile RAM for storing data that needs to be rewritten.
[0030]
  The display unit 14 is a display device that outputs and displays information on a display or the like, and is connected to the system bus 19 via an input / output interface (not shown). The display unit 14 is used to display information related to various functions of the MFP 1 such as print information. The display unit 14 is configured by, for example, a liquid crystal display.
[0031]
  The operation unit 15 is an input device provided in the MFP 1 for performing an input operation from the outside, and is connected to the system bus 19 via an input / output interface (not shown). The operation unit 15 is used for inputting information regarding various functions of the MFP 1. The operation unit 15 has, for example, an input key configuration in which a predetermined number of push-type switches are arranged.
[0032]
  The scanner unit 16 is a device that provides a scanner function for taking an image (image) drawn (printed) on paper or film into a terminal device, and is connected to the system bus 19 via an input / output interface (not shown). The In response to a command from the CPU 10, the scanner unit 16 scans a document set at a predetermined location of the MFP 1 to generate scan data (raster data), and the scan data is the PC 2 as a host or the host. It is used for transferring to PC3 via PC2.
[0033]
  The printing unit 17 is a device that provides a printer function for printing monochrome or color characters or images, and is connected to the system bus 19 via an input / output interface (not shown). The printing unit 17 is used for printing of print data transferred from the PC 2 or the PC 3 via the PC 2 according to a command from the CPU 10.
[0034]
  The PC interface 18 is connected to an MFP interface (MFP I / F) 28 of the PC 2 to be described later, and enables data communication between the MFP 1 and the PC 2. In addition to commands, it is used for communication of scan data and print data.
[0035]
  The PC 2 includes a CPU 20, ROM 21, RAM 22, HDD (Hard Disk Drive) 23, display unit 24, operation unit 25, CD-ROM drive 26, LAN interface (LAN I / F) 27, and MFP interface. 28, which are coupled to each other by a system bus 29.
  The operating system (OS) having the above-described printer sharing function is installed in the PC 2, and sharing is set for the printer function provided in the MFP 1.
[0036]
  The CPU 20 is a central processing unit for controlling the PC 2. The CPU 20 transmits a scan start command to the MFP 1 from the PC 3 and the like.
[0037]
  The ROM 21 is a read-only storage device and constitutes a part of the main storage space used by the CPU 20. The RAM 22, like the ROM 21, constitutes a part of the main storage space used by the CPU 20, and is a readable / writable volatile storage device. The HDD 23 is a readable / writable storage device (hard disk) and its reading device, and stores print data transferred to the MFP 1, scan data transferred from the MFP 1, and the like as a spooler.
[0038]
  The display unit 24 is a display device that outputs and displays information on a display or the like, and is connected to the system bus 29 via an input / output interface (not shown). The display unit 24 is used to display information related to various functions of the PC 2. The display unit 24 is configured by, for example, a CRT (Cathode Ray Tube) display, a liquid crystal display, or the like.
[0039]
  The operation unit 25 is an input device provided in the PC 2 for performing an input operation from the outside, and is connected to the system bus 29 via an input / output interface (not shown). The operation unit 25 is used for inputting information related to various functions of the PC 2. The operation unit 25 is configured by, for example, a mouse or a keyboard.
[0040]
  The CD-ROM drive 26 is a device that reads data recorded on a CD-ROM, and is connected to the system bus 29 via an input / output interface (not shown). The CD-ROM drive 26 is not an essential component of the PC 2 and may be an FD drive.
[0041]
  The LAN interface 27 is connected to the LAN of the PC 3 to be described later via the LAN 4.
  It is connected to the interface 37 and enables data communication between the PC 2 and the PC 3. In addition to commands to the MFP 1, it is used for communication of scan data, print data, and the like.
[0042]
  The MFP interface 28 is connected to the PC interface 18 of the MFP 1 and enables data communication between the PC 2 and the MFP 1. In addition to command communication, it is used for communication of scan data, print data, and the like.
[0043]
  The PC 3 includes a CPU 30, a ROM 31, a RAM 32, an HDD (Hard DiskDrive) 33, a display unit 34, an operation unit 35, a CD-ROM drive 36, and a LAN interface (LAN I / F) 37. These are coupled to each other by a system bus 39.
[0044]
  The CPU 30 is a central processing unit for controlling the PC 3. The CPU 30 transmits a command such as a scan start to the MFP 1 via the PC 2 and performs control processing of an electronic device (MFP 1 in the present embodiment) described later.
[0045]
  The ROM 31 is a read-only storage device and constitutes a part of the main storage space used by the CPU 30. A program for controlling processing of an electronic device (MFP 1 in the present embodiment) described later is appropriately selected from the HDD 33. / Read and CPU30 executes. The RAM 32 constitutes a part of the main storage space used by the CPU 30 like the ROM 31 and is a readable / writable volatile storage device. The HDD 33 is a readable / writable storage device (hard disk) and its reading device. In addition to a program for control processing of an electronic device (MFP 1 in this embodiment) described later, printing transferred to the MFP 1 via the PC 2 Data, scan data transferred from the MFP 1 via the PC 2, and the like are stored.
[0046]
  The display unit 34 is a display device that outputs and displays information on a display or the like, and is connected to the system bus 39 via an input / output interface (not shown). The display unit 34 is used to display information related to various functions of the PC 3. The display unit 34 is configured by, for example, a CRT display, a liquid crystal display, or the like.
[0047]
  The operation unit 35 is an input device provided in the PC 3 for performing an input operation from the outside, and is connected to the system bus 39 via an input / output interface (not shown). The operation unit 35 is used for inputting information regarding various functions of the PC 3. The operation unit 35 is configured by, for example, a mouse or a keyboard.
[0048]
  The CD-ROM drive 36 is a device that reads data recorded on a CD-ROM, and is connected to the system bus 39 via an input / output interface (not shown). The CD-ROM drive 36 is not an essential component of the PC 3 and may be an FD drive.
[0049]
  The LAN interface 37 is connected to the LAN interface 27 of the PC 2 via the LAN 4 and enables data communication between the PC 3 and the PC 2. In addition to commands to the MFP 1, it is used for communication of scan data, print data, and the like.
[0050]
  In this embodiment, a program for control processing of the electronic device (MFP 1 in this embodiment) stored in the HDD 33 is a removable recording such as a CD-ROM, FD, or MO directly connected to the PC 3. It may be recorded on a medium or may be stored on another device. The program according to the present embodiment is recorded on a removable recording medium such as a CD-ROM, FD, or MO, and is supplied to other systems and devices via a communication network such as the Internet by wired or wireless telecommunication means. can do.
[0051]
  Next, the configuration of the printing system in the system shown in FIG. 2 will be described with reference to FIG. FIG. 3 is a block diagram showing the configuration of the printing system of the system.
[0052]
  As shown in FIG. 3, the PC 2 includes an application 2a such as Microsoft Word (registered trademark), a printer driver 2b that is driver software for the printer of the MFP 1, a spooler 2c that temporarily spools print data, and a print job. A language monitor 2d for monitoring the progress status and the like, a port monitor 2e for designating a port for outputting print data, and a port 2f for connecting the MFP 1 are provided. On the other hand, the PC 3 has an application 3 a such as Microsoft Word (registered trademark), a printer driver 3 b that is driver software for the printer of the MFP 1, and a TWAIN driver 3 c that is driver software for the scanner of the MFP 1.
[0053]
  The print command from the application 2a or the application 3a is a program interface for the printer driver 2b or the printer driver 3b to use the functions of the printer (when the operating system is Windows (registered trademark), an API for writing data to the printer). A certain WritePrinter) is sent to the spooler 2c of the PC 3 by RPC (Remote Procedure Call) to notify the designated printer (MFP 1) that the data has been output. The output data is temporarily spooled in the spooler 2c. Based on the sent command, the port monitor 2e designates a port for outputting print data while monitoring the progress of printing by the language monitor 2d, and the MFP 1 connected to the end of the port 2f receives data. Will be sent.
[0054]
  If the operating system supports bidirectional communication between spoolers (for example, Windows XP (registered trademark), Windows 98 (registered trademark), etc.), as shown by the solid line arrows in FIG. 2b or the printer driver 3b uses a program interface (ReadPrinter, which is an API for reading data from a printer when the operating system is Windows (registered trademark)) to use the printer function, and from the spooler 2c by RPC. Information can be acquired from the designated printer (MFP 1) in the PC 2 or PC 3 that has sent the print command.
  On the other hand, if the operating system does not support bidirectional communication between spoolers (for example, Windows NT (registered trademark), etc.), as shown by the dashed arrow in FIG. Information can be acquired from the designated printer (MFP 1) in the PC 2 or PC 3 that has sent the print command.
  The named pipe is a means for performing communication between applications and is provided by the operating system. By using this, communication between different PCs becomes possible. This method is the same as the method of sending data from the language monitor to the status monitor attached to the printer driver.
[0055]
  In the present invention, a program for control processing of an electronic device (MFP 1 in this embodiment), which will be described in detail later, is applied to the TWAIN driver 3c, which is driver software for the scanner of the MFP 1, utilizing the configuration of the printing system of the system described above. By including it, a read command based on the scanner function from the application 3a is sent to the program interface for the TWAIN driver 3c to use the printer function (if the operating system is Windows (registered trademark), the printer API is used). Using a certain WritePrinter, it is sent to the PC 3 by RPC (Remote Procedure Call). Similarly, the command to receive the reading result based on the scanner function is a program interface for the TWAIN driver 3c to use the printer function (if the operating system is Windows (registered trademark), it is a printer API). Use ReadPrinter) to obtain from PC3 by RPC or named pipe.
  Note that the scanner and printer ports of the MFP 1 are the same, and the program interface for using the printer functions by either the printer driver or the TWAIN driver (if the operating system is Windows (registered trademark), the printer API) The MFP 1 can automatically determine which one of the printer function and the scanner function to use when a command is sent using WritePrinter.
[0056]
  Next, the procedure of the control process of the electronic device according to the present embodiment in the system shown in FIG. 2 will be described with reference to FIGS. FIG. 4 is a flowchart showing a procedure of control processing of the electronic device (MFP 1 in the present embodiment) in the terminal device (PC 3 in the present embodiment). FIG. 5 is a flowchart showing a procedure of control processing in the electronic apparatus (MFP 1 in this embodiment). FIG. 6 is an operation sequence chart of control processing in the terminal device (PC 3 in this embodiment) and the electronic device (MFP 1 in this embodiment).
  In the following description, the operating system installed in the PC 2 and PC 3 is assumed to be Windows (registered trademark).
[0057]
  First, regarding the control processing procedure of the electronic device (MFP 1 in this embodiment) in the terminal device (PC 3 in this embodiment) in the case of an operating system that supports bidirectional communication between spoolers according to the present invention, This will be described with reference to FIG.
[0058]
  As shown in FIG. 4, first, when a scan command is issued from the application (step S101), the TWAIN driver 3c transmits a scan mode transition command to the MFP 1 via the PC 2 by the printer API WritePrinter ( Step S102).
[0059]
  The TWAIN driver 3c then calls the printer API ReadPrinter in order to acquire ACK (ACKnowledgement), which is a signal mainly indicating confirmation at the time of data transmission / reception from the MFP 1. Then, the ACK returned from the MFP 1 is passed to the PC 3 via the spooler system of the PC 2 and is returned to the TWAIN driver 3c as a ReadPrinter processing result (step S103).
[0060]
  If reception of ACK fails (step S104: failure), the scan failure is displayed for the application (step S111), and the electronic device control processing in the terminal device is terminated.
  On the other hand, when the ACK is successfully received (step S104: success), a setting change dialog is displayed for the application (step S105), and a setting change input from the user is accepted (step S106).
[0061]
  When the setting change input is accepted, the TWAIN driver 3c transmits a scan setting and start command, WritePrinter, which is a printer API, to the MFP 1 via the PC 2 (step S107).
[0062]
  Then, the TWAIN driver 3c calls ReadPrinter, which is a printer API, as data acquisition from the MFP 1, and the data transmitted from the MFP 1 and transmitted through the spooler system of the PC 2 as the ReadPrinter processing result is the TWAIN driver 3c. (Step S108).
[0063]
  If there is no received data (step S109: failure), scanning failure is displayed for the application (step S111), and the electronic device control process in the terminal device is terminated.
[0064]
  If the received data is scan data (step S109: scan data), the process returns to step S108, and until the paper end status data is acquired, the TWAIN driver 3c uses ReadPrinter as a printer API as data acquisition from the MFP1. , And the data transmitted from the MFP 1 and transmitted through the spooler system of the PC 2 is returned to the TWAIN driver 3c as the processing result of the ReadPrinter.
[0065]
  If the received data is paper end status data (step S109: paper end status), the received scan data is passed to the application (step S110), and the control processing of the electronic device in the terminal device is terminated.
  If the operating system does not support bidirectional communication between spoolers, the named pipe is read instead of the above ReadPrinter.
[0066]
  In addition, a procedure of control processing in the electronic device (MFP 1 in the present embodiment) corresponding to the procedure of control processing of the electronic device in the terminal device will be described with reference to FIG.
[0067]
  As shown in FIG. 5, when a command is received from the PC 3 via the PC 2 (step S201), the command type is analyzed (step S202).
[0068]
  If the command is a command to shift to the scan mode (step S202: shift to scan mode), the mode shifts to scan mode (step S203), an ACK is returned to the PC 3 via the PC 2 (step S204), and the command processing is performed. finish.
[0069]
  If the command is a scan setting and start command (step S202: scan setting / start), scan setting (setting of resolution, density, etc.) is performed (step S205), and scanning of the set document is started (step S205). In step S206, the scan data is returned to the PC 3 via the PC 2 (step S207).
  Then, it is determined whether there is untransmitted scan data (step S208). If there is untransmitted scan data (step S208: YES), the process returns to step S206 to continue scanning the document. On the other hand, if there is no untransmitted scan data (step S208: NO), the paper end status is returned to the PC 3 via the PC 2 (step S209), the mode is changed to the idle mode (step S210), and the command processing is performed. finish.
[0070]
  If the command is another command (step S202: other), other processing is performed (step S211), and the command processing is terminated.
[0071]
  Next, in the terminal device (PC3 in this embodiment) and the electronic device (MFP1 in this embodiment) based on the above-described procedure of the electronic device control processing in the terminal device and the control processing procedure in the electronic device. The operation of the control process will be described with reference to FIG.
[0072]
  When a scan start command is issued from the application in the PC 3 (step S301), the TWAIN driver 3c of the PC 3 sends WritePrinter, which is a printer API, as a scan mode transition command to the MFP 1 (step S302) in the idle mode. The above command is transmitted through the PC 2 (step S303). The MFP 1 that has received the scan mode shift command shifts to the scan mode (step S304).
[0073]
  The TWAIN driver 3c of the PC 3 calls ReadPrinter, which is a printer API, as an ACK acquisition from the MFP 1, and waits for a response from the MFP 1 (step S305). Then, the MFP 1 transmits ACK to the PC 3 via the PC 2 (step S306). PC3 which received ACK receives a scan setting input from a user (step S307).
[0074]
  Upon receiving the scan setting input, the TWAIN driver 3c of the PC 3 calls the printer API WritePrinter as a scan setting and start command to the MFP 1, and transmits the command via the PC 2 (step S308). Receiving the scan setting and start command, the MFP 1 changes the setting (step S309) and executes the scan (step S310).
[0075]
  Then, the TWAIN driver 3c of the PC 3 calls ReadPrinter, which is a printer API, as an acquisition of scan data from the MFP 1, and waits for a response from the MFP 1 (step S311). The MFP 1 transmits scan data to the PC 3 via the PC 2 (step S312). Steps S311 and S312 are repeated until data transmission for one page is completed.
  When the scan for one page is completed (step S313), the MFP 1 transmits a paper end status (step S314), and shifts to the idle mode (step S315).
[0076]
  As described above, according to the control method, the program, and the recording medium of the electronic apparatus according to the present embodiment, the scanner function command, the scanner read command and the read result reception command, and the printer function of the operating system are used. By using a program interface (API when the operating system is Windows (registered trademark)), the transmission / reception path of the function of the printer is used.
  As a result, the scanner can be controlled without troublesome settings relating to the scanner.
[0077]
  A program interface for writing data to the printer (WritePrinter, which is a printer API when the operating system is Windows (registered trademark)), and a program for reading data from the printer, for the scanner reading command and the reading result receiving command, respectively. By using an interface (when the operating system is Windows (registered trademark), ReadPrinter, which is a printer API) (steps S102, S103, S107, and S108 in FIG. 4), the functions of the scanner can be set in the device class on the printer class. It impersonates the function and uses the transmission / reception path of the printer function.
  As a result, the scanner can be controlled without troublesome settings relating to the scanner.
[0078]
  Furthermore, communication using a named pipe function can be used as a transmission / reception path for the printer function.
  As a result, even when the operating system installed in the terminal device does not support bidirectional communication between the spoolers, it is possible to receive a reading command and a reading result of the scanner.
[0079]
  The preferred embodiments of the present invention have been described above. However, the present invention is not limited to the above-described embodiments, and various modifications can be made as long as they are described in the claims.
[0080]
  For example, in the present embodiment, the MFP 1 that is an electronic device is connected to the network via the PC 2 that is a server, but is not limited thereto. For example, the electronic device may be directly connected to the network. In this case, the electronic device is provided with a spooler, a language monitor, etc. (see FIG. 3) of the PC 2 which is the server of the above-described electronic device, and the terminal device is set with a printer function (first function) relating to the electronic device. It needs to be done.
[0081]
  When the operating system does not support bidirectional communication between spoolers, in this embodiment, communication between the language monitor 2d and the TWAIN driver 3c is performed using a named pipe, but the present invention is not limited to this. For example, communication may be performed using a mail slot or the like.
[0082]
  In addition, the MFP 1 that is an electronic device has a printer function and a scanner function in the present embodiment, but is not limited thereto. For example, it may be a multi-function device having a fax function and a scanner function, or any other device that has two or more functions.
[0083]
【The invention's effect】
  As explained above, claim 1And 3according to,By using the program interface for writing data to the printer and the program interface for reading data from the printer for the scanner reading command and the reading result receiving command, respectively, the function of the scanner is disguised as the function of the printer on the device class. The transmission / reception path of the function can be used. Therefore, it is possible to control the scanner without making troublesome settings regarding the scanner.
[0084]
[0085]
[0086]
[0087]
  Claim2According to this, communication by the named pipe function can be used as a transmission / reception path for the function of the printer. Therefore, even when the operating system installed in the terminal device does not support bidirectional communication between the spoolers, it is possible to receive a reading command and a reading result of the scanner.
[Brief description of the drawings]
FIG. 1 is a network configuration diagram illustrating a schematic configuration of a network.
FIG. 2 is a block diagram showing a system configuration.
FIG. 3 is a block diagram showing a configuration of a printing system of the system.
FIG. 4 is a flowchart showing a procedure of electronic device control processing in the terminal device.
FIG. 5 is a flowchart illustrating a procedure of control processing in the electronic device.
FIG. 6 is an operation sequence chart of control processing in the terminal device and the electronic device.
[Explanation of symbols]
1 MFP (electronic equipment)
3 PC (terminal equipment)
16 Scanner part (second function)
17 Printing section (first function)

Claims (3)

少なくともプリンタ及びスキャナの機能を備えた電子機器と通信可能であり、プリンタにデータを書き込むプログラムインターフェース及びプリンタからデータを読み取るプログラムインターフェースを有するオペレーティングシステムがインストールされている端末装置から、前記スキャナの機能を制御する電子機器の制御方法であって、
前記端末装置にインストールされたオペレーティングシステムが有するプリンタにデータを書き込むプログラムインターフェースを用いて、スキャナの読み取り指令を行うステップと、
前記端末装置にインストールされたオペレーティングシステムが有するプリンタからデータを読み取るプログラムインターフェースを用いて、スキャナの読み取り結果の受け取り指令を行うステップと、を有することを特徴とする電子機器の制御方法。
The function of the scanner can be controlled from a terminal device in which an operating system capable of communicating with an electronic device having at least a printer and a scanner function and having a program interface for writing data to the printer and a program interface for reading data from the printer is installed. A method of controlling an electronic device to be controlled,
Using a program interface that writes data to a printer included in the operating system installed in the terminal device, and issuing a scanner reading command;
A method for controlling an electronic device , comprising: a step of receiving a reading result of a scanner using a program interface that reads data from a printer included in an operating system installed in the terminal device .
前記スキャナの読み取り結果の受け取り指令は、名前付きパイプ機能による通信を用いて行われることを特徴とする請求項1に記載の電子機器の制御方法。 2. The method of controlling an electronic device according to claim 1, wherein the reception result of the reading result of the scanner is performed using communication using a named pipe function . 少なくともプリンタ及びスキャナの機能を備えた電子機器と通信可能であり、プリンタにデータを書き込むプログラムインターフェース及びプリンタからデータを読み取るプログラムインターフェースを有するオペレーティングシステムがインストールされている端末装置を、前記スキャナの機能を制御するように機能させるプログラムであって、
前記端末装置にインストールされたオペレーティングシステムが有するプリンタにデータを書き込むプログラムインターフェースを用いて、スキャナの読み取り指令を行うステップと、
前記端末装置にインストールされたオペレーティングシステムが有するプリンタからデータを読み取るプログラムインターフェースを用いて、スキャナの読み取り結果の受け取り指令を行うステップと、を前記端末装置に実行させるためのプログラム。
A terminal device installed with an operating system capable of communicating with an electronic device having at least a printer and a scanner function and having a program interface for writing data to the printer and a program interface for reading data from the printer is provided with the function of the scanner. A program that functions to control,
Using a program interface that writes data to a printer included in the operating system installed in the terminal device, and issuing a scanner reading command;
A program for causing the terminal device to execute a step of receiving a reading result of a scanner using a program interface for reading data from a printer included in an operating system installed in the terminal device .
JP2002246708A 2002-08-13 2002-08-27 Electronic device control method and program Expired - Fee Related JP3747898B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2002246708A JP3747898B2 (en) 2002-08-27 2002-08-27 Electronic device control method and program
US10/638,341 US7831969B2 (en) 2002-08-13 2003-08-12 Driver installing system for network devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002246708A JP3747898B2 (en) 2002-08-27 2002-08-27 Electronic device control method and program

Publications (2)

Publication Number Publication Date
JP2004086564A JP2004086564A (en) 2004-03-18
JP3747898B2 true JP3747898B2 (en) 2006-02-22

Family

ID=32054529

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002246708A Expired - Fee Related JP3747898B2 (en) 2002-08-13 2002-08-27 Electronic device control method and program

Country Status (1)

Country Link
JP (1) JP3747898B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101161344B1 (en) 2007-07-11 2012-06-29 삼성전자주식회사 Scanning method and system using TWAIN diriver
JP6281366B2 (en) * 2014-03-27 2018-02-21 ブラザー工業株式会社 Scanning apparatus and scanning program

Also Published As

Publication number Publication date
JP2004086564A (en) 2004-03-18

Similar Documents

Publication Publication Date Title
JP4033857B2 (en) Print system, print management server, print method, print management method, and program
US7978360B2 (en) Print system
JP5677047B2 (en) Printing system, information processing apparatus, printing method, and program
JP5402392B2 (en) Printer network system, server apparatus, printing method, program, and recording medium
US7609417B2 (en) Data processing apparatus, image processing apparatus, information notifying method therefor, and program for implementing the method
US7831969B2 (en) Driver installing system for network devices
JP2006350497A (en) Print server, print management server, printer, print system, print data storage method, print management method, printing method, program and recording medium
JP3787434B2 (en) Image forming apparatus and control method therefor, and image input apparatus and control method therefor
US20070282974A1 (en) Distribution server, multifunction appratus and distribution server system
US20040021903A1 (en) Output management method and information processing apparatus
US20060132842A1 (en) Image processing apparatus, method and computer program for selectively processing images
JP2005218036A (en) Network server
US8930450B2 (en) Information processing apparatus, and control method and storage medium therefor
JP2004070871A (en) Network printer and data sharing printing system
JP3747898B2 (en) Electronic device control method and program
JP2007135004A (en) Image forming apparatus, information processing method, and network system
JP2007081893A (en) Image reading apparatus and printing system
JP2007011570A (en) Image data printing system and print instruction receiving device
JP2005123826A (en) Image processor, printer, program and recording medium
JP3740289B2 (en) Image input device, information processing apparatus, image input method and information processing method, and computer-readable storage medium
JP2004078395A (en) Installation method of driver, and program and recording medium
JP3239703B2 (en) Data transfer system, data processing device, printer, and data transfer method
JP2000330734A (en) Network printing method and network printing system using the method
US20060268289A1 (en) Multi image forming method and system using job retention functions
JP7114988B2 (en) Information processing device and information processing method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050811

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050817

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051014

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20051108

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20051121

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 3747898

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081209

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091209

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091209

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101209

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111209

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111209

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121209

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131209

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees