JP3550677B2 - Personal computer and communication method of personal computer - Google Patents

Personal computer and communication method of personal computer Download PDF

Info

Publication number
JP3550677B2
JP3550677B2 JP03966499A JP3966499A JP3550677B2 JP 3550677 B2 JP3550677 B2 JP 3550677B2 JP 03966499 A JP03966499 A JP 03966499A JP 3966499 A JP3966499 A JP 3966499A JP 3550677 B2 JP3550677 B2 JP 3550677B2
Authority
JP
Japan
Prior art keywords
message
command
tool
personal computer
command message
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
Application number
JP03966499A
Other languages
Japanese (ja)
Other versions
JP2000047717A (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.)
Omron Corp
Original Assignee
Omron 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 Omron Corp filed Critical Omron Corp
Priority to JP03966499A priority Critical patent/JP3550677B2/en
Publication of JP2000047717A publication Critical patent/JP2000047717A/en
Application granted granted Critical
Publication of JP3550677B2 publication Critical patent/JP3550677B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
この発明は、複数のプログラマブルコントローラと、パーソナルコンピュータとで構築されたプログラマブルコントローラシステムに関する。
【0002】
【従来の技術】
近年、センサ,アクチュエータ等を制御するプログラマブルコントローラは、例えば図14に示すように、CPUユニット50と、システムバス90を介してCPUユニット50と接続するNCユニット等からなる高機能I/Oユニット60および他の通信ユニットとデータを送受信する通信ユニット70とから構成されている。
【0003】
CPUユニット50は、ラック上に有する高機能I/Oユニット60および通信ユニット70を制御するようになっているとともに、ツールケーブル100を介してデータを設定させるツール(アプリケーションソフトウェア)1,高機能I/Oユニット60でモニタリングを実行させるツール2(アプリケーションソフトウェア)を稼働させるパーソナルコンピュータ80と接続するようになっている。
【0004】
高機能I/Oユニット60は、特殊な制御、例えばNC制御,PID制御等を実施するものである。
【0005】
通信ユニット70は、他のノードとなる別のCPUユニット50または高機能I/Oユニット60とデータを送受信するようになっている。
【0006】
【発明が解決しようとする課題】
上述した従来のプログラマブルコントローラでは、CPUユニット50に接続するパーソナルコンピュータ80が、CPUユニット50にデータを設定するツール1または高機能I/Oユニット60でモニタリングを実行させるツール2(アプリケーションソフトウェア)を稼働させるものであるが、パーソナルコンピュータ80上で複数のアプリケーションを同時にCPUユニット50と通信させることができないため、仮にツール1が稼働しているときにツール2を稼働させたい場合には、一旦、ツール1の稼働を停止したうえで、ツール2を稼働させなければならず、作業効率が悪いという問題点があった。
【0007】
なお、図15に示すように、高機能ユニット60にパーソナルコンピュータ90をさらに接続し、高機能I/Oユニット60でモニタリングを実行させるツール2を実行さると、上述した問題点が解決されるが、パーソナルコンピュータが余分に必要となり、装置コストが高くなるという問題点があった。
【0008】
そこで、この発明は上述した問題点に鑑み、所定のツールを稼働させるに際し、作業効率を向上させるとともに、装置コストを抑えるプログラマブルコントローラシステムを提供することを目的とする。
【0009】
【課題を解決するための手段】
上述の目的を達成するために、この発明において、パーソナルコンピュータは、ツールからプログラマブルコントローラに対して送信すべ旨の指示を受けると、形成したコマンドメッセージを送信バッファに格納し、また、プログラマブルコントローラに送信したコマンドメッセージに対するレスポンスメッセージを受信バッファに格納するように構成したため、コマンドメッセージに対するレスポンスメッセージを受信しなくても、ツールの指示に基づきコマンドメッセージを送信することができる。
【0010】
また、この発明では、プログラマブルコントローラが、パーソナルコンピュータから受信したコマンドメッセージから送信先を読み取り、読み取った送信先が自己宛ての場合には、そのコマンドメッセージに基づいた処理を実行し、その後、コマンドメッセージに対するレスポンスメッセージをパーソナルコンピュータに送信する。
【0011】
一方、プログラマブルコントローラは、読み取った送信先が第2のプログラマブルコントローラの場合には、コマンドメッセージを第2のプログラマブルコントローラに送信し、この第2のプログラマブルコントローラからのレスポンスメッセージを受信すると、受信したレスポンスメッセージをパーソナルコンピュータに送信する。
【0012】
【発明の実施の形態】
以下、この発明に係るプログラマブルロジックコントローラシステムを図面を参照して説明する。
【0013】
図1はこの発明に係るプログラマブルロジックコントローラシステムの一実施形態を示すブロック図である。
【0014】
この実施形態のプログラマブルロジックコントローラシステム(以下、PLCシステムという)は、センサ,アクチュエータ等の制御対象機器を制御する第1のプログラマブルコントローラ(以下、第1のPLCという、)1および第2のプログラマブルコントローラ(以下、第2のPLCという)1aと、後述するツールを稼働するパーソナルコンピュータ(以下、パソコンという)2とから構成されている。
【0015】
第1のPLC1は、CPUユニット11と、高機能ユニット12と、通信ユニット13とを備えており、これらがデータバス,アドレスバス等からなるシステムバス14と接続された構成になっている。
【0016】
CPUユニット11は、ラック上に有する高機能I/Oユニット12および通信ユニット13を制御するとともに、ツールケーブル3を介してパソコン2と接続されており、パソコン2から受信したツールの所定処理を実行するようになっている。
【0017】
このCPUユニット11は、CPUユニット11自身を制御するマイクロコンピュータ(マイコン)111と、マイクロコンピュータ111がシステムバス14を介して各ユニット12,13にアクセスするためのインタフェースを行うマイコンバスASIC112と、ツールからの受信データ(以下、コマンドメッセージという)を複数格納するとともにツールに対して送信する送信データ(レスポンスメッセージという)を格納するメモリ113と、通信処理を行う通信処理プログラムを格納する通信処理プログラムメモリ114とを有するような構成になっている。
【0018】
通信処理プログラムは、図2に示すように、パーソナルコンピュータ2から受信したコマンドメッセージを受信するコマンド受信手段114aと、コマンドメッセージに対するレスポンスメッセージを形成するレスポンス形成手段114bと、レスポンス形成手段114bで形成したレスポンスメッセージをパーソナルコンピュータ2に送信するレスポンス送信手段114cと、コマンド受信手段114aが受信したコマンドメッセージから送信先を読み取る送信先読取り手段114dと、送信先読取り手段114dで読み取られた送信手段の宛先を判断し、宛先を第2のPLC1aであると判断した場合には、通信ユニット13にコマンドメッセージを転送し、一方、宛先が自己であるであると判断した場合には、レスポンス形成手段114bにコマンドメッセージに対するレスポンスメッセージを形成させる指示を出力する宛先判断手段114eとを有している。
【0019】
高機能I/Oユニット12は、特殊な制御を行うためのユニット、例えばNCユニット等であり、高機能I/Oユニット自身を制御するマイクロコンピュータ(マイコン)121と、システムバス14とこのユニットのインタフェースを行うバスASIC122と、CPUユニット11から送信されてきたコマンドおよびCPUユニット11に対して送信するレスポンスを格納するメモリ123とを有するような構成になっている。
【0020】
通信ユニット13は、CPUユニット11から受信したコマンドメッセージを、接続している他のノードに有する通信ユニットに送信するとともに、それに対するレスポンス等を受信し、これをCPUユニット11に送信するようになっており、通信ユニット自身を制御するマイクロコンピュータ(マイコン)131と、システムバス14とこのユニットのインタフェースを行うバスASIC132と、CPUユニット11から送信されてきたコマンド等およびCPUユニット11に対して送信するレスポンスメッセージ格納するメモリ133とを有する構成になっている。
【0021】
パーソナルコンピュータ2は、表示画面上に複数のウィンドウを表示できるものであって、このウィンドウを使用して複数のツール21(アプリケーションソフトウェア)(図面上では#1のツール21および#2のツール21)を実行するようになっている。
【0022】
このパーソナルコンピュータ2は、図3に示すように、#1〜#nのツール21と、OS(Operating System) 22と、#1〜#mの通信ドライバ23と、各通信ドライバ23ごとに有する送信バッファ24および受信バッファ25と、各通信ドライバ23ごとに有する通信ポート26と、後述する送信用ツール対応テーブル27と、後述する受信用ツール対応テーブル28とから構成されている。
【0023】
#1〜#nのツール21は、CPUユニット11に所定のデータ値を設定させるもの、高機能I/Oユニット12が制御している制御対象機器のモニタリングを行わせるものがある。
【0024】
OS22は、市販のパーソナルコンピュータにおいて使用されているOS、例えばウィンドウ95/NT等であって、複数のタスク(ソフトウェア)の実行をタイムシェアリングすることで、あたかも同時にタスクが実行されているかのようになっている。
【0025】
#1〜#mの通信ドライバ23は、#iのツール21の指示に基づき、コマンドメッセージを所定のノードに送信する際に、プロトコルに従ったフレーム構成を有するコマンドメッセージを形成し、この形成したコマンドメッセージを送信バッファ24に送信するようになっている。
【0026】
また、#1〜#mの通信ドライバ23は、#jのツール21宛てのレスポンスメッセージを受信バッファ25から受けると、受けたレスポンスメッセージからメッセージデータを形成し、これを#jのツール21に出力するようになっている。
【0027】
なお、#1〜#mの通信ドライバ23がコマンドメッセージを形成する処理および受けたレスポンスメッセージからメッセージデータを形成する処理を、後に詳細に説明する。
【0028】
送信バッファ24は、通信ドライバ23が形成した通信プロトコルに適合したフレームからなるコマンドメッセージを送信するまで一時格納するものである。
【0029】
受信バッファ25は、他のノードから受信したレスポンスメッセージを一時格納するものである。
【0030】
#1〜#mの通信ポート26は、通信ドライバ23と対になっており、パーソナルコンピュータが一般的に保有している外部機器と接続するためのI/F、または、パーソナルコンピュータに拡張ボードを組み込み、拡張された外部機器と接続するI/FからなるシリアルI/F(RS232C等)を有している。
【0031】
送信用ツール対応テーブル27は、図4(a)に示すように、コマンドメッセージを送信したとき、そのコマンドメッセージを送信させるツール21と、このツール21の指示に基づき通信ドライバ23が形成したコマンドメッセージを識別する値であるシーケンシャルIDとを有する送信用ツール対応データを格納するものである。
【0032】
シーケンシャルIDは、各ツール21毎に取り得る値の範囲、例えば10の範囲に決められている。このことは、通信ドライバ23が形成したコマンドメッセージを送信できない場合に、同じコマンドメッセージを形成して送信することができるリトライ回数が規定されていることになる。
【0033】
因みに、Aの印の送信用ツール対応データは、通信ドライバ23形成されたコマンドメッセージが、#2のツールからの指示に基づくものであり、リトライ回数0であることを示している。
【0034】
受信用ツール対応テーブル28は、図4(b)に示すように、レスポンスメッセージを受信したとき、この受信したレスポンスメッセージを出力する先のツール21と、この受信したレスポンスメッセージを特定するメッセージIDとを有する受信用ツール対応データを格納するものである。
【0035】
因みに、Bの印の受信用ツール対応データは、通信ドライバ23で受信したレスポンスメッセージの宛先が#4のツール21のものであり、かつ、このレスポンスメッセージを受信するまでのリトライ回数が3であることを示している。
【0036】
ここで、コマンドメッセージおよびレスポンスメッセージのフレーム構成を説明する。
【0037】
図5はコマンドメッセージおよびレスポンスメッセージのフレーム構成を示すフレーム構成図である。
【0038】
コマンドメッセージは、図5(a)に示すように、メッセージの種別を指定するコマンドヘッダ1A,送信先アドレスおよび送信元アドレス1B,このコマンドメッセージを特定するシーケンシャルID(SID)1C,および送信先に送るデータ(コマンドデータ)1Dからなるフレーム構成になっている。
【0039】
レスポンスメッセージは、図5(b)に示すように、メッセージの種別を指定するレスポンスヘッダ2A,送信先アドレスおよび送信元アドレス2B,このレスポンスメッセージを特定するシーケンシャルID(SID)2C,および送信のツール21に送るデータ(レスポンスデータ)2Dからなるフレーム構成になっている。
【0040】
次に、この実施の形態のPLCシステムの動作を、(1)第1のPLC1の動作と、(2)パーソナルコンピュータ2の動作とに分けて説明する。
【0041】
(1)第1のPLC1の動作について
第1のPLC1の動作を図2を参照して説明する。
【0042】
第1のPLC1のコマンド受信手段114aが、パーソナルコンピュータ2からコマンドメッセージを受信すると(図2中の▲1▼参照)、受信したコマンドメッセージを送信先読取り手段114dに出力する(図2中の▲2▼参照)。
【0043】
次に、送信先読取り手段114dは、受けたコマンドメッセージから送信先を読み取り、読み取った送信先を宛先判断手段114eに出力する(図2中の▲3▼参照)。
【0044】
宛先判断手段114eは、信先読取り手段114dから送信先を受けると、宛先を判断し、宛先を第2のPLC1aであると判断した場合には、通信ユニット13にコマンドメッセージを転送し(図2中の4参照)、一方、宛先が自己であると判断した場合には、レスポンス形成手段114bにコマンドメッセージに対するレスポンスメッセージを形成させる指示を出力する(図2中の5参照)。
【0045】
レスポンス形成手段114bは、レスポンスメッセージを形成するように指示を宛先判断手段114eから受けると、レスポンスメッセージを形成し、レスポンス送信手段114cに出力する。
【0046】
レスポンス送信手段114cは、レスポンス送信手段114bまたは第2のPLC1aからのレスポンスメッセージを受けると(図2中の▲6▼,▲7▼参照)、このレスポンスメッセージをパーソナルコンピュータ2に送信する(図2中の▲8▼参照)。
【0047】
(2)パーソナルコンピュータ2の動作について
ここで、パーソナルコンピュータ2の動作について、▲1▼コマンドメッセージを第1のPLC1(CPUユニット11)に送信させる動作と、▲2▼レスポンスメッセージを第1のPLC1(CPUユニット11)から受信する動作に分けて説明する。
【0048】
▲1▼コマンドメッセージを第1のPLC1(CPUユニット11)に送信させる動作について
なお、このコマンドメッセージを送信させる指示を出力したツール21は、#jのツール21とする。
【0049】
パーソナルコンピュータ2の#jのツール21が、所定のノードの送信先(CPUユニット11)に対してコマンドメッセージを送信させる旨の指示と(図6中の▲1▼参照)、コマンドデータ1DをOS22を介して#iの通信ドライバ23に出力すると、#iの通信ドライバ23は、#jのツール21から受けたコマンドデータ1Dを内蔵する#jの送信バッファ231に格納する(図6中の▲2▼参照)。
【0050】
続いて、#iの通信ドライバ23は、送信用ツール対応テーブル27を参照して(図6中の▲3▼参照)、コマンドデータの前にシーケンシャルID1Cを付加し、さらに、このシーケンシャルID1Cの前にこのコマンドデータの送信先のアドレスおよび送信元のアドレス1Bを付加し、さらにまた、これらのアドレス1Bの前にコマンドヘッダ1Aを付加してコマンドメッセージを形成し、この形成したコマンドメッセージを送信バッファ24に格納する(図6中の▲4▼参照)。
【0051】
#iの通信ポート26は、送信バッファ24にコマンドメッセージ24が格納されていると、このコマンドメッセージを読み出し(図6中の▲5▼参照)、コマンドメッセージの送信先宛てに送信する(図6中の▲6▼参照)。
【0052】
▲2▼レスポンスメッセージをPLC1(CPUユニット11)から受信する動作について
ここで、受信したレスポンスメッセージを受けとるツール21は、#kのツールとする。
【0053】
#iの通信ポート26は、レスポンスメッセージを受けると(図6中の▲7▼参照)、このメッセージを受信バッファに格納する(図6中の▲8▼参照)。
【0054】
#iの通信ドライバ23は、受信バッファ25にレスポンスメッセージが格納されると、格納されているレスポンスメッセージを読み出し、レスポンスヘッダが示すメッセージの種別がレスポンスメッセージであると確認すると、次にメッセージから送信先アドレス(#kのツール21のアドレス)および送信元アドレス2Bと、シーケンシャルID2Cとを読み出したのち、送信先のアドレス(#kのツール21のアドレス)を参照して、#kの受信用ツール対応データを受信用ツール対応テーブル28に格納する(図6中の9参照)。
【0055】
#iの通信ドライバ23は、#kの受信用ツール対応データを受信用ツール対応テーブル28に格納すると、レスポンスメッセージからレスポンスヘッダ2A,送信先アドレスおよび送信元アドレス2B、並びにシーケンシャルID2Cを除去し、レスポンスデータを形成し、これを#kの受信バッファ232に格納する(図6中のa参照)。
【0056】
#kのツール21は、OS22を介して、#iの通信ドライバ23に有する#kの受信バッファ232からレスポンスデータを読み出す(図6中のb参照)。
【0057】
この実施形態のPLCシステムでは、パーソナルコンピュータ2が、ツール21から第1のPLC1に対して送信すべき旨の指示を受けると、形成したコマンドメッセージを送信バッファ24に格納し、また、第1のPLC1に送信したコマンドメッセージに対するレスポンスメッセージを受信バッファ25に格納するようにしたことにより、コマンドメッセージに対するレスポンスメッセージを受信しなくても、ツール21の指示に基づきコマンドメッセージを送信することができる。
【0058】
このため、ツール21を稼働させるに際してその作業効率を向上させるとともに、複数のパーソナルコンピュータ2を備える必要をなくしコストを抑えることができる。
【0059】
ここで、第1のPLC1は、パーソナルコンピュータ2から受信したコマンドメッセージから送信先を読み取り、読み取った送信先が自己宛ての場合には、そのコマンドメッセージに基づいた処理を実行し、その後、コマンドメッセージに対するレスポンスメッセージをパーソナルコンピュータ2に送信する。
【0060】
一方、第1のPLC1は、読み取った送信先が第2のPLC1aの場合には、コマンドメッセージを第2のPLC1aに送信し、第2のPLC1aからのレスポンスメッセージを受信すると、受信したレスポンスメッセージをパーソナルコンピュータ2に送信する。
【0061】
本実施形態のPLCシステムでは、上述したような構成を有することにより、パーソナルコンピュータ2とCPUユニット11、および、CPUユニット11および通信ユニット13を介してパーソナルコンピュータ2と他のCPUユニット11との送信処理は、図7に示すようになる。
【0062】
すなわち、パーソナルコンピュータ2が、図7に示すように、最初にCPUユニット11に対してコマンドメッセージ1を送信し、2番目にCPUユニット11および通信ユニット13を介して他のCPUユニット11にコマンドメッセージ2を送信し、3番目にCPUユニット11に対してコマンドメッセージ3を送信した場合には、コマンドメッセージ1に対するレスポンスメッセージ1がCPUユニット11から送信されてきたのち、コマンドメッセージ3に対するレスポンスメッセージ3がCPUユニット11から送信され、最後にコマンドメッセージ2に対するレスポンスメッセージ2が送信されるようになる。
【0063】
因みに、従来のPLCシステムでは、パーソナルコンピュータのツールからコマンドメッセージを受け、それに対するレスポンスメッセージが帰ってこないと、次のコマンドメッセージを送信することができない。
【0064】
従って、パーソナルコンピュータ2とCPUユニット11、および、CPUユニット11および通信ユニット13を介してパーソナルコンピュータ2と他のCPUユニット11との送信処理は、図8に示すようになる。
【0065】
すなわち、パーソナルコンピュータ2は、図8に示すように、最初にCPUユニット11に対してコマンドメッセージ1を送信し、そのコマンドメッセージに対するレスポンスメッセージ1が受信されてきたのち、CPUユニット11および通信ユニット13を介して他のCPUユニット11にコマンドメッセージ2を送信し、それに対するレスポンスメッセージ2が受信される。
【0066】
図9は、図3に示したパーソナルコンピュータ2の機能構成を示す機能ブロック図である。
【0067】
図9において、パーソナルコンピュータ2は、ツールとしてSPMA(Single Port Multiple Access)対応用のSPMAアプリケーション201を有している。この例では、3つのSPMAアプリケーション(1)、(2)、(3)が起動しており、そのうち2つのSPMAアプリケーション(1)、(2)は同じ外部機器、例えば、外部機器100−1〜100−3の内の外部機器100−1に接続され、他のSPMAアプリケーション(3)は別の外部機器、例えば、外部機器100−1〜100−3の内の外部機器100−2に接続されている状態を示している。
【0068】
ここで、外部機器100−1〜100−3は、図1に示した第1のPLC1,第2のPLC1a等に対応する。
【0069】
通信処理部202は、2つのSPMAアプリケーション(1)、(2)に対応して外部機器ID割付およびコマンド割付を行い(処理202−1)、また、SPMAアプリケーション(3)に対応して同様に外部機器ID割付およびコマンド割付を行い(処理202−2)、通信コマンドを生成する(処理202−3)。
【0070】
パソコンハードウェア部203は、パソコン内通信バッファ203−1、パソコン内通信物理ポート203−2を有して構成されており、通信処理部202で生成された通信コマンドをパソコン内通信バッファ203−1に格納し、パソコン内通信物理ポート203−2から外部機器100−1〜100−3に送出する。
【0071】
また、外部機器100−1〜100−3からのレスポンスは、パソコン内通信物理ポート203−2を通して受信し、パソコン内通信バッファ203−1に格納した後、対応するSPMAアプリケーションに返す。
【0072】
図10は、図9に示したパーソナルコンピュータ2の全体動作を示すフローチャートである。
【0073】
図10においては、パーソナルコンピュータ(パソコン)2上でSPMAアプリケーション(SPMA対応アプリ)が複数、具体的には3つのSPMAアプリケーション(SPMAアプリ)(1)、(2)、(3)が起動されている(ステップ211)状態を示している。
【0074】
SPMAアプリ(1)実行中においては(ステップ212)、SPMAアプリ(1)からの要求通信コマンドがあるかを調べ(ステップ213)、ない場合は(ステップ213でNo)、ステップ212に戻るが、あると(ステップ213でYes)、この通信コマンドを通信コマンド管理用スタックに追加する処理1を実行する(ステップ218)。
【0075】
また、SPMAアプリ(2)実行中においては(ステップ214)、SPMAアプリ(2)からの要求通信コマンドがあるかを調べ(ステップ215)、ない場合は(ステップ215でNo)、ステップ214に戻るが、あると(ステップ215でYes)、この通信コマンドを通信コマンド管理用スタックに追加する処理1を実行する(ステップ218)。
【0076】
また、SPMAアプリ(3)実行中においては(ステップ216)、SPMAアプリ(3)からの要求通信コマンドがあるかを調べ(ステップ217)、ない場合は(ステップ217でNo)、ステップ216に戻るが、あると(ステップ217でYes)、この通信コマンドを通信コマンド管理用スタックに追加する処理1を実行する(ステップ218)。
【0077】
そして、パソコン内通信物理ポート203−2からコマンドの送信を行う(ステップ219)。
【0078】
なお、ステップ218の処理1の詳細に付いては、図11に示したフローチャートを参照して後述する。
【0079】
次に、外部機器100−1〜100−3からのレスポンスを受信したかを調べる(ステップ220)。ここで、外部機器100−1〜100−3からのレスポンスを受信していない場合は(ステップ220でNo)、ステップ219に戻るが、外部機器100−1〜100−3からのレスポンスを受信した場合は、対応するコマンド送信元SPMAアプリに受信したレスポンスを返す処理2を実行する(ステップ221)。
【0080】
なお、ステップ221の処理2の詳細に付いては、図12に示したフローチャートを参照して後述する。
【0081】
図11は、図10に示したステップ218の処理1の詳細を示すフローチャートである。
【0082】
図11に示す処理1においては、SPMAアプリ(m)(M=1、2、3)が要求する外部機器に対するコマンドを通信コマンド管理用スタックに登録する処理が開始されると(ステップ231)、まず、SPMAアプリ(m)が要求した外部機器に対して外部機器IDとコマンドIDを割り付け、通信コマンド管理用スタックに登録する(ステップ232)。
【0083】
次に、パソコン2内のパソコン内通信バッファ203−1に通信コマンド管理用スタックの内容を転送する(ステップ233)。そして、パソコン内通信バッファ203−1がいっぱいかを調べ(ステップ234)、いっぱいの場合は(ステップ234でYes)、ステップ233に戻るが、いっぱいでない場合は(ステップ234でNo)、外部機器に対してコマンドIDを割り付けて送信する(ステップ235)。
【0084】
図12は、図10に示したステップ221の処理2の詳細を示すフローチャートである。
【0085】
図12に示す処理2においては、まず、外部機器からのレスポンスの情報に含まれる外部機器IDとそのコマンドIDを解析する(ステップ241)。
【0086】
次に、解析した外部機器IDとコマンドIDから通信コマンド管理用スタックに登録されているSPMAアプリ番号を割り出す(ステップ242)。そして、外部機器からのレスポンス内容を抽出し、送信元SPMAアプリに返す(ステップ243)。
【0087】
なお、この発明のPLCシステムにおいては、図13に示すように、パソコン2の表示画面上で、PLCネームを指定するだけでネットワーク上のPLCと簡単に接続することが可能である。この場合、図13(a)に示すように、パソコン2に直接接続しているPLCだけでなく、図13(b)に示すように、そのPLCを介したネットワーク上のPLCに対してアクセス(リモートプログラミング/モニタリング)するときも、ゲートウェイとなるPLCのPLCネームを指定するだけで簡単に接続することが可能になる。
【0088】
また、リモートネットワーク上のPLCに関するディップスイッチの状態や動作モードなどの情報をパソコン2からPLCネームを指定するだけで収集することも可能である。
【0089】
【発明の効果】
以上説明したように請求項1の発明によれば、第1のプログラマブルコントローラと、この第1のプログラマブルコントローラに接続する第2のプログラマブルコントローラと、上記第1のプログラマブルコントローラに接続するパーソナルコンピュータとで構築されたプログラマブルコントローラシステムにおいて、上記第1のプログラマブルコントローラは、上記パーソナルコンピュータから送信されてきたコマンドメッセージが、自己宛てのコマンドメッセージである場合には、このコマンドメッセージに対するレスポンスメッセージを上記パーソナルコンピュータに送信し、一方、上記第2のプログラマブルコントローラ宛てのコマンドメッセージである場合には、上記第2のプログラマブルコントローラに送信し、この第2のプログラマブルコントローラから送信されてきたレスポンスメッセージを上記パーソナルコンピュータに送信するように構成したので、パーソナルコンピュータは、該パーソナルコンピュータに直接接続された第1のプログラマブルコントローラとだけでなく、第1のプログラマブルコントローラを介してパーソナルコンピュータに接続された第2のプログラマブルコントローラとも同様に通信を行うことができる。
【0090】
また、請求項2の発明によれば、第2のプログラマブルコントローラと、パーソナルコンピュータとを接続するプログラマブルコントローラにおいて、上記パーソナルコンピュータから受信したコマンドメッセージから送信先を読み取とる送信先読取り手段と、この送信先読取り手段で読み取った送信先が自己宛てであるか、または、上記第2のプログラマブルコントローラかを判断する送信先判断手段と、この送信先判断手段が読み取った送信先が自己宛ての場合には、そのコマンドメッセージに対するレスポンスメッセージを上記パーソナルコンピュータに送信し、一方、読み取った送信先が上記第2のプログラマブルコントローラの場合には、上記コマンドメッセージを上記第2のプログラマブルコントローラに送信し、この上記第2のプログラマブルコントローラからのレスポンスメッセージを受信すると、受信したレスポンスメッセージを上記パーソナルコンピュータに送信するメッセージ送信手段とを具備して構成したので、パーソナルコンピュータと通信するだけでなく、第2のプログラマブルコントローラとパーソナルコンピュータとの通信を可能にすることができる。
【0091】
また、請求項3および4の発明においては、プログラマブルコントローラに対してデータの設定やデータのモニタリング処理させるツールを有するパーソナルコンピュータにおいて、上記データの設定やデータのモニタリング処理させるためのコマンドメッセージを格納するコマンドメッセージ格納手段と、上記コマンドメッセージに対する上記プログラマブルコントローラからレスポンスメッセージを格納するレスポンス格納手段と、上記ツールから上記プログラマブルコントローラに対して送信すべき旨の指示を受けると、そのコマンドメッセージを形成するコマンドメッセージ形成手段と、上記データの設定やデータのモニタリング処理させるためのコマンドメッセージを、上記プログラマブルコントローラに対して送信すべきであるとの指示を上記ツールから受けると、そのコマンドメッセージを形成し、これを上記コマンドメッセージ格納手段に格納させ、また、上記コマンドメッセージに対するレスポンスメッセージを上記レスポンス格納手段から読み出し、レスポンスメッセージの内容を示すレスポンスデータを形成し、これを上記ツールに出力するデータ形成手段とを具備して構成したので、パーソナルコンピュータは、直接接続された第1のプログラマブルコントローラとだけでなく、第1のプログラマブルコントローラを介してパーソナルコンピュータに接続された第2のプログラマブルコントローラとも同様に通信を行うことができる。また、パーソナルコンピュータが、ツールからPLCに対して送信すべき旨の指示を受けると、形成したコマンドメッセージを送信バッファに格納し、また、PLCに送信したコマンドメッセージに対するレスポンスメッセージを受信バッファに格納するように構成したので、コマンドメッセージに対するレスポンスメッセージを受信しなくても、ツールの指示に基づきコマンドメッセージを送信することができる。従って、ツールを稼働させるに際してその作業効率を向上させるとともに、複数のパーソナルコンピュータを備える必要をなくしコストを抑えることができる。
【0092】
また、請求項5の発明においては、第2のプログラマブルコントローラと、パーソナルコンピュータとを接続するプログラマブルコントローラの通信方法において、上記パーソナルコンピュータから受信したコマンドメッセージから送信先を読み取り、読み取った送信先が自己宛ての場合には、そのコマンドメッセージに対するレスポンスメッセージを上記パーソナルコンピュータに送信し、一方、読み取った送信先が第2のプログラマブルコントローラの場合には、上記コマンドメッセージを上記第2のプログラマブルコントローラに送信し、この上記第2のプログラマブルコントローラからのレスポンスメッセージを受信すると、受信したレスポンスメッセージをパーソナルコンピュータに送信するように構成したので、パーソナルコンピュータと通信するだけでなく、第2のプログラマブルコントローラとパーソナルコンピュータとの通信を可能にすることができる。
【0093】
また、請求項6および7の発明においては、プログラマブルコントローラに対してデータの設定やデータのモニタリング処理させるコマンドメッセージを送信するパーソナルコンピュータの通信方法において、上記ツールから上記プログラマブルコントローラに対して送信すべき旨の指示を受けると、そのコマンドメッセージを形成し、これを送信バッファに格納したのち送信し、上記プログラマブルコントローラに送信したコマンドメッセージに対するレスポンスメッセージを受信バッファから読み出し、この読み出したレスポンスデータを上記ツールが理解できるレスポンスデータに形成し、この形成したレスポンスデータを上記ツールに出力するように構成したので、パーソナルコンピュータは、直接接続された第1のプログラマブルコントローラとだけでなく、第1のプログラマブルコントローラを介してパーソナルコンピュータに接続された第2のプログラマブルコントローラとも同様に通信を行うことができ、またコマンドメッセージに対するレスポンスメッセージを受信しなくても、ツールの指示に基づきコマンドメッセージを送信することができるので、ツールを稼働させるに際してその作業効率を向上させるとともに、複数のパーソナルコンピュータを備える必要をなくしコストを抑えることができる。
【図面の簡単な説明】
【図1】この発明に係るプログラマブルロジックコントローラシステムの一実施形態を示すブロック図。
【図2】図1中の通信処理プログラムメモリに格納されている通信処理プログラムメモリの構成を示すブロック図。
【図3】図1中のパーソナルコンピュータの構成を示すブロック図。
【図4】図2中の送信用ツール対応テーブルの内容を説明する説明図。
【図5】コマンドメッセージおよびレスポンスメッセージのフレーム構成図。
【図6】図1中のパーソナルコンピュータの動作を説明する説明図。
【図7】この実施形態のプログラマブルロジックコントローラシステムにおける送信手順を示すプロトコル図。
【図8】従来のプログラマブルロジックコントローラシステムにおける送信手順を示すプロトコル図。
【図9】図3に示したパーソナルコンピュータの機能構成を示す機能ブロック図。
【図10】図9に示したパーソナルコンピュータの全体動作を示すフローチャート。
【図11】図10に示した処理1の詳細を示すフローチャート。
【図12】図10に示した処理2の詳細を示すフローチャート。
【図13】図1中のパーソナルコンピュータの表示画面の一例を示す図。
【図14】従来のプログラマブルロジックコントローラシステムの一実施形態を示すブロック図。
【図15】従来のプログラマブルロジックコントローラシステムの一実施形態を示すブロック図。
【符号の説明】
1,1a プログラマブルコントローラ
11 CPUユニット
111 マイクロコンピュータ
112 バスASIC
113 メモリ
114 通信処理プログラム格納メモリ
12 高機能ユニット
121 マイクロコンピュータ
122 バスASIC
123 メモリ
13 通信ユニット
131 マイクロコンピュータ
132 バスASIC
133 メモリ
14 システムバス
2 パーソナルコンピュータ
21 ツール
22 OS
23 通信ドライバ
24 送信バッファ
25 受信バッファ
26 通信ポート
27 送信用ツール対応テーブル
28 受信用ツール対応テーブル
3 ツールケーブル
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a programmable controller system configured with a plurality of programmable controllers and a personal computer.
[0002]
[Prior art]
In recent years, a programmable controller that controls a sensor, an actuator, and the like includes a high-performance I / O unit 60 including a CPU unit 50 and an NC unit connected to the CPU unit 50 via a system bus 90, as shown in FIG. And a communication unit 70 for transmitting and receiving data to and from other communication units.
[0003]
The CPU unit 50 controls the high-performance I / O unit 60 and the communication unit 70 provided on the rack, and is a tool (application software) for setting data via the tool cable 100. It is connected to a personal computer 80 that runs a tool 2 (application software) for executing monitoring in the / O unit 60.
[0004]
The high-performance I / O unit 60 performs special control, for example, NC control, PID control, and the like.
[0005]
The communication unit 70 transmits and receives data to and from another CPU unit 50 or the high-performance I / O unit 60 serving as another node.
[0006]
[Problems to be solved by the invention]
In the above-described conventional programmable controller, the personal computer 80 connected to the CPU unit 50 operates the tool 1 for setting data in the CPU unit 50 or the tool 2 (application software) for executing monitoring by the high-performance I / O unit 60. However, since a plurality of applications cannot be simultaneously communicated with the CPU unit 50 on the personal computer 80, if it is desired to operate the tool 2 while the tool 1 is operating, the tool In this case, the operation of the tool 2 must be stopped before the tool 2 must be operated, resulting in a problem that the working efficiency is low.
[0007]
As shown in FIG. 15, when the personal computer 90 is further connected to the high-function unit 60 and the tool 2 for executing the monitoring by the high-function I / O unit 60 is executed, the above-described problem is solved. However, there is a problem that an extra personal computer is required and the cost of the apparatus is increased.
[0008]
SUMMARY OF THE INVENTION In view of the above problems, an object of the present invention is to provide a programmable controller system that improves work efficiency and reduces equipment costs when operating a predetermined tool.
[0009]
[Means for Solving the Problems]
In order to achieve the above object, according to the present invention, when a personal computer receives an instruction to transmit to a programmable controller from a tool, the personal computer stores the formed command message in a transmission buffer and transmits the command message to the programmable controller. Since the response message corresponding to the command message is stored in the reception buffer, the command message can be transmitted based on the instruction of the tool without receiving the response message to the command message.
[0010]
Further, according to the present invention, the programmable controller reads a destination from a command message received from a personal computer, and executes a process based on the command message when the read destination is addressed to itself, and thereafter, executes the command message. To the personal computer.
[0011]
On the other hand, if the read destination is the second programmable controller, the programmable controller transmits a command message to the second programmable controller, and upon receiving a response message from the second programmable controller, Send the message to a personal computer.
[0012]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, a programmable logic controller system according to the present invention will be described with reference to the drawings.
[0013]
FIG. 1 is a block diagram showing one embodiment of a programmable logic controller system according to the present invention.
[0014]
A programmable logic controller system (hereinafter, referred to as a PLC system) according to this embodiment includes a first programmable controller (hereinafter, referred to as a first PLC) 1 and a second programmable controller that control devices to be controlled such as sensors and actuators. (Hereinafter, referred to as a second PLC) 1a, and a personal computer (hereinafter, referred to as a personal computer) 2 that runs a tool described later.
[0015]
The first PLC 1 includes a CPU unit 11, a high-performance unit 12, and a communication unit 13, which are connected to a system bus 14 including a data bus, an address bus, and the like.
[0016]
The CPU unit 11 controls the high-performance I / O unit 12 and the communication unit 13 provided on the rack, and is connected to the personal computer 2 via the tool cable 3 to execute predetermined processing of the tool received from the personal computer 2. It is supposed to.
[0017]
This CPU unit 11 Is the CPU unit 11 A microcomputer (microcomputer) 111 for controlling itself, a microcomputer bus ASIC 112 for interfacing the microcomputer 111 to access each of the units 12 and 13 via the system bus 14, and data received from a tool (hereinafter, command message And a communication processing program memory 114 for storing a communication processing program for performing communication processing, and a memory 113 for storing a plurality of transmission data (referred to as a response message) to be transmitted to the tool. ing.
[0018]
As shown in FIG. 2, the communication processing program is formed by a command receiving unit 114a that receives a command message received from the personal computer 2, a response forming unit 114b that forms a response message to the command message, and a response forming unit 114b. A response transmitting unit 114c for transmitting a response message to the personal computer 2, a destination reading unit 114d for reading a destination from the command message received by the command receiving unit 114a, and a destination of the transmitting unit read by the destination reading unit 114d. If it is determined that the destination is the second PLC 1a, the command message is transferred to the communication unit 13. On the other hand, if it is determined that the destination is itself, the response forming unit 11 is determined. And a destination determining unit 114e for outputting an instruction to form a response message to the command message to b.
[0019]
The high-performance I / O unit 12 is a unit for performing special control, for example, an NC unit, and includes a microcomputer (microcomputer) 121 for controlling the high-performance I / O unit itself, a system bus 14, and The configuration includes a bus ASIC 122 for performing an interface, and a memory 123 for storing a command transmitted from the CPU unit 11 and a response transmitted to the CPU unit 11.
[0020]
The communication unit 13 transmits the command message received from the CPU unit 11 to a communication unit of another connected node, receives a response to the command message, and transmits the response to the CPU unit 11. And a microcomputer (microcomputer) 131 for controlling the communication unit itself, a bus ASIC 132 for interfacing the system bus 14 with this unit, and commands transmitted from the CPU unit 11 and transmitted to the CPU unit 11. And a memory 133 for storing a response message.
[0021]
The personal computer 2 is capable of displaying a plurality of windows on a display screen, and uses this window to provide a plurality of tools 21 (application software) (# 1 tool 21 and # 2 tool 21 in the drawing). Is to be executed.
[0022]
As shown in FIG. 3, the personal computer 2 includes tools 21 of # 1 to #n, an OS (Operating System) 22, communication drivers 23 of # 1 to #m, and a transmission provided for each communication driver 23. It comprises a buffer 24 and a reception buffer 25, a communication port 26 provided for each communication driver 23, a transmission tool correspondence table 27 described later, and a reception tool correspondence table 28 described later.
[0023]
Some of the tools 21 # 1 to #n allow the CPU unit 11 to set a predetermined data value, and others allow the CPU unit 11 to monitor a device to be controlled controlled by the high-performance I / O unit 12.
[0024]
The OS 22 is an OS used in a commercially available personal computer, for example, Windows 95 / NT, and performs time sharing of execution of a plurality of tasks (software) so that it is as if the tasks are being executed at the same time. It has become.
[0025]
The communication drivers 23 of # 1 to #m form a command message having a frame structure according to the protocol when transmitting the command message to a predetermined node based on the instruction of the tool 21 of #i, The command message is transmitted to the transmission buffer 24.
[0026]
When receiving the response message addressed to the tool 21 of #j from the reception buffer 25, the communication drivers # 1 to #m form message data from the received response message and output the message data to the tool 21 of #j. It is supposed to.
[0027]
The processing for forming the command message by the communication drivers # 1 to #m and the processing for forming the message data from the received response message will be described later in detail.
[0028]
The transmission buffer 24 temporarily stores a command message including a frame conforming to a communication protocol formed by the communication driver 23 until the command message is transmitted.
[0029]
The reception buffer 25 temporarily stores a response message received from another node.
[0030]
The communication ports 26 of # 1 to #m are paired with the communication driver 23, and an I / F for connecting to an external device generally possessed by a personal computer, or an extension board connected to a personal computer. It has a serial I / F (such as RS232C) composed of an I / F that connects to an external device that has been incorporated and expanded.
[0031]
As shown in FIG. 4A, the transmission tool correspondence table 27 includes a tool 21 for transmitting a command message when a command message is transmitted, and a command message generated by the communication driver 23 based on an instruction of the tool 21. And a transmission tool correspondence data having a sequential ID which is a value for identifying the transmission tool.
[0032]
The sequential ID is determined in a range of values that can be taken for each tool 21, for example, a range of 10. This means that if the command message formed by the communication driver 23 cannot be transmitted, the number of retries that can form and transmit the same command message is defined.
[0033]
By the way, the data corresponding to the transmission tool marked with A is driver 23 so The formed command message is based on the instruction from the tool # 2, and the number of retries But 0 is shown.
[0034]
As shown in FIG. 4B, when the response message is received, the reception tool correspondence table 28 indicates the tool 21 to which the received response message is to be output, the message ID for identifying the received response message, and Is stored for the receiving tool.
[0035]
By the way, in the reception tool corresponding data marked with B, the destination of the response message received by the communication driver 23 is that of the tool 21 of # 4, and the number of retries until the response message is received is 3. It is shown that.
[0036]
Here, the frame configuration of the command message and the response message will be described.
[0037]
FIG. 5 is a frame configuration diagram showing the frame configurations of the command message and the response message.
[0038]
As shown in FIG. 5A, the command message includes a command header 1A for specifying the type of the message, a destination address and a source address 1B, a sequential ID (SID) 1C for specifying the command message, and a destination. It has a frame configuration consisting of data (command data) 1D to be sent.
[0039]
As shown in FIG. 5B, the response message includes a response header 2A for specifying the type of the message, a destination address and a source address 2B, a sequential ID (SID) 2C for specifying the response message, and a transmission. Destination Tool 21 send It has a frame configuration composed of data (response data) 2D.
[0040]
Next, the operation of the PLC system according to this embodiment will be described by dividing into (1) the operation of the first PLC 1 and (2) the operation of the personal computer 2.
[0041]
(1) Operation of first PLC 1
The operation of the first PLC 1 will be described with reference to FIG.
[0042]
When the command receiving unit 114a of the first PLC 1 receives a command message from the personal computer 2 (see (1) in FIG. 2), it outputs the received command message to the destination reading unit 114d ((1) in FIG. 2). See 2 ▼).
[0043]
Next, the destination reading means 114d reads the destination from the received command message, and outputs the read destination to the destination determining means 114e (see (3) in FIG. 2).
[0044]
The destination determining means 114e Sending Upon receiving the destination from the destination reading means 114d, the destination is determined. If the destination is determined to be the second PLC 1a, a command message is transferred to the communication unit 13 (see 4 in FIG. 2). On the other hand, the destination is self Is When it is determined that the response message is generated, the response forming unit 114b outputs an instruction to form a response message to the command message (see 5 in FIG. 2).
[0045]
When receiving an instruction to form a response message from the destination determining unit 114e, the response forming unit 114b forms a response message and outputs it to the response transmitting unit 114c.
[0046]
Upon receiving the response message from the response transmission unit 114b or the second PLC 1a (see (6) and (7) in FIG. 2), the response transmission unit 114c transmits this response message to the personal computer 2 (FIG. 2). See (8) in the figure).
[0047]
(2) Operation of personal computer 2
Here, regarding the operation of the personal computer 2, (1) an operation of transmitting a command message to the first PLC 1 (CPU unit 11) and (2) an operation of receiving a response message from the first PLC 1 (CPU unit 11). Will be described separately.
[0048]
(1) Operation for transmitting command message to first PLC 1 (CPU unit 11)
Note that the tool 21 that has output the instruction to transmit the command message is the tool 21 of #j.
[0049]
The tool 21 of #j of the personal computer 2 issues an instruction to transmit a command message to the destination (CPU unit 11) of a predetermined node (see (1) in FIG. 6), and transmits the command data 1D to the OS 22. When the command data is output to the #i communication driver 23 via #, the #i communication driver 23 stores the command data 1D received from the #j tool 21 in the built-in #j transmission buffer 231 (▲ in FIG. 6). See 2 ▼).
[0050]
Subsequently, the communication driver #i refers to the transmission tool correspondence table 27 (see (3) in FIG. 6), adds the sequential ID 1C before the command data, and further adds the sequential ID 1C before the command data. To the destination address and the source address 1B of this command data, and further, a command header 1A is added before these addresses 1B to form a command message, and the formed command message is transmitted to a transmission buffer. 24 (see (4) in FIG. 6).
[0051]
When the command message 24 is stored in the transmission buffer 24, the communication port 26 of #i reads the command message (see (5) in FIG. 6) and transmits the command message to the transmission destination of the command message (FIG. 6). (See 6 in the figure).
[0052]
(2) Operation for receiving response message from PLC 1 (CPU unit 11)
Here, the tool 21 that receives the received response message is a tool of #k.
[0053]
When receiving the response message (see (7) in FIG. 6), the communication port 26 of #i stores this message in the reception buffer (see (8) in FIG. 6).
[0054]
When the response message is stored in the reception buffer 25, the communication driver 23 of #i reads the stored response message, confirms that the type of the message indicated by the response header is the response message, and then transmits the message from the message. After reading out the destination address (address of the tool 21 of #k), the source address 2B, and the sequential ID 2C, refer to the address of the destination (the address of the tool 21 of #k) to receive the tool of the reception of #k. Correspondence The data is stored in the reception tool correspondence table 28 (see 9 in FIG. 6).
[0055]
When the communication driver 23 of #i stores the reception tool correspondence data of #k in the reception tool correspondence table 28, the communication driver 23 removes the response header 2A, the transmission destination address and the transmission source address 2B, and the sequential ID 2C from the response message. The response data is formed and stored in the #k reception buffer 232 (see a in FIG. 6).
[0056]
The #k tool 21 reads the response data from the #k reception buffer 232 included in the #i communication driver 23 via the OS 22 (see b in FIG. 6).
[0057]
In the PLC system of this embodiment, when the personal computer 2 receives an instruction from the tool 21 to transmit to the first PLC 1, the personal computer 2 stores the formed command message in the transmission buffer 24, and By storing the response message to the command message transmitted to the PLC 1 in the reception buffer 25, the command message can be transmitted based on the instruction of the tool 21 without receiving the response message to the command message.
[0058]
For this reason, when the tool 21 is operated, the work efficiency can be improved, and it is not necessary to provide a plurality of personal computers 2, and the cost can be reduced.
[0059]
Here, the first PLC 1 reads the transmission destination from the command message received from the personal computer 2, and if the read transmission destination is addressed to itself, executes processing based on the command message. Is transmitted to the personal computer 2.
[0060]
On the other hand, when the read destination is the second PLC 1a, the first PLC 1 transmits a command message to the second PLC 1a, and upon receiving a response message from the second PLC 1a, the first PLC 1 The data is transmitted to the personal computer 2.
[0061]
In the PLC system of the present embodiment, by having the above-described configuration, transmission between the personal computer 2 and the CPU unit 11 and between the personal computer 2 and the other CPU unit 11 via the CPU unit 11 and the communication unit 13 are performed. The processing is as shown in FIG.
[0062]
That is, as shown in FIG. 7, the personal computer 2 first transmits the command message 1 to the CPU unit 11, and secondly transmits the command message to the other CPU units 11 via the CPU unit 11 and the communication unit 13. When the command message 3 is transmitted to the CPU unit 11 for the third time, the response message 1 for the command message 1 is transmitted from the CPU unit 11 and then the response message 3 for the command message 3 is transmitted. Sent from the CPU unit 11 and finally responds to the command message 2. Response message 2 will be transmitted.
[0063]
Incidentally, in the conventional PLC system, a command message is received from a tool of a personal computer, and the next command message cannot be transmitted unless a response message corresponding thereto is returned.
[0064]
Accordingly, the transmission process between the personal computer 2 and the CPU unit 11 and between the personal computer 2 and the other CPU unit 11 via the CPU unit 11 and the communication unit 13 are as shown in FIG.
[0065]
That is, as shown in FIG. 8, the personal computer 2 first transmits the command message 1 to the CPU unit 11 and, after the response message 1 to the command message is received, the CPU unit 11 and the communication unit 13. The command message 2 is transmitted to the other CPU unit 11 via the CPU 2 and the response message 2 corresponding thereto is received.
[0066]
FIG. 9 is a functional block diagram showing a functional configuration of the personal computer 2 shown in FIG.
[0067]
In FIG. 9, the personal computer 2 has an SPMA application 201 for SPMA (Single Port Multiple Access) as a tool. In this example, three SPMA applications (1), (2), and (3) are running, and two SPMA applications (1) and (2) are the same external device, for example, the external devices 100-1 to 100-1. The other SPMA application (3) is connected to another external device, for example, the external device 100-2 among the external devices 100-1 to 100-3. It shows the state that it is.
[0068]
Here, the external devices 100-1 to 100-3 correspond to the first PLC 1, the second PLC 1a, and the like shown in FIG.
[0069]
The communication processing unit 202 performs external device ID assignment and command assignment in accordance with the two SPMA applications (1) and (2) (process 202-1), and similarly in response to the SPMA application (3). The external device ID is assigned and the command is assigned (process 202-2), and a communication command is generated (process 202-3).
[0070]
The personal computer hardware unit 203 includes a personal computer communication buffer 203-1 and a personal computer communication physical port 203-2, and transmits a communication command generated by the communication processing unit 202 to the personal computer communication buffer 203-1. And sends it to the external devices 100-1 to 100-3 from the communication physical port 203-2 in the personal computer.
[0071]
Responses from the external devices 100-1 to 100-3 are received through the communication physical port 203-2 in the personal computer, stored in the communication buffer 203-1 in the personal computer, and returned to the corresponding SPMA application.
[0072]
FIG. 10 is a flowchart showing the overall operation of the personal computer 2 shown in FIG.
[0073]
In FIG. 10, a plurality of SPMA applications (SPMA applications), specifically three SPMA applications (SPMA applications) (1), (2), and (3) are activated on a personal computer (PC) 2. (Step 211).
[0074]
While the SPMA application (1) is being executed (step 212), it is checked whether there is a request communication command from the SPMA application (1) (step 213). If not (No in step 213), the process returns to step 212. If there is (Yes in step 213), processing 1 for adding this communication command to the communication command management stack is executed (step 218).
[0075]
While the SPMA application (2) is being executed (step 214), it is checked whether or not there is a request communication command from the SPMA application (2) (step 215). If not (No in step 215), the process returns to step 214. If there is any (Yes in step 215), processing 1 for adding this communication command to the communication command management stack is executed (step 218).
[0076]
While the SPMA application (3) is being executed (step 216), it is checked whether there is a request communication command from the SPMA application (3) (step 217). If not (step 217: No), the process returns to step 216. If there is (YES in step 217), processing 1 for adding this communication command to the communication command management stack is executed (step 218).
[0077]
Then, a command is transmitted from the communication physical port 203-2 in the personal computer (step 219).
[0078]
The details of the processing 1 in step 218 will be described later with reference to the flowchart shown in FIG.
[0079]
Next, it is checked whether responses from the external devices 100-1 to 100-3 have been received (step 220 ). If no response has been received from the external devices 100-1 to 100-3 (step 220 No), the process returns to step 219. If responses are received from the external devices 100-1 to 100-3, processing 2 for returning the received response to the corresponding command transmission source SPMA application is executed (step 219). 221 ).
[0080]
Note that step 221 For details of process 2 of 12 This will be described later with reference to the flowchart shown in FIG.
[0081]
FIG. 11 is a flowchart showing details of the processing 1 in step 218 shown in FIG.
[0082]
In the process 1 shown in FIG. 11, when the process of registering a command for an external device requested by the SPMA application (m) (M = 1, 2, 3) in the communication command management stack is started (step 231), First, an external device ID and a command ID are assigned to the external device requested by the SPMA application (m), and registered in the communication command management stack (step 232).
[0083]
Next, the contents of the communication command management stack are transferred to the communication buffer 203-1 in the personal computer 2 (step 233). Then, it is checked whether the communication buffer 203-1 in the personal computer is full (step 234). If it is full (Yes in step 234), the process returns to step 233. If not (No in step 234), the external device Then, a command ID is allocated and transmitted (step 235).
[0084]
FIG. 12 is a flowchart showing details of the process 2 in step 221 shown in FIG.
[0085]
In the process 2 shown in FIG. 12, first, the external device ID and its command ID included in the information of the response from the external device are analyzed (step 241).
[0086]
Next, the SPMA application number registered in the communication command management stack is determined from the analyzed external device ID and command ID (step 242). Then, the content of the response from the external device is extracted and returned to the source SPMA application (step 243).
[0087]
In the PLC system of the present invention, as shown in FIG. 13, it is possible to easily connect to a PLC on a network simply by specifying a PLC name on the display screen of the personal computer 2. In this case, not only the PLC directly connected to the personal computer 2 as shown in FIG. 13A, but also the PLC on the network via the PLC as shown in FIG. When performing remote programming / monitoring, it is possible to easily connect simply by specifying the PLC name of the PLC serving as the gateway.
[0088]
It is also possible to collect information such as the status of the dip switch and the operation mode of the PLC on the remote network by simply designating the PLC name from the personal computer 2.
[0089]
【The invention's effect】
As described above, according to the first aspect of the present invention, the first programmable controller, the second programmable controller connected to the first programmable controller, and the personal computer connected to the first programmable controller In the constructed programmable controller system, when the command message transmitted from the personal computer is a command message addressed to itself, the first programmable controller sends a response message to the command message to the personal computer. If the command message is a command message addressed to the second programmable controller, the command message is transmitted to the second programmable controller, and the second Since the response message transmitted from the ramable controller is configured to be transmitted to the personal computer, the personal computer is connected not only to the first programmable controller directly connected to the personal computer but also to the first programmable controller. Can also communicate with the second programmable controller connected to the personal computer via the PC.
[0090]
According to the second aspect of the present invention, in the programmable controller for connecting the second programmable controller and the personal computer, a destination reading means for reading a destination from a command message received from the personal computer; A destination determining means for determining whether the destination read by the destination reading means is addressed to itself, or whether the destination is the second programmable controller; and if the destination read by the destination determining means is addressed to itself, Transmitting a response message to the command message to the personal computer, while transmitting the command message to the second programmable controller when the read destination is the second programmable controller; 2 When a response message from the programmable controller is received, the personal computer is configured to include a message transmitting means for transmitting the received response message to the personal computer. Communication with the server can be enabled.
[0091]
According to the third and fourth aspects of the present invention, a command message for causing the programmable controller to perform data setting and data monitoring processing is stored in a personal computer having a tool for performing data setting and data monitoring processing. Command message storage means, response storage means for storing a response message from the programmable controller for the command message, and a command for forming the command message when receiving an instruction from the tool to transmit to the programmable controller A message forming means and a command message for performing the data setting and the data monitoring processing should be transmitted to the programmable controller. When the command is received from the tool, a command message is formed, the command message is stored in the command message storage means, and a response message to the command message is read from the response storage means, and a response indicating the content of the response message is displayed. Since the personal computer is configured to include data forming means for forming data and outputting the data to the tool, the personal computer can be connected not only with the directly connected first programmable controller but also via the first programmable controller. Communication can be performed similarly with the second programmable controller connected to the personal computer. When the personal computer receives an instruction from the tool to transmit to the PLC, the personal computer stores the formed command message in the transmission buffer, and stores a response message to the command message transmitted to the PLC in the reception buffer. With this configuration, the command message can be transmitted based on the instruction of the tool without receiving a response message to the command message. Therefore, the operation efficiency of the tool can be improved when operating the tool, and the cost can be reduced by eliminating the need for providing a plurality of personal computers.
[0092]
Further, in the communication method of the programmable controller for connecting the second programmable controller and the personal computer, the destination is read from the command message received from the personal computer, and the read destination is a When the destination is the destination, the response message to the command message is transmitted to the personal computer. On the other hand, when the read destination is the second programmable controller, the command message is transmitted to the second programmable controller. When the response message from the second programmable controller is received, the received response message is transmitted to the personal computer. In addition to communicating with Yuta, it is possible to enable communication with the second programmable controller and personal computer.
[0093]
According to a sixth aspect of the present invention, in the personal computer communication method for transmitting a command message for causing the programmable controller to perform data setting and data monitoring processing, the tool should transmit the command message to the programmable controller. When the command message is received, the command message is formed, the command message is stored in the transmission buffer and then transmitted, a response message to the command message transmitted to the programmable controller is read from the reception buffer, and the read response data is stored in the tool. Is formed into response data that can be understood by the user, and the formed response data is output to the tool. Controller can communicate with the second programmable controller connected to the personal computer via the first programmable controller in the same manner, and without receiving a response message to the command message, the Since the command message can be transmitted based on the instruction, the operation efficiency of the tool can be improved when operating the tool, and the need for having a plurality of personal computers can be eliminated and the cost can be reduced.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an embodiment of a programmable logic controller system according to the present invention.
FIG. 2 is a block diagram showing a configuration of a communication processing program memory stored in the communication processing program memory in FIG. 1;
FIG. 3 is an exemplary block diagram showing the configuration of the personal computer shown in FIG. 1;
FIG. 4 is an explanatory diagram for explaining the contents of a transmission tool correspondence table in FIG. 2;
FIG. 5 is a frame configuration diagram of a command message and a response message.
FIG. 6 is an explanatory diagram illustrating an operation of the personal computer in FIG. 1;
FIG. 7 is a protocol diagram showing a transmission procedure in the programmable logic controller system of the embodiment.
FIG. 8 is a protocol diagram showing a transmission procedure in a conventional programmable logic controller system.
FIG. 9 is a functional block diagram showing a functional configuration of the personal computer shown in FIG. 3;
FIG. 10 is an exemplary flowchart showing the entire operation of the personal computer shown in FIG. 9;
FIG. 11 is a flowchart showing details of processing 1 shown in FIG. 10;
FIG. 12 is a flowchart showing details of a process 2 shown in FIG. 10;
FIG. 13 is an exemplary view showing an example of a display screen of the personal computer in FIG. 1;
FIG. 14 is a block diagram showing an embodiment of a conventional programmable logic controller system.
FIG. 15 is a block diagram showing an embodiment of a conventional programmable logic controller system.
[Explanation of symbols]
1,1a Programmable controller
11 CPU unit
111 microcomputer
112 Bus ASIC
113 memory
114 Communication processing program storage memory
12 High function unit
121 microcomputer
122 Bus ASIC
123 memory
13 Communication unit
131 Microcomputer
132 Bus ASIC
133 memory
14 System bus
2 Personal computer
21 Tools
22 OS
23 Communication Driver
24 Transmission buffer
25 Receive buffer
26 Communication port
27 Transmission Tool Correspondence Table
28 Receiving tool correspondence table
3 Tool cable

Claims (2)

プログラマブルコントローラに対してデータの設定やデータのモニタリングを実行させる複数のツールを有するパーソナルコンピュータにおいて、In a personal computer having a plurality of tools for making a programmable controller execute data setting and data monitoring,
上記複数のツールの各ツール番号とメッセージを識別するシーケンシャルIDとを対応させて格納するツール対応テーブルと、A tool correspondence table for storing a tool ID of each of the plurality of tools and a sequential ID for identifying a message in association with each other;
上記複数のツールから出力されたコマンドデータを受け付けて、各コマンドデータに該コマンドデータの送信先を示す送信先アドレスと該コマンドデータを識別するシーケンシャルIDを付加したコマンドメッセージを形成するコマンドメッセージ形成手段と、Command message forming means for receiving command data output from the plurality of tools and forming a command message in which a transmission destination address indicating a transmission destination of the command data and a sequential ID for identifying the command data are added to each command data. When,
上記コマンドメッセージ形成手段で形成されたコマンドメッセージを格納するコマンドメッセージ格納手段と、Command message storage means for storing the command message formed by the command message formation means,
上記コマンドメッセージ格納手段に格納されたコマンドメッセージを読み出して、該コマンドメッセージに含まれる送信先アドレスのプログラマブルコントローラ宛てに該コマンドメッセージを送信し、該送信したコマンドメッセージに対するプログラマブルコントローラからのレスポンスメッセージを受信するメッセージ通信手段と、The command message stored in the command message storage unit is read, the command message is transmitted to the programmable controller at the transmission destination address included in the command message, and a response message from the programmable controller to the transmitted command message is received. Message communication means,
上記メッセージ通信手段で受信したレスポンスメッセージを格納するレスポンスメッセージ格納手段と、Response message storage means for storing a response message received by the message communication means,
上記レスポンスメッセージ格納手段に格納されたレスポンスメッセージを読み出して、該レスポンスメッセージに含まれるシーケンシャルIDと上記ツール対応テーブルのツール番号およびシーケンシャルIDとに基づいて、送信先のツール番号を取得して該送信先のツール宛てに出力するレスポンスデータを形成するレスポンスデータ形成手段と、The response message stored in the response message storage unit is read, and a tool number of a transmission destination is acquired based on the sequential ID included in the response message and the tool number and the sequential ID of the tool correspondence table, and the transmission is performed. Response data forming means for forming response data to be output to the previous tool;
を具備し、With
上記送信したコマンドメッセージに対するレスポンスメッセージを受信しなくても、上記ツールから出力されたコマンドデータを受け付けてコマンドメッセージを送信するEven if a response message to the transmitted command message is not received, the command data output from the tool is accepted and the command message is transmitted.
ことを特徴とするパーソナルコンピュータ。A personal computer, characterized in that:
共通の通信ポートを介して接続されたプログラマブルコントローラに対してデータの設定やデータのモニタリングを実行させる複数のツールを稼働するパーソナルコンピュータの通信方法において、In a communication method of a personal computer that operates a plurality of tools for executing data setting and data monitoring for a programmable controller connected through a common communication port,
上記複数のツールの各ツール番号とメッセージを識別するシーケンシャルIDとを対応させて格納し、The tool number of each of the plurality of tools is stored in association with a sequential ID for identifying a message,
上記複数のツールから出力されたコマンドデータを受け付けて、各コマンドデータに該コマンドデータの送信先を示す送信先アドレスと該コマンドデータを識別するシーケンシャルIDを付加したコマンドメッセージを形成して格納し、Receiving command data output from the plurality of tools, forming and storing a command message in which a transmission destination address indicating a transmission destination of the command data and a sequential ID for identifying the command data are added to each command data;
上記格納されたコマンドメッセージを読み出して、該コマンドメッセージに含まれる送信先アドレスのプログラマブルコントローラ宛てに該コマンドメッセージを送信し、Reading out the stored command message, transmitting the command message to the programmable controller of the destination address included in the command message,
上記送信されたコマンドメッセージに対するプログラマブルコントローラからのレスポンスメッセージを受信して格納し、Receive and store a response message from the programmable controller for the transmitted command message,
上記格納されたレスポンスメッセージを読み出して、該レスポンスメッセージに含まれるシーケンシャルIDと上記格納されたツール番号およびシーケンシャルIDとに基づいて、送信先のツール番号を取得して該送信先のツール宛てに出力するレスポンスデータを形成し、The stored response message is read, and a destination tool number is obtained based on the sequential ID included in the response message and the stored tool number and sequential ID, and output to the destination tool. To form response data,
上記送信したコマンドメッセージに対するレスポンスメッセージを受信しなくても、上記ツールから出力されたコマンドデータを受け付けてコマンドメッセージを送信するEven if a response message to the transmitted command message is not received, the command data output from the tool is accepted and the command message is transmitted.
ことを特徴とするパーソナルコンピュータの通信方法。A communication method for a personal computer, comprising:
JP03966499A 1998-05-29 1999-02-18 Personal computer and communication method of personal computer Expired - Lifetime JP3550677B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP03966499A JP3550677B2 (en) 1998-05-29 1999-02-18 Personal computer and communication method of personal computer

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP10-150138 1998-05-29
JP15013898 1998-05-29
JP03966499A JP3550677B2 (en) 1998-05-29 1999-02-18 Personal computer and communication method of personal computer

Publications (2)

Publication Number Publication Date
JP2000047717A JP2000047717A (en) 2000-02-18
JP3550677B2 true JP3550677B2 (en) 2004-08-04

Family

ID=26379048

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03966499A Expired - Lifetime JP3550677B2 (en) 1998-05-29 1999-02-18 Personal computer and communication method of personal computer

Country Status (1)

Country Link
JP (1) JP3550677B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7444186B2 (en) 2005-03-01 2008-10-28 Omron Corporation Programmable controller system
JP5088490B2 (en) * 2008-03-13 2012-12-05 オムロン株式会社 Redundant controller
JP2014127055A (en) * 2012-12-27 2014-07-07 Jtekt Corp Peripheral device of plc

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2939836B2 (en) * 1991-03-29 1999-08-25 カシオ計算機株式会社 Liquid crystal display device
JPH086614A (en) * 1994-06-22 1996-01-12 Omron Corp Programmable controller
JP3367761B2 (en) * 1994-08-26 2003-01-20 松下電工株式会社 Control system program collation method and control system
JP3642594B2 (en) * 1995-01-10 2005-04-27 オムロン株式会社 Development support equipment

Also Published As

Publication number Publication date
JP2000047717A (en) 2000-02-18

Similar Documents

Publication Publication Date Title
US8478908B2 (en) Fieldbus gateway using virtual serial filedbus port and data transmission method thereof
JP4769808B2 (en) Interface modules used in Fieldbus device networks and Internet-based and non-Internet-based process control networks
KR100451315B1 (en) Control system, display device, control-use host computer, and data transmission method
JP4271160B2 (en) Network opening method in production system
EP3078165B1 (en) Web-based interaction with building automation
NO319930B1 (en) Communication architecture for process control system
JP4172490B2 (en) Programmable controller
US9344399B2 (en) Relay server and relay communication system
JP4849340B2 (en) Programmable controller and unit
JP3550677B2 (en) Personal computer and communication method of personal computer
JP2001100810A (en) Controller
US20010052041A1 (en) Automation system and method for accessing the functionality of hardware components
JP2004306200A (en) Robot control system
JP3423626B2 (en) Control host computer and recording medium on which the program is recorded
JP5786385B2 (en) Operation terminal, program and control system
JP2022011697A (en) Production system, master control device, control device, communication method and program
JP4671056B2 (en) Programmable controller and communication unit
JP3590329B2 (en) Control network system
JP4396120B2 (en) Programmable display
JP4164270B2 (en) Servo controller
JP2003198547A (en) Communication device and communication method
JP2002290492A (en) Communication controller
JPH0722288B2 (en) Communication control device for local area network
JP2003052189A (en) Method for control information communication between motor driver and controller, and the motor driver, and system
JPS61157042A (en) System for connecting terminal device having different kind of protocols on lan

Legal Events

Date Code Title Description
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: 20040329

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040411

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20090514

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100514

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100514

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110514

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120514

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130514

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20140514

Year of fee payment: 10

EXPY Cancellation because of completion of term