JP2003241805A - Development support system and program product - Google Patents

Development support system and program product

Info

Publication number
JP2003241805A
JP2003241805A JP2002039230A JP2002039230A JP2003241805A JP 2003241805 A JP2003241805 A JP 2003241805A JP 2002039230 A JP2002039230 A JP 2002039230A JP 2002039230 A JP2002039230 A JP 2002039230A JP 2003241805 A JP2003241805 A JP 2003241805A
Authority
JP
Japan
Prior art keywords
plc
communication
development support
communication condition
information
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.)
Granted
Application number
JP2002039230A
Other languages
Japanese (ja)
Other versions
JP4000864B2 (en
Inventor
Yutaka Fujii
裕 藤井
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
Omron Tateisi Electronics Co
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, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP2002039230A priority Critical patent/JP4000864B2/en
Publication of JP2003241805A publication Critical patent/JP2003241805A/en
Application granted granted Critical
Publication of JP4000864B2 publication Critical patent/JP4000864B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a development support system capable of connecting with PLC having errors in an easy and quick operation and making it in a debug state by obtaining necessary information. <P>SOLUTION: The development support system uses a communication condition selected in sequence from the front position of a plurality of communication conditions (communication speed, protocol or the like) required for communication with a PLC body 2 housed in a communication conditions database 13, and transmits a return request of a machine code of the PLC to the PLC body via a communication interface 11, and determines proper communication conditions based on present responses from the PLC body. The connection with the PLC body is established under the determined proper communication conditions, and then, a pre-processing function (mounted in MPU 12) obtaining necessary information from the PLC body for debugging is prepared. Thus, debugging operation becomes feasible by performing the pre-processing function. <P>COPYRIGHT: (C)2003,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】この発明は、開発支援装置及
びプログラム製品に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a development support device and a program product.

【0002】[0002]

【発明の背景】良く知られているように、FA(ファク
トリオートメーション)で用いられるプログラマブルコ
ントローラ(PLC)は、入力機器(スイッチやセンサ
など)のON/OFF情報を入力し、ラダー言語などで
書かれたシーケンスプログラム(ユーザプログラム)に
沿って論理演算を実行して、その演算結果により、出力
機器(リレーやバルブ、アクチュエータなど)にON/
OFF情報の信号を出力することで制御を行う。
BACKGROUND OF THE INVENTION As is well known, a programmable controller (PLC) used in FA (factory automation) inputs ON / OFF information of an input device (switch, sensor, etc.) and writes it in a ladder language or the like. The logical operation is executed according to the created sequence program (user program), and the output device (relay, valve, actuator, etc.) is turned on / off according to the operation result.
Control is performed by outputting a signal of OFF information.

【0003】ところで、PLCに異常が発生した場合、
その異常箇所を特定するためにPLCのユーザプログラ
ム等を開発支援装置上に読み出し、そのPLCと開発支
援装置のコネクションを確立する。その後、開発支援装
置のデバッグ機能により問題箇所の特定を行う。なお、
問題箇所の特定が行われたならば、ユーザプログラム等
を適宜修正し、修正後のユーザプログラム等をPLCに
ダウンロードすることにより異常復帰し、正常なシステ
ムの稼動が行える。
By the way, when an abnormality occurs in the PLC,
In order to identify the abnormal portion, a PLC user program or the like is read onto the development support device, and a connection between the PLC and the development support device is established. After that, the problem area is identified by the debug function of the development support device. In addition,
Once the problematic portion is identified, the user program and the like are appropriately modified, and the corrected user program and the like are downloaded to the PLC to recover abnormally, and normal system operation can be performed.

【0004】そして、上記したデバッグ処理を行える状
態にするまでの手順として、従来は以下に示す操作,手
順を行うようにしている。すなわち、一例としては、バ
ックアップデータを開発支援装置に読み込むとともに、
PLCと接続した状態でデバッグを実施するものがあ
る。しかし、この方式では、異常発生時に直ぐに対処す
るためには、全てのPLCの周囲にそのPLCのバック
アップデータを用意しておく必要がある。さらに、正し
くデバッグするためには、バックアップデータの内容
と、PLCが保有するデータの内容が一致している必要
があるとともに、異常は何時発生するか不明である。よ
って、常にPLCが持つデータの内容とバックアップデ
ータの内容とを一致させる仕組みを構築し、実行させる
必要がある。すると、係るバックアップの内容を一致さ
せる処理の負荷がかかり、PLC本来の処理に対する影
響が生じる。
Conventionally, the following operations and procedures are performed as a procedure until the above-mentioned debug processing can be performed. That is, as an example, while reading the backup data into the development support device,
Some of them perform debugging while connected to a PLC. However, in this method, it is necessary to prepare backup data for all PLCs around all the PLCs in order to immediately deal with an abnormality. Furthermore, in order to debug correctly, the contents of the backup data and the contents of the data held by the PLC must match, and it is unknown when the abnormality will occur. Therefore, it is necessary to build and execute a mechanism for always matching the data content of the PLC with the backup data content. Then, the load of the processing for matching the contents of the backup is applied, and the original processing of the PLC is affected.

【0005】また、別の方式としては、開発支援装置
(例えば、CX−Progammer:出願人の製品)
上で、メンテナンス対象となるPLC用のプロジェクト
を生成した後、PLCと接続するとともにそのPLCか
ら必要なデータを読み出して開発支援装置に取り込む。
そして、その取り込んだデータに基づいてデバッグ処理
をすることもできる。
As another method, a development support device (for example, CX-Programmer: a product of the applicant)
After the PLC project to be maintained is generated, it is connected to the PLC and necessary data is read from the PLC and loaded into the development support device.
Then, it is possible to perform a debug process based on the captured data.

【0006】ところで、プロジェクトを生成するために
は、まず最初に対象となるPLCの機種コード(型式)
や通信条件を設定する必要がある。そのため、ユーザは
異常が発生しているPLCの機種コード,通信条件をマ
ニュアルその他により取得し、その情報を開発支援装置
の入力装置を介して登録しなければならない。しかし、
異常発生時の緊迫した状況のもとで、機種コード等を探
し出して登録するのは煩雑である。また、PLC自体が
外部に露出しているような場合には、機種コードは、直
接視認して確認することができる可能性もあるが、PL
Cが装置内部に組み込まれているような場合には機種コ
ードを見ることができず、機種コードの判別が困難でプ
ロジェクトを生成するまでに時間がかかり、デバッグを
実行可能な状態にするまでに時間かがかかってしまうと
言う問題がある。
By the way, in order to generate a project, first, the model code (model) of the target PLC
And communication conditions need to be set. Therefore, the user must acquire the model code of the PLC in which the abnormality has occurred and the communication conditions by a manual or the like, and register the information via the input device of the development support device. But,
It is troublesome to find out and register the model code and the like under a tense situation when an abnormality occurs. In addition, if the PLC itself is exposed to the outside, the model code may be able to be visually checked directly, but
When C is built in the device, the model code cannot be seen, it is difficult to distinguish the model code, it takes time to generate a project, and it becomes possible to debug. There is a problem that it takes time.

【0007】さらに、上記したいずれの場合でも、ユー
ザ(メンテナンス担当者)は、デバッグ機能により異常
箇所の特定を行う作業に入るための前処理として、様々
な操作を行う必要があり煩雑である。しかも、係るユー
ザは必ずしも開発支援装置の操作を熟知しているとは限
らないので、操作数が多くなるほど短時間での問題解決
を図る上での障害となる。特に、メンテナンスをする場
合には、対象となるPLCを含むFAシステムを停止す
ることになり、その停止期間中は生産処理ができないた
め、迅速に異常箇所を特定するとともに、メンテナンス
してシステムを復旧させることが重要であるので、上記
のようにデバッグを開始するまでに時間がかかることは
問題となる。
Further, in any of the above cases, the user (maintenance staff) needs to perform various operations as a pre-process for starting the work of identifying the abnormal portion by the debug function, which is complicated. Moreover, since the user does not necessarily have a thorough knowledge of the operation of the development support apparatus, the larger the number of operations, the more difficult it is to solve the problem in a short time. In particular, when performing maintenance, the FA system including the target PLC will be stopped, and production processing cannot be performed during that stop period, so abnormal locations can be quickly identified and maintenance can be performed to restore the system. Since it is important to do so, it takes a long time to start debugging as described above, which is a problem.

【0008】この発明は、簡単な操作でかつ迅速に異常
発生したPLCと接続し、必要な情報を取得してデバッ
グ可能な状態にすることができる開発支援装置及びプロ
グラム製品を提供することを目的とする。
It is an object of the present invention to provide a development support device and a program product which can be connected to a PLC in which an abnormality has occurred quickly by a simple operation and can acquire necessary information and put it in a debuggable state. And

【0009】[0009]

【課題を解決するための手段】この発明による開発支援
装置は、PLCと通信する通信手段と、その通信手段を
介して取得した前記PLCの情報に基づきデバッグする
デバッグ手段を備えたPLC用の開発支援装置である。
そして、前記PLCと通信するための複数の通信条件を
記憶する通信条件記憶手段と、前記通信条件記憶手段に
格納された前記複数の通信条件から択一的に選択した通
信条件を用い、前記通信手段を介して前記PLCに対し
てそのPLCを特定する特定情報の返送要求を発信し、
前記PLCからのレスポンスの有無から正しい通信条件
を決定するとともに、決定した正しい通信条件に従って
前記PLCとコネクションの確立を図る手段と、コネク
ションを確立した状態で、前記PLCからデバッグに必
要な情報を取得する取得手段を備えるように構成した。
コネクションの確立を図る手段並びに取得手段は、実施
の形態では、前処理機能により実現している。この通信
手段としては、例えば、実施の形態で示したようにシリ
アル通信をする通信手段とすることができる。
A development support device according to the present invention is a development support device for a PLC including a communication means for communicating with a PLC and a debug means for debugging based on the information of the PLC acquired through the communication means. It is a support device.
The communication is performed using a communication condition storage unit that stores a plurality of communication conditions for communicating with the PLC, and a communication condition that is alternatively selected from the plurality of communication conditions stored in the communication condition storage unit. A request for returning specific information for identifying the PLC to the PLC via means,
A means for determining a correct communication condition based on the presence or absence of a response from the PLC, and a means for establishing a connection with the PLC according to the determined correct communication condition, and acquiring information necessary for debugging from the PLC while the connection is established. It is configured to include an acquisition means for
In the embodiment, the means for establishing the connection and the means for acquiring are realized by the preprocessing function. This communication means may be, for example, a communication means for performing serial communication as shown in the embodiment.

【0010】この発明によれば、異常発生したPLCに
開発支援装置を接続し、動作を開始すると、まず、予め
用意した通信条件を順次用いて返送要求をする。する
と、PLCが対応している通信条件で返送要求を受け取
ると、PLCはそれに対してレスポンスを返すことがで
きるが、異なる返信条件で送られてきた場合にはPLC
は返送要求を正しく受信できず、よってレスポンスも返
せない。従って、開発支援装置は、レスポンスの有無に
より返送要求を発信した際の通信条件が正しいものか否
かが判断できる。つまり、レスポンスを受領すると、そ
のとき送った通信条件が対象となるPLCが対応してい
る正しい通信条件と判断できる。また、レスポンスに
は、PLCを特定する特定情報(実施の形態では機種コ
ード(型式))を送ってくるので、デバッグ処理などを
する際に、係る特定情報を利用することができる。そし
て、通信条件や特定情報を自動的に取得できるので、容
易かつ迅速にデバッグが可能な状態にすることができ
る。
According to the present invention, when the development support device is connected to the PLC in which an abnormality has occurred and the operation is started, first, a return request is made by sequentially using the communication conditions prepared in advance. Then, when the PLC receives a return request under the communication conditions that the PLC supports, the PLC can return a response to it, but if it is sent under different reply conditions, the PLC can return the response.
Cannot properly receive the return request and therefore cannot return the response. Therefore, the development support apparatus can determine whether or not the communication conditions when the return request is transmitted are correct depending on the presence or absence of the response. That is, when the response is received, it can be determined that the communication condition sent at that time is the correct communication condition supported by the target PLC. Further, since specific information (a model code (model) in the embodiment) that identifies the PLC is sent to the response, the specific information can be used when performing debugging processing and the like. Further, since the communication condition and the specific information can be automatically acquired, it is possible to easily and quickly perform the debugging.

【0011】すなわち、レスポンスで取得した前記特定
情報に基づき、デバッグをするために必要なプロジェク
トを生成する機能を備え、そのプロジェクト生成後に前
記取得手段を稼動させるとともに、前記取得した情報を
前記プロジェクトに追加するように構成することができ
る。また、係るプロジェクトは、前記決定した正しい通
信条件とレスポンスで取得した前記特定情報に基づいて
行うようにすることもできる。このプロジェクト生成並
びに情報の追加により、デバッグが可能な状態になる。
That is, it has a function of generating a project required for debugging based on the specific information acquired in the response, operates the acquisition means after generating the project, and transfers the acquired information to the project. It can be configured to add. Further, the project can be performed based on the determined correct communication condition and the specific information acquired by the response. By creating this project and adding information, debugging is enabled.

【0012】さらに、上記した各発明を前提とし、前記
択一的に選択する前記通信条件は、正しい通信条件に選
択されたものを優先的に選択するようにすると好まし
い。このようにすると、開発支援装置を使用することに
より、その工場などにおいてよく使用するPLCに設定
された通信条件が優先的に選択されることになる。よっ
て、正しい通信条件がより迅速に決定され、迅速にデバ
ッグ可能な状態に設定できる。
Further, on the premise of each of the above-mentioned inventions, it is preferable that the communication conditions selected as the alternative are preferentially selected as the communication conditions selected as correct communication conditions. In this way, by using the development support device, the communication condition set in the PLC often used in the factory or the like is preferentially selected. Therefore, the correct communication condition can be determined more quickly, and the debug state can be set quickly.

【0013】さらに好ましくは、レスポンスで取得した
前記特定情報に関する情報を表示装置に出力表示する出
力手段を備えることである。そのようにすると、対象と
なっているPLCの機種等を知ることができる。
More preferably, it is provided with an output means for outputting and displaying the information on the specific information acquired by the response on a display device. By doing so, it is possible to know the target PLC model and the like.

【0014】また、レスポンスで取得した前記特定情報
に基づき、ユーザプログラムを修正する際に使用可能な
コードであるか否かをチェックし、前記使用可能なコー
ドのみを利用可能にする機能を備えるとよい。このよう
にすると、誤って使用できないコードを用いてユーザプ
ログラム等を修正することが抑制できる。特に、オンラ
インエディットをする場合に効果的に作用する。
Further, it is provided with a function of checking whether or not the code can be used when modifying the user program based on the specific information acquired in the response, and making only the usable code available. Good. With this configuration, it is possible to prevent the user program or the like from being modified by using a code that cannot be used by mistake. Especially, it works effectively when performing online editing.

【0015】本発明に係るプログラム製品は、PLCと
通信する通信手段を介して取得した前記PLCの情報に
基づきデバッグするデバッグ手段を備えた開発支援装置
用のプログラム製品であって、前記PLCと通信するた
めの複数の通信条件を記憶する通信条件記憶部にアクセ
スし、前記複数の通信条件から択一的に通信条件を取得
する処理と、その取得した通信条件を用い、前記通信手
段を介して前記PLCに対してそのPLCを特定する特
定情報の返送要求を発信する処理と、前記PLCからの
レスポンスの有無から正しい通信条件を決定するととも
に、決定した正しい通信条件に従って前記PLCとコネ
クションの確立を図る処理と、コネクションを確立した
状態で、前記PLCからデバッグに必要な情報を取得す
る処理を実行するプログラム部分を持つようにすること
である。
A program product according to the present invention is a program product for a development support device equipped with a debug means for debugging based on the information of the PLC obtained through a communication means for communicating with the PLC, and communicates with the PLC. Access to a communication condition storage unit that stores a plurality of communication conditions for performing, and a process of selectively acquiring communication conditions from the plurality of communication conditions, and using the acquired communication conditions, via the communication unit A process of transmitting a request for returning specific information specifying the PLC to the PLC, and determining a correct communication condition from the presence or absence of a response from the PLC, and establishing a connection with the PLC according to the determined correct communication condition. Executes a process for obtaining and a process for obtaining information necessary for debugging from the PLC while the connection is established It is to have a program portion.

【0016】[0016]

【発明の実施の形態】図1は、本発明に係る開発支援装
置10を含むシステム構成の一例を示している。図1に
示すように、電源ユニット1,PLC本体(CPUユニ
ットとも称する)2,I/Oユニット3など各種のユニ
ットをCPUバスなどにより電気・機械的に連結してP
LCを構成している。PLC本体2には、シリアルポー
ト2aが設けられており、このシリアルポート2aに開
発支援装置10を通信ケーブル5を介して接続可能とな
っている。このPLC本体2と開発支援装置10はRS
−232Cにより、情報(ユーザプログラムその他のデ
ータ等)の送受を行えるようになっている。また、具体
的な図示は省略するが、PLC本体2のメモリには、ユ
ーザプログラム,入出力情報等の動作状態を示すデー
タ,機械コード(型式)などの自己を特定する特定情報
等が格納され、開発支援装置10からの命令に従って、
必要な情報を開発支援装置10に返送する機能も有して
いる。
FIG. 1 shows an example of a system configuration including a development support device 10 according to the present invention. As shown in FIG. 1, various units such as a power supply unit 1, a PLC main body (also referred to as a CPU unit) 2, an I / O unit 3 are electrically and mechanically connected by a CPU bus, etc.
It constitutes the LC. The PLC main body 2 is provided with a serial port 2a, and the development support device 10 can be connected to the serial port 2a via a communication cable 5. The PLC main body 2 and the development support device 10 are RS
The 232C enables transmission / reception of information (user program, other data, etc.). Although not specifically shown, the memory of the PLC main body 2 stores a user program, data indicating an operating state such as input / output information, specific information identifying itself such as a machine code (model), and the like. , According to the instruction from the development support device 10,
It also has a function of returning necessary information to the development support device 10.

【0017】図2は、本発明に係る開発支援装置10の
好適な一実施の形態の内部構成を示している。図2に示
すように、RS−232C用の通信インタフェース11
を備え、この通信インタフェース11を介してPLC本
体2と情報の送受を行う。また、受け取った情報は、M
PU12に取り込まれ、このMPU12により具体的な
情報の送受が制御される。このMPU12には、本発明
との関係で言うと、デバッグ機能と、前処理機能があ
る。デバッグ機能は、従来から公知のもので、PLC本
体2から取得した情報(ユーザプログラムやデータ等)
に基づき、デバッグ処理を行い、異常箇所を特定する機
能を有する。さらに、異常箇所を修正したり、修正後の
プログラム等をPLC本体2にダウンロードする機能も
備える。なお、係る処理を行うための具体的なアルゴリ
ズムは、従来と同様のものを用いることができるため、
その詳細な説明を省略する。
FIG. 2 shows the internal structure of a preferred embodiment of the development support device 10 according to the present invention. As shown in FIG. 2, the communication interface 11 for RS-232C
, And exchanges information with the PLC main body 2 via the communication interface 11. Also, the information received is M
The MPU 12 takes in the data and controls transmission / reception of specific information. The MPU 12 has a debug function and a pre-processing function in relation to the present invention. The debug function is a conventionally known one, and information (user program, data, etc.) acquired from the PLC main body 2
Based on the above, it has a function of performing a debugging process and identifying an abnormal portion. Further, it also has a function of correcting an abnormal portion and downloading the corrected program or the like to the PLC main body 2. Since a specific algorithm for performing such processing can be the same as the conventional one,
Detailed description thereof will be omitted.

【0018】ここで本発明では、ハードディスク等の記
憶部16内に、通信条件データベース13を備えてい
る。この通信条件データベース13は、図3に示すよう
に、PLC種別(PLC シリーズ),ネットワーク種
別(通信手順)並びに通信速度を関連づけたテーブルと
なっている。開発支援装置10のメンテナンス対象のP
LC本体の全ての通信条件(この例では14種類)を用
意している。
According to the present invention, the communication condition database 13 is provided in the storage unit 16 such as a hard disk. As shown in FIG. 3, the communication condition database 13 is a table in which PLC types (PLC series), network types (communication procedures), and communication speeds are associated with each other. P of the maintenance target of the development support device 10
All communication conditions (14 types in this example) of the LC body are prepared.

【0019】MPU12に実装された前処理機能は、こ
の通信条件データベース13に登録された複数の通信条
件を先頭から順次実行してPLC本体2との接続を試
み、接続対象のPLC本体2の通信条件を決定し、次い
で、対象のPLC本体2用のプロジェクトを生成し、P
LC本体2から必要な情報を読み出す処理を実行する機
能を有している。そして、具体的には、図4に示すフロ
ーチャートを実施する機能を有している。すなわち、ま
ず通信条件データベース13にアクセスし、通信条件を
1つ取得する(ST1)。この取得する通信条件は、先
頭から順に行うため、前回取得した通信条件の次に格納
されている通信条件を取得することになる。そして、1
回目は当然のことながら先頭(図3の場合には「C S
eries, SYSWAY,9600」)の通信条件
を取得することになる。
The preprocessing function implemented in the MPU 12 sequentially executes a plurality of communication conditions registered in the communication condition database 13 from the beginning to attempt connection with the PLC main body 2 and communicate with the PLC main body 2 to be connected. Determine the conditions, then generate a project for the target PLC body 2,
It has a function of executing a process of reading out necessary information from the LC body 2. Then, specifically, it has a function of implementing the flowchart shown in FIG. That is, first, the communication condition database 13 is accessed to acquire one communication condition (ST1). Since the communication conditions to be acquired are sequentially performed from the beginning, the communication condition stored next to the communication condition acquired last time is acquired. And 1
As a matter of course, the first time (in the case of FIG. 3, “C S
, communication, 9600 ").

【0020】次いで、新しい通信条件を取得できたか否
かを判断する(ST2)。つまり、ステップ1の処理を
実行し、新たな通信条件を取得できたか否かを判断す
る。そして、通信条件がない場合には、前回までの処理
で全ての通信条件についてのチェックが行われ、いずれ
も該当する通信条件のものがなかったことを意味するの
で、エラーを通知して今回の処理を終了する(ST
3)。
Next, it is judged whether or not a new communication condition has been acquired (ST2). That is, the process of step 1 is executed to determine whether a new communication condition has been acquired. If there is no communication condition, all the communication conditions are checked in the processing up to the previous time, and it means that there is no communication condition that corresponds, so an error is notified and this End processing (ST
3).

【0021】また、新しい条件を取得できたならば、そ
の通信条件でPLC本体2に対して「機種コード(型
式)」の返送要求をし、機種コードの取得を試みる(S
T4)。PLC本体2は、上記返送要求を正常に受信し
たならば、その返送要求に応じてレスポンスとして自己
の機種コードを開発支援装置10に返す。
If a new condition can be acquired, the PLC main unit 2 is requested to return the "model code (model)" under the communication condition, and an attempt is made to acquire the model code (S).
T4). When the PLC main body 2 normally receives the return request, the PLC main body 2 returns its own model code to the development support device 10 as a response in response to the return request.

【0022】すなわち、PLC本体2としては、上記し
た14種類の通信条件の中で何れか1種類に対応してい
る(複数種に対応可能にしても良い)ので、PLC本体
2が対応できる通信条件で返送要求が送られてきた場合
には、その内容を解析し正常なレスポンスを返すが、対
応していない通信条件で送られてきた場合には、正常に
受信することができないので、レスポンスを返すことも
できない。
That is, since the PLC main body 2 corresponds to any one of the above 14 kinds of communication conditions (may be compatible with a plurality of kinds), the communication which the PLC main body 2 can correspond to. If a return request is sent under the conditions, the content is analyzed and a normal response is returned, but if it is sent under an unsupported communication condition, the response cannot be received normally. Cannot be returned.

【0023】換言すると、開発支援装置10側に立つ
と、PLC本体2からレスポンスがあると、ステップ4
で発信した際に使用した通信条件が正しいものであると
判断でき、また、一定時間たってもレスポンスがない場
合には間違った通信条件であったと推定できる。そこ
で、ステップ5の分岐判断では、レスポンスの有無を判
断し、レスポンスがない場合にはステップ1に戻り次の
通信条件に基づく処理を実行する。
In other words, when standing on the side of the development support device 10, when there is a response from the PLC main body 2, step 4
It can be determined that the communication conditions used when the call was made are correct, and if there is no response within a certain period of time, it can be estimated that the communication conditions were incorrect. Therefore, in the branch determination of step 5, it is determined whether or not there is a response, and if there is no response, the process returns to step 1 and the process based on the next communication condition is executed.

【0024】一方、レスポンスを受けた場合には、対象
としているPLC本体2の通信条件がステップ4で使用
した通信条件であると判断できるので、ステップ6に進
み、通信条件データベース13の履歴情報を更新する。
実際には、今回使用した通信条件を通信条件データベー
ス13の先頭に移動する。例えば、図3に示すデータ構
造の具体例において、仮に10番目の「CS1 Ser
ies,SYSWAY,115000」でレスポンスを
受けた場合には、この通信条件を先頭、つまり、「C
Series,SYSWAY,9600」の上に配置
し、以降1つずつ順に繰り下げる。これにより、同じP
LC本体2に対して次にメンテナンスを行う場合、今回
は10回目でようやく通信条件が決定されたが、次は、
1回目で「CS1 Series,SYSWAY,11
5000」(その間に別の通信条件のPLC本体との通
信を行っていない場合)が選択されるので、すぐに通信
条件の決定が行われる。
On the other hand, when the response is received, it can be judged that the communication condition of the target PLC body 2 is the communication condition used in step 4, so the process proceeds to step 6 and the history information of the communication condition database 13 is stored. Update.
Actually, the communication condition used this time is moved to the top of the communication condition database 13. For example, in the specific example of the data structure shown in FIG. 3, the tenth “CS1 Ser” is assumed.
When the response is “yes, SYSWAY, 115000”, this communication condition is set to the head, that is, “C
"Series, SYSWAY, 9600", and one by one. This allows the same P
When the LC main body 2 is to be maintained next time, the communication condition is finally decided at the 10th time this time, but next time,
The first time, "CS1 Series, SYSWAY, 11
5000 "(when communication with the PLC main unit having another communication condition is not being performed during that time), the communication condition is immediately determined.

【0025】また、1つの工場内に設置されるPLC本
体の通信条件は、1つとは限らないものの、数種類に集
約されていることが多い。従って、この開発支援装置1
0を何回か使用することにより、その工場で使用される
通信条件が、通信条件データベース13の上位(先頭
側)に集まってくるので、その後は、各PLC本体2に
対する通信条件の決定が比較的短時間で行えることがで
きる。
The communication condition of the PLC main body installed in one factory is not limited to one, but is often summarized into several types. Therefore, this development support device 1
By using 0 several times, the communication conditions used in the factory are gathered in the higher order (top side) of the communication condition database 13, and thereafter, the determination of the communication conditions for each PLC main body 2 is compared. It can be done in a very short time.

【0026】なお、優先的に選択する方法としては、上
記したように正しい通信条件として決定されたものを先
頭に持ってくるものに限ることは無く、例えば、選択さ
れた回数を積算していき、積算回数の多いものから順に
選択するようにすることもできる。
The method of preferentially selecting is not limited to the method of bringing the one determined as the correct communication condition as described above to the beginning, and, for example, the number of times of selection is accumulated. It is also possible to select in descending order of the number of times of integration.

【0027】また、ステップ1において先頭から順に通
信条件を取得する処理であるが、例えば、ポインタによ
り読み出す通信条件を指定するようにしておいた場合、
ステップ1で通信条件を取得する都度、次の通信条件に
ポインタを移動しておくとともに、ステップ6にてポイ
ンタの位置を通信条件データベース13の先頭に戻すこ
とにより実行できる。また、例えば、ステップ1の前に
n=0にセットし、ステップ1では「n=n+1」を演
算実行後、先頭からn番目の通信条件を取得するように
することによっても対応できる。
Further, in the process of obtaining the communication conditions in order from the beginning in step 1, for example, when the communication conditions to be read are designated by the pointer,
This can be performed by moving the pointer to the next communication condition each time the communication condition is acquired in step 1 and returning the position of the pointer to the head of the communication condition database 13 in step 6. Alternatively, for example, n = 0 may be set before step 1, and in step 1, “n = n + 1” is calculated and then the nth communication condition from the beginning is acquired.

【0028】一方、本発明では、通信条件の確認の際
に、レスポンスとして機種コードの情報を取得するよう
にしたため、上記のようにして対象のPLC本体2の通
信条件が決定できると、レスポンスの内容から対象のP
LC本体2の機種コード(型式)も同時に取得できる。
そこで、この取得した機種コードと通信条件に基づい
て、今回対象のPLC本体2用のプロジェクトを生成す
る(ST7)。この生成されたプロジェクト14は、ハ
ードディスク等の記憶部16に格納される。なお、プロ
ジェクト生成は、機種コードに基づいて行い、通信条件
は使用しないようにすることもできる。
On the other hand, in the present invention, since the model code information is acquired as a response when the communication condition is confirmed, if the communication condition of the target PLC body 2 can be determined as described above, Target P from content
The model code (model) of the LC body 2 can also be acquired at the same time.
Therefore, based on the acquired model code and communication conditions, a project for the PLC main body 2 of this time is generated (ST7). The generated project 14 is stored in the storage unit 16 such as a hard disk. The project may be generated based on the model code and the communication condition may not be used.

【0029】ここで生成されるプロジェクトのプロジェ
クトデータ構造は、PLC機種情報(型式,通信条
件),I/Oテーブル,システム設定,初期値データ,
変数テーブル,プログラムなどであり、PLC機種情報
以外は、各種情報を格納するためのエリアが確保され
る。また、プロジェクトが機種コード(型式)に基づい
て生成される(通信条件を使用しない)場合には、PL
C機種情報としては型式のみとなる。さらに、PLC機
種情報(型式や通信条件)に基づいてプロジェクトを生
成した場合、いずれも生成する際の基準となるPLC機
種情報をプロジェクトデータとして登録するようした
が、本発明はこれに限ることはなく、プロジェクト内に
PLC機種情報を格納しないようにしても良い。
The project data structure of the project generated here is PLC model information (model, communication condition), I / O table, system setting, initial value data,
Areas for storing various information such as variable tables, programs, etc. other than PLC model information are secured. Also, if the project is generated based on the model code (model) (does not use communication conditions), PL
Only the model is available as C model information. Furthermore, when a project is generated based on PLC model information (model or communication conditions), PLC model information, which is a reference for generating any of them, is registered as project data, but the present invention is not limited to this. Alternatively, the PLC model information may not be stored in the project.

【0030】なお、このプロジェクトは、発明の背景の
欄でも記載したが、例えば、CX−Progammer
(出願人の製品)にてデバッグ処理をするに先立ち生成
されるもである。他社製品でも呼び名は異なる場合があ
るが、その後にPLCから読み取った情報を格納する領
域を設定するためのものである。
Although this project was described in the section of the background of the invention, for example, CX-Programmer
(Applicant's product) is also generated prior to the debug processing. Although the name may be different for other companies' products, this is for setting an area for storing the information read from the PLC thereafter.

【0031】このプロジェクト生成後、決定した通信条
件によりPLC本体2とオンライン接続をし、コネクシ
ョンの確立を図る(ST8)。次いで、PLC本体2か
ら必要な情報(ユーザプログラム,変数テーブルその他
のデータ等)を読み出し、取得した情報を上記生成した
プロジェクトの該当エリアに格納する(ST9)。その
後、生成し、必要な情報が格納されたプロジェクトに基
づき、プログラムにモニタリングを開始する。
After the project is generated, online connection is made with the PLC main body 2 according to the determined communication conditions to establish the connection (ST8). Next, necessary information (user program, variable table, other data, etc.) is read from the PLC main body 2 and the acquired information is stored in the corresponding area of the generated project (ST9). After that, the program starts monitoring based on the project in which the necessary information is generated and stored.

【0032】つまり、デバッグ機能を稼働させ、所望の
デバッグ処理を実行し、異常箇所の特定を行う。また、
必要な修正処理も行うことになる。このとき、PLC本
体の型式によって使用できるコードが決まっているた
め、上記取得した機種コードに基づき、修正したプログ
ラム等に用いたコードが使用可能な物か否かのチェック
も行う。特にオンラインエディットの場合には、このチ
ェック機能が有効なものとなる。このように、取得した
機種コードは、プロジェクト生成のために使用するのみ
ではなく、係るチェックのために利用することもでき
る。
That is, the debug function is activated, desired debug processing is executed, and an abnormal portion is specified. Also,
Necessary correction processing will also be performed. At this time, since the code that can be used is determined depending on the model of the PLC main body, it is also checked whether the code used for the modified program or the like is usable based on the acquired model code. Especially in the case of online editing, this check function is effective. In this way, the acquired model code can be used not only for the project generation but also for the check.

【0033】このように、本実施の形態では、ユーザ
は、対象となるPLC本体2と開発支援装置10を接続
するとともに、前処理機能を稼働させるといった簡単な
操作を行うだけで、後は係る前処理機能がコネクション
の確立から情報の読み出しを行い、デバッグ可能な状態
になるまでを自動的に行うことができる。よって、操作
性が良好であるとともに、短時間でデバッグ可能な状態
になるので、メンテナンスに要する全体の時間も短縮す
ることができる。
As described above, in the present embodiment, the user only needs to connect the target PLC main body 2 and the development support device 10 and perform a simple operation such as operating the preprocessing function. The pre-processing function can automatically perform the steps from the establishment of the connection to the reading of information until the debuggable state. Therefore, the operability is good and the debug state can be achieved in a short time, so that the total time required for maintenance can be shortened.

【0034】また、説明は前後するが、モニタリング,
デバッグ時には、図2に示した通り、ディスプレイイン
タフェース15を介してディスプレイ10a上に必要な
情報を出力表示することになる。この出力表示するため
のMPU12,ディスプレイインタフェース15におけ
る機能自体は従来公知のものであるので説明を省略す
る。
Also, although the explanation goes back and forth, monitoring,
At the time of debugging, as shown in FIG. 2, necessary information is output and displayed on the display 10a via the display interface 15. Since the functions themselves of the MPU 12 and the display interface 15 for displaying the output are known in the related art, description thereof will be omitted.

【0035】ここで本実施の形態では、取得した機種コ
ード或いはそれに基づく機種名などの処理対象のPLC
本体を特定する情報をディスプレイ10aに表示するよ
うにしている。取得した機種コードをそのまま表示する
のではなく、ユーザがわかりやすい名称で表示する場合
には、機種コードと名称を対応付けしたテーブルを予め
メモリ等の記憶手段に格納しておき、MPU12は、そ
こにアクセスしてテーブルを参照することにより表示す
べき情報を取得することができる。これは、本実施の形
態では、ユーザは処理対象のPLC本体の機種コード等
を知らなくてもPLC本体との間でコネクションを確立
させて情報の読み出しを行うことができるため、そのま
までは処理対象のPLC本体の機種が分からず、異常箇
所の特定や修正作業に影響を与えるおそれもある(使用
可能なコードが不明等)。そこで、処理対象の機種コー
ド等の機種を特定する特定情報を出力表示することによ
り、係る対象のPLC本体の機種を容易に知ることがで
き、迅速かつ正確なメンテナンスをすることができる。
In this embodiment, the PLC to be processed such as the acquired model code or the model name based on the acquired model code.
Information for identifying the main body is displayed on the display 10a. When the acquired model code is not displayed as it is but displayed with a name that the user can easily understand, a table in which the model code and the name are associated with each other is stored in advance in a storage means such as a memory, and the MPU 12 stores the table. The information to be displayed can be acquired by accessing and referring to the table. This is because in the present embodiment, the user can establish a connection with the PLC main body and read the information without knowing the model code of the PLC main body to be processed. There is a possibility that it may affect the identification and correction work of the abnormal part because the model of the PLC main body is not known (such as the usable code is unknown). Therefore, by outputting and displaying the specific information for identifying the model such as the model code of the processing target, the model of the PLC main body as the target can be easily known, and quick and accurate maintenance can be performed.

【0036】なおまた、上記した図4に示すフローチャ
ートを実行する前処理機能は、本実施の形態ではアプリ
ケーションプログラム(プログラム製品)で構成され、
開発支援装置10であるコンピュータにインストールさ
れ、そのMPUにおいて、各処理部となって稼働する。
また、通信条件データベースに記憶されるべき情報も、
上記プログラム製品として、或いはプログラム製品とと
もに供給されるようにしてもよい。
The preprocessing function for executing the flowchart shown in FIG. 4 is constituted by an application program (program product) in this embodiment.
It is installed in the computer which is the development support device 10 and operates as each processing unit in the MPU.
Also, the information that should be stored in the communication condition database,
It may be supplied as the program product or together with the program product.

【0037】[0037]

【発明の効果】以上のように、この発明では、正しい通
信条件を決定するとともに特定情報を自動的に取得でき
るので、簡単な操作でかつ迅速に異常発生したPLCと
接続し、必要な情報を取得してデバッグ可能な状態にす
ることができる。
As described above, according to the present invention, since the correct communication condition can be determined and the specific information can be automatically obtained, the necessary information can be connected by the simple operation and the quick connection to the PLC. Can be obtained and put in a debuggable state.

【図面の簡単な説明】[Brief description of drawings]

【図1】システム全体の一例を示す図である。FIG. 1 is a diagram illustrating an example of an entire system.

【図2】本発明に係る開発支援装置の内部構造の一例を
示す図である。
FIG. 2 is a diagram showing an example of an internal structure of a development support device according to the present invention.

【図3】通信条件データベースの内部構造の一例を示す
図である。
FIG. 3 is a diagram showing an example of an internal structure of a communication condition database.

【図4】MPUの機能を説明するフローチャートであ
る。
FIG. 4 is a flowchart illustrating the function of the MPU.

【符号の説明】[Explanation of symbols]

1 電源ユニット 2 PLC本体 2a シリアルポート 3 I/Oユニット 10 開発支援装置 10a ディスプレイ 11 通信インタフェース 12 MPU 13 通信条件データベース 14 プロジェクト 15 ディスプレイインタフェース 16 記憶部 1 power supply unit 2 PLC body 2a serial port 3 I / O unit 10 Development support device 10a display 11 Communication interface 12 MPU 13 Communication condition database 14 projects 15 Display interface 16 Memory

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 PLCと通信する通信手段と、その通信
手段を介して取得した前記PLCの情報に基づきデバッ
グするデバッグ手段を備えたPLC用の開発支援装置に
おいて、 前記PLCと通信するための複数の通信条件を記憶する
通信条件記憶手段と、 前記通信条件記憶手段に格納された前記複数の通信条件
から択一的に選択した通信条件を用い、前記通信手段を
介して前記PLCに対してそのPLCを特定する特定情
報の返送要求を発信し、前記PLCからのレスポンスの
有無から正しい通信条件を決定するとともに、決定した
正しい通信条件に従って前記PLCとコネクションの確
立を図る手段と、 コネクションを確立した状態で、前記PLCからデバッ
グに必要な情報を取得する取得手段を備えたことを特徴
とする開発支援装置。
1. A development support device for a PLC, comprising: a communication means for communicating with the PLC; and a debug means for debugging based on the information of the PLC acquired via the communication means. Communication condition storing means for storing the communication condition of the PLC and the communication condition selected from the plurality of communication conditions stored in the communication condition storing means, A means for transmitting a request for returning specific information for identifying a PLC, determining a correct communication condition based on the presence or absence of a response from the PLC, establishing a connection with the PLC according to the determined correct communication condition, and establishing a connection. In a state, a development support device comprising an acquisition unit for acquiring information necessary for debugging from the PLC.
【請求項2】 レスポンスで取得した前記特定情報に基
づき、デバッグをするために必要なプロジェクトを生成
する機能を備え、 そのプロジェクト生成後に前記取得手段を稼動させると
ともに、前記取得した情報を前記プロジェクトに追加す
るようにしたことを特徴とする請求項1に記載の開発支
援装置。
2. A function for generating a project required for debugging based on the specific information acquired by a response, the acquisition means is operated after the project is generated, and the acquired information is stored in the project. The development support apparatus according to claim 1, wherein the development support apparatus is added.
【請求項3】 前記決定した正しい通信条件と、レスポ
ンスで取得した前記特定情報に基づき、デバッグをする
ために必要なプロジェクトを生成する機能を備え、 そのプロジェクト生成後に前記取得手段を稼動させると
ともに、前記取得した情報を前記プロジェクトに追加す
るようにしたことを特徴とする請求項1に記載の開発支
援装置。
3. A function for generating a project necessary for debugging based on the determined correct communication condition and the specific information acquired by a response, and while operating the acquisition means after generating the project, The development support apparatus according to claim 1, wherein the acquired information is added to the project.
【請求項4】 前記択一的に選択する前記通信条件は、
正しい通信条件に選択されたものを優先的に選択するよ
うにしたことを特徴とする請求項1から3の何れか1項
に記載の開発支援装置。
4. The communication condition selected as the alternative is
4. The development support device according to claim 1, wherein the development support device is configured to preferentially select one selected as a correct communication condition.
【請求項5】 レスポンスで取得した前記特定情報に関
する情報を表示装置に出力表示する出力手段を備えたこ
とを特徴とする請求項1から4のいずれか1項に記載の
開発支援装置。
5. The development support apparatus according to claim 1, further comprising an output unit configured to output and display information related to the specific information acquired by a response on a display device.
【請求項6】 レスポンスで取得した前記特定情報に基
づき、ユーザプログラムを修正する際に使用可能なコー
ドであるか否かをチェックし、前記使用可能なコードの
みを利用可能にする機能を備えたことを特徴とする請求
項1から5のいずれか1項に記載の開発支援装置。
6. A function of checking whether or not the code can be used when modifying a user program based on the specific information acquired by a response and making only the usable code available The development support apparatus according to claim 1, wherein the development support apparatus is a development support apparatus.
【請求項7】 PLCと通信する通信手段を介して取得
した前記PLCの情報に基づきデバッグするデバッグ手
段を備えた開発支援装置用のプログラム製品であって、 前記PLCと通信するための複数の通信条件を記憶する
通信条件記憶部にアクセスし、前記複数の通信条件から
択一的に通信条件を取得する処理、 その取得した通信条件を用い、前記通信手段を介して前
記PLCに対してそのPLCを特定する特定情報の返送
要求を発信する処理、 前記PLCからのレスポンスの有無から正しい通信条件
を決定するとともに、決定した正しい通信条件に従って
前記PLCとコネクションの確立を図る処理、 コネクションを確立した状態で、前記PLCからデバッ
グに必要な情報を取得する処理を実行するプログラム部
分を持つことを特徴とするプログラム製品。
7. A program product for a development support device, comprising: a debug means for debugging based on information of the PLC obtained through a communication means for communicating with the PLC, wherein a plurality of communications for communicating with the PLC are provided. A process of accessing a communication condition storage unit that stores a condition and selectively acquiring a communication condition from the plurality of communication conditions, and using the acquired communication condition, the PLC to the PLC via the communication unit. A process for issuing a request to return specific information for identifying a specific communication condition, a process for determining a correct communication condition based on the presence / absence of a response from the PLC, and a process for establishing a connection with the PLC according to the determined correct communication condition; And, it has a program part for executing a process for acquiring information necessary for debugging from the PLC. Program product that.
JP2002039230A 2002-02-15 2002-02-15 Development support apparatus, program product, and automatic monitoring method Expired - Lifetime JP4000864B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002039230A JP4000864B2 (en) 2002-02-15 2002-02-15 Development support apparatus, program product, and automatic monitoring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002039230A JP4000864B2 (en) 2002-02-15 2002-02-15 Development support apparatus, program product, and automatic monitoring method

Publications (2)

Publication Number Publication Date
JP2003241805A true JP2003241805A (en) 2003-08-29
JP4000864B2 JP4000864B2 (en) 2007-10-31

Family

ID=27780328

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002039230A Expired - Lifetime JP4000864B2 (en) 2002-02-15 2002-02-15 Development support apparatus, program product, and automatic monitoring method

Country Status (1)

Country Link
JP (1) JP4000864B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009020716A (en) * 2007-07-12 2009-01-29 Omron Corp Tool device and method for creating message transmission program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009020716A (en) * 2007-07-12 2009-01-29 Omron Corp Tool device and method for creating message transmission program

Also Published As

Publication number Publication date
JP4000864B2 (en) 2007-10-31

Similar Documents

Publication Publication Date Title
US9984244B2 (en) Controller, information processing apparatus, and recording medium
US20170068229A1 (en) Control system, method, program, and information processing device
US20080303472A1 (en) Method for replacement of a defective field device by a new field device in a system which communicates via a digital fieldbus, in particular an automation system
US20140236914A1 (en) Controller, information processing apparatus, and recording medium
WO2007144936A1 (en) Peripheral device of programmable logic controller and automatic program verification method
JP2002268707A (en) Controller and tool, and system constituted of the same
JP6481267B2 (en) Programmable display
JP2017167593A (en) Relay device, relay device control method, control program, and recording medium
US20100312541A1 (en) Program test device and program
TW202018519A (en) Adapter with instrument control function, instrument control system and instrument control method applied thereto
JP2008181572A (en) Plc system
JP2003241805A (en) Development support system and program product
JP2007304972A (en) Microprocessor system
WO2020184062A1 (en) Control system and control device
JP2010238232A (en) Industrial controller
JP2001014027A (en) Fault analysis assisting system for process controller
US20230101320A1 (en) Method for creating and executing a control program for controlling an automation system, and automation system
JP3015793B1 (en) Programmable controller
JP3367761B2 (en) Control system program collation method and control system
JPH08278809A (en) Plant controller
JP7044086B2 (en) Control systems, control methods, and control programs
JP7070479B2 (en) Control system and control unit
JPH11120028A (en) Program transporting support system
JPH11203114A (en) Multi remote device
JPH04373036A (en) Software testing device for computer system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041125

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061128

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061212

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070213

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070806

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

Free format text: PAYMENT UNTIL: 20100824

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4000864

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20100824

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110824

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110824

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120824

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130824

Year of fee payment: 6

EXPY Cancellation because of completion of term