JPH0449123B2 - - Google Patents

Info

Publication number
JPH0449123B2
JPH0449123B2 JP58209507A JP20950783A JPH0449123B2 JP H0449123 B2 JPH0449123 B2 JP H0449123B2 JP 58209507 A JP58209507 A JP 58209507A JP 20950783 A JP20950783 A JP 20950783A JP H0449123 B2 JPH0449123 B2 JP H0449123B2
Authority
JP
Japan
Prior art keywords
fixed
section
input
program
period
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 - Lifetime
Application number
JP58209507A
Other languages
Japanese (ja)
Other versions
JPS60101612A (en
Inventor
Shigeo Takagi
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.)
Toshiba Corp
Original Assignee
Tokyo Shibaura Electric Co Ltd
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 Tokyo Shibaura Electric Co Ltd filed Critical Tokyo Shibaura Electric Co Ltd
Priority to JP58209507A priority Critical patent/JPS60101612A/en
Publication of JPS60101612A publication Critical patent/JPS60101612A/en
Publication of JPH0449123B2 publication Critical patent/JPH0449123B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/058Safety, monitoring
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/14Plc safety
    • G05B2219/14086Watch dog
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Testing And Monitoring For Control Systems (AREA)
  • Programmable Controllers (AREA)

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明はプログラマコントローラ、特にシーケ
ンスプログラムをフアンクシヨン単位に分割し、
定周期で管理、実行するプログラマブルコントロ
ーラに関する。
[Detailed Description of the Invention] [Technical Field of the Invention] The present invention divides a programmer controller, particularly a sequence program into functions,
Related to a programmable controller that is managed and executed at regular intervals.

〔発明の技術的背景とその問題点〕[Technical background of the invention and its problems]

プログラマブルコントローラは、従来シーケン
ス制御に主として用いられてきたリレー接点論理
回路や、無接点論理回路やアナログ増幅器回路な
どと同等な機能を、電子計算機と同様なストアー
ドプログラム方式の汎用電子回路を用いて実現し
た装置である。
Programmable controllers achieve functions equivalent to relay contact logic circuits, non-contact logic circuits, analog amplifier circuits, etc. that have traditionally been mainly used for sequence control, using general-purpose electronic circuits using a stored program system similar to electronic computers. This is a device that has

第1図はこの種のプログラムブルコントローラ
の一般的構成を示すブロツク図である。図におい
て10は、演算制御部11、メモリ12、シーケ
ンス制御対象とのインターフエイス部13とから
なるプログラマブルコントローラである。14は
プログラムローダである。
FIG. 1 is a block diagram showing the general configuration of this type of programmable controller. In the figure, 10 is a programmable controller comprising an arithmetic control section 11, a memory 12, and an interface section 13 with a sequence control target. 14 is a program loader.

シーケンス実行時においては、メモリ12に書
き込まれているシーケンスプログラムを演算制御
部11に導き、インターフエイス部13を通して
外部から入力した信号に基づき演算処理を行な
い、この結果をインターフエイス部13に導き、
シーケンス制御対象を制御する。また操作者は、
プログラムローダ14を通して、シーケンスプロ
グラムの入力、修正、および表示を行なうことが
できる。
When executing a sequence, the sequence program written in the memory 12 is guided to the arithmetic control section 11, arithmetic processing is performed based on a signal input from the outside through the interface section 13, and the result is guided to the interface section 13.
Control the sequence control target. Also, the operator
Through the program loader 14, sequence programs can be input, modified, and displayed.

従来、プログラマブルコントローラにおけるシ
ーケンスプログラムの実行は、第2図に示すよう
な周期的な処理が基本的に行なわれている。
Conventionally, the execution of a sequence program in a programmable controller basically involves periodic processing as shown in FIG.

これは、一般にスキヤンタイムと称し、一定の
周期でシーケンスプログラムを高速に繰返し実行
することによつて、入力信号を読み込み、シーケ
ンスプログラムの論理で定まる出力信号に変換し
て外部への出力を行なうものである。
This is generally referred to as scan time, and is a process in which a sequence program is repeatedly executed at high speed at a fixed cycle, thereby reading an input signal, converting it into an output signal determined by the logic of the sequence program, and outputting it to the outside. It is.

さて、近年高機能なプログラマブルコントロー
ラにおいては、マルチプログラミングが可能とな
つてきている。これはシーケンスプログラムを前
述した定周期実行のプログラムに加え、外部割込
みに対応して実行する割込み処理プログラムや定
周期(スキヤンタイム)内で割込み処理プログラ
ムおよび定周期実行プログラムの実行の残り時間
に処理されるバツチ処理プログラムなどに分割し
て実行されるものである。
Now, in recent years, multi-programming has become possible in highly functional programmable controllers. In addition to the above-mentioned fixed-cycle execution programs, this allows sequence programs to be executed in response to external interrupts, and to process interrupt processing programs and fixed-cycle execution programs during the remaining execution time within a fixed cycle (scan time). It is divided into batch processing programs, etc., and executed.

このように、シーケンスプログラムを実行周期
や外部割込み要因、制御対象などの機能に応じて
分割することは、シーケンスプログラムの構造を
わかりやすくできるので、プログラムのテスト、
保守において有用となつている。また、標準的な
プログラムモジユールを用意することによつてプ
ログラム設計の省力化がはかられている。(以下、
機能に応じて分割されたシーケンスプログラムの
単位をフアンクシヨンと称する。) 第3図は、シーケンスプログラムを上述した定
周実行フアンクシヨン、割込みフアンクシヨン、
バツチフアンクシヨンに分割した場合のフアンク
シヨンの実行状態を示す一例である。
In this way, dividing a sequence program according to functions such as execution cycles, external interrupt sources, and controlled objects makes the structure of the sequence program easier to understand, making it easier to test the program,
It has become useful in maintenance. Furthermore, by preparing standard program modules, it is possible to save labor in program design. (below,
A unit of a sequence program divided according to functions is called a function. ) Figure 3 shows the sequence program with the above-mentioned constant cycle execution function, interrupt function,
This is an example showing the execution state of a function when it is divided into batch functions.

定周期時間(スキヤンタイム)は、通常、第2
図および第3図に示すように定周期処理フアンク
シヨンの実行がその時間内に終了するように設定
される。ところが定周期処理フアンクシヨンの実
行開始から終了までの時間は、その実行条件即ち
定周期処理フアンクシヨン内のシーケンスで定ま
る条件や割込みの発生する状態により左右され一
定しない。このため場合によつては、第4図に示
すように定周期処理フアンクシヨンの実行が定周
期時間を超過し、次の定周期時間に食い込むよう
なことが起こるこのような場合でも、通常、シー
ケンス実行の連続性を保つために、周期超過した
処理についてもプログラムの最後まで実行させる
ことが行なわれている。
The fixed period time (scan time) is usually the second
As shown in FIG. 3 and FIG. 3, the execution of the periodic processing function is set to be completed within that time. However, the time from the start to the end of execution of a periodic processing function varies depending on its execution conditions, that is, the conditions determined by the sequence within the periodic processing function and the state in which an interrupt occurs. Therefore, in some cases, as shown in Figure 4, the execution of a periodic processing function exceeds the periodic period time and cuts into the next periodic period. In order to maintain continuity of execution, even processes that have exceeded the cycle are executed to the end of the program.

このような超過が、一時的なプログラムの周期
超過であれば、第5図に示すように定周期処理の
繰返しによりその周期超過分が吸収されてしま
う。ところが慢性的に周期超過が起こるような場
合、第6図に示すように、最初に定めた定周期時
間そのものが無意味となつてしまうので、定周期
時間の設定を変更する必要がある。
If such an excess is a temporary program cycle excess, the cycle excess will be absorbed by repeating the fixed cycle process as shown in FIG. However, if the period is chronically exceeded, as shown in FIG. 6, the initially determined fixed period time itself becomes meaningless, so it is necessary to change the setting of the fixed period time.

従来、前述したプログラムの周期超過や暴走を
監視するために、ウオツチングタイマーが一般に
用いられてきている。ウオツチドツグタイマは、
ハードウエアのタイマで構成されている。プログ
ラムの実行が正常な場合には、一定時間に一度は
必ずこのタイマをリセツトしタイマがタイムアツ
プすることを防止する。逆に一定時間以上タイマ
のリセツトがないとタイムアツプし、警報を発す
るようにしてある。しかしながら、このウオツチ
ドツグタイマはそのリセツトを行なう処理のプロ
グラム自身に停滞や暴走があつた場合、周期超過
や暴走の監視が不可能となるという不都合があ
る。また、逆に前述したような一時的なプログラ
ムの周期超過に対しては、ウオツチングタイマが
タイムアツプしてしまい、誤つて警報を発するこ
とがある。
Conventionally, a watching timer has been generally used to monitor the above-mentioned program cycle overrun or runaway. The watchdog timer is
It consists of a hardware timer. If the program is running normally, this timer is always reset once every certain period of time to prevent the timer from timing up. On the other hand, if the timer is not reset for a certain period of time, a timeout will occur and an alarm will be issued. However, this watchdog timer has the disadvantage that if the program itself that performs the reset process stagnates or runs out of control, it becomes impossible to monitor the cycle overrun or runaway. On the other hand, if the program cycle temporarily exceeds the time limit as described above, the watching timer may time out and erroneously issue an alarm.

〔発明の目的〕[Purpose of the invention]

そこで本発明は前述の事情に鑑み、シーケンス
プログラムをフアンクシヨン単位に分割して定周
期で管理、実行させる場合に、定周期処理フアン
クシヨンの慢性的な周期超過を容易に監視するこ
とができ、一時的なプログラムの周期超過に対し
ても誤つて警報を発することの少ない定周期超過
を監視する機能を設けたことを特徴とするプログ
ラマブルコントローラを提供することを目的とす
る。
In view of the above-mentioned circumstances, the present invention makes it possible to easily monitor chronic cycle overruns in fixed-cycle processing functions when a sequence program is divided into functions and managed and executed at regular intervals. It is an object of the present invention to provide a programmable controller characterized in that it is provided with a function of monitoring an excess of a fixed cycle, which is less likely to issue an alarm erroneously even when the cycle of a regular program is exceeded.

〔発明の概要〕[Summary of the invention]

本発明の特徴は、シーケンスプログラムを格納
するプログラムメモリと、演算の途中結果、デー
タ等の保存を行なうデータメモリと、外部よりの
入力信号を取込む入力部と、シーケンスプログラ
ムに基づいて入力部より入力される情報またはプ
ログラムメモリに保存されるデータとの間で演算
を行なう演算制御部と、この演算制御部の演算結
果を出力する出力部と、プログラムもしくはデー
タ等の入力または表示を行なうプログラムローダ
との間でインターフエイスを行なうインターフエ
イス部と、をそなえ、 シーケンスプログラムをその機能に応じて定周
期、割込み処理、バツチ処理等のフアンクシヨン
に分割してプログラムメモリに格納し、演算制御
部にフアンクシヨンを選択して実行させる機能を
有するプログラマブルコントローラにおいて、 演算制御部に、中央制御部と、定周期クロツク
部と、定周期クロツク割込み入力が入るたびに1
カウントアツプされ、定周期処理フアンクシヨン
の実行が終了するたびに1カウントダウンされる
監視カウンタと、を設け、 定周期処理フアンクシヨンの実行直前に監視カ
ウンタの値を参照し、この値が一定値を超えた場
合に定周期超過と判断させるようにしたため、 一時的な周期超過に対して誤報を発することが
少なく、かつ慢性的な周期超過を容易に監視する
ことができるようにした点にある。
The present invention is characterized by a program memory that stores a sequence program, a data memory that stores intermediate results of calculations, data, etc., an input section that receives input signals from the outside, and an input section that receives input signals from the outside based on the sequence program. An arithmetic control section that performs arithmetic operations on input information or data stored in a program memory, an output section that outputs the arithmetic results of this arithmetic control section, and a program loader that inputs or displays programs, data, etc. The sequence program is divided into functions such as fixed cycle, interrupt processing, batch processing, etc. according to their functions, and stored in the program memory, and the functions are transferred to the arithmetic control section. In a programmable controller that has a function to select and execute a central control section, a fixed-cycle clock section, and a fixed-cycle clock interrupt input, each time a fixed-cycle clock interrupt input is input to the arithmetic control section.
A monitoring counter that counts up and counts down by 1 each time the execution of a fixed-period processing function is completed is provided, and the value of the monitoring counter is referenced immediately before execution of the fixed-period processing function, and when this value exceeds a certain value, Since the system is configured to determine that a fixed cycle has been exceeded when a period exceeds a fixed cycle, false alarms are less likely to be issued in response to a temporary cycle exceedance, and chronic cycle exceedances can be easily monitored.

〔発明の実施例〕[Embodiments of the invention]

以下、図面を参照して本発明の一実施例につい
て説明する。第7図はプログラマブルコントロー
ラおよびプログラムローダの構成を示すブロツク
図である。同図おいて、20は、プログラムメモ
リ21、演算制御部22、入力部23、出力部2
4、データメモリ25、インターフエイス回路2
6から成るプログラマブルコントローラである。
An embodiment of the present invention will be described below with reference to the drawings. FIG. 7 is a block diagram showing the configuration of the programmable controller and program loader. In the figure, 20 indicates a program memory 21, an arithmetic control section 22, an input section 23, and an output section 2.
4, data memory 25, interface circuit 2
This is a programmable controller consisting of 6 parts.

プログラムメモリ21には、シーケンス制御を
指示するさまざまなシーケンスプログラムが、機
能に応じて定周期実行フアンクシヨン、割込みフ
アンクシヨン、バツチフアンクシヨン等に分割さ
れて書き込まれている。演算制御部22は、起動
要因に応じてプログラムメモリ21に記憶されて
いるフアンクシヨンを選択し、そのシーケンスプ
ログラムに基づいて入力部23および出力部24
に接続されている入出力要素の演算を行ない、演
算結果に基づき出力要素のオン、オフを繰返した
り、あるいは演算結果をデータメモリ25に書き
込んだりしてシーケンス制御に実行する。また、
インターフエイス回路26に次に述べるプログラ
ムローダ30との間でデータの交換を行なう。
Various sequence programs for instructing sequence control are written in the program memory 21, divided into fixed period execution functions, interrupt functions, batch functions, etc. according to functions. The arithmetic control section 22 selects a function stored in the program memory 21 according to the activation factor, and operates the input section 23 and the output section 24 based on the sequence program.
It performs calculations on the input/output elements connected to the input/output elements, and performs sequence control by repeatedly turning on and off the output elements based on the calculation results, or by writing the calculation results into the data memory 25. Also,
Data is exchanged between the interface circuit 26 and a program loader 30, which will be described next.

30はシーケンスプログラムをラダーダイヤグ
ラムに変換して表示するプログラムローダで、キ
ーボード31、中央処理回路32、画面編集回路
33、リフレツシユメモリ34、パターン発生回
路35、表示制御回路36、表示装置37、ラダ
ーダイヤグラム変換回路38、バツフアメモリ3
9、ラダーダイヤグラム再生回路40、インター
フエイス回路41から構成されている。
30 is a program loader that converts a sequence program into a ladder diagram and displays it, which includes a keyboard 31, a central processing circuit 32, a screen editing circuit 33, a refresh memory 34, a pattern generation circuit 35, a display control circuit 36, a display device 37, and a ladder diagram. Diagram conversion circuit 38, buffer memory 3
9, a ladder diagram reproducing circuit 40, and an interface circuit 41.

操作者は、キーボード31でプログラムの入力
や種々の操作指令を与えることができる。中央処
理回路32は、キーボード31から与えられる各
種の操作指令を解読し、その実際の処理指令を以
下に述べる各処理回路に与えている。
The operator can input programs and give various operation commands using the keyboard 31. The central processing circuit 32 decodes various operation commands given from the keyboard 31 and gives actual processing commands to each processing circuit described below.

画面編集回路33は、キーボード31から入力
されたプログラムをリフレツシユメモリ34に書
き込んだり、またキーボード31から入力される
画面編集指令をもとに、ラダーダイヤグラムの作
成または修正などの編集処理を行なう。
The screen editing circuit 33 writes a program input from the keyboard 31 into the refresh memory 34, and performs editing processing such as creating or modifying a ladder diagram based on a screen editing command input from the keyboard 31.

リフレツシユメモリ34は表示装置37に表示
すべくデータを格納する。
Refresh memory 34 stores data to be displayed on display device 37.

リフレツシユメモリ34に格納されたデータは
表示制御回路36から与えられるタイミングによ
り順次読み出され、パターン発生回路35で文字
やラダーダイヤグラムの図形要素に変換され、表
示制御回路36の制御により表示装置37に表示
される。
The data stored in the refresh memory 34 is sequentially read out at the timing given by the display control circuit 36, converted into characters and graphic elements of a ladder diagram by the pattern generation circuit 35, and then displayed on the display device 37 under the control of the display control circuit 36. will be displayed.

ラダーダイヤグラム変換回路38は、リフレツ
シユメモリ34に書き込まれているラダーダイヤ
グラムの表示情報をもとに、これをプログラマブ
ルコントローラのシーケンス命令に変換してバツ
フアメモリ39に書き込む。
Based on the ladder diagram display information written in the refresh memory 34, the ladder diagram conversion circuit 38 converts it into sequence commands for the programmable controller and writes them into the buffer memory 39.

ラダーダイヤグラム再生回路40は、逆にプロ
グラマブルコントローラのシーケンス命令をラダ
ーダイヤグラムの形にもどしリフレツシユメモリ
34に書き込む。
Conversely, the ladder diagram reproducing circuit 40 restores the sequence commands of the programmable controller to the form of a ladder diagram and writes them into the refresh memory 34.

インターフエイス回路41は、バツフアメモリ
39に書き込まれているシーケンス命令をプログ
ラマブルコントローラ20内のインターフエイス
回路26を通してプログラムメモリ21に書き込
んだり、あるいは制御データをデータメモリ25
に書き込む。また逆にプログラムメモリ21から
シーケンス命令をあるいはデータメモリ25から
制御データをインターフエイス回路26を通して
読み出して、バツフアメモリ39に書き込む機能
を有する。
The interface circuit 41 writes sequence commands written in the buffer memory 39 to the program memory 21 through the interface circuit 26 in the programmable controller 20, or writes control data to the data memory 25.
write to. Conversely, it has a function of reading sequence commands from the program memory 21 or control data from the data memory 25 through the interface circuit 26 and writing them into the buffer memory 39.

第8図は、前述した演算制御部22の詳細構成
図である。プログラムメモリ21に格納されいる
シーケンスプログラムの命令はプログラムカウン
タ221の指定するアドレスから順次読み出さ
れ、命令レジスタ222へ移される。命令レジス
タ222に取り出されたシーケンス命令は命令解
読部223で解読され、中央制御部224でその
命令を実行するために必要な制御信号が逐次発生
される。これによつて入力部23、出力部24を
制御し、あるいは演算の途中結果を貯えるレジス
タ群225と入力情報との間でシーケンス論理演
算を行い、あるいは演算結果のデータメモリ25
への書き込みを行い、あるいはデータメモリ25
からのデータの読み出しなどを行い、プログラム
の指定する処理を実行する。中央制御部224は
入力部23あるいはインターフエイス回路26か
らの外部割込み入力が入ると、割込み入力の解
析、割込み入力に対応する割込みフアンクシヨン
の選択、実行を行なう。また、クロツク回路22
6からの定周期クロツク割込み入力が入ると定周
期処理フアンクシヨンに実行を行なう。このとき
監視カウンタ227は定周期クロツク割込み入力
が入るたびに中央制御部224によつて1カウン
トアツプされ、定周期処理フアンクシヨンの実行
が終了するたびに1カウントダウンされる。
FIG. 8 is a detailed configuration diagram of the arithmetic control section 22 mentioned above. The instructions of the sequence program stored in the program memory 21 are sequentially read out from the address specified by the program counter 221 and transferred to the instruction register 222. The sequence command taken out to the command register 222 is decoded by the command decoder 223, and the control signals necessary for executing the command are sequentially generated by the central control part 224. This controls the input section 23 and the output section 24, or performs a sequence logical operation between input information and a register group 225 that stores intermediate results of the operation, or performs a sequence logical operation on the data memory 25 of the operation result.
or data memory 25.
It reads data from the computer and executes the processing specified by the program. When the central control unit 224 receives an external interrupt input from the input unit 23 or the interface circuit 26, it analyzes the interrupt input, selects and executes an interrupt function corresponding to the interrupt input. In addition, the clock circuit 22
When a fixed-cycle clock interrupt input from 6 is input, the fixed-cycle processing function is executed. At this time, the monitoring counter 227 is incremented by one count by the central control unit 224 each time a periodic clock interrupt input is input, and is decremented by one each time the execution of the periodic processing function is completed.

第9図は本発明に係る中央制御部224により
フアンクシヨンの選択、実行の機能を示すフロー
チヤートである。フアンクシヨンの選択、実行は
ステツプ51〜54により制御され、中断された
フアンクシヨンの継続、実行はステツプ61〜6
2により制御される。
FIG. 9 is a flowchart showing functions for selection and execution of functions by the central control unit 224 according to the present invention. The selection and execution of functions are controlled by steps 51-54, and the continuation and execution of interrupted functions are controlled by steps 61-6.
2.

第10図は本発明に係る中央制御部224によ
る定周期処理フアンクシヨンの周期超過を監視す
る機能を示すフローチヤートである。監視カウン
タ227のカウトアツプ、カウントダウンはステ
ツプ71,72により制御され、周期超過の監視
はステツプ81〜83により定周期処理フアンク
シヨンの実行直前に行なわれる。
FIG. 10 is a flowchart showing the function of the central control unit 224 according to the present invention to monitor the period excess of the fixed period processing function. The count-up and count-down of the monitoring counter 227 are controlled by steps 71 and 72, and monitoring of period excess is performed by steps 81 to 83 immediately before execution of the fixed period processing function.

上述のような構成により、プログラマブルコン
トローラに定周期処理フアンクシヨンの定周期超
過を監視する機能を設けることができる。以下そ
の機能について詳述する。
With the above-described configuration, the programmable controller can be provided with a function of monitoring whether the fixed cycle of the fixed cycle processing function exceeds the fixed cycle. The functions will be explained in detail below.

まず、クロツク回路226からの定周期クロツ
ク割込み入力が入つた場合を考える。割込み入力
が入ると、中央制御部224は第10図ステツプ
71により監視カウンタ227の内容を1だけカ
ウントアツプさせる。次にステツプ81により定
周期処理フアンクシヨンの実行直前に監視カウン
タ227の内容が定周期超過の上限値以上か否か
の判定を行ない。定周期超過でなければ、ステツ
プ82により定周期処理フアンクシヨンの登録ア
ドレスをデータメモリ25のフアンクシヨンを管
理するテーブルより読み出し、プログラムカウン
タ221に設定させる。定周期処理フアンクシヨ
ンの処理が終了すると、ステツプ72により監視
カウンタ227の内容を1だけカウントダウンさ
せる。一方、ステツプ81により定周期超過とな
つていれば、ステツプ83により周期超過検出時
の処理(例えば周期超過履歴の登録から外部への
通報)を行なわせる。
First, consider the case where a fixed period clock interrupt input from the clock circuit 226 is input. When an interrupt input is received, the central control section 224 increments the contents of the monitoring counter 227 by 1 in step 71 of FIG. Next, in step 81, it is determined whether or not the contents of the monitoring counter 227 are equal to or greater than the upper limit value for exceeding the fixed period immediately before the fixed period processing function is executed. If the fixed cycle is not exceeded, the registered address of the fixed cycle processing function is read from the table for managing functions in the data memory 25 in step 82, and is set in the program counter 221. When the processing of the periodic processing function is completed, the contents of the monitoring counter 227 are counted down by 1 in step 72. On the other hand, if it is determined in step 81 that the fixed cycle has been exceeded, then in step 83, processing upon detecting a cycle excess (for example, from registering a cycle excess history to reporting to the outside) is performed.

本発明に係るプログラマブルコントローラにお
いて、慢性的に周期超過が起こる場合の定周期超
過の検出の一例を第11図に、また一時的に周期
超過が起こる場合の定周期超過の監視の一例を第
12図に、それぞれ示す。なおこれらの例は定周
期超過の上限値を3をとした場合である。まず第
11図について説明する。入出力処理が終了する
と通常は定周期実行フアンクシヨンが直ちに行な
われるが、本実施例ではその直前に定周期超過監
視が行なわれる。これは定周期超過監視カウンタ
を参照し、3以上であれば定周期超過検出とする
ものである。定周期超過監視カウンタは、定周期
クロツク割込み入力が入つた時、即ち第11図で
各定周期時間を区切る縦線の時点で1だけカウン
トアツプされる。逆ち定周期実行フアンシヨンの
終了時、即ち第11図で同フアンクシヨンを示す
グラフの立下がり時点で1だけカウントダウンさ
れる。結局第11図のように慢性的周期超過が起
こる場合は、斜線部分で監視カウンタ≧3である
ことが検出される。第12図も同様の作用を行な
つたものであるが、周期超過が一時的であるた
め、監視カウンタ<3となり定周期超過は検出さ
れない。
In the programmable controller according to the present invention, FIG. 11 shows an example of detecting an excess of a fixed period when a period exceeds a period chronically, and FIG. 12 shows an example of monitoring an excess of a fixed period when a period exceeds a period temporarily. Each is shown in the figure. Note that in these examples, the upper limit value for exceeding the fixed period is set to 3. First, FIG. 11 will be explained. When the input/output processing is completed, the fixed period execution function is normally executed immediately, but in this embodiment, the fixed period excess monitoring is performed immediately before that. This refers to the fixed period excess monitoring counter, and if it is 3 or more, it is determined that the fixed period excess has been detected. The fixed period excess monitoring counter is incremented by 1 when a fixed period clock interrupt input is input, that is, at the point of the vertical line separating each fixed period time in FIG. In other words, at the end of the constant cycle execution function, that is, at the falling edge of the graph showing the function in FIG. 11, the count is counted down by 1. After all, if a chronic period exceedance occurs as shown in FIG. 11, it is detected in the shaded area that the monitoring counter is ≧3. The same operation is performed in FIG. 12, but since the period excess is temporary, the monitoring counter becomes <3, and the period excess is not detected.

〔発明の効果〕〔Effect of the invention〕

以上のとおり本発明によれば、シーケンスプロ
グラムをフアンクシヨン単位に分割して定周期で
管理、実行させる場合に、定周期処理フアンクシ
ヨンの慢性的な周期超過を容易に監視することが
でき、しかも一時的たプログラムの周期超過に対
しては誤報を発することの少ない定周期超過監視
を可能したプログラマブルコントローラを提供す
ることができる。
As described above, according to the present invention, when a sequence program is divided into functions and managed and executed at regular intervals, it is possible to easily monitor the chronic cycle excess of the regular cycle processing functions, and also to temporarily Accordingly, it is possible to provide a programmable controller that is capable of monitoring an excess of a fixed cycle with fewer false alarms when a program exceeds a cycle.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は従来のプログラマブルコントローラの
一般的構成を示すブロツク図、第2図はシーケン
スプログラムが定周期実行のフアンクシヨンのみ
であるプログラマブルコントローラの実行状態の
一例を示す図、第3図はシーケンスプログラムを
定周期実行フアンクシヨン、割込みフアンクシヨ
ン、およびバツチフアンクシヨンに分割した場合
のプログラマブルコンローラの実行状態の一例を
示す図、第4図は定周期処理フアンクシヨンで定
周期超過が起こつた状態の一例を示す図、第5図
は定周期処理フアンクシヨンで一時的な周期超過
が起こつた状態の一例を示す図、第6図は定周期
処理フアンクシヨンで慢性的な周期超過が起こつ
た状態の一例を示す図、第7図は本発明に係るプ
ログラマブルコントローラと、これに関連したプ
ログラムローダの一例を示す構成図、第8図は本
発明に係る中央制御部の詳細構成図、第9図は本
発明に係る中央制御部によりフアンクシヨンの選
択、実行の機能を示すフローチヤート、第10図
は本発明に係る中央制御部による定周期処理フア
ンクシヨの周期超過を監視する機能を示すフロー
チヤート、第11図は慢性的に周期経過が起こる
場合の本発明に係る定周期超過の検出の一例を示
す図、第12図は一時的に周期超過が起こる場合
の本発明に係る定周期超過の検出の一例を示す図
である。 10……プログラマブルコントローラ、11…
…演算制御部、12……メモリ、13……インタ
ーフエイス部、14……プログラムローダ、20
……プログラマブルコントローラ、21……プロ
グラムメモリ、22……演算制御部、23……入
力部、24……出力部、25……データメモリ、
30……プログラムローダ、31……キーボー
ド、32……中央処理回路、33……画面編集回
路、34……リフレツシユメモリ、35……パタ
ーン発生回路、36……表示制御回路、37……
表示装置、38……ラダーダイヤグラム変換回
路、39……バツフアメモリ、40……ラダーダ
イヤグラム再生回路、41……インターフエイス
回路、221……プログラムカウンタ、222…
…命令レジスタ、223……命令解読部、224
……中央制御部、225……レジスタ群、226
……クロツク回路、227……監視カウンタ。
Figure 1 is a block diagram showing the general configuration of a conventional programmable controller. Figure 2 is a diagram showing an example of the execution state of a programmable controller in which the sequence program is only a function that is executed at regular intervals. A diagram showing an example of the execution state of the programmable controller when divided into a fixed period execution function, an interrupt function, and a batch function. Figure 4 shows an example of a state in which a fixed period exceeds the fixed period processing function. 5 is a diagram showing an example of a state in which a temporary cycle exceedance occurs in a fixed-cycle processing function, and FIG. 6 is a diagram showing an example of a state in which a chronic cycle exceedance occurs in a fixed-cycle processing function. FIG. 7 is a configuration diagram showing an example of a programmable controller according to the present invention and a program loader related thereto, FIG. 8 is a detailed configuration diagram of a central control section according to the present invention, and FIG. FIG. 10 is a flowchart showing the function of selecting and executing a function by the control unit. FIG. 10 is a flowchart showing the function of monitoring the periodic excess of the periodic processing function by the central control unit according to the present invention. FIG. FIG. 12 is a diagram illustrating an example of detecting an excess of a fixed period according to the present invention when a period passes, and FIG. 12 is a diagram showing an example of detecting an excess of a fixed period according to the present invention when a period exceeds temporarily. . 10...programmable controller, 11...
... Arithmetic control section, 12 ... Memory, 13 ... Interface section, 14 ... Program loader, 20
... Programmable controller, 21 ... Program memory, 22 ... Arithmetic control section, 23 ... Input section, 24 ... Output section, 25 ... Data memory,
30...Program loader, 31...Keyboard, 32...Central processing circuit, 33...Screen editing circuit, 34...Refresh memory, 35...Pattern generation circuit, 36...Display control circuit, 37...
Display device, 38...Ladder diagram conversion circuit, 39...Buffer memory, 40...Ladder diagram reproduction circuit, 41...Interface circuit, 221...Program counter, 222...
...Instruction register, 223...Instruction decoding section, 224
... Central control unit, 225 ... Register group, 226
...Clock circuit, 227...Monitoring counter.

Claims (1)

【特許請求の範囲】 1 シーケンスプログラムを格納するプログラム
メモリと、演算の途中結果、データ等の保存を行
なうデータメモリと、外部よりの入力信号を取込
む入力部と、前記シーケンスプログラムに基づい
て前記入力部より入力される情報または前記プロ
グラムメモリに保存されるデータとの間で演算を
行なう演算制御部と、前記演算制御部の演算結果
を出力すると出力部と、プログラムもしくはデー
タ等の入力または表示を行なうプログラムローダ
との間でインターフエイスを行なうインターフエ
イス部と、をそなえ、 前記シーケンスプログラムをその機能に応じて
て定周期処理、割込み処理、バツチ処理等のフア
クシヨンに分割して前記プログラムメモリに格納
し、前記演算制御部に前記フアンクシヨンを選択
して実行させる機能を有するプログラマブルコン
トローラにおいて、 前記演算制御部が、中央制御部と、定周期クロ
ツク部と、前記中央制御部によつて、定周期クロ
ツク割込み入力が入るたび1カウントアツプさ
れ、定周期処理フアンクシヨンの実行が終了する
たびに1カウントダウンされる監視カウンタと、
を有し、 前記中央制御部が、前記定周期処理フアンクシ
ヨンの実行直前に前記監視カウンタの値を参照
し、前記監視カウンタの値が一定値を超えた場合
に定周期超過と判断することを特徴とするプログ
ラマブルコントローラ。
[Scope of Claims] 1. A program memory that stores a sequence program, a data memory that stores intermediate results of calculations, data, etc., an input section that receives input signals from the outside, and an arithmetic control section that performs arithmetic operations with information input from the input section or data stored in the program memory; an output section that outputs the arithmetic results of the arithmetic control section; and an input or display of programs or data. an interface section that interfaces with a program loader that performs the above processing, and divides the sequence program into functions such as fixed period processing, interrupt processing, batch processing, etc. according to the functions thereof, and stores them in the program memory. In the programmable controller having a function of storing and causing the arithmetic and control section to select and execute the function, the arithmetic and control section has a central control section, a fixed-period clock section, and a fixed-period clock section, and a fixed-period clock section. a monitoring counter that is incremented by one each time a clock interrupt input is input and decremented by one each time execution of a fixed-cycle processing function is completed;
The central control unit refers to the value of the monitoring counter immediately before executing the fixed period processing function, and determines that the fixed period has exceeded when the value of the monitoring counter exceeds a certain value. A programmable controller.
JP58209507A 1983-11-08 1983-11-08 Programmable controller Granted JPS60101612A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58209507A JPS60101612A (en) 1983-11-08 1983-11-08 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58209507A JPS60101612A (en) 1983-11-08 1983-11-08 Programmable controller

Publications (2)

Publication Number Publication Date
JPS60101612A JPS60101612A (en) 1985-06-05
JPH0449123B2 true JPH0449123B2 (en) 1992-08-10

Family

ID=16573941

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58209507A Granted JPS60101612A (en) 1983-11-08 1983-11-08 Programmable controller

Country Status (1)

Country Link
JP (1) JPS60101612A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6215606A (en) * 1985-07-15 1987-01-24 Fuji Electric Co Ltd Method for confirming executing speed of programmable controller
JP4894961B1 (en) * 2011-03-15 2012-03-14 オムロン株式会社 PLC CPU unit, PLC system program, and recording medium storing PLC system program

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5866445U (en) * 1981-10-30 1983-05-06 日本電気ホームエレクトロニクス株式会社 Alarm generation circuit

Also Published As

Publication number Publication date
JPS60101612A (en) 1985-06-05

Similar Documents

Publication Publication Date Title
US5844795A (en) Diagnostic aid for industrial controller using multi-tasking architecture
JP3476484B2 (en) Operation history display device in control device
US5812133A (en) Industrial controller with display of rung execution
JPH0561646B2 (en)
JPH0449123B2 (en)
JPH0686580A (en) Display method for servo wave
JPS63163932A (en) System monitoring system for control computer
JPS6365969B2 (en)
JPS59119413A (en) Programmable controller
JPS6232510A (en) Abnormality diagnostic device for sequencer
JPH03105503A (en) Programmable controller
JPH06161518A (en) Programmable controller
JPS63280333A (en) Microprogram controller
JPH03144705A (en) Operation state monitor for programmable controller
JP3493525B2 (en) Programmable controller
JPH051481B2 (en)
JPH0475147A (en) Time monitoring device in information processing system
JPS63126007A (en) Programmable controller
WO1990001734A1 (en) Trace control method for pc
JPH05297913A (en) Programmable controller
JPH0413728B2 (en)
JPS62162107A (en) Program changing method for programmable controller
JPH02226307A (en) Numerical controller
JPS60193046A (en) Detecting system for instruction exception
JPS60140440A (en) Central processing unit