JP6019749B2 - Medium processing apparatus and POS system - Google Patents

Medium processing apparatus and POS system Download PDF

Info

Publication number
JP6019749B2
JP6019749B2 JP2012116882A JP2012116882A JP6019749B2 JP 6019749 B2 JP6019749 B2 JP 6019749B2 JP 2012116882 A JP2012116882 A JP 2012116882A JP 2012116882 A JP2012116882 A JP 2012116882A JP 6019749 B2 JP6019749 B2 JP 6019749B2
Authority
JP
Japan
Prior art keywords
command
unit
operation mode
text
printer
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.)
Active
Application number
JP2012116882A
Other languages
Japanese (ja)
Other versions
JP2013242801A (en
JP2013242801A5 (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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2012116882A priority Critical patent/JP6019749B2/en
Priority to US13/870,844 priority patent/US8873096B2/en
Priority to CN201310182085.5A priority patent/CN103426257B/en
Publication of JP2013242801A publication Critical patent/JP2013242801A/en
Publication of JP2013242801A5 publication Critical patent/JP2013242801A5/ja
Application granted granted Critical
Publication of JP6019749B2 publication Critical patent/JP6019749B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、媒体処理装置、及び、POSシステムに関する。   The present invention relates to a medium processing apparatus and a POS system.

従来、媒体処理装置の一例であるプリンターと、複数のプリンターを備えたPOSシステムが知られている(例えば、特許文献1参照)。特許文献1の構成では、POSレジスターにレシートを印刷するレシートプリンターが接続され、この第1プリンターに、シールを印刷するラベルプリンターが接続されている。そして、POSレジスターが会計処理データを出力すると、レシートプリンターがレシートを印刷し、さらに所定の条件のもとにレシートプリンターがシール印刷データを出力する。ラベルプリンターは、レシートプリンターが出力したシール印刷データに従ってシールを印刷する。   Conventionally, a printer that is an example of a medium processing apparatus and a POS system including a plurality of printers are known (see, for example, Patent Document 1). In the configuration of Patent Document 1, a receipt printer that prints a receipt is connected to a POS register, and a label printer that prints a sticker is connected to the first printer. When the POS register outputs the accounting process data, the receipt printer prints the receipt, and the receipt printer outputs the seal print data under a predetermined condition. The label printer prints a sticker according to the sticker print data output from the receipt printer.

特開2009−199588号公報JP 2009-199588 A

上記従来の構成では、レシート印刷専用のレシートプリンターとシール印刷専用のラベルプリンターとを接続している。すなわち、異なる処理の専用の媒体処理装置を接続している。従って、各媒体処理装置の役割が固定されているので、媒体処理装置の使い分けを制御する必要はない。
これに対し、複数の媒体処理装置を接続したシステムにおいて、各媒体処理装置が共通する機能を有する場合、どのような場合にどちらの媒体処理装置を動作させるかを制御する必要がある。従って、媒体処理装置を制御するコンピューター等において、複数の媒体処理装置をそれぞれ制御する必要があった。
本発明は、上述した事情に鑑みてなされたものであり、複数の媒体処理装置を、簡単な制御により適切に使用できるようにすることを目的とする。
In the above conventional configuration, a receipt printer dedicated to receipt printing and a label printer dedicated to sticker printing are connected. That is, a dedicated medium processing device for different processing is connected. Therefore, since the role of each media processing device is fixed, it is not necessary to control the proper use of the media processing device.
On the other hand, in a system in which a plurality of media processing devices are connected, when each media processing device has a common function, it is necessary to control which media processing device is operated in which case. Therefore, it is necessary to control each of the plurality of media processing devices in a computer or the like that controls the media processing device.
The present invention has been made in view of the above-described circumstances, and an object of the present invention is to enable a plurality of medium processing apparatuses to be appropriately used by simple control.

上記目的を達成するために、本発明の媒体処理装置は、媒体を処理する処理部と、ホストコンピューターから送信されるテキストデータを受信する第1接続部と、外部の処理装置と接続される第2接続部と、記第1接続部で受信されたテキストデータから予め定められた文字列を検索する解析部と、前記解析部で検索された結果に基づいて、前記処理部で処理を実行させる第1動作モード、もしくは前記第1接続部で受信されたテキストデータを前記第2接続部に接続された前記外部の処理装置に通信させる第2動作モードに切り換えて、前記第1動作モードもしくは前記第2動作モードを実行させる制御部と、を備えることを特徴とする。
本発明によれば、ホストコンピューターから送信されたコマンドを受信し、受信したコマンドに基づいて媒体を処理する媒体処理装置が、ホストコンピューターから受信したテキストデータを外部の処理装置に送信して、例えば外部の処理装置に処理を行わせることができる。この媒体処理装置は、ホストコンピューターから送信されたテキストデータに予め設定された文字列が含まれる場合に、2通りの動作モードを切り換える。つまり、ホストコンピューターは送信するテキストデータに所定の文字列を含めることで、媒体処理装置の動作モードを切り換えることができる。これにより、ホストコンピューターが容易に媒体処理装置の動作モードを切り換えさせて、媒体処理装置と外部の処理装置とを使い分けることができる。さらに、ホストコンピューターが、テキストデータに所定の文字列を含めることで動作モードを切り換えさせることが可能である。このため、ホストコンピューターで実行されるアプリケーション及び媒体処理装置が使用しているコマンドに、動作モードの切り換えに関するコマンドが含まれていない場合であっても、コマンドの拡張を行うことなく、動作モードの切り換えの制御が可能になる。従って、ホストコンピューターのコマンドを出力するアプリケーションを変更する必要がない。例えば、既存のホストコンピューターで実行されるアプリケーションをそのまま使用できるという利点がある。
To achieve the above object, a medium processing apparatus according to the present invention includes a processing unit that processes a medium, a first connection unit that receives text data transmitted from a host computer, and a first connection unit that is connected to an external processing device. 2 connection units, an analysis unit that retrieves a predetermined character string from text data received by the first connection unit, and a processing unit that executes processing based on a result retrieved by the analysis unit Switching to the first operation mode or the second operation mode for communicating the text data received by the first connection unit to the external processing device connected to the second connection unit, the first operation mode or the And a control unit that executes the second operation mode.
According to the present invention, a medium processing apparatus that receives a command transmitted from a host computer and processes a medium based on the received command transmits text data received from the host computer to an external processing apparatus, for example, An external processing device can perform processing. This medium processing apparatus switches between two operation modes when a preset character string is included in text data transmitted from a host computer. That is, the host computer can switch the operation mode of the medium processing apparatus by including a predetermined character string in the text data to be transmitted. Thereby, the host computer can easily switch the operation mode of the medium processing apparatus, and the medium processing apparatus and the external processing apparatus can be used properly. Further, the host computer can switch the operation mode by including a predetermined character string in the text data. For this reason, even if the command used by the application and the media processing device executed on the host computer does not include a command related to the switching of the operation mode, the command of the operation mode is not expanded. Switching control becomes possible. Therefore, there is no need to change the application that outputs the command of the host computer. For example, there is an advantage that an application executed on an existing host computer can be used as it is.

また、本発明は、上記媒体処理装置であって、前記処理部は、所定のシートに文字を印刷する印刷部であり、前記予め定められた文字列は、前記印刷部で印刷されない文字列として設定されたものであり、前記解析部は、前記印刷部で印刷されない文字列を、前記第1接続部で受信されたテキストデータに含まれるか否かを検索することを特徴とする。
本発明によれば、テキストデータに基づいて文字を印刷する媒体処理装置が、印刷する文字に係るテキストデータから予め定められた文字列を検出して、動作モードを切り換える。このため、ホストコンピューターは、媒体処理装置に対して印刷を指示するコマンドと、印刷する文字に関するテキストデータとを送信する機能を有していれば、動作モードを切り換えさせることができる。従って、ホストコンピューターで実行されるアプリケーションやコマンドセットを変更することなく、媒体処理装置と外部の処理装置とを使い分けることができる。さらに、テキストデータに含まれる文字列は印刷部で印刷されない文字列として設定されたものであるため、この文字列を印刷用のテキストデータとは明らかに区別でき、誤検出による誤動作のおそれがない。
The present invention is the above-described medium processing apparatus, wherein the processing unit is a printing unit that prints characters on a predetermined sheet, and the predetermined character string is a character string that is not printed by the printing unit. The analysis unit searches for whether or not the character string not printed by the printing unit is included in the text data received by the first connection unit.
According to the present invention, a medium processing device that prints characters based on text data detects a predetermined character string from the text data related to the characters to be printed, and switches the operation mode. For this reason, if the host computer has a function of transmitting a command for instructing printing to the medium processing apparatus and text data relating to characters to be printed, the operation mode can be switched. Therefore, the medium processing device and the external processing device can be used properly without changing the application or command set executed on the host computer. Furthermore, since the character string included in the text data is set as a character string that is not printed by the printing unit, this character string can be clearly distinguished from the text data for printing, and there is no risk of malfunction due to erroneous detection. .

また、本発明は、上記媒体処理装置であって、前記制御部は、前記解析部によって検出された文字列に基づいて前記印刷部で処理を実行させる制御を行うとき、前記テキストデータから前記予め定められた文字列を除いたテキストデータを前記印刷部に印刷させることを特徴とする。
本発明によれば、媒体処理装置が、動作モードの切り換えを目的としてテキストデータに含まれた文字列を除いて、このテキストデータに基づいて処理を実行する。このため、動作モードの切り換えのための文字列が媒体の処理に影響することがないので、より適切に、ホストコンピューターが媒体処理装置と外部の処理装置を使い分けることができる。
Further, the present invention is the above-described medium processing device, wherein the control unit performs , in advance, the text data from the text data when performing control to execute processing in the printing unit based on the character string detected by the analysis unit. Text data excluding a predetermined character string is printed on the printing unit .
According to the present invention, the medium processing apparatus executes processing based on the text data except for the character string included in the text data for the purpose of switching the operation mode. For this reason, since the character string for switching the operation mode does not affect the processing of the medium, the host computer can properly use the medium processing apparatus and the external processing apparatus properly.

また、本発明は、上記媒体処理装置であって、前記第1接続部で受信されたコマンドを、前記処理部で実行されるコマンドまたは前記外部の処理装置で実行されるコマンドに変換する変換部を備えることを特徴とする。
本発明によれば、媒体処理装置がホストコンピューターから受信したコマンドを、処理部または外部の処理装置が実行されるコマンドに変換する。このため、媒体処理装置または外部の処理装置が、異なるコマンドを使用するホストコンピューターに接続された場合であっても、ホストコンピューターで実行されるアプリケーションから出力されるコマンドを改変することなく、媒体処理装置と外部の処理装置とを適切に動作させることができる。
Further, the present invention provides the medium processing device, wherein the conversion unit converts the command received by the first connection unit into a command executed by the processing unit or a command executed by the external processing device. It is characterized by providing.
According to the present invention, a command received by a medium processing device from a host computer is converted into a command executed by a processing unit or an external processing device. Therefore, even when a media processing device or an external processing device is connected to a host computer that uses a different command, the media processing can be performed without altering the command output from the application executed on the host computer. The apparatus and the external processing apparatus can be appropriately operated.

また、上記目的を達成するために、本発明のPOSシステムは、コマンドを送信するPOS端末と、媒体を処理する処理部と、POS端末から送信されるテキストデータを受信する第1接続部、前記第1接続部で受信されたテキストデータから予め定められた文字列を検索する解析部、前記解析部で検索された結果に基づいて前記処理部で処理を実行させる第1動作モードもしくは前記第1接続部で受信されたテキストデータを送信させる第2動作モードに切り換えて前記第1動作モードもしくは前記第2動作モードを実行させる制御部、及び前記第2動作モードに切り替えられたときに前記テキストデータを送信する第2接続部を有する第1媒体処理装置と、前記第1媒体処理装置の前記第2接続部に接続され、前記第2接続部から送信されたデータを受信する受信部、及び前記受信部により受信されたデータに基づいて前記第1媒体処理装置の前記処理部と共通の処理を行う媒体処理部を有する第2媒体処理装置と、を備えることを特徴とする。
本発明のPOSシステムによれば、POS端末が送信するテキストデータに所定の文字列を含めることで、第1媒体処理装置が処理を実行する動作モードと、第2媒体処理装置が処理を実行する動作モードとを容易に切り換えることができる。従って、POS端末は、第1及び第2媒体処理装置を簡単な処理によって適切に使い分けることができる。また、POS端末が送信するテキストデータに予め設定された文字列が含まれる場合に動作モードを切り換えるので、POS端末で実行されるアプリケーション及び第1媒体処理装置が使用しているコマンドに、動作モードの切り換えに関するコマンドが含まれていない場合であっても、コマンドの拡張を行うことなく、動作モードの切り換えの制御が可能になる。従って、POS端末のコマンドを変更する必要がない。例えば、既存のPOS端末で実行されるアプリケーションの構成を使用できるという利点がある。
In order to achieve the above object, a POS system of the present invention includes a POS terminal that transmits a command, a processing unit that processes a medium, a first connection unit that receives text data transmitted from the POS terminal , An analysis unit that retrieves a predetermined character string from text data received by the first connection unit; a first operation mode in which processing is executed by the processing unit based on a result retrieved by the analysis unit; or the first A control unit that switches to the second operation mode for transmitting the text data received by the connection unit and executes the first operation mode or the second operation mode , and the text data when switched to the second operation mode a first media processing device having a second connecting unit for transmitting, connected to the second connecting portion of the first media processing device, is transmitted from the second connecting portion And a second medium processing device having a medium processing unit that performs processing common to the processing unit of the first medium processing device based on the data received by the receiving unit. It is characterized by that.
According to the POS system of the present invention, by including a predetermined character string in the text data transmitted by the POS terminal, an operation mode in which the first medium processing device executes processing, and the second medium processing device executes processing. The operation mode can be easily switched. Therefore, the POS terminal can properly use the first and second medium processing devices appropriately by simple processing. In addition, since the operation mode is switched when the text data transmitted by the POS terminal includes a preset character string, the operation mode is included in the command executed by the application executed on the POS terminal and the first medium processing apparatus. Even when a command related to switching is not included, operation mode switching can be controlled without expanding the command. Therefore, there is no need to change the POS terminal command. For example, there is an advantage that the configuration of an application executed on an existing POS terminal can be used.

また、本発明は、上記POSシステムであって、前記第1媒体処理装置の前記処理部は、レシートを印刷する印刷部であり、前記予め定められた文字列は、前記印刷部で印刷されない文字列として設定されたものであり、前記解析部は、前記印刷部で印刷されない文字列を、前記第1接続部で受信されたテキストデータに含まれるか否かを検索することを特徴とする。
本発明によれば、テキストデータに基づいて文字を印刷する第1媒体処理装置が、印刷する文字に係るテキストデータから予め定められた文字列を検出して、動作モードを切り換える。このため、POS端末は、第1媒体処理装置に対して印刷を指示するコマンドと、印刷する文字に関するテキストデータとを送信する機能を有していれば、動作モードを切り換えさせることができる。従って、POS端末で実行されるアプリケーションやコマンドセットを変更することなく、第1、第2媒体処理装置を使い分けることができる。さらに、テキストデータに含まれる文字列は印刷部で印刷されない文字列として設定されたものであるため、この文字列を印刷用のテキストデータとは明らかに区別でき、誤検出による誤動作のおそれがない。
Further, the present invention is the POS system, wherein the processing unit of the first medium processing apparatus is a printing unit that prints a receipt, and the predetermined character string is a character that is not printed by the printing unit. The analysis unit searches for whether or not the character string not printed by the printing unit is included in the text data received by the first connection unit.
According to the present invention, the first medium processing device that prints characters based on text data detects a predetermined character string from the text data related to the characters to be printed, and switches the operation mode. For this reason, if the POS terminal has a function of transmitting a command for instructing printing to the first medium processing apparatus and text data relating to characters to be printed, the operation mode can be switched. Accordingly, the first and second medium processing apparatuses can be used properly without changing the application or command set executed on the POS terminal. Furthermore, since the character string included in the text data is set as a character string that is not printed by the printing unit, this character string can be clearly distinguished from the text data for printing, and there is no risk of malfunction due to erroneous detection. .

また、本発明は、上記POSシステムであって、前記第2媒体処理装置の前記媒体処理部は、レシートを印刷する第2印刷部であり、前記第1媒体処理装置は、前記制御部が前記第2動作モードに切り換えたときに、前記第2接続部から前記データを送信し、前記第2媒体処理装置は、前記受信部で前記データを受信し、前記第2印刷部でレシートを印刷することを特徴とする。
本発明のPOSシステムによれば、POS端末が第1、第2媒体処理装置による印刷動作を切り換えて実行させ、第1媒体処理装置からレシートを印刷することも、第2媒体処理装置からレシートを印刷することも可能となる。これにより、例えば同じ印刷物を使用状況にあわせて適宜所望の装置に出力させることができる。
Further, the present invention is the POS system, wherein the medium processing unit of the second medium processing device is a second printing unit that prints a receipt, and the control unit includes the control unit When switching to the second operation mode, the data is transmitted from the second connection unit, and the second medium processing apparatus receives the data at the reception unit and prints a receipt at the second printing unit. It is characterized by that.
According to the POS system of the present invention, the POS terminal can switch and execute the printing operation by the first and second media processing devices to print the receipt from the first media processing device, or the receipt from the second media processing device. It is also possible to print. Thereby, for example, the same printed matter can be appropriately output to a desired device in accordance with the use situation.

本発明によれば、ホストコンピューターが複数の処理装置を使い分ける制御を行わなくても、複数の処理装置を適切に使用できる。   According to the present invention, it is possible to appropriately use a plurality of processing devices without the host computer performing control for properly using the plurality of processing devices.

第1の実施形態に係るPOSシステムの機能ブロック図である。1 is a functional block diagram of a POS system according to a first embodiment. 複合機の構成を詳細に示す機能ブロック図である。2 is a functional block diagram illustrating in detail a configuration of a multifunction peripheral. FIG. 複合機の動作を示すフローチャートである。6 is a flowchart illustrating an operation of the multifunction machine. 第2の実施形態に係るPOSシステムの機能ブロック図である。It is a functional block diagram of the POS system which concerns on 2nd Embodiment. プリンターの構成を詳細に示す機能ブロック図である。FIG. 2 is a functional block diagram illustrating a configuration of a printer in detail. プリンターの動作を示すフローチャートである。3 is a flowchart illustrating an operation of a printer.

[第1の実施形態]
以下、図面を参照して本発明の実施形態について説明する。
図1は、第1の実施形態に係るPOSシステム3の構成を示すブロック図である。
POSシステム3は小売り店舗等に設置され、商品販売時の売上データ登録、会計処理、レシート印刷等の処理を行うシステムである。POSシステム3は、オペレーターが操作するPOS端末20(ホストコンピューター)と、POS端末20に接続された複合機100(媒体処理装置、第1媒体処理装置)と、複合機100に接続されたプリンター200(外部の処理装置、第2媒体処理装置)とを備えて構成される。
[First Embodiment]
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram showing the configuration of the POS system 3 according to the first embodiment.
The POS system 3 is a system that is installed in a retail store or the like, and performs processing such as sales data registration at the time of product sales, accounting processing, and receipt printing. The POS system 3 includes a POS terminal 20 (host computer) operated by an operator, a multifunction device 100 (medium processing device, first medium processing device) connected to the POS terminal 20, and a printer 200 connected to the multifunction device 100. (External processing device, second medium processing device).

POS端末20には、各種情報を表示するオペレーター用のディスプレイ31、顧客向けに金額等を表示するカスタマーディスプレイ32、金銭を収容したキャッシュドロワー33、オペレーターが操作するキーボード36、商品のバーコードを読み取るバーコードスキャナー37、及び、クレジットカードやキャッシュカード等のカードに記録された磁気情報を読み取るカードリーダー38が接続されている。オペレーターは、キーボード36の操作またはバーコードスキャナー37による読み取り操作を行い、商品情報を入力する。POS端末20は、入力された商品情報に基づいてPOSサーバー10への問合せを行う。POSサーバー10は、POS端末20から送信された商品情報に基づいて商品マスターを検索し、商品マスターから商品コード、商品名、金額に関する情報を抽出してPOS端末20に返信する。POS端末20は、POSサーバー10から返信された情報に基づいてディスプレイ31及びカスタマーディスプレイ32に商品代金を表示する。この処理が一取引の全ての商品について完了すると、オペレーターはキーボード36等の操作により会計処理を実行し、必要に応じてキャッシュドロワー33から釣り銭を支払う。POS端末20は、複合機100またはプリンター200を制御してレシートを印刷出力させる。   The POS terminal 20 reads an operator display 31 for displaying various information, a customer display 32 for displaying the amount of money for the customer, a cash drawer 33 for storing money, a keyboard 36 operated by the operator, and a product barcode. A barcode scanner 37 and a card reader 38 that reads magnetic information recorded on a card such as a credit card or a cash card are connected. The operator operates the keyboard 36 or performs a reading operation using the barcode scanner 37 and inputs product information. The POS terminal 20 makes an inquiry to the POS server 10 based on the input product information. The POS server 10 searches for the product master based on the product information transmitted from the POS terminal 20, extracts information on the product code, product name, and amount from the product master, and returns the information to the POS terminal 20. The POS terminal 20 displays the product price on the display 31 and the customer display 32 based on the information returned from the POS server 10. When this process is completed for all commodities in one transaction, the operator executes an accounting process by operating the keyboard 36 or the like, and pays change from the cash drawer 33 as necessary. The POS terminal 20 controls the MFP 100 or the printer 200 to print out a receipt.

複合機100は、記録媒体としてのロール紙にレシートを印刷する機能を備えている。また、複合機100は、小切手等の帳票に磁気的に記録された情報を読み取る磁気読取機能、及び、小切手等の帳票に対して使用済みであることを印刷するバリデーション機能を備えている。会計処理において、顧客が小切手を使用する場合には、オペレーターは複合機100に小切手をセットして、小切手の磁気情報を読み取らせる。複合機100は、小切手の磁気情報の読み取りと、バリデーション印刷を実行する。POS端末20は、複合機100により読み取られた情報に基づいて会計処理を実行する。
また、プリンター200は、ロール紙にレシートを印刷する機能を備えている。なお、複合機100及びプリンター200は、感熱ロール紙にレシートを印刷するサーマルプリンターであってもよいし、普通紙からなるロール紙に印刷するシリアルドットインパクトプリンターやインクジェット式プリンターであってもよい。
The multifunction machine 100 has a function of printing a receipt on roll paper as a recording medium. The multi-function device 100 also has a magnetic reading function for reading information magnetically recorded on a form such as a check, and a validation function for printing that the form is used on a form such as a check. In the accounting process, when the customer uses a check, the operator sets the check in the multi-function peripheral 100 and reads the magnetic information of the check. The multi-function device 100 reads magnetic information on checks and performs validation printing. The POS terminal 20 performs accounting processing based on the information read by the multifunction device 100.
The printer 200 has a function of printing a receipt on roll paper. The multifunction device 100 and the printer 200 may be a thermal printer that prints a receipt on thermal roll paper, or may be a serial dot impact printer or an ink jet printer that prints on a roll paper made of plain paper.

POS端末20は、POS端末20の各部を制御する制御部21を備えている。制御部21は、図示しないCPU、RAM、ROM等を備え、記憶部23に記憶されたプログラムを実行する。制御部21は、記憶部23に記憶されたプリンタードライバープログラム24を実行するプリンタードライバー実行部22を有する。プリンタードライバー実行部22は、インターフェイス27に接続されたプリンターに対し、印刷実行を指示するコマンド、及び、レシートに印刷される印刷データを生成して、送信する。プリンタードライバー実行部22は、特定のメーカーのプリンターまたは特定の機種に対応したプリンタードライバープログラム24を実行する。このため、プリンタードライバー実行部22が生成するコマンド及び印刷データは、特定のメーカーのプリンターまたは特定の機種に対応するコマンド体系のコマンド、及び、印刷データである。   The POS terminal 20 includes a control unit 21 that controls each unit of the POS terminal 20. The control unit 21 includes a CPU, RAM, ROM, and the like (not shown), and executes a program stored in the storage unit 23. The control unit 21 includes a printer driver execution unit 22 that executes the printer driver program 24 stored in the storage unit 23. The printer driver execution unit 22 generates and transmits a command for instructing print execution and print data to be printed on a receipt to the printer connected to the interface 27. The printer driver execution unit 22 executes a printer driver program 24 corresponding to a specific manufacturer's printer or a specific model. Therefore, the commands and print data generated by the printer driver execution unit 22 are commands and print data of a command system corresponding to a printer of a specific manufacturer or a specific model.

POS端末20は、ディスプレイ31、カスタマーディスプレイ32及びキャッシュドロワー33が接続されるコネクター(図示略)を有する出力部28を備えている。出力部28は、制御部21の制御に従って、出力部28から表示用のデータをディスプレイ31及びカスタマーディスプレイ32に出力する。また、出力部28は、制御部21の制御に従って、キャッシュドロワー33を開かせる信号をキャッシュドロワー33に出力する。出力部28は、キャッシュドロワー33の状態(開/閉)を検出して、検出結果を制御部21に出力する機能を有していてもよい。出力部28には、外部のプリンターに接続されるインターフェイス27が接続されている。インターフェイス27は、USB、RS−232C、Ethernet(登録商標)等の規格に準拠したコネクター(図示略)を有し、このコネクターに接続されるケーブルによりプリンターに接続される。なお、インターフェイス27は、無線通信インターフェイスを備え、プリンターと無線通信回線により接続されてもよい。この無線通信インターフェイスの具体例は、IEEE802.11、ワイヤレスUSB、Bluetooth(登録商標)、UWB等である。本実施形態では、インターフェイス27には、ケーブル6を介して複合機100が接続されている。POS端末20と複合機100とは1対1で接続されている。
また、POS端末20は、通信回線5に接続される通信インターフェイス26を備え、通信インターフェイス26を介してPOSサーバー10に接続されている。通信インターフェイス26は、例えば、Ethernetに準拠したLANインターフェイスやモデム等の通信インターフェイス回路を備えていてもよい。
The POS terminal 20 includes an output unit 28 having a connector (not shown) to which a display 31, a customer display 32, and a cash drawer 33 are connected. The output unit 28 outputs display data from the output unit 28 to the display 31 and the customer display 32 under the control of the control unit 21. Further, the output unit 28 outputs a signal for opening the cash drawer 33 to the cash drawer 33 under the control of the control unit 21. The output unit 28 may have a function of detecting the state (open / closed) of the cash drawer 33 and outputting the detection result to the control unit 21. An interface 27 connected to an external printer is connected to the output unit 28. The interface 27 has a connector (not shown) compliant with standards such as USB, RS-232C, Ethernet (registered trademark), and is connected to the printer by a cable connected to the connector. The interface 27 may include a wireless communication interface and be connected to the printer via a wireless communication line. Specific examples of this wireless communication interface are IEEE 802.11, wireless USB, Bluetooth (registered trademark), UWB, and the like. In the present embodiment, the multifunction device 100 is connected to the interface 27 via the cable 6. The POS terminal 20 and the multifunction device 100 are connected on a one-to-one basis.
The POS terminal 20 includes a communication interface 26 connected to the communication line 5, and is connected to the POS server 10 via the communication interface 26. The communication interface 26 may include, for example, a communication interface circuit such as a LAN interface or a modem compliant with Ethernet.

複合機100は、外部の装置に接続される第1インターフェイス110(第1接続部)、及び、第2インターフェイス115(第2接続部)を備えている。第1インターフェイス110はケーブル6を介してPOS端末20に接続されている。第2インターフェイス115はケーブル7を介してプリンター200に接続されている。第1インターフェイス110はPOS端末20と1対1で接続され、第2インターフェイス115は、プリンター200と1対1で接続されている。   The multifunction device 100 includes a first interface 110 (first connection unit) and a second interface 115 (second connection unit) connected to an external device. The first interface 110 is connected to the POS terminal 20 via the cable 6. The second interface 115 is connected to the printer 200 via the cable 7. The first interface 110 is connected to the POS terminal 20 on a one-to-one basis, and the second interface 115 is connected to the printer 200 on a one-to-one basis.

複合機100は、制御部150を備えている。制御部150は、例えば、図示しないCPU、RAM、ROM、及びEEPROMやフラッシュメモリー等の不揮発性の記憶装置を備えている。制御部150は、不揮発性の記憶装置に記憶したプログラムを実行して、各部を制御する。このプログラムは、複合機100を動作させるための、いわゆるファームウェアであってもよい。
また、複合機100は、制御部150の制御に従って動作するロール紙印刷部120(処理部)、磁気読取部130、及び帳票印刷部140を備えている。つまり、複合機100は、レシートを印刷する機能と、帳票の磁気情報の読取機能と帳票への印刷機能とを含む複数の機能を有する複合装置である。
制御部150は、第1インターフェイス110によりPOS端末20との間でデータを送受信するとともに、第2インターフェイス115を介してプリンター200との間でデータを送受信する。
The multifunction machine 100 includes a control unit 150. The control unit 150 includes, for example, a CPU, RAM, ROM, and a non-volatile storage device such as an EEPROM or a flash memory (not shown). The control unit 150 controls each unit by executing a program stored in a non-volatile storage device. This program may be so-called firmware for operating the multifunction peripheral 100.
The multi-function device 100 also includes a roll paper printing unit 120 (processing unit), a magnetic reading unit 130, and a form printing unit 140 that operate according to the control of the control unit 150. That is, the multi-function device 100 is a multi-function device having a plurality of functions including a receipt printing function, a form magnetic information reading function, and a form printing function.
The control unit 150 transmits / receives data to / from the POS terminal 20 via the first interface 110 and transmits / receives data to / from the printer 200 via the second interface 115.

ロール紙印刷部120は、図示はしないが、ロール紙に文字や画像を印刷する印刷ヘッド、ロール紙を搬送する搬送機構、ロール紙をカットするカッター機構、ロール紙の有無や先端の位置を検出する検出器等を備えている。ロール紙印刷部120は、制御部150の制御に従ってロール紙に印刷を行い、レシートとして出力する。
磁気読取部130は、オペレーターがセットした小切手等の帳票に磁気的に記録された情報を読み取る。磁気読取部130は、図示はしないが、上記帳票を搬送する搬送機構、及び、帳票に磁気的に記録された情報(例えば、MICR文字)を読み取るMICRヘッド等を備えている。また、帳票印刷部140は、磁気読取部130により読み取られる帳票に対し、例えば処理済みである旨を示す文字等を印刷する。帳票印刷部140は、図示しない印刷ヘッドを備えている。この印刷ヘッドは、例えば、磁気読取部130の搬送機構により帳票が搬送される位置に設けられ、この帳票に印刷を施す。
Although not shown, the roll paper printing unit 120 detects a print head that prints characters and images on the roll paper, a conveyance mechanism that conveys the roll paper, a cutter mechanism that cuts the roll paper, the presence or absence of the roll paper, and the position of the leading edge. The detector etc. which do are provided. The roll paper printing unit 120 prints on the roll paper under the control of the control unit 150 and outputs it as a receipt.
The magnetic reading unit 130 reads information magnetically recorded on a form such as a check set by the operator. Although not shown, the magnetic reading unit 130 includes a conveyance mechanism that conveys the form, a MICR head that reads information (for example, MICR characters) magnetically recorded on the form, and the like. In addition, the form printing unit 140 prints, for example, characters indicating that processing has been performed on the form read by the magnetic reading unit 130. The form printing unit 140 includes a print head (not shown). For example, the print head is provided at a position where the form is conveyed by the conveyance mechanism of the magnetic reading unit 130, and prints the form.

プリンター200は、レシートを印刷する機能を備えた単機能のプリンターである。プリンター200は、複合機100に対してケーブル7を介して接続されるインターフェイス210(受信部)と、ロール紙に印刷する印刷ヘッド等を備えたロール紙印刷部220(媒体処理部)と、これらを制御する制御部250とを備えている。インターフェイス210は、第1インターフェイス110或いは第2インターフェイス115と同様に、コネクター(図示略)を有する有線インターフェイス、または無線通信インターフェイスである。制御部250は、インターフェイス210を介して複合機100との間でデータを送受信する。   The printer 200 is a single-function printer having a function of printing a receipt. The printer 200 includes an interface 210 (reception unit) connected to the multifunction peripheral 100 via the cable 7, a roll paper printing unit 220 (medium processing unit) including a print head for printing on roll paper, and the like. And a control unit 250 for controlling the above. Similar to the first interface 110 or the second interface 115, the interface 210 is a wired interface having a connector (not shown) or a wireless communication interface. The control unit 250 transmits / receives data to / from the multifunction device 100 via the interface 210.

図2は、POSシステム3の機能ブロック図であり、複合機100の構成を特に詳細に示している。
この図2に示すように、複合機100は、複合機100の各部を制御するCPU等が実装された本体基板101と、本体基板101とは別に設けられたインターフェイス基板103とを有する。インターフェイス基板103は、例えば、接離可能なバスライン(図示略)を介して本体基板101に接続されていて、複合機100の本体から着脱可能であってもよい。インターフェイス基板103には、第1インターフェイス110及び第2インターフェイス115が実装され、本体基板101には制御部150が実装されている。また、本体基板101は、複合機100の本体に設けられたロール紙印刷部120、磁気読取部130、及び帳票印刷部140の各部に接続されている。
FIG. 2 is a functional block diagram of the POS system 3 and particularly shows the configuration of the multifunction peripheral 100.
As illustrated in FIG. 2, the multifunction peripheral 100 includes a main board 101 on which a CPU that controls each unit of the multi-function machine 100 is mounted, and an interface board 103 provided separately from the main board 101. For example, the interface board 103 may be connected to the main body board 101 via a bus line (not shown) that can be contacted / separated, and may be detachable from the main body of the multifunction peripheral 100. A first interface 110 and a second interface 115 are mounted on the interface board 103, and a control unit 150 is mounted on the main board 101. The main body substrate 101 is connected to the roll paper printing unit 120, the magnetic reading unit 130, and the form printing unit 140 provided in the main body of the multifunction peripheral 100.

第1インターフェイス110は、ケーブル6を接続可能なコネクター111を備え、第2インターフェイス115はケーブル7を接続可能なコネクター116を備えている。これらのコネクター111、116は、インターフェイス基板103上で独立して設けられている。具体的な例としては、複合機100の本体の背面に、コネクター111、116が並んで露出する形態が挙げられる。また、第1インターフェイス110及び第2インターフェイス115は、互いに独立して通信を実行可能である。
コネクター111、116は、例えば、USB、RS−232C、Ethernet(登録商標)等の規格に準拠したコネクターであり、これらの規格に準拠したケーブル6、7を接続できる。また、第1インターフェイス110及び第2インターフェイス115が無線通信インターフェイスを備え、POS端末20やプリンター200と無線通信回線により接続されてもよい。この無線通信インターフェイスの具体例は、IEEE802.11、ワイヤレスUSB、Bluetooth(登録商標)、UWB等である。
The first interface 110 includes a connector 111 to which the cable 6 can be connected, and the second interface 115 includes a connector 116 to which the cable 7 can be connected. These connectors 111 and 116 are provided independently on the interface board 103. As a specific example, a form in which the connectors 111 and 116 are exposed side by side on the back surface of the main body of the multi-function peripheral 100 can be cited. Further, the first interface 110 and the second interface 115 can execute communication independently of each other.
The connectors 111 and 116 are connectors compliant with standards such as USB, RS-232C, and Ethernet (registered trademark), and can connect cables 6 and 7 compliant with these standards. Further, the first interface 110 and the second interface 115 may include a wireless communication interface, and may be connected to the POS terminal 20 and the printer 200 via a wireless communication line. Specific examples of this wireless communication interface are IEEE 802.11, wireless USB, Bluetooth (registered trademark), UWB, and the like.

制御部150は、本体基板101に実装されたCPUにより各種プログラムを実行することで、外部装置制御部151、動作モード制御部153、データ解析部155(解析部)、変換部157、コマンド解析部158、及び処理制御部159として動作する。   The control unit 150 executes various programs by a CPU mounted on the main body substrate 101, so that an external device control unit 151, an operation mode control unit 153, a data analysis unit 155 (analysis unit), a conversion unit 157, a command analysis unit 158 and the process control unit 159.

外部装置制御部151は、第2インターフェイス115に接続された装置との間でデータを送受信し、その装置の種類(複合機かプリンターか)、機種名、メーカー名、その装置に対応するコマンド体系(コマンドの種類)、その装置が実行可能な機能等を特定する。本実施形態で、外部装置制御部151は、少なくとも、第2インターフェイス115に接続された装置が実行可能な処理の種類を特定する。さらに好ましくは、外部装置制御部151は、第2インターフェイス115に接続された装置が使用するコマンド体系を特定する。コマンド体系を特定する方法は、例えば、第2インターフェイス115を介してコマンドの種類を問い合わせるデータを送信し、このデータに対する応答に基づいて特定する方法、或いは、第2インターフェイス115に接続された装置の機種名やメーカー名を判定することで、対応するコマンド体系を特定する方法が挙げられる。本実施形態では第2インターフェイス115にプリンター200が接続されるので、外部装置制御部151は、プリンター200が使用するコマンド体系を特定する。   The external device control unit 151 transmits / receives data to / from a device connected to the second interface 115, the device type (multifunction device or printer), model name, manufacturer name, and command system corresponding to the device. (Command type), functions that can be executed by the device, and the like. In the present embodiment, the external device control unit 151 specifies at least the types of processing that can be executed by the device connected to the second interface 115. More preferably, the external device control unit 151 specifies a command system used by a device connected to the second interface 115. The command system is specified by, for example, transmitting data inquiring about the type of command via the second interface 115 and specifying based on a response to the data, or by a device connected to the second interface 115. There is a method for identifying the corresponding command system by determining the model name or manufacturer name. In this embodiment, since the printer 200 is connected to the second interface 115, the external device control unit 151 specifies a command system used by the printer 200.

動作モード制御部153は、複合機100の動作モードの切換を制御する。複合機100は、POS端末20が印刷実行を指示するコマンドを出力した場合に、複合機100が印刷を行う第1モードと、プリンター200に印刷を行わせる第2モードとを実行できる。第1モードと第2モードは排他的に選択される。
言い換えれば、第1モードでは、第1インターフェイス110により受信したコマンドのうち、複合機100により実行可能な処理に関する全てのコマンドを、複合機100が実行する。これに対し、第2モードでは、複合機100は、第1インターフェイス110により受信したコマンドのうち、第2インターフェイス115に接続された装置が実行可能な処理に関するコマンドを第2インターフェイス115から送信する。第2インターフェイス115に接続された装置が実行できない処理に関するコマンドを、複合機100が実行する。
The operation mode control unit 153 controls switching of the operation mode of the multifunction peripheral 100. When the POS terminal 20 outputs a command for instructing execution of printing, the multi-function device 100 can execute a first mode in which the multi-function device 100 performs printing and a second mode in which the printer 200 performs printing. The first mode and the second mode are exclusively selected.
In other words, in the first mode, the multifunction device 100 executes all commands related to processing that can be executed by the multifunction device 100 among the commands received by the first interface 110. On the other hand, in the second mode, the multifunction device 100 transmits, from the second interface 115, a command related to processing that can be executed by a device connected to the second interface 115 among the commands received by the first interface 110. The multifunction device 100 executes a command related to processing that cannot be executed by the device connected to the second interface 115.

複合機100は、第1モードにおいて第1インターフェイス110により印刷実行を指示するコマンドを受信した場合、このコマンドとともに受信した印刷データに基づいて、ロール紙印刷部120によって印刷を実行する。
また、複合機100は、第2モードにおいて第1インターフェイス110により印刷実行を指示するコマンドを受信した場合、このコマンドと、コマンドとともに受信した印刷データとを、第2インターフェイス115から送信する。プリンター200は、インターフェイス210を介して、印刷を指示するコマンドと印刷データを受信し、ロール紙印刷部220によって印刷を実行する。
When receiving a command for instructing execution of printing from the first interface 110 in the first mode, the multifunction peripheral 100 executes printing by the roll paper printing unit 120 based on the print data received together with this command.
When receiving a command for instructing execution of printing from the first interface 110 in the second mode, the multifunction peripheral 100 transmits the command and the print data received together with the command from the second interface 115. The printer 200 receives a command for instructing printing and print data via the interface 210, and executes printing by the roll paper printing unit 220.

第1モードと第2モードの切り換えは、例えば、後述するデータ解析部155がテキストコマンドを検出した場合に実行される。なお、複合機100に対して動作モードを切り換えるためのコマンドとして定義されたコマンドを第1インターフェイス110によって受信した場合に、動作モード制御部153が動作モードを切り換える構成としてもよい。また、複合機100の外装パネルに物理スイッチ(図示略)を設け、このスイッチの操作を検出した場合に動作モード制御部153が動作モードを切り換えてもよい。或いは、複合機100に操作パネル(図示略)を設け、この操作パネルの操作に応じて、動作モード制御部153が動作モードを切り換えてもよい。この場合、操作パネルに、実行中の動作モードを示すインジケーターランプ(図示略)やディスプレイを設けてもよい。   Switching between the first mode and the second mode is executed, for example, when a data analysis unit 155 described later detects a text command. The operation mode control unit 153 may be configured to switch the operation mode when the first interface 110 receives a command defined as a command for switching the operation mode with respect to the multifunction device 100. Further, a physical switch (not shown) may be provided on the exterior panel of the multi-function device 100, and the operation mode control unit 153 may switch the operation mode when an operation of this switch is detected. Alternatively, an operation panel (not shown) may be provided in the multifunction device 100, and the operation mode control unit 153 may switch the operation mode in accordance with the operation of the operation panel. In this case, an indicator lamp (not shown) or a display indicating the operation mode being executed may be provided on the operation panel.

データ解析部155は、第1インターフェイス110により受信した印刷データに含まれるテキストデータを解析して、このテキストデータ中にテキストコマンドが含まれているか否かを判定する。テキストコマンドとは、POS端末20が出力する印刷データに含まれているコマンドである。印刷データは、文字を印刷するためのテキストデータを含み、このテキストデータは文字及び記号の羅列である。テキストデータに含まれる文字及び記号はレシートに印刷されて顧客が見るものであるから、通常、人が認識可能な意味のある内容を構成する。このため、単語や記号として特定の意味を持たない(意味が割り当てられていない場合を含む)文字列は、印刷されない。例えば、「$10」は金額を示す文字列である。これに対し、例えば「#1122」という文字列は、「#」という文字に何らかの意味が割り当てられていなければ、意味を持たない文字列である。このように意味を持たない文字列はレシートに印刷されないから、複合機100が解釈可能なコマンドとして使用することができる。このように印刷データ中のテキストデータの一部として複合機100に送信されるコマンドを、本実施形態ではテキストコマンドと呼ぶ。
テキストコマンドの具体的な例を挙げる。複合機100に対して動作モードの切り換えを指示するコマンドとして、「#1122」が予め設定されたものとする。予め設定されたコマンドは、例えば制御部150が有する不揮発性メモリー(図示略)に記憶される。データ解析部155は、第1インターフェイス110を介して受信した印刷データ中のテキストデータを取得し、このテキストデータに「#1122」が含まれているか検索する。「#1122」が検出された場合、データ解析部155は、動作モード制御部153に対し、動作モードの切り換えを指示するコマンドが検出されたことを通知する。これにより、動作モード制御部153が、実行中の動作モードを別の動作モードに切り換える。
The data analysis unit 155 analyzes text data included in the print data received by the first interface 110 and determines whether or not a text command is included in the text data. The text command is a command included in the print data output from the POS terminal 20. The print data includes text data for printing characters, and this text data is an enumeration of characters and symbols. Since characters and symbols included in the text data are printed on a receipt and viewed by the customer, they usually constitute meaningful content that can be recognized by a person. For this reason, a character string having no specific meaning as a word or symbol (including a case where no meaning is assigned) is not printed. For example, “$ 10” is a character string indicating the amount of money. On the other hand, for example, the character string “# 1122” is a character string having no meaning unless any meaning is assigned to the character “#”. Since the character string having no meaning is not printed on the receipt, it can be used as a command that can be interpreted by the multifunction peripheral 100. A command transmitted to the multi-function peripheral 100 as part of text data in the print data is called a text command in this embodiment.
Here are some specific examples of text commands. It is assumed that “# 1122” is set in advance as a command for instructing the MFP 100 to switch the operation mode. The preset command is stored in a non-volatile memory (not shown) included in the control unit 150, for example. The data analysis unit 155 acquires text data in the print data received via the first interface 110, and searches for whether “# 1122” is included in the text data. When “# 1122” is detected, the data analysis unit 155 notifies the operation mode control unit 153 that a command instructing switching of the operation mode has been detected. As a result, the operation mode control unit 153 switches the operation mode being executed to another operation mode.

テキストコマンドは印刷データの一部として出力される。このため、POS端末20が使用するコマンドセット(コマンド体系)に変更を加えることなく、新しいコマンドを追加できる。すなわち、印刷データに含まれるテキストデータは、プリンタードライバープログラム24に対して印刷データを出力するアプリケーションプログラムが生成する。プリンタードライバープログラム24は、アプリケーションプログラムが生成した印刷データを複合機100用のデータ形式に変換して、印刷実行を指示するコマンドとともに送信する。従って、アプリケーションプログラムがテキストコマンドを含む印刷データを出力すれば、そのテキストコマンドをプリンタードライバープログラム24が認識できなくても、複合機100は、テキストコマンドに従って動作する。従って、POS端末20が実行するプリンタードライバープログラム24の内容を変更することなく、複合機100の動作に係る任意のコマンドを追加できる。   The text command is output as part of the print data. Therefore, a new command can be added without changing the command set (command system) used by the POS terminal 20. That is, the text data included in the print data is generated by an application program that outputs the print data to the printer driver program 24. The printer driver program 24 converts the print data generated by the application program into a data format for the multifunction peripheral 100, and transmits it together with a command for instructing print execution. Therefore, if the application program outputs print data including a text command, the multifunction peripheral 100 operates according to the text command even if the printer driver program 24 cannot recognize the text command. Therefore, any command related to the operation of the multifunction peripheral 100 can be added without changing the content of the printer driver program 24 executed by the POS terminal 20.

また、データ解析部155は、第1インターフェイス110が受信した印刷データ中にテキストコマンドを検出した場合、テキストコマンドを削除して、新たに印刷データを生成する。これにより、レシートに意味の無い文字列が印刷されないようにすることができる。データ解析部155は、第1及び第2モードのいずれにおいても、印刷データからキストコマンドを除去する。   In addition, when the data analysis unit 155 detects a text command in the print data received by the first interface 110, the data analysis unit 155 deletes the text command and newly generates print data. As a result, a meaningless character string can be prevented from being printed on the receipt. The data analysis unit 155 removes the text command from the print data in both the first and second modes.

変換部157は、第1インターフェイス110により受信したコマンドを、別のコマンド体系における同じ意味のコマンドに変換する。上述のように、POS端末20は、プリンタードライバープログラム24の機能により、所定のコマンド体系におけるコマンドを生成して送信する。コマンド体系は、複合機100やプリンター200を含む装置のメーカーや機種によって異なる。このため、POS端末20が送信するコマンド体系と、複合機100及び/またはプリンター200が実行可能なコマンド体系とが、一致しないことがあり得る。変換部157は、少なくとも1のコマンド体系におけるコマンドと、別のコマンド体系におけるコマンドとの対応関係を定義するテーブルを記憶している。制御部150は、POS端末20が送信するコマンドのコマンド体系と、複合機100が実行可能なコマンド体系とを対応づけるテーブルを記憶していてもよい。また、制御部150は、POS端末20が送信するコマンドのコマンド体系と、プリンター200が実行可能なコマンド体系とを対応づけるテーブルを記憶していてもよい。変換部157は、第1インターフェイス110により受信したコマンドが、複合機100が実行可能なコマンド体系のコマンドでない場合、複合機100が実行可能なコマンド体系のコマンドへの変換を行う。これにより、第1インターフェイス110により受信したすべてのコマンドを複合機100が実行できる。また、変換部157は、第2モードの実行中に、第1インターフェイス110により受信したコマンドが、プリンター200が実行可能なコマンド体系のコマンドでない場合、プリンター200が実行可能なコマンド体系のコマンドへの変換を行う。プリンター200が実行可能なコマンドは、外部装置制御部151が特定できる。従って、POS端末20と複合機100及び/またはプリンター200との間でコマンド体系が一致していない場合、第1モード及び第2モードのいずれにおいても、POS端末20が送信したコマンドを実行できる。これにより、例えば、POSシステム3を構成するプリンターを、別のメーカーの機種である複合機100やプリンター200に置き換えた場合、プリンタードライバープログラム24を変更することなく、複合機100やプリンター200を動作させることができる。   The conversion unit 157 converts the command received by the first interface 110 into a command having the same meaning in another command system. As described above, the POS terminal 20 generates and transmits a command in a predetermined command system by the function of the printer driver program 24. The command system varies depending on the manufacturer and model of the device including the multifunction peripheral 100 and the printer 200. For this reason, the command system transmitted by the POS terminal 20 may not match the command system that can be executed by the multifunction peripheral 100 and / or the printer 200. The conversion unit 157 stores a table that defines a correspondence relationship between commands in at least one command system and commands in another command system. The control unit 150 may store a table that associates a command system of commands transmitted from the POS terminal 20 with a command system that can be executed by the multifunction peripheral 100. The control unit 150 may store a table that associates a command system of commands transmitted from the POS terminal 20 with a command system that can be executed by the printer 200. When the command received by the first interface 110 is not a command command that can be executed by the multifunction device 100, the conversion unit 157 converts the command into a command command that can be executed by the multifunction device 100. Accordingly, the multifunction device 100 can execute all commands received by the first interface 110. In addition, when the command received by the first interface 110 is not a command command that can be executed by the printer 200 during execution of the second mode, the conversion unit 157 converts the command command to a command that can be executed by the printer 200. Perform conversion. Commands that can be executed by the printer 200 can be specified by the external device control unit 151. Therefore, if the command system does not match between the POS terminal 20 and the multifunction peripheral 100 and / or the printer 200, the command transmitted by the POS terminal 20 can be executed in both the first mode and the second mode. Thereby, for example, when the printer constituting the POS system 3 is replaced with the multifunction device 100 or the printer 200 which is a model of another manufacturer, the multifunction device 100 or the printer 200 is operated without changing the printer driver program 24. Can be made.

また、変換部157は、第1インターフェイス110により受信されたコマンドをプリンター200に適したコマンドに変換する際に、コマンドの内容および印刷データの内容を変換するものであってもよい。例えば、プリンタードライバープログラム24が対応するプリンターの印刷ヘッドの解像度、改行量、フォントサイズ、フォントの種類、文字間マージン、ロール紙の左右のマージン、ロール紙のサイズ等の印刷条件が、複合機100のロール紙印刷部120とは異なっていることがある。また、プリンター200のロール紙印刷部220と印刷条件が異なっていることもある。さらに、ロール紙印刷部120とロール紙印刷部220の間で、印刷条件が異なることもある。
このような場合、変換部157は、印刷条件が異なるプリンターであっても、同様の、或いは類似した印刷結果が得られるように、コマンド及び印刷データの内容を変換する。例えば、変換部157は、ロール紙印刷部120が、プリンタードライバープログラム24に対応するプリンターと同様または類似の形態で印刷できるように、第1インターフェイス110により受信されたコマンドに含まれる印刷位置指定コマンド、マージン指定コマンド、改行コマンド、フォント指定コマンド、文字間マージン指定コマンド等のコマンドとパラメーターを変換する。さらに、変換部157は、印刷データに含まれる画像データのピクセル数の変換を行ってもよい。同様に、変換部157は、ロール紙印刷部220が、プリンタードライバープログラム24に対応するプリンターと同様または類似の形態で印刷できるように、第1インターフェイス110により受信されたコマンドに含まれる上記の各種コマンドとパラメーター、印刷データに含まれる画像データのピクセル数等を変換する。これにより、POS端末20のソフトウェアを改変することなく、同様の、或いは類似した形態の印刷物を、複合機100及びプリンター200によって得ることができる。
The conversion unit 157 may convert the content of the command and the content of the print data when converting the command received by the first interface 110 into a command suitable for the printer 200. For example, the printer 100 has the printing conditions such as the resolution of the print head of the printer, the line feed amount, the font size, the font type, the margin between characters, the left and right margins of the roll paper, and the roll paper size. The roll paper printing unit 120 may be different. Further, the printing conditions may be different from those of the roll paper printing unit 220 of the printer 200. Furthermore, printing conditions may differ between the roll paper printing unit 120 and the roll paper printing unit 220.
In such a case, the conversion unit 157 converts the contents of the command and the print data so that the same or similar print result can be obtained even if the printer has different print conditions. For example, the conversion unit 157 may print the print position designation command included in the command received by the first interface 110 so that the roll paper printing unit 120 can print in the same or similar form as the printer corresponding to the printer driver program 24. Command, parameters such as margin specification command, line feed command, font specification command, character margin specification command, etc. are converted. Further, the conversion unit 157 may convert the number of pixels of the image data included in the print data. Similarly, the conversion unit 157 allows the roll paper printing unit 220 to print in the various types of commands included in the command received by the first interface 110 so that printing can be performed in the same or similar form as the printer corresponding to the printer driver program 24. Commands and parameters, and the number of pixels of image data included in print data are converted. As a result, the same or similar printed matter can be obtained by the multifunction device 100 and the printer 200 without modifying the software of the POS terminal 20.

コマンド解析部158は、第1インターフェイス110により受信したコマンドを解析して、受信されたコマンドに対応する機能を特定する。例えば、コマンド解析部158は、受信されたコマンドが、ロール紙印刷部120の機能に関するコマンドか、磁気読取部130の機能に関するコマンドか、帳票印刷部140の機能に関するコマンドかを特定する。
コマンド解析部158は、第1インターフェイス110により受信したコマンドが磁気読取部130または帳票印刷部140の機能に関するコマンドである場合、そのコマンドを後述する処理制御部159により実行させる。
また、第1インターフェイス110により受信したコマンドがロール紙印刷部120の機能に関するコマンドである場合、コマンド解析部158は、複合機100の動作モードを判別する。複合機100の動作モードが第1モードである場合、コマンド解析部158は、ロール紙印刷部120に関するコマンドを処理制御部159により実行させる。一方、複合機100の動作モードが第2モードである場合、コマンド解析部158は、ロール紙印刷部120に関するコマンドを、第2インターフェイス115によってプリンター200へ送信させる。ここで、第1インターフェイス110により受信したコマンドが印刷データを伴う場合、コマンド解析部158は、コマンドと印刷データとを第2インターフェイス115により送信させる。
The command analysis unit 158 analyzes a command received by the first interface 110 and identifies a function corresponding to the received command. For example, the command analysis unit 158 specifies whether the received command is a command related to the function of the roll paper printing unit 120, a command related to the function of the magnetic reading unit 130, or a command related to the function of the form printing unit 140.
When the command received by the first interface 110 is a command related to the function of the magnetic reading unit 130 or the form printing unit 140, the command analysis unit 158 causes the processing control unit 159 described later to execute the command.
When the command received by the first interface 110 is a command related to the function of the roll paper printing unit 120, the command analysis unit 158 determines the operation mode of the multifunction peripheral 100. When the operation mode of the multifunction peripheral 100 is the first mode, the command analysis unit 158 causes the processing control unit 159 to execute a command related to the roll paper printing unit 120. On the other hand, when the operation mode of the multifunction peripheral 100 is the second mode, the command analysis unit 158 causes the second interface 115 to transmit a command related to the roll paper printing unit 120 to the printer 200. Here, when the command received by the first interface 110 is accompanied by print data, the command analysis unit 158 causes the second interface 115 to transmit the command and the print data.

処理制御部159は、第1インターフェイス110により受信したコマンドを実行し、ロール紙印刷部120、磁気読取部130及び帳票印刷部140を駆動させて、レシート印刷、磁気情報の読み取り、或いは、帳票への印刷を実行させる。   The processing control unit 159 executes the command received by the first interface 110 and drives the roll paper printing unit 120, the magnetic reading unit 130, and the form printing unit 140 to print receipts, read magnetic information, or to form. Execute printing.

図3は、複合機100の動作を示すフローチャートである。
制御部150は、第1インターフェイス110によりコマンドを受信したことを検出すると(ステップS11)、受信されたコマンドの変換が必要か否かを変換部157が判定する(ステップS12)。受信されたコマンドが、複合機100が対応するコマンドとは異なっている場合、変換部157はコマンドの変換が必要であると判定する(ステップS12;Yes)。この場合、変換部157は、受信されたコマンドを、複合機100が対応するコマンド体系における対応コマンドに変換する(ステップS13)。また、変換部157は、コマンドの変換が必要ないと判定した場合(ステップS12;No)、コマンドの変換を行わない。
FIG. 3 is a flowchart showing the operation of the multifunction machine 100.
When the control unit 150 detects that a command has been received by the first interface 110 (step S11), the conversion unit 157 determines whether or not conversion of the received command is necessary (step S12). If the received command is different from the command corresponding to the multifunction device 100, the conversion unit 157 determines that the command needs to be converted (step S12; Yes). In this case, the conversion unit 157 converts the received command into a corresponding command in a command system supported by the multifunction peripheral 100 (step S13). If the conversion unit 157 determines that command conversion is not necessary (step S12; No), the conversion unit 157 does not convert the command.

続いて、データ解析部155が、第1インターフェイス110により、コマンドとともにテキストデータが受信されたか否かを判定する(ステップS14)。テキストデータが受信された場合(ステップS14;Yes)、データ解析部155は受信されたテキストデータを解析し(ステップS15)、テキストコマンドを検索する(ステップS16)。ここで、受信されたテキストデータにテキストコマンドが含まれている場合(ステップS16;Yes)、データ解析部155が動作モード制御部153にテキストコマンドを出力する。動作モード制御部153は、テキストコマンドに従って、現在の動作モードを他の動作モードに切り換える(設定する)処理を行う(ステップS17)。また、データ解析部155は、受信されたテキストデータから、動作モード制御部153に出力したテキストコマンドを除去して新たなテキストデータを生成し(ステップS18)、次のステップS19に移行する。また、受信されたテキストデータにテキストコマンドが含まれていない場合(ステップS16;No)、データ解析部155はステップS19に移行する。   Subsequently, the data analysis unit 155 determines whether text data is received together with the command by the first interface 110 (step S14). When text data is received (step S14; Yes), the data analysis unit 155 analyzes the received text data (step S15) and searches for a text command (step S16). If the received text data includes a text command (step S16; Yes), the data analysis unit 155 outputs the text command to the operation mode control unit 153. The operation mode control unit 153 performs a process of switching (setting) the current operation mode to another operation mode in accordance with the text command (step S17). The data analysis unit 155 removes the text command output to the operation mode control unit 153 from the received text data to generate new text data (step S18), and proceeds to the next step S19. If the received text data does not contain a text command (step S16; No), the data analysis unit 155 proceeds to step S19.

ステップS19では、コマンド解析部158が、受信されたコマンドを解析する。コマンド解析部158は、受信されたコマンドが印刷コマンドであるか否かを判定する(ステップS20)。受信されたコマンドが印刷コマンドでない場合(ステップS20;No)、コマンド解析部158は処理制御部159にコマンドを出力し、処理制御部159が磁気読取部130または帳票印刷部140を制御して、コマンドに従って処理を実行する(ステップS21)。
一方、受信されたコマンドが印刷コマンドである場合(ステップS21;Yes)、データ解析部155は、動作モード制御部153により設定されている動作モードを判定する(ステップS22)。動作モードが第1モードである場合(ステップS23;Yes)、データ解析部155は処理制御部159にコマンドを出力し、処理制御部159がロール紙印刷部120を制御して、印刷コマンドに従って印刷を実行する(ステップS24)。これに対し、動作モードが第2モードである場合(ステップS23;No)、変換部157がコマンドの変換の要否を判定する(ステップS25)。第2モードではプリンター200にコマンドを送信するので、変換部157は、第1インターフェイス110により受信したコマンドが、プリンター200が使用するコマンドと異なっている場合に、コマンドの変換が必要であると判定する(ステップS25;Yes)。この場合、変換部157は、プリンター200が使用するコマンド体系におけるコマンドへの変換を行い(ステップS26)、第2インターフェイス115によってプリンター200に印刷コマンドと印刷データとを送信する(ステップS27)。また、コマンドの変換が必要ない場合には(ステップS25;No)、変換部157は、第1インターフェイス110により受信したコマンドと印刷データとを第2インターフェイス115により送信する。なお、ステップS27で第2インターフェイス115によって送信される印刷データは、第1インターフェイス110により受信された印刷データ、或いは、ステップS18でテキストコマンドが除去されたデータである。
In step S19, the command analysis unit 158 analyzes the received command. The command analysis unit 158 determines whether the received command is a print command (step S20). If the received command is not a print command (step S20; No), the command analysis unit 158 outputs the command to the processing control unit 159, and the processing control unit 159 controls the magnetic reading unit 130 or the form printing unit 140, The process is executed according to the command (step S21).
On the other hand, when the received command is a print command (step S21; Yes), the data analysis unit 155 determines the operation mode set by the operation mode control unit 153 (step S22). When the operation mode is the first mode (step S23; Yes), the data analysis unit 155 outputs a command to the processing control unit 159, and the processing control unit 159 controls the roll paper printing unit 120 to perform printing according to the print command. Is executed (step S24). On the other hand, when the operation mode is the second mode (step S23; No), the conversion unit 157 determines whether or not the command needs to be converted (step S25). Since the command is transmitted to the printer 200 in the second mode, the conversion unit 157 determines that the command needs to be converted when the command received by the first interface 110 is different from the command used by the printer 200. (Step S25; Yes). In this case, the conversion unit 157 performs conversion into commands in the command system used by the printer 200 (step S26), and transmits a print command and print data to the printer 200 through the second interface 115 (step S27). If the command conversion is not necessary (step S25; No), the conversion unit 157 transmits the command and print data received by the first interface 110 via the second interface 115. Note that the print data transmitted by the second interface 115 in step S27 is the print data received by the first interface 110 or the data from which the text command has been removed in step S18.

以上説明したように、本発明を適用した第1の実施形態に係るPOSシステム3が備える複合機100は、媒体としてのロール紙を処理するロール紙印刷部120と、POS端末20から送信されるテキストデータを受信する第1インターフェイス110と、プリンター200に接続された第2インターフェイス115と、第1インターフェイス110により受信されたテキストデータから予め定められた文字列を検索するデータ解析部155と、データ解析部155の解析結果に基づいて、ロール紙印刷部120で処理を実行させる第1動作モード、及び、第1インターフェイス110により受信されたテキストデータを第2インターフェイス115によりプリンター200に送信させる第動作モードを切り換えて実行可能な制御部150とを備える。
これにより、複合機100は、POS端末20から受信したコマンドとテキストデータをプリンター200に送信して、例えばプリンター200に処理を行わせることができる。また、複合機100は、2通りの動作モードを、POS端末20から送信されたテキストデータに、予め設定された文字列が含まれる場合に切り換える。つまり、POS端末20は、コマンドとともに送信するテキストデータに所定の文字列を含めることで、複合機100の動作モードを切り換えることができる。このため、POS端末20が容易に複合機100の動作モードを切り換えさせて、複合機100とプリンター200とを使い分けることができる。さらに、POS端末20で実行されるアプリケーション及び複合機100が使用しているコマンドに、動作モードの切り換えに関するコマンドが含まれていない場合であっても、コマンドの拡張を行うことなく、動作モードの切り換えの制御が可能になる。従って、POS端末20のコマンドを出力するアプリケーションを変更する必要がない。例えば、既存のPOS端末20で実行されるアプリケーションをそのまま使用できるという利点がある。
As described above, the MFP 100 included in the POS system 3 according to the first embodiment to which the present invention is applied is transmitted from the roll paper printing unit 120 that processes roll paper as a medium and the POS terminal 20. A first interface 110 for receiving text data; a second interface 115 connected to the printer 200; a data analysis unit 155 for retrieving a predetermined character string from text data received by the first interface 110; based on the analysis result of the analysis unit 155, a first operation mode for executing a process in roll paper printing unit 120, and the second to transmit the text data received by the first interface 110 by the second interface 115 to the printer 200 Control unit 15 which can be executed by switching the operation mode Provided with a door.
As a result, the multifunction peripheral 100 can transmit the command and text data received from the POS terminal 20 to the printer 200 and cause the printer 200 to perform processing, for example. The multifunction device 100 switches the two operation modes when the text data transmitted from the POS terminal 20 includes a preset character string. That is, the POS terminal 20 can switch the operation mode of the multifunction device 100 by including a predetermined character string in the text data transmitted together with the command. For this reason, the POS terminal 20 can easily switch the operation mode of the multifunction peripheral 100 so that the multifunction peripheral 100 and the printer 200 can be used properly. Furthermore, even if the application executed on the POS terminal 20 and the command used by the multifunction device 100 do not include a command related to switching of the operation mode, the operation mode is not expanded without performing the command extension. Switching control becomes possible. Therefore, there is no need to change the application that outputs the command of the POS terminal 20. For example, there is an advantage that an application executed on the existing POS terminal 20 can be used as it is.

また、テキストデータに基づいてロール紙印刷部120によって文字を印刷する複合機100が、印刷する文字に係るテキストデータに含まれる予め定められた文字列を検出して、動作モードを切り換える。このため、POS端末20は、印刷する文字に関するテキストデータを送信する機能を有していれば、動作モードを切り換えさせることができる。従って、POS端末20のアプリケーションを変更することなく、複合機100とプリンター200とを使い分けることができる。 Further, the multifunction peripheral 100 that prints characters by the roll paper printing unit 120 based on the text data detects a predetermined character string included in the text data related to the characters to be printed, and switches the operation mode. For this reason, if the POS terminal 20 has a function of transmitting text data relating to characters to be printed, the operation mode can be switched. Therefore, the multifunction device 100 and the printer 200 can be used properly without changing the application of the POS terminal 20.

さらに、制御部150は、データ解析部155によってテキストデータから予め定められた文字列が検出された場合に、第1インターフェイス110により受信されたテキストデータから予め定められた文字列を除いたテキストデータに基づいて、切り換え後の動作モードを実行する。このため、動作モードの切り換えのための文字列がレシートの印刷に影響することがないので、より適切に、POS端末20が複合機100とプリンター200を使い分けることができる。
さらにまた、複合機100は、第1インターフェイス110により受信されたコマンドを、ロール紙印刷部120またはプリンター200が使用するコマンドに変換する変換部157を備える。このため、複合機100またはプリンター200が、異なるコマンドを使用するPOS端末20に接続された場合であっても、POS端末20で実行されるアプリケーションから出力されるコマンドを改変することなく、複合機100とプリンター200とを適切に動作させることができる。
Further, when the data analysis unit 155 detects a predetermined character string from the text data, the control unit 150 removes the predetermined character string from the text data received by the first interface 110. Based on the above, the operation mode after switching is executed. Therefore, since the character string for switching the operation mode does not affect the printing of the receipt, the POS terminal 20 can more appropriately use the multifunction device 100 and the printer 200 properly.
Furthermore, the multifunction peripheral 100 includes a conversion unit 157 that converts a command received by the first interface 110 into a command used by the roll paper printing unit 120 or the printer 200. Therefore, even when the multifunction device 100 or the printer 200 is connected to the POS terminal 20 that uses a different command, the multifunction device is not modified without changing the command output from the application executed on the POS terminal 20. 100 and the printer 200 can be appropriately operated.

[第2の実施形態]
図4は、実施形態に係るPOSシステム2の構成を示すブロック図である。
POSシステム2は、POSシステム3と同様に小売り店舗等に設置され、商品販売時の売上データ登録、会計処理、レシート印刷等の処理を行うシステムである。POSシステム2は、POS端末20と、2台のプリンター200、300を備えて構成される。POS端末20にはプリンター300(媒体処理装置、第1媒体処理装置)が接続され、プリンター300にプリンター200が接続され、2台のプリンター200、300はいわゆるデイジーチェーン接続されている。
つまり、本第2の実施形態に係るPOSシステム2は、上記第1の実施形態に係るPOSシステム3において、複合機100をプリンター200に置き換えたものである。従って、入力部29はホストコンピューターに対応し、プリンター200は外部の処理装置および第2媒体処理装置に対応する。
なお、本第2の実施形態において、上記第1の実施形態と同様に構成される各部については、同符号を付して説明を省略する。
[Second Embodiment]
FIG. 4 is a block diagram illustrating a configuration of the POS system 2 according to the embodiment.
Similar to the POS system 3, the POS system 2 is a system that is installed in a retail store or the like, and performs processing such as sales data registration at the time of product sales, accounting processing, and receipt printing. The POS system 2 includes a POS terminal 20 and two printers 200 and 300. A printer 300 (medium processing apparatus, first medium processing apparatus) is connected to the POS terminal 20, the printer 200 is connected to the printer 300, and the two printers 200 and 300 are connected in a so-called daisy chain.
That is, the POS system 2 according to the second embodiment is obtained by replacing the MFP 100 with the printer 200 in the POS system 3 according to the first embodiment. Accordingly, the input unit 29 corresponds to a host computer, and the printer 200 corresponds to an external processing device and a second medium processing device.
Note that in the second embodiment, the same components as those in the first embodiment are denoted by the same reference numerals and description thereof is omitted.

本第2の実施形態では、POS端末20のインターフェイス27に、ケーブル6を介してプリンター300が接続されている。POS端末20とプリンター300とは1対1で接続されている。   In the second embodiment, the printer 300 is connected to the interface 27 of the POS terminal 20 via the cable 6. The POS terminal 20 and the printer 300 are connected on a one-to-one basis.

プリンター300は、プリンター200と同様、記録媒体としてのロール紙にレシートを印刷する機能を備えている。なお、プリンター300は、感熱ロール紙にレシートを印刷するサーマルプリンターであってもよいし、普通紙からなるロール紙に印刷するシリアルドットインパクトプリンターやインクジェット式プリンターであってもよい。
プリンター300は、外部の装置に接続される第1インターフェイス310(第1接続部)、及び、第2インターフェイス315(第2接続部)を備えている。第1インターフェイス310はケーブル6を介してPOS端末20に接続されている。第2インターフェイス315はケーブル7を介してプリンター200に接続されている。第1インターフェイス310はPOS端末20と1対1で接続され、第2インターフェイス315は、プリンター200と1対1で接続されている。
Similar to the printer 200, the printer 300 has a function of printing a receipt on roll paper as a recording medium. The printer 300 may be a thermal printer that prints a receipt on heat-sensitive roll paper, or may be a serial dot impact printer or an ink jet printer that prints on roll paper made of plain paper.
The printer 300 includes a first interface 310 (first connection unit) and a second interface 315 (second connection unit) connected to an external device. The first interface 310 is connected to the POS terminal 20 via the cable 6. The second interface 315 is connected to the printer 200 via the cable 7. The first interface 310 is connected to the POS terminal 20 on a one-to-one basis, and the second interface 315 is connected to the printer 200 on a one-to-one basis.

プリンター300は、制御部350を備えている。制御部350は、例えば、図示しないCPU、RAM、ROM、及びEEPROMやフラッシュメモリー等の不揮発性の記憶装置を備えている。制御部350は、不揮発性の記憶装置に記憶したプログラムを実行して、各部を制御する。このプログラムは、プリンター300を動作させるための、いわゆるファームウェアであってもよい。
制御部350は、第1インターフェイス310によりPOS端末20との間でデータを送受信するとともに、第2インターフェイス315を介してプリンター200との間でデータを送受信する。また、制御部350は、ロール紙印刷部330(処理部)を制御して、レシートを印刷する。
ロール紙印刷部330は、図示はしないが、ロール紙に文字や画像を印刷する印刷ヘッド、ロール紙を搬送する搬送機構、ロール紙をカットするカッター機構、ロール紙の有無や先端の位置を検出する検出器等を備えている。ロール紙印刷部330は、制御部350の制御に従ってロール紙に印刷を行い、レシートとして出力する。
The printer 300 includes a control unit 350. The control unit 350 includes, for example, a CPU, RAM, ROM, and a non-volatile storage device such as an EEPROM or flash memory (not shown). The control unit 350 controls each unit by executing a program stored in a non-volatile storage device. This program may be so-called firmware for operating the printer 300.
The control unit 350 transmits / receives data to / from the POS terminal 20 via the first interface 310 and transmits / receives data to / from the printer 200 via the second interface 315. Further, the control unit 350 controls the roll paper printing unit 330 (processing unit) to print a receipt.
Although not shown, the roll paper printing unit 330 detects a print head that prints characters and images on the roll paper, a conveyance mechanism that conveys the roll paper, a cutter mechanism that cuts the roll paper, the presence or absence of the roll paper, and the position of the tip The detector etc. which do are provided. The roll paper printing unit 330 prints on the roll paper according to the control of the control unit 350 and outputs it as a receipt.

そして、プリンター200のインターフェイス210には、ケーブル7を介してプリンター300が接続され、制御部250は、インターフェイス210を介してプリンター300との間でデータを送受信する。   The printer 300 is connected to the interface 210 of the printer 200 via the cable 7, and the control unit 250 transmits and receives data to and from the printer 300 via the interface 210.

図5は、POSシステム2の機能ブロック図であり、プリンター300の構成を特に詳細に示している。
プリンター300は、プリンター300の各部を制御するCPU等が実装された本体基板301と、本体基板301とは別に設けられたインターフェイス基板303とを有する。インターフェイス基板303は、例えば、接離可能なバスライン(図示略)を介して本体基板301に接続されていて、プリンター300の本体から着脱可能であってもよい。
インターフェイス基板303には、第1インターフェイス310及び第2インターフェイス315が実装され、本体基板301には制御部350が実装されている。また、本体基板301は、プリンター300の本体に設けられたロール紙印刷部330に接続されている。
FIG. 5 is a functional block diagram of the POS system 2 and particularly shows the configuration of the printer 300.
The printer 300 includes a main body substrate 301 on which a CPU or the like that controls each unit of the printer 300 is mounted, and an interface substrate 303 provided separately from the main body substrate 301. The interface board 303 may be connected to the main body board 301 via, for example, a contactable / separable bus line (not shown), and may be detachable from the main body of the printer 300.
A first interface 310 and a second interface 315 are mounted on the interface board 303, and a control unit 350 is mounted on the main body board 301. The main body substrate 301 is connected to a roll paper printing unit 330 provided in the main body of the printer 300.

第1インターフェイス310は、ケーブル6を接続可能なコネクター311を備え、第2インターフェイス315はケーブル7を接続可能なコネクター316を備えている。これらのコネクター311、316は、インターフェイス基板303上で独立して設けられている。具体的な例としては、プリンター300の本体の背面に、コネクター311、316が並んで露出する形態が挙げられる。また、第1インターフェイス310及び第2インターフェイス315は、互いに独立して通信を実行可能である。
コネクター311、316は、コネクター111、116(図2)と同様に、各種規格に準拠したコネクターであってもよい。また、第1インターフェイス310及び第2インターフェイス315が、第1インターフェイス110及び第2インターフェイス115と同様に無線通信インターフェイスを備えてもよい。
The first interface 310 includes a connector 311 that can connect the cable 6, and the second interface 315 includes a connector 316 that can connect the cable 7. These connectors 311 and 316 are provided independently on the interface board 303. As a specific example, there is a form in which connectors 311 and 316 are exposed side by side on the back surface of the main body of the printer 300. In addition, the first interface 310 and the second interface 315 can execute communication independently of each other.
The connectors 311 and 316 may be connectors conforming to various standards, like the connectors 111 and 116 (FIG. 2). Further, the first interface 310 and the second interface 315 may include a wireless communication interface similarly to the first interface 110 and the second interface 115 .

制御部350は、本体基板301に実装されたCPUにより各種プログラムを実行することで、外部装置制御部351、動作モード制御部353、データ解析部355(解析部)、変換部357、コマンド解析部358、及び処理制御部359として動作する。   The control unit 350 executes various programs by the CPU mounted on the main body substrate 301, so that the external device control unit 351, the operation mode control unit 353, the data analysis unit 355 (analysis unit), the conversion unit 357, and the command analysis unit. 358 and the process control unit 359.

外部装置制御部351は、外部装置制御部151と同様に機能する。外部装置制御部351は、第2インターフェイス315に接続された装置との間でデータを送受信し、その装置の種類、機種名、メーカー名、その装置に対応するコマンド体系、その装置が実行可能な機能等を特定する。
動作モード制御部353は、動作モード制御部153と同様に機能する。制御部350は、プリンター300が印刷を行う第1モードと、プリンター200に印刷を行わせる第2モードとを排他的に選択して実行可能である。第1モードでは、プリンター300は、第1インターフェイス310により受信したコマンドのうち実行可能な全てのコマンドを実行する。これに対し、第2モードでは、プリンター300は、第1インターフェイス310により受信したコマンドのうち、第2インターフェイス315に接続された装置が実行可能な処理に関するコマンドを第2インターフェイス315から送信する。動作モード制御部353は、第1モードと第2モードの切り換えを制御する。
The external device control unit 351 functions in the same manner as the external device control unit 151. The external device control unit 351 transmits / receives data to / from a device connected to the second interface 315, and can execute the device type, model name, manufacturer name, command system corresponding to the device, and the device. Specify the function.
The operation mode control unit 353 functions in the same manner as the operation mode control unit 153. The control unit 350 can exclusively select and execute the first mode in which the printer 300 performs printing and the second mode in which the printer 200 performs printing. In the first mode, the printer 300 executes all executable commands among the commands received by the first interface 310. On the other hand, in the second mode, the printer 300 transmits, from the second interface 315, a command related to processing that can be executed by the device connected to the second interface 315 among the commands received by the first interface 310. The operation mode control unit 353 controls switching between the first mode and the second mode.

第1モードと第2モードの切り換えは、例えば、後述するデータ解析部355が検出するテキストコマンドによって動作モードの切り換えが指示された場合に、実行される。
なお、プリンター300に対して動作モードを切り換えるためのコマンドとして定義されたコマンドを第1インターフェイス310によって受信した場合に、動作モード制御部353が動作モードを切り換える構成としてもよい。また、プリンター300の外装パネルに物理スイッチ(図示略)を設け、このスイッチの操作を検出した場合に動作モード制御部353が動作モードを切り換えてもよい。或いは、プリンター300に操作パネル(図示略)を設け、この操作パネルの操作に応じて、動作モード制御部353が動作モードを切り換えてもよい。この場合、操作パネルに、実行中の動作モードを示すインジケーターランプ(図示略)やディスプレイを設けてもよい。
The switching between the first mode and the second mode is executed, for example, when switching of the operation mode is instructed by a text command detected by a data analysis unit 355 described later.
The operation mode control unit 353 may switch the operation mode when the first interface 310 receives a command defined as a command for switching the operation mode to the printer 300. Further, a physical switch (not shown) may be provided on the exterior panel of the printer 300, and the operation mode control unit 353 may switch the operation mode when an operation of this switch is detected. Alternatively, an operation panel (not shown) may be provided in the printer 300, and the operation mode control unit 353 may switch the operation mode in accordance with the operation of the operation panel. In this case, an indicator lamp (not shown) or a display indicating the operation mode being executed may be provided on the operation panel.

データ解析部355は、第1インターフェイス310を介して受信した印刷データに含まれるテキストデータを取得し、このテキストデータを解析して、テキストデータ中にテキストコマンドが含まれているか否かを判定する。予め設定されたテキストコマンドは、例えば制御部350が有する不揮発性メモリー(図示略)に記憶されている。データ解析部355は、テキストデータからテキストコマンドを検出した場合、動作モード制御部353に対し、動作モードの切り換えを指示するコマンドが検出されたことを通知する。これにより、動作モード制御部353が、実行中の動作モードを別の動作モードに切り換える。   The data analysis unit 355 acquires text data included in the print data received via the first interface 310, analyzes the text data, and determines whether or not a text command is included in the text data. . The preset text command is stored in a non-volatile memory (not shown) included in the control unit 350, for example. When the data analysis unit 355 detects a text command from the text data, the data analysis unit 355 notifies the operation mode control unit 353 that a command instructing switching of the operation mode has been detected. As a result, the operation mode control unit 353 switches the operation mode being executed to another operation mode.

また、データ解析部355は、第1インターフェイス310が受信した印刷データ中にテキストコマンドを検出した場合、テキストコマンドを削除して、新たに印刷データを生成する。これにより、レシートに意味の無い文字列が印刷されないようにすることができる。データ解析部355は、第1及び第2モードのいずれにおいても、印刷データからキストコマンドを除去する。   In addition, when the data analysis unit 355 detects a text command in the print data received by the first interface 310, the data analysis unit 355 deletes the text command and newly generates print data. As a result, a meaningless character string can be prevented from being printed on the receipt. The data analysis unit 355 removes the text command from the print data in both the first and second modes.

変換部357は、第1インターフェイス310により受信したコマンドを、別のコマンド体系における同じ意味のコマンドに変換する。例えば、変換部357は、少なくとも1のコマンド体系におけるコマンドと、別のコマンド体系におけるコマンドとの対応関係を定義するテーブルを記憶していて、このテーブルに基づいてコマンドを変換する。   The conversion unit 357 converts the command received by the first interface 310 into a command having the same meaning in another command system. For example, the conversion unit 357 stores a table that defines a correspondence relationship between a command in at least one command system and a command in another command system, and converts the command based on this table.

変換部357は、第1インターフェイス310により受信したコマンドが、プリンター300が実行可能なコマンド体系のコマンドでない場合、プリンター300が実行可能なコマンド体系のコマンドへの変換を行う。また、変換部357は、第2モードの実行中に、第1インターフェイス310により受信したコマンドが、プリンター200が実行可能なコマンド体系のコマンドでない場合、プリンター200が実行可能なコマンド体系のコマンドへの変換を行う。これにより、例えば、POSシステム2を構成するプリンターを、別のメーカーの機種であるプリンター300やプリンター200に置き換えた場合、プリンタードライバープログラム24を変更することなく、プリンター200、300を動作させることができる。
また、変換部357は、変換部157と同様に、第1インターフェイス310により受信されたコマンドをプリンター200に適したコマンドに変換する際に、コマンドの内容および印刷データの内容を変換するものであってもよい。この場合、POS端末20のソフトウェアを改変することなく、同様の、或いは類似した形態の印刷物を、プリンター200、300によって得ることができる。
When the command received by the first interface 310 is not a command command that can be executed by the printer 300, the conversion unit 357 converts the command to a command command that can be executed by the printer 300. In addition, when the command received by the first interface 310 is not a command command that can be executed by the printer 200 during execution of the second mode, the conversion unit 357 converts the command command to a command that can be executed by the printer 200. Perform conversion. Thereby, for example, when the printer configuring the POS system 2 is replaced with the printer 300 or the printer 200 which is a model of another manufacturer, the printer 200 or 300 can be operated without changing the printer driver program 24. it can.
Similarly to the conversion unit 157, the conversion unit 357 converts the content of the command and the content of the print data when converting the command received by the first interface 310 into a command suitable for the printer 200. May be. In this case, a similar or similar printed matter can be obtained by the printers 200 and 300 without modifying the software of the POS terminal 20.

コマンド解析部358は、コマンド解析部158と同様に、第1インターフェイス310により受信したコマンドを解析して、受信されたコマンドに対応する機能を特定する。例えば、コマンド解析部358は、受信されたコマンドが、ロール紙印刷部330の機能に関するコマンドか、それ以外の機能に関するコマンドかを判定する。印刷以外の機能に関するコマンドとしては、例えば、小切手等の帳票に記録された磁気情報を読み取る機能に関するコマンドや、小切手等の帳票への手差し印刷機能に関するコマンドかを特定する。
コマンド解析部358は、第1インターフェイス310により受信したコマンドが、ロール紙印刷部330以外の機能に関するコマンドであると判定した場合、そのコマンドを読み捨てる。このようなコマンドは、プリンター300も、プリンター200も実行できないためである。
Similar to the command analysis unit 158, the command analysis unit 358 analyzes a command received by the first interface 310 and identifies a function corresponding to the received command. For example, the command analysis unit 358 determines whether the received command is a command related to the function of the roll paper printing unit 330 or a command related to other functions. As a command related to functions other than printing, for example, a command related to a function for reading magnetic information recorded on a form such as a check or a command related to a manual print function for a form such as a check is specified.
If the command analysis unit 358 determines that the command received by the first interface 310 is a command related to a function other than the roll paper printing unit 330, the command analysis unit 358 discards the command. This is because neither the printer 300 nor the printer 200 can execute such a command.

また、第1インターフェイス310により受信したコマンドがロール紙印刷部330の機能に関するコマンドである場合、コマンド解析部358は、プリンター300の動作モードを判別する。プリンター300の動作モードが第1モードである場合、コマンド解析部358は、ロール紙印刷部330に関するコマンドを処理制御部359により実行させる。一方、プリンター300の動作モードが第2モードである場合、コマンド解析部358は、ロール紙印刷部330に関するコマンドを、第2インターフェイス315によってプリンター200へ送信させる。ここで、第1インターフェイス310により受信したコマンドが印刷データを伴う場合、コマンド解析部358は、コマンドと印刷データとを第2インターフェイス315により送信させる。
処理制御部359は、第1インターフェイス310により受信したコマンドを実行し、ロール紙印刷部330を駆動させて、レシート印刷を実行させる。
When the command received by the first interface 310 is a command related to the function of the roll paper printing unit 330, the command analysis unit 358 determines the operation mode of the printer 300. When the operation mode of the printer 300 is the first mode, the command analysis unit 358 causes the processing control unit 359 to execute a command related to the roll paper printing unit 330. On the other hand, when the operation mode of the printer 300 is the second mode, the command analysis unit 358 causes the second interface 315 to transmit a command related to the roll paper printing unit 330 to the printer 200. If the command received by the first interface 310 is accompanied by print data, the command analysis unit 358 causes the second interface 315 to transmit the command and print data.
The processing control unit 359 executes the command received by the first interface 310 and drives the roll paper printing unit 330 to execute receipt printing.

図6は、プリンター300の動作を示すフローチャートである。
制御部350は、第1インターフェイス310によりコマンドを受信したことを検出すると(ステップS31)、受信されたコマンドの変換が必要か否かを変換部357が判定する(ステップS32)。受信されたコマンドが、プリンター300が対応するコマンドとは異なっている場合、変換部357はコマンドの変換が必要であると判定する(ステップS32;Yes)。この場合、変換部357は、受信されたコマンドを、プリンター300が対応するコマンド体系における対応コマンドに変換する(ステップS33)。また、変換部357は、コマンドの変換が必要ないと判定した場合(ステップS32;No)、コマンドの変換を行わない。
FIG. 6 is a flowchart illustrating the operation of the printer 300.
When the control unit 350 detects that the command is received by the first interface 310 (step S31), the conversion unit 357 determines whether or not the received command needs to be converted (step S32). If the received command is different from the command corresponding to the printer 300, the conversion unit 357 determines that the command needs to be converted (step S32; Yes). In this case, the conversion unit 357 converts the received command into a corresponding command in the command system supported by the printer 300 (step S33). If the conversion unit 357 determines that command conversion is not necessary (step S32; No), the conversion unit 357 does not convert the command.

続いて、データ解析部355が、第1インターフェイス310により、コマンドとともにテキストデータが受信されたか否かを判定する(ステップS34)。テキストデータが受信された場合(ステップS34;Yes)、データ解析部355は受信されたテキストデータを解析し(ステップS35)、テキストコマンドを検索する(ステップS36)。ここで、受信されたテキストデータにテキストコマンドが含まれている場合(ステップS36;Yes)、データ解析部355が動作モード制御部353にテキストコマンドを出力する。動作モード制御部353は、テキストコマンドに従って、現在の動作モードを他の動作モードに切り換える(設定する)処理を行う(ステップS37)。また、データ解析部355は、受信されたテキストデータから、動作モード制御部353に出力したテキストコマンドを除去して新たなテキストデータを生成し(ステップS38)、次のステップS39に移行する。また、受信されたテキストデータにテキストコマンドが含まれていない場合(ステップS36;No)、データ解析部355はステップS39に移行する。   Subsequently, the data analysis unit 355 determines whether text data is received together with the command by the first interface 310 (step S34). When text data is received (step S34; Yes), the data analysis unit 355 analyzes the received text data (step S35) and searches for a text command (step S36). Here, if the received text data includes a text command (step S36; Yes), the data analysis unit 355 outputs the text command to the operation mode control unit 353. The operation mode control unit 353 performs a process of switching (setting) the current operation mode to another operation mode in accordance with the text command (step S37). Further, the data analysis unit 355 removes the text command output to the operation mode control unit 353 from the received text data to generate new text data (step S38), and proceeds to the next step S39. If the received text data does not include a text command (step S36; No), the data analysis unit 355 proceeds to step S39.

ステップS39では、コマンド解析部358が、受信されたコマンドを解析する。コマンド解析部358は、受信されたコマンドが処理実行を指示するコマンドであって、かつ、指示された処理がロール紙への印刷であるか否かを判定する(ステップS40)。ここで、プリンター300が実行可能な制御コマンドは、ロール紙への印刷に係るコマンドであるか否かにかかわらず、制御部350が実行する。具体的には、POS端末20がプリンター300に対してステータスを送信するよう要求するコマンド、スリープ状態への移行を指示するコマンド、スリープ状態からの復帰を指示するコマンド、動作モードの切り換えを指示するコマンド等の制御コマンドは、図6のフローチャートにかかわらず、制御部350が随時実行する。
コマンド解析部358は、受信されたコマンドがロール紙への印刷以外の処理(機能)の実行を指示するコマンドであると判定した場合(ステップS40;No)、そのコマンドを読み捨てて(ステップS41)、本処理を終了する。
In step S39, the command analysis unit 358 analyzes the received command. The command analysis unit 358 determines whether the received command is a command for instructing processing execution and whether the instructed processing is printing on roll paper (step S40). Here, the control command that can be executed by the printer 300 is executed by the control unit 350 regardless of whether or not the command is related to printing on roll paper. Specifically, the POS terminal 20 requests to send a status to the printer 300, a command for instructing transition to the sleep state, a command for instructing return from the sleep state, and an instruction for switching the operation mode. Control commands such as commands are executed at any time by the control unit 350 regardless of the flowchart of FIG.
If the command analysis unit 358 determines that the received command is a command for instructing execution of processing (function) other than printing on roll paper (step S40; No), the command is discarded (step S41). This process is terminated.

一方、コマンド解析部358が、受信されたコマンドがロール紙への印刷機能に関するコマンドであると判定した場合(ステップS41;Yes)、データ解析部355は、動作モード制御部353が設定した動作モードを判定する(ステップS42)。動作モードが第1モードである場合(ステップS43;Yes)、データ解析部355は処理制御部359にコマンドを出力し、処理制御部359がロール紙印刷部330を制御して、印刷コマンドに従って印刷を実行する(ステップS44)。
これに対し、動作モードが第2モードである場合(ステップS43;No)、変換部357がコマンドの変換の要否を判定する(ステップS45)。第2モードではプリンター200にコマンドを送信するので、変換部357は、第1インターフェイス310により受信したコマンドが、プリンター200が使用するコマンドと異なっている場合に、コマンドの変換が必要であると判定する(ステップS45;Yes)。この場合、変換部357は、プリンター200が使用するコマンド体系におけるコマンドへの変換を行い(ステップS46)、第2インターフェイス315によってプリンター200に印刷コマンドと印刷データとを送信する(ステップS47)。また、コマンドの変換が必要ない場合には(ステップS45;No)、変換部357は、第1インターフェイス310により受信したコマンドと印刷データとを第2インターフェイス315により送信する。なお、ステップS47で第2インターフェイス315によって送信される印刷データは、第1インターフェイス310により受信された印刷データ、或いは、ステップS38でテキストコマンドが除去されたデータである。
On the other hand, when the command analysis unit 358 determines that the received command is a command related to the roll paper printing function (step S41; Yes), the data analysis unit 355 determines the operation mode set by the operation mode control unit 353. Is determined (step S42). When the operation mode is the first mode (step S43; Yes), the data analysis unit 355 outputs a command to the processing control unit 359, and the processing control unit 359 controls the roll paper printing unit 330 to perform printing according to the printing command. Is executed (step S44).
On the other hand, when the operation mode is the second mode (step S43; No), the conversion unit 357 determines whether the command needs to be converted (step S45). Since the command is transmitted to the printer 200 in the second mode, the conversion unit 357 determines that the command needs to be converted when the command received by the first interface 310 is different from the command used by the printer 200. (Step S45; Yes). In this case, the conversion unit 357 performs conversion into commands in the command system used by the printer 200 (step S46), and transmits a print command and print data to the printer 200 through the second interface 315 (step S47). If the command conversion is not necessary (step S45; No), the conversion unit 357 transmits the command and print data received by the first interface 310 via the second interface 315. Note that the print data transmitted by the second interface 315 in step S47 is the print data received by the first interface 310 or the data from which the text command has been removed in step S38.

以上説明したように、本発明を適用した第2の実施形態に係るPOSシステム2が備えるプリンター300は、ロール紙印刷部330と、POS端末20から送信されるデータを受信する第1インターフェイス310と、第1インターフェイス310により受信されたテキストデータをプリンター200に送信する第2インターフェイス315と、第1インターフェイス310により受信されたテキストデータから予め定められた文字列を検索するデータ解析部355と、ロール紙印刷部330で処理を実行させる第1動作モード、もしくは第1インターフェイス310により受信されたテキストデータを第2インターフェイス315によりプリンター200に送信させる第2動作モードを切り換えて実行可能な制御部350と、を備える。これにより、プリンター300は、POS端末20から受信したテキストデータをプリンター200に送信して、例えばプリンター200に処理を行わせることができる。また、プリンター300は、POS端末20から送信されたテキストデータに予め設定された文字列が含まれる場合に、2通りの動作モードを切り換える。つまり、POS端末20は、コマンドとともに送信するテキストデータに所定の文字列を含めることで、プリンター300の動作モードを切り換えることができる。このため、POS端末20が容易にプリンター300の動作モードを切り換えさせて、プリンター300とプリンター200とを使い分けることができる。さらに、POS端末20及びプリンター300が使用しているコマンドに、動作モードの切り換えに関するコマンドが含まれていない場合であっても、コマンドの拡張を行うことなく、動作モードの切り換えの制御が可能になる。従って、POS端末20のコマンドに係るソフトウェアの構成を変更する必要がない。例えば、既存のPOS端末20の構成をそのまま使用できるという利点がある。   As described above, the printer 300 included in the POS system 2 according to the second embodiment to which the present invention is applied includes the roll paper printing unit 330 and the first interface 310 that receives data transmitted from the POS terminal 20. A second interface 315 that transmits text data received by the first interface 310 to the printer 200, a data analysis unit 355 that searches for a predetermined character string from the text data received by the first interface 310, and a roll A control unit 350 capable of switching and executing a first operation mode in which processing is executed by the paper printing unit 330 or a second operation mode in which text data received by the first interface 310 is transmitted to the printer 200 through the second interface 315; . Thereby, the printer 300 can transmit the text data received from the POS terminal 20 to the printer 200 and cause the printer 200 to perform processing, for example. In addition, the printer 300 switches between two operation modes when the text data transmitted from the POS terminal 20 includes a preset character string. That is, the POS terminal 20 can switch the operation mode of the printer 300 by including a predetermined character string in the text data transmitted together with the command. Therefore, the POS terminal 20 can easily switch the operation mode of the printer 300 so that the printer 300 and the printer 200 can be used properly. Furthermore, even when the command used by the POS terminal 20 and the printer 300 does not include a command related to operation mode switching, it is possible to control operation mode switching without expanding the command. Become. Therefore, it is not necessary to change the software configuration related to the command of the POS terminal 20. For example, there is an advantage that the configuration of the existing POS terminal 20 can be used as it is.

また、テキストデータに基づいてロール紙印刷部330によって文字を印刷するプリンター300が、印刷する文字に係るテキストデータに含まれる予め定められた文字列を検出して、動作モードを切り換える。このため、POS端末20は、プリンター300に対して印刷を指示するコマンドと、印刷する文字に関するテキストデータとを送信する機能を有していれば、動作モードを切り換えさせることができる。従って、POS端末20のソフトウェア構成やコマンドセットを変更することなく、プリンター300とプリンター200とを使い分けることができる。   In addition, the printer 300 that prints characters by the roll paper printing unit 330 based on the text data detects a predetermined character string included in the text data related to the characters to be printed, and switches the operation mode. Therefore, if the POS terminal 20 has a function of transmitting a command for instructing printing to the printer 300 and text data related to characters to be printed, the operation mode can be switched. Accordingly, the printer 300 and the printer 200 can be used properly without changing the software configuration or command set of the POS terminal 20.

さらに、制御部350は、データ解析部355によってテキストデータから予め定められた文字列が検出された場合に、第1インターフェイス310により受信されたテキストデータから予め定められた文字列を除いたテキストデータに基づいて、切り換え後の動作モードを実行する。このため、動作モードの切り換えのための文字列がレシート印刷に影響することがないので、より適切に、POS端末20がプリンター300とプリンター200を使い分けることができる。
さらにまた、プリンター300は、第1インターフェイス310により受信されたコマンドを、ロール紙印刷部330またはプリンター200が使用するコマンドに変換する変換部357を備える。このため、プリンター300またはプリンター200が、異なるコマンドを使用するPOS端末20に接続された場合であっても、POS端末20のコマンドに関する機能を改変することなく、プリンター300とプリンター200とを適切に動作させることができる。
Further, when the data analysis unit 355 detects a predetermined character string from the text data, the control unit 350 removes the predetermined character string from the text data received by the first interface 310. Based on the above, the operation mode after switching is executed. Therefore, since the character string for switching the operation mode does not affect the receipt printing, the POS terminal 20 can properly use the printer 300 and the printer 200 more appropriately.
Furthermore, the printer 300 includes a conversion unit 357 that converts a command received by the first interface 310 into a command used by the roll paper printing unit 330 or the printer 200. For this reason, even when the printer 300 or the printer 200 is connected to the POS terminal 20 that uses different commands, the printer 300 and the printer 200 are appropriately connected without changing the function related to the command of the POS terminal 20. It can be operated.

なお、上述した各実施形態は、あくまでも本発明の一態様を示すものであり、本発明の範囲内で任意に変形および応用が可能である。
例えば、第1の実施形態で説明した複合機100が備える外部装置制御部151、動作モード制御部153、データ解析部155、変換部157、コマンド解析部158、及び処理制御部159の各機能部のうち、一部を省略した構成としても、本発明による効果を得ることが可能である。例えば、第2インターフェイス115に接続される装置について、実行可能な処理の種類、コマンド体系についての情報が予め制御部150に設定されている場合、外部装置制御部151によりプリンター200を検出する機能を省略できる。また、例えば、POS端末20が送信するコマンドのコマンド体系に複合機100及びプリンター200が対応している場合、変換部157によりコマンドを変換する機能を省略できる。さらにまた、例えば、制御部150に対して、第1インターフェイス110により受信したコマンドのうち第2インターフェイス115から送信するコマンドが個別に、或いは、対応する機能毎に設定されている場合、動作モード制御部153は、受信されたコマンドが設定されたコマンドに該当する場合に第2インターフェイス115から送信すればよいので、コマンド解析部158によりコマンドを解析する機能を省略できる。第2の実施形態で説明したプリンター300が備える外部装置制御部351、動作モード制御部353、データ解析部355、変換部357、コマンド解析部358、及び処理制御部359の各機能部についても同様である。
The above-described embodiments merely show one aspect of the present invention, and can be arbitrarily modified and applied within the scope of the present invention.
For example, the functional units of the external device control unit 151, the operation mode control unit 153, the data analysis unit 155, the conversion unit 157, the command analysis unit 158, and the processing control unit 159 included in the multifunction peripheral 100 described in the first embodiment. Even if a part of the configuration is omitted, the effect of the present invention can be obtained. For example, when information about the type of processing that can be executed and the command system is preset in the control unit 150 for a device connected to the second interface 115, the external device control unit 151 has a function of detecting the printer 200. Can be omitted. For example, when the multifunction device 100 and the printer 200 correspond to the command system of the command transmitted by the POS terminal 20, the function of converting the command by the conversion unit 157 can be omitted. Furthermore, for example, when the command transmitted from the second interface 115 among the commands received by the first interface 110 is set individually or for each corresponding function to the control unit 150, the operation mode control is performed. The unit 153 may transmit the command from the second interface 115 when the received command corresponds to the set command, so that the function of analyzing the command by the command analysis unit 158 can be omitted. The same applies to the functional units of the external device control unit 351, operation mode control unit 353, data analysis unit 355, conversion unit 357, command analysis unit 358, and processing control unit 359 included in the printer 300 described in the second embodiment. It is.

また、上記各実施形態では、媒体を処理する媒体処理装置の例として、ロール紙に印刷を行う複合機100及びプリンター300を挙げ、外部の処理装置の例としてプリンター200を備えた構成を例に挙げて説明したが、本発明はこれに限定されない。例えば、媒体は紙に限定され合成樹脂製のシートを用いることも可能であり、媒体の表面に加工が施されていてもよい。媒体は所定サイズにカットされたカットシートであってもよいし、スプロケット紙などの連続シートであってもよい。また、例えば、媒体として複写紙を用いる構成としてもよい。さらに、ロール紙印刷部120、220、330は、感熱紙に熱を与えて印刷を行うサーマルプリンターに限定されず、インクジェット式、ドットインパクト式等の各種の記録方式を採用できる。また、上述した実施形態では、複合機100が備える印刷以外の処理部について、磁気読取部130及び帳票印刷部140を例示したが、本発明はこれに限定されず、別種の媒体に印刷を行う印刷部であってもよいし、小切手等の媒体を光学的に読み取るスキャナーであってもよく、ICカード等により認証を行う処理部であってもよい。さらに、POSシステム2、3の構成に限定されず、例えばPOS端末20に対して単機能のプリンターを接続し、このプリンターに複合機を接続した構成とすることも可能である。 In each of the above embodiments, the MFP 100 and the printer 300 that perform printing on roll paper are given as examples of the medium processing apparatus that processes the medium, and the configuration including the printer 200 is taken as an example of the external processing apparatus. Although described above, the present invention is not limited to this. For example, the medium is not limited to paper, and a synthetic resin sheet may be used, and the surface of the medium may be processed. The medium may be a cut sheet cut to a predetermined size, or may be a continuous sheet such as sprocket paper. Further, for example, a configuration in which copy paper is used as a medium may be adopted. Furthermore, the roll paper printing units 120, 220, and 330 are not limited to thermal printers that print by applying heat to the thermal paper, and various recording methods such as an ink jet method and a dot impact method can be employed. In the above-described embodiment, the magnetic reading unit 130 and the form printing unit 140 are exemplified as processing units other than the printing included in the multifunction peripheral 100. However, the present invention is not limited to this, and printing is performed on another type of medium. It may be a printing unit, a scanner that optically reads a medium such as a check, or a processing unit that performs authentication using an IC card or the like. Further, the present invention is not limited to the configuration of the POS systems 2 and 3. For example, a single-function printer may be connected to the POS terminal 20 and a multifunction device may be connected to the printer.

また、上記各実施形態においては、ホストコンピューターの一例としてPOS端末20を挙げて説明したが、本発明はこれに限定されない。ホストコンピューターとしては、複合機100等の媒体処理装置に対してコマンドとテキストデータとを送信する機能を備えたものであればよく、一般的なパーソナルコンピューターや、メインフレームコンピューター、サーバー等のコンピューター機器、或いは、携帯型デバイスを用いることができる。さらに、ホストコンピューターの用途はPOSとしての会計処理に限定されず、文書作成処理、画像編集処理等の一般的な用途、或いは、特定の用途に用いられるコンピューターを含むシステムにも本発明を適用できる。
図1、図2、図4及び図5に示す各機能ブロックは、ハードウェアとソフトウェアの協働により任意に実現可能であり、特定のハードウェア構成を示唆するものではない。
また、例えば、複合機100の制御部150が、外部接続される記憶媒体に記憶させたプログラムを実行することにより、制御部150の各種機能を実現する構成とすることも可能である。その他の細部構成についても、任意に変更可能であることは勿論である。
In the above embodiments, the POS terminal 20 has been described as an example of the host computer, but the present invention is not limited to this. The host computer is not limited as long as it has a function of transmitting commands and text data to a medium processing apparatus such as the multifunction peripheral 100, and is a computer device such as a general personal computer, mainframe computer, server, Alternatively, a portable device can be used. Further, the use of the host computer is not limited to the accounting processing as POS, and the present invention can be applied to general uses such as document creation processing and image editing processing, or a system including a computer used for a specific use. .
Each of the functional blocks shown in FIGS. 1, 2, 4 and 5 can be arbitrarily realized by cooperation of hardware and software, and does not suggest a specific hardware configuration.
Further, for example, the control unit 150 of the multi-function device 100 may be configured to implement various functions of the control unit 150 by executing a program stored in an externally connected storage medium. Of course, other detailed configurations can be arbitrarily changed.

2、3…POSシステム、10…POSサーバー、20…POS端末(ホストコンピューター)、21…制御部、22…プリンタードライバー実行部、23…記憶部、24…プリンタードライバープログラム、40…チェックアウトシステム、100…複合機(媒体処理装置、第1媒体処理装置)、101…本体基板、103…インターフェイス基板、110…第1インターフェイス(第1接続部)、115…第2インターフェイス(第2接続部)、120…ロール紙印刷部(処理部)、130…磁気読取部、140…帳票印刷部、150…制御部、151…外部装置制御部、153…動作モード制御部、155…データ解析部(解析部)、157…変換部、158…コマンド解析部、159…処理制御部、200…プリンター(外部の処理装置、第2媒体処理装置)、210…インターフェイス(受信部)、220…ロール紙印刷部(媒体処理部)、250…制御部、300…プリンター(媒体処理装置、第1媒体処理装置)、301…本体基板、303…インターフェイス基板、310…第1インターフェイス(第1接続部)、315…第2インターフェイス(第2接続部)、330…ロール紙印刷部(処理部)、350…制御部、351…外部装置制御部、353…動作モード制御部、355…データ解析部(解析部)、357…変換部、358…コマンド解析部、359…処理制御部、R…レシート。   2, 3 ... POS system, 10 ... POS server, 20 ... POS terminal (host computer), 21 ... control unit, 22 ... printer driver execution unit, 23 ... storage unit, 24 ... printer driver program, 40 ... checkout system, DESCRIPTION OF SYMBOLS 100 ... Multifunction machine (medium processing apparatus, 1st medium processing apparatus), 101 ... Main body board | substrate, 103 ... Interface board, 110 ... 1st interface (1st connection part), 115 ... 2nd interface (2nd connection part), DESCRIPTION OF SYMBOLS 120 ... Roll paper printing part (processing part), 130 ... Magnetic reading part, 140 ... Form printing part, 150 ... Control part, 151 ... External apparatus control part, 153 ... Operation mode control part, 155 ... Data analysis part (analysis part) 157 ... conversion unit, 158 ... command analysis unit, 159 ... processing control unit, 200 ... printer (external processing) , Second media processing device), 210 ... interface (receiving unit), 220 ... roll paper printing unit (medium processing unit), 250 ... control unit, 300 ... printer (medium processing device, first media processing device), 301 DESCRIPTION OF SYMBOLS ... Main body board | substrate 303 ... Interface board | substrate 310 ... 1st interface (1st connection part), 315 ... 2nd interface (2nd connection part), 330 ... Roll paper printing part (processing part), 350 ... Control part, 351 ... external device control unit, 353 ... operation mode control unit, 355 ... data analysis unit (analysis unit), 357 ... conversion unit, 358 ... command analysis unit, 359 ... processing control unit, R ... receipt.

Claims (9)

媒体を処理する処理部と、
ホストコンピューターから送信された印刷実行を指示するコマンド、及び、文字を印刷するためのテキストデータを含む印刷データを受信する第1接続部と、
外部の処理装置と接続される第2接続部と、
前記第1接続部で受信前記印刷データに含まれたテキストデータから予め定められたテキストコマンドの文字列を検索する解析部と、
前記第1接続部で受信した前記印刷データを前記処理部で処理させる第1動作モード、もしくは前記第2接続部に接続された前記外部の処理装置に通信させる第2動作モード切り換えて実行する制御部と、を備え、
前記制御部は、前記解析部により前記印刷データのテキストデータから、動作モードの切り換えを指示する前記テキストコマンドが検出された場合、前記テキストコマンドに従って、前記第1動作モードと前記第2動作モードとの切り換えを行うこと、
特徴とする媒体処理装置。
A processing unit for processing the medium;
A first connection unit that receives print data including text data for printing a command transmitted from the host computer and instructing print execution ;
A second connection unit connected to an external processing device;
An analysis unit that searches a character string of a predetermined text command from text data included in the print data received by the first connection unit;
The first operating mode for processing the print data received by the first connecting portion in the processing unit, Moshiku the second mode to communicate to the processing unit of the external connected to the second connection portion prior Symbol And a control unit for switching and executing ,
When the text command instructing switching of the operation mode is detected from the text data of the print data by the analysis unit, the control unit is configured to perform the first operation mode and the second operation mode according to the text command. Switching between
Medium processing apparatus according to claim.
前記制御部は、動作モードを前記第1動作モードあるいは前記第2動作モードのいずれか一方の動作モードに切り替えた以降、他方の動作モードへの切り替えを指示する前記テキストコマンドが検出されるまで前記一方の動作モードを維持する請求項1に記載の媒体処理装置。The control unit switches the operation mode to one of the first operation mode and the second operation mode and then detects the text command instructing switching to the other operation mode. The medium processing apparatus according to claim 1, wherein one of the operation modes is maintained. 前記処理部は、所定のシートに文字を印刷する印刷部であり、
前記予め定められた前記テキストコマンドの文字列は、前記印刷部で印刷されない文字列として設定されたものであり、
前記解析部は、前記印刷部で印刷されない前記テキストコマンドの文字列を、前記第1接続部で受信された前記印刷データに含まれるテキストデータにおいて検出することを特徴とする請求項1または2に記載の媒体処理装置。
The processing unit is a printing unit that prints characters on a predetermined sheet,
The predetermined character string of the text command is set as a character string that is not printed by the printing unit,
The analysis unit, a character string of the text commands that are not printed by the printing unit, according to claim 1, characterized in that Oite detecting the text data included in the print data received by said first connecting portion or 3. The medium processing apparatus according to 2.
前記制御部は、前記解析部によって検出された前記テキストコマンドの文字列に基づいて前記印刷部で処理を実行させる制御を行うとき、前記テキストデータから前記予め定められた前記テキストコマンドの文字列を除いたテキストデータを前記印刷部に印刷させることを特徴とする請求項に記載の媒体処理装置。 When the control unit performs control to execute the processing by the printing unit based on the character string of the text commands detected by the analysis unit, a character string of the text commands said predetermined from the text data The medium processing apparatus according to claim 3 , wherein the removed text data is printed by the printing unit. 前記第1接続部で受信されたコマンドを、前記処理部で実行されるコマンドまたは前記外部の処理装置で実行されるコマンドに変換する変換部を備えることを特徴とする請求項1乃至のいずれか1項に記載の媒体処理装置。 The command received by the first connecting portion, one of the claims 1 to 4, characterized in that it comprises a converter for converting a command to be executed by the processor of command or the external executed by the processing unit The medium processing apparatus according to claim 1. コマンドを送信するPOS端末と、
媒体を処理する処理部と、POS端末から送信される印刷実行を指示するコマンド、及び、文字を印刷するためのテキストデータを含む印刷データを受信する第1接続部、前記第1接続部で受信前記印刷データに含まれたテキストデータから予め定められたテキストコマンドの文字列を検索する解析部、前記第1接続部で受信した前記印刷データを前記処理部で処理させる第1動作モードもしくは前記第1接続部で受信された前記印刷データを送信させる第2動作モード切り換えて実行する制御部、及び前記第2動作モードに切り替えられたときに前記印刷データを送信する第2接続部を有する第1媒体処理装置と、
前記第1媒体処理装置の前記第2接続部に接続され、前記第2接続部から送信されたデータを受信する受信部、及び前記受信部により受信されたデータに基づいて前記第1媒体処理装置の前記処理部と同じ種類の処理を行う媒体処理部を有する第2媒体処理装置と、を備え、
前記第1媒体処理装置の前記制御部は、前記解析部により前記印刷データのテキストデータから、動作モードの切り換えを指示する前記テキストコマンドが検出された場合、前記テキストコマンドに従って、前記第1動作モードと前記第2動作モードとの切り換えを行うこと、
特徴とするPOSシステム。
A POS terminal that sends a command;
A first processing unit for receiving print data including a processing unit for processing a medium, a command for instructing execution of printing transmitted from a POS terminal , and text data for printing characters, and received by the first connection unit the to the analysis unit to search for a string of predetermined text commands from the text data included in the print data, processing the print data received by the first connecting portion in front Symbol processor 1 A control unit that switches and executes an operation mode or a second operation mode that transmits the print data received by the first connection unit, and a second that transmits the print data when the operation mode is switched to the second operation mode. A first medium processing device having a connection;
A receiving unit connected to the second connection unit of the first medium processing device and receiving data transmitted from the second connection unit, and the first medium processing device based on the data received by the receiving unit comprising a second media processing device having a medium processing unit for performing the same type of processing as the processing unit, and
The control unit of the first medium processing device detects the first operation mode according to the text command when the analysis unit detects the text command instructing switching of the operation mode from the text data of the print data. And switching between the second operation mode and
POS system according to claim.
前記第1媒体処理装置の前記制御部は、動作モードを前記第1動作モードあるいは前記第2動作モードのいずれか一方の動作モードに切り替えた以降、他方の動作モードへの切り替えを指示する前記テキストコマンドが検出されるまで前記一方の動作モードを維持する請求項6に記載のPOSシステム。The control unit of the first medium processing apparatus instructs the switching to the other operation mode after the operation mode is switched to one of the first operation mode or the second operation mode. 7. The POS system according to claim 6, wherein the one operation mode is maintained until a command is detected. 前記第1媒体処理装置の前記処理部は、レシートを印刷する印刷部であり、
前記予め定められた前記テキストコマンドの文字列は、前記印刷部で印刷されない文字列として設定されたものであり、
前記解析部は、前記印刷部で印刷されない前記テキストコマンドの文字列を、前記第1接続部で受信された前記印刷データに含まれるテキストデータにおいて検索することを特徴とする請求項6または7に記載のPOSシステム。
The processing unit of the first medium processing apparatus is a printing unit that prints a receipt;
The predetermined character string of the text command is set as a character string that is not printed by the printing unit,
Wherein the analysis unit, the character string of the text commands that are not printed in the printing unit, according to claim 6, characterized in that Oite search text data included in the print data received by said first connecting portion or 8. The POS system according to 7 .
前記第2媒体処理装置の前記媒体処理部は、レシートを印刷する第2印刷部であり、
前記第1媒体処理装置は、前記制御部が前記第2動作モードに切り換えたときに、前記第2接続部から前記データを送信し、
前記第2媒体処理装置は、前記受信部で前記データを受信し、前記第2印刷部でレシートを印刷することを特徴とする請求項に記載のPOSシステム。
The medium processing unit of the second medium processing device is a second printing unit that prints a receipt,
The first medium processing device transmits the data from the second connection unit when the control unit switches to the second operation mode,
The POS system according to claim 8 , wherein the second medium processing apparatus receives the data by the receiving unit and prints a receipt by the second printing unit.
JP2012116882A 2012-05-22 2012-05-22 Medium processing apparatus and POS system Active JP6019749B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2012116882A JP6019749B2 (en) 2012-05-22 2012-05-22 Medium processing apparatus and POS system
US13/870,844 US8873096B2 (en) 2012-05-22 2013-04-25 Media processing device and POS system
CN201310182085.5A CN103426257B (en) 2012-05-22 2013-05-16 Media processing apparatus and POS system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012116882A JP6019749B2 (en) 2012-05-22 2012-05-22 Medium processing apparatus and POS system

Publications (3)

Publication Number Publication Date
JP2013242801A JP2013242801A (en) 2013-12-05
JP2013242801A5 JP2013242801A5 (en) 2015-05-28
JP6019749B2 true JP6019749B2 (en) 2016-11-02

Family

ID=49843610

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012116882A Active JP6019749B2 (en) 2012-05-22 2012-05-22 Medium processing apparatus and POS system

Country Status (1)

Country Link
JP (1) JP6019749B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11184649A (en) * 1997-07-25 1999-07-09 Seiko Epson Corp System and method for printing, and printer
WO2006123544A1 (en) * 2005-05-17 2006-11-23 Seiko Epson Corporation Printing system, pos system, connecting device, and method and program for controlling printing system
JP2006323445A (en) * 2005-05-17 2006-11-30 Seiko Epson Corp Printing system, pos system, connection device, control method for printing system, and program therefor

Also Published As

Publication number Publication date
JP2013242801A (en) 2013-12-05

Similar Documents

Publication Publication Date Title
JP5810609B2 (en) RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
US9156279B2 (en) Printing system, printing device, and printing method
JP6008109B2 (en) Printing system and printing apparatus
US9129206B2 (en) Printing device and printing system
US20180121770A1 (en) Printer and control method of a printer
US8873096B2 (en) Media processing device and POS system
US9224275B2 (en) Media processing method using multiple processing units for performing multiple processes
US8755081B2 (en) Devices, methods, and media for using compatible commands to control recording devices
JP6056196B2 (en) Medium processing apparatus and POS system
JP6115025B2 (en) Medium processing apparatus and POS system
US9058133B2 (en) Control device, control method for a control device, and recording medium
US9524130B2 (en) Control device, control method of a control device, and storage medium to generate and output a control command compatible with a second printing device that differs structurally from the first printing device
US20120072617A1 (en) Electronic Device, Control Method for an Electronic Device, and Recording Medium Storing a Program Executed by a Control Unit that Controls the Electronic Device
JP6019749B2 (en) Medium processing apparatus and POS system
JP2012123704A (en) Control apparatus, control method of control apparatus, and program
JP2013240964A (en) Media processing device, and pos system
JP5924126B2 (en) Medium processing apparatus and POS system
US20040019495A1 (en) System for setting up a point-of-sale system, a method for setting up a point-of-sale system, and a data recording medium storing the same
JP6019871B2 (en) Printing apparatus, printing system, and POS system
JP2012076393A (en) Printer, print controller, print control method and program for printer
JP5810616B2 (en) RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM
JP6003475B2 (en) Printing system, printing apparatus, and printing method
JP5958143B2 (en) Printing apparatus, printing system, and printing control apparatus
JP6111546B2 (en) Printing apparatus, printing system, and POS system
JP2011084027A (en) Recording device, control method of recording device, and program

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150413

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150413

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160223

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160301

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160426

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: 20160906

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160919

R150 Certificate of patent or registration of utility model

Ref document number: 6019749

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150