JP4508245B2 - Data processing device - Google Patents
Data processing device Download PDFInfo
- Publication number
- JP4508245B2 JP4508245B2 JP2008029046A JP2008029046A JP4508245B2 JP 4508245 B2 JP4508245 B2 JP 4508245B2 JP 2008029046 A JP2008029046 A JP 2008029046A JP 2008029046 A JP2008029046 A JP 2008029046A JP 4508245 B2 JP4508245 B2 JP 4508245B2
- Authority
- JP
- Japan
- Prior art keywords
- program
- data
- request
- packet
- communication
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Images
Landscapes
- Programmable Controllers (AREA)
Description
この発明は、複数のプログラマブルコントローラ(以下PCと称す)等の記憶装置を有する制御対象機器に対し、PC交信手段を介してPC実行プログラム、パラメータ、デバイスデータ等のPCが保有するデータを通信回線を介して送受信するデータ処理装置に関するものである。 The present invention provides a communication line for data held by a PC, such as a PC execution program, parameters, and device data, via a PC communication means to a control target device having a storage device such as a plurality of programmable controllers (hereinafter referred to as PCs). The present invention relates to a data processing device that transmits / receives data via a network.
図7から図13を用いて従来例を説明する。
図7は2種類のPCを接続したデータ処理装置としてのPC周辺装置の構成を示すブロック図であり、図において、1は入出力装置であるCRT2やキーボード3及びマウス4や、通信回線を介して接続されるPC6a、PC6bを制御するPC周辺装置、2はCRT、3はキーボード、4はマウス、5は補助記憶装置であり、PC6a、PC6bのデバイスデータを収集しCRT2に対し前記デバイスデータ内容の表示を行うモニタリングプログラムのファイル14A及びPC6a、PC6bが動作するためのユーザープログラムを作成するプログラム開発環境を提供するプログラミング機能プログラム15A等のアプリケーション、並びに、モニタリングプログラム14A及びプログラミング機能プログラムのファイル15AがPC6a、PC6bと交信するためのPC交信手段のファイル16が保存されている。
6は通信回線を介して接続されるPCであり、内部メモリのデータ構成が異なるPC6a、6bが接続されている。
PC周辺装置1において、7はPCと交信を行うプログラムを実行するCPU、8はPC6a、PC6bと通信を行うS/Wの作業領域メモリ、9はCRT2とのインターフェース、10はキーボート3とのインターフェース、11はマウス4とのインターフェース、12は補助記憶装置5とのインターフェース、13はPC6a、PC6bとのインターフェースである。
作業領域メモリ8内には、補助記憶装置5に格納されているモニタリングプログラム14A、プログラミング機能プログラム15A及びPC交信手段16が展開されている。
なお、PC周辺装置1は専用機である必要はなく、少なくとも前記構成を搭載していれば市販のパーソナルコンピュータであっても構わない。
A conventional example will be described with reference to FIGS.
FIG. 7 is a block diagram showing the configuration of a PC peripheral device as a data processing device to which two types of PCs are connected. In FIG. 7,
Reference numeral 6 denotes a PC connected via a communication line, to which
In the PC
In the
The PC
図8はPC6が内部に格納しているメモリ構成を示したメモリ状態図であり、2機種のPC6a、6bについて示している。
図において、PC6内部のメモリには、PC6を動作させるために必要なプログラム容量を設定したパラメータ100、ユーザによりプログラミング機能プログラム15Aを用いて作成されたPC6を動作させるためのプログラム101、「X」、「Y」、「T」、「C」などの抽象的にビットまたはワードの大きさのメモリ領域をあらわすための名称で示され、PC6上でプログラムの動作内容によって値が変化する領域であるデバイスメモリ102、機種コードなど機種に依存する情報が格納されているPC機種情報103、PC6が動作するために内部で生成する情報であるPC内部情報104から構成され、各々格納されるアドレス105が決まっている。
また、106はデバイスメモリ102におけるデバイスビット領域を説明すべく、一例としてデバイスXのメモリ状態を具体的に示したものである。106において、デバイスXはアドレス「3000h」から「30ffh」に格納され、例えばアドレス「3000h」の場合は、X0〜X7までの8つのビット情報(0または1のON/OFF情報)が格納され、アドレス「30ffh」の場合は、X7f8〜X7ffまでの8つのビット情報が格納されている。
なお、PC6a及びPC6bのメモリ構成の違いは、100a〜105a、100b〜105bとありPCの種類に基づく相違はあるが、略同一機能を有している。
FIG. 8 is a memory state diagram showing a memory configuration stored in the PC 6, and shows two types of
In the figure, the memory in the PC 6 includes a
The memory configurations of the PC 6a and the PC 6b are 100a to 105a and 100b to 105b, and have substantially the same function although there are differences based on the type of PC.
図9はPC周辺装置の作業領域メモリ8で実行されるS/Wの構成とPC6a及びPC6bとデータを送受信するデータの流れを示す流れ図である。図に示されるように、メモリ8上で実行されるS/Wは補助記憶装置5に保存されており、オペレータがキーボード3またはマウス4を使用し起動操作することにより動作を開始する。
なお、モニタリンクプログラム14A、プログラミング機能プログラム15Aは、PC6a、PC6bに対し交信を行うためにPCアクセスデータ14a、15a、及びPC6a、PC6bに対しアクセスする際、何処にアクセスしたらよいかのアドレスが格納される固有アドレス情報14b、15bを格納している。
また、PC6a、PC6bとデータの送受信をするためのPC交信手段16には、RS232C、RS422、Ethernet(登録商標)などの媒体毎に処理を組み込んでおり、PC6a及びPC6bとデータを送受信する場合、モニタリングプログラム14A及びプログラミング機能プログラム15AはPC交信手段16を使用し、データを送受信する。なお、同一の通信媒体、例えばRS232Cを前述のプログラムが同時に使用することが無いように排他制御を行っている。
FIG. 9 is a flowchart showing the S / W configuration executed in the
The monitor link program 14A and the
Further, the PC communication means 16 for transmitting / receiving data to / from the
図10はPC周辺装置の作業領域メモリで実行されるPCに対するアクセスデータの構成図である。
図において、14aはモニタリングプログラム14Aのアクセスデータであり、PC6a、PC6bのどのデバイスのモニタを行うかのデバイス情報であるタグ141a及び、PC6a、PC6bの持つ各デバイスの状態であり例えば入力X0デバイスがON等のデバイスデータ142aから構成されている。15aはプログラミング機能プログラム15Aであり、PCを動作させるためのユーザー作成のプログラム151a、プログラム151aを理解しやすくするためのプログラムコメント152a、PC6a、PC6bが持つデバイスに付けるデバイスコメント153a、PC6a、PC6bが動作する上で、必要となる定義内容を格納したパラメータ154a、PC6a、PC6bの持つ各デバイスの状態であり例えば入力X0デバイスがON等のデバイスデータ155aから構成されている。
FIG. 10 is a configuration diagram of access data for the PC executed in the work area memory of the PC peripheral device.
In the figure,
図11はPC周辺装置の作業領域メモリで実行されるS/Wの固有アドレス情報を示した構成図である。
図において、14b、15bは固有アドレス情報であり、PCメモリ先頭アドレス、パラメータ退避用ワークエリア先頭アドレス、ファイルレジスタセグメント先頭アドレス、モニタワークエリア先頭アドレス、デバイスレジスタ先頭レジスタから構成され、各PC固有に持っている固有情報の格納されている先頭アドレスが示されている。
FIG. 11 is a configuration diagram showing unique address information of S / W executed in the work area memory of the PC peripheral device.
In the figure, 14b and 15b are unique address information, which is composed of a PC memory start address, a parameter save work area start address, a file register segment start address, a monitor work area start address, and a device register start register. The head address where the unique information is stored is shown.
図12はPC6a、PC6bとデータを送受信するプログラムのPC交信手段16の概略フローチャートである。
PC交信手段16は、前述のモニタリングプログラム14A、プログラミング機能プログラム15AよりPC6a、PC6bとデータを送受信する必要が生じた時に呼び出され、処理が開始される。
ステップS101において、どのPCに対して交信を行うかの判別を行い、その後ステップS102、S112にて互いのプログラムがターゲットのPCに対するPC用I/F13を使用中であるかをセマフォなどOS17の機能により確認を行う。
ステップS102、S112にてPC用I/F13が使用中であれば終了し、メイン処理に戻る。一方、使用中でなければPC用I/F13が使用中であることを示すために、ステップS103、S113にてセマフォのセットを行い、交信するための伝聞データブロック(以下パケットと称す)を作成するべく内部に有している交信対象のPCの固有アドレス情報14b、15bを参照(ステップS104、S114)し、交信対象のPC6に対する要求内容のパケットを作成する(ステップS105、S115)。
その後、ステップS106、S116にて交信対象のPC6に対してパケットを送信する。
そして、ステップS107、S117にてPC6からの応答パケットを待ち、PCからの応答パケットを受信した場合、ステップS108、S118にて応答パケットに対する処理を行い、最後にステップS109、S119にてセマフォをリセットし、交信を終了してメインプログラムに戻る。
FIG. 12 is a schematic flowchart of the PC communication means 16 of the program for transmitting / receiving data to / from the
The PC communication means 16 is called when it becomes necessary to transmit / receive data to / from the PC 6a and PC 6b from the monitoring program 14A and the
In step S101, it is determined to which PC communication is performed, and then in steps S102 and S112, whether each other's program is using the PC I /
If the PC I /
Thereafter, in steps S106 and S116, the packet is transmitted to the PC 6 to be communicated.
In steps S107 and S117, a response packet from the PC 6 is waited. When a response packet from the PC is received, the response packet is processed in steps S108 and S118. Finally, the semaphore is reset in steps S109 and S119. End communication and return to the main program.
図13はPCに対する要求パケットを示した図であり、図において、18は要求コード181、データ長182、データ183から構成されれる要求パケットを示したものである。
特に、プログラミング機能プログラム15AがPC6aに対しPCメモリの内容を100Byte読み出し要求した場合のPC6aパケットを、18aとして示している。
181aはプログラミング機能プログラム15AがPC6aに対しPCメモリ内容の読み出しを指示するための要求コードであり、例えば「メモリリード 2」が格納されている。182aはデータの長さを示したデータ長であり、例えば「データ長 3」が格納されている。183aはメモリの内容を100Byte読み出しするためのデータであり、固有アドレス情報14b、15b(PCメモリ先頭アドレス)から取得される「先頭アドレス」、「バイト長 100」が格納されている。
なお、パケットはPCの種類及び通信媒体により内容は異なり、先頭アドレス183aは各アプリケーションプログラムが有する固有アドレス情報14b、15bを使用してセットしてやらなければならない。
FIG. 13 is a view showing a request packet for the PC. In the figure, 18 shows a request packet composed of a
In particular, the PC 6a packet when the
181a is a request code for the
The contents of the packet differ depending on the type of PC and the communication medium, and the
以上のように従来のPC周辺装置は、PCに対しデータの送受信を行う場合、各PCに関する固有アドレス情報、PCアクセスデータを各々のプログラムエリア内に保有し取り扱っているため、プログラミング機能プログラム、モニタリングプログラム等のアプリケーションプログラムのプログラム構成が大きくなると共に、プログラム複雑化に伴う処理速度の向上を図ることができないといった問題がある。
また、PC本体にアドレス等の変更があった場合、パケットの構成が変更された場合、PCの機種が追加になった場合には、PCアクセスデータ、固有アドレス情報の変更が必要となり、それに伴い各々のプログラムの内部処理を変更しなければならない必要があった。
また、PCの内部メモリへのデータの送信及びPC内部メモリデータの受信は、各プログラムがPCの実メモリを対象として直接行っており、データの加工は送信前、または受信後にそのプログラムの内部処理にて行っていたため、常にPCの仕様にあったデータ構成で加工処理を行う必要があり、処理が煩雑になる問題点があった。
本発明は、上記の問題点を解消するためになされたものであり、制御対象機器との通信を管理する通信マネージャーを設け、該制御対象機器との送受信はマネージャー経由にてデータを取り扱うようにし、各制御対象機器に関する固有情報を内部情報として持つことで、制御対象機器に対しデータ送受信を行うアプリケーションプログラムは、各制御対象機器の種類に依存するデータ加工処理を行うことを無くし、決まった手順にて行うようにしたものである。
As described above, when transmitting and receiving data to and from a PC, a conventional PC peripheral device stores and handles unique address information and PC access data related to each PC in each program area. There is a problem that the program configuration of an application program such as a program becomes large and the processing speed cannot be improved due to the complexity of the program.
In addition, when the address of the PC is changed, the packet configuration is changed, or the PC model is added, it is necessary to change the PC access data and unique address information. There was a need to change the internal processing of each program.
In addition, the transmission of data to the internal memory of the PC and the reception of the internal memory data of the PC are performed directly by each program for the real memory of the PC, and the data processing is performed before or after the transmission. Therefore, it is necessary to always perform processing with a data configuration that meets the specifications of the PC, and there is a problem that the processing becomes complicated.
The present invention has been made in order to solve the above-described problems. A communication manager for managing communication with a control target device is provided, and data transmission / reception with the control target device is handled via the manager. The application program that transmits / receives data to / from the control target device by having the specific information about each control target device as internal information eliminates the need to perform data processing depending on the type of each control target device. It is something that is done at.
この目的を達成するためのデータ処理装置は、通信回線を介して接続される内部メモリのデータ構成が異なる複数種類のプログラマブルコントローラに対する要求を統一された形式で発し、かつ、上記プログラマブルコントローラを制御するプログラムを作成するプログラム開発環境を提供するプログラミング機能プログラムと、このプログラミング機能プログラムから上記統一された形式の要求を受け、当該要求を上記プログラマブルコントローラの種類に応じた形式の要求に変換する通信マネージャーと、この通信マネージャーにより変換された要求を、上記プログラマブルコントローラに出力する交信手段と、を備え、上記通信マネージャーは、上記統一された形式の要求に設定されている内容に応じ、上記交信手段から要求が出力されるプログラマブルコントローラの種類に対応するデータであって当該種類のプログラマブルコントローラの内部メモリにアクセスするに際しどこにアクセスしたらよいかを示すアドレスを含むデータを取り込み、当該データに基づき上記変換を行うものである。 A data processing apparatus for achieving this object issues a request for a plurality of types of programmable controllers having different data configurations of internal memories connected via a communication line in a unified format, and controls the programmable controller A programming function program that provides a program development environment for creating a program, a communication manager that receives a request in the unified format from the programming function program, and converts the request into a request in a format corresponding to the type of the programmable controller; Communication means for outputting the request converted by the communication manager to the programmable controller, and the communication manager makes a request from the communication means according to the contents set in the request of the unified format. Is output That a data corresponding to the type of programmable controller captures data including an address indicating where the can I access upon accessing the internal memory of the type of programmable controller, and performs the conversion based on the data.
この発明によれば、各プログラマブルコントローラの種類に依存したプログラミング機能プログラムの変更が不要となる。 According to the present invention, it is not necessary to change the programming function program depending on the type of each programmable controller .
次に、本発明について、以下の通り実施の形態を説明する。
実施の形態1.
図1は、本発明のPC周辺装置の構成を示すブロック図であり、図において、1は入出力装置であるCRT2やキーボード3及びマウス4や、通信回線を介して接続されるPC6a、PC6bを制御するPC周辺装置であり、本発明で示される通信マネージャーが搭載されている。5は補助記憶装置であり、PC6a、PC6bのデバイスデータを収集しCRT2に対し前記デバイスデータ内容の表示を行うモニタリングプログラムのファイル14及びPC6a、PC6bが動作するためのユーザープログラムを作成するプログラム開発環境を提供するプログラミング機能プログラム15等のアプリケーション、並びに、モニタリングプログラム14及びプログラミング機能プログラム15がPC6a、PC6bと交信するためのPC交信手段のファイル16、本発明の通信マネージャー20が保存されている。
6は通信回線を介して接続されるPCであり、内部メモリのデータ構成が異なる例えば2台のPC6a、6bが接続されている。
PC周辺装置1において、7は通信マネージャー20及びPCと交信を行うプログラムを実行するCPU、8は通信マネージャー20及びPC6a、PC6bと通信を行うプログラムの作業領域メモリ、9はCRT2とのインターフェース、10はキーボート3とのインターフェース、11はマウス4とのインターフェース、12は補助記憶装置5とのインターフェース、13はPC6a、PC6bとのインターフェースである。
作業領域メモリ8内には、補助記憶装置5に格納されているモニタリングプログラム14、プログラミング機能プログラム15及びPC交信手段16並びに通信マネージャー20が展開されている。
Next, embodiments of the present invention will be described as follows.
FIG. 1 is a block diagram showing the configuration of a PC peripheral device according to the present invention. In FIG. 1,
Reference numeral 6 denotes a PC connected via a communication line. For example, two
In the PC
In the
通信マネージャー20は、PCアクセスデータ21、固有アドレス情報22、要求コマンド分別手段23、PC機種別パケット作成手段24、リソース管理手段25から構成される。
ここで、PCアクセスデータ21はPC6a、PC6bに対し交信を行うためのデータ、固有アドレス情報22はPC6a、PC6bに対しアクセスする際、何処にアクセスしたらよいかのアドレスが格納されるか示す情報、要求コマンド分別手段23はPC6a、6bと通信を行うプログラムのインタフェース部であり、共通パケット30により要求内容の振分を行う手段、PC機種別パケット作成手段24は要求コマンド分別手段23からの仮想PCパケット40を実際のPCとアクセスするための実PCパケット60に変換/作成を行う手段、リソース管理手段25はPCアクセスデータ21、固有アドレス情報22にアクセスし固有アドレス情報の読み出しやプログラム、パラメータ、デバイスデータなどのリソースを管理する手段である。
なお、PC周辺装置1は専用機である必要はなく、少なくとも前記構成を搭載していれは市販のパーソナルコンピュータであっても構わない。
The
Here, the
The PC
図2は、PC周辺装置の作業領域メモリで実行されるプログラムの構成図であり、メモリ8上で実行されるプログラムは補助記憶装置5に保存されており、オペレータがキーボード3またはマウス4を使用し起動操作することにより動作を開始する。
FIG. 2 is a configuration diagram of a program executed in the work area memory of the PC peripheral device. The program executed on the
図3は、アプリケーションからPCに対し送受信を行う場合のパケットの変換前、変換後の構成を示した構成図であり、図において、30はモニタリングプログラム14、プログラミング機能プログラム15等の各アプリケーションプログラムより通信マネージャー20の要求コマンド分別手段23に対して要求を行う際の共通パケットであり、PCにアクセスする場合もPCのリソースにアクセスする場合も共通なI/Fとなっている。40は要求コマンド分別手段23が共通パケツトの内容を解析し、機能名がPCに対する要求の場合に作成されるデータブロックである仮想PCパケット、50はPCメモリリード要求等の固有アドレス情報22、PCアクセスデータ21が必要となる場合に発行されるリソース要求パケット、60はPC交信手段16を介してPC6と実際に通信を行うための実PCパケットである。
共通パケット30は、リソース要求、メモリリード/ライト等の振り分けを示す機能名31、どのPCを選択するかを決定するための制御対象機器番号としてのPC固有番号32、PCと交信する際のメディア、例えばRS232C、Ethernet(登録商標)等の設定を行うターゲット設定33、モニタリングプログラム14及びプログラミング機能プログラム15等の要求元プログラムを識別するアプリケーションID34、機能名毎に必要なデータである引数35から構成される。
FIG. 3 is a configuration diagram showing a configuration before and after packet conversion when transmission / reception is performed from an application to a PC. In FIG. 3, reference numeral 30 denotes an application program such as a
The common packet 30 includes a
仮想PCパケット40は、共通パケット30におけるPC固有番号32、ターゲット33、アプリケーションID34の値が代入されるPC固有番号41、ターゲット42、アプリケーションID43、共通パケット30における機能名31をPCが認識できるように展開したコードである要求コード44、データ46のバイト長を示すデータ長45、要求コード44毎に必要なデータであり、リソース要求パケット50の発行に伴い得たアドレスの一部として設定されるデータ46から構成される。
リソース要求パケット50は、要求内容により2種類に分かれ、固有アドレス情報22とアクセスする場合は、固有アドレス情報用リソース要求パケット50aを使用し、PCアクセスデータ21とアクセスする場合は、PCアクセスデータ用リソース要求パケット50bを使用する。リソース要求パケット50における、PC固有番号51、アプリケーションID52、55は、共通パケット30におけるPC固有番号32、アプリケーションID34の値を代入したもの、要求コード53、56は機能名31をPCが認識できるように展開したコード、情報名54は読み出したい固有アドレス情報名、リソース名57はプログラム、パラメータ等のPCアクセスデータの種類、データ長58はデータ59のバイト長、データ59は要求コード56毎に必要なデータである。
実PCパケット60は、仮想PCパケット40における要求コード44、データ長45、データ46の値が代入される要求コード61、データ長62、データ63から構成される。
The virtual PC packet 40 allows the PC to recognize the PC unique number 41 to which the values of the PC
The resource request packet 50 is divided into two types depending on the content of the request. When accessing the
The actual PC packet 60 includes a request code 44, a
図4は、アプリケーションがPC6a及びPC6bとデータを送受信する場合に使用する通信マネージャーの動作を示すフローチャートであり、特に通信マネージャー23がモニタリングプログラム14、プログラミング機能プログラム15等からPC6a、PC6bのメモリリード要求を受けた場合の動作を表わしている。
本実施の形態では、プログラミング機能プログラム15がPC6aのメモリ内容を読み出す動作を例にとり説明する。
FIG. 4 is a flowchart showing the operation of the communication manager used when the application transmits / receives data to / from the
In the present embodiment, an operation in which the
まず、プログラミング機能15はPCのメモリ内容読み出しを行う場合、共通パケット30の機能名31に「PCメモリ読み出し」を、PC固有番号32にPCの号機番号「6a」を、ターゲット33にはPCと交信するメディアである「RS232C」を、アプリケーションID34にはプログラミング機能15を識別可能なシステム上でユニークな「番号」を、引数には「要求データサイズ」と「格納バッファアドレス」をセットし、その後、セットした共通パケット30を通信マネージャー20の要求コマンド分別手段23に送信する。
要求コマンド分別手段23は、共通パケット30を受信(ステップS1)し、ステップS2においてPCに対するアクセス要求かリソース要求かを機能名31に基づきを判断する。ステップS2において、PCアクセスでない場合は、ステップS19に移行して、リソース要求処理を行う。
次に、ステップS3にて共通パケット30に設定されたターゲット33が現在使用中かどうかをチェックし、使用中の場合はステップS4に移行してエラー処理を行い、未使用の場合はステップS5に移行し、他の同様な要求を排他するために排他制御を行い、その後ステップS6に移行する。
ステップS6にて要求コマンド分別手段23は、共通パケット30の形態から用途別の手段に添うように、共通パケット30における機能名31をPCが理解できるコードに展開した要求コード44、PC固有番号32、ターゲット33、アプリケーションID34の値を代入したPC固有番号41、ターゲット42、アプリケーションID43を有する仮想PCパケット40を作成し、ステップS7に移行する。
ステップS7では、作成した仮想PCパケット40をPC機種別パケット作成手段24に送信し、ステップS8に移行する。
First, when reading the memory contents of the PC, the
The request command classification means 23 receives the common packet 30 (step S1), and determines whether it is an access request or a resource request for the PC based on the
Next, in step S3, it is checked whether the
In step S6, the request
In step S7, the created virtual PC packet 40 is transmitted to the PC model-specific packet creation means 24, and the process proceeds to step S8.
ステップS8では、仮想PCパケット40を実際のPCが理解できる形態にするために、リソース管理手段25に対し、メモリ読み出しに必要となる固有アドレス情報22を入手するためのリソース要求パケット50を作成し、ステップS9にてリソース管理手段25に対し送信する。
リソース管理手段25は、PC機種別パケット作成手段24から、要求コマンド分別手段23経由で送られたリソース要求パケット50を受信し、固有アドレス情報用リソース要求パケット50a中の情報名54を基に、補助記憶装置5上にて管理している固有アドレス情報22からPCメモリデータを読み込む際に必要なPCメモリ先頭アドレスデータを読み込み(ステップS10)、再度、要求コマンド分別手段23経由でPC機種別パケット作成手段24に固有アドレス情報22を返す。
そして、ステップS11にてPC機種別パケット作成手段24は、固有アドレス情報用リソース要求パケット50aに基づき得られたPCメモリ先頭アドレスデータ及び仮想PCパケット40の内容から、実PCパケット60を作成し、ステップS12にて該実PCパケット60をPC交信手段16に送信する。
その後、ステップS13において、正常終了したかどうか確認し、異常終了したらステップS14に移行してエラーをセットし、正常終了ならばステップS15に移行してPC交信手段16から応答を受信し、そのデータをPC機種別パケット作成手段24が仮想PCパケットに変換し、要求コマンド分別手段23に返す(ステップS16)。
その後、ステップS17にて排他制御をリセットし、要求コマンド分別手段23において仮想PCパケットから共通パケットに変換し、要求されたデータを要求元のプログラミング機能プログラム15に返信し(ステップS18)終了する。
In step S8, in order to make the virtual PC packet 40 in a form that can be understood by the actual PC, a resource request packet 50 for obtaining the
The
In step S11, the PC model-specific
Thereafter, in step S13, it is confirmed whether or not the process is normally completed. If the process is abnormally ended, the process proceeds to step S14 to set an error. If the process is completed normally, the process proceeds to step S15 and a response is received from the PC communication means 16, and the data Is converted into a virtual PC packet by the PC model-specific packet creation means 24 and returned to the request command sorting means 23 (step S16).
Thereafter, the exclusive control is reset in step S17, the request command sorting means 23 converts the virtual PC packet into a common packet, the requested data is returned to the requesting programming function program 15 (step S18), and the process ends.
一方、通信マネージャー20がモニタリングプログラム14、プログラミング機能プログラム15等から直接リソースアクセスを要求した場合は、ステップS19にて、使用するリソースは未使用かをチェックし、使用中の場合はステップS20に移行してエラー処理を行い、未使用の場合はステップS21に移行し、他の同様な要求を排他するために排他制御を行い、その後ステップS22に移行する。
ステップS22にて要求コマンド分別手段23は、受けた共通パケット30の機能名31をPCが理解できるコードに展開した要求コードを設けたリソース管理手段25に渡すためのリソース要求パケット50を作成し、ステップS23に移行し、該リソース要求パケット50をリソース管理手段25に送信する。
ステップS24において、リソース管理手段25は、リソース要求パケット50における要求コードに基づき、固有アドレス情報22又はPCアクセスデータ21を読み出し、読み出した固有アドレス情報22又はPCアクセスデータ21をリソース要求パケット50における情報名54あるいはデータ長58、データ59の領域に格納し、要求コマンド分別手段23に返送する(ステップS25)。
その後、ステップS26において、排他制御をリセットし、要求コマンド分別手段23から要求されたデータをリソース要求元のアプリケーションプログラムに返信し(ステップS27)終了する。
On the other hand, when the
In step S22, the request
In step S24, the resource management means 25 reads the
Thereafter, in step S26, the exclusive control is reset, the data requested from the request command sorting means 23 is returned to the resource request source application program (step S27), and the process ends.
このように、モニタリングプログラム14、プログラミング機能プログラム15等のPCにアクセスするプログラムからのアクセス処理を、PCの種類及び機能に依存しない共通パケット30による統一されたインタフェースとして、通信マネージャー20を構築したので、従来のPCに対する煩雑な処理を著しく簡略し、PC側の仕様変更があった場合でも、補助記憶装置内のデータベースのみ変えるので、PCにアクセスするアプリケーションプログラム側の処理は何ら変更する必要は無く、システム変更に容易に対応できる。
また、アプリケーションプログラムのプログラム容量も削減でき、プログラム自体の処理を高速化できる。
As described above, the
In addition, the program capacity of the application program can be reduced, and the processing of the program itself can be accelerated.
実施の形態2.
図5、図6を用いて、PC周辺装置に関するこの発明の他の実施の形態を説明する。
図5は、PC周辺装置の作業領域メモリで実行されるプログラムの構成図であり、メモリ8上で実行されるプログラムは補助記憶装置5に保存されており、オペレータがキーボート3またはマウス4を使用し起動操作することにより動作を開始する。
図において、26はモニタリングプログラム14、プログラミング機能プログラム15などPCにアクセスするプログラムに対し、実際のH/Wを接続しなくとも、実際のPCの動作と同様な動きをするPCエミュレータプログラムであり、システム構築のデバッグ段階で使用するものである。27は実際にPCにアクセスする部分をOSがサポートしているプログラム間通信手段、28はアプリケーション間通信管理手段であり、モニタリングプログラム14、プログラミング機能プログラム15などから要求されたコマンドをプログラム間通信手段30を経由してPCエミュレータプログラム26との送受信を行うものである。
Embodiment 2. FIG.
Another embodiment of the present invention relating to a PC peripheral device will be described with reference to FIGS.
FIG. 5 is a configuration diagram of a program executed in the work area memory of the PC peripheral device. The program executed on the
In the figure,
図6は、通信マネージャー20がモニタリングブログラム14、プログラミング機能プログラム15等からPCエミュレータ26のメモリリード要求を受けた場合の動作を表わすフローチャートである。
本実施の形態では、プログラミング機能プログラム15がPCエミュレータプログラム26のメモリ内容を読み出す動作を例にとり説明する。
FIG. 6 is a flowchart showing an operation when the
In the present embodiment, an operation in which the
まず、プログラミング機能15はPCエミュレータ26のメモリ内容読み出しを行う場合、共通パケット30の機能名31に「PCメモリ読み出し」を、PC固有番号32にPCの号機番号「6a」を、ターゲット33には「PCエミュレータ」を、アプリケーションID34にはプログラミング機能15を識別可能なシステム上でユニークな「番号」を、引数には「要求データサイズ」と「格納バッファアドレス」をセットし、その後、セットした共通パケット30を通信マネージャー20の要求コマンド分別手段23に送信する。
要求コマンド分別手段23は、共通パケット30を受信し(ステップS31)、ステップS32においてPCに対するアクセス要求かリソース要求かを判断する。ステップS32において、PCエミュレータアクセスでない場合は、図4で示したリソース要求(ステップS19)以降の処理を行い、PCエミュレータアクセスである場合は、ステップS33に移行する。
ステップS33では、共通パケットに設定したターゲット33が現在使用中かどうかをチェックし、使用中の場合はステップS34に移行してエラー処理を行い、未使用の場合はステップS35に移行し、他の同様な要求を排他するために、排他制御を行い、その後ステップS36に移行する。
ステップS36にて、共通パケット30におけるターゲット33に基づきPCアクセス要求か、PCエミュレータアクセス要求かを判断し、PCアクセス要求の場合は、図4におけるステップS5以降で示されるPCアクセス処理を行う。
次に、ステップS37において、共通パケット30の形態から用途別の手段に添うように、共通パケット30における機能名31をPCが理解できるコードに展開した要求コード44、PC固有番号32、ターゲット33、アプリケーションID34の値を代入したPC固有番号41、ターゲット42、アプリケーションID43を有する仮想PCパケット40を作成し、ステップS38に移行する。
First, when the memory function of the
The request
In step S33, it is checked whether or not the
In step S36, it is determined whether the request is a PC access request or a PC emulator access request based on the
Next, in step S37, the request code 44, the PC
ステップS38では、作成した仮想PCパケット40をアプリケーション間通信管理手段28に送信し、ステップS39に移行する。
ステップS39では、仮想PCパケット40を実際のPCと同様な動きをするPCエミュレータ26が理解できる形態にするために、リソース管理手段25に対し、メモリ読み出しに必要となる固有アドレス情報22を入手するためのリソース要求パケット50を作成し、ステップS40にてリソース管理手段25に対し送信する。
リソース管理手段25は、アプリケーション間通信管理手段28から、要求コマンド分別手段23経由で送られたリソース要求パケット50を受信し、固有アドレス情報用リソース要求パケット50a中の要求コード53を基に、補助記憶装置5上にて管理している固有アドレス情報22からPCメモリデータを読み込む際に必要なPCメモリ先頭アドレスデータを読み込み(ステップS41)、再度、要求コマンド分別手段23経由でアプリケーション間通信管理手段28にデータを返す。
そして、ステップS42にてアプリケーション間通信管理手段28は、固有アドレス情報用リソース要求パケット50aに基づき得られたPCメモリ先頭アドレスデータ及び仮想PCパケット40の内容から、実PCパケット60を作成し、ステップS43にてプログラム間通信手段27にデータをセットする。
その後、ステップS44において、正常終了したかどうか確認し、異常終了したらステップS45に移行してエラーをセットし、正常終了ならばステップS46に移行してプログラム間通信手段27から応答を受信し、そのデータを仮想PCパケットに変換し、要求コマンド分別手段23に返す(ステップS47)。
その後、ステップS48にて排他制御をリセットし、要求コマンド分別手段23から要求されたデータを要求元のプログラミング機能プログラム15に返信し(ステップS18)終了する。
In step S38, the created virtual PC packet 40 is transmitted to the inter-application communication management means 28, and the process proceeds to step S39.
In step S39, the
The resource management means 25 receives the resource request packet 50 sent from the inter-application communication management means 28 via the request command sorting means 23, and assists based on the request code 53 in the specific address information resource request packet 50a. The PC memory head address data necessary for reading the PC memory data from the
In step S42, the inter-application communication management means 28 creates a real PC packet 60 from the PC memory head address data obtained based on the unique address information resource request packet 50a and the contents of the virtual PC packet 40. In S43, data is set in the inter-program communication means 27.
Thereafter, in step S44, it is confirmed whether or not the process is normally completed. If the process is abnormally terminated, the process proceeds to step S45 to set an error. If the process is terminated normally, the process proceeds to step S46 and a response is received from the inter-program communication means 27. The data is converted into a virtual PC packet and returned to the request command sorting means 23 (step S47).
Thereafter, the exclusive control is reset in step S48, the data requested from the request command sorting means 23 is returned to the
このように、モニタリングプログラム14、プログラミング機能プログラム15等のPCにアクセスするプログラムのアクセス処理を、他のプログラムに対する送受信が行えるよう構築したため、独自にPCエミュレーションプログラム自体が、モニタリングプログラム、プログラミング機能プログラムなどの機能を実装する必要は無く、プログラム容量を削減でき、該プログラムを高速に演算処理できるようになる。
また、PCエミュレータ側の煩雑な処理を著しく簡略化することが可能である。
As described above, since the access process of the program for accessing the PC such as the
Further, the complicated processing on the PC emulator side can be remarkably simplified.
本発明にかかるデータ処理装置は、接続されるPCへのプログラミングに対する通信において用いられるのに適している。 The data processing apparatus according to the present invention is suitable for use in communication for programming to a connected PC.
1 PC周辺装置
2 CRT
3 キーボード
4 マウス
5 補助記憶装置
6a、6b PC
7 CPU
8 作業領域メモリ
9 CRT用インターフェース
10 キーボード用インターフェース
11 マウス用インターフェース
12 補助記憶装置用インターフェース
13 PC用インターフェース
14 モニタリングプログラム
15 プログラミング機能プログラム
16 PC交信手段
17 OS
18 要求パケット
20 通信マネージャー
21 PCアクセスデータ
22 固有アドレス情報
23 要求コマンド分別手段
24 PC機種別パケット作成手段
25 リソース管理手段
26 PCエミュレータプログラム
27 プログラム間通信手段
28 アプリケーション間通信管理手段
1 PC peripheral device 2 CRT
3 Keyboard 4
7 CPU
8 Work area memory 9 CRT interface 10 Keyboard interface 11
18
Claims (2)
このプログラミング機能プログラムから上記統一された形式の要求を受け、当該要求を上記プログラマブルコントローラの種類に応じた形式の要求に変換する通信マネージャーと、
この通信マネージャーにより変換された要求を、上記プログラマブルコントローラに出力する交信手段と、を備え、
上記通信マネージャーは、上記統一された形式の要求に設定されている内容に応じ、上記交信手段から要求が出力されるプログラマブルコントローラの種類に対応するデータであって当該種類のプログラマブルコントローラの内部メモリにアクセスするに際しどこにアクセスしたらよいかを示すアドレスを含むデータを取り込み、当該データに基づき上記変換を行うことを特徴とするデータ処理装置。 A programming function that provides a program development environment for generating a program for controlling a programmable controller that issues a request for a plurality of types of programmable controllers having different data configurations of internal memories connected via a communication line. Program and
A communication manager that receives the request in the unified format from the programming function program and converts the request into a request in a format according to the type of the programmable controller;
A communication means for outputting the request converted by the communication manager to the programmable controller;
The communication manager is data corresponding to the type of programmable controller for which the request is output from the communication means according to the contents set in the request of the unified format, and is stored in the internal memory of the programmable controller of the type. A data processing apparatus which takes in data including an address indicating where to access when accessing and performs the conversion based on the data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008029046A JP4508245B2 (en) | 2008-02-08 | 2008-02-08 | Data processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008029046A JP4508245B2 (en) | 2008-02-08 | 2008-02-08 | Data processing device |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005129560A Division JP4103900B2 (en) | 2005-04-27 | 2005-04-27 | Data processing device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008204450A JP2008204450A (en) | 2008-09-04 |
JP4508245B2 true JP4508245B2 (en) | 2010-07-21 |
Family
ID=39781838
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008029046A Expired - Lifetime JP4508245B2 (en) | 2008-02-08 | 2008-02-08 | Data processing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4508245B2 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04335455A (en) * | 1991-05-13 | 1992-11-24 | Mitsubishi Electric Corp | Communication system between computers of different code systems |
JPH05297902A (en) * | 1992-04-17 | 1993-11-12 | Mitsubishi Electric Corp | Program transfer method and parameter tuning method of programmable controller |
JPH08235098A (en) * | 1995-02-22 | 1996-09-13 | Mitsubishi Electric Corp | Distributed application commuinication system |
-
2008
- 2008-02-08 JP JP2008029046A patent/JP4508245B2/en not_active Expired - Lifetime
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04335455A (en) * | 1991-05-13 | 1992-11-24 | Mitsubishi Electric Corp | Communication system between computers of different code systems |
JPH05297902A (en) * | 1992-04-17 | 1993-11-12 | Mitsubishi Electric Corp | Program transfer method and parameter tuning method of programmable controller |
JPH08235098A (en) * | 1995-02-22 | 1996-09-13 | Mitsubishi Electric Corp | Distributed application commuinication system |
Also Published As
Publication number | Publication date |
---|---|
JP2008204450A (en) | 2008-09-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3729251B2 (en) | Controller and system | |
US9684299B2 (en) | Apparatus and method for managing machine tool information for heterogeneous numerical control devices | |
JPH11231927A (en) | Monitor and control system | |
JP2018010638A5 (en) | ||
JP3694326B2 (en) | Data processing device | |
JP4508245B2 (en) | Data processing device | |
JP2007221364A (en) | Expansion method of controller, control system, and control device | |
JP4103900B2 (en) | Data processing device | |
JP2011186607A (en) | Field device, setting method for the same, field device management method and program | |
JP5482329B2 (en) | Image processing apparatus, device management system, job management method, job management program, and recording medium recording the program | |
JP2019087208A (en) | Control system | |
JP4186383B2 (en) | Programmable controller system | |
JP2005208967A (en) | Management computer and method for managing storage device | |
TWI719420B (en) | Information processing apparatus, information processing method, and program | |
CN112564999A (en) | Network measurement method, measurement management server, system and storage medium | |
JPH09330243A (en) | Computer system | |
JP2007026122A (en) | Plant monitoring control system | |
WO2022181535A1 (en) | Information processing device, and computer-readable storage medium | |
JP7277889B1 (en) | Program and target device monitoring method | |
JP5951041B2 (en) | Programmable display | |
CN116521151B (en) | Method and system for generating electronic product software code | |
JP2006106999A (en) | Programmable controller | |
KR102244297B1 (en) | Plc analog module with hart pass-through interface | |
JPH11149383A (en) | Inter-process communication controller | |
CN117687710A (en) | Setting method of network equipment chip register, network equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090624 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090817 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090908 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20091106 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20091208 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100127 |
|
A911 | Transfer of reconsideration by examiner before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20100315 |
|
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: 20100413 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100426 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130514 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130514 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140514 Year of fee payment: 4 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
EXPY | Cancellation because of completion of term |