JP2021082027A - Safety controller - Google Patents
Safety controller Download PDFInfo
- Publication number
- JP2021082027A JP2021082027A JP2019209182A JP2019209182A JP2021082027A JP 2021082027 A JP2021082027 A JP 2021082027A JP 2019209182 A JP2019209182 A JP 2019209182A JP 2019209182 A JP2019209182 A JP 2019209182A JP 2021082027 A JP2021082027 A JP 2021082027A
- Authority
- JP
- Japan
- Prior art keywords
- safety
- output
- input
- main module
- period slot
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Abstract
Description
本発明は安全コントローラに関する。 The present invention relates to a safety controller.
製品(ワーク)を生産する製品工場においては多数の機械が稼働している。安全システムは、機械から人間の安全を確保するために欠かせないシステムである(特許文献1)。 Many machines are in operation at product factories that produce products (work). The safety system is an indispensable system for ensuring human safety from machines (Patent Document 1).
安全システムは安全であればON信号を出力し、安全でない可能性があればOFF信号を出力する。ここで、危険源となる機械が安全柵で囲まれており、機械に人間が近づくには安全柵に設けられた安全ドアなどを開けなければならないケースを一例としてあげる。安全システムはドアスイッチにより安全ドアが開いたことを検知すると、機械にOFF信号を出力することで、機械を停止させる。ここで、安全ドアが開いてドアスイッチがOFFになってから、機械が停止するまでの時間は応答時間と呼ばれる。この応答時間に基づいて、機械から安全ドアまでの距離(安全距離)が決定される。つまり、応答時間に応じて安全柵のサイズが決定される。 The safety system outputs an ON signal if it is safe, and outputs an OFF signal if it is not safe. Here, as an example, a machine that is a source of danger is surrounded by a safety fence, and a safety door or the like provided on the safety fence must be opened in order for a human to approach the machine. When the safety system detects that the safety door has been opened by the door switch, it outputs an OFF signal to the machine to stop the machine. Here, the time from when the safety door is opened and the door switch is turned off until the machine is stopped is called a response time. Based on this response time, the distance from the machine to the safety door (safety distance) is determined. That is, the size of the safety fence is determined according to the response time.
安全システムの安全コントローラは、ユーザによって設定される安全プログラムをスキャンサイクルで繰り返し実行する実行エンジンを有し、一または複数の安全入力機器からの安全入力信号を、安全プログラムにしたがって安全出力信号(ON信号やOFF信号)を生成し、出力する制御装置である。スキャンサイクルは、安全入力信号を取り込むタイミングである入力リフレッシュ期間と、入力リフレッシュ期間に取り込まれた安全入力信号の入力値と安全プログラムにしたがって出力値を算出するプログラム実行期間と、プログラム実行期間に算出された出力値に従って各出力端子から安全出力信号を出力する出力リフレッシュ期間とを有するもので、安全コントローラの応答時間に影響を与える要素の一つである。一般に、安全コントローラにおいてスキャンサイクルが短いほど性能が高いとされており、その結果、一般に、安全コントローラの応答時間は、安全プログラムの処理容量やユニット接続台数に起因して変わるものとなっている。 The safety controller of the safety system has an execution engine that repeatedly executes a safety program set by the user in a scan cycle, and outputs safety input signals from one or more safety input devices according to the safety program (ON). It is a control device that generates and outputs a signal (signal or OFF signal). The scan cycle is calculated in the input refresh period, which is the timing to capture the safety input signal, the program execution period in which the input value of the safety input signal captured in the input refresh period and the output value are calculated according to the safety program, and the program execution period. It has an output refresh period for outputting a safety output signal from each output terminal according to the output value, and is one of the factors that affect the response time of the safety controller. Generally, it is said that the shorter the scan cycle of the safety controller, the higher the performance. As a result, the response time of the safety controller generally changes depending on the processing capacity of the safety program and the number of connected units.
しかしながら、工程の変更やアセスメントの結果、安全入力機器やユニットを増設したり、安全プログラムを増加したりしたすることで、応答時間が増加して、安全距離が延びることから、安全入力装置の設置位置の見直しや、安全柵の設置位置の見直しが必要となるおそれがあった。 However, as a result of process changes and assessments, additional safety input devices and units and increased safety programs will increase response time and extend the safety distance. There was a risk that it would be necessary to review the position and the installation position of the safety fence.
そこで、本発明は、応答時間が高速かつ一定な安全コントローラを提供することを目的とする。 Therefore, an object of the present invention is to provide a safety controller having a fast response time and a constant response time.
本発明は、たとえば、
安全プログラムを実行するメインモジュールと、当該メインモジュールに接続された拡張モジュールとを有した安全コントローラであって、
前記メインモジュールは、
一定の長さの繰り返し周期である期間スロットごとに、前記拡張モジュールから入力値を受信する受信手段と、
前記期間スロットごとに、前記安全プログラムを繰り返し実行する実行エンジンであって、前記入力値が受信されたi番目の期間スロットの次のi+1番目の期間スロットにおいて、当該入力値を用いて前記安全プログラムに従って出力値を演算する実行エンジンと、
前記出力値に対応する安全出力信号を安全出力機器に出力する出力手段と、
前記受信手段および前記実行エンジンを監視する監視手段と、を有し、
前記監視手段は、前記i番目の期間スロットにおいて前記受信手段による前記入力値の受信が完了しなかった場合、または、前記i+1番目の期間スロットにおいて前記実行エンジンによる前記出力値の演算が完了しなかった場合に、前記安全出力機器の動作が停止する前記安全出力信号を強制的に設定することを特徴とする安全コントローラを提供する。
The present invention is, for example,
A safety controller having a main module that executes a safety program and an expansion module connected to the main module.
The main module
A receiving means for receiving an input value from the expansion module and a receiving means for receiving an input value from the expansion module for each period slot having a repeating cycle of a fixed length.
An execution engine that repeatedly executes the safety program for each period slot, and uses the input value in the i + 1th period slot next to the i-th period slot in which the input value is received. An execution engine that calculates the output value according to
An output means for outputting a safety output signal corresponding to the output value to a safety output device, and
It has the receiving means and the monitoring means for monitoring the execution engine.
The monitoring means does not complete the reception of the input value by the receiving means in the i-th period slot, or the calculation of the output value by the execution engine in the i + 1th period slot. Provided is a safety controller characterized in that the safety output signal for which the operation of the safety output device is stopped is forcibly set in such a case.
本発明によれば、入力値を受信するための期間と、安全プログラムを実行する期間とを順次並列に実行する期間スロットを設け、応答時間を高速かつ一定とすることが可能となる。 According to the present invention, it is possible to provide a period slot for sequentially executing a period for receiving an input value and a period for executing a safety program in parallel, so that the response time can be made high speed and constant.
以下、添付図面を参照して実施形態が詳しく説明される。尚、以下の実施形態は特許請求の範囲に係る発明を限定するものではなく、また実施形態で説明されている特徴の組み合わせの全てが発明に必須のものとは限らない。実施形態で説明されている複数の特徴のうち二つ以上の特徴が任意に組み合わされてもよい。また、同一または同様の構成には同一の参照番号が付され、重複した説明は省略される。 Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. The following embodiments do not limit the invention according to the claims, and not all combinations of features described in the embodiments are essential to the invention. Two or more of the plurality of features described in the embodiments may be arbitrarily combined. In addition, the same or similar configurations are given the same reference number, and duplicate explanations are omitted.
(安全コントローラ)
図1はシステムの全体を示している。この例で、安全コントローラ1は、メインモジュール3、拡張モジュール4a、4bを有している。メインモジュール3は、ユーザが安全プログラムを作成することを支援する作成支援装置として機能するPC2から転送されてきた安全プログラムを実行する。メインモジュール3は、表示装置5a、操作部6a、通信コネクタ7a、IOコネクタ10aなどを有している。PC2は、表示装置5b、および操作部6bを有している。作成支援装置として機能するPC2は、ユーザ入力に従って、安全プログラムに加え、各モジュール同士の接続関係を示すモジュール構成情報や各モジュールの各端子に接続される機器の割当情報を設定し、メインモジュール3にモジュール構成情報や機器の割当情報設定情報として送信する。メインモジュール3に通信コネクタ7aは、USBや有線LANのためのコネクタであってもよい。PC2からの通信ケーブルは通信コネクタ7aに接続されている。有線LANは産業用のイーサネット(登録商標)であってもよい。LANはローカルエリアネットワークの略称である。IOコネクタ10aの入力端子には、緊急停止スイッチなどの安全入力機器11aやライトカーテンなどの安全入力機器11bが接続される。安全入力機器11a、11bは、たとえば、危険源となる機械を囲むように設置された安全柵の出入り口に設置される。このとき、安全入力機器11bが、不意に安全柵内に侵入しようとする人間を検知すると、安全コントローラ1は、機械を停止させるためにOFF信号を機械に出力する。IOコネクタ10aの出力端子には、ロボットアームなどの機械の動力源を遮断するための制御信号が入力される。動力源の遮断は、一般的にはコンタクタと呼ばれる電力遮断装置が用いられる。メインモジュール3などの安全コントローラがコンタクタに対して制御信号を出力することで、機械に電力を供給するか、遮断するかを制御する。メインモジュール3は、安全入力機器11aから入力される入力値に対して安全プログラムにしたがった演算処理を実行して出力値を求め動力源12は出力する。たとえば、安全入力機器11aの一種である緊急停止スイッチが押し下げられると、メインモジュール3は、出力値をON(動力源が稼働できる稼働状能)からOFF(動力源が稼働できない停止状態)に変更する。これにより、動力源12が停止する。なお、本明細書についてOFFとは、危険源を停止させるか、または、危険源の危険性を低減させる(例:ロボットの動作速度を遅くするなど)ことなどにより、危険源を安全状態にすることを意味し、OFF信号は、OFFを示す信号を意味する。メインモジュール3に設けられたIOコネクタ10aだけではすべての安全入力機器および動力源を接続できない場合がる。このような場合には、拡張モジュール4a、4bがメインモジュール3に接続される。拡張モジュール4a、4bはそれぞれIOコネクタ10b、10cを有しており、安全入力機器11bおよび動力源12などを接続できる。拡張モジュール4a、4bとメインモジュール3は内部バスを介して相互に通信することで、入力信号(入力値)および出力信号(出力値)を受け渡す。つまり、メインモジュール3は、自己に接続された安全入力機器11aおよび拡張モジュール4a、4bに接続された安全入力機器11aから取得した入力信号(入力値)に安全プログラムを適用することで出力信号(出力値)を生成する。さらに、メインモジュール3は、安全プログラムに従って生成した出力信号を、自己に接続された動力源12に出力したり、拡張モジュール4a、4bに接続された動力源12に出力したりする。リモートI/Oユニット8は、リモートバスを介してメインモジュール3と接続されている。リモートI/Oユニット8はメインモジュール3と相互に通信することで、リモートI/Oユニット8に接続された安全入力機器11dの入力信号をメインモジュール3に送信したり、リモートI/Oユニット8に接続された動力源12に信号を出力したりする。
(Safety controller)
FIG. 1 shows the entire system. In this example, the safety controller 1 has a
(メインモジュールと拡張モジュールのハードウエア)
図2が示すように、メインモジュール3のコントローラ20aは二つのMCU23a、24aおよびメモリ25aを有している。信頼性を高めるためにMCU(マイクロコントローラユニット)は二重化されている。MCU23a、24aはそれぞれメモリ25aに保持されている同じ内容の安全プログラムを実行する。MCU23a、24aは安全入力IF21aを介して、安全入力機器11の二重化された入力信号、および/または、バスIF26aを介して拡張モジュール4から送信された入力信号(入力値)と、安全プログラムとに基づき、それぞれ出力信号を生成して安全出力IF22a、および/または、拡張モジュール4に出力する。たとえば、MCU23a、24aがともにON信号を出力していれば、安全出力IF22aは安全出力信号に割り当てられた2つの端子から、二重化された出力信号としてそれぞれON信号を出力する。また、MCU23a、24aがともにOFF信号を出力していれば、安全出力信号に割り当てられた2つの端子から、二重化された出力信号としてそれぞれOFF信号を出力する。一方、MCU23a、24aの一方がON信号を出力し他方がOFF信号を出力した場合、MCU23a、24aは、相互に監視をしているため、出力信号の不一致の状態が一定時間以上継続すると異常として判定し、強制的にOFF信号を出力する。なお、安全出力信号に割り当てられた2つの端子から、二重化された出力信号としてON信号とOFF信号とが不一致の状態で出力された場合、後段に接続される機器は、安全コントローラに故障が発生したと判断し、強制的にOFFの処理をする。このようにコントローラ20aは、バスIF26aを介して拡張モジュール4と通信して入力信号を受信したり、出力信号を送信したりする。通信IF27aは通信コネクタ7aを介して他の機器と通信する。
(Main module and expansion module hardware)
As shown in FIG. 2, the
安全入力機器の例としては、セーフティレーザスキャナ、ライトカーテンなどがある。安全入力機器は一般的に安全規格を満たすものであり、安全入力機器の出力は二重化されている。二重化された信号に一定期間以上の不一致が生じた際には、安全コントローラまたはセンサ自身が当該センサの故障として検知することができ、強制的にOFF等の処理をすることができる。 Examples of safety input devices include safety laser scanners and light curtains. Safety input devices generally meet safety standards, and the output of safety input devices is duplicated. When a mismatch occurs between the duplicated signals for a certain period of time or longer, the safety controller or the sensor itself can detect it as a failure of the sensor, and can forcibly perform processing such as OFF.
拡張モジュール4aのコントローラ20bは二つのMCU23b、24bとメモリ25bとを有している。信頼性を高めるためにMCU(マイクロコントローラユニット)は二重化されている。MCU23b、24bは、それぞれメモリ25bに保持されている同じ内容の制御プログラムを実行する。コントローラ20bは、安全入力IF21bを介して安全入力機器11の入力信号を受信すると、バスIF26bを介してメインモジュール3に入力信号(入力値)を送信する。コントローラ20bは、バスIF26bを介してメインモジュール3から出力信号(出力値)を受信すると、安全出力IF22bを介して動力源12などに出力する。たとえば、MCU23b、24bがともにON信号を出力していれば、安全出力IF22bは安全出力信号に割り当てられた2つの端子から、二重化された出力信号としてそれぞれON信号を出力する。また、MCU23b、24bがともにOFF信号を出力していれば、安全出力信号に割り当てられた2つの端子から、二重化された出力信号としてそれぞれOFF信号を出力する。一方、MCU23b、24bの一方がON信号を出力し他方がOFF信号を出力した場合、MCU23b、24bは、相互に監視をしているため、出力信号の不一致の状態が一定時間以上継続すると異常として判定し、強制的にOFF信号を出力する。なお、安全出力信号に割り当てられた2つの端子から、二重化された出力信号としてON信号とOFF信号とが不一致の状態で出力された場合、後段に接続される機器は、安全コントローラに故障が発生したと判断し、強制的にOFFの処理をする。
The
拡張モジュール4bのコントローラ20cは二つのMCU23c、24cとメモリ25cとを有している。信頼性を高めるためにMCU(マイクロコントローラユニット)は二重化されている。MCU23c、24cはそれぞれメモリ25cに保持されている制御プログラムを実行する。コントローラ20cは安全入力IF21cを介して安全入力機器11の入力信号を受信すると、バスIF26cを介してメインモジュール3に送信する。コントローラ20cはバスIF26cを介してメインモジュール3から出力信号を受信すると、安全出力IF22cを介して動力源12などに出力する。
The
(応答時間)
安全コントローラ1では、メインモジュール3に安全入力機器11と安全出力機器を接続できるし、拡張モジュール4にも安全入力機器11と安全出力機器を接続できる。なお、安全出力機器は、動力源12そのものであってもよいし、動力源12へ供給される電力を遮断する安全コンタクタや安全リレーであってもよい。安全入力機器11は安全入力機器自身が正常状態であることや安全入力機器が監視するエリアが正常であることを示す安全入力信号(ON)と安全入力機器自身が正常状態でないことや安全入力機器が監視するエリアが正常であることが確認できないことを示す安全入力信号(OFF)とを出力する。安全出力機器は、安全入力信号(ON)が入力される機械に電力を供給し、安全入力信号(OFF)が入力される機械への電力の供給を遮断する。
(Response time)
In the safety controller 1, the safety input device 11 and the safety output device can be connected to the
メインモジュール3に接続された安全入力機器11からの安全入力信号と、拡張モジュール4に接続された安全入力機器11からの安全入力信号とはそれぞれメインモジュール3で動作している安全プログラムによって処理される。また、メインモジュール3は、安全プログラムにしたがった安全出力信号を、メインモジュール3に接続された安全出力機器と、拡張モジュール4に接続された安全出力機器とにそれぞれ出力する。したがって、どの安全出力機器がどの安全入力機器の安全入力信号を利用するかに応じて、応答時間が異なってくる。
The safety input signal from the safety input device 11 connected to the
図3は応答時間を説明する図である。ここでは、四つの信号経路P1〜P4が主に例示されている。信号経路P1は二点鎖線で示されている。信号経路P2は破線で示されている。信号経路P3は実線で示されている。信号経路P4は一点鎖線で示されている。 FIG. 3 is a diagram for explaining the response time. Here, four signal paths P1 to P4 are mainly exemplified. The signal path P1 is indicated by a chain double-dashed line. The signal path P2 is indicated by a broken line. The signal path P3 is shown by a solid line. The signal path P4 is indicated by an alternate long and short dash line.
信号経路P1は、最もシンプルな経路であり、メインモジュール3に接続された安全入力機器11aの安全入力信号に基づき演算された安全出力信号を、メインモジュール3に接続された動力源12aに出力する。
The signal path P1 is the simplest path, and outputs a safety output signal calculated based on the safety input signal of the
信号経路P2は、メインモジュール3に接続された安全入力機器11aの安全入力信号に基づき演算された安全出力信号を、拡張モジュール4aに接続された動力源12bに出力する。この場合、安全出力信号は通信データに変換されて、バスIF26aからバスIF26bに送信される。通信データには巡回冗長検査符号(CRC)が付与されており、拡張モジュール4aは、CRCを用いて通信誤りを検知すると通信データを破棄する。メインモジュール3により新たなタイミングで送信された通信データに対し、CRCを用いて通信誤りを確認する(リトライ)。拡張モジュール4aは、通信誤りを確認した結果、通信データが正常であると判定すると通信データとして採用し、通信誤りを検知すると、通信データを破棄する。つまり、リトライは、ノイズ等の一時的な通信障害による誤OFFを減少させるためのものである。一方、通信線の断線や通信回路の故障等の異常が発生した場合、リトライを繰り返しても正常な通信データは得られない。言い換えると、リトライは、ノイズ等の一時的な通信障害と、通信に関する異常発生とを区別するためのものであり、リトライ期間を長くするということは、異常発生を検出するまでの期間を長くするということである。要するに、リトライ期間を長くすると、一時的な通信障害による誤OFFは減少して生産性は向上するが、応答時間はその分長くなり安全入力機器や安全柵等の設置位置の制約が大きくなる。
The signal path P2 outputs a safety output signal calculated based on the safety input signal of the
信号経路P3は、拡張モジュール4aに接続された安全入力機器11bの安全入力信号に基づき演算された安全出力信号を、メインモジュール3に接続された動力源12aに出力する。この例では、安全入力機器11bの安全入力信号は通信データに変換されて、バスIF26bからバスIF26aに送信される。信号経路P2と同様に、信号経路P3は、通信のリトライに伴い、応答時間が長くなる可能性がある。なお、安全入力信号がメインモジュール3に必ず送信されるのは、メインモジュール3が安全プログラムを実行する実行エンジンを備えているからである。具体的には、実行エンジンはMCU23aとMCU24aとに実装される。
The signal path P3 outputs a safety output signal calculated based on the safety input signal of the
信号経路P4は、最も複雑な経路であり、拡張モジュール4aに接続された安全入力機器11bの安全入力信号に基づきメインモジュール3で演算された安全出力信号を、拡張モジュール4aに接続された動力源12bに出力する。安全入力信号はメインモジュール3に送られ、安全プログラムにしたがって演算されて安全出力信号になる。信号経路P4では、バスIF26aとバスIF26bとの間を二度にわたって通過しなければならないため、最も応答時間が長くなりやすい。
The signal path P4 is the most complicated path, and the safety output signal calculated by the
なお、拡張モジュール4bがさらに接続されることもある。この場合、安全入力機器11cから入力された安全入力信号が動力源12cの安全出力信号になる場合であっても、安全入力信号は通信データに変換されてメインモジュール3に送信される。また、メインモジュール3は、安全出力信号を通信データに変換して送信することで拡張モジュール4bに送られ、そこで安全出力信号に変換されて動力源12cに出力される。安全入力機器11a、11bからの安全入力信号に基づき、動力源12cのための安全出力信号される場合もある。この場合も、バスIF26a、26b、26cが介在した通信が実行されることになる。ただし、安全入力機器と動力源との組み合わせは、自由自在であり、複数の安全入力機器と一つの動力源とが組み合わされることもある。この組み合わせは、ユーザにより作成される安全プログラムに依存する。
The
図3からわかるように安全入力機器11の接続位置と、動力源12などの安全出力機器の接続位置とに応じて応答時間(応答速度)が異なる可能性がある。ここで、予め応答時間(保証応答時間)を保証することが可能であるものの、通信エラーにより実際の応答時間が保証応答時間を超えてしまうことが考えられる。同様に、安全プログラムによる演算時間が長くなり、実際の応答時間が保証応答時間を超えてしまうことも考えられる。保証される応答時間は、通信エラーを許容する回数(または時間)と、安全プログラムに許容される最大演算時間とを含む。通信エラーの回数が許容回数を超えたり、または、演算時間が最大演算時間を超えてしまったりするケースは、故障などのケースである。これらは、通常動作では起こらないことが原因となる。処理時間が許容時間を越えてしまう要因は、たとえば、本体の故障、通信ケーブルの断線、過剰ノイズなどがある。これらは稀なイベントであるが、故障などのいわゆる異常状態に相当する。よって、実際の応答時間が保証応答時間を超えてしまう場合、メインモジュール3は、安全出力信号を強制的にOFFにする。これにより、応答時間を保証しつつ、稀なイベントに対処することが可能となる。
As can be seen from FIG. 3, the response time (response speed) may differ depending on the connection position of the safety input device 11 and the connection position of the safety output device such as the
(期間スロット)
図4は期間スロットを説明する図である。本実施例では、一定の長さの繰返し周期である期間スロットが導入されている。安全コントローラ1は、ユーザによって設定される安全プログラムをスキャンサイクルで繰り返し実行する実行エンジン40を有し、一または複数の安全入力機器11からの安全入力信号から、安全プログラムにしたがって安全出力信号(出力値)を生成する。スキャンサイクルは、安全入力信号を取り込むタイミングである入力リフレッシュ期間に対応する入力送受信期間と、入力送受信期間に取り込まれた安全入力信号の入力値と安全プログラムにしたがって出力値を算出する演算期間と、演算期間に算出された出力値に従って各出力端子から安全出力信号を出力する出力送受信期間とを有する。このスキャンサイクルにおける入力送受信期間、演算期間、および、出力送受信期間の3つの期間に対応する処理に分割して、安全コントローラ1は、それぞれの処理を並列的に実行する。例えば、パイプライン処理の場合、各期間に対応する処理の負荷が一致しているほど、処理全体の効率が上がることになる。安全コントローラ1は、入力送受信期間の保証期間と、演算期間の保証期間を期間スロットに対応付けている。なお、出力送受信期間の保証期間についても期間スロットに対応付けてもよいが、出力送受信期間の保証期間が強制OFF処理を対象としていため、期間スロットよりも十分短い期間幅であってもよい。期間スロットは、保証された応答時間に基づいて決定されている。そのため、MCU23a、24aはそれぞれ期間スロット内で安全プログラムによる演算を完了しなければならない。また、メインモジュール3は、期間スロット内で、自己に接続された安全入力機器11aからの入力信号の入力処理と、拡張モジュール4に接続された安全入力機器11bからの入力信号(入力データ)の受信処理とを完了しなければならない。さらに、メインモジュール3は、期間スロット内で、自己に接続された動力源12aへの出力信号の出力処理と、拡張モジュール4に接続された動力源12bへの出力信号(出力データ)の送信処理とを完了しなければならない。
(Period slot)
FIG. 4 is a diagram illustrating a period slot. In this embodiment, a period slot having a repeating cycle of a certain length is introduced. The safety controller 1 has an execution engine 40 that repeatedly executes a safety program set by the user in a scan cycle, and from a safety input signal from one or a plurality of safety input devices 11, a safety output signal (output) according to the safety program. Value) is generated. The scan cycle consists of an input transmission / reception period corresponding to the input refresh period, which is the timing for capturing the safety input signal, an calculation period for calculating the input value of the safety input signal captured in the input transmission / reception period, and an output value according to the safety program. It has an output transmission / reception period in which a safe output signal is output from each output terminal according to the output value calculated in the calculation period. The safety controller 1 executes each process in parallel by dividing it into processes corresponding to the three periods of the input transmission / reception period, the calculation period, and the output transmission / reception period in this scan cycle. For example, in the case of pipeline processing, the more the processing load corresponding to each period is matched, the higher the efficiency of the entire processing will be. The safety controller 1 associates the guarantee period of the input transmission / reception period with the guarantee period of the calculation period to the period slot. The guarantee period of the output transmission / reception period may also be associated with the period slot, but since the guarantee period of the output transmission / reception period is intended for the forced OFF process, the period width may be sufficiently shorter than the period slot. The period slot is determined based on the guaranteed response time. Therefore, each of the MCUs 23a and 24a must complete the calculation by the safety program within the period slot. Further, the
図4によれば、各期間スロット(入力送受信期間:入力期間と送受信期間)において入力信号の入力処理と入力データの送受信処理とが繰り返し実行されている。安全プログラムも各期間スロット(演算期間)において繰り返し実行される。さらに、各期間スロット(出力送受信期間:出力期間と送受信期間)において出力信号の出力処理と出力データの送受信処理とが繰り返し実行されている。 According to FIG. 4, the input processing of the input signal and the transmission / reception processing of the input data are repeatedly executed in each period slot (input transmission / reception period: input period and transmission / reception period). The safety program is also repeatedly executed in each period slot (calculation period). Further, the output processing of the output signal and the transmission / reception processing of the output data are repeatedly executed in each period slot (output transmission / reception period: output period and transmission / reception period).
一般化すると、i番目の期間スロットにおいて入力信号の入力と入力データの受信(送信)とが実行される。入力信号も実行エンジン40において演算可能となるように入力データに変換される。 Generally speaking, the input of the input signal and the reception (transmission) of the input data are executed in the i-th period slot. The input signal is also converted into input data so that it can be calculated by the execution engine 40.
i+1番目の期間スロットにおいて実行エンジン40による出力データのプログラム演算が実行される。ここでは、i番目の期間スロットにおいて入手された入力データについてプログラム演算が適用され、出力データが演算される。さらに、i+1番目の期間スロットにおいても入力信号の入力と入力データの受信(送信)とが実行される。 The program calculation of the output data by the execution engine 40 is executed in the i + 1th period slot. Here, the program calculation is applied to the input data obtained in the i-th period slot, and the output data is calculated. Further, the input of the input signal and the reception (transmission) of the input data are also executed in the i + 1th period slot.
i番目の期間スロットにおいて入手された入力データに基づき、i+1番目の期間スロットにおいて演算された出力データが、i+2番目の期間スロットにおいて拡張モジュール4に送信され、出力データが出力信号に変換されて安全出力機器に出力される。あるいは、i+2番目の期間スロットにおいて出力データが出力信号に変換されてメインモジュール3の安全出力機器に出力される。i+2番目の期間スロットにおいても実行エンジン40による出力データのプログラム演算が実行される。これは、i+1番目の期間スロットにおいて受信された入力データを用いて実行される。さらに、i+2番目の期間スロットにおいても入力信号の入力と入力データの受信(送信)とが実行される。
Based on the input data obtained in the i-th period slot, the output data calculated in the i + 1th period slot is transmitted to the expansion module 4 in the i + 2nd period slot, and the output data is converted into an output signal for safety. It is output to the output device. Alternatively, the output data is converted into an output signal in the i + 2nd period slot and output to the safety output device of the
このようにi番目の期間スロットで安全入力信号(入力データ)が入手され、i+1番目の期間スロットで入力データに基づき安全出力信号(出力データ)が演算され、i+2番目の期間スロットで安全出力信号(出力データ)が出力または送信される。したがって、メインモジュール3は、各期間スロット内で入力処理および受信処理が完了したかどうかを監視する。メインモジュール3は、各期間スロット内で演算処理が完了したかどうかを監視する。メインモジュール3は、各期間スロット内で出力処理および送信処理が完了したかどうかを監視する。期間スロット内でいずれか処理が完了しなければ、メインモジュール3は、安全出力信号を強制的にOFFに設定する。
In this way, the safe input signal (input data) is obtained in the i-th period slot, the safe output signal (output data) is calculated based on the input data in the i + 1th period slot, and the safe output signal is calculated in the i + 2nd period slot. (Output data) is output or transmitted. Therefore, the
図3で示される信号経路P1における応答時間は、通信故障を考慮する必要がないため、2つ分の期間スロットの期間幅に出力までの応答時間を加えたものになる。例えば、期間スロットが1ミリ秒の場合、信号経路P1における応答時間は、2ミリ秒より長く3ミリ秒以下の一定値を設定することができる。また、図3で示される信号経路P4における応答時間は、通信故障を考慮する必要があり、2つ分の期間スロットの期間幅に出力までの応答時間を加えたものになる。例えば、期間スロットが1ミリ秒の場合、信号経路P4における応答時間は、4ミリ秒より長く5ミリ秒以下の一定値を設定することができる。 Since it is not necessary to consider the communication failure, the response time in the signal path P1 shown in FIG. 3 is obtained by adding the response time to the output to the period width of the two period slots. For example, when the period slot is 1 millisecond, the response time in the signal path P1 can be set to a constant value longer than 2 milliseconds and 3 milliseconds or less. Further, the response time in the signal path P4 shown in FIG. 3 needs to take into consideration the communication failure, and is obtained by adding the response time to the output to the period width of the two period slots. For example, when the period slot is 1 millisecond, the response time in the signal path P4 can be set to a constant value longer than 4 milliseconds and 5 milliseconds or less.
(メインモジュールのMCUの機能)
図5はメインモジュール3のMCUで実現される機能を示している。図5にはMCU23aだけが示されているが、MCU24aも同じ機能を有している。信号処理部31は、メインモジュール3に接続された安全入力機器11aから安全入力信号を入力したり、メインモジュール3に接続された安全出力機器(動力源12a)に安全出力信号を出力したりする。入力処理部32は安全入力信号をアナログデジタル変換して入力データ(入力値)を求め、実行エンジン40に出力する。出力処理部33は、実行エンジン40から出力された出力データ(出力値)を安全出力信号に変換して安全出力機器に出力する。
(MCU function of main module)
FIG. 5 shows the functions realized by the MCU of the
なお、入力処理部32は、入力端子と、安全プログラムにおける入力ブロックとの関連付けに基づき、ある入力端子から入力された入力信号を入力データに変換し、当該入力端子に関連付けられている入力ブロックに入力データを渡してもよい。同様に、出力処理部33は、ある出力ブロックから出力された出力データを出力信号に変換し、当該出力ブロックに関連付けられている出力端子から当該出力端子に出力してもよい。このように、信号処理部31は、安全プログラムの入出力ブロックと入出力端子との間におけるデータの橋渡しを実行してもよい。入力処理部32はノイズを低減するためのフィルタリングを実行してもよい。
The
通信処理部36はバスIF26aを介して拡張モジュール4から送信される入力データを受信したり、バスIF26aを介して拡張モジュール4へ出力データを送信したりする。入力データは、拡張モジュール4に接続された安全入力機器11bから出力された安全入力信号を伝送するデータである。出力データは、拡張モジュール4に接続された安全出力機器である動力源12bへ出力された安全出力信号を伝送するデータである。
The
受信処理部37は入力データについてCRCによる誤り検出を実行する。誤りが検出されると、受信処理部37は、拡張モジュール4に入力データの再送を要求する。受信処理部37は、誤りがない入力データを実行エンジン40に渡す。受信処理部37は、入力データを、安全プログラムを構成している適切な入力ブロックにわたす。入力データと入力ブロックとの関係は予め設定情報により関連付けられている。
The
送信処理部38は、実行エンジン40から出力されてきた出力データに対して誤り検出符号(例:CRC)を演算して付加し、バスIF26aを介して拡張モジュール4に送信する。拡張モジュール4から再送要求を受信すると、送信処理部38は、出力データを再送する。なお、送信処理部38は、ある出力ブロックから出力された出力データを、当該出力ブロックに関連付けられている、拡張モジュール4の安全出力機器に対して送信する。出力データと安全出力機器(出力端子)との関係は予め設定情報により関連付けられている。
The
実行エンジン40は、安全プログラムを実行することで入力データから出力データを生成する。 The execution engine 40 generates output data from the input data by executing the safety program.
監視部41は、信号処理部31、通信処理部36および実行エンジン40を監視する。監視部41は、判定部50、信号設定部60および警告部70を有している。監視部41は、MCUのハードウエア故障を検知したり、ペアとなる二つMCUの安全出力信号が一致しているかどうかを監視したりすることに加え、本実施例では応答時間に関連した監視を実行する。
The
判定部50において第一判定部51は期間スロット内に入力データを信号処理部31および通信処理部36が入手できたかどうかを判定する。第二判定部52は、期間スロット内に安全プログラムの実行が完了したかどうかを判定する。安全プログラムの実行とは、入力データから出力データを演算することである。第三判定部53は、期間スロット内に、信号処理部31および通信処理部36による出力データの出力および送信が完了したかどうかを判定する。
In the
信号設定部60において第一設定部61は、期間スロット内に入力データを入手できなかった場合に、安全出力信号を強制的にOFFに設定する。第二設定部62は、期間スロット内に安全プログラムの実行が完了しなかった場合に、安全出力信号を強制的にOFFに設定する。第三設定部63は、期間スロット内に出力データの出力および送信が完了しなかった場合に、安全出力信号を強制的にOFFに設定する。
In the
警告部70において第一警告部71は、期間スロット内に入力データを入手できなかった場合に、表示装置5aに警告情報を出力する。第二警告部72は、期間スロット内に安全プログラムの実行が完了しなかった場合に、表示装置5aに警告情報を出力する。第三警告部73は、期間スロット内に出力データの出力および送信が完了しなかった場合に、表示装置5aに警告情報を出力する。
In the
(拡張モジュールのMCUの機能)
図6は拡張モジュール4のMCUの機能を示している。なお、図6において図5と共通または類似する機能には同一の参照符号が付与されている。
(MCU function of expansion module)
FIG. 6 shows the function of the MCU of the expansion module 4. In FIG. 6, the same reference numerals are given to the functions common to or similar to those in FIG.
入力処理部32は、拡張モジュール4に接続された安全入力機器11bから安全入力信号を入力して入力データに変換し、送信処理部38に出力する。送信処理部38は、入力データにCRC処理を施し、バスIF26bを介してメインモジュール3に送信する。
The
受信処理部37は、バスIF26bを介してメインモジュール3から出力データを受信し、CRC検査を実行し、誤りが検出されなければ出力データを出力処理部33に渡す。受信処理部37は、受信データに付与されているシーケンス番号に基づいて複数の受信データから入力データを復元してもよい。出力処理部33は、出力データを安全出力信号に変換して安全出力機器である動力源12bへ出力する。出力データに誤りが検出された場合、受信処理部37は、メインモジュール3に出力データの再送を要求して、出力データの受信をリトライする。あるいは、受信処理部37は、出力データを強制的にOFFに設定してもよい。このような強制的なOFFは、タイムアウトの発生時や二つのMCUが異なる値を出力したときなどの異常発生時に実行される。
The
監視部41は、判定部50と信号設定部60とを有していてもよい。判定部50において第一判定部51は、入力処理部32および受信処理部37において期間スロット内に入力データを取得できたかどうかを監視する。第三判定部53は送信処理部38において期間スロット内に出力データの送信が完了したかどうかを判定する。
The
第一設定部61は、期間スロット内に入力データを入手できなかった場合に、安全出力信号を強制的にOFFに設定する。第三設定部63は、期間スロット内に出力データの送信が完了しなかった場合に、安全出力信号を強制的にOFFに設定する。
The
(フローチャート)
図7はメインモジュール3のMCU23a(MCU24a)が実行する監視処理のフローチャートである。ここでは、実行エンジン40が繰り返す安全プログラムを実行しているものとする。
(flowchart)
FIG. 7 is a flowchart of the monitoring process executed by the
S1でMCU23a(例:第一判定部51)は期間スロット内に入力データを入手できたかどうかを判定する。期間スロット内に入力データを入手できたのであれば、MCU23aはS2に進む。期間スロット内に入力データを入手できなかったのであれば、MCU23aはS11に進む。
In S1, the
S2でMCU23a(例:第二判定部52)は期間スロット内に安全プログラムによる出力データの演算が完了したかどうかを判定する。期間スロット内に出力データの演算が完了したのであれば、MCU23aはS3に進む。期間スロット内に出力データの演算が完了しなかったのであれば、MCU23aはS11に進む。
In S2, the
S3でMCU23a(例:第三判定部53)は期間スロット内に出力データの送信が完了したかどうかを判定する。期間スロット内に出力データの送信が完了したのであれば、MCU23aはS4に進む。期間スロット内に出力データの演算が完了しなかったのであれば、MCU23aはS11に進む。
In S3, the
S4でMCU23aは監視終了条件が満たされてかどうかを判定する。監視終了条件は、たとえば、操作部6aから監視終了指示が入力されたことである。監視終了条件が満たされると、MCU23aは監視処理を終了する。監視終了条件が満たされていなければ、MCU23aはS1に戻る。
In S4, the
S11でMCU23a(信号設定部60)は、安全出力信号を強制的にOFFに設定する。これにより、メインモジュール3に接続されている動力源12aと、拡張モジュール4に接続されている動力源12bとにそれぞれ安全出力信号が出力される。これにより、動力源12a、12bは停止する。なお、信号設定部60は、出力データが安全出力信号のOFFを意味するように、出力データを変更する。
In S11, the
S12でMCU23a(警告部70)は表示装置5aに警告情報を出力する。ここで、警告情報は、警告情報が出力された理由を示すメッセージやエラーコードを含んでもよい。たとえば、警告情報は、どの安全入力機器からの入力信号の入手に失敗したかを示す情報を含んでもよい。また、警告情報は、どの安全出力機器への安全出力信号(出力データ)の送信に失敗したかを示す情報を含んでもよい。さらに、MCU23a(警告部70)はエラー履歴に警告情報またはエラーの内容を示す情報を書き込んでもよい。
In S12, the
(ファンクションブロック)
図8はPC2が編集プログラムにしたがって表示装置5bに表示するUI80を示している。編集ボタン81は安全プログラムの編集を指示するためのボタンである。シミュレーションボタン82は安全プログラムのシミュレーションを指示するボタンである。リスト部83は、ユーザにより選択可能なファンクションブロック84の一覧を選択可能に表示する表示領域である。プログラム作成エリア85は、入力タイプのファンクションブロックが配置される入力配置エリア86と、演算タイプおよび出力タイプのファンクションブロックが配置されるブロック配置エリア87とを有している。ユーザは、リスト部83から任意のファンクションブロック84を選択して、入力配置エリア86またはブロック配置エリア87にドラッグアンドドロップする。入力配置エリア86およびブロック配置エリア87はスクロール表示可能となっており、より多くのファンクションブロックを配置可能となっている。
(Function block)
FIG. 8 shows the
図8によれば、入力配置エリア86には、メインモジュール3と拡張モジュール4に接続された安全入力機器11に対応する入力ブロックが配置される。図8では、入力配置エリア86には、非常停止スイッチに対応した入力ブロックと、リセットスイッチに対応した入力ブロックと、ライトカーテンXに対応した入力ブロックと、ドアスイッチに対応した入力ブロックが、リスト部83からドラッグアンドドロップされて配置されている。
According to FIG. 8, in the
ブロック配置エリア87には、二つのANDブロックと、リセットブロックと、出力ブロックとが配置されている。出力ブロックは、IOコネクタ10a〜10cにおけるいずれかの出力端子に対応している。各ファンクションブロックを表すアイコンには、入力端子や出力端子が含まれている。ユーザは、あるファンクションブロックの出力端子と、他のファンクションブロックの入力端子との間に接続線88で結線することで、安全プログラムを完成させる。
In the
この事例では、非常停止ボタンが押されていない場合、リセットブロックはON(安全)を出力する。また、左側のANDブロックは、ライトカーテンがONであり、かつ、ドアスイッチがONである場合に、ONを出力する。右側のANDブロックには、リセットブロックの出力端子と、左側のANDブロックの出力端子とが接続されている。よって、右側のANDブロックの二つの入力端子にいずれもONが入力されている場合に、右側のANDブロックはONを出力ブロックに出力する。非常停止ボタンが押されると、リセットブロックにOFF(安全でない)が入力される。その結果、右側のANDブロックの出力がONからOFFに切り替わり、出力ブロックにOFFが伝搬する。リセットブロックは、リセットスイッチが押されない限り、OFF出力を維持する。リセットブロックは、リセットスイッチが押されると、出力をONに復帰させる。 In this case, the reset block outputs ON (safety) when the emergency stop button is not pressed. Further, the AND block on the left side outputs ON when the light curtain is ON and the door switch is ON. The output terminal of the reset block and the output terminal of the AND block on the left side are connected to the AND block on the right side. Therefore, when ON is input to both of the two input terminals of the AND block on the right side, the AND block on the right side outputs ON to the output block. When the emergency stop button is pressed, OFF (unsafe) is input to the reset block. As a result, the output of the AND block on the right side is switched from ON to OFF, and OFF is propagated to the output block. The reset block maintains an OFF output unless the reset switch is pressed. The reset block returns the output to ON when the reset switch is pressed.
PC2のCPUは、安全プログラムを構成しているファンクションブロックの種別情報およびプログラム部品と、各ファンクションブロックの接続関係を示す接続情報とを含む設定情報を作成し、PC2の記憶装置に格納する。この場合、設定情報内に安全プログラムが含まれていることになる。あるいは、CPUは、接続情報に従ってプログラム部品をリンクして安全プログラムを作成してもよい。ユーザによる転送指示が入力されると、CPUは設定情報と安全プログラムをメインモジュール3に送信して書き込む。設定情報は安全プログラムの一部であってもよい。
The CPU of the
このようにユーザは、任意のファンクションブロックを組み合わせることで容易に安全プログラムを作成できるようになる。なお、シミュレーションボタン82が押されると、CPUはシミュレーションUIを表示装置5bに表示する。
In this way, the user can easily create a safety program by combining arbitrary function blocks. When the
ここで、本実施例のファンクションブロックはそれぞれ単体での演算処理時間が保証されていてもよい。PC2は、安全コントローラ1の製品仕様書で保証された応答時間を満たすように、ユーザによる安全プログラムの作成を制限してもよい。たとえば、安全プログラムの応答時間を不定にしてしまうような複数のファンクションブロック間のループ配線(ループ処理)または分岐処理を含む安全プログラムを、ユーザがUI80上で作成しようとすると、CPUは警告情報を出力したり、そのような作成を禁止したりしてもよい。
Here, the arithmetic processing time of each function block of this embodiment may be guaranteed. The
図8によれば、現在のプログラム量を表示する表示部89a、89bが示されている。CPUは、プログラムの作成に使用されるUI80の表示部89aに現在のプログラム量を表示してもよい。CPUは、バーグラフである表示部89bに、満容量に対する現在のプログラム量を示す割合を表示したりしてもよい。満容量は、製品仕様書で保証された応答時間の上限値に対応している。また、現在のプログラム量が満容量を超えた場合に、CPUは警告情報を出力してもよい。ここで、プログラム量は記憶サイズであってもよいし、プログラムを構成する複数のファンクションブロックの演算時間の合計時間であってもよい。これにより、製品仕様書で保証された応答時間を逸脱するような安全プログラムの作成を抑制することが可能となろう。
According to FIG. 8,
安全コントローラ1は少なくとも一つのメインモジュール3を含むが、拡張モジュール4は必須ではない。したがって、メインモジュール3からなる安全コントローラ1の応答時間と、メインモジュール3と拡張モジュール4とからなる安全コントローラ1の応答時間とは異なる。そのため、製品仕様書には、これらのシステム構成ごとの応答時間が列挙されていてもよい。
The safety controller 1 includes at least one
安全コントローラ1の合計応答時間Taは以下の式から算出されうる。
Ta = T0+T1+T2+T3+T4+T5・・・(1)
T0はメインモジュール3の基本応答時間(例:4.8ミリ秒)である。
T1は安全入力機器が接続される接続先機器による加算時間(例:1.7ミリ秒)である。安全入力機器がメインモジュール3に接続される場合と、拡張モジュール4に接続される場合とで、T1は異なってもよい。
T2は入力ブロックに起因した加算時間(例:0.7ミリ秒)である。入力ブロックがフィルタ処理やテスト出力を使用する場合、フィルタ処理時間やテスト出力時間に応じてT2が異なる。
T3は安全プログラムに起因した加算時間(例:4.5ミリ秒)である。ONディレイやOFFディレイなどのタイマー機能を使用する場合、タイマーによる遅延時間を加算する必要がある。また、レジスタを使用する場合も加算時間が必要となる。また、T3はテスト出力に起因した加算時間であってもよい。テスト出力とは、たとえば、非常停止ボタンが正常に動作可能であることを確認するためにテストパルスを出力することである。
T4は安全出力機器が接続される接続先機器による加算時間である。安全出力機器がメインモジュール3に接続される場合(例:0ミリ秒)と、拡張モジュール4に接続される場合(例:2.4ミリ秒)とで、T4は異なる。
T5は出力ブロックに起因した加算時間である。出力ブロックが半導体出力の場合(例:0ミリ秒)と、リレー出力の場合(例:10ミリ秒)とで、T5は異なる。
The total response time Ta of the safety controller 1 can be calculated from the following equation.
Ta = T0 + T1 + T2 + T3 + T4 + T5 ... (1)
T0 is the basic response time of the main module 3 (eg, 4.8 milliseconds).
T1 is the addition time (eg: 1.7 milliseconds) depending on the connected device to which the safety input device is connected. T1 may be different depending on whether the safety input device is connected to the
T2 is the addition time (eg, 0.7 ms) due to the input block. When the input block uses filtering or test output, T2 differs depending on the filtering time or test output time.
T3 is the addition time (eg, 4.5 ms) due to the safety program. When using a timer function such as ON delay or OFF delay, it is necessary to add the delay time due to the timer. Also, when using registers, additional time is required. Further, T3 may be an addition time due to the test output. The test output is, for example, to output a test pulse to confirm that the emergency stop button can operate normally.
T4 is the addition time depending on the connection destination device to which the safety output device is connected. The T4 differs depending on whether the safety output device is connected to the main module 3 (example: 0 ms) or the expansion module 4 (example: 2.4 ms).
T5 is the addition time due to the output block. T5 differs depending on whether the output block is a semiconductor output (example: 0 ms) or a relay output (example: 10 ms).
(1)式は、安全コントローラの入力から出力までの時間を意味しているが、これとは別に、TsとTrが別途考慮されてもよい。Tsは安全入力機器の応答時間である。Tsは安全入力機器の製品仕様書などに記載されている。Trは安全出力機器の応答時間である。Trは安全出力機器の製品仕様書などに記載されている。Tsは安全入力機器が反応してOFF信号をメインモジュール3に入力するのに要する時間である。TrはOFF信号が出力されてから機械が安全に停止するまでに要する時間である。これらはセンサや機械に依存した項目である。安全コントローラシステムの設計ではこれらも考慮されうる。
Equation (1) means the time from the input to the output of the safety controller, but apart from this, Ts and Tr may be considered separately. Ts is the response time of the safety input device. Ts is described in the product specifications of safety input devices and the like. Tr is the response time of the safety output device. Tr is described in the product specifications of safety output devices. Ts is the time required for the safety input device to react and input the OFF signal to the
ユーザは自己が構築しようとしている安全コントローラ1について合計の応答時間Taを求めて、安全距離を計算し、適切に安全入力機器を配置することが可能となろう。 The user will be able to obtain the total response time Ta for the safety controller 1 that he / she is trying to build, calculate the safety distance, and appropriately arrange the safety input device.
(動作モード)
メインモジュール3は複数の動作モードを有していてもよい。保証された応答時間に基づく期間スロットを用いる応答時間固定モードと、通信リトライのタイムアウト期間を増加させた耐ノイズモードと、応答時間に応じた強制OFFと警告を実行しないベストエフォートモードが採用されてもよい。MCU23aは、メモリ25に記憶されている設定データに応じていずれかの動作モードを選択してもよい。
(action mode)
The
<その他>
(プログラム作成処理)
図9はPC2により実行されるプログラム作成処理を示している。
<Others>
(Program creation process)
FIG. 9 shows a program creation process executed by the
S21でPC2のCPUはプログラムに対するファンクションブロックの追加を受け付ける。 In S21, the CPU of the PC2 accepts the addition of the function block to the program.
S22でCPUは現在のプログラム量を求める。上述されたように追加対象としてユーザにより選択されたファンクションブロックごとに処理時間が予め定められている。たとえば、CPUはプログラムに含まれているファンクションブロックごとの処理時間の合計時間をプログラム量として求めてもよい。 In S22, the CPU obtains the current program amount. As described above, the processing time is predetermined for each function block selected by the user as an addition target. For example, the CPU may obtain the total processing time for each function block included in the program as the program amount.
S23でCPUは現在のプログラム量が、保証された応答時間に対応する規定量以下であるかどうかを判定する。プログラム量が規定量以下であれば、CPUはS24に進む。S24でCPUはプログラムに対するファンクションブロックの追加を許可し、S25に進む。プログラム量が規定量を超えていれば、CPUはS26に進む。S26でCPUはファンクションブロックの追加を拒否する。S27でCPUは警告情報を出力する。この警告情報は、たとえば、保証された応答時間を逸脱することを示すメッセージが含まれてもいてもよい。 In S23, the CPU determines whether the current program amount is less than or equal to the specified amount corresponding to the guaranteed response time. If the program amount is equal to or less than the specified amount, the CPU proceeds to S24. In S24, the CPU permits the addition of the function block to the program, and proceeds to S25. If the program amount exceeds the specified amount, the CPU proceeds to S26. In S26, the CPU refuses to add the function block. In S27, the CPU outputs warning information. This warning information may include, for example, a message indicating that the guaranteed response time is deviated.
S25でCPUはプログラムの作成が終了したかどうかを判定する。たとえば、ユーザによって終了指示が入力されると、CPUはプログラムの作成が終了したと判定し、プログラムを保存して作成処理を終了する。プログラムの作成が終了していなければ、CPUはS21に戻る。 In S25, the CPU determines whether or not the program creation is completed. For example, when the end instruction is input by the user, the CPU determines that the program creation is completed, saves the program, and ends the creation process. If the program creation is not completed, the CPU returns to S21.
(通信エラーに関する処理)
メインモジュール3や拡張モジュール4はそれぞれ安全入力信号や安全出力信号を通信データに変換して通信する。通信エラーが発生すると、誤った安全入力信号や安全出力信号が伝達されてしまう。この場合は、動力源12に供給される安全出力信号は強制的にOFFにされるべきである。なお、通信エラーの検出はメインモジュール3だけでなく、拡張モジュール4においても実行されるが、以下ではメインモジュール3で実行される例が説明される。また、MCU23、24がそれぞれ以下の処理を実行するが、MCU23のケースが説明される。
(Processing related to communication errors)
The
S31でMCU23は拡張モジュール4から入力値(入力データ)を受信する。たとえば、バスIFに設けられた受信バッファから入力データの読み出しを試行する。 In S31, the MCU 23 receives an input value (input data) from the expansion module 4. For example, it tries to read the input data from the receive buffer provided in the bus IF.
S32でMCU23は拡張モジュール4から入力値が受信できたかを判断する。入力値を受信できなかった場合や、入力値は受信できたが当該入力値の通信相手が正しくなかった場合や、受信した入力値のCRCが一致しない場合は、MCU23はS33に進む。S33で、MCU23は期間スロット内の通信かどうかを判断する。期間スロット内の受信であると判断した場合は、S39に進む。S39でMCU23は受信をリトライし、S32に進む。一方、期間スロット内ではないと判断した場合は、MCU23はS40に進む。S40でMCU23は、出力を強制的にOFFにする。入力値が受信できた場合、MCU23はS34に進む。 In S32, the MCU 23 determines whether the input value can be received from the expansion module 4. If the input value cannot be received, if the input value can be received but the communication partner of the input value is incorrect, or if the CRC of the received input value does not match, the MCU 23 proceeds to S33. In S33, the MCU 23 determines whether or not the communication is within the period slot. If it is determined that the reception is within the period slot, the process proceeds to S39. In S39, the MCU 23 retries reception and proceeds to S32. On the other hand, if it is determined that the slot is not within the period slot, the MCU 23 proceeds to S40. In S40, the MCU 23 forcibly turns off the output. If the input value can be received, the MCU 23 proceeds to S34.
S34でMCU23は、タイムスタンプやシーケンス番号などをもとに入力値について遅延や誤配列などの通信エラーを検出する。 In S34, the MCU 23 detects a communication error such as a delay or an incorrect arrangement for the input value based on the time stamp, the sequence number, or the like.
S35でMCU23は、通信エラーが検出されたかどうかを判定する。通信エラーが検出されない場合、MCU23はS36に進む。S36でMCU23は受信された入力値を用いてプログラムを実行し、実行結果(出力値)を求める。一方で、通信エラーが見つかった場合、MCU23はS37に進む。 In S35, the MCU 23 determines whether or not a communication error has been detected. If no communication error is detected, the MCU 23 proceeds to S36. In S36, the MCU 23 executes the program using the received input value and obtains the execution result (output value). On the other hand, if a communication error is found, the MCU 23 proceeds to S37.
S37でMCU23は出力値(安全出力信号)を強制的にOFFにする。 In S37, the MCU 23 forcibly turns off the output value (safety output signal).
S38でMCU23は出力値を拡張モジュール3に送信する。
In S38, the MCU 23 transmits the output value to the
ここでは受信されたデータに基づき通信エラーが検出されているが、リトライ回数が閾値を超えると、S37が実行されてもよい。 Here, a communication error is detected based on the received data, but if the number of retries exceeds the threshold value, S37 may be executed.
(応答時間固定に関するパターン)
上述された実施形態は一例に過ぎないが、概ね三つのパターンが存在する。一つ目のパターンは、プログラムが修正されても応答時間が一定に保証されるが、拡張モジュールまたはリモートI/Oユニットの接続台数が増加すると応答時間が変化するパターンである。二つ目のパターンは、プログラムが修正されると修正後のプログラム量に応じて応答時間が増加することがあるが、拡張モジュールまたはリモートI/Oユニットの接続台数が増加しても応答時間が一定に保証されるパターンである。三つ目のパターンは、プログラムが修正されても応答時間が一定に保証され、かつ、拡張モジュールまたはリモートI/Oユニットの接続台数が増加しても応答時間が一定に保証されるパターンである。
(Pattern related to fixed response time)
Although the above-described embodiment is only an example, there are generally three patterns. The first pattern is a pattern in which the response time is guaranteed to be constant even if the program is modified, but the response time changes as the number of connected expansion modules or remote I / O units increases. In the second pattern, when the program is modified, the response time may increase according to the amount of the modified program, but the response time increases even if the number of expansion modules or remote I / O units connected increases. It is a pattern that is guaranteed to be constant. The third pattern is a pattern in which the response time is guaranteed to be constant even if the program is modified, and the response time is guaranteed to be constant even if the number of expansion modules or remote I / O units connected increases. ..
プログラムが修正されても応答時間を一定に保証する技術はすでに説明されたとおりである。拡張モジュールの接続台数が増加しても応答時間を一定に保証する技術は、通信にかかる時間を監視し、通信時間(リトライ回数)が閾値を超えると、安全出力信号を強制的にOFFにすることで達成可能である。 The technique for guaranteeing a constant response time even if the program is modified has already been described. The technology that guarantees a constant response time even if the number of expansion modules connected increases monitors the time required for communication, and when the communication time (number of retries) exceeds the threshold value, the safety output signal is forcibly turned off. It is achievable.
さらに、図11(A)〜図11(E)が示すように、拡張モジュールの数に応じて保証される応答時間が段階的に変化してもよい。 Further, as shown in FIGS. 11 (A) to 11 (E), the guaranteed response time may be changed stepwise according to the number of expansion modules.
図11(A)メインモジュール3が単体で使用されるときの保証応答時間(例:xミリ秒)と、一台以上の拡張モジュール4がメインモジュール3に接続されるときの保証応答時間(例:xミリ秒)が同一とされるケース。ユーザは、拡張モジュール4の台数を増加させても、応答時間が変化しないため、安全距離を見直す必要がない。
FIG. 11 (A) Guaranteed response time when the
図11(B)メインモジュール3が単体で使用されるときの保証応答時間(例:xミリ秒)と、一台以上の拡張モジュール4がメインモジュール3に接続されるときの保証応答時間(例:yミリ秒)が異なるケース。ユーザは、拡張モジュール4の台数が一以上であれば、応答時間が変化しないため、安全距離を見直す必要がない。たとえば、応答時間は基本応答時間(例:x=4.8ミリ秒)に対して、拡張モジュール4の有無に応じた加算時間を考慮することで求められる。加算時間(例:1.7ミリ秒)は、拡張モジュール4の台数が一以上であれば、一定である。よって、一台以上の拡張モジュール4がメインモジュール3に接続されたときの応答時間yは、たとえば、6.5ミリ秒となる。このとき、監視部41は、メインモジュール3に接続される拡張モジュール4の台数が1台以上である第1の台数のときと、当該第1の台数とは異なる1台以上である第2の台数のときとで、安全コントローラ1の応答時間が一定に保証されるよう、実行エンジン40および通信処理部36(受信処理部37など)を監視する。
FIG. 11 (B) Guaranteed response time when the
図11(C)メインモジュール3が単体で使用されるときの保証応答時間(例:xミリ秒)とメインモジュール3に一台の拡張モジュール4が接続されるときの保証応答時間(例:xミリ秒)とは同一であるが、二台以上の拡張モジュール4がメインモジュール3に接続されるときの保証応答時間(例:yミリ秒)は同一ではないケース。ただし、x<yとする。ユーザは、拡張モジュール4の台数が一台から二台以上に増加する場合、応答時間が増加することを認識して、安全距離を見直す必要がある。ただし、二台から三台に増加するときだけは、ユーザは安全距離を見直す必要がある。
FIG. 11 (C) Guaranteed response time when the
図11(D)メインモジュール3が単体で使用されるときの保証応答時間はxミリ秒であり、メインモジュール3に1以上でN台以下の拡張モジュール4が接続されるときの保証応答時間はy1ミリ秒であり、N+1台以上でM台以下の拡張モジュール4がメインモジュール3に接続されるときの保証応答時間がy2ミリ秒であるケース。ただし、x<y1<y2とする。ユーザは、拡張モジュール4の台数が0台から一台に増加する場合、応答時間が増加することを認識して、安全距離を見直す必要がある。同様に、ユーザは、拡張モジュール4の台数がN台からN+1台に増加する場合、応答時間が増加することを認識して、安全距離を見直す必要がある。
FIG. 11 (D) The guaranteed response time when the
ここでは拡張モジュール4の台数に応じて応答時間が変化するルールについて説明されたが、図11(E)のケースのように、リモートI/Oユニット8についても拡張モジュール4と同一または類似した応答時間のルールが構築されてもよい。たとえば、リモートI/Oユニット8は、応答時間の観点では拡張モジュール4と同一視されてもよい。メインモジュール3に1台以上の拡張モジュール4が接続される場合、監視部41は、リモートI/Oユニット8がメインモジュール3に接続されないときと、1台接続されたときとで、安全コントローラ1の応答時間が一定に保証されるよう、通信処理部36(受信処理部37など)を監視してもよい。受信処理部37は、リモートI/Oユニット8から入力値を受信するように構成されている。いずれにしても、応答時間を超えるような異常状態が発生したときは、安全出力信号が強制的にOFFにされる。
Here, the rule that the response time changes according to the number of expansion modules 4 has been described, but as in the case of FIG. 11 (E), the remote I / O unit 8 also has the same or similar response as the expansion module 4. Time rules may be built. For example, the remote I / O unit 8 may be equated with the expansion module 4 in terms of response time. When one or more expansion modules 4 are connected to the
(安全通信)
メインモジュール3と拡張モジュール4はバスIFを含む内部バス(フィールドバス)を介して通信を実行する。この通信には次のようなエラーが発生しうる。
1)反復:古いメッセージが繰り返し受信されてしまうこと
2)欠損:メッセージが消去されてしまうこと
3)挿入:別のメッセージが挿入されてしまうこと
4)誤配列:メッセージの受信順序が誤ってしまうこと
5)改ざん:メッセージの内容が書き換えられてしまうこと
6)遅延:規定の時間内に通信が完了しないこと
7)偽装:認証されていない機器から信頼できない情報が受信されること。
(Safe communication)
The
1) Repeat: Old message is received repeatedly 2) Missing: Message is deleted 3) Insert: Another message is inserted 4) Misalignment: Message reception order is incorrect 5) Falsification: The content of the message is rewritten 6) Delay: Communication is not completed within the specified time 7) Impersonation: Unreliable information is received from an unauthenticated device.
これに対して、メインモジュール3と拡張モジュール4は、送信元/受信先アドレスの同定を行う。これは、送信元/受信先アドレスをメッセージに含めることにより両者を同定し、登録されていない機器からの信用できない情報の挿入を阻止することである。メインモジュール3と拡張モジュール4は、タイムスタンプを用いてもよい。安全関連情報は一定時間内でのみ有効である。そこで、メインモジュール3と拡張モジュール4は、タイムスタンプを用いて古い安全関連情報を特定し、これらが繰り返し送信されてしまうことを抑制する。タイムスタンプは、送信側がメッセージを生成した時刻をタイムスタンプとしてメッセージに付加し、受信側がメッセージからタイムスタンプを抽出して、タイムスタンプに基づきメッセージの適時性を検査する。メインモジュール3と拡張モジュール4は、シーケンス番号を付与してもよい。シーケンス番号は、メッセージが送信された順序を示す。受信側は、メッセージに含まれるシーケンス番号に基づき、受信された複数のメッセージの前後関係を特定する。シーケンス番号に基づき、メッセージの欠損や関係ないメッセージの挿入、誤配列が判定可能となる。メインモジュール3と拡張モジュール4は受信確認を実行してもよい。受信確認では、受信側が受信メッセージを送信側に逆送信することで、送信側が送信したメッセージと逆送信されたメッセージとを比較する。これにより、受信側がメッセージを正しく受信できたかが
確認可能となる。あるいは、受信側に対応するアクノレッジなどの確認メッセージの送信を行わせることで、メッセージが正しく受信されたことを、送信側が検査してもよい。通常、許容時間内に受信側からの確認応答が得られない場合、送信側は、OFF状態へ移行する(タイムアウト機能)。
On the other hand, the
図12、図13を用いて、メインモジュール3と拡張モジュール4とが実行する具体的な送信手順について説明する。
A specific transmission procedure executed by the
S41でメインモジュール3(通信処理部)は、データ送信命令を含むメッセージ1301を送信し、拡張モジュール4が受信する。図13が示すようにメッセージ1301は、送信先(例:拡張モジュール4a)、送信元(例:メインモジュール3)、シーケンス番号、データ送信命令、演算結果(最初のメッセージには含まれていない)、タイムスタンプ、およびCRCを含む。図13が示すように、CRCは、送信先からタイムスタンプまでのデータから演算される。このメッセージには返信期限(例:0.1ミリ秒〜1.0ミリ秒)が設定されているものと仮定する。
In S41, the main module 3 (communication processing unit) transmits a
S42で拡張モジュール4が、受信されたメッセージのうち送信先からタイムスタンプまでのデータからCRCを演算し、メッセージに付加されていたCRCと一致するかを判定する。仮に二つのCRCが不一致であれば、S43で、拡張モジュール4がリトライ要求を送信し、メインモジュール3がメッセージを再送する。
In S42, the expansion module 4 calculates the CRC from the data from the destination to the time stamp of the received message, and determines whether or not it matches the CRC added to the message. If the two CRCs do not match, in S43, the expansion module 4 sends a retry request, and the
S44で拡張モジュール4は安全入力機器から入力された安全入力信号を取得する。 In S44, the expansion module 4 acquires the safety input signal input from the safety input device.
S45で拡張モジュール4は安全入力信号を入力値(入力データ)に変換し、データ送信のためのメッセージ1302を作成する。図13が示すように、メッセージ1302は、送信先(例:メインモジュール3)、送信元(例:拡張モジュール4a)、シーケンス番号、入力値、タイムスタンプ、およびCRCを含む。図13が示すように、CRCは、送信先からタイムスタンプまでのデータから演算される。メッセージ1302のシーケンス番号は、メッセージ1301に含まれていたシーケンス番号に1が加算されたものである。
In S45, the expansion module 4 converts the safety input signal into an input value (input data) and creates a
S46で拡張モジュール4は入力値を含むメッセージ1302をメインモジュール3に送信し、メインモジュール3がメッセージ1302を受信する。メッセージ1302には、メッセージ1301の受信が成功したことを示すアクノレッジが含まれていてもよい。
In S46, the expansion module 4 transmits the
S47でメインモジュール3はメッセージ1302についてCRCチェックを行う。メインモジュール3は受信されたメッセージ1302のうち送信先からタイムスタンプまでのデータからCRCを演算し、メッセージ1302に付加されていたCRCと一致するかを判定する。仮に二つのCRCが不一致であれば、S48で、メインモジュール3がリトライ要求を送信し、拡張モジュール4がメッセージを再送する。ここで、タイムアウト期間が2ミリ秒に設定されたと仮定すると、最大で8回のメッセージの送受信が可能となる。なお、タイムアウト期間内にエラーのないメッセージ1302が受信されなかった場合、メインモジュール3は、安全出力信号を強制的にOFFにする。
In S47, the
なお、8個のメッセージ1302が連続して送信されてもよい。この場合、メインモジュール3は、8個のメッセージ1302のうち最初にCRCチェックに合格したメッセージ1302を採用してもよい。あるいは、メインモジュール3は、8個のメッセージ1302のうち最後にCRCチェックに合格したメッセージ1302(つまり最新データ)を採用してもよい。あるいは、メインモジュール3は、8個のメッセージ1302のうちCRCチェックに合格したメッセージ1302をランダムに選択してもよい。
It should be noted that eight
S49でメインモジュール3は、メッセージ1302から抽出した入力値(安全入力信号)に基づき安全出力信号を演算して求める。演算手法はユーザプログラムによって定義されている。
In S49, the
S50でメインモジュール3は、演算結果(安全出力信号)を含むメッセージ1301を拡張モジュール4に送信し、拡張モジュール4がメッセージ1301を受信する。
In S50, the
S51で拡張モジュール4は、演算結果(安全出力信号)を含むメッセージ1301について上述のCRCチェックを実行する。CRCが不一致であれば、S52でメッセージ1301のリトライが実行される。タイムアウト期間内にエラーのないメッセージ1302が受信されなかった場合、拡張モジュール4は、安全出力信号を強制的にOFFにする。
In S51, the expansion module 4 executes the above-mentioned CRC check for the
S53で拡張モジュール4は、演算結果を安全出力信号に変換して動力源12のコンタクタなどに出力する。
In S53, the expansion module 4 converts the calculation result into a safety output signal and outputs it to the contactor of the
メインモジュール3は、1つのスキャンサイクル(1ミリ秒〜5ミリ秒程度)が経過した時点で正しいCRCが得られなかった場合にのみ安全出力信号を強制的にOFFにする。しかし、これは一例に過ぎない。たとえば、1度でもCRCの不一致が発生すると、メインモジュール3は安全出力信号を強制的にOFFにしてもよい。
The
(シーケンス番号)
上述されたように、メッセージのシーケンス番号は、メインモジュール3と拡張モジュール4とが交互に1ずつ更新して行く。たとえば、最初にメインモジュール3がシーケンス番号に「1」を設定してデータ送信命令を送信する。
次に、拡張モジュール4は、シーケンス番号に「2」を付与して入力値を返信する。次に、メインモジュール3はシーケンス番号に「2」が付与されたデータに基づき安全出力信号を演算する。次に、メインモジュール3はシーケンス番号に「3」を付与して新たな返信期限付きのデータ送信命令と、演算結果に基づく出力信号を送信する。このようなシーケンス番号の更新と送受信を繰り返すことでデータの正しい順番が維持される。たとえば、メインモジュール3がシーケンス番号に「1」を付与してデータを送信したところ、拡張モジュール4からシーケンス番号に「3」が付与されたデータを受信したと仮定する。この場合、データのシーケンスエラーであり、強制OFFが実行される。メインモジュール3はシーケンスエラーを検出すると、エラーを表示してもよいし、エラーとなったデータを廃棄してもよい。
シーケンス番号は、メインモジュール3と拡張モジュール4との組み合わせごとに管理されている。たとえば、メインモジュール3と拡張モジュール4aとの組み合わせで管理されるシーケンス番号と、メインモジュール3と拡張モジュール4bとの組み合わせで管理されるシーケンス番号とが独立していることを意味する。
(Sequence number)
As described above, the sequence number of the message is updated by the
Next, the expansion module 4 adds "2" to the sequence number and returns an input value. Next, the
The sequence number is managed for each combination of the
メインモジュール3と拡張モジュール4はタイムスタンプに基づいてデータの適時性を判定してもよい。ただし、これは、メインモジュール3と拡張モジュール4とが時刻同期していることが前提となる。
The
<まとめ>
図1が示すように、安全コントローラ1は、安全プログラムを実行するメインモジュール3と、当該メインモジュール3に接続された拡張モジュール4とを有した安全コントローラの一例である。図4が示すように、バスIF26aや受信処理部37は、一定の長さの繰り返し周期である期間スロットごとに、拡張モジュール4から入力値を受信する受信手段として機能する。実行エンジン40は、期間スロットごとに、安全プログラムを繰り返し実行する実行エンジンであって、入力値が受信されたi番目の期間スロットの次のi+1番目の期間スロットにおいて、当該入力値を用いて安全プログラムに従って出力値を演算する。安全出力IF22や出力処理部33、送信処理部38は出力値に対応する安全出力信号を安全出力機器に出力する出力手段として機能する。監視部41は、受信手段および実行エンジンを監視する監視手段として機能する。監視部41は、i番目の期間スロットにおいて受信手段による入力値の受信が完了しなかった場合、安全出力機器の動作が停止する安全出力信号を強制的に設定する。同様に、監視部41は、i+1番目の期間スロットにおいて実行エンジンによる出力値の演算が完了しなかった場合に、安全出力機器の動作が停止する安全出力信号を強制的に設定する。このように、期間スロットという概念を安全コントローラに導入することで、ユーザプログラムと通信の少なくとも一方に依存することなく、応答時間を保証または固定することが可能となる。
<Summary>
As shown in FIG. 1, the safety controller 1 is an example of a safety controller having a
期間スロットはメインモジュール3のMCU23によって演算されてもよい。メインモジュール3のMCU23は、メインモジュール3に実装されている通信の種類を把握しており、さらに、どの通信が有効であるかをユーザプログラムまたは設定データから認識できるからである。
The period slot may be calculated by the MCU 23 of the
図4が示すように、バスIF26aや受信処理部37は、i+1番目の期間スロットにおいて実行エンジンが出力値を求めているのと並行して、次の入力値を拡張モジュールから受信するように構成されていてもよい。
As shown in FIG. 4, the bus IF26a and the
図5が示すように、第一判定部51はi番目の期間スロット内で入力値を受信できたかどうかを判定する第一判定手段として機能してもよい。第一設定部61はi番目の期間スロット内で入力値を受信できなかった場合に、出力値を強制的にOFF状態に設定する第一設定手段として機能してもよい。
As shown in FIG. 5, the
図5が示すように第一警告部71はi番目の期間スロット内で入力値を受信できなかった場合に、第一警告情報を出力する第一警告手段として機能してもよい。
As shown in FIG. 5, the
図5が示すように、第二判定部52はi+1番目の期間スロット内で出力値の演算が完了したかどうかを判定する第二判定手段として機能してもよい。第二設定部62は、i+1番目の期間スロット内で出力値の演算が完了しなかった場合に、出力値を強制的にOFF状態に設定する第二設定手段として機能してもよい。
As shown in FIG. 5, the
図5が示すように、第二警告部72は、i+1番目の期間スロット内で出力値の演算が完了しなかった場合に、第二警告情報を出力する第二警告手段として機能してもよい。
As shown in FIG. 5, the
受信処理部37は、入力値の受信に成功するよう入力値の受信をリトライするように構成されていてもよい。
The
受信処理部37は、入力値についてCRCチェックを行うことで改ざん検出を実行するように構成されていてもよい。
The
受信処理部37は、入力値についてシーケンス番号を用いて拡張モジュールにアクノレッジを返信するように構成されていてもよい。これにより拡張モジュール4は、アクノレッジに付与されているシーケンス番号に基づきどの入力値の送信が成功したかを把握できる。肯定応答(Ack)が返送されない場合、または、否定応答(Nack)が返送された場合、拡張モジュール4は、シーケンス番号に基づき入力値の再送を実行してもよい。
The
期間スロットの長さは安全プログラムの処理量とは無関係に決定されてもよい。期間スロットは、安全コントローラ1について保証された応答時間に基づき定められてもよい。この場合、ユーザにとっては安全プログラムを作成する前に、安全距離が定まる利点がもたらされる。 The length of the period slot may be determined independently of the processing volume of the safety program. The period slot may be determined based on the response time guaranteed for the safety controller 1. In this case, the user has the advantage of determining the safety distance before writing the safety program.
図4が示すように、送信処理部38は、i+1番目の期間スロットにおいて実行エンジンにより求められた出力値を、i+1番目の期間スロットの次のi+2番目の期間スロットにおいて、他の拡張モジュールに送信する送信手段として機能してもよい。
As shown in FIG. 4, the
図5が示すように第三判定部53はi+2番目の期間スロット内で出力値の送信が完了したかどうかを判定する第三判定手段として機能する。第三設定部63はi+2番目の期間スロット内で出力値の送信が完了しなかった場合に、出力値を強制的にOFF状態に設定する第三設定手段として機能する。
As shown in FIG. 5, the
メインモジュール3は、安全入力機器と接続するコネクタ(例:IOコネクタ10a)をさらに有してもよい。実行エンジン40は、期間スロットごとに、コネクタを介して取得された入力値と、受信手段により受信された入力値とを用いて出力値を演算するように構成されていてもよい。
The
期間スロットの長さは、メインモジュール3に接続された拡張モジュールの台数に依存することなく一定の長さに決定されていてもよい。この場合、ユーザにとっては安全プログラムを作成する前に、安全距離が定まる利点がもたらされる。
The length of the period slot may be determined to be a constant length regardless of the number of expansion modules connected to the
図11を用いて説明されたように、メインモジュール3に接続される拡張モジュール4の数に依存することなく安全コントローラの応答時間が一定に保証されてもよい。また、メインモジュール3に拡張モジュール4が接続されないケースの応答時間は第一の応答時間xであり、メインモジュール3に一台以上の拡張モジュールが接続されるケースの応答時間は第二の応答時間yであってもよい。また、メインモジュール3に拡張モジュール4が接続されないケースの応答時間は第一の応答時間xであり、メインモジュール3に一台以上でかつN台までの拡張モジュール4が接続されるケースの応答時間は第二の応答時間y1であってもよい。また、メインモジュール3にN+1台以上の拡張モジュール4が接続されるケースの応答時間は第三の応答時間y2であってもよい。また、メインモジュール3に拡張モジュールが接続されないケースの応答時間は第一の応答時間xであり、メインモジュール3にリモートI/Oユニット8が接続されるケースの応答時間は、拡張モジュール4の接続台数に依存することなく、第二の応答時間yであり、メインモジュール3にリモートI/Oユニット8が接続されず、一台以上の拡張モジュール4が接続されるケースの応答時間は第一の応答時間xであってもよい。
As described with reference to FIG. 11, the response time of the safety controller may be guaranteed to be constant regardless of the number of expansion modules 4 connected to the
発明は上記の実施形態に制限されるものではなく、発明の要旨の範囲内で、種々の変形・変更が可能である。 The invention is not limited to the above-described embodiment, and various modifications and changes can be made within the scope of the gist of the invention.
Claims (17)
前記メインモジュールは、
一定の長さの繰り返し周期である期間スロットごとに、前記拡張モジュールから入力値を受信する受信手段と、
前記期間スロットごとに、前記安全プログラムを繰り返し実行する実行エンジンであって、前記入力値が受信されたi番目の期間スロットの次のi+1番目の期間スロットにおいて、当該入力値を用いて前記安全プログラムに従って出力値を演算する実行エンジンと、
前記出力値に対応する安全出力信号を安全出力機器に出力する出力手段と、
前記受信手段および前記実行エンジンを監視する監視手段と、を有し、
前記監視手段は、前記i番目の期間スロットにおいて前記受信手段による前記入力値の受信が完了しなかった場合、または、前記i+1番目の期間スロットにおいて前記実行エンジンによる前記出力値の演算が完了しなかった場合に、前記安全出力機器の動作が停止する前記安全出力信号を強制的に設定することを特徴とする安全コントローラ。 A safety controller having a main module that executes a safety program and an expansion module connected to the main module.
The main module
A receiving means for receiving an input value from the expansion module and a receiving means for receiving an input value from the expansion module for each period slot having a repeating cycle of a fixed length.
An execution engine that repeatedly executes the safety program for each period slot, and uses the input value in the i + 1th period slot next to the i-th period slot in which the input value is received. An execution engine that calculates the output value according to
An output means for outputting a safety output signal corresponding to the output value to a safety output device, and
It has the receiving means and the monitoring means for monitoring the execution engine.
The monitoring means does not complete the reception of the input value by the receiving means in the i-th period slot, or the calculation of the output value by the execution engine in the i + 1th period slot. A safety controller for forcibly setting the safety output signal at which the operation of the safety output device is stopped.
前記i番目の期間スロット内で前記入力値を受信できたかどうかを判定する第一判定手段と、
前記i番目の期間スロット内で前記入力値を受信できなかった場合に、前記出力値を強制的にOFF状態に設定する第一設定手段と
を有することを特徴とする請求項1または2に記載の安全コントローラ。 The monitoring means
A first determination means for determining whether or not the input value could be received within the i-th period slot, and
The first or second aspect of claim 1 or 2, further comprising a first setting means for forcibly setting the output value to the OFF state when the input value cannot be received in the i-th period slot. Safety controller.
前記i+1番目の期間スロット内で前記出力値の演算が完了したかどうかを判定する第二判定手段と、
前記i+1番目の期間スロット内で前記出力値の演算が完了しなかった場合に、前記出力値を強制的にOFF状態に設定する第二設定手段と
をさらに有することを特徴とする請求項1ないし4のいずれか一項に記載の安全コントローラ。 The monitoring means
A second determination means for determining whether or not the calculation of the output value is completed in the i + 1th period slot, and
Claims 1 to 1, further comprising a second setting means for forcibly setting the output value to the OFF state when the calculation of the output value is not completed in the i + 1th period slot. The safety controller according to any one of 4.
前記i+2番目の期間スロット内で前記出力値の送信が完了したかどうかを判定する第三判定手段と、
前記i+2番目の期間スロット内で前記出力値の送信が完了しなかった場合に、前記出力値を強制的にOFF状態に設定する第三設定手段と
をさらに有することを特徴とする請求項11に記載の安全コントローラ。 The monitoring means
A third determination means for determining whether or not the transmission of the output value is completed within the i + 2nd period slot, and
The eleventh aspect of claim 11 further includes a third setting means for forcibly setting the output value to the OFF state when the transmission of the output value is not completed within the i + second period slot. Described safety controller.
安全入力機器と接続するコネクタをさらに有し、
前記実行エンジンは、前記期間スロットごとに、前記コネクタを介して取得された入力値と、前記受信手段により受信された前記入力値とを用いて前記出力値を演算するように構成されていることを特徴とする請求項1ないし12のいずれか一項に記載の安全コントローラ。 The main module
It also has a connector to connect to safety input devices,
The execution engine is configured to calculate the output value for each period slot by using the input value acquired via the connector and the input value received by the receiving means. The safety controller according to any one of claims 1 to 12, wherein the safety controller is characterized.
前記メインモジュールは、
前記拡張モジュールから入力値を受信する受信手段と、
前記入力値を用いて前記安全プログラムに従って出力値を演算する実行エンジンと、
前記出力値に対応する安全出力信号を安全出力機器に出力する出力手段と、
前記受信手段および前記実行エンジンを監視する監視手段と、を備え、
前記監視手段は、前記メインモジュールに接続される前記拡張モジュールの台数が1台以上である第1の台数のときと、当該第1の台数とは異なる1台以上である第2の台数のときとで、前記安全コントローラの応答時間が一定に保証されるよう前記受信手段および前記実行エンジンを監視することを特徴とする安全コントローラ。 A safety controller that has a main module that executes a safety program and an expansion module that is connected to the main module.
The main module
A receiving means for receiving an input value from the expansion module and
An execution engine that calculates an output value according to the safety program using the input value,
An output means for outputting a safety output signal corresponding to the output value to a safety output device, and
The receiving means and the monitoring means for monitoring the execution engine are provided.
The monitoring means is when the number of the expansion modules connected to the main module is one or more in the first number and when the number of the expansion modules is one or more different from the first number in the second number. The safety controller is characterized in that the receiving means and the execution engine are monitored so that the response time of the safety controller is guaranteed to be constant.
前記メインモジュールに一台以上の前記拡張モジュールが接続されるケースの応答時間は第二の応答時間であることを特徴とする請求項15に記載の安全コントローラ。 The response time in the case where the expansion module is not connected to the main module is the first response time.
The safety controller according to claim 15, wherein the response time in the case where one or more of the expansion modules are connected to the main module is the second response time.
前記受信手段は、さらに、前記リモートI/Oユニットから入力値を受信し、
前記監視手段は、前記メインモジュールに接続される前記リモートI/Oユニットが非接続のときと、前記リモートI/Oユニットが1台接続されたときとで、前記安全コントローラの応答時間が一定に保証されるよう前記受信手段を監視することを特徴とする請求項15または16に記載の安全コントローラ。 The safety controller further comprises a remote I / O unit connected to the main module.
The receiving means further receives an input value from the remote I / O unit and receives an input value.
In the monitoring means, the response time of the safety controller is constant when the remote I / O unit connected to the main module is not connected and when one remote I / O unit is connected. The safety controller according to claim 15 or 16, characterized in that the receiving means is monitored to be assured.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019209182A JP7332442B2 (en) | 2019-11-19 | 2019-11-19 | safety controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019209182A JP7332442B2 (en) | 2019-11-19 | 2019-11-19 | safety controller |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021082027A true JP2021082027A (en) | 2021-05-27 |
JP7332442B2 JP7332442B2 (en) | 2023-08-23 |
Family
ID=75965302
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019209182A Active JP7332442B2 (en) | 2019-11-19 | 2019-11-19 | safety controller |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7332442B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7241989B1 (en) * | 2022-06-07 | 2023-03-17 | 三菱電機株式会社 | Program creation device, program creation method and program |
WO2023238221A1 (en) * | 2022-06-07 | 2023-12-14 | 三菱電機株式会社 | Extension module, operation mode switching method, and program |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1396963B1 (en) | 2001-05-31 | 2010-01-27 | Omron Corporation | Safety network system and safety slaves and safety controller and communication method and information gathering method and monitoring method in safety network system |
WO2013010159A1 (en) | 2011-07-14 | 2013-01-17 | Siemens Corporation | Reducing the scan cycle time of control applications through multi-core execution of user programs |
WO2014041596A1 (en) | 2012-09-11 | 2014-03-20 | 三菱電機株式会社 | Safety controller |
-
2019
- 2019-11-19 JP JP2019209182A patent/JP7332442B2/en active Active
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7241989B1 (en) * | 2022-06-07 | 2023-03-17 | 三菱電機株式会社 | Program creation device, program creation method and program |
WO2023238221A1 (en) * | 2022-06-07 | 2023-12-14 | 三菱電機株式会社 | Extension module, operation mode switching method, and program |
WO2023238220A1 (en) * | 2022-06-07 | 2023-12-14 | 三菱電機株式会社 | Program creation device, program creation method, and program |
Also Published As
Publication number | Publication date |
---|---|
JP7332442B2 (en) | 2023-08-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6909923B2 (en) | Safety communication on a single backplane | |
US6891850B1 (en) | Network independent safety protocol for industrial controller | |
JP3978617B2 (en) | Safety unit input device | |
JP3965699B2 (en) | Information processing apparatus and information processing method | |
JP7332442B2 (en) | safety controller | |
US20090077455A1 (en) | Transmission system | |
US8874818B2 (en) | Safety arrangement | |
JP5123968B2 (en) | Communication control method, communication control program, and master communication device | |
JPS6072351A (en) | Method for supervising operating condition of packet communication system | |
US7802150B2 (en) | Ensuring maximum reaction times in complex or distributed safe and/or nonsafe systems | |
JP5396812B2 (en) | Transmission control apparatus and transmission control method | |
JP2720513B2 (en) | Communication method and communication system device used for the communication method | |
JP2001177508A (en) | Radio communication equipment | |
JP2005073075A (en) | Remote monitoring and control system | |
JP5886510B2 (en) | Transmission control apparatus and transmission control method | |
JP2008205899A (en) | Transmission failure avoiding method in transmission/reception system | |
JP2002202920A (en) | Input/output unit and its internal data communication method | |
JPS6239929A (en) | Data transmission equipment | |
JP3786045B2 (en) | Control repeater for self-report receiver | |
CN115687509A (en) | Synchronization method of safety computer system and corresponding system and device | |
JPH07203555A (en) | Multiplex transmitter | |
JP2008109325A (en) | Communication system | |
JP2001126166A (en) | Annunciator controller | |
JPH0612290A (en) | Control data monitor system | |
JPS63138827A (en) | Data transmission equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20210113 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20220912 |
|
TRDD | Decision of grant or rejection written | ||
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20230726 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20230731 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230810 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7332442 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |