JP3672758B2 - Debugging support device - Google Patents

Debugging support device Download PDF

Info

Publication number
JP3672758B2
JP3672758B2 JP02262199A JP2262199A JP3672758B2 JP 3672758 B2 JP3672758 B2 JP 3672758B2 JP 02262199 A JP02262199 A JP 02262199A JP 2262199 A JP2262199 A JP 2262199A JP 3672758 B2 JP3672758 B2 JP 3672758B2
Authority
JP
Japan
Prior art keywords
sequencer
debugging
personal computer
program
peripheral device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP02262199A
Other languages
Japanese (ja)
Other versions
JP2000222012A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP02262199A priority Critical patent/JP3672758B2/en
Publication of JP2000222012A publication Critical patent/JP2000222012A/en
Application granted granted Critical
Publication of JP3672758B2 publication Critical patent/JP3672758B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Control By Computers (AREA)
  • Programmable Controllers (AREA)

Description

【0001】
【発明の属する技術分野】
この発明は、シーケンサ周辺装置上のプログラムをデバッグする際に、シーケンサの各ユニットが揃わない状態でも、デバッグを可能にするデバッグ支援装置に関するものである。
【0002】
【従来の技術】
図12から図14を用いて従来例を説明する。図12は従来のシーケンサ周辺装置上で動作するプログラムをデバッグするときの機器構成のブロック図、図13は従来のデバッグ手順を示すフローチャートである。図12において、1は後述のデバッグ対象プログラム6zが動作するシーケンサ周辺装置、2はCRT、3はキーボード、4はシーケンサ、4aはシーケンサ4のCPUユニット、4bはシーケンサ4のネットワークユニット、4cはシーケンサ4のメモリ、4dはシーケンサ4で動作するシーケンスプログラム、5はCPU、6はメモリ、6zはデバッグの対象となるデバッグ対象プログラム、7aはCRT2とのCRT用インターフェース、7bはキーボード3とのキーボード用インターフェース、7cはシーケンサ4とのインタフェースであるネットワーク用インタフェースである。
シーケンサ4は通常、電源ユニット(特に図示せず)、CPUユニット、各種の機能ユニット等の複数のユニットを組み合わせて使用する。図12のシーケンサ4では、CPUユニット4aとネットワーク機能を有するネットワークユニット4bを組み合わせている。
【0003】
次に、図13のフローチャートに基づいて、従来のシーケンサ周辺装置上のプログラムのデバッグ手順を説明する。まず、ステップS5101において、デバッグの環境を整えることからスタートする。ステップS5102において、シーケンサ周辺装置1の接続対象となるシーケンサ4のCPUユニット4a(以下、対象CPUユニット)を用意する。ステップS5103において、対象CPUユニット4aが用意できなければ、ステップS5104において、対象CPUユニット4aと互換可能なCPUユニット(以下、互換CPUユニット)を用意する。ステップS5105において、互換CPUユニットも用意できなければ、ステップS5106において、デバッグ作業を中断する。
【0004】
ステップS5103で対象CPUユニット4aが用意できたか、またはステップS5105において互換CPUユニットが用意できた場合、ステップS5107において、シーケンサ周辺装置1とネットワーク接続するためのシーケンサ4のネットワークユニット4bを用意する。ステップS5108において、ネットワークユニット4bが用意できなければ、ステップS5106において、デバッグ作業を中断する。ネットワークユニット4bが用意できた場合、ステップS5109において、シーケンサ周辺装置1とシーケンサ4を接続する。ステップS5110において、シーケンサ4を起動してシーケンスプログラム4dを実行する。
【0005】
ステップS5111において、シーケンサ周辺装置1のキーボード3から入力される起動コマンドに従ってデバッグ対象プログラム6zを実行する。ステップS5112において、デバッグ対象プログラム6zが、シーケンサ4で動作しているシーケンスプログラム4dとデータの送受信をして、正しく動作した場合、ステップS5114において、デバッグ作業を終了する。デバッグ対象プログラム6zがデータの送受信ができなかったり、送受信したデータに誤りがあるなど、正しく動作しなかった場合、ステップS5113において、キーボード3から入力される停止コマンドによりデバッグ対象プログラム6zを停止し、デバッグ対象プログラム6zの修正作業に移り修正後、ステップS5111へ戻って動作確認の作業を繰り返す。
【0006】
図14は図12と同じく従来のシーケンサ周辺装置上で動作するプログラムをデバッグするときの機器構成のブロック図を示すが、ここではとりわけシーケンサ周辺装置とネットワークユニットとの通信部分のプログラムをデバッグするときの機器構成を示す。図において、19は通信回線を行き交う伝文を解読する専用の解読装置(以下、伝文解析装置)である。
【0007】
従来は、通信回線にデバッグ専用機材である伝文解析装置19を設置後、デバッグ対象プログラム6zとシーケンスプログラム4dを起動して、伝文解析装置19で送受信される伝文をモニタし確認しながら、デバッグを行っていた。
【0008】
【発明が解決しようとする課題】
従来のシーケンサ周辺装置上で動作するプログラムをデバッグするときのデバッグ手順では、必要となるシーケンサのすべてのユニット、すなわち上記例ではシーケンサ周辺装置に接続するシーケンサのCPUユニットとネットワークユニット、が揃わなければ、デバッグ作業を行うことができなかった。また、互換CPUユニットを用いる場合、おおまかな動作の確認はできるが、対象CPUユニットとの違い、例えば、使用可能なデバイス点数の違いにより、対象CPUユニットを用いたときとは動作が異なることがあり、精度の高いデバッグができなかった。また、デバッグの対象となるシステムの構成が変わるたびに、CPUユニットやネットワークユニットを用意しなければならないので手間がかかった。
【0009】
また、伝文解析装置を用いた構成のものの場合には、伝文解析装置を用意、設置する手間があった。また、伝文解析装置を設置する場合、シーケンサ周辺装置やシーケンサを一旦停止する必要があるため、デバッグ中の伝文解析装置の設置/脱着は不可能であった。
【0010】
また、従来のデバッグ手順では、シーケンサ周辺装置に接続するシーケンサとシーケンサ周辺装置が必要なため、両方の装置が揃わないとデバッグ作業を行うことができなかった。
【0011】
本発明は上記のような問題点を解決するためになされたもので、シーケンサとネットワークで接続された装置(以下、シーケンサ周辺装置)で動作するプログラムのデバッグにおいて、シーケンサをパーソナルコンピュータ(以下、パソコン)でエミュレートし、シーケンサの各ユニットをパソコン上で選択することで、様々なシステム構成のシーケンサをエミュレートしてデバックを行うことができるようにしたデバッグ支援装置を得ることを目的としている。
【0012】
また本発明は、シーケンサ周辺装置からパソコンに送信された伝文及びその回答伝文をパソコン上でモニタすることにより、シーケンサ周辺装置上のアプリケーションにおける通信プログラムのデバッグを可能としたデバッグ支援装置を得ることを目的としている。
【0013】
また本発明は、シーケンサ周辺装置で動作するプログラムとシーケンサのエミュレートを1台のパソコンで実現できるようにしたデバッグ支援装置を得ることを目的としている。
【0014】
【課題を解決するための手段】
上記の目的に鑑み、この発明は、シーケンサとネットワークで接続されたシーケンサ周辺装置で動作するプログラムのデバッグを支援するデバッグ支援装置であって、デバッグ対象プログラムを内蔵したシーケンサ周辺装置にシーケンサをエミュレートするシーケンスプログラムを内蔵したパーソナルコンピュータを接続し、パーソナルコンピュータがパーソナルコンピュータ上で選択されたシーケンサのCPUユニット名および経由するネットワークユニット名に従ったシステム構成のシーケンサをエミュレートすることを特徴とするデバッグ支援装置にある。
【0015】
またこの発明は、さらにシーケンサ周辺装置からパーソナルコンピュータに送信された伝文及びその回答伝文をパーソナルコンピュータ上でモニタすることにより、シーケンサ周辺装置上のアプリケーションにおける通信プログラムのデバッグを可能としたことを特徴とするデバッグ支援装置にある。
【0016】
またこの発明は、シーケンサとネットワークで接続されたシーケンサ周辺装置で動作するプログラムのデバッグを支援するデバッグ支援装置であって、シーケンスプログラムを内蔵しシーケンサをエミュレートすると共にデバッグ対象プログラムも内蔵し、入力選択されたシーケンサのCPUユニット名および経由するネットワークユニット名に従ったシステム構成のシーケンサをエミュレートする1台のパーソナルコンピュータからなることを特徴とするデバッグ支援装置にある。
【0020】
【発明の実施の形態】
実施の形態1.
図1から図6を用いて、この発明の一実施の形態によるデバッグ支援装置を説明する。図1はこの実施の形態によるデバッグ支援装置の構成を示すブロック図、図2はデバッグ支援装置を用いたときのデバッグ手順を示すフローチャート、図3はパソコンでエミュレートするシーケンサのCPUユニット名とネットワークユニット名を設定する仮想シーケンサ設定手段を示すフローチャート、図4はCPUユニット名とネットワークユニット名を入力するための画面、図5はシーケンサで動作するシーケンスプログラムをパソコン上で疑似動作するためのシミュレーション手段を示すフローチャート、図6はシーケンサ周辺装置とのデータ通信を行うデータ通信手段を示すフローチャートである。図において、従来例と同一符号は同一または相当部分を示す。
【0021】
図1において、11はシーケンサをエミュレートするパソコン、12はCRT、13はキーボード、15はCPU、16はメモリ、16aはシーケンスプログラムを疑似動作するシミュレーション手段、16bはシーケンサ周辺装置とデータ通信するデータ通信手段、16cはエミュレートするシーケンサのCPUユニット名とネットワークユニット名を入力する仮想シーケンサ設定手段、16dはシーケンスプログラムをシミュレーションした状態を保存する領域(以下、シミュレーション領域)、17aはCRT12とのCRT用インターフェース、17bはキーボード13とのキーボード用インターフェース、17cはシーケンサ周辺装置1とのネットワーク用インタフェース、18は補助記憶装置、18aはシーケンスプログラム、18bは前記仮想シーケンサ設定手段16cで設定したCPUユニット名とネットワークユニット名を保存する仮想シーケンサ設定ファイルである。なお、デバッグ支援装置は図1に示され全てのものから構成されます。
【0022】
次に、図2のフローチャートに基づいて本発明によるデバッグ支援装置を用いたときのデバッグ手順について説明する。まず、ステップS201において、デバッグの環境を整えることからスタートする。ステップS202において、シーケンサ周辺装置1とパソコン11を接続する。ステップS203において、仮想シーケンサ設定手段16cを用いて、エミュレートするシーケンサのCPUユニット名、ネットワークユニット名を入力する。ステップS204において、シミュレーション手段16aとデータ通信手段16bを起動して、シーケンスプログラム18a(図12および13の従来のシーケンスプログラム4dに同じ)をパソコン11上で疑似動作してエミュレートを開始する。
後述するように、図3のようにネットワークユニット名を入力すると、その情報は仮想シーケンサ設定ファイル18bに保持される。図6に示すように、データ通信手段16bは、仮想シーケンサ設定ファイル18bからネットワークユニット名を読み出し、それに対応した伝文解析を行うことでネットワークの擬似動作を行う。エミュレートの具体例は後述する。
【0023】
ステップS205におて、シーケンサ周辺装置1のキーボード3から入力される起動コマンドに従ってデバッグ対象プログラム6zを実行する。ステップS206において、デバッグ対象プログラム6zが、シーケンサをエミュレートしているパソコン11とデータを送受信して、正しく動作した場合、ステップS208において、デバッグ作業を終了する。デバッグ対象プログラム6zがデータの送受信ができなかったり、送受信したデータに誤りがあるなど、正しく動作しなかった場合、ステップS207において、キーボード3から入力される停止コマンドによりデバッグ対象プログラム6zを停止し、デバッグ対象プログラム6zを修正後、ステップS205へ戻って動作確認の作業を繰り返す。
【0024】
次に、図3のフローチャートに基づいて仮想シーケンサ設定手段16cについて説明する。まず、ステップS301において、デバッグ作業者がキーボード13より入力する起動コマンドにより、メモリ16に展開されている仮想シーケンサ設定手段16cがスタートする。この手段は、ステップS302において、CRT12に図4のようなCPUユニット名とネットワークユニット名(周辺装置との接続方法)を入力する画面を表示する。図4の画面は、CPUユニット形名の一覧と、周辺装置との接続方法の一覧のデータが表示可能であり、作業者はキーボード13を用いて、エミュレートするシステムのCPUユニット形名と周辺装置との接続方法を一覧から選択する。
CPUとネットワークのユニット名がデバッグ作業者により入力された後、ステップS303において、キャンセルボタンが押された場合、ステップS311へ飛んで、仮想シーケンサ設定手段16cを終了する。OKボタンが押された場合、ステップS304において、入力データのチェックをする。すなわち正しくCPUユニット名とネットワークユニット名が選択されているか否かをチェックする。入力データが正しくない場合、すなわちCPUユニット名やネットワークユニット名が選択されていない場合は、ステップS305において、エラーメッセージを表示した後、ステップS302へ戻って処理を繰り返す。入力データが正しい場合、ステップS306において、入力されたCPUユニット名(図4のA3U等)とネットワークユニット名(図4のC24,E71等)を補助記憶装置18の仮想シーケンサ設定ファイル18bに保存する。
【0025】
疑似動作するCPUユニット名が設定されたので、ステップS307において、メモリ16に展開されているシミュレーション手段16aを起動する。ステップS308において、キーボード13から終了コマンドが入力されたかチェックし、入力されていない場合、ステップS309において、一定時間待機した後、ステップS308へ戻って終了コマンドのチェックを繰り返す。終了コマンドが入力された場合、ステップS310において、シミュレーション手段16aを終了して、ステップS311において、仮想シーケンサ設定手段16cを終了する。
【0026】
次に、図5のフローチャートに基づいてシミュレーション手段16aについて説明する。まず、ステップS501において、仮想シーケンサ設定手段16cが、メモリ16に展開されているシミュレーション手段16aを起動する。この手段は、ステップS502において、仮想シーケンサ設定ファイル18bからCPUユニット名を読み出す。ステップS503において、補助記憶装置18にあるシーケンスプログラム18aを読み出す。ステップS504において、シーケンスプログラムをシミュレーションした状態を保存する領域であるシミュレーション領域16dをメモリ16上に確保し、ステップS505において、シミュレーション領域16dを初期化する。ステップS506において、シーケンサ周辺装置1とのデータ通信を行うデータ通信手段16bを起動する。
【0027】
ステップS507において、シミュレーション領域16dを読み出し、これをシミュレーションの初期状態とする。ステップS508において、CPUユニット名の仕様に対応したシーケンスプログラム18aのシミュレーションを実行する。つまり、ステップS503において、補助記憶装置18のシーケンスプログラム18aを読み出しているので、そのプログラム内の命令を解析することでシミュレーションが可能になる。例えば、デバイスDからデバイスWへのデータ転送命令であれば、シミュレーション領域16d内のデバイスD相当アドレスからデバイスW相当アドレスへデータを転送(コピー)してシミュレーションを実現する。
ステップS509において、シミュレーションの結果をシミュレーション領域16dへ保存する。すなわち、デバイスD相当アドレスからデバイスW相当アドレスへデータをコピーするというシミュレーションを実行した結果をシミュレーション領域16dへ保存する。
図3のステップS308において、仮想シーケンサ設定手段16cは終了コマンド待ちになっている。仮想シーケンサ設定手段16cを終了するには、作業者がキーボード13から終了コマンドを入力する必要がある。終了コマンドが入力されると、ステップS310においてシミュレーション手段16aへ終了要求を発生する。この要求をステップS510で受けることになる。
ステップS510において、仮想シーケンサ設定手段16cから終了の要求が来ているかチェックし、要求が来ていない場合、ステップS507へ戻って、シミュレーションを繰り返す。終了の要求が有る場合、ステップS511において、データ通信手段16bを終了し、ステップS512において、シミュレーション領域16dを解放後、ステップS513において、シミュレーション手段16aを終了する。
【0028】
次に、図6のフローチャートに基づいてデータ通信手段16bについて説明する。図5のシミュレーション手段16aとデータ通信手段16bの起動/終了の関係は、図3に示すように、シミュレーション手段16aが起動し、次にこのシミュレーション手段16aがデータ通信手段16bを起動し、次にシミュレーション手段16aがデータ通信手段16bを終了させ、最後にシミュレーション手段16aが終了する。エミュレート時にはシミュレーション手段16aとデータ通信手段16bが同時に動作する(例えばウィンドウズ上でワードとエクセルが同時に動作するように)。
まず、ステップS601において、シミュレーション手段16aが、メモリ16に展開されているデータ通信手段16bを起動する。この手段は、ステップS602において、仮想シーケンサ設定ファイル18bからネットワークユニット名を読み出す。
【0029】
ステップS603において、シーケンサ周辺装置1のデバッグ対象プログラム6zからの伝文を受信したかチェックする。伝文を受信していなければ、ステップS604において、シミュレーション手段16aからの終了要求が有るかチェックし、有ればステップS614でデータ通信処理16bを終了する。終了要求がなければ、ステップS605において、一定時間待機後、ステップS603に戻って、伝文受信のチェックをする。ステップS603において、伝文を受信した場合、ステップS606において、ネットワークユニットに対応した伝文解析を行う。伝文解析はネットワークの通信プロトコルによって伝文の形式が異なるために必要な処理である。
【0030】
ステップS607において、伝文内容が読み出し要求であった場合、ステップS611において、シミュレーション領域16dを読み出す。読み出したデータは、ステップS612において、ネットワークユニットに対応した回答伝文を作成し、ステップS613において、シーケンサ周辺装置1のデバッグ対象プログラム6zへ送信する。回答伝文は例えば「通信先アドレス+結果+回答内容」という構成で作成する。通信先アドレスはどの装置/機器に対する回答であるかということを示す4桁の値、結果は要求に対する実行結果をOK/NGで示す2桁の文字、回答内容は回答となるデータを示す8桁の値である。例えば、通信先アドレス0001のシーケンサ周辺装置へシミュレーション領域16dから読み出したデータ123を回答するときには、0001OK00000123という伝文を作成して送信する。何らかの異常でシミュレーション領域16dの読み出しに失敗したときには0001NG00000000という伝文を送信する。
ステップS607において、伝文内容が読み出し要求でない場合、ステップS608において、書き込み要求かをチェックする。書き込み要求であった場合、ステップS609において、シミュレーション領域16dに受信したデータを書き込み、ステップS612へ戻る。書き込み要求の場合、回答伝文「通信先アドレス+結果+回答内容」の内容は常に0で、シミュレーション領域16dへの書き込みのOK/NGを結果のところに設定して伝文を作成する。書き込みOKの場合、0001KO00000000となる。
ステップS608において、伝文内容が書き込み要求でない場合、ステップS610において、ネットワークユニットに対応したエラー用の回答伝文を作成し、ステップ613へ戻る。ステップS613において、伝文を送信後、ステップS603へ戻って、処理を繰り返す。
【0031】
エミュレーションの具体例としては、例えば、図7(従来)および図8(本発明)に示すようなタンクの水量を調御するシステムを考える。シーケンスプログラム4dは、タンクヘそぞく水量とタンクから排出する水量を制御して、タンク内の水量を管理するプログラムである。タンクの水量値はシーケンサ4のメモリ4c上に保持されていて、タンクヘ水をそそぐ時はその値(以下、水量値)に増量分を加算して保持し、タンクから水を排水するときは減算して保持する。本例ではシーケンスプログラム4dを実行すると水量値が10→20→25と変わるものとする(水量値の実化に合わせてタンクの水量も変化する)。
【0032】
デバッグ対象プログラム6zは、シーケンサ4のメモリ4c上に保持されている水量値を、通信回線を介してシーケンサ周辺装置にあたるパソコン1のメモリ6上に読み出し、その値をCRT2に表示するプログラムである。ただし、このプログラムはデバッグ対象プログラムという名称が示す通り、デバッグの対象となっているプログラム、すなわち、今からその動作を確認しようとしているプログラムである。
【0033】
従来は、シーケンサ4の各ユニットとタンクを用意した後、パソコン1とPLC4を接続してデバック対象プログラム6zのデバッグを行わなければならなかった(図7および図12参照)。本発明でのデバッグとは、メモリ4c上の水量値が10→20→25と変化するのに合わせて、CRT2上の表示も同様に変化することを確認する作業である。デバッグが完了すれば、プログラムは完成し、タンクの水量をパソコン1でモニタすることが可能になる。
【0034】
本発明ではシーケンサ4をパソコン11でエミュレートしシーケンサ4とタンクを用意することなく、デバッグ対象プログラム6zのデバッグ作業を可能にするものである(図8および図1参照)。
【0035】
タンクの水量を制御するシステムを用いて、エミュレートの具体例を以下に示す。シミュレーション手段16aはシーケンスプログラム4dをパソコン11上で疑似動作(シミュレーション)する手段である。したがって、シミュレーション手段16aを用いてシーケンスプログラム4dを動作させると、シーケンサ4で動作させた時と同じように水量値が10→20→25と変化し、その値はシミュレーション領域16dに保持される。すなわち、シミュレーション手段16aはシーケンスプログラム4dの命令を解析してシミュレーションし、その結果をシミュレーション領域16dに保存するので、シーケンサ4のエミュレートが可能になる。
【0036】
デバッグ対象プログラム6zは、シミュレーション領域16dから水量値を、通信回線とデータ通信手段16bを介して読み出し、その値をCRT12に表示する。プログラムに誤りがあれば、水量値は正常に表示されないので、プログラムを修正し、再度デバッグ作業を行う。これを繰り返してプログラムを完成させる(図2参照)。
【0037】
このように、本発明によれば、シーケンサ4のユニットをパソコン11上で選択することによりシーケンサ設定の動作をパソコン11で忠実にエミュレートするため、デバッグ対象プログラム6zを、実際のシステムの場合とエミュレートのシステムの場合で変更する必要がなく、効率良くデバッグを行うことができる。また、PLCの各ユニットを用意する必要がないことも当然ながらメリットである。
【0038】
実施の形態2.
図9を用いてこの発明の別の実施の形態によるデバッグ支援装置を説明する。図9はこの実施の形態によるデバッグ支援装置におけるデータ通信手段の動作を示すフローチャート図であり、図6に示すのフローチャートにステップS701、S702の「CRTへ伝文表示」の2ステップを追加し、データ通信手段16bで受信した伝文および送信する伝文をCRT12に表示する処理(伝文表示機能)を追加したものである。図9において、図6と同一番号は同一の処理を示す。なお、伝文表示機能は他の手段と同様に基本的にソフトウェアによりはハードウェア(ここではパソコン、CRT用I/F、CRT)を駆動させることにより構成される。
【0039】
図9を用いて、図6のデータ通信手段に伝文表示機能を加えた動作を説明する。図6と異なるステップについて説明する。ステップS701では、ステップS603で受信した伝文をCRT12に表示する。ステップS702では、ステップS612またはステップS610で作成した回答伝文をCRT12に表示する。
なお、表示の一例を図10に示す。図10では先に説明した回答伝文を例にしている。
【0040】
送受信する伝文をCRT12に表示することにより、どのような伝文を受信して、どうのような回答伝文を送信したかを確認でき、不正な送受信データの発見に役立つことになる。例えば、ステップS610でエラー回答伝文を作成した場合、何故エラー回答となったかは、ステップS701で表示された受信伝文の見れば容易に判断できる。
【0041】
本実施の形態では、ステップS701及びステップS702で伝文をCRTに表示したが、伝文を表示するとともに補助記憶装置のファイルに記録することにより、伝文の履歴を残すことができ、過去に発生した異常な通信の原因追求などを容易に行うことができる。
【0042】
実施の形態3.
図11を用いてこの発明のさらに別の実施の形態によるデバッグ支援装置を説明する。図11はデバッグ支援装置の構成を示すブロック図である。図において、図1と同一符号は同一または相当部分を示す。この実施の形態では、上記実施の形態におけるシーケンサ周辺装置1(図8ではパソコン1)をパソコン11側に組み込み、1台のパソコン11Xでデバッグ支援装置を構成した。
【0043】
図11において、11Xはシーケンサ周辺装置で動作するプログラムとシーケンサのエミュレートを実施するパソコン、17cXはシーケンサのエミュレート側のネットワーク用インターフェース、7cXはシーケンサ周辺装置で動作するプログラム側のネットワーク用インターフェースである。
【0044】
次に、図2のフローチャートに基づいて、この実施の形態によるデバッグ支援装置を用いた時のデバッグ手順について説明する。この実施の形態では1台のパソコン11Xでデバッグ支援装置を構成しているため、図2のステップS202のようにシーケンサ周辺装置1とパソコン11を接続する必要がなくなった以外は全く同一である。
【0045】
この実施の形態ではシーケンサ周辺装置で動作するプログラムとシーケンサのエミュレートの接続をパソコン内部で実施したが、折り返しケーブルを利用しても同様のことが可能になる。
【0046】
【発明の効果】
以上に説明したように、本発明によれば、シーケンサとネットワークで接続されたシーケンサ周辺装置で動作するプログラムのデバッグを支援するデバッグ支援装置であって、デバッグ対象プログラムを内蔵したシーケンサ周辺装置にシーケンサをエミュレートするシーケンスプログラムを内蔵したパーソナルコンピュータを接続し、パーソナルコンピュータがパーソナルコンピュータ上で選択されたシーケンサのCPUユニット名および経由するネットワークユニット名に従ったシステム構成のシーケンサをエミュレートするようにしたので、実際のCPUユニットやネットワークユニットを用意する手間が省け、デバッグ作業時間を短縮する効果がある。
【0047】
また、シーケンサ周辺装置からパソコンに送信された伝文及びその回答伝文をパソコン上でモニタするので、伝文解析装置などを必要とせずに伝文を確認でき、シーケンサ周辺装置上のアプリケーションにおける通信プログラムのデバッグを容易にする効果がある。
【0048】
また、シーケンサ周辺装置で動作するプログラムとシーケンサのエミュレートを1台のパソコンで実現することで、実際のCPUユニットやネットワークユニットを用意する手間が省け、デバッグ作業時間を短縮する効果がある。
【図面の簡単な説明】
【図1】 この発明の一実施の形態によるデバッグ支援装置の構成を示すブロック図である。
【図2】 この発明の一実施の形態によるデバッグ支援装置を用いたデバッグ手順を示すフローチャート図である。
【図3】 この発明の一実施の形態によるデバッグ支援装置のパソコンの仮想シーケンサ設定手段の動作を示すフローチャート図である。
【図4】 この発明の一実施の形態によるデバッグ支援装置のパソコンの仮想シーケンサ設定画面の一例を示す図である。
【図5】 この発明の一実施の形態によるデバッグ支援装置のパソコンのシミュレーション手段の動作を示すフローチャート図である。
【図6】 この発明の一実施の形態によるデバッグ支援装置のパソコンのデータ通信手段の動作を示すフローチャート図である。
【図7】 この発明によるエミュレーションの具体例を説明するための従来の場合の図である。
【図8】 この発明によるエミュレーションの具体例を説明するための本発明の場合の図である。
【図9】 この発明の別の実施の形態によるデバッグ支援装置におけるデータ通信手段に伝文表示機能を加えた場合の動作を示すフローチャート図である。
【図10】 回答伝文の表示の一例を示す図である。
【図11】 この発明のさらに別の実施の形態によるデバッグ支援装置の構成を示すブロック図である。
回答伝文をCRT12に表示する。
【図12】 従来のシーケンサ周辺装置上で動作するプログラムをデバッグするときの機器構成を示すブロック図である。
【図13】 従来のデバッグ手順を示すフローチャート図である。
【図14】 伝文解析装置を用いた従来のシーケンサ周辺装置上で動作するプログラムをデバッグするときの機器構成を示すブロック図である。
【符号の説明】
1 シーケンサ周辺装置、2,12 CRT、3,13 キーボード、5,15 CPU、6,16 メモリ、6z デバッグ対象プログラム、7a,17aCRT用インターフェース、7b,17b キーボード用インターフェース、7c,17c,7cX,17cX ネットワーク用インターフェース、11,11X パーソナルコンピュータ、16a シミュレーション手段、16b データ通信手段、16c 仮想シーケンサ設定手段、16d シミュレーション領域、18 補助記憶装置、18a シーケンスプログラム、18b 仮想シーケンサ設定ファイル。
[0001]
BACKGROUND OF THE INVENTION
This invention makes it possible to debug a program on a sequencer peripheral device even if the units of the sequencer are not ready. Debugging support device It is about.
[0002]
[Prior art]
A conventional example will be described with reference to FIGS. FIG. 12 is a block diagram of a device configuration when debugging a program operating on a conventional sequencer peripheral device, and FIG. 13 is a flowchart showing a conventional debugging procedure. In FIG. 12, 1 is a sequencer peripheral device on which a debug target program 6z described later operates, 2 is a CRT, 3 is a keyboard, 4 is a sequencer, 4a is a CPU unit of the sequencer 4, 4b is a network unit of the sequencer 4, and 4c is a sequencer 4, 4 d is a sequence program that operates on the sequencer 4, 5 is a CPU, 6 is a memory, 6 z is a debug target program to be debugged, 7 a is a CRT interface with the CRT 2, and 7 b is a keyboard with the keyboard 3 An interface 7 c is a network interface that is an interface with the sequencer 4.
The sequencer 4 normally uses a combination of a plurality of units such as a power supply unit (not shown), a CPU unit, and various functional units. In the sequencer 4 of FIG. 12, a CPU unit 4a and a network unit 4b having a network function are combined.
[0003]
Next, a procedure for debugging a program on a conventional sequencer peripheral device will be described with reference to the flowchart of FIG. First, in step S5101, the process starts from preparing a debugging environment. In step S5102, a CPU unit 4a (hereinafter referred to as a target CPU unit) of the sequencer 4 to be connected to the sequencer peripheral device 1 is prepared. If the target CPU unit 4a cannot be prepared in step S5103, a CPU unit compatible with the target CPU unit 4a (hereinafter referred to as a compatible CPU unit) is prepared in step S5104. If a compatible CPU unit cannot be prepared in step S5105, the debugging operation is interrupted in step S5106.
[0004]
If the target CPU unit 4a has been prepared in step S5103 or a compatible CPU unit has been prepared in step S5105, a network unit 4b of the sequencer 4 for network connection with the sequencer peripheral device 1 is prepared in step S5107. If the network unit 4b cannot be prepared in step S5108, the debugging operation is interrupted in step S5106. If the network unit 4b is prepared, the sequencer peripheral device 1 and the sequencer 4 are connected in step S5109. In step S5110, the sequencer 4 is activated to execute the sequence program 4d.
[0005]
In step S5111, the debug target program 6z is executed in accordance with the start command input from the keyboard 3 of the sequencer peripheral device 1. If the debug target program 6z transmits / receives data to / from the sequence program 4d running on the sequencer 4 in step S5112, the debug operation is terminated in step S5114. If the debug target program 6z does not operate correctly, such as data cannot be transmitted / received or there is an error in the transmitted / received data, the debug target program 6z is stopped by a stop command input from the keyboard 3 in step S5113. The process proceeds to the modification work of the debug target program 6z, and after the modification, the process returns to step S5111, and the operation confirmation work is repeated.
[0006]
FIG. 14 shows a block diagram of a device configuration when debugging a program that operates on a conventional sequencer peripheral device as in FIG. 12, but here, especially when debugging a program in the communication portion between the sequencer peripheral device and the network unit. The equipment configuration of is shown. In the figure, reference numeral 19 denotes a dedicated decryption device (hereinafter referred to as a message analysis device) for decrypting a message passing through a communication line.
[0007]
Conventionally, after installing a message analysis device 19 which is a dedicated debugging device on a communication line, the debug target program 6z and the sequence program 4d are started, and while the message transmitted and received by the message analysis device 19 is monitored and confirmed. I was debugging.
[0008]
[Problems to be solved by the invention]
In the debugging procedure when debugging a program operating on a conventional sequencer peripheral device, all the necessary sequencer units, that is, in the above example, the sequencer CPU unit and network unit connected to the sequencer peripheral device must be prepared. Could not do debugging work. In addition, when a compatible CPU unit is used, a rough operation can be confirmed, but the operation may differ from that when the target CPU unit is used due to a difference from the target CPU unit, for example, a difference in the number of usable devices. Yes, I could not debug with high accuracy. In addition, every time the configuration of the system to be debugged changes, a CPU unit and a network unit must be prepared, which is troublesome.
[0009]
Further, in the case of the configuration using the message analysis device, there is a trouble of preparing and installing the message analysis device. In addition, when installing a message analysis device, it is necessary to temporarily stop the sequencer peripheral device and the sequencer, so it is impossible to install / remove the message analysis device during debugging.
[0010]
Further, in the conventional debugging procedure, a sequencer connected to the sequencer peripheral device and the sequencer peripheral device are required. Therefore, the debugging operation cannot be performed unless both devices are prepared.
[0011]
The present invention has been made to solve the above-described problems. In debugging a program operating on a device connected to a sequencer and a network (hereinafter referred to as a sequencer peripheral device), the sequencer is connected to a personal computer (hereinafter referred to as a personal computer). ), And by selecting each sequencer unit on the personal computer, the sequencer with various system configurations can be emulated and debugged. Debugging support device The purpose is to obtain.
[0012]
In addition, the present invention enables debugging of a communication program in an application on the sequencer peripheral device by monitoring the message transmitted from the sequencer peripheral device to the personal computer and the response message on the personal computer. Debugging support device The purpose is to obtain.
[0013]
In addition, the present invention makes it possible to realize a program running on a sequencer peripheral device and a sequencer emulation on a single personal computer. Debugging support device The purpose is to obtain.
[0014]
[Means for Solving the Problems]
In view of the above object, the present invention is directed to debugging a program operating on a sequencer peripheral device connected to a sequencer via a network. A debugging support device that supports Emulate sequencers in sequencer peripherals Built-in sequence program Connect a personal computer, Personal computer Select on personal computer According to the sequencer CPU unit name and network unit name A debugging support apparatus emulating a sequencer having a system configuration.
[0015]
In addition, the present invention further enables monitoring of a communication program in an application on the sequencer peripheral device by monitoring the message transmitted from the sequencer peripheral device to the personal computer and the response message on the personal computer. The feature is in the debugging support device.
[0016]
The present invention also relates to debugging a program operating on a sequencer peripheral device connected to the sequencer via a network. Is a debugging support device that supports a system, and includes a sequence program, emulates a sequencer, and also includes a program to be debugged. The sequencer has a system configuration according to the CPU unit name of the selected sequencer and the name of the network unit through Emulate The present invention is in a debugging support apparatus comprising a single personal computer.
[0020]
DETAILED DESCRIPTION OF THE INVENTION
Embodiment 1 FIG.
A debugging support apparatus according to an embodiment of the present invention will be described with reference to FIGS. FIG. 1 is a block diagram showing a configuration of a debugging support apparatus according to this embodiment, FIG. 2 is a flowchart showing a debugging procedure when the debugging support apparatus is used, and FIG. 3 is a CPU unit name and network of a sequencer emulated by a personal computer 4 is a flowchart showing virtual sequencer setting means for setting a unit name, FIG. 4 is a screen for inputting a CPU unit name and a network unit name, and FIG. 5 is a simulation means for simulating a sequence program operating on the sequencer on a personal computer. FIG. 6 is a flowchart showing data communication means for performing data communication with the sequencer peripheral device. In the figure, the same reference numerals as in the conventional example indicate the same or corresponding parts.
[0021]
In FIG. 1, 11 is a personal computer emulating a sequencer, 12 is a CRT, 13 is a keyboard, 15 is a CPU, 16 is a memory, 16a is a simulation means for simulating a sequence program, and 16b is data for data communication with a sequencer peripheral device. Communication means, 16c is a virtual sequencer setting means for inputting the CPU unit name and network unit name of the sequencer to be emulated, 16d is an area for storing the simulated state of the sequence program (hereinafter referred to as simulation area), and 17a is a CRT with the CRT 12 Interface 17b, a keyboard interface with the keyboard 13, 17c a network interface with the sequencer peripheral device 1, 18 an auxiliary storage device, 18a a sequence program, b is a virtual PLC configuration file that stores the CPU unit name and the network unit name set in the virtual PLC setting unit 16c. The debug support device is composed of everything shown in Fig. 1.
[0022]
Next, a debugging procedure when the debugging support apparatus according to the present invention is used will be described based on the flowchart of FIG. First, in step S201, the process starts by preparing a debugging environment. In step S202, the sequencer peripheral device 1 and the personal computer 11 are connected. In step S203, the CPU unit name and network unit name of the sequencer to be emulated are input using the virtual sequencer setting unit 16c. In step S204, the simulation unit 16a and the data communication unit 16b are activated, and the sequence program 18a (same as the conventional sequence program 4d in FIGS. 12 and 13) is simulated on the personal computer 11 to start emulation.
As will be described later, when a network unit name is input as shown in FIG. 3, the information is held in the virtual sequencer setting file 18b. As shown in FIG. 6, the data communication unit 16b reads the network unit name from the virtual sequencer setting file 18b, and performs a network pseudo operation by analyzing the corresponding message. A specific example of emulation will be described later.
[0023]
In step S205, the debug target program 6z is executed in accordance with the start command input from the keyboard 3 of the sequencer peripheral device 1. If the debug target program 6z transmits and receives data to and from the personal computer 11 emulating the sequencer and operates correctly in step S206, the debugging operation is terminated in step S208. If the debug target program 6z does not operate correctly, such as data cannot be transmitted / received or there is an error in the transmitted / received data, the debug target program 6z is stopped by a stop command input from the keyboard 3 in step S207. After correcting the debug target program 6z, the process returns to step S205 to repeat the operation check operation.
[0024]
Next, the virtual sequencer setting means 16c will be described based on the flowchart of FIG. First, in step S301, the virtual sequencer setting means 16c developed in the memory 16 is started by an activation command input from the keyboard 13 by the debug operator. In step S302, this means displays a screen for inputting the CPU unit name and network unit name (connection method with peripheral devices) as shown in FIG. The screen of FIG. 4 can display a list of CPU unit model names and a list of connection methods with peripheral devices. The operator can use the keyboard 13 to emulate the CPU unit model names and peripherals of the system to be emulated. Select the connection method with the device from the list.
If the cancel button is pressed in step S303 after the CPU and network unit names are input by the debug operator, the process jumps to step S311 and the virtual sequencer setting unit 16c is terminated. If the OK button is pressed, input data is checked in step S304. That is, it is checked whether the CPU unit name and the network unit name are correctly selected. If the input data is not correct, that is, if the CPU unit name or network unit name is not selected, an error message is displayed in step S305, and then the process returns to step S302 to repeat the process. If the input data is correct, the input CPU unit name (A3U, etc. in FIG. 4) and network unit name (C24, E71, etc. in FIG. 4) are stored in the virtual sequencer setting file 18b of the auxiliary storage device 18 in step S306. .
[0025]
Since the CPU unit name to be simulated is set, the simulation unit 16a developed in the memory 16 is activated in step S307. In step S308, it is checked whether an end command has been input from the keyboard 13. If not, in step S309, after waiting for a predetermined time, the process returns to step S308 and the end command check is repeated. When the end command is input, the simulation unit 16a is terminated in step S310, and the virtual sequencer setting unit 16c is terminated in step S311.
[0026]
Next, the simulation means 16a will be described based on the flowchart of FIG. First, in step S501, the virtual sequencer setting unit 16c activates the simulation unit 16a developed in the memory 16. In step S502, this means reads the CPU unit name from the virtual sequencer setting file 18b. In step S503, the sequence program 18a in the auxiliary storage device 18 is read. In step S504, a simulation area 16d, which is an area for storing the simulated state of the sequence program, is secured on the memory 16, and in step S505, the simulation area 16d is initialized. In step S506, the data communication means 16b for performing data communication with the sequencer peripheral device 1 is activated.
[0027]
In step S507, the simulation area 16d is read out and set as the initial state of the simulation. In step S508, a simulation of the sequence program 18a corresponding to the specification of the CPU unit name is executed. That is, since the sequence program 18a of the auxiliary storage device 18 is read in step S503, the simulation can be performed by analyzing the instructions in the program. For example, in the case of a data transfer command from the device D to the device W, the simulation is realized by transferring (copying) the data from the address corresponding to the device D in the simulation area 16d to the address corresponding to the device W.
In step S509, the simulation result is stored in the simulation area 16d. That is, the simulation result of copying data from the device D equivalent address to the device W equivalent address is stored in the simulation area 16d.
In step S308 of FIG. 3, the virtual sequencer setting unit 16c is waiting for an end command. To end the virtual sequencer setting means 16c, the operator needs to input an end command from the keyboard 13. When the end command is input, an end request is generated to the simulation means 16a in step S310. This request is received in step S510.
In step S510, it is checked whether an end request has been received from the virtual sequencer setting means 16c. If no request has been received, the process returns to step S507 to repeat the simulation. If there is a request for termination, the data communication unit 16b is terminated in step S511, the simulation area 16d is released in step S512, and the simulation unit 16a is terminated in step S513.
[0028]
Next, the data communication means 16b will be described based on the flowchart of FIG. As shown in FIG. 3, the simulation unit 16a and the data communication unit 16b in FIG. 5 start / end are activated by the simulation unit 16a, and then the simulation unit 16a activates the data communication unit 16b. The simulation unit 16a ends the data communication unit 16b, and finally the simulation unit 16a ends. At the time of emulation, the simulation unit 16a and the data communication unit 16b operate simultaneously (for example, Word and Excel operate simultaneously on Windows).
First, in step S601, the simulation means 16a activates the data communication means 16b developed in the memory 16. In step S602, this means reads the network unit name from the virtual sequencer setting file 18b.
[0029]
In step S603, it is checked whether a message from the debug target program 6z of the sequencer peripheral device 1 has been received. If no message is received, it is checked in step S604 if there is an end request from the simulation means 16a. If there is, a data communication process 16b is ended in step S614. If there is no termination request, in step S605, after waiting for a certain period of time, the process returns to step S603 to check message reception. If a message is received in step S603, message analysis corresponding to the network unit is performed in step S606. Message analysis is necessary because the message format varies depending on the network communication protocol.
[0030]
If the message content is a read request in step S607, the simulation area 16d is read in step S611. The read data creates an answer message corresponding to the network unit in step S612, and transmits it to the debug target program 6z of the sequencer peripheral device 1 in step S613. The response message is created, for example, with a configuration of “communication destination address + result + response content”. The communication destination address is a 4-digit value indicating to which device / apparatus the response is received, the result is a 2-digit character indicating the execution result for the request in OK / NG, and the response content is 8 digits indicating the data to be answered Is the value of For example, when replying the data 123 read from the simulation area 16d to the sequencer peripheral device with the communication destination address 0001, a message 0001OK00000013 is created and transmitted. When reading of the simulation area 16d fails due to some abnormality, a message 0001NG00000000 is transmitted.
If the message content is not a read request in step S607, it is checked in step S608 if it is a write request. If it is a write request, in step S609, the received data is written in the simulation area 16d, and the process returns to step S612. In the case of a write request, the content of the response message “communication destination address + result + response content” is always 0, and a message is created by setting OK / NG for writing to the simulation area 16d in the result. In the case of writing OK, it becomes 0001KO00000000.
If the message content is not a write request in step S608, an error response message corresponding to the network unit is created in step S610, and the process returns to step 613. In step S613, after transmitting the message, the process returns to step S603 to repeat the process.
[0031]
As a specific example of emulation, for example, consider a system for controlling the amount of water in a tank as shown in FIG. 7 (conventional) and FIG. 8 (present invention). The sequence program 4d is a program for controlling the amount of water in the tank by controlling the amount of water in the tank and the amount of water discharged from the tank. The amount of water in the tank is stored in the memory 4c of the sequencer 4, and when the water is poured into the tank, the increased amount is added to the value (hereinafter referred to as the amount of water) and held, and when the water is drained from the tank And hold. In this example, when the sequence program 4d is executed, the water volume value changes from 10 → 20 → 25 (the tank water volume also changes in accordance with the realization of the water volume value).
[0032]
The debug target program 6z is a program for reading the water amount value held in the memory 4c of the sequencer 4 onto the memory 6 of the personal computer 1 corresponding to the sequencer peripheral device via the communication line and displaying the value on the CRT 2. However, as the name of the program to be debugged indicates, this program is a program to be debugged, that is, a program whose operation is to be confirmed now.
[0033]
Conventionally, after preparing each unit of the sequencer 4 and the tank, the personal computer 1 and the PLC 4 must be connected to debug the debug target program 6z (see FIGS. 7 and 12). The debugging in the present invention is an operation for confirming that the display on the CRT 2 changes in the same manner as the water amount value on the memory 4c changes from 10 → 20 → 25. When debugging is completed, the program is completed and the amount of water in the tank can be monitored by the personal computer 1.
[0034]
In the present invention, the sequencer 4 is emulated by the personal computer 11 and debugging of the debug target program 6z is enabled without preparing the sequencer 4 and the tank (see FIGS. 8 and 1).
[0035]
A specific example of emulation using a system that controls the amount of water in the tank is shown below. The simulation means 16a is means for simulating (simulating) the sequence program 4d on the personal computer 11. Accordingly, when the sequence program 4d is operated using the simulation means 16a, the water amount value changes from 10 → 20 → 25 in the same manner as when the sequencer 4 is operated, and the value is held in the simulation region 16d. That is, the simulation means 16a analyzes and simulates the instruction of the sequence program 4d, and stores the result in the simulation area 16d, so that the sequencer 4 can be emulated.
[0036]
The debug target program 6z reads the water amount value from the simulation area 16d via the communication line and the data communication means 16b, and displays the value on the CRT 12. If there is an error in the program, the water volume value will not be displayed correctly, so correct the program and debug again. This is repeated to complete the program (see FIG. 2).
[0037]
As described above, according to the present invention, since the sequencer setting operation is faithfully emulated by the personal computer 11 by selecting the unit of the sequencer 4 on the personal computer 11, the debug target program 6z is changed to the case of the actual system. There is no need to change in the case of an emulated system, and debugging can be performed efficiently. It is also an advantage that it is not necessary to prepare each PLC unit.
[0038]
Embodiment 2. FIG.
A debugging support apparatus according to another embodiment of the present invention will be described with reference to FIG. FIG. 9 is a flowchart showing the operation of the data communication means in the debugging support apparatus according to this embodiment. Steps S701 and S702 of “message display on CRT” are added to the flowchart shown in FIG. A process (message display function) for displaying the message received by the data communication means 16b and the message to be transmitted on the CRT 12 is added. 9, the same numbers as those in FIG. 6 indicate the same processes. The message display function is basically configured by driving hardware (in this case, a personal computer, a CRT I / F, and a CRT) depending on software, as in other means.
[0039]
The operation of adding the message display function to the data communication means of FIG. 6 will be described with reference to FIG. Steps different from those in FIG. 6 will be described. In step S701, the message received in step S603 is displayed on the CRT 12. In step S702, the reply message created in step S612 or step S610 is displayed on the CRT 12.
An example of the display is shown in FIG. FIG. 10 shows the answer message described above as an example.
[0040]
By displaying the message to be transmitted / received on the CRT 12, it is possible to confirm what kind of message has been received and what kind of response message has been transmitted, which is useful for finding unauthorized transmission / reception data. For example, when an error reply message is created in step S610, it can be easily determined why the error reply is made by looking at the received message displayed in step S701.
[0041]
In the present embodiment, the message is displayed on the CRT in step S701 and step S702. However, by displaying the message and recording it in a file in the auxiliary storage device, a history of the message can be left in the past. The cause of abnormal communication that has occurred can be easily pursued.
[0042]
Embodiment 3 FIG.
A debugging support apparatus according to still another embodiment of the present invention will be described with reference to FIG. FIG. 11 is a block diagram showing the configuration of the debugging support apparatus. In the figure, the same reference numerals as those in FIG. 1 denote the same or corresponding parts. In this embodiment, the sequencer peripheral device 1 (the personal computer 1 in FIG. 8) in the above embodiment is incorporated on the personal computer 11 side, and the debugging support device is configured by one personal computer 11X.
[0043]
In FIG. 11, 11X is a program running on a sequencer peripheral device and a personal computer emulating the sequencer, 17cX is a network interface on the sequencer emulation side, and 7cX is a network interface on the program side running on the sequencer peripheral device. is there.
[0044]
Next, a debugging procedure when using the debugging support apparatus according to this embodiment will be described based on the flowchart of FIG. In this embodiment, since the debugging support device is configured by one personal computer 11X, the configuration is exactly the same except that it is not necessary to connect the sequencer peripheral device 1 and the personal computer 11 as in step S202 of FIG.
[0045]
In this embodiment, the connection between the program running on the sequencer peripheral device and the emulation of the sequencer is implemented inside the personal computer, but the same can be achieved by using a return cable.
[0046]
【The invention's effect】
As explained above, according to the present invention, A debugging support device that supports debugging of a program that operates on a sequencer peripheral device connected to the sequencer via a network, and a personal computer with a sequence program that emulates the sequencer is connected to the sequencer peripheral device with the debug target program. Then, the personal computer emulates a sequencer having a system configuration according to the CPU unit name of the sequencer selected on the personal computer and the name of the network unit via Since it did in this way, the effort which prepares an actual CPU unit and a network unit can be saved, and there exists an effect which shortens a debugging work time.
[0047]
In addition, since messages sent to the personal computer from the sequencer peripheral device and their response messages are monitored on the personal computer, the message can be confirmed without the need for a message analysis device, etc. This has the effect of facilitating program debugging.
[0048]
In addition, by emulating the program and the sequencer operating on the sequencer peripheral device with a single personal computer, it is possible to save time for preparing an actual CPU unit and network unit and to shorten the debugging work time.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a debugging support apparatus according to an embodiment of the present invention.
FIG. 2 is a flowchart showing a debugging procedure using a debugging support apparatus according to an embodiment of the present invention.
FIG. 3 is a flowchart showing the operation of the virtual sequencer setting means of the personal computer of the debugging support apparatus according to the embodiment of the present invention.
FIG. 4 is a diagram showing an example of a virtual sequencer setting screen of a personal computer of the debugging support apparatus according to the embodiment of the present invention.
FIG. 5 is a flowchart showing the operation of the simulation means of the personal computer of the debugging support apparatus according to the embodiment of the present invention.
FIG. 6 is a flowchart showing the operation of the data communication means of the personal computer of the debugging support apparatus according to the embodiment of the present invention.
FIG. 7 is a diagram of a conventional case for explaining a specific example of emulation according to the present invention.
FIG. 8 is a diagram in the case of the present invention for explaining a specific example of emulation according to the present invention;
FIG. 9 is a flowchart showing an operation when a message display function is added to data communication means in a debugging support apparatus according to another embodiment of the present invention;
FIG. 10 is a diagram showing an example of display of an answer message.
FIG. 11 is a block diagram showing a configuration of a debugging support apparatus according to still another embodiment of the present invention.
The response message is displayed on the CRT 12.
FIG. 12 is a block diagram showing a device configuration when debugging a program operating on a conventional sequencer peripheral device.
FIG. 13 is a flowchart showing a conventional debugging procedure.
FIG. 14 is a block diagram showing a device configuration when debugging a program operating on a conventional sequencer peripheral device using a message analysis device.
[Explanation of symbols]
1 sequencer peripheral device, 2,12 CRT, 3,13 keyboard, 5,15 CPU, 6,16 memory, 6z program to be debugged, 7a, 17a CRT interface, 7b, 17b keyboard interface, 7c, 17c, 7cX, 17cX Network interface, 11, 11X personal computer, 16a simulation means, 16b data communication means, 16c virtual sequencer setting means, 16d simulation area, 18 auxiliary storage device, 18a sequence program, 18b virtual sequencer setting file.

Claims (3)

シーケンサとネットワークで接続されたシーケンサ周辺装置で動作するプログラムのデバッグを支援するデバッグ支援装置であって、デバッグ対象プログラムを内蔵したシーケンサ周辺装置にシーケンサをエミュレートするシーケンスプログラムを内蔵したパーソナルコンピュータを接続し、パーソナルコンピュータがパーソナルコンピュータ上で選択されたシーケンサのCPUユニット名および経由するネットワークユニット名に従ったシステム構成のシーケンサをエミュレートすることを特徴とするデバッグ支援装置。 A debugging support device for supporting a debugging programs running sequencer peripheral device connected with the sequencer and networks, connecting a personal computer with a built-in sequence program that emulates the programmable controller PLC peripheral device with a built-in program to be debugged A debugging support device, wherein the personal computer emulates a sequencer having a system configuration in accordance with the CPU unit name of the sequencer selected on the personal computer and the network unit name through which the personal computer is selected. シーケンサ周辺装置からパーソナルコンピュータに送信された伝文及びその回答伝文をパーソナルコンピュータ上でモニタすることにより、シーケンサ周辺装置上のアプリケーションにおける通信プログラムのデバッグを可能としたことを特徴とする請求項1に記載のデバッグ支援装置。  The communication program in the application on the sequencer peripheral device can be debugged by monitoring the message transmitted from the sequencer peripheral device to the personal computer and the response message on the personal computer. The debugging support device according to 1. シーケンサとネットワークで接続されたシーケンサ周辺装置で動作するプログラムのデバッグを支援するデバッグ支援装置であって、シーケンスプログラムを内蔵しシーケンサをエミュレートすると共にデバッグ対象プログラムも内蔵し、入力選択されたシーケンサのCPUユニット名および経由するネットワークユニット名に従ったシステム構成のシーケンサをエミュレートする1台のパーソナルコンピュータからなることを特徴とするデバッグ支援装置。 A debugging support device that supports debugging of a program that operates on a sequencer peripheral device connected to the sequencer via a network. A debugging support apparatus comprising a personal computer emulating a sequencer having a system configuration in accordance with a CPU unit name and a network unit name via .
JP02262199A 1999-01-29 1999-01-29 Debugging support device Expired - Fee Related JP3672758B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP02262199A JP3672758B2 (en) 1999-01-29 1999-01-29 Debugging support device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP02262199A JP3672758B2 (en) 1999-01-29 1999-01-29 Debugging support device

Publications (2)

Publication Number Publication Date
JP2000222012A JP2000222012A (en) 2000-08-11
JP3672758B2 true JP3672758B2 (en) 2005-07-20

Family

ID=12087913

Family Applications (1)

Application Number Title Priority Date Filing Date
JP02262199A Expired - Fee Related JP3672758B2 (en) 1999-01-29 1999-01-29 Debugging support device

Country Status (1)

Country Link
JP (1) JP3672758B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5649748B1 (en) 2013-04-12 2015-01-07 三菱電機株式会社 Programmable controller peripheral device and debugging support program
CN110489206B (en) * 2019-07-05 2023-05-12 北京中电华大电子设计有限责任公司 Emulator with program debugging prohibition function

Also Published As

Publication number Publication date
JP2000222012A (en) 2000-08-11

Similar Documents

Publication Publication Date Title
JP4597603B2 (en) A distributed processing control system functionally integrated on a single computer.
US6173438B1 (en) Embedded graphical programming system
JP3566975B2 (en) Automatic operation device of computer operation terminal device
US6279123B1 (en) System for viewing and monitoring embedded processor operation
US11232045B2 (en) Computer-implemented method for integrating at least one signal value into a virtual control unit
JP4215864B2 (en) Method for simulating control function of control device
JP3672758B2 (en) Debugging support device
JP2915640B2 (en) Interface test system between tasks
JP2008135008A (en) Program module verification method
CN110825617A (en) Method and device for simulating communication interaction between devices
JP4962721B2 (en) Tool device and method for creating message transmission program
EP1259054B1 (en) Methods for testing the control software of a telecommunication equipment provided with a distributed type control
JPH0784901A (en) Terminal operation reproducing device
CN111445989B (en) Simulation learning method of refiner-analyzer simulator
JPH08335201A (en) Test system device for input/output control
JPH1040133A (en) Software simulator
WO2001097039A1 (en) Remote debugging in an embedded system environment
CN117390853A (en) Simulation method, device, equipment and storage medium based on man-machine interaction
JPH09330249A (en) Device for developing computer system for process control
KR20240075065A (en) Simulation device of the automatic charging system configuration module of the electric vehicle and the simulation method using it
JPH08194506A (en) Controller
JPH09223043A (en) Test method using plural simulations
JP2008090394A (en) Simulator, simulation system and program
JP2625571B2 (en) Online system test method
JP2001175502A (en) Telegraphic message simulator and recording medium therefor

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20041122

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041130

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050121

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050420

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20090428

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100428

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100428

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110428

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120428

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120428

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130428

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees