JP4122725B2 - Real-time control system - Google Patents
Real-time control system Download PDFInfo
- Publication number
- JP4122725B2 JP4122725B2 JP2001121497A JP2001121497A JP4122725B2 JP 4122725 B2 JP4122725 B2 JP 4122725B2 JP 2001121497 A JP2001121497 A JP 2001121497A JP 2001121497 A JP2001121497 A JP 2001121497A JP 4122725 B2 JP4122725 B2 JP 4122725B2
- Authority
- JP
- Japan
- Prior art keywords
- priority
- processing
- display
- processing request
- real
- 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
Links
Images
Landscapes
- Bus Control (AREA)
- Control By Computers (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、設備の動作を制御する制御装置と、前記制御装置に対して処理要求を行う周辺装置からなる制御システムに関する。
【0002】
【従来の技術】
近年の機械設備を制御する制御システムにおいては、操作性及び保全性の向上を目的としてオペレータが制御機器の操作およびモニタを行うためのマン・マシン・インタフェースに、透明タッチパネルとディスプレイを組み合わせた操作盤を使用する場合が多い。この例として特開平1−245335号に示すものがある。また、マイコン技術の高度化により、マン・マシン・インタフェースに使用される操作盤では複数のアプリケーションが並行して高速に動作する傾向にある。
【0003】
このような操作盤は一般に通信回線を介して制御装置にコマンドを送信し、これに対して制御装置がレスポンスを返す形で制御装置とのやりとりを行っている。また、前記制御装置に対するコマンドは操作盤のみならず、製造ライン全体をモニタするホストコンピュータやバーコード読取装置など、複数の要求源から発せられる場合もあり、大規模な設備においては複数の操作盤を備える場合もある。従って、制御装置は複数の周辺装置や複数のアプリケーション等から非同期にコマンドを受け付けることになる。
【0004】
従来、制御装置は受け取ったコマンドを制御装置内のスタックメモリに一時記憶し、コマンドを受け取った順に処理をしてレスポンスを返していた。
【0005】
【発明が解決しようとする課題】
しかしながら、上記のような方法においてはコマンドの要求源や内容に関わり無く制御装置が受け取った順番にコマンドを処理してレスポンスを返していたため、高速処理が必要ではないコマンドの存在によって高速処理が必要なコマンドの処理が後回しにされるという問題があった。
【0006】
この問題を改善するものに特開平9−223025に示すものがあるが、この方法によったとしてもコマンドの種類ごとの優先度があらかじめ記憶され、かつ固定されているので、状況が時々刻々と変化する設備制御においては、その時点における最適な優先順位を以ってコマンドを処理することはできなかった。
【0007】
【課題を解決するための手段】
上記の課題を解決するために、請求項1の発明では、設備の動作を制御する制御装置と、前記制御装置に対して処理要求を行う周辺装置からなり、前記周辺装置は前記処理要求の優先度を決定する優先度決定部を有し、前記制御装置に対して前記優先度決定部にて決定された優先度を伴った処理要求を行うと共に、前記制御装置は前記処理要求による処理を優先度に基づいて実行する処理制御部を有するリアルタイム制御システムにおいて、前記処理制御部は、前記処理要求による処理の実行中に新たな処理要求を受けた際、前記実行中の処理要求と前記新たな処理要求との優先度を比較し、前記新たな処理要求の優先度が前記実行中の処理要求の優先度より予め設定された基準以上に高ければ、前記実行中の処理要求による処理を一時中断し待機させて前記新たな処理要求による処理を実行し、前記新たな処理要求の優先度が前記実行中の処理要求の優先度より高い場合であっても前記基準以上に高くなければ、前記新たな処理要求を待機させ、前記実行中の処理要求による処理の終了後に、待機中の前記処理要求による処理を優先度の高いものから順に実行するように構成されていることとした。
【0008】
請求項2記載の発明では、前記処理要求には予め処理要求毎に標準優先度が設定されており、前記優先度決定部は前記周辺装置の動作状態を参照して前記標準優先度を補正し、前記周辺装置は補正された優先度を伴って前記制御装置に対して処理要求を行い、前記処理制御部は前記補正された優先度に基づいて前記処理要求による処理を実行することとした。
【0009】
請求項3記載の発明では、前記制御装置は、前記処理制御部に対してイベントによりまたは一定の周期で割込みを発生させる割込発生部をさらに有し、前記処理制御部は前記割込み発生時の実行される割込み処理を記憶し、前記割込発生部からの割込みが発生した際に前記割込み処理を実行するように構成されており、
前記処理要求は前記割り込み処理として実行されることとした。
【0010】
請求項4記載の発明では、前記周辺装置は、ディスプレイとタッチパネルを備えた、オペレータが操作を行う設備制御用操作盤であり、前記標準優先度を補正するに際して前記優先度決定部が参照する前記動作状態の少なくとも一つは、前記ディスプレイの表示状態であり、前記タッチパネルによるオペレータの入力があった時点から一定の時間が経過するまでの間は前記オペレータによる入力があったディスプレイの表示に係る前記処理要求に伴う優先度を前記標準優先度に対して高く補正するように構成されていることとした。
【0011】
請求項5記載の発明では、 前記周辺装置は、ディスプレイとタッチパネルを備えた、オペレータが操作を行う設備制御用操作盤であり、
前記標準優先度を補正するに際して前記優先度決定部が参照する前記動作状態の少なくとも一つは、前記ディスプレイの表示状態若しくは電源投入状態であり、一定時間オペレータからの入力がなかったためにスクリーンセーバーが働き若しくはディスプレイの電源がオフしている場合は、前記スクリーンセーバーが働いたディスプレイ若しくは電源がオフされたディスプレイに係る前記処理要求に伴う優先度を前記標準優先度に対して低く補正するように構成されていることとした。
また、請求項6記載の発明では、前記周辺装置は、ディスプレイとタッチパネルを備えた、オペレータが操作を行う設備制御用操作盤であり、前記標準優先度を補正するに際して前記優先度決定部が参照する前記動作状態の少なくとも一つは、前記ディスプレイの表示状態であり、他の画面の背後に表示されている画面に係る前記処理要求に伴う優先度を前記標準優先度に対して低く補正するように構成されていることとした。
【0012】
【発明の実施の形態】
以下、本発明の実施の形態について図1を参照しながら説明する。図1は本発明の実施の形態におけるリアルタイム制御装置を使用した制御システムを示すものである。10は操作盤、20は操作盤10と接続されたリアルタイム制御装置、40はリアルタイム制御装置20と接続された、モーターを制御するドライバ、41はドライバ40によって制御されるサーボモータである。
【0013】
操作盤10は、ディスプレイ11、タッチパネル12、アプリケーション実行部13、I/F14を備え、アプリケーション実行部13は優先度決定部15を内蔵する。
【0014】
アプリケーション実行部13では、リアルタイム制御装置20のモニタや操作およびメンテナンスを行うためのアプリケーションを実行する処理をおこなう。アプリケーション実行部13で実行される各アプリケーションは、リアルタイム制御装置20の状態を読み出し、若しくはリアルタイム制御装置20に対して動作指令を与え、または保存されているデータの読み出しまたは書込みを行うために、優先度決定部15にて決定した優先度を伴ったコマンド(処理要求)をI/F14を介して送信し、このコマンドに対するレスポンスを受信する。また、オペレータはタッチパネル12を介して、各アプリケーションに動作指示を与えることができる。
【0015】
各アプリケーションは発行するコマンド毎に標準優先度を記憶している。この標準優先度は該アプリケーションの画面がディスプレイ11に単独で又は最前面に表示されている状態における優先度であり、システムのリアルタイム性を確保するために、アプリケーションの設定・調整段階で予め最適に設定されている。例えば、オペレータがタッチパネル12を介して指示した内容を制御装置に伝えるためのコマンドは、モニタをするためのコマンドよりも迅速に処理を行う必要があるので、比較的高い優先度が標準優先度として設定されている。また、頻繁に値が変わるデータのモニタをするためのコマンドは、値が変わる頻度が低いデータをモニタするためのコマンドよりも迅速に処理を行う必要があるので、比較的高い優先度が標準優先度として設定されている。また、同じ内容のコマンドであっても、アプリケーションがコマンドを発行する目的によって異なる標準優先度が設定されている場合もある。
【0016】
優先度決定部15にはディスプレイ11での各アプリケーション画面の表示状態や稼動状態等を参照して前記標準優先度を補正し、リアルタイム制御装置20に引き渡す優先度を決定する優先度決定手順が記憶されている。この優先度決定手順とは、図2に例示するように一定の条件を満足する場合にその条件に応じた優先度補正値を標準優先度に加算し、優先度の値を決定するものである。なお、本実施の形態においては優先度の値が小さい方が優先度が高いとみなすので、優先度の値に正の値を加算することは優先度を低くすることを意味し、負の値を加算することは優先度を高くすることを意味する。
【0017】
リアルタイム制御装置20は割込発生部21、処理制御部22、I/F23、I/F24 、I/F25を備え、処理制御部22は処理状態管理部26と処理実行部27と処理記憶部28と待機処理格納部35から構成されている。
【0018】
割込発生部21はタイマにより一定の時間間隔で、または外部からの処理要求等のイベント発生時に割込み信号を発生させるもので、本実施の形態においてはタイマにより一定の周期で発生する割込みINTa、INTaよりも長い一定の周期で発生する割り込みINTb、操作盤10からのコマンド受信があった際に発生する割込みINTcの3種類の割り込みを処理実行指示部33に対して発生させる。
【0019】
処理記憶部28には優先度が高い順に、制御処理タスク29、他制御装置通信処理タスク30、コマンド受信処理タスク31、コマンド応答処理タスク32が記憶されている。各タスクは処理実行指示部33からの実行指示をトリガとして処理実行部27により実行される。タスクの処理実行中に他のタスクの実行指示があれば実行中のタスクの処理は中断され、実行指示があったタスクに処理が移行する。処理が中断されたタスクはその時の処理状態を待機処理格納部35に一時的に退避し、再度実行指示された際には待機処理格納部35に退避された処理状態を読み出して処理を再開する。なお、待機処理格納部35は複数のタスクの中断時の状態を格納できるよう、スタック構造を有している。また、タスク終了時またはタスク消滅時には処理状態管理部26へタスクが終了または消滅したことを通知する。
【0020】
制御処理タスク29は、あらかじめ設定された設備制御プログラムに基づき、モーター等を動作させ設備を制御するもので、最も高い優先度が付与されており、前記割込発生部21にて発生する割込み(INTa)の度に1回の処理が実行される。制御処理タスク29の1回の処理は割込み(INTa)の周期内に終了するよう、プログラムされている。制御処理タスク29の1回の処理が終了した際には処理状態管理部26へタスクの終了が通知される。
【0021】
他制御装置通信処理タスク30は、周辺の他の制御装置42との通信処理を行うもので、他の制御装置の具体例としてはプログラマブルロジックコントローラや定寸装置等が挙げられる。他制御装置通信処理タスク30は前記割込発生部21にて発生する割込み(INTb)の度に1回の処理が実行される。他制御装置通信処理タスク30の1回の処理は割込み(INTb)の周期内に終了するよう、プログラムされている。他制御装置通信処理タスク30の1回の処理が終了した際には処理状態管理部26へタスクの終了が通知される。
【0022】
コマンド受信処理タスク31は、前記割込発生部21にて発生する割込み(INTc)によって実行指示がなされるもので、その処理内容はI/F25を介して受け取ったコマンドとコマンドに付帯した優先度データを元に、前記優先度を付与したコマンド応答処理タスク32を生成するとともに、生成されたタスクの識別No.と、優先度と、処理要求を受け付けた時刻とを処理状態管理部26へ通知するものである。処理状態管理部26では、前記通知された情報を処理優先度格納部34に図3のように記憶する。
【0023】
前記生成されたコマンド応答処理タスク32は処理実行指示部33の実行指示をトリガとして処理が実行に移されると前記受信したコマンドの処理を行い、コマンドの処理が終了すればレスポンスをI/F25を介して操作盤10へ返す。上記全ての処理が終了したコマンド応答処理タスク32は消滅し、タスクの消滅が処理状態管理部26へ通知される。処理状態管理部26では消滅したタスクの情報を処理優先度格納部34から消去する。なお、コマンド受信処理タスク31はコマンドを受信した際に随時コマンド応答処理タスク32を生成するので、複数のコマンド応答処理タスク32が同時に存在することがある。
【0024】
処理実行指示部33は割込発生部21からの割込信号INTa、INTb、またはINTcを受けた場合、または処理実行部27からタスクの終了、消滅、または生成の通知を受けた場合に、処理実行部27にタスクの実行指示を出し、実行するタスクを切り替える処理を行う。
【0025】
図4は処理実行指示部33が割込発生部21からの割込信号を受けた時の処理を示すフローチャートである。S100にて、実行中のタスクがなければS105にて前記割込みに関連付けられたタスクの処理状態を「待機中」にして、一連の割込み処理を終了する。この場合、後述する図5のS205以降の処理により、前記タスクの実行指示がなされる。実行中の処理があれば、S101にて前記割込みに関連付けられたタスクの優先度と、処理優先度格納部34に記憶されている現在実行中のタスクの優先度を比較し、前者の優先度の方が高ければ、S102へ処理を移行して前記割り込み信号に関連付けられたタスクの実行指示を処理実行部27に対して行い、S103にて前記実行中であったタスクの処理状態を「待機中」にし、S104にて前記実行指示したタスクの処理状態を「実行中」にして、一連の割込み処理を終了する。
【0026】
また、S101にて後者の優先度の方が高ければ、S105にて前記割込みに関連付けられたタスクの処理状態を「待機中」にして、一連の割込み処理を終了する。
【0027】
図5は処理実行指示部33が処理実行部27からタスクの終了、消滅、または生成の通知を受けた時の処理を示すフローチャートである。S200にて処理実行部27からのタスク終了の通知を検知したらS201にて、処理優先度格納部34に記憶されている当該タスクの処理状態を「終了」に変更し、S204へ処理を移す。また、S202にて処理実行部27からのタスク消滅の通知を検知したらS203にて処理優先度格納部34に記憶されている当該タスクに関する情報を消去し、S204へ処理を移す。
【0028】
S204では処理優先度格納部34の内容を参照し、待機中のタスクがあるかを調べ、あればS205にて待機中になっているタスクの優先度の中で最も高い優先度が何であるかを調べる。S206ではS205にて調べた優先度を持つタスクが複数あるか否かを調べ、唯一であれば当該タスクの実行指示を処理実行部27に対して行い(S207)、複数あれば最先に要求されたタスクの実行指示を処理実行部27に対して行う(S208)。次にS209にて前記実行指示を行ったタスクの処理状態を「実行中」に変更し、処理をS200に戻す。
【0029】
また、S210にて処理実行部27からのタスク生成の通知を検知したらS211にて、前記生成されたタスクの優先度と、処理優先度格納部34に記憶されている現在実行中のタスクの優先度を比較し、前者の優先度の方が2段階以上高ければS212へ処理を移行して、前記生成されたタスクの実行指示を処理実行部27に対して行い、S213にて前記実行中であったタスクの処理状態を「待機中」にし、S214にて前記実行指示したタスクの処理状態を「実行中」にして、処理をS200に戻す。S211にて前者の優先度の方が2段階以上高くなければ、S215にて前記生成されたタスクの処理状態を「待機中」にして処理をS200に戻す。
【0030】
なお、S211にて優先度の差が2段階以上の場合にタスク処理を切り替える処理に分岐するようにしたのは、生成されたタスクの優先度の方が高い場合であっても優先度の差が小さければ、現在実行中のタスク処理を完了してから処理を切り替えた方がシステム全体としてのリアルタイム性が保たれる場合が多いからである。
【0031】
以上のように構成されたリアルタイム制御装置20において、その動作を図6〜10により、具体例を挙げて説明する。操作盤10のディスプレイ11には図8に示す「通常画面」、図9に示す「サーボモニタ画面」、図10に示す「プログラム編集画面」が単独で、または図7に示すようにそれぞれ重なって表示される。
【0032】
各画面は、「起動中」、「運転準備」、「NC異常」等のリアルタイム制御装置20の状態を示すランプや、「サイクルタイム」、「加工カウント」、「現在位置」等の数値情報を示す表示ボックス等から構成されており、アプリケーション実行部13で実行されるアプリケーションはこれら画面を構成する要素に表示する情報をリアルタイム制御装置20から得るために、I/F14を介して優先度決定部15で決定した優先度と共にリアルタイム制御装置20に対してコマンドを送信する。
【0033】
図8〜10の各画面を制御するアプリケーションが記憶している標準優先度は、前述のようにアプリケーションの設定・調整段階で最適に設定されている。例えば、図7に示す通常画面でタッチパネル12によりオペレータが「各個操作」を指示した際は、この指示を制御装置に伝えるための処理要求は迅速に処理される必要があるので、比較的高い優先度が標準優先度として設定されている。また、図8に示す「稼働時間」と「加工カウント」では、「稼動時間」は秒単位で更新する必要があるのに対し、「加工カウント」は数十秒に一回の割合で更新すればよいので、「稼働時間」の読み出し処理要求は「加工カウント」読み出し処理要求に比較して、より高い標準優先度が予め設定されている。
【0034】
また、同じ内容の処理要求であっても、異なる標準優先度が設定される場合がある。例えば、「現在位置」は図8及び図9に示すように、「通常画面」でも「サーボモニタ画面」でも表示されるが、「通常画面」における「現在位置」の表示は概略の位置が分かれば良く、高い頻度で更新することは要求されない。一方、「サーボモニタ画面」では現在位置をより正確にモニタする必要があるので、出来る限り高い頻度で更新することが要求される。このため、「サーボモニタ画面」から発行される「現在位置」読み出し処理要求には、「通常画面」から発行される「現在位置」読み出し処理要求よりも高い標準優先度が予め設定される。
【0035】
また、「プログラム編集画面」において、プログラムを画面に表示するために読み出す際は、オペレータの操作に支障を来たさないよう、出来る限り早く読み出す必要があるのに対して、例えばフロッピーディスクに保存するために読み出す場合は上記の場合程の読み出し速度は必要ない。このようなケースでも、両者の処理要求には予め異なる標準優先度が設定され、プログラムを画面に表示するために行うプログラム読み出し処理要求には高い標準優先度が、フロッピーディスクに保存するために行うプログラム読み出し処理要求には比較的低い標準優先度が設定されている。
【0036】
前記標準優先度は優先度決定部15の処理によって画面の表示状態や稼動状態等に応じて補正され、リアルタイム制御装置20に引き渡す優先度が決定される。具体例として図7のように「プログラム編集画面」の背後に「通常画面」と「サーボモニタ画面」が表示されている場合は、図2に例示する条件および優先度補正値に従って、「通常画面」または「サーボモニタ画面」に係るコマンドの処理要求の優先度は2段階低く補正される。また、一定時間オペレータからの入力がなかったためにスクリーンセーバーが働き、若しくはディスプレイ11の電源がオフしている場合には、操作盤10から送信される全てのコマンドの優先度が2段階または3段階低く補正される。また、タッチパネル12によるオペレータの入力があってから一定時間経過していない場合には、オペレータが操作盤10のモニタを継続している可能性が高いので、操作盤10から送信される全てのコマンドの優先度が2段階高く補正される。
【0037】
前記優先度を伴ったコマンドが操作盤10から送信されるとI/F25に受信データが一時的に蓄えられると共に、割込発生部21にその情報が伝達され、割込発生部21はINTcの割り込みを処理実行指示部33に対して発生させる。この時にコマンド受信処理タスク31よりも優先度の高い制御処理タスク29または他制御装置通信処理タスク30が共に実行中でなければ、直ちに処理実行指示部33からコマンド受信処理タスク31の実行指示が発行されるが、制御処理タスク29、他制御装置通信処理タスク30の一方または両方が実行中である場合は、これら両タスクの処理が終了してから前記起動指令が発行される。(図6参照)
【0038】
コマンド受信処理タスク31が起動されると、I/F25に蓄えられた受信データを読み込んで内容をチェックし、異常がなければそのコマンドを処理するコマンド応答処理タスク32を生成し、生成されたタスクの識別No.と、優先度と、処理要求を受け付けた時刻とを処理状態管理部26に通知し、コマンドデータを前記生成されたタスクに引き渡し、コマンド受信処理タスク処理を終了する。
【0039】
前記生成されたコマンド応答処理タスク32は、処理実行部27で実行中のタスクよりも優先度が2段階以上高ければ直ちに処理が実行に移されるが、これ以外の場合は前記実行中のタスクの終了または消滅時以降に処理が実行に移される。コマンド応答処理タスク32が実行に移されると処理実行部27は該タスクに引き渡されたコマンドの処理を行い、コマンド処理が終了したらレスポンスをI/F25を介して操作盤10へ送信する。レスポンスの送信処理が終了したらコマンド応答処理タスク32を消滅する処理を行う。 この消滅は処理状態管理部26へ通知され、処理状態管理部26では消滅したタスクの情報を処理優先度格納部34から消去する。
【0040】
上記レスポンスを受けた操作盤10では、I/F14を介してアプリケーション実行部13がレスポンスデータを受け取り、レスポンスデータの内容を画面表示内容に反映する等の処理を行う。以上により、一連のコマンド処理が完了する。
【0041】
なお、本実施の形態においては図5のS211において、生成されたタスクの優先度と実行中のタスクの優先度とを比較して、この優先度の差が2段階以上の場合にタスク処理を切り替えるようにしたが、このタスク切り替え可否の判断基準はシステム毎に最適に設定されるべきなのは云うまでもない。例えば実行中のタスクの優先度または生成されたタスクの優先度に係数を乗算または除算した値の比較により処理タスクを切り替えるようにしてもよい。また、実行中のタスクの優先度または生成されたタスクの優先度が一定の値以上または以下であれば、処理タスクを切り替える基準を変更するようにしてもよい。また、単純なシステムにおいては単に優先度の大小比較によって処理タスクを切り替えるか否かの判断をしてもよい。
【0042】
また、本実施の形態においては、各アプリケーションに最適化された標準優先度が設定され、これを優先度決定部15の処理によって画面の表示状態や稼動状態等に応じて補正する構成をとったが、各アプリケーションは標準優先度を持たず、優先度決定部15においてコマンドの種類(データ読出し・書込み、プログラム読出し・書込み、またはスキャン停止・開始などのコマンドの目的毎に分類したもの)やコマンド発行の頻度、画面の表示状態等の周辺装置の動作状態からリアルタイム制御装置20に引き渡す優先度を決定するようにしてもよい。また、処理を簡単にするため周辺装置の動作状態のみによってリアルタイム制御装置20に引き渡す優先度を決定するようにしてもよい。
【0043】
【発明の効果】
以上述べたように請求項1記載の発明によれば、周辺装置からの処理要求が優先度を伴い、制御装置において優先度の高い処理要求が優先的に実行に移されるので、高速処理が要求される処理要求が、高速処理を要求されない処理要求の存在によって、長く待たされるのを防ぐことができ、システムのリアルタイム性が向上する。
また、処理制御部が処理要求の実行中に新たな処理要求を受けた際、前記実行中の処理要求と前記新たな処理要求の優先度を比較し、後者の優先度の方が予め設定された基準以上に高ければ前者の処理を一時中断して後者の処理を先に実行し、これに該当しない場合は前者の処理終了後に後者の処理を実行するので、さらにシステムのリアルタイム性が向上する。
【0044】
また、請求項2記載の発明によれば請求項1の効果に加え、処理要求毎に設定された標準優先度に対し、周辺装置の動作状態を参照して前記標準優先度を補正し、前記補正された優先度に基づいて処理が実行されることで、さらに好適な制御を行うことができる。
【0045】
また、請求項3記載の発明によれば、前記制御装置はさらに、イベントにより、または一定の周期で発生する割込みを処理制御部に対して発生させる割込発生部を有し、前記処理制御部はさらに前記割込み発生時に実行される割込み処理を記憶し、前記割込発生部からの割込みが発生した際に前記割込み処理を実行するので、不定期に発生する処理要求の実行と並行して、設備を制御するために必要な処理などを一定の周期または必要時に実行することができる。
【0046】
また、請求項4から6記載の発明によれば、前記周辺装置はディスプレイとタッチパネルを備えたオペレータが操作を行う設備制御用操作盤であり、前記標準優先度を補正するに際して前記優先度決定部は前記動作状態として、前記ディスプレイの表示状態若しくは電源投入状態を参照し、前記タッチパネルによるオペレータの入力があった時点から一定の時間が経過するまでの間は前記処理要求に伴う優先度が通常時よりも高く補正されるので、また、一定時間オペレータからの入力がなかったためにスクリーンセーバーが働き若しくはディスプレイの電源がオフしている場合は、前記スクリーンセーバーが働いたディスプレイ若しくは電源がオフされたディスプレイに係る前記処理要求に伴う優先度が前記標準優先度に対して低く補正されるので、あるいは、他の画面の背後に表示されている画面に係る前記処理要求に伴う優先度が前記標準優先度に対して低く補正されるので、オペレータが操作をしている画面表示の優先度が高くなり、逆にオペレータが操作をしていない画面表示の優先度が低くなって、操作盤の画面表示のリアルタイム性が向上する。
【図面の簡単な説明】
【図1】本発明の実施の形態におけるリアルタイム制御システムの制御装置および周辺装置のブロック図。
【図2】本発明の実施の形態における優先度補正条件および優先度補正値テーブルの一例。
【図3】本発明の実施の形態における処理優先度格納部の内容の一例。
【図4】本発明の実施の形態における処理切替指示の手順を示すフローチャート。
【図5】本発明の実施の形態における処理切替指示の手順を示すフローチャート。
【図6】本発明の実施の形態におけるリアルタイム制御システムのタスク処理のタイミングチャート。
【図7】本発明の実施の形態における操作盤ディスプレイの画面表示例。
【図8】本発明の実施の形態における操作盤ディスプレイの1つの画面の例。
【図9】本発明の実施の形態における操作盤ディスプレイの1つの画面の例。
【図10】本発明の実施の形態における操作盤ディスプレイの1つの画面の例。
【符号の説明】
10・・・操作盤(周辺装置)
11・・・ディスプレイ
12・・・タッチパネル
13・・・アプリケーション実行部
15・・・優先度決定部
20・・・リアルタイム制御装置
21・・・割込発生部
22・・・処理制御部
26・・・処理状態管理部
27・・・処理実行部
28・・・処理記憶部
29・・・処理制御タスク
30・・・他制御装置通信処理タスク
31・・・コマンド受信処理タスク
32・・・コマンド応答処理タスク
33・・・処理実行指示部
34・・・処理優先度格納部
35・・・待機処理格納部
40・・・ドライバ
41・・・サーボモータ
42・・・他の制御装置[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a control system including a control device that controls the operation of equipment and a peripheral device that makes a processing request to the control device.
[0002]
[Prior art]
In control systems for controlling machine equipment in recent years, an operation panel that combines a transparent touch panel and a display with a man-machine interface for the operator to operate and monitor the control equipment for the purpose of improving operability and maintainability. Is often used. An example of this is shown in JP-A-1-245335. In addition, due to sophistication of microcomputer technology, a plurality of applications tend to operate at high speed in parallel on an operation panel used for a man-machine interface.
[0003]
Such an operation panel generally transmits a command to the control device via a communication line, and exchanges a response with the control device in response to the command. In addition, the command for the control device may be issued not only from the operation panel but also from a plurality of request sources such as a host computer and a bar code reader for monitoring the entire production line. May be provided. Therefore, the control device accepts commands asynchronously from a plurality of peripheral devices and a plurality of applications.
[0004]
Conventionally, the control device temporarily stores the received command in a stack memory in the control device, processes the command in the order received, and returns a response.
[0005]
[Problems to be solved by the invention]
However, in the above method, the commands are processed and returned in the order received by the control device regardless of the command request source and contents, so high-speed processing is required due to the presence of commands that do not require high-speed processing. There was a problem that processing of a complicated command was postponed.
[0006]
Japanese Patent Laid-Open No. 9-223025 is available to improve this problem. However, even if this method is used, the priority for each command type is stored and fixed in advance, so that the situation changes from moment to moment. With changing equipment control, commands could not be processed with the optimal priority at that time.
[0007]
[Means for Solving the Problems]
In order to solve the above problems, the invention of
[0008]
In invention of
[0009]
In invention of
The processing request is executed as the interrupt processing.It was decided.
[0010]
According to a fourth aspect of the present invention, the peripheral device is,Equipped with display and touch panelTheAn equipment control operation panel operated by an operator.When correcting the standard priorityThe priority determination unitAt least one of the operation states to be referred to is a display state of the display;Until a certain period of time elapses from when the operator input is made using the touch panelIt relates to the display on the display that was input by the operatorThe priority associated with the processing requestFor the standard priorityhighcorrectionIs configured toIt was decided.
[0011]
In invention of
At least one of the operation states referred to by the priority determination unit when correcting the standard priority is a display state of the display or a power-on state, and the screen saver works because there is no input from the operator for a certain period of time. Alternatively, when the power of the display is turned off, the priority associated with the processing request related to the display on which the screen saver is operated or the display turned off is corrected to be lower than the standard priority. HaveIt was decided.
In the invention according to
[0012]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment of the present invention will be described with reference to FIG. FIG. 1 shows a control system using a real-time control apparatus according to an embodiment of the present invention.
[0013]
The
[0014]
The
[0015]
Each application stores a standard priority for each command issued. This standard priority is a priority in a state in which the screen of the application is displayed on the
[0016]
The
[0017]
The real-
[0018]
The interrupt
[0019]
The
[0020]
The
[0021]
The other control device
[0022]
The command
[0023]
The generated command
[0024]
When the process
[0025]
FIG. 4 is a flowchart showing a process when the process
[0026]
If the latter priority is higher in S101, the processing state of the task associated with the interrupt is set to “waiting” in S105, and the series of interrupt processing ends.
[0027]
FIG. 5 is a flowchart showing a process when the process
[0028]
In S204, the contents of the processing
[0029]
If a task generation notification from the
[0030]
In S211, when the priority difference is two or more steps, the process branches to the process of switching the task process even if the priority of the generated task is higher. This is because the real-time property of the entire system is often maintained by switching the processing after completing the currently executing task processing.
[0031]
The operation of the real-
[0032]
Each screen displays lamps that indicate the status of the real-
[0033]
The standard priority stored by the application that controls each screen of FIGS. 8 to 10 is optimally set at the application setting / adjustment stage as described above. For example, when the operator instructs “each operation” on the
[0034]
Also, different standard priorities may be set even for processing requests having the same content. For example, as shown in FIGS. 8 and 9, the “current position” is displayed on both the “normal screen” and the “servo monitor screen”, but the display of “current position” on the “normal screen” is roughly divided. What is necessary is not required to update frequently. On the other hand, since it is necessary to monitor the current position more accurately on the “servo monitor screen”, it is required to update it as frequently as possible. Therefore, a higher standard priority than the “current position” read processing request issued from the “normal screen” is set in advance in the “current position” read processing request issued from the “servo monitor screen”.
[0035]
In addition, when reading a program to display it on the “program edit screen”, it is necessary to read it as soon as possible so as not to hinder the operation of the operator. Therefore, the reading speed is not as high as that in the above case. Even in such a case, different standard priorities are set in advance for both processing requests, and a high standard priority is given to the program read processing request for displaying the program on the screen in order to save it on the floppy disk. A relatively low standard priority is set for the program read processing request.
[0036]
The standard priority is corrected by the processing of the
[0037]
When the command with the priority is transmitted from the
[0038]
When the command
[0039]
The generated command
[0040]
In the
[0041]
In this embodiment, in S211 of FIG. 5, the priority of the generated task is compared with the priority of the task being executed, and task processing is performed when the difference in priority is two or more. Needless to say, the criteria for determining whether to switch tasks should be set optimally for each system. For example, processing tasks may be switched by comparing values obtained by multiplying or dividing a priority of a task being executed or a priority of a generated task by a coefficient. Further, if the priority of the task being executed or the priority of the generated task is greater than or equal to a certain value, the criterion for switching the processing task may be changed. In a simple system, it may be determined whether or not to switch processing tasks by simply comparing the priority levels.
[0042]
Further, in the present embodiment, a standard priority optimized for each application is set, and this is corrected by the processing of the
[0043]
【The invention's effect】
As described above, according to the first aspect of the invention, the processing request from the peripheral deviceIs excellentWith the advancement, high-priority processing requests are preferentially executed in the control device, so that processing requests that require high-speed processing can wait for a long time due to the presence of processing requests that do not require high-speed processing. This can prevent the real-time performance of the system.
Further, when the processing control unit receives a new processing request during execution of the processing request, the priority of the processing request being executed and the priority of the new processing request is compared, and the latter priority is set in advance. If it is higher than the above criteria, the former process is temporarily suspended and the latter process is executed first. If not, the latter process is executed after the former process is completed. .
[0044]
According to the invention of
[0045]
According to the invention of
[0046]
Moreover, according to invention of Claim 4-6,The peripheral device is a facility control operation panel operated by an operator having a display and a touch panel, and when the standard priority is corrected, the priority determination unit sets the display state or power-on as the operation state. Since the priority associated with the processing request is corrected to be higher than the normal time until a certain time elapses after the operator inputs from the touch panel with reference to the status, If the screen saver is activated or the power of the display is turned off because there is no input, the priority associated with the processing request relating to the display on which the screen saver is activated or the display with the power turned off is higher than the standard priority. Displayed on the back of other screens. Since the priority associated with the processing request relating to the displayed screen is corrected to be lower than the standard priority, the priority of the screen display on which the operator is operating becomes higher, and conversely, the operator performs the operation. The priority of the screen display that is not displayed is lowered, and the real-time display of the operation panel screen is improved.
[Brief description of the drawings]
FIG. 1 is a block diagram of a control device and peripheral devices of a real-time control system in an embodiment of the present invention.
FIG. 2 shows an example of a priority correction condition and a priority correction value table in the embodiment of the present invention.
FIG. 3 shows an example of the contents of a processing priority storage unit in the embodiment of the present invention.
FIG. 4 is a flowchart showing a procedure for a process switching instruction according to the embodiment of the present invention.
FIG. 5 is a flowchart showing a procedure for a process switching instruction according to the embodiment of the present invention.
FIG. 6 is a timing chart of task processing of the real-time control system in the embodiment of the present invention.
FIG. 7 is a screen display example of an operation panel display in the embodiment of the present invention.
FIG. 8 shows an example of one screen of the operation panel display according to the embodiment of the present invention.
FIG. 9 shows an example of one screen of the operation panel display according to the embodiment of the present invention.
FIG. 10 shows an example of one screen of the operation panel display according to the embodiment of the present invention.
[Explanation of symbols]
10 ... Control panel (peripheral device)
11 ... Display
12 ... Touch panel
13: Application execution unit
15 ... Priority determining unit
20 ... Real-time control device
21 ... Interrupt generation part
22 ... Processing control unit
26 ... Processing state management unit
27 ... Processing execution unit
28 ... Processing storage unit
29 ... Processing control task
30 ... Other control device communication processing task
31 ... Command reception processing task
32 ... Command response processing task
33 ... Process execution instruction section
34: Processing priority storage unit
35 ... Standby processing storage
40 ... Driver
41 ... Servo motor
42. Other control device
Claims (6)
前記処理制御部は、前記処理要求による処理の実行中に新たな処理要求を受けた際、前記実行中の処理要求と前記新たな処理要求との優先度を比較し、前記新たな処理要求の優先度が前記実行中の処理要求の優先度より予め設定された基準以上に高ければ、前記実行中の処理要求による処理を一時中断し待機させて前記新たな処理要求による処理を実行し、前記新たな処理要求の優先度が前記実行中の処理要求の優先度より高い場合であっても前記基準以上に高くなければ、前記新たな処理要求を待機させ、前記実行中の処理要求による処理の終了後に、待機中の前記処理要求による処理を優先度の高いものから順に実行するように構成されていることを特徴とするリアルタイム制御システム。A control device that controls the operation of the facility and a peripheral device that makes a processing request to the control device, and the peripheral device has a priority determination unit that determines the priority of the processing request. In addition to making a processing request with the priority determined by the priority determination unit, the control device has a processing control unit that executes processing according to the processing request based on the priority,
When the process control unit receives a new process request during execution of the process according to the process request, the process control unit compares priorities of the process request being executed and the new process request, and determines the new process request. If the priority is higher than a preset criterion than the priority of the processing request being executed, the processing by the processing request being executed is temporarily suspended and the processing by the new processing request is executed, Even if the priority of the new processing request is higher than the priority of the processing request being executed, if the priority is not higher than the reference, the new processing request is waited and the processing by the processing request being executed is After completion, the real-time control system is configured to execute processing according to the waiting processing request in descending order of priority.
前記処理要求には予め処理要求毎に標準優先度が設定されており、
前記優先度決定部は前記周辺装置の動作状態を参照して前記標準優先度を補正し、
前記周辺装置は補正された優先度を伴って前記制御装置に対して処理要求を行い、
前記処理制御部は前記補正された優先度に基づいて前記処理要求による処理を実行する
ことを特徴とするリアルタイム制御システム。 The real-time control system according to claim 1,
Is set with standard priority advance processing requests each in the processing request,
The priority determination unit corrects the standard priority with reference to an operation state of the peripheral device;
The peripheral device makes a processing request to the control device with the corrected priority,
The processing control unit is the corrected characteristics and be Brighter real-time control system that <br/> executing the processing by the processing request based on the priority.
前記制御装置は、前記処理制御部に対してイベントによりまたは一定の周期で割込みを発生させる割込発生部をさらに有し、前記処理制御部は前記割込み発生時の実行される割込み処理を記憶し、前記割込発生部からの割込みが発生した際に前記割込み処理を実行するように構成されており、
前記処理要求は前記割り込み処理として実行されることを特徴とするリアルタイム制御システム。 The real-time control system according to claim 1 or 2,
The control device, the process by Lima other event to the control unit further comprises an interrupt generator for Generating an interrupt at a predetermined period, the processing control section executes at the time of pre-Symbol interrupt occurs Is configured to store the interrupt process to be executed, and to execute the interrupt process when an interrupt from the interrupt generation unit occurs ,
The real-time control system according to claim 1, wherein the processing request is executed as the interrupt processing .
前記周辺装置は、ディスプレイとタッチパネルを備えた、オペレータが操作を行う設備制御用操作盤であり、
前記標準優先度を補正するに際して前記優先度決定部が参照する前記動作状態の少なくとも一つは、前記ディスプレイの表示状態であり、前記タッチパネルによるオペレータの入力があった時点から一定の時間が経過するまでの間は前記オペレータによる入力があったディスプレイの表示に係る前記処理要求に伴う優先度を前記標準優先度に対して高く補正するように構成されていることを特徴とするリアルタイム制御システム。 The real-time control system according to claim 2 or 3,
The peripheral device, including a display and a touch panel, Ri operator equipment control operation panel der to perform an operation,
At least one of the operation states referred to by the priority determination unit when correcting the standard priority is a display state of the display, and a certain time elapses from the time when an operator inputs from the touch panel. configured features and to Brighter real-time control that is as between the higher corrects the priority associated with the processing request related to the display of the display there is an input by the operator with respect to the standard priority to system.
前記周辺装置は、ディスプレイとタッチパネルを備えた、オペレータが操作を行う設備制御用操作盤であり、 The peripheral device is an operation panel for equipment control that is operated by an operator, provided with a display and a touch panel,
前記標準優先度を補正するに際して前記優先度決定部が参照する前記動作状態の少なくとも一つは、前記ディスプレイの表示状態若しくは電源投入状態であり、一定時間オペレータからの入力がなかったためにスクリーンセーバーが働き若しくはディスプレイの電源がオフしている場合は、前記スクリーンセーバーが働いたディスプレイ若しくは電源がオフされたディスプレイに係る前記処理要求に伴う優先度を前記標準優先度に対して低く補正するように構成されていることを特徴とするリアルタイム制御システム。 At least one of the operation states referred to by the priority determination unit when correcting the standard priority is a display state of the display or a power-on state, and a screen saver is activated because there is no input from an operator for a certain period of time. Alternatively, when the power of the display is turned off, the priority associated with the processing request related to the display on which the screen saver is operated or the display turned off is corrected to be lower than the standard priority. Real-time control system characterized by
前記周辺装置は、ディスプレイとタッチパネルを備えた、オペレータが操作を行う設備制御用操作盤であり、 The peripheral device is an operation panel for equipment control that is operated by an operator, provided with a display and a touch panel,
前記標準優先度を補正するに際して前記優先度決定部が参照する前記動作状態の少なくとも一つは、前記ディスプレイの表示状態であり、他の画面の背後に表示されている画面に係る前記処理要求に伴う優先度を前記標準優先度に対して低く補正するように構成されていることを特徴とするリアルタイム制御システム。 At least one of the operation states referred to by the priority determination unit when correcting the standard priority is a display state of the display, and the processing request relating to a screen displayed behind another screen is satisfied. A real-time control system configured to correct the accompanying priority lower than the standard priority.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001121497A JP4122725B2 (en) | 2001-04-19 | 2001-04-19 | Real-time control system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001121497A JP4122725B2 (en) | 2001-04-19 | 2001-04-19 | Real-time control system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2002318780A JP2002318780A (en) | 2002-10-31 |
| JP4122725B2 true JP4122725B2 (en) | 2008-07-23 |
Family
ID=18971356
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2001121497A Expired - Fee Related JP4122725B2 (en) | 2001-04-19 | 2001-04-19 | Real-time control system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4122725B2 (en) |
Families Citing this family (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4675891B2 (en) * | 2003-12-26 | 2011-04-27 | パナソニック株式会社 | Task scheduling apparatus, task scheduling method, task scheduling program, recording medium, and transmission medium |
| US20050283554A1 (en) * | 2004-06-22 | 2005-12-22 | General Electric Company | Computer system and method for queuing interrupt messages in a device coupled to a parallel communication bus |
| KR100959548B1 (en) * | 2008-05-21 | 2010-05-27 | 한국과학기술원 | Interrupt Scheduling Method |
| JP5144407B2 (en) * | 2008-07-07 | 2013-02-13 | 株式会社オートネットワーク技術研究所 | Signal processing apparatus, signal processing method, and relay apparatus |
| JP2010160713A (en) * | 2009-01-09 | 2010-07-22 | Yokogawa Electric Corp | Field control apparatus and field control method |
| JP2010205046A (en) * | 2009-03-04 | 2010-09-16 | Toyota Motor Corp | Information processing apparatus |
| JP5606808B2 (en) * | 2010-06-18 | 2014-10-15 | 株式会社キーエンス | Code reader |
| JP5831794B2 (en) * | 2011-09-06 | 2015-12-09 | 株式会社デンソー | Electronic control device and control method thereof |
| JP2020154530A (en) * | 2019-03-19 | 2020-09-24 | Necソリューションイノベータ株式会社 | Resource management device, user device side resource management device, resource management method, user device side resource management method, program, and storage medium |
| JP7464386B2 (en) * | 2019-12-20 | 2024-04-09 | ファナック株式会社 | Control device and control method |
| CN117480457A (en) * | 2021-06-18 | 2024-01-30 | 发那科株式会社 | Control device and control method |
-
2001
- 2001-04-19 JP JP2001121497A patent/JP4122725B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2002318780A (en) | 2002-10-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP1282030A1 (en) | Computer system and computer-readable recording medium | |
| JP4122725B2 (en) | Real-time control system | |
| EP0658843A1 (en) | Method for hibernation file creation | |
| JPH11259189A (en) | Power supply control device for peripheral equipment | |
| US7168075B1 (en) | Automation device and updating method | |
| WO1998037467A1 (en) | Personal computer-incorporated numerical control apparatus, and image transfer method for personal computer-incorporated numerical control apparatuses | |
| US20030225898A1 (en) | Method of controlling storage control apparatus, storage control apparatus, and computer readable program for controlling the same | |
| JPH07160370A (en) | Blackout management device | |
| JP2010102567A (en) | Periodical task execution device, periodical task execution method, and program | |
| JP2006338217A (en) | Active firmware exchange device | |
| JP2003022109A (en) | Numerical control unit | |
| KR20070112660A (en) | Power management device and method | |
| CN115104071B (en) | Method for replacing storage device in human-computer interface system | |
| JPWO2020079720A1 (en) | Programmable logic controllers, external devices, methods, and programs | |
| JPH05274016A (en) | Scheduled operation system for nc processing machine | |
| JP3362673B2 (en) | Channel control device | |
| JPH11212904A (en) | Data transfer system | |
| JPH06274239A (en) | Method for controlling computer system | |
| JP2880658B2 (en) | Runaway detection device for multitask program | |
| JP3054472B2 (en) | Fault handling method in multitask system | |
| JP2003308102A (en) | State machine control method and state machine | |
| JP2568784B2 (en) | Man-machine interface processing method for equipment management system | |
| JP2020042517A (en) | Numerical control device | |
| JPH103384A (en) | Information processing system | |
| JPH0926857A (en) | Disk write guarantee method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20060228 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20060615 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060718 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060915 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070424 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070614 |
|
| 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: 20080408 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080421 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 4122725 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110516 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110516 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120516 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120516 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130516 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140516 Year of fee payment: 6 |
|
| LAPS | Cancellation because of no payment of annual fees |