JP2004310592A - Logging processor - Google Patents

Logging processor Download PDF

Info

Publication number
JP2004310592A
JP2004310592A JP2003105310A JP2003105310A JP2004310592A JP 2004310592 A JP2004310592 A JP 2004310592A JP 2003105310 A JP2003105310 A JP 2003105310A JP 2003105310 A JP2003105310 A JP 2003105310A JP 2004310592 A JP2004310592 A JP 2004310592A
Authority
JP
Japan
Prior art keywords
logging
data
memory unit
memory
temporary memory
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
JP2003105310A
Other languages
Japanese (ja)
Other versions
JP4346939B2 (en
Inventor
Hirokazu Kikuta
宏和 菊田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2003105310A priority Critical patent/JP4346939B2/en
Publication of JP2004310592A publication Critical patent/JP2004310592A/en
Application granted granted Critical
Publication of JP4346939B2 publication Critical patent/JP4346939B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To enable logging without stopping a logging device and a leak of device data. <P>SOLUTION: The logging processor is equipped with a PLC 20 having a temporary memory in the form of ring buffer where the device data 24 of a function block 21 are logged, and a personal computer 10 which has a program part 12 and a memory part 11, is electrically connected to the PLC 20, and stores the logging data from the temporary memory 25 in the memory part 11. While the temporary memory 25 is outputting logging data of a specified size to the memory part 11 all together, it logs new device data from the function block 21 in a second area other than a first area which stores the data of the specified size, and logs in the second area so as not to overwrite the new device data which has been logged earlier by new data to be logged later. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
この発明は、ロギング処理装置に関するものであり、特に、ロギングデータをまとめて読み出す処理を繰り返し行うロギング処理装置に関するものである。
【0002】
【従来の技術】
従来、パーソナルコンピュータ等の受信側データ通信端末装置とPLC(Programmable Logic Controller)等の送信側データ通信端末装置をネットワーク等で接続したロギング処理装置(データ伝送システム)では、受信側データ通信端末装置等の送信側データ通信端末装置間のデータ伝送にかかる時間が送信側データ通信端末装置内のプログラム実行周期より遅いため、送信側データ通信端末装置内のデバイスデータの変化を全て受信側データ通信端末装置で読み出すことができなかった。このため、送信側データ通信装置から受信側データ通信装置へのロギング(吐き出し処理)データに漏れが生じるという不具合が生じていた。
【0003】
そこで、特許文献1に記載のロギング処理装置(通信データの記録装置)では、ロギング対象であるPLC(電子計算機本体)内のデバイスデータをPLCが備える一時メモリ(サイクリックバッファ)に格納し、障害発生時のみロギングデータが所定件数分に達した時点で障害発生時のロギングデータを受信側データ端末装置内のメモリ(外部記憶装置)に出力して記録させている。
【0004】
【特許文献1】
特開平3−235454号公報(第3,4頁)
【0005】
【発明が解決しようとする課題】
しかしながら、特許文献1に記載のロギング処理装置では、所定件数に達したロギングデータを受信側データ通信端末装置内のメモリに出力して記録をさせている間に、一時メモリ内のロギングデータで受信側データ端末装置内のメモリにまだ出力していないロギングデータが新たなロギングデータによって上書きされて消去されないよう、PLC内において新たなロギング処理を一時的に中断する必要があった。このため、ロギングデータに漏れを生じるといった問題があった。
【0006】
この発明は上記に鑑みてなされたものであって、ロギング処理装置を停止させることなくデバイスデータを漏れのないようロギングするロギング処理装置を得ることを目的とする。
【0007】
【課題を解決するための手段】
上述した課題を解決し、目的を達成するために、本発明にかかるロギング処理装置にあっては、シーケンスプログラム内で繰り返し使用する回路ブロックを部品化したファンクションブロックと該ファンクションブロックのデバイスデータがロギングされるリングバッファ形式の第1のメモリ部とを有するPLCと、プログラム部、第2のメモリ部およびロギング条件を入力する入力部を有し、かつ前記PLCと電気的に接続されて前記第2のメモリ部に前記第1のメモリ部からのロギングデータを格納する受信側データ通信端末装置とを備えるロギング処理装置において、前記第1のメモリ部は、前記第2のメモリ部に所定サイズのロギングデータをまとめて出力している間、前記所定サイズのデータを格納している第1領域以外の第2領域に前記ファンクションブロックからの新たなデバイスデータをロギングし、かつ先にロギングした前記新たなデバイスデータを後にロギングする新たなデバイスデータによって上書きしないよう前記第2領域に対しロギングすることを特徴とする。
【0008】
この発明によれば、第1のメモリ部の第1領域に格納された所定サイズのロギングデータを第2のメモリ部にまとめて出力している間に、第1のメモリ部の第1領域以外の第2領域に新たなデバイスデータをロギングできるだけの十分なサイズを算出してあるので、第2のメモリ部に出力されないロギングデータが新たなロギングデータによって上書きされることがない。
【0009】
【発明の実施の形態】
以下に添付図面を参照して、この発明にかかるロギング装置の好適な実施の形態を詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。図1〜4に従ってこの発明の実施の形態について説明する。図1はこの発明の実施の形態にかかるロギング装置の構成を示すブロック図である。
【0010】
ロギング装置は、例えばパーソナルコンピュータ10からなる受信側データ通信端末装置とPLC(Programmable Logic Controller)20を直接接続するか又はネットワークで接続して構成されている。
【0011】
PLC20は、ファンクションブロック(以下、FBという)21、一時メモリ25、読み出し完了フラグ22、読み出し許可フラグ23で構成されている。
【0012】
FB21は、シーケンスプログラム内で繰り返し使用する回路ブロックを部品化したものであり、後述するN件のデバイスデータ24が一時メモリ25にロギングされた後に、読み出し許可フラグ23のフラグをオンさせる。
【0013】
一時メモリ25は、FB21のデバイスデータをリングバッファ(循環バッファ)形式でロギングし、ロギングデータ(デバイスデータをロギングしたもの)が後述する所定のN件に達した時、これをまとめて後述するパーソナルコンピュータ10のメモリ部11に読み出させる(出力する)。また、一時メモリ25は、メモリ部11が一時メモリ25のロギングデータを読み出している間も一時メモリ25のメモリ領域のうちN件のロギングデータで使用される領域以外の領域を使用してFB21のデバイスデータをロギングする。
【0014】
読み出し完了フラグ22は、パーソナルコンピュータ10内の後述するメモリ部11が一時メモリ25からロギングデータの読み出しを完了した後にパーソナルコンピュータ10内のプログラム部12からの指示によってフラグをオンさせるデバイスである。また、メモリ部11が一時メモリ25からN件のロギングデータを読み出す直前にフラグをオフにして、メモリ部11が一時メモリ25のロギングデータの読み出しを開始するものである。したがって、メモリ部11が一時メモリ25からロギングデータの読み出しを行っている場合にのみ読み出し完了フラグはオフになり、それ以外の場合はオンになる。
【0015】
読み出し許可フラグ23は、一時メモリ25にロギングされたデバイスデータが所定の件数に達した場合にFB21によってフラグがオンにされるデバイスであり、これをパーソナルコンピュータ10のプログラム部12に送信する。また、プログラム部12はPLC20に対し、メモリ部11が一時メモリ25からロギングデータを読み出し終えた後に、フラグをオフにさせる指示を送信する。
【0016】
パーソナルコンピュータ10は、メモリ部11、プログラム部12、例えばロギング条件設定画面13〜16からなる入力部を備えている。メモリ部11はPLC20の一時メモリ25に格納されているロギングデータを所定のN件まとめて読み出し、格納する。プログラム部12は、PLC20の読み出し許可フラグ23から送信される一時メモリ25の読み出し許可を受信し、メモリ部11に一時メモリ25のロギングデータの読み出しを行わせる。また、プログラム部12は、メモリ部11が一時メモリ25から所定件数のロギングデータの読み出しを完了した時に読み出しが完了したことをPLC20に送信する。ロギング条件設定画面13〜16は、ユーザによって決定されたロギング条件を入力するための画面であり、入力されたロギング条件に基づいてプログラム部12が所定のN件の算出を行う。
【0017】
本実施の形態にかかるロギング処理方法について図2〜4に従って説明する。図2はこの発明の実施の形態にかかるロギング処理方法の一部を示すフローチャートである。ユーザは、ロギング処理を行う前にパーソナルコンピュータ10に備えられたロギング条件設定画面13〜16を用いてロギング条件を設定する(ステップS100)。
【0018】
図3はこの発明の実施の形態にかかるロギング条件を入力するためのロギング条件設定画面の一例を示す図である。図3(a)、図3(b)はパーソナルコンピュータとPLCが直接接続される場合のロギング条件設定画面を模式的に表した図である。ユーザは図3(a)に示すロギング条件設定画面13においてパーソナルコンピュータ10とPLC20の間に必要な通信ポートの種類と必要とするロギングデバイスの種類を設定する。ここでは、パーソナルコンピュータ10とPLC20が通信を行うための接続部をCOM1と設定してある場合を示しており、ロギング対象となるロギングデバイスの種類をD100と設定してある場合を示している。
【0019】
つぎに、図3(b)に示すロギング条件設定画面14においてパーソナルコンピュータ10のメモリ部11とPLC20の一時メモリ25の間における通信速度、一時メモリ25がFB21のデバイスデータをロギングする時間間隔を示すロギング間隔、一時メモリ25がFB21から1回にロギングするデータのサイズを示す1回のロギングデータサイズ、一時メモリ25が格納することができるデータサイズを示す全一時メモリサイズを設定する。ここでは、通信速度を9600bps、ロギング間隔を1000ms、1回のロギングデータメモリサイズを2byte,全一時メモリサイズ1024byteのように設定している場合を示している。このように、通信速度の設定を自由に行うことができるため、パーソナルコンピュータ10とPLC20のネットワーク媒体が変更された場合であっても通信速度の設定を変更することによって最適なロギング条件を設定することが可能となる。
【0020】
図3(c)、図3(d)はパーソナルコンピュータとPLCが通信速度が変化するようなネットワークで接続されている場合のロギング条件設定画面を模式的に表した図である。ユーザは図3(c)に示すロギング条件設定画面15においてネットワーク上のPLC20を識別するための番号を示すIPアドレスと前述したロギングデバイスを設定する。ここでは、ネットワーク上のPLC20を識別するための番号が10.97.29.99である場合を示している。
【0021】
さらに、図3(d)に示すロギング条件設定画面16において設定する通信速度はロギング条件設定画面14において設定した通信速度の場合とは異なり、パーソナルコンピュータ10のメモリ部11がPLC20の一時メモリ25から実際のロギングデータの読み出しにかかった時間と実際に読み出したロギングデータサイズを1〜複数回計測してその都度通信速度を算出し、この算出した通信速度の平均値により通信速度を決定する。ここでは、通信速度の平均値が1.78Mbpsである場合を示している。このように、通信速度が変化するような環境でのロギング処理であっても通信速度が変化した際に通信速度、ロギング間隔、1回のロギングデータサイズ、全一時メモリサイズを再入力すれば再び最適なロギング条件を得ることが可能となる。
【0022】
つぎに、ステップS100で設定されたロギング条件に基づいて、一時メモリ25に格納されたロギングデータが何件になった時パーソナルコンピュータ10のメモリ部11はPLC20の一時メモリ25からロギングデータを読み出すべきかプログラム部12が算出し、この算出結果をPLC20のFB21に送信する(ステップS110)。この後、PLC20のFB21がロギングを開始するためのフラグとして利用する内部デバイス(図示せず)をオンにし、ロギング処理が開始される。
【0023】
ここで、パーソナルコンピュータ10のメモリ部11がPLC20の一時メモリ25からまとめて読み出すロギングデータの最適件数(以下、ロギングデータ読み出し件数という)のN件の算出方法について説明する。ロギングデータ読み出し件数は、メモリ部11が一時メモリ25のロギングデータを読み出している間に、一時メモリ25がFB21から新たにロギングするデバイスデータがメモリ部11に読み出される前の一時メモリ25内のロギングデータに上書きしないことを条件として算出する。1回のロギングデータサイズをQbyte、ロギングデータ読み出し件数をN(Nは自然数)件とすると、パーソナルコンピュータ10のメモリ部11がPLC20の一時メモリ25からまとめて読み出すロギングデータは、(Q×N)byteとなる。また、一時メモリ25が有する全メモリ領域の全一時メモリサイズをZbyteとすると一時メモリ25からパーソナルコンピュータ10のメモリ部11が読み出し中のロギングデータのサイズを除いた残りの一時メモリ(以下、残りの一時メモリという)のメモリサイズは(Z−(Q×N))byteとなる。
【0024】
また、パーソナルコンピュータ10のメモリ部11がPLC20の一時メモリ25からロギングデータを読み出すときの通信速度をSbit/secとすると、8bit=1byteであることから通信速度は(S/8)×(1/1000)byte/msecである。また、パーソナルコンピュータ10のメモリ部11がPLC20の一時メモリ25からまとめて読み出すロギングデータサイズはQ×Nbyteであり、これを読み出すのにかかる時間はQ×N×(8/S)×1000msecとなる。また、ロギング間隔をTmsecとすると、パーソナルコンピュータ10のメモリ部11がPLC20の一時メモリ25からロギングデータを読み出している間に、FB21から一時メモリ25にロギングされるデータ(以下、読み出し中におけるロギングデータという)のサイズは(8QN/S)×1000×(1/T)×Qbyteとなる。
【0025】
したがって、メモリ部11が一時メモリ25からロギングデータを読み出している間にFB21から残りの一時メモリ25にロギングされるロギングデータのサイズが残りの一時メモリのサイズより小さくなるために必要なロギングデータ読み出し件数Nの条件は、
(8QN/S)×1000×(1/T)×Q<Z−(Q×N)・・・式(1)
から求めることができる。
【0026】
式(1)を満たすNが、メモリ部11が一時メモリ25のロギングデータを読み出している間に、一時メモリ25がFB21から新たにロギングするデバイスデータがメモリ部11に読み出される前の一時メモリ25内のロギングデータが上書きしない条件となる。
【0027】
例えば、先述した通信速度9600bit/sec,ロギング間隔1000ms、1回のロギングデータサイズ2byte、全一時メモリサイズ1024byteの場合について式(1)を適用すると、Nが511以下の自然数の場合に式(1)を満たすこととなる。したがって、一時メモリ25に1件〜511件のデバイスデータがロギングされた時点で、メモリ部11が一時メモリ25から1件〜511件のロギングデータをまとめて読み出せば、この読み出しが行われている間に、一時メモリ25がFB21から新たにロギングするデバイスデータによってメモリ部11に読み出される前の一時メモリ25内のロギングデータに上書きすることはない。なお、Nが1未満になる場合は、ロギング条件を変更させる必要がある。
【0028】
つぎに、ロギング間隔がTの場合にロギングデータ読み出し件数が算出したN件に達した時に読み出し許可フラグ23をオンさせるシーケンスプログラムを作成してPLC20に書き込む(ステップS120)。なお、このときのシーケンスプログラムをFB21で作成すれば、シーケンスプログラムを繰り返し利用することが可能となる。
【0029】
図4はこの発明の実施の形態にかかるロギング処理方法の一部を示すフローチャートである。前述したシーケンスプログラムがFB21に書き込まれた後、FB21から一時メモリ25にデバイスデータがロギングされる(ステップS200)。この後、一時メモリ25にロギングされたロギングデータの件数がステップS110で算出したロギングデータ読み出し件数のN件に達した場合(ステップS210)、読み出し許可フラグ23がオンになる(ステップS220)。この読み出し許可フラグ23のオンは、FB21内のN件のデバイスデータが一時メモリ25にロギングされた後にFB21の指示によって行われる。
【0030】
ここで、PLC20内の読み出し完了フラグ22がオンであることを確認した後(ステップS230)、読み出し完了フラグ22をオフにし(ステップS240)、メモリ部11は一時メモリ25からN件のロギングデータをまとめて読み出す(ステップS250)。この読み出し処理の間、FB21内のロギングデータは一時メモリ25のうちパーソナルコンピュータ10がN件の読み出しに使用中であるメモリ領域以外の残りのメモリ領域にロギングされる。
【0031】
つぎに、メモリ部11がN件分のロギングデータを読み出し終わると、読み出し完了フラグ22をオンにするとともに(ステップS260)、読み出し許可フラグ23をオフにする(ステップS270)。読み出し完了フラグ22のオンによってメモリ部11は一時メモリ25のロギングデータを読み出しが可能な待機状態を示し、読み出し許可フラグ23のオフによって一時メモリ25のロギングデータがN件に達していない状態を示すこととなる。そして、ユーザより処理停止の操作が行われるまで(ステップS280)、ステップS200〜ステップS270を繰り返す。
【0032】
このように実施の形態によれば、一時メモリ25の全一時メモリ領域(サイズ)をロギングデータN件分の領域(サイズ)とこれ以外の領域(サイズ)に分割して利用するため、メモリ部11が一時メモリ25のN件分のロギングデータをまとめて読み出し中であっても、一時メモリ25のN件分の領域以外の領域に対してFB21のデバイスデータをロギングすることが可能となる。また、メモリ部11が一時メモリ25のロギングデータをN件まとめて読み出す時間を一時メモリ25のN件分の領域以外の領域にFB21の新たなデバイスデータをロギングする時間より短く設定してあるので、メモリ部11が一時メモリ25のN件分のロギングデータを読み出している間に一時メモリ25の残りの領域に対してロギングされるデータがメモリ部11へ読み出される前のロギングデータを上書きして消去することはない。したがって、繰り返し行われるロギング処理に対しロギング装置を停止させることなく時間的推移に従った漏れのないロギングデータを得ることが可能となる。
【0033】
【発明の効果】
以上説明したとおり、この発明によれば、繰り返し行われるロギング処理に対しロギング処理装置を停止させることなく時間的推移に従った漏れのないロギングデータを得ることが可能になるという効果を奏する。
【図面の簡単な説明】
【図1】この発明の実施の形態にかかるロギング装置の構成を示すブロック図である。
【図2】この発明の実施の形態にかかるロギング処理方法の一部を示すフローチャートである。
【図3】この発明の実施の形態にかかるロギング条件の設定画面の一例を示す図である。
【図4】この発明の実施の形態にかかるロギング処理方法の一部を示すフローチャートである。
【符号の説明】
10 パーソナルコンピュータ、11 メモリ部、12 プログラム部、13〜16 ロギング条件設定画面、20 PLC、21 FB、22 読み出し完了フラグ、23 読み出し許可フラグ、24 デバイスデータ、25 一時メモリ。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a logging processing device, and more particularly to a logging processing device that repeatedly performs a process of collectively reading logging data.
[0002]
[Prior art]
Conventionally, in a logging processing device (data transmission system) in which a receiving-side data communication terminal device such as a personal computer and a transmitting-side data communication terminal device such as a PLC (Programmable Logic Controller) are connected via a network or the like, a receiving-side data communication terminal device or the like is used. Since the time required for data transmission between the transmitting-side data communication terminals is slower than the program execution cycle in the transmitting-side data communication terminal, all changes in device data in the transmitting-side data communication terminal can be changed. Could not be read. For this reason, there has been a problem in that logging (discharge processing) data from the transmitting data communication device to the receiving data communication device is leaked.
[0003]
Therefore, in a logging processing device (communication data recording device) described in Patent Document 1, device data in a PLC (computer main body) to be logged is stored in a temporary memory (cyclic buffer) provided in the PLC, and a failure occurs. When the logging data reaches a predetermined number only when the error occurs, the logging data when the failure occurs is output to a memory (external storage device) in the receiving data terminal device and recorded.
[0004]
[Patent Document 1]
JP-A-3-235454 (pages 3 and 4)
[0005]
[Problems to be solved by the invention]
However, in the logging processing device described in Patent Document 1, while logging data reaching a predetermined number is output to a memory in the receiving data communication terminal device and recorded, the logging data is temporarily received by the logging data in the memory. A new logging process needs to be temporarily interrupted in the PLC so that the logging data that has not yet been output to the memory in the side data terminal device is overwritten by the new logging data and is not deleted. For this reason, there was a problem that logging data was leaked.
[0006]
The present invention has been made in view of the above, and an object of the present invention is to provide a logging processing device that logs device data without stopping the logging processing device without omission.
[0007]
[Means for Solving the Problems]
In order to solve the above-described problems and achieve the object, in a logging processing device according to the present invention, a function block in which a circuit block repeatedly used in a sequence program is made into parts and device data of the function block are logged. A PLC having a first memory unit in a ring buffer format, and a program unit, a second memory unit, and an input unit for inputting logging conditions. And a receiving data communication terminal device for storing the logging data from the first memory unit in the memory unit of the first embodiment, wherein the first memory unit stores the logging data of a predetermined size in the second memory unit. While outputting the data collectively, a second area other than the first area storing the data of the predetermined size is used. The logging new device data from the function block, and wherein the logging to said second region so as not to overwrite the new device data logging after the new device data logging previously.
[0008]
According to the present invention, while the logging data of the predetermined size stored in the first area of the first memory unit is collectively output to the second memory unit, the data other than the first area of the first memory unit is output. Since the size sufficient to log new device data in the second area is calculated, logging data that is not output to the second memory unit is not overwritten by new logging data.
[0009]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, preferred embodiments of a logging device according to the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the present invention is not limited by the embodiment. An embodiment of the present invention will be described with reference to FIGS. FIG. 1 is a block diagram showing a configuration of a logging device according to an embodiment of the present invention.
[0010]
The logging device is configured by directly connecting a receiving-side data communication terminal device including the personal computer 10 and a PLC (Programmable Logic Controller) 20 or by connecting them via a network.
[0011]
The PLC 20 includes a function block (hereinafter, referred to as FB) 21, a temporary memory 25, a read completion flag 22, and a read permission flag 23.
[0012]
The FB 21 is a component of a circuit block that is repeatedly used in the sequence program, and turns on the read permission flag 23 after N device data 24, which will be described later, is logged in the temporary memory 25.
[0013]
The temporary memory 25 logs the device data of the FB 21 in a ring buffer (circulating buffer) format. When the logging data (logged device data) reaches a predetermined N number of items to be described later, the temporary memory 25 collectively collects the data. The data is read (output) by the memory unit 11 of the computer 10. Also, while the memory unit 11 is reading the logging data of the temporary memory 25, the temporary memory 25 uses the area of the memory area of the temporary memory 25 other than the area used for the N pieces of logging data to store the data of the FB 21. Log device data.
[0014]
The read completion flag 22 is a device that turns on the flag in response to an instruction from the program unit 12 in the personal computer 10 after the memory unit 11 in the personal computer 10 completes reading the logging data from the temporary memory 25. The flag is turned off immediately before the memory unit 11 reads out the N pieces of logging data from the temporary memory 25, and the memory unit 11 starts reading the logging data from the temporary memory 25. Therefore, the read completion flag is turned off only when the memory unit 11 is reading the logging data from the temporary memory 25, and is turned on otherwise.
[0015]
The read permission flag 23 is a device that is turned on by the FB 21 when the device data logged in the temporary memory 25 reaches a predetermined number, and transmits this to the program unit 12 of the personal computer 10. After the memory unit 11 finishes reading the logging data from the temporary memory 25, the program unit 12 transmits an instruction to the PLC 20 to turn off the flag.
[0016]
The personal computer 10 includes an input unit including a memory unit 11, a program unit 12, and, for example, logging condition setting screens 13 to 16. The memory unit 11 collectively reads and stores predetermined N pieces of logging data stored in the temporary memory 25 of the PLC 20. The program section 12 receives the read permission of the temporary memory 25 transmitted from the read permission flag 23 of the PLC 20, and causes the memory section 11 to read the logging data of the temporary memory 25. In addition, when the memory unit 11 completes reading the predetermined number of pieces of logging data from the temporary memory 25, the program unit 12 transmits the completion of the reading to the PLC 20. The logging condition setting screens 13 to 16 are screens for inputting the logging conditions determined by the user, and the program unit 12 performs predetermined N calculations based on the input logging conditions.
[0017]
A logging processing method according to the present embodiment will be described with reference to FIGS. FIG. 2 is a flowchart showing a part of the logging processing method according to the embodiment of the present invention. Before performing the logging process, the user sets logging conditions using the logging condition setting screens 13 to 16 provided in the personal computer 10 (step S100).
[0018]
FIG. 3 is a diagram showing an example of a logging condition setting screen for inputting logging conditions according to the embodiment of the present invention. FIGS. 3A and 3B are diagrams schematically showing a logging condition setting screen when a personal computer and a PLC are directly connected. The user sets the type of communication port required between the personal computer 10 and the PLC 20 and the type of required logging device on the logging condition setting screen 13 shown in FIG. Here, a case where the connection unit for communication between the personal computer 10 and the PLC 20 is set to COM1 is shown, and a case where the type of a logging device to be logged is set to D100 is shown.
[0019]
Next, the communication speed between the memory unit 11 of the personal computer 10 and the temporary memory 25 of the PLC 20 and the time interval at which the temporary memory 25 logs device data of the FB 21 are shown on the logging condition setting screen 14 shown in FIG. A logging interval, a single logging data size indicating the size of data to be logged once from the FB 21 by the temporary memory 25, and a total temporary memory size indicating a data size that can be stored in the temporary memory 25 are set. Here, a case is shown where the communication speed is set to 9600 bps, the logging interval is set to 1000 ms, the logging data memory size for one time is set to 2 bytes, and the total temporary memory size is set to 1024 bytes. As described above, since the communication speed can be freely set, even when the network medium of the personal computer 10 and the PLC 20 is changed, the optimum logging condition is set by changing the communication speed setting. It becomes possible.
[0020]
FIGS. 3C and 3D are diagrams schematically showing a logging condition setting screen when the personal computer and the PLC are connected via a network in which the communication speed changes. The user sets an IP address indicating a number for identifying the PLC 20 on the network and the above-described logging device on the logging condition setting screen 15 shown in FIG. Here, a case is shown where the number for identifying the PLC 20 on the network is 10.97.29.99.
[0021]
Furthermore, the communication speed set on the logging condition setting screen 16 shown in FIG. 3D is different from the communication speed set on the logging condition setting screen 14, and the memory unit 11 of the personal computer 10 stores the communication speed from the temporary memory 25 of the PLC 20. The time taken to actually read the logging data and the size of the actually read logging data are measured one or more times, the communication speed is calculated each time, and the communication speed is determined by the average value of the calculated communication speeds. Here, a case where the average value of the communication speed is 1.78 Mbps is shown. As described above, even in the logging process in an environment in which the communication speed changes, if the communication speed changes, the communication speed, the logging interval, the logging data size at one time, and the total temporary memory size are re-entered. Optimum logging conditions can be obtained.
[0022]
Next, based on the logging conditions set in step S100, when the number of pieces of logging data stored in temporary memory 25 is reached, memory unit 11 of personal computer 10 should read logging data from temporary memory 25 of PLC 20. Or the program unit 12 calculates and transmits the calculation result to the FB 21 of the PLC 20 (step S110). Thereafter, an internal device (not shown) used by the FB 21 of the PLC 20 as a flag for starting logging is turned on, and the logging process is started.
[0023]
Here, a description will be given of a method of calculating the optimum number of logging data (hereinafter, referred to as the number of reading of logging data) N, which is collectively read from the temporary memory 25 of the PLC 20 by the memory unit 11 of the personal computer 10. While the memory unit 11 is reading the logging data in the temporary memory 25, the logging data is read from the temporary memory 25 before the device data to be newly logged from the FB 21 is read into the memory unit 11 while the memory unit 11 is reading the logging data from the temporary memory 25. It is calculated on the condition that data is not overwritten. Assuming that the size of the logging data at one time is Qbyte and the number of readings of the logging data is N (N is a natural number), the logging data that the memory unit 11 of the personal computer 10 collectively reads from the temporary memory 25 of the PLC 20 is (Q × N). byte. When the total temporary memory size of the entire memory area of the temporary memory 25 is Zbyte, the remaining temporary memory (hereinafter, the remaining temporary memory 25 except the size of the logging data being read by the memory unit 11 of the personal computer 10 from the temporary memory 25) is used. The memory size of “temporary memory” is (Z− (Q × N)) bytes.
[0024]
If the communication speed when the memory unit 11 of the personal computer 10 reads the logging data from the temporary memory 25 of the PLC 20 is Sbit / sec, the communication speed is (S / 8) × (1/1) because 8 bits = 1 byte. 1000) bytes / msec. The logging data size that the memory unit 11 of the personal computer 10 collectively reads from the temporary memory 25 of the PLC 20 is Q × Nbytes, and the time required to read the data is Q × N × (8 / S) × 1000 msec. . If the logging interval is Tmsec, while the memory unit 11 of the personal computer 10 is reading the logging data from the temporary memory 25 of the PLC 20, data logged from the FB 21 to the temporary memory 25 (hereinafter, logging data during reading) ) Is (8QN / S) × 1000 × (1 / T) × Qbyte.
[0025]
Therefore, while the memory unit 11 is reading the logging data from the temporary memory 25, the logging data reading required for the size of the logging data to be logged from the FB 21 to the remaining temporary memory 25 becomes smaller than the size of the remaining temporary memory. The condition of the number N is
(8QN / S) × 1000 × (1 / T) × Q <Z− (Q × N) Equation (1)
Can be obtained from
[0026]
N that satisfies the expression (1) indicates that while the memory unit 11 is reading the logging data in the temporary memory 25, the temporary memory 25 stores the temporary memory 25 before the device data to be newly logged from the FB 21 is read into the memory unit 11. This is the condition that the logging data in is not overwritten.
[0027]
For example, when Equation (1) is applied to the case of the above-described communication speed of 9600 bits / sec, a logging interval of 1000 ms, a single logging data size of 2 bytes, and a total temporary memory size of 1024 bytes, when N is a natural number of 511 or less, Equation (1) ). Therefore, when one to 511 device data are logged in the temporary memory 25 and the memory unit 11 collectively reads one to 511 logging data from the temporary memory 25, this reading is performed. In the meantime, the temporary memory 25 does not overwrite the logging data in the temporary memory 25 before being read out to the memory unit 11 by the device data newly logged from the FB 21. If N is less than 1, the logging condition needs to be changed.
[0028]
Next, when the logging interval is T, a sequence program for turning on the reading permission flag 23 when the number of reading of the logging data reaches the calculated N is created and written into the PLC 20 (step S120). If the sequence program at this time is created by the FB 21, the sequence program can be repeatedly used.
[0029]
FIG. 4 is a flowchart showing a part of the logging processing method according to the embodiment of the present invention. After the above-described sequence program is written to the FB 21, device data is logged from the FB 21 to the temporary memory 25 (step S200). Thereafter, when the number of pieces of logging data recorded in the temporary memory 25 reaches N of the number of pieces of reading of logging data calculated in step S110 (step S210), the reading permission flag 23 is turned on (step S220). The read permission flag 23 is turned on in response to an instruction from the FB 21 after the N device data in the FB 21 are logged in the temporary memory 25.
[0030]
Here, after confirming that the read completion flag 22 in the PLC 20 is on (step S230), the read completion flag 22 is turned off (step S240), and the memory unit 11 stores the N pieces of logging data from the temporary memory 25. They are read out at once (step S250). During this reading process, the logging data in the FB 21 is logged in the remaining memory area of the temporary memory 25 other than the memory area used by the personal computer 10 for reading the N items.
[0031]
Next, when the memory unit 11 finishes reading out the N pieces of logging data, the reading completion flag 22 is turned on (step S260), and the reading permission flag 23 is turned off (step S270). When the read completion flag 22 is turned on, the memory unit 11 indicates a standby state in which the logging data of the temporary memory 25 can be read, and when the read permission flag 23 is turned off, the logging data in the temporary memory 25 does not reach N records. It will be. Steps S200 to S270 are repeated until the user performs an operation to stop the processing (step S280).
[0032]
As described above, according to the embodiment, the entire temporary memory area (size) of the temporary memory 25 is divided into an area (size) for N pieces of logging data and another area (size). Even when 11 is reading the logging data for the N records in the temporary memory 25 collectively, it is possible to log the device data of the FB 21 to an area other than the area for the N records in the temporary memory 25. Further, the time for the memory unit 11 to read out the N pieces of logging data in the temporary memory 25 collectively is set shorter than the time for logging new device data of the FB 21 to an area other than the area of the N pieces of temporary memory 25. While the memory unit 11 is reading the N pieces of logging data in the temporary memory 25, the data to be logged in the remaining area of the temporary memory 25 is overwritten by the logging data before being read out to the memory unit 11. It will not be erased. Therefore, it is possible to obtain logging data without omission according to the time transition without stopping the logging device for the repeated logging processing.
[0033]
【The invention's effect】
As described above, according to the present invention, there is an effect that it is possible to obtain logging data without omission according to a temporal transition without stopping the logging processing device with respect to the repeatedly performed logging processing.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a logging device according to an embodiment of the present invention.
FIG. 2 is a flowchart illustrating a part of a logging processing method according to the embodiment of the present invention;
FIG. 3 is a diagram illustrating an example of a logging condition setting screen according to the embodiment of the present invention;
FIG. 4 is a flowchart showing a part of a logging processing method according to the embodiment of the present invention;
[Explanation of symbols]
Reference Signs List 10 personal computer, 11 memory unit, 12 program unit, 13-16 logging condition setting screen, 20 PLC, 21 FB, 22 read completion flag, 23 read permission flag, 24 device data, 25 temporary memory.

Claims (2)

シーケンスプログラム内で繰り返し使用する回路ブロックを部品化したファンクションブロックと該ファンクションブロックのデバイスデータがロギングされるリングバッファ形式の第1のメモリ部とを有するPLCと、プログラム部、第2のメモリ部およびロギング条件を入力する入力部を有し、かつ前記PLCと電気的に接続されて前記第2のメモリ部に前記第1のメモリ部からのロギングデータを格納する受信側データ通信端末装置とを備えるロギング処理装置において、
前記第1のメモリ部は、前記第2のメモリ部に所定サイズのロギングデータをまとめて出力している間、前記所定サイズのデータを格納している第1領域以外の第2領域に前記ファンクションブロックからの新たなデバイスデータをロギングし、かつ先にロギングした前記新たなデバイスデータを後にロギングする新たなデバイスデータによって上書きしないよう前記第2領域に対しロギングすることを特徴とするロギング処理装置。
A PLC having a function block in which circuit blocks repeatedly used in a sequence program are made into parts and a first memory unit in a ring buffer format in which device data of the function block is logged; a program unit; a second memory unit; A receiving data communication terminal device that has an input unit for inputting a logging condition and is electrically connected to the PLC and stores logging data from the first memory unit in the second memory unit; In the logging processing device,
The first memory unit stores the function data in a second area other than the first area storing the predetermined size data while simultaneously outputting logging data of the predetermined size to the second memory unit. A logging processing apparatus for logging new device data from a block and logging to the second area so that the previously logged new device data is not overwritten by new device data to be logged later.
前記プログラム部は、前記受信側データ通信端末装置と前記PLCの通信速度、前記ファンクションブロックから前記第1のメモリ部へのロギング時間間隔、前記ファンクションブロックから前記第1のメモリ部へ一度にロギングされるデータサイズおよび前記第1のメモリ部が備える全メモリサイズから前記所定サイズを算出することを特徴とする請求項1に記載のロギング処理装置。The program unit includes a communication speed between the receiving side data communication terminal device and the PLC, a logging time interval from the function block to the first memory unit, and logging at one time from the function block to the first memory unit. The logging processing device according to claim 1, wherein the predetermined size is calculated from a data size of the first memory unit and a total memory size of the first memory unit.
JP2003105310A 2003-04-09 2003-04-09 Logging processor Expired - Fee Related JP4346939B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003105310A JP4346939B2 (en) 2003-04-09 2003-04-09 Logging processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003105310A JP4346939B2 (en) 2003-04-09 2003-04-09 Logging processor

Publications (2)

Publication Number Publication Date
JP2004310592A true JP2004310592A (en) 2004-11-04
JP4346939B2 JP4346939B2 (en) 2009-10-21

Family

ID=33467859

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003105310A Expired - Fee Related JP4346939B2 (en) 2003-04-09 2003-04-09 Logging processor

Country Status (1)

Country Link
JP (1) JP4346939B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008287559A (en) * 2007-05-18 2008-11-27 Keyence Corp Plc operation display system
US20100063608A1 (en) * 2008-09-11 2010-03-11 Miller John W Method and System for Programmable Numerical Control
WO2012056539A1 (en) * 2010-10-27 2012-05-03 三菱電機株式会社 Logging setup device, logging setup method and recordable medium
JP5967322B1 (en) * 2015-06-16 2016-08-10 三菱電機株式会社 Information processing apparatus and information processing method
JP2020067752A (en) * 2018-10-23 2020-04-30 株式会社キーエンス Programmable logic controller system, program creation assisting device, and computer program

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508932B (en) * 2011-11-17 2013-06-12 航天科工深圳(集团)有限公司 Telemetering and remote signaling data process method and device

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008287559A (en) * 2007-05-18 2008-11-27 Keyence Corp Plc operation display system
US20100063608A1 (en) * 2008-09-11 2010-03-11 Miller John W Method and System for Programmable Numerical Control
US8688258B2 (en) * 2008-09-11 2014-04-01 Rockwell Automation Technologies, Inc. Method of controlling a machine tool
US9483043B2 (en) 2008-09-11 2016-11-01 Rockwell Automation Technologies, Inc. Method and system for programmable numerical control
WO2012056539A1 (en) * 2010-10-27 2012-05-03 三菱電機株式会社 Logging setup device, logging setup method and recordable medium
CN103180789A (en) * 2010-10-27 2013-06-26 三菱电机株式会社 Logging setting device, method for setting logging, and recording medium
JP5312695B2 (en) * 2010-10-27 2013-10-09 三菱電機株式会社 Logging setting device, logging setting method, and recording medium
KR101472697B1 (en) * 2010-10-27 2014-12-12 미쓰비시덴키 가부시키가이샤 Logging setup device, logging setup method and recordable medium
JP5967322B1 (en) * 2015-06-16 2016-08-10 三菱電機株式会社 Information processing apparatus and information processing method
JP2020067752A (en) * 2018-10-23 2020-04-30 株式会社キーエンス Programmable logic controller system, program creation assisting device, and computer program
JP7173826B2 (en) 2018-10-23 2022-11-16 株式会社キーエンス Programmable logic controller system, programming support device and computer program

Also Published As

Publication number Publication date
JP4346939B2 (en) 2009-10-21

Similar Documents

Publication Publication Date Title
US7526679B2 (en) Apparatus for developing and verifying system-on-chip for internet phone
KR101745456B1 (en) Ecu for transmitting large data in hil test environment, system including the same and method thereof
TWI301365B (en)
CN103686831A (en) Test system, test method, and test device
CN111711546B (en) Device throughput testing method, device, system and computer readable storage medium
US10965934B2 (en) System on chip and integrated circuit for performing data loopback and mobile device including the same
CN103823698A (en) Method and device for programming and starting FPGA target program and DSP target program
JP5522155B2 (en) Program rewriting method, program rewriting device, and electronic control device
JP4346939B2 (en) Logging processor
CN109408426B (en) Flexible and universal serial communication method and system
CN103314554B (en) DynamicHost configuration file for option mod
US20090109967A1 (en) Method and system for remotely configuring an ethernet switch using ethernet packets
JP2022113819A (en) Relay device, relay method, and computer program
CN115604070A (en) Message transmission method, device, equipment and medium based on MCTP (Multi-function peripheral protocol)
JP2001053619A (en) Image data communication device
JP5376990B2 (en) Relay device and relay method of relay device
CN113055433A (en) File transmission method, device, equipment and machine-readable storage medium
JP3626926B2 (en) File transmission server, file transmission / reception system, file transmission / reception method, and transmission program
Lee et al. Data cascading method for the large automotive data acquisition beyond the CAN bandwidth in HiL testing
JP2002016662A (en) Data analysis method and device
JP2019040488A (en) Electronic control apparatus
CN117632195A (en) Wireless earphone upgrading method, device, equipment and storage medium
KR100356810B1 (en) Dma having operational function
CN106815024A (en) A kind of method and system for optimizing starting time of mobile terminal
JP3146864B2 (en) Unidirectional loop transmission circuit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060126

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081210

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081216

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090204

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

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

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120724

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120724

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130724

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees