Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3661732B2 - Programmable controller - Google Patents
[go: Go Back, main page]

JP3661732B2 - Programmable controller - Google Patents

Programmable controller Download PDF

Info

Publication number
JP3661732B2
JP3661732B2 JP24379597A JP24379597A JP3661732B2 JP 3661732 B2 JP3661732 B2 JP 3661732B2 JP 24379597 A JP24379597 A JP 24379597A JP 24379597 A JP24379597 A JP 24379597A JP 3661732 B2 JP3661732 B2 JP 3661732B2
Authority
JP
Japan
Prior art keywords
circuit
time
application program
programmable controller
control circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP24379597A
Other languages
Japanese (ja)
Other versions
JPH1185220A (en
Inventor
伸有 守
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yokogawa Electric Corp
Original Assignee
Yokogawa 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 Yokogawa Electric Corp filed Critical Yokogawa Electric Corp
Priority to JP24379597A priority Critical patent/JP3661732B2/en
Publication of JPH1185220A publication Critical patent/JPH1185220A/en
Application granted granted Critical
Publication of JP3661732B2 publication Critical patent/JP3661732B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、プログラマブルコントローラに関し、特にアプリケーションプログラムのスキャンタイムの分布を測定することが可能なプログラマブルコントローラに関する。
【0002】
【従来の技術】
従来のプログラマブルコントローラは、センサからのデータ収集や機器の制御等を予め格納されたアプリケーションプログラムに基づき実行する。
【0003】
また、プログラムの実行方式として予め格納されたアプリケーションプログラムを何回も連続して実行するスキャン方式がある。
【0004】
例えば、センサ等から圧力信号及び温度信号を収集して、圧力信号を温度信号で補償して出力するアプリケーションプログラムを連続して実行することにより、プログラマブルコントローラからは温度補償された圧力信号が定期的に出力されることになる。
【0005】
但し、一般にプログラマブルコントローラでアプリケーションプログラムを1回実行する時間(以下、スキャンタイムと呼ぶ。)は常に一定ではなくプログラムの実行時の条件により変動する。
【0006】
例えば、入力される前記圧力信号や前記温度信号の値の変動や、前記温度補償の演算内容等の諸条件により、アプリケーションプログラムの全命令が実行されるのではなく実行されずにスキップされたり、あるいは、何回も実行される命令が生じたりするのでスキャンタイムは常時変動する。
【0007】
特に、短いスキャンタイムが要求される場合にはアプリケーションプログラムの作成時にスキャンタイムの短縮を図る工夫をする必要があり、この場合にはプログラマブルコントローラで実行されるアプリケーションプログラムのスキャンタイムに関する情報を得る必要がある。
【0008】
一般に、プログラマブルコントローラにはこのような機能が付加されているものがあり、図5はこのような従来のプログラマブルコントローラの一例を示す構成ブロック図である。
【0009】
図5において1は入出力回路、2は制御回路、3はアプリケーションプログラムが格納される記憶回路、4はデバッグ回路、100は入力信号、101は出力信号である。
【0010】
入力信号100は入出力回路1を介して制御回路2に入力され、制御回路1から出力は入出力回路1を介して出力信号101として外部に出力される。また、制御回路2は記憶回路3及びデバッグ回路4と相互に接続される。
【0011】
ここで、図5に示す従来例の動作を説明する。制御回路2は記憶回路3に予め格納されたアプリケーションプログラムの命令を順次読み出して実行する。
【0012】
一方、デバッグ回路4は前記アプリケーションプログラムを1回実行するのに要するスキャンタイムに関する情報を測定する。
【0013】
具体的には、デバッグ回路4では最新スキャンタイム、スキャンタイムの最大値及び最小値及び平均スキャンタイムを測定して記憶する。
【0014】
また、図6はデバッグ回路4の具体例を示す構成ブロック図であり、図6において5は時間計測用カウンタ回路、6は制御回路、7は記憶回路、102はクロック信号である。
【0015】
クロック信号102は時間計測用カウンタ回路5に入力され、時間計測用カウンタ回路5の出力が制御回路6に接続される。また、制御回路6と記憶回路7が相互に接続される。
【0016】
ここで、図6に示すデバッグ回路4の動作を図7を用いて説明する。図7はデバッグ回路4の動作を説明するフロー図である。
【0017】
図7(a)において制御回路6は時間計測用カウンタ回路5をリセットすると共にカウント動作を開始させ、図7(b)においてアプリケーションプログラムの実行の終了を検出する。
【0018】
図7(b)においてアプリケーションプログラムの終了が検出されると制御回路6は図7(c)において時間計測用カウンタ回路5のカウント値を読み出し、図7(d)において最新スキャンタイムとして記憶回路7に格納する。
【0019】
また、図7(e)において制御回路6は平均スキャンタイムを計算すると共にその結果を記憶回路7に格納する。
【0020】
図7(f)において制御回路6は前記カウント値を前回までのスキャンタイムの最大値と比較して大きいかどうかを判断する。
【0021】
もし、前記カウント値が前回までの最大値よりも大きければ、制御回路6は図7(g)において前記カウント値を最大値として記憶回路7に格納し、図7(j)の処理を行う。
【0022】
同様に、図7(h)において制御回路6は前記カウント値を前回までのスキャンタイムの最小値と比較して小さいかどうかを判断する。
【0023】
もし、前記カウント値が前回までの最小値よりも小さければ、制御回路6は図7(i)において前記カウント値を最小値として記憶回路7に格納し、図7(j)の処理を行う。
【0024】
最後に、図7(j)において制御回路6はスキャンタイム等の測定終了か否かを判断し、再測定であれば図7(a)の処理に戻り、測定終了であれば処理を終了する。
【0025】
また、プログラマブルコントローラとアプリケーションプログラム開発ツールとを接続し、このアプリケーションプログラム開発ツールでデバッグ回路4で測定されたスキャンタイムに関する情報を読み出して表示画面等に表示させることが可能になる。
【0026】
一般にはプログラマブルコントローラでアプリケーションプログラムを実行させながら前記情報をモニタすることにより、スキャンタイムの短縮を図る工夫をすることになる。
【0027】
この結果、デバッグ回路4によりプログラマブルコントローラのアプリケーションプログラムの作成に必要なスキャンタイムに関する情報を得ることが可能になる。
【0028】
【発明が解決しようとする課題】
しかし、図5等に示す従来例ではスキャンタイムの最大値及び最小等の個々の情報は分かるものの、例えば、スキャンタイムの最大値が突発的に生じたのか、或いは、定常的に生じるものなのかを区別することが出来ない。
【0029】
このため、アプリケーションプログラムのどの部分を修正すれば良いかが分からず、アプリケーションプログラムの修正作業の効率が悪くなってしまうと言った問題点があった。
従って本発明が解決しようとする課題は、スキャンタイムの長さの分布状況を得ることが可能なプログラマブルコントローラを実現することにある。
【0030】
【課題を解決するための手段】
このような課題を達成するために、本発明の第1では、
プログラマブルコントローラにおいて、
入出力回路と、
アプリケーションプログラムが格納される記憶回路と、
前記入出力回路及び前記記憶回路を制御する制御回路と、
前記アプリケーションプログラムが1回実行される時間を測定する時間計測用カウンタ回路と、予め設定された時間範囲に対応して設けられた複数の分布計数用カウンタ回路と、前記時間計測用カウンタ回路の測定時間が前記予め設定された時間範囲のうちどの時間範囲に該当するかを判断して該当する前記分布計数用カウンタ回路のカウント値をインクリメントする制御回路とから構成されたデバッグ回路とを備えたことを特徴するものである。
【0031】
このような課題を達成するために、本発明の第2では、
プログラマブルコントローラにおいて、
入出力回路と、
アプリケーションプログラムが格納される記憶回路と、
前記アプリケーションプログラムが1回実行される時間を測定する時間計測用カウンタ回路と、
予め設定された時間範囲に対応して設けられた複数の分布計数用カウンタ回路と、
前記入出力回路及び前記記憶回路を制御すると共に前記時間計測用カウンタ回路の測定時間が前記予め設定された時間範囲のうちどの時間範囲に該当するかを判断して該当する前記分布計数用カウンタ回路のカウント値をインクリメントする制御回路とを備えたことを特徴するものである。
【0032】
このような課題を達成するために、本発明の第3では、
本発明の第1及び第2において、
接続されたアプリケーションプログラム開発ツールに前記分布計数用カウンタ回路で計数されたカウント値に基づき前記アプリケーションプログラムが1回実行される時間の分布図を表示させることを特徴とするものである。
【0034】
【発明の実施の形態】
以下本発明を図面を用いて詳細に説明する。図1は本発明に係るプログラマブルコントローラの一実施例を示す構成ブロック図である。
【0035】
図1において1,2及び3は図5と同一符号を付してあり,4aはデバッグ回路,100aは入力信号、101aは出力信号である。
【0036】
入力信号100aは入出力回路1を介して制御回路2に入力され、制御回路1から出力は入出力回路1を介して出力信号101aとして外部に出力される。また、制御回路2は記憶回路3及びデバッグ回路4aと相互に接続される。
【0037】
ここで、図1に示す実施例の動作を説明する。制御回路2は記憶回路3に予め格納されたアプリケーションプログラムの命令を順次読み出して実行する。
【0038】
一方、デバッグ回路4aは前記アプリケーションプログラムを1回実行するのに要するスキャンタイムに関する情報を測定する。
【0039】
具体的には、デバッグ回路4aではスキャンタイムを測定して予め設定された時間範囲のうちどの時間範囲に該当するかを判断してその個数を計数する。言い換えれば、スキャンタイムの時間範囲での分布状況を測定して記憶する。
【0040】
また、図2はデバッグ回路4aの具体例を示す構成ブロック図であり、図2において5及び102は図6と同一符号を付してあり、6aは制御回路、8,9,10及び11は分布計数用カウンタ回路である。
【0041】
クロック信号102は時間計測用カウンタ回路5に入力され、時間計測用カウンタ回路5の出力が制御回路6aに接続される。また、制御回路6aと分布計数用カウンタ回路8,9,10及び11が相互に接続される。
【0042】
ここで、図2に示すデバッグ回路4aの動作を図3を用いて説明する。図3はデバッグ回路4aの動作を説明するフロー図である。
【0043】
図3(a)において制御回路6aは分布計数カウンタ回路8〜11で計数する時間範囲を予め設定する。
【0044】
具体的には、測定したスキャンタイムを”Tscan”とした場合に、
t3≦Tscan<t4 (1)
t2≦Tscan<t3 (2)
t1≦Tscan<t2 (3)
0≦Tscan<t1 (4)
(但し、0<t1<t2<t3<t4)
式(1)の条件を満たせば分布計数用カウンタ8のカウント値をインクリメントし、同様に、式(2)、式(3)及び式(4)の条件を満たせば分布計数用カウンタ9,10及び11のカウント値をインクリメントする様に設定する。
【0045】
図3(b)において制御回路6aは時間計測用カウンタ回路5をリセットすると共にカウント動作を開始させ、図3(c)においてアプリケーションプログラムの実行の終了を検出する。
【0046】
図3(c)においてアプリケーションプログラムの終了が検出されると制御回路6aは図3(d)において時間計測用カウンタ回路5のカウント値を読み出す。
【0047】
図3(e)において制御回路6aは前記カウント値が式(1)の条件を満たすかどうかを判断する。
【0048】
もし、式(1)の条件を満たせば図3(f)において制御回路6aは分布計数用カウンタ回路8のカウント値をインクリメントし、図3(l)の処理を行う。
【0049】
また、図3(g)において制御回路6aは前記カウント値が式(2)の条件を満たすかどうかを判断する。
【0050】
もし、式(2)の条件を満たせば図3(h)において制御回路6aは分布計数用カウンタ回路9のカウント値をインクリメントし、図3(l)の処理を行う。
【0051】
さらに、図3(i)において制御回路6aは前記カウント値が式(3)の条件を満たすかどうかを判断する。
【0052】
もし、式(3)の条件を満たせば図3(j)において制御回路6aは分布計数用カウンタ回路10のカウント値をインクリメントし、図3(l)の処理を行う。
【0053】
そして、図3(k)において制御回路6aは分布計数用カウンタ回路11のカウント値をインクリメントする。
【0054】
最後に、図3(l)において制御回路6aは測定終了か否かを判断し、再測定であれば図3(b)の処理に戻り、測定終了であれば処理を終了する。
【0055】
図4はこのようにデバッグ回路4aで測定したスキャンタイムの分布状況の一例を示す分布図である。
【0056】
具体的には、プログラマブルコントローラとアプリケーションプログラム開発ツールとを接続し、このアプリケーションプログラム開発ツールでデバッグ回路4aで測定されたスキャンタイムの分布状況に関する情報を読み出して表示画面等に分布図で表示させたものである。
【0057】
図4中”イ”、”ロ”、”ハ”及び”ニ”は分布計数用カウンタ回路11,10,9及び8で計数されたカウント値であり、図4においてはスキャンタイムは式(2)に示す時間範囲に多く分布していることが分かる。
【0058】
また、図4中”ニ”の分布が少ないことからスキャンタイムの最大値は突発的に発生していることも併せて認識することができる。
【0059】
このため、上述の場合にはアプリケーションプログラムの内で定常は実行されない特定の分岐ルーチン等に問題があると特定でき、その部分を修正すれば良いので、アプリケーションプログラムの修正作業の効率が良くなる。
【0060】
一方、図4中”ニ”の部分のカウント値が大きければ、スキャンタイムの最大値が定常的に生じるものであると認識できるので、アプリケーションプログラムの内で定常的に実行されるルーチンに問題があると特定できる。
【0061】
この結果、デバッグ回路4aによりスキャンタイムの長さを判断して、予め設定された時間範囲のうちどの時間範囲に該当するかを判断してその個数を計数することにより、スキャンタイムの長さの分布状況を得ることが可能になる。
【0062】
なお、図2のデバッグ回路4aにおいては説明の簡単のために分布計数用カウンタ回路を4個例示したが、勿論、この個数に限定される訳ではなく、分布計数用カウンタ回路を多く設けることにより、スキャンタイムのより詳細な分布状況を得ることができる。
【0063】
また、図2のデバッグ回路4aでは説明の簡単のために制御回路6aを図1中の制御回路2とは別個に例示したが、制御回路6aにおける処理内容を制御回路2に処理させても構わない。
【0064】
また、アプリケーションプログラム開発ツールとしては一般にはパーソナルコンピュータやワークステーション等の制御装置が用いられる。
【0065】
また、スキャンタイムがあるの時間以上になった場合にのみ発生する現象の特定に関しては、スキャンタイムがあるの時間以上になる頻度と前記現象の発生頻度の関係を調べる必要があり、本実施例によればこれらの関係を調べることが可能になる。
【0066】
【発明の効果】
以上説明したことから明らかなように、本発明によれば次のような効果がある。
デバッグ回路によりスキャンタイムの長さを判断して、予め設定された時間範囲のうちどの時間範囲に該当するかを判断してその個数を計数することにより、スキャンタイムの長さの分布状況を得ることが可能なプログラマブルコントローラが実現できる。
【図面の簡単な説明】
【図1】本発明に係るプログラマブルコントローラの一実施例を示す構成ブロック図である。
【図2】デバッグ回路の具体例を示す構成ブロック図である。
【図3】デバッグ回路の動作を説明するフロー図である。
【図4】スキャンタイムの分布状況の一例を示す分布図である。
【図5】従来のプログラマブルコントローラの一例を示す構成ブロック図である。
【図6】デバッグ回路の具体例を示す構成ブロック図である。
【図7】デバッグ回路の動作を説明するフロー図である。
【符号の説明】
1 入出力回路
2,6,6a 制御回路
3,7 記憶回路
4,4a デバッグ回路
5 時間計測用カウンタ回路
8,9,10,11 分布計数用カウンタ回路
100,100a 入力信号
101,101a 出力信号
102 クロック信号
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a programmable controller, and more particularly to a programmable controller capable of measuring a scan time distribution of an application program.
[0002]
[Prior art]
A conventional programmable controller executes data collection from a sensor, device control, and the like based on an application program stored in advance.
[0003]
As a program execution method, there is a scan method in which an application program stored in advance is continuously executed many times.
[0004]
For example, by continuously executing an application program that collects a pressure signal and a temperature signal from a sensor or the like, and compensates and outputs the pressure signal with the temperature signal, the temperature signal from the programmable controller is periodically received. Will be output.
[0005]
However, in general, the time required to execute an application program once by a programmable controller (hereinafter referred to as scan time) is not always constant and varies depending on conditions at the time of execution of the program.
[0006]
For example, depending on various conditions such as the input pressure signal and the temperature signal value variation, the temperature compensation calculation content, etc., all the instructions of the application program are not executed but skipped instead of being executed, Or, an instruction that is executed many times occurs, so that the scan time always varies.
[0007]
In particular, when a short scan time is required, it is necessary to devise measures to shorten the scan time when creating the application program. In this case, it is necessary to obtain information on the scan time of the application program executed by the programmable controller. There is.
[0008]
In general, some programmable controllers have such functions added, and FIG. 5 is a block diagram showing an example of such a conventional programmable controller.
[0009]
In FIG. 5, 1 is an input / output circuit, 2 is a control circuit, 3 is a memory circuit in which an application program is stored, 4 is a debug circuit, 100 is an input signal, and 101 is an output signal.
[0010]
The input signal 100 is input to the control circuit 2 via the input / output circuit 1, and the output from the control circuit 1 is output to the outside as the output signal 101 via the input / output circuit 1. The control circuit 2 is connected to the memory circuit 3 and the debug circuit 4.
[0011]
Here, the operation of the conventional example shown in FIG. 5 will be described. The control circuit 2 sequentially reads and executes the instructions of the application program stored in the storage circuit 3 in advance.
[0012]
On the other hand, the debug circuit 4 measures information related to the scan time required to execute the application program once.
[0013]
Specifically, the debug circuit 4 measures and stores the latest scan time, the maximum and minimum values of the scan time, and the average scan time.
[0014]
FIG. 6 is a block diagram showing a specific example of the debug circuit 4. In FIG. 6, 5 is a counter circuit for time measurement, 6 is a control circuit, 7 is a storage circuit, and 102 is a clock signal.
[0015]
The clock signal 102 is input to the time measurement counter circuit 5, and the output of the time measurement counter circuit 5 is connected to the control circuit 6. Further, the control circuit 6 and the memory circuit 7 are connected to each other.
[0016]
Here, the operation of the debug circuit 4 shown in FIG. 6 will be described with reference to FIG. FIG. 7 is a flowchart for explaining the operation of the debug circuit 4.
[0017]
In FIG. 7A, the control circuit 6 resets the time measuring counter circuit 5 and starts the counting operation, and detects the end of execution of the application program in FIG. 7B.
[0018]
When the end of the application program is detected in FIG. 7B, the control circuit 6 reads the count value of the time measurement counter circuit 5 in FIG. 7C, and the storage circuit 7 as the latest scan time in FIG. 7D. To store.
[0019]
In FIG. 7E, the control circuit 6 calculates the average scan time and stores the result in the storage circuit 7.
[0020]
In FIG. 7 (f), the control circuit 6 determines whether or not the count value is larger than the maximum value of the scan time up to the previous time.
[0021]
If the count value is larger than the maximum value up to the previous time, the control circuit 6 stores the count value in the storage circuit 7 as the maximum value in FIG. 7G and performs the process of FIG.
[0022]
Similarly, in FIG. 7H, the control circuit 6 compares the count value with the minimum value of the scan time up to the previous time to determine whether or not it is small.
[0023]
If the count value is smaller than the previous minimum value, the control circuit 6 stores the count value as the minimum value in the storage circuit 7 in FIG. 7 (i) and performs the process of FIG. 7 (j).
[0024]
Finally, in FIG. 7 (j), the control circuit 6 determines whether or not the measurement of the scan time or the like is finished. If it is a remeasurement, the process returns to the process of FIG. 7 (a), and if the measurement is finished, the process is finished. .
[0025]
In addition, it is possible to connect a programmable controller and an application program development tool, read information on the scan time measured by the debug circuit 4 with this application program development tool, and display the information on a display screen or the like.
[0026]
In general, it is devised to shorten the scan time by monitoring the information while executing the application program with a programmable controller.
[0027]
As a result, the debug circuit 4 can obtain information relating to the scan time necessary for creating the application program of the programmable controller.
[0028]
[Problems to be solved by the invention]
However, in the conventional example shown in FIG. 5 and the like, although individual information such as the maximum value and minimum value of the scan time is known, for example, whether the maximum value of the scan time has occurred suddenly or has occurred constantly. Cannot be distinguished.
[0029]
For this reason, there is a problem that it is not known which part of the application program should be corrected, and the efficiency of the correction work of the application program is deteriorated.
Therefore, the problem to be solved by the present invention is to realize a programmable controller capable of obtaining the distribution state of the scan time length.
[0030]
[Means for Solving the Problems]
In order to achieve such a problem, in the first aspect of the present invention,
In the programmable controller,
An input / output circuit;
A storage circuit for storing application programs;
A control circuit for controlling the input / output circuit and the memory circuit;
Time measurement counter circuit for measuring the time for which the application program is executed once, a plurality of distribution counting counter circuits provided corresponding to a preset time range, and measurement of the time measurement counter circuit A debugging circuit comprising a control circuit for determining which time range of the preset time range corresponds to the time and incrementing a count value of the corresponding distribution counting counter circuit; It is a characteristic.
[0031]
In order to achieve such a problem, in the second aspect of the present invention,
In the programmable controller,
An input / output circuit;
A storage circuit for storing application programs;
A time measuring counter circuit for measuring a time for which the application program is executed once;
A plurality of distribution counting counter circuits provided corresponding to a preset time range;
The distribution counting counter circuit which controls the input / output circuit and the storage circuit and determines which time range of the preset time range corresponds to the measurement time of the time measurement counter circuit. And a control circuit for incrementing the count value.
[0032]
In order to achieve such a problem, in the third aspect of the present invention,
In the first and second aspects of the present invention,
The connected application program development tool displays a distribution diagram of time for which the application program is executed once based on the count value counted by the distribution counting counter circuit.
[0034]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing the configuration of an embodiment of a programmable controller according to the present invention.
[0035]
In FIG. 1, 1, 2 and 3 are given the same reference numerals as in FIG. 5, 4a is a debug circuit, 100a is an input signal, and 101a is an output signal.
[0036]
The input signal 100a is input to the control circuit 2 via the input / output circuit 1, and the output from the control circuit 1 is output to the outside as the output signal 101a via the input / output circuit 1. The control circuit 2 is connected to the memory circuit 3 and the debug circuit 4a.
[0037]
Here, the operation of the embodiment shown in FIG. 1 will be described. The control circuit 2 sequentially reads and executes the instructions of the application program stored in the storage circuit 3 in advance.
[0038]
On the other hand, the debug circuit 4a measures information related to the scan time required to execute the application program once.
[0039]
Specifically, the debug circuit 4a measures the scan time, determines which time range corresponds to a preset time range, and counts the number. In other words, the distribution status in the scan time range is measured and stored.
[0040]
2 is a block diagram showing a specific example of the debug circuit 4a. In FIG. 2, reference numerals 5 and 102 are assigned the same reference numerals as in FIG. 6, 6a is a control circuit, 8, 9, 10 and 11 are It is a counter circuit for distribution counting.
[0041]
The clock signal 102 is input to the time measurement counter circuit 5, and the output of the time measurement counter circuit 5 is connected to the control circuit 6a. The control circuit 6a and the distribution counting counter circuits 8, 9, 10 and 11 are connected to each other.
[0042]
Here, the operation of the debug circuit 4a shown in FIG. 2 will be described with reference to FIG. FIG. 3 is a flowchart for explaining the operation of the debug circuit 4a.
[0043]
In FIG. 3A, the control circuit 6a presets a time range for counting by the distribution counter circuit 8-11.
[0044]
Specifically, when the measured scan time is “Tscan”,
t3 ≦ Tscan <t4 (1)
t2 ≦ Tscan <t3 (2)
t1 ≦ Tscan <t2 (3)
0 ≦ Tscan <t1 (4)
(However, 0 <t1 <t2 <t3 <t4)
If the condition of the expression (1) is satisfied, the count value of the distribution counting counter 8 is incremented. Similarly, if the conditions of the expressions (2), (3), and (4) are satisfied, the distribution counting counters 9 and 10 are satisfied. And 11 are incremented.
[0045]
In FIG. 3B, the control circuit 6a resets the time measuring counter circuit 5 and starts the counting operation, and detects the end of execution of the application program in FIG. 3C.
[0046]
When the end of the application program is detected in FIG. 3 (c), the control circuit 6a reads the count value of the time measuring counter circuit 5 in FIG. 3 (d).
[0047]
In FIG. 3E, the control circuit 6a determines whether or not the count value satisfies the condition of the expression (1).
[0048]
If the condition of Expression (1) is satisfied, the control circuit 6a increments the count value of the distribution counting counter circuit 8 in FIG. 3F, and performs the processing of FIG.
[0049]
In FIG. 3G, the control circuit 6a determines whether or not the count value satisfies the condition of the expression (2).
[0050]
If the condition of the expression (2) is satisfied, the control circuit 6a in FIG. 3 (h) increments the count value of the distribution counting counter circuit 9, and performs the processing of FIG. 3 (l).
[0051]
Further, in FIG. 3 (i), the control circuit 6a determines whether or not the count value satisfies the condition of Expression (3).
[0052]
If the condition of Expression (3) is satisfied, the control circuit 6a in FIG. 3 (j) increments the count value of the distribution counting counter circuit 10 and performs the process of FIG. 3 (l).
[0053]
In FIG. 3K, the control circuit 6a increments the count value of the distribution counting counter circuit 11.
[0054]
Finally, in FIG. 3 (l), the control circuit 6a determines whether or not the measurement is finished. If the measurement is re-measured, the process returns to the process of FIG. 3 (b), and if the measurement is finished, the process is finished.
[0055]
FIG. 4 is a distribution diagram showing an example of the scan time distribution state measured by the debug circuit 4a.
[0056]
Specifically, a programmable controller and an application program development tool are connected, and information on the scan time distribution measured by the debug circuit 4a is read out by this application program development tool and displayed on a display screen or the like in a distribution diagram. Is.
[0057]
In FIG. 4, “i”, “b”, “c” and “d” are the count values counted by the distribution counting counter circuits 11, 10, 9 and 8, and in FIG. It can be seen that there are many distributions in the time range shown in FIG.
[0058]
In addition, since the distribution of “d” in FIG. 4 is small, it can be recognized that the maximum value of the scan time is suddenly generated.
[0059]
For this reason, in the above-mentioned case, it can be specified that there is a problem in a specific branch routine or the like that is not normally executed in the application program, and it is sufficient to correct that portion, so that the efficiency of the application program correction work is improved.
[0060]
On the other hand, if the count value of the portion “d” in FIG. 4 is large, it can be recognized that the maximum value of the scan time occurs constantly, so there is a problem with the routine that is routinely executed in the application program. It can be specified that there is.
[0061]
As a result, the debug circuit 4a determines the length of the scan time, determines which time range corresponds to a preset time range, and counts the number of the scan time lengths. It becomes possible to obtain the distribution situation.
[0062]
In the debug circuit 4a of FIG. 2, four distribution counting counter circuits are illustrated for simplicity of explanation, but of course, the number is not limited to this number, and by providing a large number of distribution counting counter circuits. More detailed distribution status of scan time can be obtained.
[0063]
Further, in the debug circuit 4a of FIG. 2, the control circuit 6a is illustrated separately from the control circuit 2 in FIG. 1 for the sake of simplicity of explanation. Absent.
[0064]
In general, a control device such as a personal computer or a workstation is used as an application program development tool.
[0065]
In addition, regarding the identification of a phenomenon that occurs only when the scan time exceeds a certain time, it is necessary to investigate the relationship between the frequency at which the scan time exceeds the certain time and the occurrence frequency of the phenomenon. According to the above, it becomes possible to examine these relationships.
[0066]
【The invention's effect】
As is apparent from the above description, the present invention has the following effects.
The debug circuit determines the scan time length, determines which time range corresponds to a preset time range, and counts the number of the time ranges, thereby obtaining the scan time length distribution state. It is possible to realize a programmable controller.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an embodiment of a programmable controller according to the present invention.
FIG. 2 is a configuration block diagram showing a specific example of a debug circuit.
FIG. 3 is a flowchart illustrating an operation of a debug circuit.
FIG. 4 is a distribution diagram showing an example of scan time distribution;
FIG. 5 is a block diagram showing an example of a conventional programmable controller.
FIG. 6 is a configuration block diagram showing a specific example of a debug circuit.
FIG. 7 is a flowchart for explaining the operation of the debug circuit.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 Input / output circuit 2, 6, 6a Control circuit 3, 7 Memory circuit 4, 4a Debug circuit 5 Time measurement counter circuit 8, 9, 10, 11 Distribution counter circuit 100, 100a Input signal 101, 101a Output signal 102 Clock signal

Claims (3)

プログラマブルコントローラにおいて、
入出力回路と、
アプリケーションプログラムが格納される記憶回路と、
前記入出力回路及び前記記憶回路を制御する制御回路と、
前記アプリケーションプログラムが1回実行される時間を測定する時間計測用カウンタ回路と、予め設定された時間範囲に対応して設けられた複数の分布計数用カウンタ回路と、前記時間計測用カウンタ回路の測定時間が前記予め設定された時間範囲のうちどの時間範囲に該当するかを判断して該当する前記分布計数用カウンタ回路のカウント値をインクリメントする制御回路とから構成されたデバッグ回路と
を備えたことを特徴するプログラマブルコントローラ。
In the programmable controller,
An input / output circuit;
A storage circuit for storing application programs;
A control circuit for controlling the input / output circuit and the memory circuit;
Time measurement counter circuit for measuring the time for which the application program is executed once, a plurality of distribution counting counter circuits provided corresponding to a preset time range, and measurement of the time measurement counter circuit A debug circuit comprising: a control circuit that determines which time range of the preset time range falls and increments the count value of the corresponding distribution counting counter circuit;
A programmable controller characterized by comprising:
プログラマブルコントローラにおいて、In the programmable controller,
入出力回路と、  An input / output circuit;
アプリケーションプログラムが格納される記憶回路と、  A storage circuit for storing application programs;
前記アプリケーションプログラムが1回実行される時間を測定する時間計測用カウンタ回路と、  A time measuring counter circuit for measuring a time for which the application program is executed once;
予め設定された時間範囲に対応して設けられた複数の分布計数用カウンタ回路と、  A plurality of distribution counting counter circuits provided corresponding to a preset time range;
前記入出力回路及び前記記憶回路を制御すると共に前記時間計測用カウンタ回路の測定時間が前記予め設定された時間範囲のうちどの時間範囲に該当するかを判断して該当する前記分布計数用カウンタ回路のカウント値をインクリメントする制御回路と  The distribution counting counter circuit which controls the input / output circuit and the storage circuit and determines which time range of the preset time range corresponds to the measurement time of the time measurement counter circuit. A control circuit for incrementing the count value of
を備えたことを特徴するプログラマブルコントローラ。A programmable controller characterized by comprising:
接続されたアプリケーションプログラム開発ツールに前記分布計数用カウンタ回路で計数されたカウント値に基づき前記アプリケーションプログラムが1回実行される時間の分布図を表示させることを特徴とするA connected application program development tool displays a distribution map of time when the application program is executed once based on the count value counted by the distribution counting counter circuit.
特許請求の範囲請求項1及び請求項2記載のプログラマブルコントローラ。The programmable controller according to claim 1 and claim 2.
JP24379597A 1997-09-09 1997-09-09 Programmable controller Expired - Fee Related JP3661732B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24379597A JP3661732B2 (en) 1997-09-09 1997-09-09 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24379597A JP3661732B2 (en) 1997-09-09 1997-09-09 Programmable controller

Publications (2)

Publication Number Publication Date
JPH1185220A JPH1185220A (en) 1999-03-30
JP3661732B2 true JP3661732B2 (en) 2005-06-22

Family

ID=17109071

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24379597A Expired - Fee Related JP3661732B2 (en) 1997-09-09 1997-09-09 Programmable controller

Country Status (1)

Country Link
JP (1) JP3661732B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101593834B1 (en) * 2014-10-30 2016-02-12 엘에스산전 주식회사 PLC system
JP6563187B2 (en) * 2014-11-12 2019-08-21 株式会社東芝 Distributed control system, control device, and control method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05189277A (en) * 1992-01-09 1993-07-30 Yaskawa Electric Corp Program execution time measuring device for programmable controller
JPH0814955A (en) * 1994-07-01 1996-01-19 Nissan Motor Co Ltd Equipment abnormality diagnosis apparatus and method
JPH08278804A (en) * 1995-04-06 1996-10-22 Fanuc Ltd Diagnostic system for sequence program

Also Published As

Publication number Publication date
JPH1185220A (en) 1999-03-30

Similar Documents

Publication Publication Date Title
US7945340B2 (en) Programmable controller system
US6321341B1 (en) Method and apparatus for measuring the power consumption of a computer
US5740451A (en) Microcomputer having function of measuring maximum interrupt-disabled time period
EP0487740B1 (en) Method of monitoring operating conditions of injection molding machine
WO2021019760A1 (en) Abnormality diagnostic method, abnormality diagnostic device, and abnormality diagnostic program
JP3661732B2 (en) Programmable controller
JP7074490B2 (en) Data processing methods, data processing equipment, data processing systems, and data processing programs
CN111291239B (en) Method, device, equipment and storage medium for testing unit
CN109520098B (en) Control method and control device for compressor frequency and air conditioner
US11514384B2 (en) Productivity improvement support system and productivity improvement support method
US6992644B1 (en) Peripheral device of a programmable controller and monitoring method of the peripheral device
JPS59208661A (en) How to measure computer load
JPH03282331A (en) electronic balance
US10050772B2 (en) Method and apparatus for generating standard pattern for data signals
JPH08304151A (en) Electronic balance
JPH0530239Y2 (en)
JP2904938B2 (en) Screen display time measurement device for man-machine interface device
JPH0540651A (en) Analyzer for computer system load
JPH05189277A (en) Program execution time measuring device for programmable controller
JPH0749990B2 (en) Electronic balance
JPH08221118A (en) Intelligent transmitter
JP3004029B2 (en) Production quantity analysis system
JP2005122411A (en) PLC monitoring device
JPS6215606A (en) Method for confirming executing speed of programmable controller
JP2002163008A (en) Circuit and method for detecting run-away of programable controller

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20041111

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041116

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041221

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050315

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20080401

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20090401

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090401

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100401

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100401

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110401

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees