JPH0152762B2 - - Google Patents
Info
- Publication number
- JPH0152762B2 JPH0152762B2 JP55139571A JP13957180A JPH0152762B2 JP H0152762 B2 JPH0152762 B2 JP H0152762B2 JP 55139571 A JP55139571 A JP 55139571A JP 13957180 A JP13957180 A JP 13957180A JP H0152762 B2 JPH0152762 B2 JP H0152762B2
- Authority
- JP
- Japan
- Prior art keywords
- routine
- time
- relay
- output
- abnormality
- 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
Links
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/05—Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
- G05B19/058—Safety, monitoring
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/10—Plc systems
- G05B2219/11—Plc I-O input output
- G05B2219/1181—Detection of I-O faults, shut down of I-O
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/10—Plc systems
- G05B2219/14—Plc safety
- G05B2219/14074—Signature analysis, recorded states, zones are compared to actual
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Testing And Monitoring For Control Systems (AREA)
Description
【発明の詳細な説明】
この発明は、被制御対象が正常に動作した場合
には特定の出力接点が一定時間だけONするよう
なプログラムを組んだ場合において、上記出力接
点のON時間が規定の範囲から外れたことに基づ
いて被制御対象の異常を検出する機能を備えたプ
ログラマブル・ロジツク・コントローラ(以下、
PLCという。)の異常判定方法に関する。[Detailed Description of the Invention] This invention provides that when a program is created such that a specific output contact is ON for a certain period of time when a controlled object operates normally, the ON time of the output contact is A programmable logic controller (hereinafter referred to as a
It is called PLC. ) regarding an abnormality determination method.
例えば、NC工作機においてワークを加工しな
がら一定距離だけ移動させる工程をPLCを用い
て行なうような場合には、PLCの出力リレーの
接点をONさせてモータを起動したのちワークが
所定位置まで達したことをリミツトスイツチ等で
検出し、この検出信号により前記出力リレーの接
点をOFFさせてモータを停止又は逆転させるよ
うにプログラムを組むのが普通である。 For example, when using a PLC to move a workpiece a certain distance while processing it on an NC machine tool, the contact of the PLC's output relay is turned on to start the motor, and then the workpiece reaches a predetermined position. Normally, a limit switch or the like is used to detect this, and this detection signal is used to turn off the contacts of the output relay to stop or reverse the motor.
この場合に上記加工工程が正常に行なわれてい
るものとすれば、出力リレーの接点がONしてい
る時間はほぼ一定となるはずであり、逆に上記接
点のON時間が極端に長かつたりあるいは短かい
場合には上記加工工程に何らかの異常が発生した
ことを察知することができる。 In this case, if the above machining process is performed normally, the time that the output relay contact is ON should be almost constant; on the other hand, the ON time of the contact may be extremely long. Alternatively, if it is short, it can be detected that some kind of abnormality has occurred in the processing process.
そこで、従来出力リレーのON時間が規定範囲
から外れると警報等を発する機能を備えたPLC
が知られているが、このPLCは基準となる最大
又は最小ON時間をマニユアルで設定するように
しているため、平常時においてもON時間に変動
が生ずるような被制御対象を取り扱う場合には最
大、最小ON時間の設定が困難であり、このため
せつかく出力接点のON時間に基づく異常検出機
能を備えていてもこれを充分に発揮させることが
できないという問題があつた。 Therefore, conventional PLCs are equipped with a function that issues an alarm when the ON time of an output relay deviates from a specified range.
However, since this PLC manually sets the maximum or minimum ON time as a reference, when handling a controlled object whose ON time fluctuates even under normal conditions, the maximum or minimum ON time must be set manually. However, it is difficult to set the minimum ON time, and therefore, even if an abnormality detection function based on the ON time of the output contact is provided, it cannot be fully utilized.
この発明は上記の問題に鑑み創案されたもの
で、その目的とするところはこの種の異常検出機
能を備えたPLCにおいて、ON時間(又はOFF時
間)の許容値の設定をできる限り簡単化せんとす
るものである。 This invention was devised in view of the above problem, and its purpose is to simplify as much as possible the setting of the allowable value of ON time (or OFF time) in a PLC equipped with this kind of abnormality detection function. That is.
すなわち、この発明に係るPLCの異常判定方
法は、通常のシーケンスプログラムを実行して被
制御対象を繰り返し運転しつつ出力リレーの最大
および最小ON時間(またはOFF時間)を演算に
より求め、通常のシーケンスプログラムを実行し
て被制御対象を実運転しつつ、前記各出力リレー
のON時間(またはOFF時間)が前記求められた
最大、最小ON時間(またはOFF時間)の範囲を
越えているとき、被制御対象の異常と判定するこ
とを特徴とするものである。 In other words, the PLC abnormality determination method according to the present invention involves calculating the maximum and minimum ON time (or OFF time) of the output relay while repeatedly operating the controlled object by executing a normal sequence program. While executing the program and actually operating the controlled object, if the ON time (or OFF time) of each output relay exceeds the range of the maximum and minimum ON time (or OFF time) determined above, This is characterized by determining that there is an abnormality in the controlled object.
以下に、この発明の好適一実施例を添付図面に
基づいて詳述する。 A preferred embodiment of the present invention will be described in detail below with reference to the accompanying drawings.
第1図はこの発明に係るPLCのシステム構成
を示すブロツク図、第2図はPLCの出力部を概
略的に示す結線図、第3図はモニタ用リレーの動
作とタイマクロツクとの関係を示すタイムチヤー
ト、第4図は操作パネルのレイアウトの一例を示
す正面図、第5図はRAMのワーキングエリアの
内容を示すメモリマツプ、第6図はPLCの動作
を示すゼネラルフローチヤート、第7図は異常処
理ルーチンの詳細を示すフローチヤート、第8図
はサーチルーチンの詳細を示すフローチヤートで
ある。 Fig. 1 is a block diagram showing the system configuration of the PLC according to the present invention, Fig. 2 is a wiring diagram schematically showing the output section of the PLC, and Fig. 3 is a time diagram showing the relationship between the operation of the monitor relay and the timer clock. Chart, Figure 4 is a front view showing an example of the layout of the operation panel, Figure 5 is a memory map showing the contents of the RAM working area, Figure 6 is a general flowchart showing PLC operation, and Figure 7 is error handling. Flowchart showing the details of the routine. FIG. 8 is a flowchart showing the details of the search routine.
第1図において、1はシステム全体を総括制御
するためのCPU、2はシステムプログラムを格
納するためのROM、3はユーザプログラムを格
納するためのRAM、4は後述するON時間計算
用の基準タイマクロツクを出力するタイマクロツ
ク発生器、5は後述する如く出力リレーの接点の
ON時間に異常があつたとき、異常出力リレーX
を駆動するための異常出力回路、6はモード切替
スイツチMSの操作に応答して所定の論理出力を
発するモード入力回路、7はサーチスイツチSS
の操作に応答して所定の論理出力を発するサーチ
入力回路、8はいずれの出力リレーの接点のON
時間に異常が生じたとき当該出力リレーの番号を
表示する異常表示器、9は後述するモニタ用リレ
ーのON、OFF状態をCPU1に取り込むためのイ
ンターフエース回路であり、これらは内部バスラ
イン10を介して互いに接続されている。 In Figure 1, 1 is a CPU for overall control of the entire system, 2 is a ROM for storing system programs, 3 is a RAM for storing user programs, and 4 is a reference timer block for calculating ON time, which will be described later. 5 is a timer clock generator that outputs
When there is an error in the ON time, the error output relay
6 is a mode input circuit that generates a predetermined logical output in response to the operation of the mode selector switch MS, 7 is a search switch SS
A search input circuit that emits a predetermined logical output in response to the operation of , 8 is the ON of the contact of either output relay.
An error indicator 9 displays the number of the output relay when an error occurs in the time, and 9 is an interface circuit for inputting the ON/OFF status of the monitor relay to the CPU 1, which will be described later. are connected to each other through.
このPLCにはX1〜XNからなるN個の出力リレ
ーが設けられており、また各出力リレーX1〜XN
には第2図に示す如くそれぞれモニタ用リレー
X1a〜XNaが並列に接続されている。従つて、
出力リレーX1〜XNがONすると、これに対応し
て各モニタ用リレーX1a〜XNaもONするように
構成されている。そして、各モニタ用リレーX1a
〜XNaのa接点のON、OFF状態は、第1図に
示す如くモニタ回路11を介してデータバスライ
ン12上に送出され、CPU1からのタイミング
信号に応答してラツチ回路13に取り込まれるよ
うに構成されている。 This PLC is provided with N output relays consisting of X 1 to X N , and each output relay X 1 to X N
are each equipped with a monitor relay as shown in Figure 2.
X 1 a to X N a are connected in parallel. Therefore,
When the output relays X 1 to X N are turned on, the monitor relays X 1 a to X N a are also turned on in response to this. And relay for each monitor x 1a
The ON/OFF state of the a contact of ~X N a is sent onto the data bus line 12 via the monitor circuit 11 as shown in FIG. 1, and is taken into the latch circuit 13 in response to a timing signal from the CPU 1. It is configured as follows.
また、この例では操作パネル14には第4図に
示す如く、前述の異常表示器8、モード切替スイ
ツチMS、サーチスイツチSS及び異常出力リレー
Xの外部出力端子15が設けられており、異常表
示器8には当該異常に係る出力リレーの該当番号
が1つ表示されるように構成されている。 In addition, in this example, the operation panel 14 is provided with the above-mentioned abnormality indicator 8, mode changeover switch MS, search switch SS, and external output terminals 15 of the abnormality output relay X, as shown in FIG. The device 8 is configured to display one corresponding number of the output relay related to the abnormality.
一方、RAM3内にはPLCの通常の動作に必要
なユーザプログラム書込用エリアのほかに、第1
図に示す如く現在値、最小値、最大値からなる3
種類のレジスタR1c〜RNc,R1M〜RNM,R1x〜
RNxが出力リレーの数だけ設けられるとともに、
ワーキングエリアには第5図に示す如く、各出力
リレーX1〜XNの動作異常を記憶するエラフラグ
EF、後述するサーチ動作の際にサーチボタンの
初回操作であるか否かを記憶するサーチ開始フラ
グS、動作異常に係る出力リレーの番号を順次記
憶するためのエラスタツクES、エラスタツクES
の各記憶エリアを順次続み出すとき、エラスタツ
クの各アドレスを記憶するエラポインタEP等が
設けられている。 On the other hand, in addition to the user program writing area necessary for normal operation of the PLC, RAM3 contains a
As shown in the figure, 3 consists of the current value, minimum value, and maximum value.
Types of registers R 1 c ~ R N c, R 1M ~ R NM , R 1 x ~
R N x is provided by the number of output relays, and
In the working area, as shown in Figure 5, there are error flags that memorize malfunctions of each output relay X1 to XN .
EF, search start flag S for storing whether or not it is the first operation of the search button during the search operation described later, error stack ES for sequentially storing the numbers of output relays related to abnormal operation, error stack ES
An error pointer EP or the like is provided to store each address of the error stack when successively proceeding from each storage area.
他方、ROM2内にはこの発明を実施するため
に第6図、第7図、第8図のフローチヤートに示
す如きシステムプログラムが格納されている。 On the other hand, the ROM 2 stores system programs as shown in the flowcharts of FIGS. 6, 7, and 8 for carrying out the present invention.
次に、このPLCの動作を第6図、第7図、第
8図のフローチヤートに従つて説明する。 Next, the operation of this PLC will be explained according to the flowcharts shown in FIGS. 6, 7, and 8.
先ず、第6図〜第8図に示す各ルーチンの具体
的実行内容を説明する。 First, the specific execution contents of each routine shown in FIGS. 6 to 8 will be explained.
「ルーチンR1」;
サーチ入力回路7の出力をCPU1に取り込
み、その内容が“1”(計測モード)であるか
否かを判定する。"Routine R 1 ": The output of the search input circuit 7 is taken into the CPU 1, and it is determined whether the content is "1" (measurement mode).
「ルーチンR2」;
モニタ用リレーX1aのON、OFF状態を示す
ラツチ回路13のQ1出力をCPU1に取り込み、
その内容が“1”(モニタ用リレーX1aがON)
であるか否かを判定する。"Routine R 2 "; The Q 1 output of the latch circuit 13 indicating the ON/OFF state of the monitor relay X 1 a is taken into the CPU 1,
The content is “1” (monitor relay X 1 a is ON)
Determine whether or not.
「ルーチンR3」;
タイマクロツク発生器4の出力をCPU1に
取り込み、その内容が“1”でかつ前回の内容
が“0”である(タイマクロツク立上り)か否
かを判定する。"Routine R 3 ": The output of the timer clock generator 4 is taken into the CPU 1, and it is determined whether the content is "1" and the previous content is "0" (timer clock rising).
「ルーチンR4」
RAM3内のリレーX1aに対応する現在値レ
ジスタR1cの内容に1を加算する。"Routine R4 " Adds 1 to the contents of the current value register R1c corresponding to the relay X1a in RAM3.
「ルーチンR5」;
ラツチ回路13のQ1出力をCPU1に取り込
み、その内容が“0”でかつ前回の内容が
“1”である(リレーX1aがOFFされたこと)
か否かを判定する。"Routine R 5 "; The Q 1 output of the latch circuit 13 is taken into the CPU 1, and its content is "0" and the previous content is "1" (relay X 1 a is turned OFF).
Determine whether or not.
「ルーチンR6」;
RAM3内のリレーX1aに対応する現在値レ
ジスタR1cの内容が、最大値レジスタR1xの内
容よりも大きいか否かを判定する。“Routine R 6 ”: Determine whether the contents of the current value register R 1 c corresponding to the relay X 1 a in the RAM 3 are larger than the contents of the maximum value register R 1 x.
「ルーチンR7」;
現在値レジスタR1cの内容で最大値レジスタ
R1xの内容を置き換える。"Routine R 7 "; Maximum value register with the contents of current value register R 1 c
Replace the contents of R 1 x.
「ルーチンR8」; 現在値レジスタR1cに0をストアする。“Routine R 8 ”; Stores 0 in the current value register R 1 c.
「ルーチンR9」;
現在値レジスタR1cの内容が、最小値レジス
タR1Mの内容よりも小さいか否かを判定する。"Routine R 9 ": Determine whether the contents of the current value register R 1 c are smaller than the contents of the minimum value register R 1M .
「ルーチン10」;
現在値レジスタR1cの内容で最小値レジスタ
R1Mの内容を置き換える。"Routine 10 "; The contents of the current value register R1c are used as the minimum value register.
Replace the contents of R 1M .
「ルーチンR11」; 現在値レジスタR1cに0をストアする。"Routine R 11 "; Stores 0 in the current value register R 1 c.
「ルーチンR12」;
サーチ入力回路7の出力をCPU1に取り込
み、その内容が“0”(RUNモード)であるか
否かを判定する。"Routine R 12 ": The output of the search input circuit 7 is taken into the CPU 1, and it is determined whether the content is "0" (RUN mode).
「ルーチンR13」;
RAM3内のリレーX1aに対応するエラフラ
グEFの内容が“1”(異常を示す)であるか否
かを判定する。“Routine R 13 ”: Determine whether the content of the error flag EF corresponding to the relay X 1 a in the RAM 3 is “1” (indicating an abnormality).
「ルーチンR14」;
ラツチ回路13のQ1出力をCPU1に取り込
み、その内容が“1”(モニタ用リレーX1aが
ON)であるか否かを判定する。"Routine R 14 "; The Q 1 output of the latch circuit 13 is taken into the CPU 1, and its content is "1" (the monitor relay X 1 a is
ON).
「ルーチンR15」;
タイマクロツク発生器4の出力をCPU1に
取り込み、その内容が“1”でかつ前回の内容
が“0”である(タイマクロツク立上り)か否
かを判定する。"Routine R 15 "; The output of the timer clock generator 4 is taken into the CPU 1, and it is determined whether its content is "1" and the previous content is "0" (timer clock rising).
「ルーチンR16」; 現在値レジスタR1cの内容に1を加算する。"Routine R 16 "; Adds 1 to the contents of the current value register R 1 c.
「ルーチンR17」;
ラツチ回路13のQ1出力をCPU1に取り込
み、その内容が“0”でかつ前回の内容が
“1”である(リレーX1aがOFFされたこと)
か否かを判定する。"Routine R 17 "; The Q 1 output of the latch circuit 13 is taken into the CPU 1, and its content is "0" and the previous content is "1" (relay X 1 a is turned OFF).
Determine whether or not.
「ルーチンR18」;
現在値レジスタR1cの内容が、最大値レジス
タR1xの内容よりも小さいか否かを判定する。"Routine R 18 ": Determine whether the contents of the current value register R 1 c are smaller than the contents of the maximum value register R 1 x.
「ルーチンR19」;
現在値レジスタR1cの内容が、最小値レジス
タR1Mの内容よりも大きいか否かを判定する。"Routine R 19 ": Determine whether the contents of the current value register R 1 c are greater than the contents of the minimum value register R 1M .
「ルーチンR20」;
第7図に示す如く「ルーチンR201」から「ル
ーチンR207」によつて構成される。"Routine R 20 ": As shown in FIG. 7, it is composed of "routine R 201 " to "routine R 207 ".
「ルーチンR201」;
当該異常に係るリレーの番号(1〜N)を読
み出す。"Routine R 201 "; Reads the relay number (1 to N) related to the abnormality.
「ルーチンR202」;
前記ルーチンR201で読み出されたリレーの番
号をエラスタツクESにストアする。"Routine R 202 "; The relay number read in the routine R 201 is stored in the error stack ES.
「ルーチンR203」;
当該異常に係るリレーに対応するエラフラグ
EFの内容を“1”にセツトする。"Routine R 203 "; Error flag corresponding to the relay related to the error
Set the contents of EF to “1”.
「ルーチンR204」;
異常出力リレーXの状態をCPU1に取り込
み、その内容が“0”(OFF状態)か否かを判
定する。"Routine R 204 "; The state of the abnormal output relay X is taken into the CPU 1, and it is determined whether the content is "0" (OFF state).
「ルーチンR205」;
エラポインタEPで指定されるエラスタツク
ES内の記憶エリアから当該異常リレーの番号
を読み出し、これを異常表示器8に表示させ
る。"Routine R 205 "; error stack specified by error pointer EP
The number of the abnormality relay is read from the storage area in the ES and displayed on the abnormality display 8.
「ルーチンR206」;
異常出力回路5を駆動して異常出力リレーX
をONさせる。"Routine R 206 "; Drives the abnormal output circuit 5 and outputs the abnormal output relay
Turn on.
「ルーチンR207」; エラポインタEPの内容を1つ更新する。"Routine R 207 "; Updates the contents of the error pointer EP by one.
「ルーチンR21」;
サーチ入力回路7の出力をCPU1に取り込
み、その内容が“1”でかつ前回の内容が
“0”(サーチスイツチSSがONしたこと)であ
るか否かを判定する。"Routine R 21 ": The output of the search input circuit 7 is taken into the CPU 1, and it is determined whether the content is "1" and the previous content was "0" (search switch SS was turned on).
「ルーチンR22」;
第8図に示す如く「ルーチンR221」;から
「ルーチンR226」によつて構成される。"Routine R 22 "; As shown in FIG. 8, it is composed of "Routine R 221 " and "Routine R 226. "
「ルーチンR221」;
サーチフラグSの内容が“1”(第1回目の
サーチスイツチON)であるか否かを判定す
る。"Routine R 221 ": Determine whether the content of the search flag S is "1" (first search switch ON).
「ルーチンR222」; サーチカウンタSCの内容を1つ更新する。"Routine R 222 ": Updates the contents of the search counter SC by one.
「ルーチンR223」;
サーチカウンタSCの内容で指定される番地
のエラスタツクESから、異常リレーの番号を
読み出す。"Routine R 223 ": Reads the number of the abnormal relay from the error stack ES at the address specified by the contents of the search counter SC.
「ルーチンR224」;
前記読み出された異常リレーの番号を異常表
示器8に表示させる。"Routine R 224 "; The number of the abnormality relay that has been read out is displayed on the abnormality display 8.
「ルーチンR225」;
サーチカウンタSCにエラスタツクESの先頭
アドレスをセツトする。"Routine R 225 ": Set the start address of the error stack ES in the search counter SC.
「ルーチンR226」
サーチ開始フラグSを“1”(2回目以降の
サーチスイツチ操作を示す。)にセツトする。"Routine R 226 " Set the search start flag S to "1" (indicating the second or subsequent search switch operation).
尚、第6図において1点錯線にて囲まれている
部分は、ルーチンR1〜ルーチンR22と全く同様な
プログラムをモニタ用リレX2a〜XNaについて
それぞれ行なうものである。 In FIG. 6, the portions surrounded by dotted lines indicate programs that are completely similar to routines R 1 to R 22 for monitoring relays X 2 a to X Na , respectively.
次に、このPLCの動作を計測モードの場合か
ら説明する。第4図に示すモード切替スイツチ
MSを計測側に設定するとともに、このPLCの通
常のシーケンスプログラムを実行させ被制御対象
を繰り返し試験運転させる。このとき、例えばモ
ニタ用リレーX1aがOFFしていると。ルーチン
RR1(YES)→ルーチンR2(NO)→ルーチンR5
(NO)となつて計測動作は行なわれない。この
状態からモニタ用リレーX1aがONすると、ルー
チンR1(YES)→ルーチンR2(YES)→ルーチン
R3(YES)→ルーチンR4又はルーチンR3(NO)
となり、第3図に示すタイマクロツクが到来する
たびに現在値レジスタR1cには1が加算され、現
在値レジスタR1cにはタイマクロツクの計数値で
あらわされたモニタ用リレーX1aのON時間デー
タが形成される。 Next, the operation of this PLC will be explained starting from the measurement mode. Mode changeover switch shown in Figure 4
Set the MS to the measurement side, run the normal sequence program of this PLC, and repeatedly test drive the controlled object. At this time, for example, if the monitor relay X 1 a is OFF. routine
RR 1 (YES) → Routine R 2 (NO) → Routine R 5
(NO) and no measurement operation is performed. When monitor relay X 1 a turns ON from this state, routine R 1 (YES) → Routine R 2 (YES) → Routine
R 3 (YES) → Routine R 4 or Routine R 3 (NO)
Therefore, each time the timer clock shown in Fig. 3 arrives, 1 is added to the current value register R 1 c, and the ON value of the monitor relay X 1 a, which is represented by the count value of the timer clock, is added to the current value register R 1 c. Time data is formed.
次いで、モニタ用リレーX1aがOFFすると、ル
ーチンR1(YES)→ルーチンR2(NO)→ルーチ
ンR5(YES)→ルーチンR6(YES)→ルーチンR7
→ルーチンR8またはR6(NO)→ルーチンR9
(YES)→ルーチンR10→ルーチンR11となつて、
モニタ用リレーX1aに対応する最小値レジスタ
R1M及び最大値レジスタR1xにはモニタ用リレー
X1aがその時点までに繰り返しONした中で最大
ON時間データ及び最小ON時間データがそれぞ
れストアさせるとともに、現在値レジスタR1cの
内容は0にクリアされる。 Next, when monitor relay X 1 a turns OFF, routine R 1 (YES) → Routine R 2 (NO) → Routine R 5 (YES) → Routine R 6 (YES) → Routine R 7
→ Routine R 8 or R 6 (NO) → Routine R 9
(YES) → Routine R 10 → Routine R 11
Minimum value register corresponding to monitoring relay X 1 a
R 1M and maximum value register R 1 x are monitor relays.
The maximum X 1 a has been turned ON up to that point
The ON time data and the minimum ON time data are stored respectively, and the contents of the current value register R 1 c are cleared to 0.
このようにして、モニタ用リレーX1aに対する
計測プログラムが実行されるのであるが、同時に
モニタ用リレX2a,X3a……に対しても同様のプ
ログラムが順次実行され、最後のモニタ用リレー
XNaに対するプログラムの実行が終了すると再
び最初のモニタ用リレーX1aに戻つて最大ON時
間及び最小ON時間データの形成が繰り返し行な
われる。 In this way, the measurement program for monitor relay X 1 a is executed, but at the same time, a similar program is executed sequentially for monitor relays X 2 a, relay for
When the execution of the program for X Na is completed, the process returns to the first monitoring relay X 1 a and the maximum ON time and minimum ON time data are repeatedly formed.
次にRUNモードの場合の動作を説明する。先
ず、PLCのシーケンスプログラムに従つて被制
御対象(例えば、NC工作機等)を実際に運転す
る。この状態において第4図に示すモード切替ス
イツチMSをRUN側に設定すると、モニタ用リ
レーX1aのON時間が過去に異常が全くなく、か
つそのときモニタ用リレーX1aがOFFであると、
ルーチンR1(NO)→ルーチンR12(YES)→ルー
チンR13(YES)→ルーチンR14(NO)→ルーチン
R17(NO)→ルーチンR23となり、現在値レジス
タR1cの内容は0にクリアされる。この状態にお
いてモニタ用リレーX1aがONすると、ルーチン
R1(NO)→ルーチンR12(YES)→ルーチンR13
(YES)→ルーチンR14(YES)→ルーチンR15
(YES)or(NO)となり、タイマクロツクが到来
するたびにルーチンR16が実行されて、現在値レ
ジスタR1cには1が加算され、これによりそのと
きのON時間データが形成される。 Next, the operation in RUN mode will be explained. First, a controlled object (for example, an NC machine tool, etc.) is actually operated according to a PLC sequence program. In this state, if the mode changeover switch MS shown in Fig . 4 is set to the RUN side, the ON time of the monitor relay X 1 a will change if there has been no abnormality in the past and if the monitor relay ,
Routine R 1 (NO) → Routine R 12 (YES) → Routine R 13 (YES) → Routine R 14 (NO) → Routine
R 17 (NO) → Routine R 23 and the contents of the current value register R 1 c are cleared to 0. If monitor relay X 1 a turns on in this state, the routine
R 1 (NO) → Routine R 12 (YES) → Routine R 13
(YES) → Routine R 14 (YES) → Routine R 15
(YES) or (NO), and each time the timer clock arrives, routine R16 is executed and 1 is added to the current value register R1c , thereby forming ON time data at that time.
次いで、モニタ用リレーX1aがOFFすると、ル
ーチンR1(NO)→ルーチンR12(YES)→ルーチ
ンR13(YES)→ルーチンR14(NO)→ルーチン
R17(YES)となり、この状態においてモニタ用
リレーR1aのON時間に何の異常もない場合には
引き続きルーチンR18(NO)→ルーチンR19(NO)
となつて何ら異常出力は発せられない。これに対
して、現在値レジスタR1c内に形成されたそのと
きのON時間データが、最小値レジスタR1M内に
ストアされた最小ON時間データよりもさらに小
さいときには、ルーチンR18(YES)→ルーチン
R20となり、また現在値レジスタR1c内に形成さ
れたそのときのON時間データが、最大値レジス
タR1x内にストアされた最大ON時間データより
もさらに大きいときには、ルーチンR18(NO)→
ルーチンR19(YES)→ルーチンR20となり、いず
れの場合においても異常処理ルーチンR20が実行
される。 Next, when monitor relay X 1 a turns OFF, routine R 1 (NO) → Routine R 12 (YES) → Routine R 13 (YES) → Routine R 14 (NO) → Routine
R 17 (YES), and if there is no abnormality in the ON time of monitor relay R 1 a in this state, the routine R 18 (NO) → Routine R 19 (NO) continues.
Therefore, no abnormal output is generated. On the other hand, if the current ON time data formed in the current value register R 1 c is smaller than the minimum ON time data stored in the minimum value register R 1M , the routine R 18 (YES) →routine
R 20 and the current ON time data formed in the current value register R 1 c is greater than the maximum ON time data stored in the maximum value register R 1 x, then the routine R 18 (NO )→
Routine R 19 (YES)→routine R 20 , and in either case, abnormality handling routine R 20 is executed.
そして、異常処理ルーチンR20においては、ル
ーチンR201→ルーチンR202→ルーチンR203が順次
実行されて、モニタ用リレーX1aの番号「1」が
エラスタツクESの先頭番地にストアされるとと
もに、モニタ用リレーX1aに対応するエラフラグ
EFは“1”にセツトされる。次いで、この状態
において異常出力リレーXがOFFであると、ル
ーチンR204(YES)→ルーチンR205→ルーチン
R206→ルーチンR207となつて、異常表示器8には
当該異常に係るモニタ用リレーX1aの番号「1」
が表示されるとともに、異常出力リレーXがON
することになり、またエラポインタEPの内容は
1つ更新される。他方、異常出力リレーXが既に
ONしている場合には、ルーチンR204(NO)→ル
ーチンR207となつて、エラポインタEPの更新の
みが行なわれ、次いでメインルーチンに復帰す
る。 Then, in the abnormality processing routine R 20 , routine R 201 → routine R 202 → routine R 203 are executed in sequence, and the number "1" of the monitor relay X 1 a is stored at the first address of the error stack ES. Error flag corresponding to monitor relay X 1a
EF is set to "1". Next, if abnormal output relay X is OFF in this state, routine R 204 (YES) → routine R 205 → routine
R 206 → Routine R 207 , and the error indicator 8 shows the number "1" of the monitor relay X 1 a related to the error.
is displayed and abnormal output relay X is turned ON.
The contents of the error pointer EP are updated by one. On the other hand, abnormal output relay
If it is ON, the routine goes from routine R 204 (NO) to routine R 207 , and only the error pointer EP is updated, and then the process returns to the main routine.
このようにして、モニタ用リレーX1aに対する
異常判定プログラムが実行されるのであるが、同
時にモニタ用リレーX2a,X3a……に対しても同
様のプログラムが順次実行され、最後のモニタ用
リレーXNaに対するプログラムの実行が終了す
ると、ルーチンR21が実行される。このとき、サ
ーチスイツチSSをONすると、ルーチンR21
(YES)→ルーチンR22となつて第8図に示すサ
ーチプログラムが実行される。サーチプログラム
は同時に複数のモニタ用リレーX1a〜XNaのON
時間に異常が生じたとき、これらのリレーの番号
を異常表示器8に順次1つづつ表示させるもので
ある。 In this way, the abnormality determination program for monitor relay X 1 a is executed, but at the same time, similar programs are executed sequentially for monitor relays X 2 a, When the execution of the program for the monitor relay X Na is completed, routine R21 is executed. At this time, when the search switch SS is turned on, routine R 21
(YES) → Routine R 22 and the search program shown in FIG. 8 is executed. The search program turns on multiple monitor relays X 1 a to X N a at the same time.
When an abnormality occurs in time, the numbers of these relays are displayed one by one on the abnormality display 8.
すなわち、サーチスイツチSSを初めてONさせ
ると、ルーチンR221(NO)→ルーチンR225→ルー
チンR226→ルーチンR223→ルーチンR224となつ
て、サーチカウンタSCにはエラスタツクESの先
頭番地がセツトされるとともに、サーチ開始フラ
グSが“1”にセツトされ、さらにサーチカウン
タSCで指定されるエラスタツクESの先頭アドレ
スにストアされたリレー番号が読み出され、異常
表示器8にはこのリレー番号が表示される。 That is, when the search switch SS is turned ON for the first time, the sequence is routine R 221 (NO) → routine R 225 → routine R 226 → routine R 223 → routine R 224 , and the search counter SC is set to the start address of the error stack ES. At the same time, the search start flag S is set to "1", and the relay number stored at the start address of the error stack ES specified by the search counter SC is read out, and this relay number is displayed on the error indicator 8. be done.
次いで、サーチスイツチSSの2回目のONの場
合には、ルーチンR221(YES)→ルーチンR222→
ルーチンR223→ルーチンR224となつてサーチカウ
ンタSCの内容が1つ更新され、この更新された
内容で指定される番地のエラスタツクESにスト
アされたリレー番号が読み出され、同様にして異
常表示器8に表示される。 Next, when the search switch SS is turned on for the second time, routine R 221 (YES) → routine R 222 →
Routine R 223 → Routine R 224 , the content of the search counter SC is updated by 1, the relay number stored in the error stack ES at the address specified by this updated content is read out, and an error is displayed in the same way. displayed on the display 8.
このようにして、サーチスイツチSSをONさせ
るごとに、エラスタツクES内にストアされた異
常リレーの番号が順次読み出され、異常表示器8
に表示されるのである。 In this way, each time the search switch SS is turned ON, the numbers of the abnormality relays stored in the elastic stack ES are read out in sequence, and the abnormality display 8 is read out.
is displayed.
かくして、この実施例に示すPLCにおいては、
モード切替スイツチMSを計測側に設定したのち
被制御対象を繰り返し試運転すれば、モニタ用リ
レーX1a〜XNaの動作を介してすべての出力リ
レーX1〜Xaの最大及び最小ON時間を自動的に
算出するとともに設定することができ、平常時の
運転状態においてもON時間に変動幅があるよう
な被制御対象にあつても、適切な最大、最小ON
時間を設定することができる。 Thus, in the PLC shown in this example,
If you repeatedly test run the controlled object after setting the mode changeover switch MS to the measurement side, the maximum and minimum ON times of all output relays X 1 to Xa can be changed through the operation of monitor relays X 1 to X N a. It can be automatically calculated and set, and even when the controlled object has a fluctuation range in ON time even under normal operating conditions, the appropriate maximum and minimum ON values can be set.
You can set the time.
また、各最大、最小ON時間を検出するについ
ては、各出力リレーX1〜XNのそれぞれにモニタ
用リレーX1a〜XNaを並列に接続し、その接点
のON、OFF状態を検出するようにしているた
め、ハードウエア構成が著しく簡単なものとな
る。 In addition, to detect each maximum and minimum ON time, connect monitor relays X 1 a to X N a in parallel to each output relay X 1 to X N , and detect the ON and OFF states of their contacts. As a result, the hardware configuration becomes extremely simple.
さらに、各出力リレーX1〜XNの動作を異常と
判定するについては、実際のON時間が一定の上
限、下限の範囲内に収まつていないことを判定す
るようにしているため、上限又は下限のいずれか
一方しか判定基準としていない従来例に比べて、
被制御対象の異常をより一層正確に検出すること
ができる。 Furthermore, when determining that the operation of each output relay X 1 to X N is abnormal, it is determined that the actual ON time is not within a certain upper and lower limit range. Compared to the conventional example where only one of the lower limits is used as a criterion,
Abnormalities in the controlled object can be detected even more accurately.
尚、この実施例では各リレーのON時間に基づ
いて被制御対象の異常を判定したが、OFF時間
によつても同様の効果を得ることができる。 Incidentally, in this embodiment, the abnormality of the controlled object was determined based on the ON time of each relay, but the same effect can be obtained by using the OFF time.
以上の説明で明らかなように、この発明に係る
PLCの異常判定方法は、通常のシーケンスプロ
グラムを実行して被制御対象を繰り返し運転しつ
つ出力リレーの最大および最小ON時間(または
OFF時間)を演算により求め、通常のシーケン
スプログラムを実行して被制御対象を実運転しつ
つ、前記各出力リレーのON時間(またはOFF時
間)が前記求められた最大、最小ON時間(また
はOFF時間)の範囲を越えているとき、被制御
対象の異常と判定するように構成したものである
から、次のような効果が奏し得られる。 As is clear from the above explanation, this invention relates to
The PLC abnormality determination method is to run a normal sequence program and repeatedly operate the controlled object, while the output relay's maximum and minimum ON times (or
The ON time (or OFF time) of each output relay is determined by calculating the maximum and minimum ON time (or OFF time) while executing a normal sequence program and actually operating the controlled object. Since the structure is configured so that it is determined that there is an abnormality in the controlled object when the time exceeds the range of (time), the following effects can be achieved.
(a) この種の異常検出機能を備えたPLCにおい
て、ON時間(またはOFF時間)の許容値の設
定が簡単になり、操作性が向上する。(a) In a PLC equipped with this type of abnormality detection function, it is easier to set the allowable value for ON time (or OFF time), improving operability.
(b) また、この発明によれば、実運転中の各出力
リレーのON時間(またはOFF時間)が、演算
により求められた最大、最小ON時間(または
OFF時間)を越えたとき、被制御機器の異常
と判定して、その旨を出力するように構成した
ため、制御対象機器の暴走や破損を未然に防止
することができる。(b) Also, according to the present invention, the ON time (or OFF time) of each output relay during actual operation is the maximum and minimum ON time (or
When the OFF time is exceeded, it is determined that there is an abnormality in the controlled device and a notification to that effect is output. This prevents the controlled device from running out of control or being damaged.
第1図はこの発明に係るPLCのシステム構成
を示すブロツク図、第2図はPLCの出力部を概
略的に示す結線図、第3図はモニタ用リレーの動
作とタイマクロツクとの関係を示すタイムチヤー
ト、第4図は操作パネルのレイアウトの一例を示
す正面図、第5図はRAMのワーキングエリアの
内容を示すメモリマツプ、第6図はPLCの動作
を示すゼネラルフローチヤート、第7図は異常処
理ルーチンの詳細を示すフローチヤート、第8図
はサーチルーチンの詳細を示すフローチヤートで
ある。
X1〜XN……出力リレー、MS……モード切替
スイツチ、R1c〜RNc……現在値レジスタ、R1x
〜RNx……最大値レジスタ、R1M〜RNM……最小
値レジスタ。
Fig. 1 is a block diagram showing the system configuration of the PLC according to the present invention, Fig. 2 is a wiring diagram schematically showing the output section of the PLC, and Fig. 3 is a time diagram showing the relationship between the operation of the monitor relay and the timer clock. Chart, Figure 4 is a front view showing an example of the layout of the operation panel, Figure 5 is a memory map showing the contents of the RAM working area, Figure 6 is a general flowchart showing PLC operation, and Figure 7 is error handling. Flowchart showing the details of the routine. FIG. 8 is a flowchart showing the details of the search routine. X 1 to X N ... Output relay, MS... Mode changeover switch, R 1 c to R N c... Current value register, R 1 x
~R N x... Maximum value register, R 1M ~ R NM ... Minimum value register.
Claims (1)
御対象を繰り返し運転しつつ出力リレーの最大お
よび最小ON時間(またはOFF時間)を演算によ
り求め、通常のシーケンスプログラムを実行して
被制御対象を実運転しつつ、前記各出力リレーの
ON時間(またはOFF時間)が前記求められた最
大、最小ON時間(またはOFF時間)の範囲を越
えているとき、被制御対象の異常と判定すること
を特徴とするプログラマブル・ロジツク・コント
ローラの異常判定方法。1 Execute the normal sequence program and repeatedly operate the controlled object, calculate the maximum and minimum ON time (or OFF time) of the output relay, and then execute the normal sequence program and actually operate the controlled object. while each output relay is
An abnormality in a programmable logic controller characterized in that when the ON time (or OFF time) exceeds the range of the determined maximum and minimum ON time (or OFF time), it is determined that there is an abnormality in the controlled object. Judgment method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP55139571A JPS5764807A (en) | 1980-10-06 | 1980-10-06 | Programmable logic controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP55139571A JPS5764807A (en) | 1980-10-06 | 1980-10-06 | Programmable logic controller |
Publications (2)
Publication Number | Publication Date |
---|---|
JPS5764807A JPS5764807A (en) | 1982-04-20 |
JPH0152762B2 true JPH0152762B2 (en) | 1989-11-10 |
Family
ID=15248362
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP55139571A Granted JPS5764807A (en) | 1980-10-06 | 1980-10-06 | Programmable logic controller |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS5764807A (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS59111507A (en) * | 1982-12-17 | 1984-06-27 | Mitsubishi Electric Corp | Sequence monitoring device |
JPS6063611A (en) * | 1983-09-16 | 1985-04-12 | Inoue Japax Res Inc | Numerically controlled electric working device |
EP0497010A3 (en) * | 1985-07-19 | 1992-09-30 | Rodger T. Lovrenich | A method of indicating an error condition of an apparatus |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS50156167A (en) * | 1974-06-10 | 1975-12-17 |
-
1980
- 1980-10-06 JP JP55139571A patent/JPS5764807A/en active Granted
Also Published As
Publication number | Publication date |
---|---|
JPS5764807A (en) | 1982-04-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH0731537B2 (en) | Multiplex controller | |
JP3225757B2 (en) | Programmable controller | |
JPS59186007A (en) | Alarm display system of programmable controller | |
EP0148951B1 (en) | System for checking abnormality in programmable controller | |
JPH0152762B2 (en) | ||
US5615104A (en) | Monitoring method and apparatus using a programmable logic controller | |
JPS6184712A (en) | programmable controller | |
JPS6261963B2 (en) | ||
JPS6118763B2 (en) | ||
JPS6232510A (en) | Abnormality diagnostic device for sequencer | |
JPS6014376B2 (en) | test equipment | |
JPH0119166B2 (en) | ||
JPH03159515A (en) | Digital control/protective relay analysis maintenance supporting unit | |
JPS59205613A (en) | Sequence monitor device | |
JPH0210404A (en) | Cnc device | |
JPH0411881B2 (en) | ||
JPS58158715A (en) | Programmable controller | |
JPS6215606A (en) | Method for confirming executing speed of programmable controller | |
JPS5934550A (en) | Controller for copying machine | |
JPH0620226Y2 (en) | Failure display device for vending machines | |
JPH051481B2 (en) | ||
JPH08123513A (en) | Data monitoring device for programmable controller | |
JPS58219615A (en) | Programmable controller | |
JPH05313712A (en) | Programmable controller | |
JPS6155702A (en) | Numerical controller |