JP2009146040A - Data trace system using plc - Google Patents

Data trace system using plc Download PDF

Info

Publication number
JP2009146040A
JP2009146040A JP2007320849A JP2007320849A JP2009146040A JP 2009146040 A JP2009146040 A JP 2009146040A JP 2007320849 A JP2007320849 A JP 2007320849A JP 2007320849 A JP2007320849 A JP 2007320849A JP 2009146040 A JP2009146040 A JP 2009146040A
Authority
JP
Japan
Prior art keywords
data
trace
plc
predetermined
input
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
JP2007320849A
Other languages
Japanese (ja)
Other versions
JP4883314B2 (en
Inventor
Akio Ono
彰男 小野
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 JP2007320849A priority Critical patent/JP4883314B2/en
Publication of JP2009146040A publication Critical patent/JP2009146040A/en
Application granted granted Critical
Publication of JP4883314B2 publication Critical patent/JP4883314B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a data trace system using PLC sufficiently useful for so-called data logging, for responding a desire for observing the variation of data for a long period in regard to a specific data, and to provide the PLC suitable to the above system. <P>SOLUTION: To each data acquired at predetermined timing, an identification data being specific to the above acquisition timing and having continuity as a whole is added. When a predetermined identification data transmission command is given through communication with a tool device, an up-to-date identification data at that time point is transmitted to the tool device. Further, when a predetermined trace data transmission command is given through the communication with the tool device, an up-to-date trace data at that time point is transmitted to the tool device. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

この発明は、プログラマブル・コントローラ(以下、「PLC」と言う)を用いたデータトレースシステムに係り、特に、PLCとプログラム開発支援装置(以下、「ツール装置」と言う)との協働により、PLC側に保存されたトレースデータをツール装置側にて読出可能としたPLCを用いたデータトレースシステムに関する。   The present invention relates to a data trace system using a programmable controller (hereinafter referred to as “PLC”), and in particular, in cooperation with a PLC and a program development support device (hereinafter referred to as “tool device”). The present invention relates to a data trace system using a PLC in which trace data stored on the side can be read on the tool device side.

PLCとツール装置との協働により、PLC側に保存されたトレースデータをツール装置側にて読出可能としたPLCを用いたデータトレースシステムは、従来より種々知られている(例えば、特許文献1参照)。   Various types of data trace systems using a PLC in which trace data stored on the PLC side can be read on the tool device side in cooperation with the PLC and the tool device have been known (for example, Patent Document 1). reference).

この種のデータトレースシステムは、PLCとツール装置とを通信で結ぶことにより、構成されている。   This type of data trace system is configured by connecting a PLC and a tool device by communication.

PLC(中でも、ビルディング・ブロック型のPLC)は、当業者にはよく知られているように、電源ユニット、CPUユニット、1又は2以上の入出力ユニット、通信ユニット、及び各種の特殊機能ユニット等々により構成されている。   As is well known to those skilled in the art, a PLC (in particular, a building block type PLC) includes a power supply unit, a CPU unit, one or more input / output units, a communication unit, various special function units, and the like. It is comprised by.

CPUユニットは、メモリチェック等のハードウェア診断を行う共通処理、ユーザの制御仕様に対応するユーザプログラムを実行して入出力メモリの内容を書き替えるプログラム実行処理、入力回路を介して外部入力端子から取り込まれた入力データを入出力メモリの入力領域に格納すると共に、入出力メモリの出力領域に格納された出力データを出力回路を介して外部出力端子へと送出する入出力リフレッシュ処理、ツール装置との通信を含む周辺サービス処理等を含む一連の処理を繰り返し実行するように仕組まれている。   The CPU unit is a common process for performing hardware diagnosis such as memory check, a program execution process for rewriting the contents of the input / output memory by executing a user program corresponding to the user's control specifications, and an external input terminal via an input circuit. An input / output refresh process for storing the input data that has been captured in the input area of the input / output memory and sending the output data stored in the output area of the input / output memory to the external output terminal via the output circuit; It is structured to repeatedly execute a series of processes including a peripheral service process including the communication.

一方、ツール装置は、キーボードやマウス等を含む入力操作手段と、画像表示器等を含む出力手段と、CPU等を含む演算処理手段と、PLCとの通信手段とを有する情報処理装置(例えば、パソコン等)に、所定のプログラム開発支援機能を組み込んで構成されている。   On the other hand, the tool apparatus is an information processing apparatus (for example, an input operation means including a keyboard and a mouse, an output means including an image display, an arithmetic processing means including a CPU, and a communication means with a PLC (for example, A predetermined program development support function is incorporated in a personal computer or the like).

PLCは、ツール装置との通信を介して、所定のデータ取得開始指令を受け取ると、入出力データ等の当該PLCが取り扱う変動性データの中で、ユーザにより予め指定された1若しくは2以上のデータを、所定のデータ取得タイミングをもって継続的に取得すると共に、こうして取得された仮トレースデータを所定のメモリ容量を有するトレースメモリの一連のアドレスに順次に書き込む動作を繰り返し実行する。   When the PLC receives a predetermined data acquisition start command via communication with the tool device, the PLC inputs one or more data specified in advance by the user among the variability data handled by the PLC such as input / output data. Are continuously acquired with a predetermined data acquisition timing, and the operation of sequentially writing the temporary trace data acquired in this way to a series of addresses of a trace memory having a predetermined memory capacity is repeatedly executed.

また、PLCは、予め設定されたトレース条件が成立(例えば、所定時間の経過、ユーザプログラムで指定された論理条件の成立、ツール装置からの指示到来、等々)すると、予め指定された時点(例えば、現時点、現時点より所定時間遡った時点、現時点より所定時間経過した時点、等々)以降のデータを実トレースデータとして、データの取得を継続すると共に、こうして取得される実トレースデータをトレースメモリの一連のアドレスに順次に書き込んでゆき、トレースメモリが実トレースデータで満たされるのを待って、データの取得及びトレースメモリへの書き込みを停止する。   Further, when a preset trace condition is satisfied (for example, elapse of a predetermined time, establishment of a logical condition specified by a user program, arrival of an instruction from a tool device, etc.), the PLC is set at a predetermined time (for example, The current data is continuously acquired as the actual trace data, and the actual trace data thus acquired is stored in the trace memory series. The address is sequentially written to the address, and after the trace memory is filled with the actual trace data, the acquisition of data and the writing to the trace memory are stopped.

さらに、PLCは、ツール装置との通信を介して、所定のトレースデータ送信指令を受け取ると、トレースメモリから実データを全て読み出して、ツール装置へと送信する。   Further, when receiving a predetermined trace data transmission command via communication with the tool device, the PLC reads all the actual data from the trace memory and transmits it to the tool device.

従来システムにおける上述の動作の一例を示す説明図が図17に示されている。同図に示されるように、トレースメモリは、図示例では、第1ブロック〜第5ブロックからなる5つのブロックに分けられており、それら一連のブロックは、第1ブロック〜第5ブロックに対して順次にアドレス指定を繰り返すリングバッファメモリとして機能するように構成されている。   An explanatory diagram showing an example of the above-described operation in the conventional system is shown in FIG. As shown in the figure, the trace memory is divided into five blocks consisting of the first block to the fifth block in the illustrated example, and the series of blocks is divided into the first block to the fifth block. It is configured to function as a ring buffer memory that repeats addressing sequentially.

ツール装置からのデータ取得開始指令を受けて、予め指定された変動データの取得が開始されると、同図(a)に示されるように、取得された仮トレースデータ「1」〜「5」は、図中ハッチングで示されるように、第1ブロック〜第5ブロックへと順次に格納されてゆく。第1ブロック〜第5ブロックが仮トレースデータ「1」〜「5」で満たされると、仮トレースデータ「6」以降のデータは、第1ブロック以降に上書きされてゆき、仮トレースデータ「1」以降のデータはその上書きにより消去されてゆく。   In response to the data acquisition start command from the tool device, when the acquisition of the fluctuation data designated in advance is started, the acquired temporary trace data “1” to “5” as shown in FIG. Are sequentially stored in the first block to the fifth block, as indicated by hatching in the figure. When the first to fifth blocks are filled with the temporary trace data “1” to “5”, the data after the temporary trace data “6” is overwritten after the first block, and the temporary trace data “1”. Subsequent data is erased by overwriting.

所定のトレース条件が成立して、例えば仮トレースデータ「3」以降が実トレースデータとされると、同図(b)に示されるように、実トレースデータ「3」〜「5」は、図中塗り潰しにて示されるように、第3ブロック〜第5ブロックへと格納される。その後、実トレースデータ「6」〜「7」は、第1ブロック〜第2ブロックへと格納され、第2ブロックに実トレースデータ「7」が格納されると、トレースメモリは実トレースデータで満たされるから、実トレースデータの取得及び書き込みは停止される。   When a predetermined trace condition is satisfied and, for example, provisional trace data “3” and subsequent real trace data are obtained, as shown in FIG. 5B, real trace data “3” to “5” As indicated by the intermediate filling, the data is stored in the third block to the fifth block. Thereafter, the actual trace data “6” to “7” are stored in the first block to the second block, and when the actual trace data “7” is stored in the second block, the trace memory is filled with the actual trace data. Therefore, acquisition and writing of actual trace data are stopped.

このようにして、トレースメモリが実トレースデータで満たされると、PLCは、同図(c)に示されるように、入出力メモリ上に設けられたトレース終了リレーをONさせて、外部からトレース終了を検知可能とする。PLCとの通信を介して、ツール装置がトレース終了リレーのONを検知すると、ツール装置からの送信指令を受けて、PLCからツール装置へと実トレースデータ「3」〜「7」の送信が行われ、これによりツール装置は実トレースデータ「3」〜「7」を取得することができる。こうして取得された実トレースデータ「3」〜「7」は、ツール装置における分析処理や表示処理に供される。
特開2002−351505号公報
In this way, when the trace memory is filled with the actual trace data, the PLC turns on the trace end relay provided on the input / output memory as shown in FIG. Can be detected. When the tool device detects that the trace end relay is turned on via communication with the PLC, the actual trace data “3” to “7” is transmitted from the PLC to the tool device in response to a transmission command from the tool device. Thus, the tool device can acquire the actual trace data “3” to “7”. The actual trace data “3” to “7” acquired in this way is used for analysis processing and display processing in the tool device.
JP 2002-351505 A

このような従来のデータトレースシステムによれば、仮トレースデータの取得中にあっては、データの上書き消去が行われるものの、トレース条件が成立(例えば、故障発生等)した以降については、トレースメモリが実トレースデータで満たされるのを待って、データの書き込みが停止するから、実トレースデータについては上書き消去されることがないと言う利点がある。   According to such a conventional data trace system, while the temporary trace data is being acquired, the data is overwritten and erased, but after the trace condition is satisfied (for example, occurrence of a failure), the trace memory Since the data writing is stopped after waiting for the actual trace data to be satisfied, there is an advantage that the actual trace data is not overwritten and erased.

しかし、上述のデータトレースシステムにあっては、取得可能な実トレースデータの量はトレースメモリの容量に依存するため、トレース条件成立前後の比較的に短い期間におけるトレース対象データの変動を観察すると言った限られた用途には耐え得るものの、トレース条件の成立可否とは関係なく、特定のデータについて長期間に亘ってその変動を観察したいと言った所謂データロギング用途には供し得ないと言う問題点があった。   However, in the above-described data trace system, the amount of real trace data that can be acquired depends on the capacity of the trace memory, so that it is said that the change in the trace target data is observed in a relatively short period before and after the trace condition is established. Although it can withstand limited applications, it cannot be used for so-called data logging applications where it is desired to observe the fluctuation of specific data over a long period of time regardless of whether or not the trace condition is satisfied. There was a point.

この発明は、上述の問題点に着目してなされたものであり、その目的とするところは、特定のデータについて長期間に亘ってその変動を観察したいと言った所謂データロギング用途に十分に供し得るPLCを用いたデータトレースシステム、並びに、同システムに好適なPLCを提供することにある。   The present invention has been made paying attention to the above-mentioned problems, and the object of the present invention is sufficient for so-called data logging applications in which it is desired to observe the fluctuation of specific data over a long period of time. The object is to provide a data trace system using the obtained PLC and a PLC suitable for the system.

この発明のさらに他の目的並びに作用効果については、明細書の以下の記述を参照することにより、当業者であれば容易に理解されるであろう。   Other objects and operational effects of the present invention will be easily understood by those skilled in the art by referring to the following description of the specification.

上述の技術的な課題は、以下の構成を有するPLCのデータトレースシステムにより解決することができると考えられる。   It is considered that the above technical problem can be solved by a PLC data trace system having the following configuration.

すなわち、このデータトレースシステムは、PLCとツール装置とを通信で結ぶことにより構成されている。   That is, this data trace system is configured by connecting the PLC and the tool device by communication.

ここで、PLCは、メモリチェック等のハードウェア診断を行う共通処理、ユーザの制御仕様に対応するユーザプログラムを実行して入出力メモリの内容を書き替えるプログラム実行処理、入力回路を介して外部入力端子から取り込まれた入力データを入出力メモリの入力領域に格納すると共に、入出力メモリの出力領域に格納された出力データを出力回路を介して外部出力端子へと送出する入出力リフレッシュ処理、ツール装置との通信を含む周辺サービス処理等を含む一連の処理を繰り返し実行するように仕組まれている。   Here, the PLC is a common process for performing hardware diagnosis such as a memory check, a program execution process for executing a user program corresponding to the user's control specifications and rewriting the contents of the input / output memory, and an external input via an input circuit. Input / output refresh processing and tool that stores input data captured from the terminal in the input area of the input / output memory and sends the output data stored in the output area of the input / output memory to the external output terminal via the output circuit A series of processing including peripheral service processing including communication with the apparatus is repeatedly executed.

また、ツール装置は、キーボードやマウス等を含む入力操作手段と、画像表示器等を含む出力手段と、CPU等を含む演算処理手段と、PLCとの通信手段とを有する情報処理装置に、所定のプログラム開発支援機能を組み込んで構成されている。   In addition, the tool device is provided with an information processing apparatus including an input operation unit including a keyboard and a mouse, an output unit including an image display unit, an arithmetic processing unit including a CPU and the like, and a communication unit with a PLC. The program development support function is incorporated.

PLCには、「データトレース手段」と、「識別データ付与手段」と、「識別データ送信手段」と、「トレースデータ送信手段」とが設けられる。   The PLC is provided with “data tracing means”, “identification data providing means”, “identification data transmitting means”, and “trace data transmitting means”.

データトレース手段は、ツール装置との通信を介して、所定のトレース開始指令が与えられたとき、入出力データ等の当該PLCが取り扱う変動性データの中で、ユーザにより予め指定された1若しくは2以上のデータを、所定のデータ取得タイミングをもって継続的に取得すると共に、こうして取得されたトレースデータを所定のメモリ容量を有するトレースメモリの一連のアドレスに順次に書き込む動作を繰り返し実行する。   When a predetermined trace start command is given through communication with the tool device, the data trace means is 1 or 2 designated in advance by the user in the variability data handled by the PLC such as input / output data. The above data is continuously acquired at a predetermined data acquisition timing, and the operation of sequentially writing the acquired trace data to a series of addresses of a trace memory having a predetermined memory capacity is repeatedly executed.

識別データ付与手段は、データトレース手段により所定のタイミングで取得されるデータのそれぞれに、連続性のある識別データ(例えば、連続番号、ミリ秒オーダーの時刻情報等々)を付与する。   The identification data adding unit adds continuous identification data (for example, serial number, time information on the order of milliseconds, etc.) to each of the data acquired at a predetermined timing by the data tracing unit.

識別データ送信手段は、ツール装置との通信を介して、所定の識別データ送信指令が与えられたとき、その時点で最新の識別データをツール装置へと送信する。   When a predetermined identification data transmission command is given through communication with the tool device, the identification data transmitting means transmits the latest identification data to the tool device at that time.

トレースデータ送信手段は、ツール装置との通信を介して、所定のトレースデータ送信指令が与えられたとき、その時点で最新のトレースデータをツール装置へと送信する。   When a predetermined trace data transmission command is given through communication with the tool device, the trace data transmission means transmits the latest trace data to the tool device at that time.

一方、ツール装置には、「トレース開始指令手段」と、「最新データ問合わせ手段」と、「トレースデータ送信要求指令手段」と、「トレースデータ保存手段」とが設けられる。   On the other hand, the tool device is provided with “trace start command means”, “latest data inquiry means”, “trace data transmission request command means”, and “trace data storage means”.

トレース開始指令手段は、入力操作手段における所定操作に応答してトレース開始指令を生成すると共に、こうして生成されたトレース開始指令を通信手段を介してPLCに送信する。   The trace start command means generates a trace start command in response to a predetermined operation on the input operation means, and transmits the trace start command thus generated to the PLC via the communication means.

最新データ問合わせ手段は、トレース開始指令を与えたのち、最新の識別データの送信を要求する所定の識別データ送信指令を、通信手段を介して、所定のタイミングでPLCに対して繰り返し送信する一方、PLCから返信される最新の識別データを通信手段を介して受信する。ここで、「所定のタイミング」については、例えば一定時間間隔毎(定期的)とすることができる。この時間間隔は、通信性能の影響を受けるため、ツール装置側で自動的に計算するか、あるいはユーザ側にて適当な値を設定する。   The latest data inquiry means, after giving a trace start command, repeatedly transmits a predetermined identification data transmission command for requesting transmission of the latest identification data to the PLC at a predetermined timing via the communication means. The latest identification data returned from the PLC is received via the communication means. Here, the “predetermined timing” can be set at regular time intervals (periodically), for example. Since this time interval is affected by the communication performance, it is automatically calculated on the tool device side, or an appropriate value is set on the user side.

トレースデータ送信要求指令手段は、こうしてPLCから受信された最新の識別データを自己が保持する最新の識別データと照合し、自己が保持する最新の識別データよりもPLCから受信された最新の識別データの方が新しいときには、最新のトレースデータの送信を要求する所定のトレースデータ送信指令を通信手段を介してPLCに対して送信する。   The trace data transmission request command means collates the latest identification data received from the PLC in this way with the latest identification data held by itself, and the latest identification data received from the PLC rather than the latest identification data held by itself. When this is newer, a predetermined trace data transmission command for requesting transmission of the latest trace data is transmitted to the PLC via the communication means.

トレースデータ保存手段は、PLCから返信されるトレースデータを通信手段を介して受信すると共に、こうしてPLCから受信されるトレースデータを所定のロギングメモリの一連のアドレスに、識別データと関連づけて保存する。   The trace data storage means receives the trace data returned from the PLC via the communication means, and stores the trace data received from the PLC in this way in a series of addresses of a predetermined logging memory in association with the identification data.

このような構成によれば、PLC側において、データトレースが開始されたのちにあっては、ツール装置側からの定期的な問い合わせのたびに、最新のトレースデータに対応する識別データがPLCからツール装置へと返送される一方、ツール装置側ではこれを取得済み識別データと照合して、PLCが新たなトレースデータを取得したことを検知してPLC側に対してその送信要求を行ない、その応答として新たなトレースデータを取得してロギングメモリに保存するため、PLC側のトレースメモリ上で過去のトレースデータが上書き消去されたとしても、ツール装置からの問い合わせ頻度が適切である限り、上書き消去される前に、各トレースデータはツール装置側へと保存されることとなり、そのため、従前からのリングバッファ方式のトレースメモリを使用しつつも、特定のデータについて長期間に亘ってその変動を観察したいと言った所謂データロギング用途に十分に供し得るPLCを用いたデータトレースシステムを実現することができる。   According to such a configuration, after the data trace is started on the PLC side, the identification data corresponding to the latest trace data is sent from the PLC to the tool every time a regular inquiry is made from the tool device side. While it is returned to the device, the tool device compares it with the acquired identification data, detects that the PLC has acquired new trace data, makes a transmission request to the PLC, and responds As new trace data is acquired and saved in the logging memory, even if past trace data is overwritten on the PLC side trace memory, it is overwritten as long as the inquiry frequency from the tool device is appropriate. Each trace data will be saved in the tool device before starting the ring buffer. Even while using the trace memory, it is possible to realize a data trace system using a PLC can be sufficiently subjected to a long period of time over with so-called data logging applications said to be observed that vary for particular data.

しかも、このようにしてデータロギングメモリに格納される一連のトレースデータには、連続性のある識別データが付与されているため、ツール装置からの問い合わせタイミングとトレースデータ取得タイミングとのずれ等により、連続するトレースデータの一部が欠落したような場合には、一連の識別データの連続性が途切れることにより、そのようなトレースデータの欠落を見つけることが容易となる。   Moreover, since a series of trace data stored in the data logging memory in this way is given continuous identification data, due to the difference between the inquiry timing from the tool device and the trace data acquisition timing, etc. When a part of continuous trace data is missing, the continuity of a series of identification data is interrupted, so that it is easy to find such missing trace data.

なお、前記PLCにおける所定のデータ取得タイミングとしては、一定時間が経過する毎タイミング、ユーザプログラム中に組み込まれた所定のトレース命令が実行されるタイミング、又はサイクルタイム経過の毎タイミング等々、様々なタイミングを採用することができる。   The predetermined data acquisition timing in the PLC includes various timings such as a timing at which a predetermined time elapses, a timing at which a predetermined trace instruction incorporated in the user program is executed, or a timing at which a cycle time elapses. Can be adopted.

別の一面から見た本発明は、上述のデータトレースシステムに好適なPLCとして把握することもできる。   The present invention viewed from another aspect can be grasped as a PLC suitable for the above-described data trace system.

このPLCは、メモリチェック等のハードウェア診断を行う共通処理、ユーザの制御仕様に対応するユーザプログラムを実行して入出力メモリの内容を書き替えるプログラム実行処理、入力回路を介して外部入力端子から取り込まれた入力データを入出力メモリの入力領域に格納すると共に、入出力メモリの出力領域に格納された出力データを出力回路を介して外部出力端子へと送出する入出力リフレッシュ処理、ツール装置との通信を含む周辺サービス処理等を含む一連の処理を繰り返し実行するように仕組まれている。   This PLC is a common process that performs hardware diagnosis such as memory check, a program execution process that executes a user program corresponding to the user's control specifications and rewrites the contents of the input / output memory, and an external input terminal via an input circuit. An input / output refresh process for storing the input data that has been captured in the input area of the input / output memory and sending the output data stored in the output area of the input / output memory to the external output terminal via the output circuit; It is structured to repeatedly execute a series of processes including a peripheral service process including the communication.

また、このPLCには、「データトレース手段」と、「識別データ付与手段」と、「識別データ送信手段」と、「トレースデータ送信手段」とが設けられる。   Further, the PLC is provided with “data tracing means”, “identification data providing means”, “identification data transmitting means”, and “trace data transmitting means”.

データトレース手段は、ツール装置との通信を介して、所定のトレース開始指令が与えられたとき、入出力データ等の当該PLCが取り扱う変動性データの中で、ユーザにより予め指定された1若しくは2以上のデータを、所定のデータ取得タイミングをもって継続的に取得すると共に、こうして取得されたトレースデータを所定のメモリ容量を有するトレースメモリの一連のアドレスに順次に書き込む動作を繰り返し実行する。   When a predetermined trace start command is given through communication with the tool device, the data trace means is 1 or 2 designated in advance by the user in the variability data handled by the PLC such as input / output data. The above data is continuously acquired at a predetermined data acquisition timing, and the operation of sequentially writing the acquired trace data to a series of addresses of a trace memory having a predetermined memory capacity is repeatedly executed.

識別データ付与手段は、データトレース手段により所定のタイミングで取得されるデータのそれぞれに、その取得タイミングに固有でかつ全体として連続性のある識別データを付与する。   The identification data adding unit adds identification data unique to the acquisition timing and continuous as a whole to each of the data acquired at a predetermined timing by the data tracing unit.

識別データ送信手段は、ツール装置との通信を介して、所定の識別データ送信指令が与えられたとき、その時点で最新の識別データをツール装置へと送信する。   When a predetermined identification data transmission command is given through communication with the tool device, the identification data transmitting means transmits the latest identification data to the tool device at that time.

トレースデータ送信手段は、ツール装置との通信を介して、所定のトレースデータ送信指令が与えられたとき、その時点で最新のトレースデータをツール装置へと送信する。   When a predetermined trace data transmission command is given through communication with the tool device, the trace data transmission means transmits the latest trace data to the tool device at that time.

このような構成によれば、データトレースの開始、最新トレースデータに関する識別データの送信、最新トレースデータの送信は、いずれも外部から所定の指令を受けて動作するから、ツール装置の側からそのような指令を与えることより、当該PLCにおいて従前のトレースメモリを使用しつつも、これとツール装置とを適宜に協働させることにより、データロギング機能を実現することができる。   According to such a configuration, the start of the data trace, the transmission of the identification data related to the latest trace data, and the transmission of the latest trace data all operate in response to a predetermined command from the outside. By giving a simple command, the data logging function can be realized by appropriately cooperating this and the tool device while using the conventional trace memory in the PLC.

なお、前記PLCにおける所定のデータ取得タイミングとしては、一定時間が経過する毎タイミング、ユーザプログラム中に組み込まれた所定のトレース命令が実行されるタイミング、又はサイクルタイム経過の毎タイミング等々のように、様々なタイミングを採用することができる。   As the predetermined data acquisition timing in the PLC, every time a certain time elapses, a timing at which a predetermined trace instruction incorporated in the user program is executed, every time a cycle time elapses, etc. Various timings can be employed.

本発明によれば、特定のデータについて長期間に亘ってその変動を観察したいと言った所謂データロギング用途に十分に供し得るPLCを用いたデータトレースシステム、並びに、同システムに好適なPLCを提供することができる。   According to the present invention, there is provided a data trace system using a PLC that can be sufficiently used for so-called data logging applications in which specific data is desired to be observed over a long period of time, and a PLC suitable for the system. can do.

以下に、この発明に係るPLCを用いたデータトレースシステムの好適な実施の一形態を添付図面に基づいて詳細に説明する。   A preferred embodiment of a data trace system using a PLC according to the present invention will be described below in detail with reference to the accompanying drawings.

本発明システムの構成図が図1(a)に示されている。同図に示されるように、本発明に係るデータトレースシステムは、PLC1とプログラム開発支援装置(ツール装置)2とを通信ケーブル3で結んで構成されている。図示例にあっては、PLC1としては、電源ユニット11、CPUユニット12、入力ユニット13、出力ユニット14、及び通信ユニット15を含むビルディングブロック型のPLCが採用されている。   A block diagram of the system of the present invention is shown in FIG. As shown in the figure, the data trace system according to the present invention is configured by connecting a PLC 1 and a program development support device (tool device) 2 with a communication cable 3. In the illustrated example, a building block type PLC including a power source unit 11, a CPU unit 12, an input unit 13, an output unit 14, and a communication unit 15 is employed as the PLC 1.

当業者にはよく知られているように、それらのユニット11〜15は、それぞれほぼブックケース型のハウジングを有すると共に、その背後に配置されたバックプレーン上に敷設された内部バス上のソケットに対してそれぞれ着脱可能となされ、内部バスを介して互いにデータのやり取りが可能になされている。   As is well known to those skilled in the art, each of these units 11-15 has a generally bookcase-type housing and a socket on an internal bus laid on the backplane located behind it. On the other hand, they can be attached to and detached from each other, and can exchange data with each other via an internal bus.

電源ユニット11は、内部バス上の電源ラインを介して他のユニット12〜15に対して電源供給が可能になされている。入力ユニット13は、所定個数の外部入力機器が配線接続される入力端子台と、入力端子台に配線接続される入力機器からの信号を取り込むための入力回路とを含んでいる。出力ユニット14は、所定個数の出力機器が配線接続される出力端子台と、出力端子台に配線接続される出力機器に対して出力信号を送出するための出力回路とを含んでいる。   The power supply unit 11 can supply power to the other units 12 to 15 through a power supply line on the internal bus. The input unit 13 includes an input terminal block to which a predetermined number of external input devices are wired and an input circuit for taking in signals from the input devices wired to the input terminal block. The output unit 14 includes an output terminal block to which a predetermined number of output devices are wired, and an output circuit for sending an output signal to the output devices wired to the output terminal block.

通信ユニット15は、後述するCPUユニット12との間でデータの受け渡しを行うための共有メモリと、通信ケーブル3を介してツール装置2との間でデータの送受信を行うための送受信回路と、CPUユニット12との間のデータのやり取り及びツール装置2との間の通信を統括制御する制御部(マイクロプロセッサ)を含んでいる。   The communication unit 15 includes a shared memory for exchanging data with the CPU unit 12 described later, a transmission / reception circuit for transmitting / receiving data to / from the tool device 2 via the communication cable 3, and a CPU. A control unit (microprocessor) that performs overall control of data exchange with the unit 12 and communication with the tool device 2 is included.

CPUユニット12は、PLC1の全体を統括制御するものであり、そのハードウェア構成図が図1(b)に示されている。同図に示されるように、CPUユニット12は、マイクロプロセッサ(MPU)121、システムメモリ(SROM)122、バックアップメモリ(BROM)123、ワークメモリ(WRAM)124、ユーザメモリ(UM)125、外部サポート回路(ASIC)126、及び入出力メモリ(IOM)127を含んで構成されている。   The CPU unit 12 performs overall control of the entire PLC 1, and a hardware configuration diagram thereof is shown in FIG. As shown in the figure, the CPU unit 12 includes a microprocessor (MPU) 121, a system memory (SROM) 122, a backup memory (BROM) 123, a work memory (WRAM) 124, a user memory (UM) 125, and external support. A circuit (ASIC) 126 and an input / output memory (IOM) 127 are included.

マイクロプロセッサ(MPU)121は、CPUユニット12の全体を統括制御するものであり、後述するシステムメモリ(SROM)122に格納されたシステムプログラムを実行することにより、CPUユニット12に必要な各種の機能を実現するように構成されている。   The microprocessor (MPU) 121 performs overall control of the entire CPU unit 12, and executes various system functions stored in a system memory (SROM) 122, which will be described later, thereby performing various functions necessary for the CPU unit 12. Is configured to realize.

システムメモリ(SROM)122は、この例ではフラッシュメモリ等の不揮発性メモリで構成されており、先に述べたように、マイクロプロセッサ(MPU)121で実行される各種のシステムプログラムが格納されている。具体的には、後述する図2のフローチャートの一連の処理(ステップ151〜154)、図3のフローチャートの一連の処理(ステップ201〜205)、図4〜図6の一連の処理(ステップ301〜305、ステップ311〜313、ステップ321〜324)をそれぞれ実現するためのシステムプログラム等がこれに相当する。   In this example, the system memory (SROM) 122 is composed of a nonvolatile memory such as a flash memory, and stores various system programs executed by the microprocessor (MPU) 121 as described above. . Specifically, a series of processes in the flowchart of FIG. 2 (steps 151 to 154) described later, a series of processes in the flowchart in FIG. 3 (steps 201 to 205), and a series of processes in FIG. 4 to FIG. 305, steps 311 to 313, and steps 321 to 324) correspond to this.

バックアップメモリ(BROM)123は、フラッシュメモリ等の不揮発性メモリで構成され、電源オフ時にはバッテリが存在しない状態でも内容を保持するように構成されている。このバックアップメモリ(BROM)123には、PLCの制御仕様に対応したユーザプログラムが、所定のプログラム言語(例えば、ラダー図言語など)にて作成され、外部サポート回路(ASIC)126やマイクロプロセッサ(MPU)121で実行可能なコードに変換して格納される。   The backup memory (BROM) 123 is composed of a non-volatile memory such as a flash memory, and is configured to retain the contents even when the battery is not present when the power is turned off. In this backup memory (BROM) 123, a user program corresponding to the control specifications of the PLC is created in a predetermined program language (for example, a ladder diagram language), and an external support circuit (ASIC) 126 or a microprocessor (MPU) ) 121 is converted into executable code and stored.

ワークメモリ(WRAM)124は、マイクロプロセッサ(MPU)121がシステムメモリ(SROM)122から読み出されたシステムプログラムを実行する際のワークエリアとして機能するものであり、書換可能なRAMで構成されている。後述するトレースメモリ(TM)は、このワークメモリ(WRAM)124内に設けられることとなる。   The work memory (WRAM) 124 functions as a work area when the microprocessor (MPU) 121 executes a system program read from the system memory (SROM) 122, and includes a rewritable RAM. Yes. A trace memory (TM) to be described later is provided in the work memory (WRAM) 124.

ユーザメモリ(UM)125は、スタティックRAM(SRAM)で構成されており、電源オフ時には内容を保持することができない。このユーザメモリ(UM)125には、電源投入と共に、バックアップメモリ(BROM)123から転送されたユーザプログラムが格納される。   The user memory (UM) 125 is composed of a static RAM (SRAM), and cannot hold contents when the power is turned off. The user memory (UM) 125 stores a user program transferred from the backup memory (BROM) 123 when the power is turned on.

外部サポート回路(ASIC)126は、ユーザプログラム実行機能が仕組まれた用途限定IC(ASIC:Application Spesific IC)で構成されており、ユーザメモリ(UM)125から読み出されたユーザプログラムを構成する各命令を順次に実行するように構成されている。   The external support circuit (ASIC) 126 is configured by an application specific IC (ASIC: Application Specific IC) in which a user program execution function is structured, and each of the user programs that are read from the user memory (UM) 125 is configured. Instructions are configured to be executed sequentially.

入出力メモリ(IOM)127は、外部サポート回路(ASIC)126がユーザメモリ(UM)125から読み出されたユーザプログラムを実行する際に参照するものであり、その内部には、I/Oバス4を介して接続された入出力ユニット12,13の入出力端子台のデータと対応する入出力データエリア、内部演算のみに使用される補助リレーエリア、演算途中で使用される各種の設定データ(パラメータ)、カウントデータ等を格納するデータエリア等が格納される。後述するトレース終了リレーは、この入出力メモリ(IOM)127内に設けられる。   The input / output memory (IOM) 127 is referred to when the external support circuit (ASIC) 126 executes a user program read from the user memory (UM) 125, and includes an I / O bus therein. 4, input / output data areas corresponding to the data of the input / output terminal blocks of the input / output units 12 and 13 connected via 4, an auxiliary relay area used only for internal computation, and various setting data used during computation ( Parameter), a data area for storing count data, and the like. A trace end relay described later is provided in the input / output memory (IOM) 127.

一方、ツール装置(プログラム開発支援装置)2は、同図(c)に示されるように、パソコン本体21、画像モニタ22、マウス23、及びキーボード24を有するパソコンシステムを前提とし、その上に、例えば、Windows(登録商標)等のOS上で動作するアプリケーションプログラム(プログラム開発支援装置としての機能を実現するするアプリケーションプログラム)を組み込むことにより構成されている。   On the other hand, the tool device (program development support device) 2 is based on a personal computer system having a personal computer main body 21, an image monitor 22, a mouse 23, and a keyboard 24, as shown in FIG. For example, it is configured by incorporating an application program (an application program that realizes a function as a program development support apparatus) that operates on an OS such as Windows (registered trademark).

当業者にはよく知られているように、プログラム開発支援装置としてのアプリケーションプログラムとしては、プログラムの作成機能、編集機能、PLCからの通信を介するアップロード機能、PLCへの通信を介するダウンロード機能を実現するためのプログラムが含まれるほか、特に、この例にあっては、本発明に関連して後述する、図2のフローチャートに示される一連の処理(ステップ101〜107)を実現するためのプログラム、さらには、ロギングメモリに格納されたデータを解析並びにモニタへ表示する等の機能を実現するためのプログラムも含まれている。また、後述するロギングメモリ(LM)については、パソコン本体21内のワークメモリ内に設けられる。   As is well known to those skilled in the art, as an application program as a program development support device, a program creation function, an editing function, an upload function via communication from the PLC, and a download function via communication to the PLC are realized. In particular, in this example, a program for realizing a series of processes (steps 101 to 107) shown in the flowchart of FIG. 2, which will be described later in connection with the present invention, Furthermore, a program for realizing functions such as analysis and display of data stored in the logging memory on a monitor is also included. A logging memory (LM), which will be described later, is provided in a work memory in the personal computer main body 21.

次に、本発明システムの動作を示すフローチャートを参照しながら、PLC1及びツール装置2の協働関係について説明する。   Next, the cooperative relationship between the PLC 1 and the tool device 2 will be described with reference to a flowchart showing the operation of the system of the present invention.

本発明システムの動作を示すフローチャートが図2に示されている。同図において処理が開始されると、先ず、ツール装置(プログラム開発支援装置)2の側では、トレース開始処理(ステップ101)が実行される。このトレース開始処理(ステップ101)においては、図7(1)に示されるように、マウス23やキーボード24における所定操作に応答してトレース開始指令を生成すると共に、こうして生成されたトレース開始指令を通信手段を介してPLC1に送信する処理が実行される。なお、この例では、トレースデータを識別するためのトレースIDとしては連番が採用されており、このとき、ツール装置2の側では、取得済みの最新トレースIDとして連番の「0」が初期設定される。   A flowchart showing the operation of the system of the present invention is shown in FIG. When the processing is started in the figure, first, on the tool device (program development support device) 2 side, a trace start processing (step 101) is executed. In this trace start process (step 101), as shown in FIG. 7 (1), a trace start command is generated in response to a predetermined operation on the mouse 23 or keyboard 24, and the trace start command thus generated is displayed. Processing to transmit to the PLC 1 via the communication means is executed. In this example, a serial number is adopted as the trace ID for identifying the trace data. At this time, the serial number “0” is initially set as the latest acquired trace ID on the tool device 2 side. Is set.

トレース開始指令(コマンド)を受けたPLCの側では、入出力データ等の当該PLC1が取り扱う変動性データの中で、ユーザにより予め指定された1若しくは2以上のデータを、所定のデータ取得タイミングをもって継続的に取得すると共に、こうして取得されたトレースデータを所定のメモリ容量を有するトレースメモリ(TM)の一連のアドレスに順次に書き込む動作を繰り返し実行する(ステップ151)。同時に、PLCの側では、所定のタイミングで取得されるデータのそれぞれに、連続性のある識別データを付与する。このような連続性のある識別データとしては、連続番号やミリ秒オーダーの時刻情報等を挙げることができる。   On the side of the PLC that has received the trace start command (command), one or two or more data designated in advance by the user among the variability data handled by the PLC 1 such as input / output data is obtained at a predetermined data acquisition timing. In addition to continuously acquiring, the operation of sequentially writing the acquired trace data to a series of addresses of the trace memory (TM) having a predetermined memory capacity is repeatedly executed (step 151). At the same time, on the PLC side, continuous identification data is assigned to each data acquired at a predetermined timing. Examples of such identification data having continuity include serial numbers and time information on the order of milliseconds.

ここで、トレースデータの取得タイミングについては、この例にあっては、「TRSM命令実行時指定」、「毎サイクル指定」、及び「一定時間間隔指定」の1つをユーザが任意に選択可能となされている。   Here, with regard to the trace data acquisition timing, in this example, the user can arbitrarily select one of “TRSM instruction execution specification”, “each cycle specification”, and “constant time interval specification”. Has been made.

当業者にはよく知られているように、この種のPLC1においては、図3のフローチャートに示されるように、電源投入に続く電源投入時処理(ステップ201)を実行したのちにあっては、メモリチェック等のハードウェア診断を行う共通処理(ステップ202)、ユーザの制御仕様に対応するユーザプログラムを実行して入出力メモリの内容を書き替えるプログラム実行処理(ステップ203)、入力回路を介して外部入力端子から取り込まれた入力データを入出力メモリの入力領域に格納すると共に、入出力メモリの出力領域に格納された出力データを出力回路を介して外部出力端子へと送出する入出力リフレッシュ処理(ステップ204)、ツール装置2との通信を含む周辺サービス処理(ステップ205)等を含む一連の処理を繰り返し実行するように仕組まれている。   As is well known to those skilled in the art, in this type of PLC 1, as shown in the flowchart of FIG. 3, after executing power-on processing (step 201) following power-on, Common processing for performing hardware diagnosis such as memory check (step 202), program execution processing for rewriting the contents of the input / output memory by executing a user program corresponding to the user's control specifications (step 203), via an input circuit Input / output refresh processing that stores the input data fetched from the external input terminal in the input area of the input / output memory and sends the output data stored in the output area of the input / output memory to the external output terminal via the output circuit (Step 204), a series of processing including peripheral service processing (step 205) including communication with the tool device 2 is repeated. It has been orchestrated so as to return execution.

そして、トレースデータ取得タイミングとして「TRSM命令実行時指定」が選択されると、プログラム実行処理(ステップ203)のタイミングをもって、トレースデータの取得が行われる。また、トレースデータ取得タイミングとして「毎サイクル指定」が選択されると、プログラム実行処理(ステップ203)が終了したのち、入出力リフレッシュ処理(ステップ204)が開始される前のタイミングにおいて、トレースデータの取得が行われる。さらに、トレースデータ取得タイミングとして「一定時間間隔指定」が選択されると、実行中の処理に拘わらず、定時割込をもって、トレースデータの取得が行われることとなる。   When “TRSM instruction execution time designation” is selected as the trace data acquisition timing, the trace data is acquired at the timing of the program execution process (step 203). When “designate every cycle” is selected as the trace data acquisition timing, after the program execution process (step 203) is completed, the input of the trace data is started before the input / output refresh process (step 204) is started. Acquisition is performed. Further, when “specified time interval designation” is selected as the trace data acquisition timing, the trace data is acquired with a fixed interruption regardless of the process being executed.

「TRSM命令実行時指定」の場合におけるトレースデータ取得の説明図が図4に示されている。同図に示されるように、プログラム実行処理(ステップ203)にあっては、ユーザメモリ(UM)125からユーザプログラムを構成する各命令が順次に読み出されて(ステップ305)解読される毎に、その命令が「TRSM命令」であるか、それ以外の命令であるかの判定が行われる(ステップ301)。そして、解読された命令が「TRSM命令」以外の命令であれば(ステップ301NO)、その解読された命令に応じた処理が実行される(ステップ302)。これに対して、解読された命令が「TRMS」命令であるときには、さらに、トレースデータの収集タイミンの設定が「TRMS命令実行時」とされているか否かの判定が行われ(ステップ303)、トレースデータの収集タイミンの設定が「TRMS命令実行時」とされているときに限り、トレースデータ取得処理(ステップ304)が実行されて、トレースデータの取得が行われる。   FIG. 4 is an explanatory diagram of trace data acquisition in the case of “designation at the time of execution of a TRSM instruction”. As shown in the figure, in the program execution process (step 203), each instruction constituting the user program is sequentially read from the user memory (UM) 125 (step 305) and is decoded. Then, it is determined whether the instruction is a “TRSM instruction” or any other instruction (step 301). If the decoded instruction is an instruction other than the “TRSM instruction” (NO in step 301), processing corresponding to the decoded instruction is executed (step 302). On the other hand, when the decoded instruction is the “TRMS” instruction, it is further determined whether or not the setting of the trace data collection timing is “when the TRMS instruction is executed” (step 303). The trace data acquisition process (step 304) is executed and the trace data is acquired only when the trace data collection timing is set to “when the TRMS instruction is executed”.

「毎サイクル指定」の場合におけるトレースデータ取得の説明図が図5に示されている。同図に示されるように、所定のモードフラグが「トレース実行中」のときに(ステップ311YES)、トレースデータの収集タイミングの設定が「毎サイクル」であると判定されると(ステップ312YES)、さらに現時点がプロクラム実行処理(ステップ203)の終了直後のタイミングであるか否かの判定が行われ(ステップ312)、終了直後のタイミングであるときに限り(ステップ313YES)、トレースデータ取得処理(ステップ314)が実行されて、トレースデータの取得が行われる。   FIG. 5 shows an explanatory diagram of trace data acquisition in the case of “designate every cycle”. As shown in the figure, when the predetermined mode flag is “Trace in progress” (Step 311 YES), if it is determined that the setting of the trace data collection timing is “Every cycle” (Step 312 YES), Further, it is determined whether or not the current time is the timing immediately after the end of the program execution process (step 203) (step 312). Only when it is the time immediately after the end (step 313 YES), the trace data acquisition process (step 312) is performed. 314) is executed to acquire trace data.

「一定時間間隔指定」の場合におけるトレースデータ取得の説明図が図6に示されている。同図に示されるように、定時割込(例えば、10ms毎)が開始され、所定のモードフラグが「トレース実行中」のときに(ステップ321YES)、トレースデータの収集タイミングの設定が「一定時間間隔」であると判定されると(ステップ322YES)、さらにトレースデータ取得間隔を規定する所定時間が経過したか否かの判定が行われ(ステップ323)、所定時間が経過したときに限り(ステップ323YES)、トレースデータ取得処理(ステップ324)が実行されて、トレースデータの取得が行われる。   FIG. 6 shows an explanatory diagram of trace data acquisition in the case of “specified time interval designation”. As shown in the figure, when a scheduled interrupt (for example, every 10 ms) is started and the predetermined mode flag is “Trace being executed” (step 321 YES), the trace data collection timing is set to “fixed time”. If it is determined that the interval is “interval” (step 322 YES), it is further determined whether or not a predetermined time defining the trace data acquisition interval has elapsed (step 323), and only when the predetermined time has elapsed (step 323). 323 YES), the trace data acquisition process (step 324) is executed to acquire the trace data.

図2のフローチャートに戻って、トレース開始処理(ステップ101)に続いて、ツール装置2の側では、PLCのトレース実行状態を監視するトレース状態監視処理(ステップ102)と、PLCにおいてトレースモード状態が継続しているか否かを判定するトレース継続判定処理(ステップ103)と、前回取得されたトレースIDと現在のトレースIDとを照合するこにより、現在のトレースIDの方が前回取得されたトレースIDよりも新しいか否かを判定するデータ更新判定処理(ステップ104)と、データ更新判定処理(ステップ104)の判定が肯定されることを条件として実行されるトレース読出処理(ステップ105)及びトレースデータ保存処理(ステップ106)を繰り返し実行することとなる。   Returning to the flowchart of FIG. 2, following the trace start process (step 101), on the tool device 2 side, the trace state monitoring process (step 102) for monitoring the trace execution state of the PLC and the trace mode state in the PLC are changed. The trace continuation determination process (step 103) for determining whether or not it is continued, and the previously acquired trace ID and the current trace ID are collated, whereby the current trace ID is the previously acquired trace ID. Data update determination process (step 104) for determining whether or not the data is newer, trace read process (step 105) and trace data executed on condition that the determination of the data update determination process (step 104) is affirmed The storage process (step 106) is repeatedly executed.

より詳細には、トレース状態監視処理(ステップ102)では、ツール装置はPLCに対して、最新のトレースID(識別データ)を問い合わせるために、トレースID送信指令を通信手段を介して所定のタイミングで繰り返し送信する一方、これに応答してPLCから返信される最新のトレースID及びトレース状態(ステータス)を通信手段を介して受信して保存する。このとき、PLC1の側のトレースデータ収集中処理(ステップ152)においては、トレースデータの収集を継続しつつ、ツール装置2からトレースID送信指令が受信される毎に、最新のトレースデータに対応するトレースIDをトレースメモリ(TM)から読み出して、ツール装置2へと返信する。同時に、PLC1では、そのときのPLCの状態(ステータス)がトレース実行中であるか、トレース停止中であるかの状態も併せてツール装置2へと送信する。   More specifically, in the trace state monitoring process (step 102), the tool device sends a trace ID transmission command at a predetermined timing via the communication means in order to inquire the PLC for the latest trace ID (identification data). While repeatedly transmitting, the latest trace ID and trace state (status) returned from the PLC in response to this are received and stored via the communication means. At this time, in the process of collecting trace data on the PLC 1 side (step 152), every time a trace ID transmission command is received from the tool device 2 while collecting trace data, the latest trace data is handled. The trace ID is read from the trace memory (TM) and returned to the tool device 2. At the same time, the PLC 1 also transmits to the tool device 2 the status of whether the PLC status (status) at that time is trace execution or trace stop.

トレース継続判定処理(ステップ103)においては、PLC1側より受信されたPLCの状態(ステータス)に基づいて、PLCの状態がトレース実行中であるか、トレース停止中であるかを判定し、停止中と判定されれば(ステップ103NO)、トレース停止処理(ステップ107)を実行することにより、トレース中断指令を通信手段を介してPLC側へと送信する。これを受けたPLCの側では、トレース終了処理(ステップ154)を実行することにより、データトレースを終了する。   In the trace continuation determination process (step 103), based on the PLC state (status) received from the PLC 1 side, it is determined whether the PLC state is executing the trace or the trace is stopped. If it is determined (NO in step 103), a trace stop command (step 107) is executed to transmit a trace interruption command to the PLC via the communication means. In response to this, the PLC side ends the data trace by executing a trace end process (step 154).

データ更新判定処理(ステップ104)においては、PLCから受信された最新の識別データを自己が保持する最新の識別データと照合し、自己が保持する最新の識別データよりもPLCから受信された最新の識別データの方が新しいか否かの判定を行ない、この判定が肯定されるのを条件として、トレースデータ読出処理(ステップ105)へと移行する。   In the data update determination process (step 104), the latest identification data received from the PLC is compared with the latest identification data held by the self, and the latest identification data received from the PLC is compared with the latest identification data held by the self. It is determined whether or not the identification data is newer, and the process proceeds to the trace data reading process (step 105) on the condition that this determination is affirmed.

トレースデータ読出処理(ステップ105)においては、最新のトレースデータの送信を要求する所定のトレースデータ送信指令を通信手段を介してPLCに対して送信すると共に、これに応答してPLC側から返信される最新のトレースデータ、トレース実行中であるかトレース停止中であるかの状態、及び最新のトレースIDを受信する処理を実行する。このとき、PLCの側のトレースデータ収集中処理(ステップ153)においては、トレースデータの収集を継続しつつ、PLCからトレースデータ送信指令が受信される毎に、最新のトレースデータをトレースメモリ(TM)から読み出して、ツール装置2へと返信する。同時に、PLC1では、そのときのPLCの状態(ステータス)がトレース実行中であるか、トレース停止中であるかの状態、及び最新のトレースIDについても、併せてツール装置2へと送信する。   In the trace data reading process (step 105), a predetermined trace data transmission command for requesting transmission of the latest trace data is transmitted to the PLC via the communication means, and in response thereto, the PLC side returns a response. The process of receiving the latest trace data, the status of whether the trace is being executed or stopped, and the latest trace ID is executed. At this time, in the process of collecting trace data on the PLC side (step 153), every time a trace data transmission command is received from the PLC while collecting trace data, the latest trace data is stored in the trace memory (TM ) And return to the tool device 2. At the same time, the PLC 1 also transmits to the tool device 2 the status (status) of the PLC at that time, whether the trace is being executed or the trace is stopped, and the latest trace ID.

トレースデータ保存処理(ステップ106)においては、PLCから受信されるトレースデータを所定のロギングメモリ(LM)の一連のアドレスに、トレースID(識別データ)と関連づけて保存する。   In the trace data storing process (step 106), the trace data received from the PLC is stored in a series of addresses of a predetermined logging memory (LM) in association with the trace ID (identification data).

ツール装置側において、トレース状態監視処理(ステップ102)、データ更新判定処理(ステップ104)、トレースデータ読出処理(ステップ105)、及びトレースデータ保存処理(ステップ106)が繰り返し実行されることによるトレース実行中の流れを示す説明図(その1)が図7に、同説明図(その2)が図8にそれぞれ示されている。   Trace execution by repeatedly executing the trace state monitoring process (step 102), the data update determination process (step 104), the trace data reading process (step 105), and the trace data saving process (step 106) on the tool device side. FIG. 7 is an explanatory diagram (part 1) showing the flow inside, and FIG. 8 is an explanatory diagram (part 2) thereof.

トレース開始時にあっては、図7(1)に示されるように、PLC1のトレースメモリ(TM)は空の状態にあり、ツール装置(プログラム開発支援装置)2の取得している最新のトレースIDは連番「0」とされている。この状態で、ツール装置2の側で所定のトレース開始操作が行われると、ツール装置2からPLC1へとトレース開始指令が送信される。なお、図示のトレースメモリ(TM)は第1ブロック〜第5ブロックからなる5つのブロックに分かれており、リングバッファとして機能することから、第1ブロック(トレースデータ「1」)→第2ブロック(トレースデータ「2」)→・・・・第5ブロック(トレースデータ「5」)→第1ブロック(トレースデータ「6」)→第2ブロック(トレースデータ「7」)と言ったように、ブロックアドレスを「1」〜「5」の範囲で循環させながら、第1乃至第5ブロックへと繰り返しトレースデータの書き込み(上書き)を行うように構成されている。   At the time of starting the trace, as shown in FIG. 7A, the trace memory (TM) of the PLC 1 is empty, and the latest trace ID acquired by the tool device (program development support device) 2 is obtained. Is a serial number “0”. In this state, when a predetermined trace start operation is performed on the tool device 2 side, a trace start command is transmitted from the tool device 2 to the PLC 1. The illustrated trace memory (TM) is divided into five blocks including a first block to a fifth block, and functions as a ring buffer. Therefore, the first block (trace data “1”) → the second block ( Trace data “2”) → ・ ・ ・ Fifth block (trace data “5”) → first block (trace data “6”) → second block (trace data “7”) Trace data is repeatedly written (overwritten) to the first to fifth blocks while the address is circulated in the range of “1” to “5”.

トレース開始直後にあっては、図7(2)に示されるように、なおも、PLC1のトレースメモリ(TM)は空の状態にあり、ツール装置(プログラム開発支援装置)2の取得している最新のトレースIDも連番「0」とされている。そのため、最新トレースIDの問い合わせ((2)−1)に対して回答((2)−2)される最新トレースIDはなおも「0」のままとされ、データ更新判定処理(ステップ104)は否定されるから、トレースデータ読出処理(ステップ105)及びトレースデータ保存処理(ステップ106)は実行されない。   Immediately after the start of tracing, as shown in FIG. 7B, the trace memory (TM) of the PLC 1 is still empty and acquired by the tool device (program development support device) 2. The latest trace ID is also a serial number “0”. Therefore, the latest trace ID that is answered ((2) -2) to the latest trace ID inquiry ((2) -1) is still “0”, and the data update determination process (step 104) is performed. Therefore, the trace data reading process (step 105) and the trace data saving process (step 106) are not executed.

PLCがトレースデータ「1」を取得した時点では、図7(3)に示されるように、PLC1のトレースメモリ(TM)の第1ブロックにはトレースデータ「1」が格納されているものの、ツール装置2の側の取得している最新トレースIDはおも「0」のままとされている。   When the PLC acquires the trace data “1”, the trace data “1” is stored in the first block of the trace memory (TM) of the PLC 1 as shown in FIG. The latest trace ID acquired on the device 2 side is mainly set to “0”.

PLCがトレースデータ「1」を取得したのちにあっては、図8(4)の上段に示されるように、最新トレースIDの問い合わせ((4)−1)に対して回答((4)−2)される最新トレースIDは「1」となるから、データ更新判定処理(ステップ104)は肯定され、同図中段に示されるように、トレースデータ読出処理(ステップ105)及びトレースデータ保存処理(ステップ106)が実行され、その結果、PLC1から最新のトレースデータ「1」が読み出され((4)−3)、ツール装置2の取得する最新のトレースIDは「1」となる。   After the PLC has acquired the trace data “1”, as shown in the upper part of FIG. 8 (4), an answer ((4) − 2) Since the latest trace ID to be set is “1”, the data update determination process (step 104) is affirmed, and as shown in the middle part of FIG. As a result, the latest trace data “1” is read from the PLC 1 ((4) -3), and the latest trace ID acquired by the tool device 2 is “1”.

ツール装置2が最新のトレースID「1」を取得したのちにあっては、図8(4)の下段に示されるように、最新のトレースIDの問い合わせ((4)−4)に対して回答((4)−5)はなおも「1」のままとされ、データ更新判定処理(ステップ104)は否定されるから、トレースデータ読出処理(ステップ105)及びトレースデータ保存処理(ステップ106)は実行されない。   After the tool device 2 has acquired the latest trace ID “1”, as shown in the lower part of FIG. 8 (4), the latest trace ID inquiry ((4) -4) is answered. Since ((4) -5) is still “1” and the data update determination process (step 104) is denied, the trace data reading process (step 105) and the trace data saving process (step 106) are performed. Not executed.

PLC1がトレースデータ「2」を取得したのちにあっては、図8(5)に示されるように、PLC1のトレースメモリ(TM)の第1及び第2ブロックには、トレースデータ「1」及び「2」が格納され、一方ツール装置2の取得している最新のトレースIDは「1」のままとされるから、以後、同様にして、最新のトレースデータがPLC側で更新される毎に、ツール装置側ではトレースデータ読出処理(ステップ105)及びトレースデータ保存処理(ステップ106)が実行される。   After the PLC 1 has acquired the trace data “2”, as shown in FIG. 8 (5), the first and second blocks of the trace memory (TM) of the PLC 1 include the trace data “1” and Since “2” is stored and the latest trace ID acquired by the tool device 2 remains “1”, thereafter, every time the latest trace data is updated on the PLC side in the same manner. On the tool device side, a trace data reading process (step 105) and a trace data saving process (step 106) are executed.

このように、図2のフローチャートに示されるようにして、PLCとツール装置とが協働することにより、PLCのトレースメモリ(TM)上に生成されるトレースデータは、ツール装置のロギングメモリ(LM)に移送されつつ蓄えられ、これにより比較的に小容量のトレースメモリ(TM)を使用しつつも、ツール装置のロギングメモリ(LM)上には大きなサイズのロギングデータを生成することができるのである。   In this way, as shown in the flowchart of FIG. 2, the cooperation between the PLC and the tool device causes the trace data generated on the PLC trace memory (TM) to be stored in the logging memory (LM) of the tool device. ) So that a large amount of logging data can be generated on the logging memory (LM) of the tool device while using a relatively small capacity trace memory (TM). is there.

PLCによるトレースデータ取得からツール装置によるロギングデータ取得の流れを示す説明図が図9に示されている。   FIG. 9 shows an explanatory diagram showing a flow from the trace data acquisition by the PLC to the logging data acquisition by the tool device.

同図(a)〜(d)に示されるように、PLCのトレースメモリ(TM)の各ブロックに新たなトレースデータが格納される毎に、その新たに格納されたトレースデータはPLCから読み出されて、ロギングメモリ(LM)に移送されてゆく。トレースメモリ(TM)の第1乃至第5ブロックが満杯となって、トレースメモリ(TM)に対する上書きが開始されたのちにあっても、新たに取得されるトレースデータ「6」、「7」・・・は、その都度に、トレースメモリ(TM)から読み出されて、ロギングメモリ(LM)に移送されてゆく。一方、このトレースメモリ(TM)上での裏書き処理により過去のトレースデータ「1」、「2」・・・は順に消去されるが、ツール装置側のロギングメモリ(LM)には、過去の全てのトレースデータ「1」、「2」・・・が残されるから、これにより比較的に小容量のトレースメモリ(TM)を使用しつつも、ツール装置のロギングメモリ(LM)上には大きなサイズのロギングデータを生成することができるのである。   As shown in FIGS. 4A to 4D, every time new trace data is stored in each block of the PLC trace memory (TM), the newly stored trace data is read from the PLC. Then, it is transferred to the logging memory (LM). Even after the first to fifth blocks of the trace memory (TM) are full and overwriting to the trace memory (TM) is started, newly acquired trace data “6”, “7”. .. Is read from the trace memory (TM) and transferred to the logging memory (LM) each time. On the other hand, the past trace data “1”, “2”,... Are sequentially deleted by the endorsement processing on the trace memory (TM), but the past log data (LM) on the tool device side is stored in the past. All trace data “1”, “2”... Remain, so that a relatively small amount of trace memory (TM) is used, but a large amount is recorded on the logging memory (LM) of the tool device. Logging data of the size can be generated.

加えて、この実施形態にあっては、従前のトレースメモリ(TM)をそのまま使用しているため、本発明に係るデータロギング機能と従前の条件付トレース機能とを併存させて、これらを任意に切り替え可能とすることもできる。   In addition, in this embodiment, since the conventional trace memory (TM) is used as it is, the data logging function according to the present invention and the conventional conditional trace function coexist, and these can be arbitrarily set. It can also be made switchable.

なお、以上の実施形態においては、図1(a)に示されるように、PLC1とツール装置2との間に通信ユニット15を介在させたが、これは通信形態の一例を示す者に過ぎない。オールインワン型のPLCにおいては、単一のハウジングに送受信器が組み込まれているであろうし、ビルディング・ブロック型のPLCにあっても、CPUユニット12に送受信器が組み込まれているものもあるであろう。   In the above embodiment, as shown in FIG. 1A, the communication unit 15 is interposed between the PLC 1 and the tool device 2, but this is merely a person showing an example of the communication form. . In an all-in-one type PLC, a transceiver will be incorporated in a single housing, and in some building block type PLCs, a transceiver is incorporated in the CPU unit 12. Let's go.

また、以上の実施形態にあっては、PLCとツール装置とを専用ケーブルで結んで1対1通信を行うように構成したが、その他、PLCとツール装置とをネットワークを介して結んで、リモート配置されたツール装置とPLCとの間で通信を行ってもよい。   In the above embodiment, the PLC and the tool device are connected by a dedicated cable to perform one-to-one communication. In addition, the PLC and the tool device are connected via a network to remotely Communication may be performed between the arranged tool device and the PLC.

このようなネットワーク通信を想定すると、予定される通信頻度は十分にトレースデータ取得頻度に間に合う筈ではあっても、回線の混雑度等の理由で、トレースデータの取りこぼしが起こることも想定されるが、本発明システムにあっては、各トレースデータのそれぞれに連続性のある識別情報が付されているので、このようなトレースデータに取りこぼしが生じたとしても、そのことを識別データの連続性の途切れに基づいて容易に検知することができる。   Assuming this kind of network communication, even though the planned communication frequency should be in time for the trace data acquisition frequency, it is assumed that trace data may be lost due to the degree of congestion on the line. In the system of the present invention, since identification information having continuity is attached to each of the trace data, even if such trace data is lost, the fact that the continuity of the identification data is detected. It can be easily detected based on the break.

このようなトレースデータの取りこぼし検知の説明図が図10に示されている。同図(a)に示されるように、トレースIDが連番の場合、同図(b)に示されるよう、トレースIDが時刻情報の場合のいずれにあっても、ロギングメモリ(LM)上に格納された一連のデータ列におけるトレースIDの連続性の途切れに基づいて、トレースデータの取りこぼしを容易に検知することができる。   FIG. 10 shows an explanatory diagram of such detection of missing trace data. As shown in (a) of the figure, when the trace ID is a serial number, as shown in (b) of the figure, the trace ID is stored in the logging memory (LM) regardless of whether the trace ID is time information. Based on the discontinuity of the trace ID in the series of stored data strings, it is possible to easily detect missing trace data.

また、データトレースを実行させるためには、ツール装置の画面を見ながら、様々なトレースパラメータの設定が必要とされる。このようなトレースパラメータ設定画面の説明図(その1)が図11に、同説明図(その2)が図12にそれぞれ示されている。   Further, in order to execute data trace, it is necessary to set various trace parameters while looking at the screen of the tool device. An explanatory view (No. 1) of such a trace parameter setting screen is shown in FIG. 11, and an explanatory view (No. 2) is shown in FIG.

図11(a)に示されるように、データトレースに先立っては、ツール装置の画面に従って、トレース対象データに関する変数/アドレスの別、トレースデータ取得タイミングの基準となるエッジ種別、エッジからのディレー時間をそれぞれ設定する。また、図11(b)に示されるように、トレースデータ取得モードが「固定間隔」、「サイクル毎」、又は「TRSM命令による」のいずれであるかを設定する。また、図12(a)に示される見ように、トレー対象ワードデータの種別が「1ワード」又は「2ワード」の別を設定する。さらに、図12(b)に示されるように、トレース対象ビットのアドレス選択などの設定を行う。   As shown in FIG. 11A, prior to data tracing, according to the screen of the tool device, according to the variable / address related to the trace target data, the edge type as a reference for the trace data acquisition timing, and the delay time from the edge Set each. Also, as shown in FIG. 11B, it is set whether the trace data acquisition mode is “fixed interval”, “every cycle”, or “by TRSM instruction”. Further, as shown in FIG. 12A, the type of the tray target word data is set to “1 word” or “2 words”. Further, as shown in FIG. 12B, settings such as address selection of the trace target bit are performed.

このような設定の下に取得されるトレースデータのフォーマットの一例が図13に示されている。同図に示されるように、トレースメモリの先頭2ワードには、トレースデータ(ID#1,ID#2)が、続く2ワードには32個の接点データ(s0〜s31)が、続く一連のワードにはサンプリングデータ1〜xが格納されている。   An example of the format of the trace data acquired under such settings is shown in FIG. As shown in the figure, the first two words of the trace memory are trace data (ID # 1, ID # 2), and the next two words are 32 contact data (s0 to s31). Sampling data 1 to x are stored in the word.

こうして取得されるロギングデータのツール装置(プログラム開発支援装置)での解析例の説明図(その1)が図14に、同説明図(その2)が図15に、及びトレース結果表示画面の説明図が図16にそれぞれ示されている。   FIG. 14 is an explanatory diagram (part 1) of an analysis example of the logging data acquired in this way in the tool device (program development support device), FIG. 15 is an explanatory diagram (part 2) thereof, and an explanation of the trace result display screen The figures are shown in FIG.

ツール装置(プログラム開発支援装置)にあっては、所定のアプリケーションプログラムに従って、図15のフローチャートに示されるように、先ず、トレースIDに従ってトレースデータを順番に並べ(ステップ401)、トレースパラメータに設定された設定アドレスとトレースデータの接点値とを組み合わせ(ステップ402)、トレースパラメータに設定されたCHアドレスとトレースデータのCH値を組み合わせ(ステップ403)、最後に、以上の情報を図16に示されるように、モニタ画面上において、視覚的に表現する(ステップ404)。   In the tool device (program development support device), as shown in the flowchart of FIG. 15, according to a predetermined application program, first, the trace data is arranged in order according to the trace ID (step 401) and set to the trace parameter. The set address and the contact value of the trace data are combined (step 402), the CH address set in the trace parameter and the CH value of the trace data are combined (step 403), and finally the above information is shown in FIG. Thus, it is visually expressed on the monitor screen (step 404).

このように、以上の実施形態にかかるデータトレースシステムによれば、PLC1側において、データトレースが開始されたのちにあっては、ツール装置2側からの定期的な問い合わせのたびに、最新のトレースデータに対応する識別データ(連番や時刻情報等)がPLC1からツール装置2へと返送される一方、ツール装置2側ではこれを取得済み識別データと照合して、PLCが新たなトレースデータを取得したことを検知してPLC側に対してその送信要求を行ない、その応答として新たなトレースデータを取得してロギングメモリ(LM)に保存するため、PLC1側のトレースメモリ(TM)上で過去のトレースデータが上書き消去されたとしても、ツール装置2からの問い合わせ頻度が適切である限り、上書き消去される前に、各トレースデータはツール装置2側へと保存されることとなり、そのため、従前からのリングバッファ方式のトレースメモリ(TM)を使用しつつも、特定のデータについて長期間に亘ってその変動を観察したいと言った所謂データロギング用途に十分に供し得るPLCを用いたデータトレースシステムを実現することができる。   As described above, according to the data trace system according to the above embodiment, after the data trace is started on the PLC 1 side, the latest trace is obtained every time a periodic inquiry is made from the tool device 2 side. While the identification data (serial number, time information, etc.) corresponding to the data is returned from the PLC 1 to the tool device 2, the tool device 2 compares this with the acquired identification data, and the PLC obtains new trace data. It detects that it has been acquired, makes a transmission request to the PLC side, acquires new trace data as a response, and saves it in the logging memory (LM). In the past on the trace memory (TM) on the PLC 1 side Even if the trace data is overwritten, as long as the inquiry frequency from the tool device 2 is appropriate, The trace data will be stored on the tool device 2 side. Therefore, while using a conventional ring buffer type trace memory (TM), it is desired to observe the fluctuation of specific data over a long period of time. A data trace system using a PLC that can be sufficiently used for the so-called data logging application can be realized.

しかも、このようにしてデータロギングメモリ(LM)に格納される一連のトレースデータには、その取得タイミングに固有であってかつ全体として連続性のある識別データが付与されているため、ツール装置2からの問い合わせタイミングとトレースデータ取得タイミングとのずれ等により、連続するトレースデータの一部が欠落したような場合には、一連の識別データの連続性が途切れることにより、そのようなトレースデータの取りこぼしを見つけることが容易となる。   Moreover, since a series of trace data stored in the data logging memory (LM) in this way is given identification data that is unique to the acquisition timing and continuous as a whole, the tool device 2 If a part of the continuous trace data is lost due to the difference between the inquiry timing from the trace data and the trace data acquisition timing, etc., the continuity of the series of identification data is interrupted, and the trace data is lost. Easy to find.

本発明によれば、特定のデータについて長期間に亘ってその変動を観察したいと言った所謂データロギング用途に十分に供し得るPLCを用いたデータトレースシステム、並びに、同システムに好適なPLCを提供することができる。   According to the present invention, there is provided a data trace system using a PLC that can be sufficiently used for so-called data logging applications where it is desired to observe fluctuations of specific data over a long period of time, and a PLC suitable for the system. can do.

本発明に係るPLCシステム及びその構成要素の説明図である。It is explanatory drawing of the PLC system which concerns on this invention, and its component. 本発明システムの動作を示すフローチャートである。It is a flowchart which shows operation | movement of this invention system. PLCによるトレースデータの取得タイミング及びツールによるトレースデータの読出タイミングの説明図である。It is explanatory drawing of the acquisition timing of the trace data by PLC, and the read timing of the trace data by a tool. 「TRSM命令実行時指定」の場合におけるトレースデータ取得の説明図である。It is explanatory drawing of trace data acquisition in the case of "designation at the time of TRSM instruction execution". 「毎サイクル指定」の場合におけるトレースデータ取得の説明図である。It is explanatory drawing of trace data acquisition in the case of "each cycle designation". 「一定時間間隔指定」の場合におけるトレースデータ取得の説明図である。It is explanatory drawing of trace data acquisition in the case of "a fixed time interval designation | designated." トレース実行中の流れを示す説明図(その1)である。It is explanatory drawing (the 1) which shows the flow during trace execution. トレース実行中の流れを示す説明図(その2)である。It is explanatory drawing (the 2) which shows the flow during trace execution. PLCによるトレースデータ取得からツール装置によるロギングデータ取得の流れの説明図である。It is explanatory drawing of the flow of logging data acquisition by a tool apparatus from the trace data acquisition by PLC. トレースデータの検知の説明図である。It is explanatory drawing of the detection of trace data. トレースパラメータ設定画面の説明図(その1)である。It is explanatory drawing (the 1) of a trace parameter setting screen. トレースパラメータ設定画面の説明図(その2)である。It is explanatory drawing (the 2) of a trace parameter setting screen. トレースデータのフォーマットの一例を示す説明図である。It is explanatory drawing which shows an example of the format of trace data. プログラム開発支援装置での解析例の説明図(その1)である。It is explanatory drawing (the 1) of the example of an analysis in a program development assistance apparatus. プログラム開発支援装置での解析例の説明図(その2)である。It is explanatory drawing (the 2) of the example of an analysis in a program development assistance apparatus. トレース結果表示画面例の説明図である。It is explanatory drawing of the example of a trace result display screen. 従来システムにおける動作を示す説明図である。It is explanatory drawing which shows the operation | movement in a conventional system.

符号の説明Explanation of symbols

1 PLC
2 プログラム開発支援装置
3 通信ケーブル
4 I/Oバス
11 電源ユニット
12 CPUユニット
121 MPU
122 SROM
123 BROM
124 WRAM
125 UM
126 ASIC
127 IOM
13 入力ユニット
14 出力ユニット
15 通信ユニット
21 パソコン本体
22 モニタ
23 マウス
24 キーボード
1 PLC
2 Program Development Support Device 3 Communication Cable 4 I / O Bus 11 Power Supply Unit 12 CPU Unit 121 MPU
122 SROM
123 BROM
124 WRAM
125 UM
126 ASIC
127 IOM
13 Input Unit 14 Output Unit 15 Communication Unit 21 Personal Computer Body 22 Monitor 23 Mouse 24 Keyboard

Claims (4)

メモリチェック等のハードウェア診断を行う共通処理、ユーザの制御仕様に対応するユーザプログラムを実行して入出力メモリの内容を書き替えるプログラム実行処理、入力回路を介して外部入力端子から取り込まれた入力データを入出力メモリの入力領域に格納すると共に、入出力メモリの出力領域に格納された出力データを出力回路を介して外部出力端子へと送出する入出力リフレッシュ処理、ツール装置との通信を含む周辺サービス処理等を含む一連の処理を繰り返し実行するように仕組まれたPLCと、
キーボードやマウス等を含むの入力操作手段と、画像表示器等を含む出力手段と、CPU等を含む演算処理手段と、PLCとの通信手段とを有する情報処理装置に、所定のプログラム開発支援機能を組み込んで構成されたツール装置とを具備し、さらに
PLCには、
ツール装置との通信を介して、所定のトレース開始指令が与えられたとき、入出力データ等の当該PLCが取り扱う変動性データの中で、ユーザにより予め指定された1若しくは2以上のデータを、所定のデータ取得タイミングをもって継続的に取得すると共に、こうして取得されたトレースデータを所定のメモリ容量を有するトレースメモリの一連のアドレスに順次に書き込む動作を繰り返し実行するデータトレース手段と、
データトレース手段により所定のタイミングで取得されるデータのそれぞれに、連続性のある識別データを付与する識別データ付与手段と、
ツール装置との通信を介して、所定の識別データ送信指令が与えられたとき、その時点で最新の識別データをツール装置へと送信する識別データ送信手段と、
ツール装置との通信を介して、所定のトレースデータ送信指令が与えられたとき、その時点で最新のトレースデータをツール装置へと送信するトレースデータ送信手段とが設けられ、
ツール装置には、
入力操作手段における所定操作に応答してトレース開始指令を生成すると共に、こうして生成されたトレース開始指令を通信手段を介してPLCに送信するトレース開始指令手段と、
トレース開始指令を与えたのち、最新の識別データの送信を要求する所定の識別データ送信指令を、通信手段を介して、所定のタイミングでPLCに対して繰り返し送信する一方、PLCから返信される最新の識別データを通信手段を介して受信する最新データ問合わせ手段と、
PLCから受信された最新の識別データを自己が保持する最新の識別データと照合し、自己が保持する最新の識別データよりもPLCから受信された最新の識別データの方が新しいときには、最新のトレースデータの送信を要求する所定のトレースデータ送信指令を通信手段を介してPLCに対して送信するトレースデータ送信要求指令手段と、
PLCから返信されるトレースデータを通信手段を介して受信すると共に、こうしてPLCから受信されるトレースデータを所定のロギングメモリの一連のアドレスに、識別データと関連づけて保存するトレースデータ保存手段とが設けられている、こと特徴とするPLCを用いたデータトレースシステム。
Common processing to perform hardware diagnosis such as memory check, program execution processing to rewrite the contents of the input / output memory by executing the user program corresponding to the user's control specifications, input taken from the external input terminal via the input circuit Includes input / output refresh processing for storing data in the input area of the input / output memory and sending output data stored in the output area of the input / output memory to the external output terminal via the output circuit, and communication with the tool device A PLC structured to repeatedly execute a series of processes including peripheral service processes,
A predetermined program development support function in an information processing apparatus having an input operation means including a keyboard and a mouse, an output means including an image display, an arithmetic processing means including a CPU, and a communication means with a PLC. In addition, the PLC includes a tool device constructed by incorporating
When a predetermined trace start command is given through communication with the tool device, one or more data designated in advance by the user among the variability data handled by the PLC such as input / output data, Data trace means for continuously executing with a predetermined data acquisition timing and repeatedly executing an operation for sequentially writing the acquired trace data to a series of addresses of a trace memory having a predetermined memory capacity;
Identification data giving means for giving continuous identification data to each of the data acquired at a predetermined timing by the data tracing means,
When a predetermined identification data transmission command is given through communication with the tool device, identification data transmission means for transmitting the latest identification data to the tool device at that time,
Trace data transmission means is provided for transmitting the latest trace data to the tool device at that time when a predetermined trace data transmission command is given through communication with the tool device,
Tool equipment includes
A trace start command means for generating a trace start command in response to a predetermined operation in the input operation means, and transmitting the trace start command thus generated to the PLC via the communication means;
After giving the trace start command, a predetermined identification data transmission command for requesting transmission of the latest identification data is repeatedly transmitted to the PLC at a predetermined timing via the communication means, while the latest information returned from the PLC is returned. Latest data inquiry means for receiving the identification data via the communication means,
The latest identification data received from the PLC is checked against the latest identification data held by the self, and when the latest identification data received from the PLC is newer than the latest identification data held by the PLC, the latest trace data is stored. Trace data transmission request command means for transmitting a predetermined trace data transmission command for requesting data transmission to the PLC via the communication means;
Trace data storage means for receiving the trace data returned from the PLC via the communication means and storing the trace data received from the PLC in a series of addresses of a predetermined logging memory in association with the identification data is provided. The data trace system using PLC characterized by the above-mentioned.
前記PLCにおける所定のデータ取得タイミングが、一定時間が経過する毎タイミング、ユーザプログラム中に組み込まれた所定のトレース命令が実行されるタイミング、又はサイクルタイム経過の毎タイミングである、ことを特徴とする請求項1に記載のPLCを用いたデータトレースシステム。   The predetermined data acquisition timing in the PLC is a timing at which a predetermined time elapses, a timing at which a predetermined trace instruction incorporated in a user program is executed, or a timing at which a cycle time elapses. A data trace system using the PLC according to claim 1. メモリチェック等のハードウェア診断を行う共通処理、ユーザの制御仕様に対応するユーザプログラムを実行して入出力メモリの内容を書き替えるプログラム実行処理、入力回路を介して外部入力端子から取り込まれた入力データを入出力メモリの入力領域に格納すると共に、入出力メモリの出力領域に格納された出力データを出力回路を介して外部出力端子へと送出する入出力リフレッシュ処理、ツール装置との通信を含む周辺サービス処理等を含む一連の処理を繰り返し実行するように仕組まれており、
ツール装置との通信を介して、所定のトレース開始指令が与えられたとき、入出力データ等の当該PLCが取り扱う変動性データの中で、ユーザにより予め指定された1若しくは2以上のデータを、所定のデータ取得タイミングをもって継続的に取得すると共に、こうして取得されたトレースデータを所定のメモリ容量を有するトレースメモリの一連のアドレスに順次に書き込む動作を繰り返し実行するデータトレース手段と、
データトレース手段により所定のタイミングで取得されるデータのそれぞれに、連続性のある識別データを付与する識別データ付与手段と、
ツール装置との通信を介して、所定の識別データ送信指令が与えられたとき、その時点で最新の識別データをツール装置へと送信する識別データ送信手段と、
ツール装置との通信を介して、所定のトレースデータ送信指令が与えられたとき、その時点で最新のトレースデータをツール装置へと送信するトレースデータ送信手段とを具備する、ことを特徴とするPLC。
Common processing to perform hardware diagnosis such as memory check, program execution processing to rewrite the contents of the input / output memory by executing the user program corresponding to the user's control specifications, input taken from the external input terminal via the input circuit Includes input / output refresh processing for storing data in the input area of the input / output memory and sending output data stored in the output area of the input / output memory to the external output terminal via the output circuit, and communication with the tool device It is designed to repeatedly execute a series of processing including peripheral service processing.
When a predetermined trace start command is given through communication with the tool device, one or more data designated in advance by the user among the variability data handled by the PLC such as input / output data, Data trace means for continuously executing with a predetermined data acquisition timing and repeatedly executing an operation for sequentially writing the acquired trace data to a series of addresses of a trace memory having a predetermined memory capacity;
Identification data giving means for giving continuous identification data to each of the data acquired at a predetermined timing by the data tracing means,
Identification data transmission means for transmitting the latest identification data to the tool device at that time when a predetermined identification data transmission command is given through communication with the tool device;
And a trace data transmitting means for transmitting the latest trace data to the tool device at the time when a predetermined trace data transmission command is given through communication with the tool device. .
前記PLCにおける所定のデータ取得タイミングが、一定時間が経過する毎タイミング、ユーザプログラム中に組み込まれた所定のトレース命令が実行されるタイミング、又はサイクルタイム経過の毎タイミングである、ことを特徴とする請求項3に記載のPLC。   The predetermined data acquisition timing in the PLC is a timing at which a predetermined time elapses, a timing at which a predetermined trace instruction incorporated in a user program is executed, or a timing at which a cycle time elapses. The PLC according to claim 3.
JP2007320849A 2007-12-12 2007-12-12 Data trace system using PLC Active JP4883314B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007320849A JP4883314B2 (en) 2007-12-12 2007-12-12 Data trace system using PLC

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007320849A JP4883314B2 (en) 2007-12-12 2007-12-12 Data trace system using PLC

Publications (2)

Publication Number Publication Date
JP2009146040A true JP2009146040A (en) 2009-07-02
JP4883314B2 JP4883314B2 (en) 2012-02-22

Family

ID=40916601

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007320849A Active JP4883314B2 (en) 2007-12-12 2007-12-12 Data trace system using PLC

Country Status (1)

Country Link
JP (1) JP4883314B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012124541A1 (en) 2011-03-15 2012-09-20 オムロン株式会社 Control device, control system, tool device, and collection instruction program
CN103403634A (en) * 2011-03-15 2013-11-20 欧姆龙株式会社 Control device and system program
CN106062647A (en) * 2014-03-14 2016-10-26 欧姆龙株式会社 Control system
JP2019530074A (en) * 2016-09-13 2019-10-17 エイアールエム リミテッド Apparatus and method for generating and processing a trace stream indicating instruction execution by a processing circuit
WO2020067286A1 (en) 2018-09-28 2020-04-02 オムロン株式会社 Control system, support device, and support program
JP2020166827A (en) * 2019-03-29 2020-10-08 株式会社キーエンス Programmable display device and programmable logic controller system including the same
US11188048B2 (en) 2018-10-23 2021-11-30 Keyence Corporation Programmable logic controller and main unit

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9921560B2 (en) 2011-03-15 2018-03-20 Omron Corporation Control device, control system, tool device, and collection instruction program
JP2012194680A (en) * 2011-03-15 2012-10-11 Omron Corp Control device, control system, tool device, and collection instruction program
CN103403634A (en) * 2011-03-15 2013-11-20 欧姆龙株式会社 Control device and system program
EP2672348A4 (en) * 2011-03-15 2015-08-26 Omron Tateisi Electronics Co Control device, control system, tool device, and collection instruction program
WO2012124541A1 (en) 2011-03-15 2012-09-20 オムロン株式会社 Control device, control system, tool device, and collection instruction program
US10156837B2 (en) 2014-03-14 2018-12-18 Omron Corporation Control systems for setting sampling timing
CN106062647A (en) * 2014-03-14 2016-10-26 欧姆龙株式会社 Control system
CN106062647B (en) * 2014-03-14 2019-04-02 欧姆龙株式会社 Control system
JP2019530074A (en) * 2016-09-13 2019-10-17 エイアールエム リミテッド Apparatus and method for generating and processing a trace stream indicating instruction execution by a processing circuit
JP7079241B2 (en) 2016-09-13 2022-06-01 アーム・リミテッド A device and method for generating and processing a trace stream indicating instruction execution by a processing circuit.
WO2020067286A1 (en) 2018-09-28 2020-04-02 オムロン株式会社 Control system, support device, and support program
US11188048B2 (en) 2018-10-23 2021-11-30 Keyence Corporation Programmable logic controller and main unit
JP2020166827A (en) * 2019-03-29 2020-10-08 株式会社キーエンス Programmable display device and programmable logic controller system including the same
JP7466319B2 (en) 2019-03-29 2024-04-12 株式会社キーエンス Programmable display and programmable logic controller system equipped with the same

Also Published As

Publication number Publication date
JP4883314B2 (en) 2012-02-22

Similar Documents

Publication Publication Date Title
JP4883314B2 (en) Data trace system using PLC
US9778630B2 (en) Control device and system program for maintaining global variable and reference data consistency during parallel processing of multiple tasks
WO2015136959A1 (en) Control system, method, program and information processing device
US9740186B2 (en) Monitoring control system and control device
JP2006264877A (en) Elevator control device
US20080229125A1 (en) Power managing method of a scheduling system and related scheduling system
JP4969315B2 (en) Programmable controller
US7124239B2 (en) Memory updating system for field device
EP2733613B1 (en) Controller and program
CN100573714C (en) Rewritable nonvolatile memory, electronic equipment and rewrite method
JP2006202117A (en) Processor and its firmware download method
JP4558376B2 (en) controller
CN113434467B (en) Network file transmission method, device and computer readable storage medium
CN112506871B (en) Automated task management and log management method, system, electronic device and medium
JP6252269B2 (en) Control device, control system, data trace method, and program
JP2006277733A (en) Programmable controller system
CN113900875A (en) Startup test method and device, computer equipment and storage medium
JP2001156728A (en) Electronic device and method for outputting operating state of electronic device
WO2015033759A1 (en) Debug device, debug method, and debug program
JP5430298B2 (en) Vending machine control equipment
JP2005107909A (en) Multi-processor system having debug function and program for multi-processor system
JP6025971B2 (en) Communication adapter and program
CN110100208B (en) Programmable display and data acquisition method
JP5432125B2 (en) Civil engineering machinery / equipment with a microcomputer capable of writing individual information
JP2007114998A (en) Relay device, storage device and storage system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20101006

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

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111109

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111122

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

Free format text: PAYMENT UNTIL: 20141216

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4883314

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250