JP2004102791A - Synchronous system for programmable controller - Google Patents

Synchronous system for programmable controller Download PDF

Info

Publication number
JP2004102791A
JP2004102791A JP2002265445A JP2002265445A JP2004102791A JP 2004102791 A JP2004102791 A JP 2004102791A JP 2002265445 A JP2002265445 A JP 2002265445A JP 2002265445 A JP2002265445 A JP 2002265445A JP 2004102791 A JP2004102791 A JP 2004102791A
Authority
JP
Japan
Prior art keywords
module
data
signal
option
plc
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.)
Pending
Application number
JP2002265445A
Other languages
Japanese (ja)
Inventor
Toshiyuki Miyamatsu
宮松 利行
Mitsunori Kuzushima
葛島 光則
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yaskawa Electric Corp
Original Assignee
Yaskawa Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yaskawa Electric Corp filed Critical Yaskawa Electric Corp
Priority to JP2002265445A priority Critical patent/JP2004102791A/en
Publication of JP2004102791A publication Critical patent/JP2004102791A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To make surely exchangeable data between a controller and control equipment without applying any limitation to the quantity of actually mounted optional modules. <P>SOLUTION: This synchronous system for a programmable controller is provided with a means for generating interruption signals 1 at regular intervals in a PLC (programable logic controller) module, a means for converting the frequency of the interruption signals 1 into a sampling frequency, a means for exchanging data between the PLC module and an optical module, a means for generating synchronous signals when the exchange of data between the PLC module and the optional module is completed, a means for inputting the synchronous signals into the optional module, a means for generating the interruption signals 2 and status signals at regular intervals based on the synchronous signals in the optional module, a means for discriminating the status signals when the interruption signals 2 are inputted, and a means for notifying the PLC module that the optional module stores the data of the PLC module. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、コントローラと制御機器間のデータの受け渡しを確実に行うことができるように定周期でデータ更新を行う機能を有する装置に関する。
【0002】
【従来の技術】
一般に、モジュール型のPLC装置は図6のような構成になっている(例えば特許文献1参照)。図6において、1プログラム入力装置で、アプリケーションプログラムS1を作成する。
【特許文献1】
特開平11−259105号公報(図4)
【0003】
2はPLCモジュールでアプリケーションプログラムSlにしたがい、オプションモジュール3との間で入出力データS2をバスを通して授受する。データの授受を行うタイミング(以下、サンプリング周期と呼ぶ)は一般にPLCモジュール2に搭載された水晶発振子からのクロックを元にして作成される。
オプションモジュール3は、動作の異なる複数種の中から任意のモジュールを複数枚実装できる。
オプションモジュール3のなかには制御データS3を定周期の更新周期でデータの入出力を行うことにより、複数の制御機器4、5を制御する種類も含まれる。この場合、サンプリング周期はオプションモジュール3に搭載された更新周期発生回路からの信号を元にして作成される。
【0004】
このように、サンプリング周期作成法には2種類がある。
PLCモジュール2に搭載された水晶発振子からのクロックを元にサンプリング周期を作成する場合のPLC装置の構成を図7に示す。図7において、2はPLCモジュールで、プログラマブルコントローラとしての機能を有している。
一般にPLCモジュール2は、データメモリ部21と、アプリケーションプログラムを記憶しているプログラムメモリ部20と、前記プログラムメモリ部20に格納された制御プログラムに従って演算する演算部22から構成される。
演算部(CPU)22は水晶発振子23からのクロック信号で動作する。24はサンプリング周期発生回路で、水晶発振子23からのクロック信号を元にユーザが設定したサンプリング周期を作成し、割込信号S5を演算部へ入力する。演算部は割込信号S5が入ると、割込信号S4を発生させ、オプションモジュールとの間でデータS2の授受を行う。
【0005】
3はオプションモジュールで、PLCモジュール2がセットしたデータを自モジュール内に格納するためのメモリ33と、PLCモジュール2からのデータS2と、CPU22からの割込信号を受けるための共有メモリ30と、水晶発振子34で動作するCPU31と、制御機器とのデータ授受をリアルタイムで行うためのデータ入出力部32から構成される。PLCモジュール2とオプションモジュール3との間の同期は割込信号S4によって保たれる。
オプションモジュール3に搭載された更新周期発生回路36からの信号を元にしてサンプリング周期を作成する場合のPLC装置の構成を図8に示す。図7と異なり、データを入出力する周期は更新周期発生回路36により作成される。PLCモジュール2と制御機器4との間でデータの整合性をとるために、更新周期発生回路36からの割込信号S6をオプションモジュール3のCPU31とPLCモジュール2のサンプリング周期発生回路24に同時に入力する。PLCモジュール2は自モジュール内の水晶発振子からの信号を使うことなくオプションモジュール3内の更新周期発生回路36からの割込信号を使用してサンプリング周期を作成する。
【0006】
このようなモジュール型のPLC装置においては、PLCモジュールとオプションモジュールは、それぞれCPUを搭載し、そのCPUは一般に別々の発振器からのクロックで動作する。図8に示したようなオプションモジュールではPLCモジュールからのデータはPLCモジュールのサンプリング周期で確実に制御機器まで受け渡すことができる。
【0007】
一方、図8に示したようなオプションモジュール3と図7に示したPLCモジュール2とで構成されるPLC装置では、たとえ同じサンプリング周期を設定しても、PLCモジュール2とオプションモジュール3のサンプリング周期は微妙にずれてくる。そのため、PLCモジュール2からのデータをオプションモジュール3が受け取れないタイミングが生じ、PLCモジュール2からの時々刻々のデータをオプションモジュール3を介して制御機器4まで確実に受け渡すことができない。
【0008】
図9を用いて説明する。図9において、▲1▼〜▲6▼はPLCモジュール2が時々刻々払い出すデータを示している。この例では、オプションモジュール3および制御機器4の更新周期を2ms、PLCモジュール2のサンプリング周期を2msとしている。一般にクロックに使用する水晶発振子の精度は100ppm程度であるため、PLCモジュール2で使用している水晶発振子とオプションモジュール3で使用している水晶発振子の誤差は最大200ppmである。よって、1/5000の誤差となる。2msでは、2ms±0.4μsとなり、10秒で1回分2ms周期が多いか少なくなる。図9は、PLCモジュール2で使用している水晶発振子がオプションモジュール3で使用している水晶発振子よりα分遅いと仮定した時の各モジュールの周期を表したものである。
図9において、徐々にPLCモジュール2のサンプリング周期とオプションモジュール3の更新周期がずれていき、時刻A、Bと近づき、時刻Cでオプションモジュール3の更新周期がPLCモジュール2のサンプリング周期を抜き、その結果、データ▲5▼が払い出せずデータを抜かす。時刻Cでは、本来はデータ▲6▼が制御機器4に送信されなければならないが、時刻Bと同じデータ▲5▼が制御機器4に送信されてしまう。すなわち、本来制御機器4に送信するデータは、▲1▼→▲2▼→▲3▼→▲4▼→▲5▼→▲6▼→・・・・であるのに対して、実際に制御機器4に送信されるデータは、▲1▼→▲2▼→▲3▼→▲4▼→▲5▼→▲5▼→▲6▼→・・・・となる。
【0009】
上記問題を防ぐため、従来は図8に示したPLCモジュール2を用いて、PLCモジュール2とオプションモジュール3のサンプリング周期がずれないようにしていた。
しかし、図8に示したPLCモジュール2の場合、必ず図8に示した機能を持っオプションモジュール3が実装されなければならないが、1枚しか搭載できないといった問題があった。
【0010】
【発明が解決しようとする課題】
そこで本発明の目的は、オプションモジュールの実装枚数に制限を加えることなく、コントローラと制御機器間のデータの受け渡しを確実に行うことができ、またPLCモジュールのサンプリング周期を生成しているクロックと、オプションモジュールと制御機器間の更新周期を生成しているクロック差を意識する必要がないプログラマブルコントローラ装置を提供することを目的とする。
【0011】
【課題を解決するための手段】
上記問題を解決するため、本発明のプログラマブルコントローラ装置は、プログラマブルコントローラとしての機能を有するPLCモジュールと、制御機器とデータの入出力を行う機能を有するオプションモジュールを備え、前記オプションモジュールと前記制御機器間は前記オプションモジュールからのデータを確実に制御機器まで渡すことができるように定周期でデータの入出力を行う機能を有する装置において、前記PLCモジュールにおいて定周期に割込信号1を発生させる手段と、前記割込信号1をサンプリング周期とする手段と、前記PLCモジュールと前記オプションモジュールでデータの受け渡しを行う手段と、前記PLCモジュールがオプションモジュールとのデータ受け渡しを完了した時に同期信号を発生させる手段と、前記同期信号をオプションモジュールに入力する手段と、オプションモジュールにおいて前記同期信号を元に定周期に割込信号2、およびステータス信号を発生させる手段と、前記割込信号2が入力された時に前記ステータス信号を判別する手段と、前記オプションモジュールが前記PLCモジュールのデータを格納したことを前記PLCモジュールに知らせる手段とを有し、前記同期信号が入力された時に、前記オプションモジュールが前記PLCモジュールのデータを格納し、前記同期信号が入力された時に、前記オプションモジュールは制御機器に出力するデータを算出して、更新周期ごとにデータを制御機器に出力し、前記PLCモジュールは同PLCモジュールのデータをオプションモジュールが取り込むまでは、ユーザプログラムを実行せず待機状態を保持し、前記オプションモジュールからのデータ格納完了信号により、ユーザプログラムを前記PLCモジュールが実行することにより、前記PLCモジュールと前記オプションモジュールの同期をとる構成としたものである。
また本発明のプログラマブルコントローラ装置は、プログラマブルコントローラとしての機能を有するPLCモジュールと、制御機器とデータの入出力を行う機能を有するオプションモジュールを備え、前記オプションモジュールと前記制御機器間は前記オプションモジュールからのデータを確実に制御機器まで渡すことができるように定周期でデータの入出力を行う機能を有する装置において、前記PLCモジュールにおいて定周期に割込信号1を発生させる手段と、前記割込信号1をサンプリング周期とする手段と、前記割込信号1をオプションモジュールに同期信号として入力させる手段と、前記PLCモジュールと前記オプションモジュールでデータの受け渡しを行う手段と、前記PLCモジュールのデータを前記オプションモジュールに格納することを前記オプションモジュールに知らせる手段と、オプションモジュールにおいて前記割込信号1を元に定周期に割込信号2、およびステータス信号を発生させる手段と、前記割込信号2が入力された時に前記ステータス信号を判別する手段と、前記オプションモジュールが前記PLCモジュールのデータを格納したことを前記PLCモジュールに知らせる手段とを有し、前記PLCモジュールからのデータ格納指令が入力された時に、前記オプションモジュールが前記PLCモジュールのデータを格納し、前記割込信号が入力された時にステータス信号を判別し更新周期であれば、前記オプションモジュールは制御機器に出力するデータを算出して、データを制御機器に出力し、前記PLCモジュールは同PLCモジュールのデータをオプションモジュールが取り込むまでは、ユーザプログラムを実行せず待機状態を保持し、前記オプションモジュールからのデータ格納完了信号により、ユーザプログラムを前記PLCモジュールが実行することにより、前記PLCモジュールと前記オプションモジュールの同期をとる構成としたものである。
【0012】
【発明の実施の形態】
以下、本発明の実施例を図に基づいて説明する。
図1は、本発明による制御装置の構成例である。図1において、100はPLCモジュールで、プログラマブルコントローラとしての機能を有している。一般にプログラマブルコントローラは、外部の信号を取り込むための入力部110と、外部へ信号を出力するための出力部111と、データメモリ部112と、ユーザプログラムを記憶しているプログラムメモリ部114と、前記プログラムメモリ部に格納された制御プログラムに従って演算する演算部113から構成される。一般に演算部(CPU)は水晶発振子115からのクロック信号で動作する。116はサンプリング周期発生回路で、ソフトウェアまたはハードウェアで設定された周期に従って、割込信号S14が出力される。前記サンプリング周期発生回路116からの出力信号である割込信号S14がCPU113に入力された時に、プログラマブルコントローラの入力、出力および演算を実行する。データの入出力が完了した時に、オプションモジュールに対し同期信号S15が出力される。200は、オプションモジュールで、PLCモジュールがセットしたデータを自モジュール内に格納するためのメモリ225と、PLCモジュール100からのデータS11と、データS11をメモリ225に格納した時にPLCモジュールl00にデータS11の取り込みが完了したことを知らせるデータ格納完了S12を格納するための共有メモリ220と、水晶発振子224で動作するCPU221と、制御機器にデータを出力するためのデータ入出力部222と、PLCモジュールl00からの出力信号である同期信号S15に同期してオプションモジュール200と制御機器間の更新周期を生成する更新周期発生回路223から構成される。また、更新周期発生回路223からの出力が割込信号S13として、オプションモジュール200のCPU221に入力される。
【0013】
図2は、本発明の実施例におけるPLCモジュール100からの同期信号S15に同期した更新周期を発生する更新周期発生回路の動作を説明した図である。図2において、同期信号S15が更新周期より遅い場合と速い場合に分けて説明する。遅い場合の例では同期信号S15を4ms、更新周期を2msとし、同期信号S15が更新周期の2倍としている。この場合、同期信号S15に同期して割込信号S13、およびステータス信号S16として▲1▼(▲1▼は同期信号S15が入力され、かつ更新周期であることを表している)を発生し、この時点から2ms経過後、次の割込信号S13、およびステータス信号S16として▲2▼(▲2▼は同期信号S15は入力されておらず、更新周期のみであることを表している)を発生し、次の同期信号S15に同期して割込信号S13、ステータス信号S16として▲1▼を出力する。前記を繰り返して割込信号S13、ステータス信号S16を発生させる。更新周期は、割込信号S13が入力された時に、ステータス信号S16をソフトウェアもしくはハードウェアで判別することで生成される。
一方、速い場合の例では同期信号S15を2ms、更新周期を4msとし、同期信号S15が更新周期の1/2倍としている。この場合、同期信号S15に同期して割込信号S13、およびステータス信号S16として▲1▼(▲1▼は同期信号S15が入力され、かつ更新周期であることを表している)を発生し、次の同期信号S15では、割込信号S13、およびステータス信号S16として▲3▼(▲3▼は同期信号S15が入力され、かつ更新周期ではないことを表している)を発生し、次の同期信号S15に同期して割込信号S13、ステータス信号S16として▲1▼を出力する。前記を繰り返して割込信号S13、ステータス信号S16を発生させる。
【0014】
図3は、PLCモジュール100のサンプリング周期発生回路116から割込信号S14が入力された時の、オプションモジュール200とPLCモジュール100のソフトウェアの動作、およびオプションモジュール200の更新周期発生回路223から割込信号S13が入力された時のオプションモジュール200のソフトウェアの動作を説明した図である。
図3において、割込信号S14がPLCモジュール100のCPU113に入力されると、PLCモジュール100はまず、外部機器との入出力を行い(ステート10)、入出力が完了した時に同期信号S15をオプションモジュールに出力し、オプションモジュール200からのデータ格納完了待ちとなる(ステート11)。オプションモジュール200からデータ格納完了S12が共有メモリ220にセットされると、プログラムメモリ部114に格納されたユーザプログラムが実行され、そのユーザプログラムの中で時々刻々のデータが共有メモリ220にセットされる(ステート12)。
一方、オプションモジュール200は、同期信号S15から更新周期発生回路により割込信号S13、およびステータス信号S16がオプションモジュールのCPU221に入力されると、まずステータス信号S16を判別する。このステータス信号S16の内容によりそれぞれの処理を実行する。まず、▲1▼(同期信号S15が入力され、かつ更新周期である)の場合、PLCモジュール100が共有メモリ220にセットしたデータを自モジュール内のメモリ225に格納する。このデータを積算して、制御機器への出力の総データ量とする(ステート20)。格納が完了すると、データ格納完了S12を共有メモリ220にセットして、データの取り込みが完了したことをPLCモジュール100に知らせる(ステート21)。
【0015】
次に、総データ量から今回出力するデータを作成して(ステート22)、制御機器に出力する(ステート23)。
次に▲2▼(同期信号S15は入力されておらず、更新周期のみである)の場合は、総データ量から今回出力するデータを作成して(ステート22)、制御機器に出力する(ステート23)。
また▲3▼(同期信号S15が入力され、かつ更新周期ではない)の場合は、PLCモジュール100が共有メモリ220にセットしたデータを自モジュール内のメモリ225に格納する。このデータを総データ量に積算して、新たな総データ量とする(ステート20)。格納が完了すると、データ格納完了S12を共有メモリ220にセットして、データの取り込みが完了したことをPLCモジュール100に知らせる(ステート21)。
【0016】
次に、本発明の第2の実施例を図に基づいて説明する。
図4は、本発明による制御装置の構成例である。図4において、100はPLCモジュールで、プログラマブルコントローラとしての機能を有している。一般にプログラマブルコントローラは、外部の信号を取り込むための入力部110と、外部へ信号を出力するための出力部111と、データメモリ部112と、ユーザプログラムを記憶しているプログラムメモリ部114と、前記プログラムメモリ部に格納された制御プログラムに従って演算する演算部113から構成される。一般に演算部(CPU)は水晶発振子115からのクロック信号で動作する。116はサンプリング周期発生回路で、ソフトウェアまたはハードウェアで設定された周期に従って、割込信号S14およびオプションモジュール200への出力信号である同期信号S15が出力される。前記サンプリング周期発生回路116からの出力信号である割込信号S14がCPU113に入力された時に、プログラマブルコントローラの入力、出力および演算を実行する。データの入出力が完了した時に、オプションモジュールに対しデータ格納指令S17がオプションモジュール200の共有メモリ220に格納される。200は、オプションモジュールで、PLCモジュールがセットしたデータを自モジュール内に格納するためのメモリ225と、PLCモジュール100からのデータS11と、データS11をメモリ225に格納した時にPLCモジュール100にデータS11の取り込みが完了したことを知らせるデータ格納完了S12を格納するための共有メモリ220と、水晶発振子224で動作するCPU221と、制御機器にデータを出力するためのデータ入出力部222と、PLCモジュール100からの出力信号である同期信号S15に同期してオプションモジュール200と制御機器間の更新周期を生成する更新周期発生回路223から構成される。また、更新周期発生回路223からの出力が割込信号S13として、オプションモジュール200のCPU221に入力される。
【0017】
図2は、最初の実施例と同じく、本発明の実施例におけるPLCモジュール100からの同期信号S15に同期した更新周期を発生する更新周期発生回路の動作を説明した図である。図2において、同期信号S15が更新周期より遅い場合と速い場合に分けて説明する。遅い場合の例では同期信号S15を4ms、更新周期を2msとし、同期信号S15が更新周期の2倍としている。この場合、同期信号S15に同期して割込信号S13、およびステータス信号S16として▲1▼(▲1▼は同期信号S15が入力され、かつ更新周期であることを表している)を発生し、この時点から2ms経過後、次の割込信号S13、およびステータス信号S16として▲2▼(▲2▼は同期信号S15は入力されておらず、更新周期のみであることを表している)を発生し、次の同期信号S15に同期して割込信号S13、ステータス信号S16として▲1▼を出力する。前記を繰り返して割込信号S13、ステータス信号S16を発生させる。更新周期は、割込信号S13が入力された時に、ステータス信号S16をソフトウェアもしくはハードウェアで判別することで生成される。
一方、速い場合の例では同期信号S15を2ms、更新周期を4msとし、同期信号S15が更新周期の1/2倍としている。この場合、同期信号S15に同期して割込信号S13、およびステータス信号S16として▲1▼(▲1▼は同期信号S15が入力され、かつ更新周期であることを表している)を発生し、次の同期信号S15では、割込信号S13、およびステータス信号S16として▲3▼(▲3▼は同期信号S15が入力され、かつ更新周期ではないことを表している)を発生し、次の同期信号S15に同期して割込信号S13、ステータス信号S16として▲1▼を出力する。前記を繰り返して割込信号S13、ステータス信号S16を発生させる。
【0018】
図5は、PLCモジュール100のサンプリング周期発生回路116から割込信号S14が入力された時の、オプションモジュール200とPLCモジュール100のソフトウェアの動作、およびオプションモジュール200の更新周期発生回路223から割込信号S13が入力された時のオプションモジュール200のソフトウェアの動作を説明した図である。
図5において、割込信号S14がPLCモジュール100のCPU113に入力されると、PLCモジュール100はまず、外部機器との入出力を行い(ステート10)、入出力が完了した時にデータ格納指令S17を共有メモリ220にセットし、オプションモジュール200からのデータ格納完了待ちとなる(ステート11)。オプションモジュール200からデータ格納完了S12が共有メモリ220にセットされると、プログラムメモリ部114に格納されたユーザプログラムが実行され、そのユーザプログラムの中で時々刻々のデータが共有メモリ220にセットされる(ステート12)。
一方、オプションモジュール200は、同期信号S15から更新周期発生回路により割込信号S13、およびステータス信号S16がオプションモジュールのCPU221に入力されると、まずステータス信号S16を判別する。このステータス信号S16の内容によりそれぞれの処理を実行する。まず、▲1▼(同期信号S15が入力され、かつ更新周期である)の場合、PLCモジュール100からのデータ格納指令S17待ちとなる(ステート20)。PLCモジュール100からデータ格納指令S17が共有メモリ220にセットされると、PLCモジュール100が共有メモリ220にセットしたデータを自モジュール内のメモリ225に格納する。このデータを積算して、制御機器への出力の総データ量とする(ステート21)。格納が完了すると、データ格納完了S12を共有メモリ220にセットして、データの取り込みが完了したことをPLCモジュール100に知らせる(ステート22)。次に、総データ量から今回出力するデータを作成して(ステート23)、制御機器に出力する(ステート24)。
【0019】
次に▲2▼(同期信号S15は入力されておらず、更新周期のみである)の場合は、総データ量から今回出力するデータを作成して(ステート23)、制御機器に出力する(ステート24)。
また▲3▼(同期信号S15が入力され、かつ更新周期ではない)の場合は、PLCモジュール100からのデータ格納指令S17待ちとなる(ステート20)。PLCモジュール100からデータ格納指令S17が共有メモリ220にセットされると、PLCモジュール100が共有メモリ220にセットしたデータを自モジュール内のメモリ225に格納する。このデータを総データ量に積算して、新たな総データ量とする(ステート21)。格納が完了すると、データ格納完了S12を共有メモリ220にセットして、データの取り込みが完了したことをPLCモジュール100に知らせる(ステート22)。
【0020】
【発明の効果】
以上述べたように本発明によれば、PLCモジュールが払い出すデータを、オプションモジュールを介して、確実に制御機器まで渡すことができ、モジュール型の制御装置で同期制御が可能となる効果がある。
また、1枚のオプションモジュールで接続可能な制御機器を超える制御装置においても、必要数分のオプションモジュールを追加し、PLCモジュールに同期させることで、PLCモジュールが払い出すデータを、複数のオプションモジュールを介して、確実に制御機器まで渡すことができ、複数のオプションモジュールを使用した多数の制御機器を使用した制御装置で同期制御が可能となる効果がある。また、データを生成するPLCモジュールはプログラマブルであるため、任意のデータパターン(データの集まり)を生成することができるので、制御機器で構成される機械の動作に柔軟に対応できる。従って、高性能、高機能な機械をPLC装置で構成することが可能となる効果がある。
【図面の簡単な説明】
【図1】本発明の実施例である。
【図2】本発明の実施例における更新周期発生回路の説明図である。
【図3】本発明の実施例におけるPLCモジュールとオプションモジュールのソフトウェア説明図である。
【図4】本発明の第2の実施例である。
【図5】本発明の第2の実施例におけるPLCモジュールとオプションモジュールのソフトウェア説明図である。
【図6】一般のモジュール型のPLC装置の構成概略図である。
【図7】従来技術を示すブロック図である。
【図8】従来技術を示すブロック図である。
【図9】従来技術における問題点を説明するためのタイムチャートである。
【符号の説明】
1 プログラム入力装置
2、100 PLCモジュール
3、200 オプションモジュール
4、5 制御機器
21、112 データメモリ部
22、31、113、221 CPU
20、114 プログラムメモリ部
23、34、115、224 水晶発振子
24、116 サンプリング周期発生回路
30、220 共有メモリ
32、35、222 データ入出力部
36、223 更新周期発生回路
33、225 メモリ
110 入力部
111 出力部
S2、S11 データ
S4、S5、S6、S13、S14 割込信号
S12 データ格納完了
S15 同期信号
S16 ステータス信号
S17 データ格納指令
10〜14、20〜24 ステート
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an apparatus having a function of updating data at regular intervals so that data can be reliably transferred between a controller and a control device.
[0002]
[Prior art]
Generally, a modular PLC device has a configuration as shown in FIG. 6 (see, for example, Patent Document 1). In FIG. 6, an application program S1 is created by one program input device.
[Patent Document 1]
JP-A-11-259105 (FIG. 4)
[0003]
Reference numeral 2 denotes a PLC module which sends and receives input / output data S2 to and from the option module 3 via a bus according to the application program Sl. The timing for transmitting and receiving data (hereinafter, referred to as a sampling period) is generally created based on a clock from a crystal oscillator mounted on the PLC module 2.
The optional module 3 can mount a plurality of arbitrary modules from a plurality of types having different operations.
The option module 3 includes a type of controlling the plurality of control devices 4 and 5 by inputting / outputting the control data S3 at a constant update cycle. In this case, the sampling cycle is created based on a signal from the update cycle generation circuit mounted on the option module 3.
[0004]
Thus, there are two types of sampling period creation methods.
FIG. 7 shows a configuration of a PLC device when a sampling period is created based on a clock from a crystal oscillator mounted on the PLC module 2. In FIG. 7, reference numeral 2 denotes a PLC module, which has a function as a programmable controller.
In general, the PLC module 2 includes a data memory unit 21, a program memory unit 20 storing an application program, and a calculation unit 22 that performs calculation according to a control program stored in the program memory unit 20.
The operation unit (CPU) 22 operates with a clock signal from the crystal oscillator 23. Reference numeral 24 denotes a sampling cycle generation circuit which creates a sampling cycle set by a user based on a clock signal from the crystal oscillator 23 and inputs an interrupt signal S5 to the arithmetic unit. When receiving the interrupt signal S5, the arithmetic unit generates an interrupt signal S4 and exchanges data S2 with the option module.
[0005]
Reference numeral 3 denotes an optional module, a memory 33 for storing data set by the PLC module 2 in its own module, data S2 from the PLC module 2, and a shared memory 30 for receiving an interrupt signal from the CPU 22; It comprises a CPU 31 operated by a crystal oscillator 34 and a data input / output unit 32 for transmitting and receiving data to and from a control device in real time. Synchronization between the PLC module 2 and the option module 3 is maintained by the interrupt signal S4.
FIG. 8 shows a configuration of a PLC device in a case where a sampling cycle is created based on a signal from the update cycle generating circuit 36 mounted on the option module 3. Unlike FIG. 7, the cycle for inputting and outputting data is created by the update cycle generating circuit 36. In order to ensure data consistency between the PLC module 2 and the control device 4, the interrupt signal S6 from the update cycle generation circuit 36 is simultaneously input to the CPU 31 of the option module 3 and the sampling cycle generation circuit 24 of the PLC module 2. I do. The PLC module 2 creates a sampling cycle using an interrupt signal from the update cycle generating circuit 36 in the option module 3 without using a signal from a crystal oscillator in the module itself.
[0006]
In such a modular PLC device, each of the PLC module and the option module has a CPU mounted thereon, and the CPU generally operates with clocks from different oscillators. In the optional module as shown in FIG. 8, data from the PLC module can be reliably transferred to the control device at the sampling cycle of the PLC module.
[0007]
On the other hand, in a PLC device including the option module 3 as shown in FIG. 8 and the PLC module 2 as shown in FIG. 7, even if the same sampling cycle is set, the sampling cycle of the PLC module 2 and the option module 3 Slightly shifts. Therefore, there occurs a timing at which the option module 3 cannot receive the data from the PLC module 2, and it is impossible to reliably transfer the instantaneous data from the PLC module 2 to the control device 4 via the option module 3.
[0008]
This will be described with reference to FIG. In FIG. 9, (1) to (6) indicate data that the PLC module 2 pays out momentarily. In this example, the update cycle of the option module 3 and the control device 4 is 2 ms, and the sampling cycle of the PLC module 2 is 2 ms. In general, the accuracy of the crystal oscillator used for the clock is about 100 ppm, and the error between the crystal oscillator used in the PLC module 2 and the crystal oscillator used in the option module 3 is 200 ppm at the maximum. Therefore, the error is 1/5000. At 2 ms, it becomes 2 ms ± 0.4 μs, and the period of 2 ms for one time in 10 seconds is larger or smaller. FIG. 9 shows the cycle of each module when it is assumed that the crystal oscillator used in the PLC module 2 is later than the crystal oscillator used in the option module 3 by α.
In FIG. 9, the sampling cycle of the PLC module 2 and the update cycle of the option module 3 gradually shift from each other, approaching the times A and B, and at time C, the update cycle of the option module 3 exceeds the sampling cycle of the PLC module 2. As a result, data (5) cannot be paid out and data is skipped. At time C, data {circle around (6)} should be transmitted to the control device 4, but the same data {circle over (5)} at time B is transmitted to the control device 4. That is, the data originally transmitted to the control device 4 is (1) → (2) → (3) → (4) → (5) → (6) →. The data transmitted to the device 4 is (1) → (2) → (3) → (4) → (5) → (5) → (6) →.
[0009]
Conventionally, in order to prevent the above problem, the sampling cycle of the PLC module 2 and the sampling cycle of the option module 3 are not shifted by using the PLC module 2 shown in FIG.
However, in the case of the PLC module 2 shown in FIG. 8, the option module 3 having the function shown in FIG. 8 must be mounted, but there is a problem that only one module can be mounted.
[0010]
[Problems to be solved by the invention]
Therefore, an object of the present invention is to reliably transfer data between a controller and a control device without limiting the number of mounted optional modules, and to generate a sampling cycle of a PLC module with a clock, It is an object of the present invention to provide a programmable controller device that does not need to be aware of a clock difference that generates an update cycle between an option module and a control device.
[0011]
[Means for Solving the Problems]
In order to solve the above problem, a programmable controller device of the present invention includes a PLC module having a function as a programmable controller, and an option module having a function of inputting and outputting data to and from a control device. In a device having a function of inputting / outputting data at regular intervals so that data from the option module can be reliably transferred to the control device during the interval, means for generating an interrupt signal 1 at regular intervals in the PLC module Means for setting the interrupt signal 1 as a sampling period, means for transferring data between the PLC module and the option module, and generating a synchronization signal when the PLC module completes data transfer with the option module. Means Means for inputting the synchronization signal to the option module, means for generating an interrupt signal 2 and a status signal at regular intervals based on the synchronization signal in the option module, and means for outputting the status when the interrupt signal 2 is input Means for discriminating a signal, and means for notifying the PLC module that the option module has stored data of the PLC module. When the synchronization signal is input, the option module transmits the data of the PLC module. When the synchronization signal is input, the option module calculates data to be output to the control device, outputs the data to the control device at each update cycle, and the PLC module outputs the data of the PLC module. Until the option module is loaded, the user program And the PLC module executes the user program in response to a data storage completion signal from the option module, thereby synchronizing the PLC module and the option module. is there.
Further, the programmable controller device of the present invention includes a PLC module having a function as a programmable controller, and an option module having a function of inputting and outputting data to and from a control device. Means for generating an interrupt signal 1 at a fixed period in the PLC module, the device having a function of inputting and outputting data at a fixed period so that the data of the interrupt signal can be reliably transferred to the control device; A sampling period, a means for inputting the interrupt signal 1 to the option module as a synchronization signal, a means for transferring data between the PLC module and the option module, and a method for transferring data of the PLC module to the option module. Module Means for notifying the option module that the interrupt signal is to be stored in the option module, means for generating an interrupt signal 2 and a status signal at regular intervals based on the interrupt signal 1 in the option module, and an input of the interrupt signal 2. Means for discriminating the status signal at the time of having, and means for notifying the PLC module that the option module has stored data of the PLC module, and when a data storage command is input from the PLC module, The option module stores the data of the PLC module, determines the status signal when the interrupt signal is input, and determines that the update signal is an update cycle. The option module calculates data to be output to a control device, and converts the data. Output to the control device, and the PLC module Until the option module takes in the data, the CPU module does not execute the user program and holds a standby state. The PLC module executes the user program in response to the data storage completion signal from the option module, so that the PLC module and the The configuration is such that the option modules are synchronized.
[0012]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a configuration example of a control device according to the present invention. In FIG. 1, a PLC module 100 has a function as a programmable controller. Generally, the programmable controller includes an input unit 110 for receiving an external signal, an output unit 111 for outputting a signal to the outside, a data memory unit 112, a program memory unit 114 storing a user program, It comprises an operation unit 113 that performs an operation according to a control program stored in the program memory unit. Generally, the arithmetic unit (CPU) operates with a clock signal from the crystal oscillator 115. Reference numeral 116 denotes a sampling cycle generation circuit which outputs an interrupt signal S14 in accordance with a cycle set by software or hardware. When an interrupt signal S14, which is an output signal from the sampling cycle generation circuit 116, is input to the CPU 113, the input, output and calculation of the programmable controller are executed. When data input / output is completed, a synchronization signal S15 is output to the option module. An optional module 200 is a memory 225 for storing data set by the PLC module in its own module, data S11 from the PLC module 100, and a data S11 stored in the PLC module 100 when the data S11 is stored in the memory 225. Shared memory 220 for storing data storage completion S12 for notifying that data has been captured, CPU 221 operated by crystal oscillator 224, data input / output unit 222 for outputting data to control equipment, and PLC module The update cycle generation circuit 223 generates an update cycle between the option module 200 and the control device in synchronization with a synchronization signal S15 which is an output signal from the controller 100. The output from the update cycle generation circuit 223 is input to the CPU 221 of the option module 200 as an interrupt signal S13.
[0013]
FIG. 2 is a diagram illustrating the operation of the update cycle generation circuit that generates the update cycle synchronized with the synchronization signal S15 from the PLC module 100 according to the embodiment of the present invention. In FIG. 2, the case where the synchronization signal S15 is slower and the case where the synchronization signal S15 is faster than the update cycle will be described separately. In the case of the later case, the synchronization signal S15 is 4 ms, the update cycle is 2 ms, and the synchronization signal S15 is twice the update cycle. In this case, in synchronization with the synchronizing signal S15, an interrupt signal S13 and a status signal S16 generate (1) (where (1) indicates that the synchronizing signal S15 is input and the update period is present), After a lapse of 2 ms from this point, the following interrupt signal S13 and status signal S16 are generated (2) (where (2) indicates that the synchronization signal S15 has not been input and only the update cycle is present). Then, (1) is output as the interrupt signal S13 and the status signal S16 in synchronization with the next synchronization signal S15. By repeating the above, an interrupt signal S13 and a status signal S16 are generated. The update cycle is generated by determining the status signal S16 by software or hardware when the interrupt signal S13 is input.
On the other hand, in an example of a fast case, the synchronization signal S15 is 2 ms, the update cycle is 4 ms, and the synchronization signal S15 is 倍 of the update cycle. In this case, in synchronization with the synchronizing signal S15, an interrupt signal S13 and a status signal S16 generate (1) (where (1) indicates that the synchronizing signal S15 is input and the update period is present), In the next synchronizing signal S15, (3) (3 indicates that the synchronizing signal S15 is inputted and the update period is not reached) is generated as the interrupt signal S13 and the status signal S16, and the next synchronizing signal is generated. In synchronization with the signal S15, (1) is output as the interrupt signal S13 and the status signal S16. By repeating the above, an interrupt signal S13 and a status signal S16 are generated.
[0014]
FIG. 3 shows the operation of the software of the option module 200 and the PLC module 100 when the interruption signal S14 is input from the sampling cycle generation circuit 116 of the PLC module 100, and the interruption from the update cycle generation circuit 223 of the option module 200. FIG. 9 is a diagram illustrating an operation of software of the option module 200 when a signal S13 is input.
In FIG. 3, when the interrupt signal S14 is input to the CPU 113 of the PLC module 100, the PLC module 100 first performs input / output with an external device (state 10). When the input / output is completed, the synchronization signal S15 is optional. The data is output to the module and the completion of data storage from the option module 200 is waited (state 11). When the data storage completion S12 is set in the shared memory 220 from the option module 200, the user program stored in the program memory unit 114 is executed, and the momentary data in the user program is set in the shared memory 220. (State 12).
On the other hand, when the interrupt signal S13 and the status signal S16 are input to the CPU 221 of the option module from the synchronization signal S15 by the update cycle generation circuit, the option module 200 first determines the status signal S16. Each process is executed according to the contents of the status signal S16. First, in the case of (1) (the synchronization signal S15 is input and the update cycle is reached), the PLC module 100 stores the data set in the shared memory 220 in the memory 225 in the own module. This data is integrated to obtain a total data amount output to the control device (state 20). When the storage is completed, the data storage completion S12 is set in the shared memory 220 to notify the PLC module 100 that the data fetching is completed (state 21).
[0015]
Next, data to be output this time is created from the total data amount (state 22) and output to the control device (state 23).
Next, in the case of {circle around (2)} (the synchronization signal S15 has not been input and only the update period is present), the data to be output this time is created from the total data amount (state 22) and output to the control device (state 22). 23).
In the case of (3) (the synchronization signal S15 is input and the update period is not the same), the PLC module 100 stores the data set in the shared memory 220 in the memory 225 in the own module. This data is added to the total data amount to obtain a new total data amount (state 20). When the storage is completed, the data storage completion S12 is set in the shared memory 220 to notify the PLC module 100 that the data fetching is completed (state 21).
[0016]
Next, a second embodiment of the present invention will be described with reference to the drawings.
FIG. 4 is a configuration example of a control device according to the present invention. In FIG. 4, a PLC module 100 has a function as a programmable controller. Generally, the programmable controller includes an input unit 110 for receiving an external signal, an output unit 111 for outputting a signal to the outside, a data memory unit 112, a program memory unit 114 storing a user program, It comprises an operation unit 113 that performs an operation according to a control program stored in the program memory unit. Generally, the arithmetic unit (CPU) operates with a clock signal from the crystal oscillator 115. Reference numeral 116 denotes a sampling cycle generation circuit which outputs an interrupt signal S14 and a synchronization signal S15 as an output signal to the option module 200 in accordance with a cycle set by software or hardware. When an interrupt signal S14, which is an output signal from the sampling cycle generation circuit 116, is input to the CPU 113, the input, output and calculation of the programmable controller are executed. When data input / output is completed, a data storage instruction S17 for the option module is stored in the shared memory 220 of the option module 200. An optional module 200 is a memory 225 for storing data set by the PLC module in its own module, data S11 from the PLC module 100, and data S11 stored in the memory 225 when the data S11 is stored in the memory 225. Shared memory 220 for storing data storage completion S12 for notifying that data has been captured, CPU 221 operated by crystal oscillator 224, data input / output unit 222 for outputting data to control equipment, and PLC module The update cycle generation circuit 223 generates an update cycle between the option module 200 and the control device in synchronization with a synchronization signal S15 which is an output signal from the control module 100. The output from the update cycle generation circuit 223 is input to the CPU 221 of the option module 200 as an interrupt signal S13.
[0017]
FIG. 2 is a diagram illustrating the operation of the update cycle generation circuit that generates an update cycle synchronized with the synchronization signal S15 from the PLC module 100 in the embodiment of the present invention, as in the first embodiment. In FIG. 2, the case where the synchronization signal S15 is slower and the case where the synchronization signal S15 is faster than the update cycle will be described separately. In the case of the later case, the synchronization signal S15 is 4 ms, the update cycle is 2 ms, and the synchronization signal S15 is twice the update cycle. In this case, in synchronization with the synchronizing signal S15, an interrupt signal S13 and a status signal S16 generate (1) (where (1) indicates that the synchronizing signal S15 is input and the update period is present), After a lapse of 2 ms from this point, the following interrupt signal S13 and status signal S16 are generated (2) (where (2) indicates that the synchronization signal S15 has not been input and only the update cycle is present). Then, (1) is output as the interrupt signal S13 and the status signal S16 in synchronization with the next synchronization signal S15. By repeating the above, an interrupt signal S13 and a status signal S16 are generated. The update cycle is generated by determining the status signal S16 by software or hardware when the interrupt signal S13 is input.
On the other hand, in an example of a fast case, the synchronization signal S15 is 2 ms, the update cycle is 4 ms, and the synchronization signal S15 is 倍 of the update cycle. In this case, in synchronization with the synchronizing signal S15, an interrupt signal S13 and a status signal S16 generate (1) (where (1) indicates that the synchronizing signal S15 is input and the update period is present), In the next synchronizing signal S15, (3) (3 indicates that the synchronizing signal S15 is inputted and the update period is not reached) is generated as the interrupt signal S13 and the status signal S16, and the next synchronizing signal is generated. In synchronization with the signal S15, (1) is output as the interrupt signal S13 and the status signal S16. By repeating the above, an interrupt signal S13 and a status signal S16 are generated.
[0018]
FIG. 5 shows the operation of the software of the optional module 200 and the PLC module 100 when the interrupt signal S14 is input from the sampling cycle generating circuit 116 of the PLC module 100, and the interrupt from the update cycle generating circuit 223 of the optional module 200. FIG. 9 is a diagram illustrating an operation of software of the option module 200 when a signal S13 is input.
In FIG. 5, when an interrupt signal S14 is input to the CPU 113 of the PLC module 100, the PLC module 100 first performs input / output with an external device (state 10). When the input / output is completed, the PLC module 100 issues a data storage instruction S17. It is set in the shared memory 220, and waits for completion of data storage from the option module 200 (state 11). When the data storage completion S12 is set in the shared memory 220 from the option module 200, the user program stored in the program memory unit 114 is executed, and the momentary data in the user program is set in the shared memory 220. (State 12).
On the other hand, when the interrupt signal S13 and the status signal S16 are input to the CPU 221 of the option module from the synchronization signal S15 by the update cycle generation circuit, the option module 200 first determines the status signal S16. Each process is executed according to the contents of the status signal S16. First, in the case of {circle around (1)} (the synchronization signal S15 is input and the update period is reached), the process waits for a data storage command S17 from the PLC module 100 (state 20). When the data storage command S17 is set in the shared memory 220 from the PLC module 100, the data set in the shared memory 220 by the PLC module 100 is stored in the memory 225 in the own module. This data is integrated to make the total amount of data output to the control device (state 21). When the storage is completed, the data storage completion S12 is set in the shared memory 220 to notify the PLC module 100 that the data capture is completed (state 22). Next, data to be output this time is created from the total data amount (state 23) and output to the control device (state 24).
[0019]
Next, in the case of {circle around (2)} (the synchronization signal S15 has not been input and only the update period is present), the data to be output this time is created from the total data amount (state 23) and output to the control device (state 23). 24).
In the case of {circle around (3)} (the synchronization signal S15 is input and not at the update cycle), the process waits for a data storage command S17 from the PLC module 100 (state 20). When the data storage command S17 is set in the shared memory 220 from the PLC module 100, the data set in the shared memory 220 by the PLC module 100 is stored in the memory 225 in the own module. This data is added to the total data amount to obtain a new total data amount (state 21). When the storage is completed, the data storage completion S12 is set in the shared memory 220 to notify the PLC module 100 that the data capture is completed (state 22).
[0020]
【The invention's effect】
As described above, according to the present invention, the data paid out by the PLC module can be reliably transferred to the control device via the optional module, and the module type control device has the effect of enabling synchronous control. .
Even in a control device that exceeds the control devices connectable with one option module, the required number of option modules are added and synchronized with the PLC module, so that the data paid out by the PLC module can be transmitted to a plurality of option modules. The control device can be reliably transferred to the control device via the control module, and the synchronous control can be performed by a control device using a large number of control devices using a plurality of option modules. Further, since the PLC module for generating data is programmable, it can generate an arbitrary data pattern (collection of data), so that it can flexibly cope with the operation of a machine including a control device. Therefore, there is an effect that a high-performance and high-performance machine can be configured by the PLC device.
[Brief description of the drawings]
FIG. 1 is an embodiment of the present invention.
FIG. 2 is an explanatory diagram of an update cycle generation circuit according to the embodiment of the present invention.
FIG. 3 is a software explanatory diagram of a PLC module and an option module in the embodiment of the present invention.
FIG. 4 is a second embodiment of the present invention.
FIG. 5 is a software explanatory diagram of a PLC module and an option module according to a second embodiment of the present invention.
FIG. 6 is a schematic configuration diagram of a general modular PLC device.
FIG. 7 is a block diagram showing a conventional technique.
FIG. 8 is a block diagram showing a conventional technique.
FIG. 9 is a time chart for explaining a problem in the related art.
[Explanation of symbols]
1 Program input device 2, 100 PLC module 3, 200 Option module 4, 5 Control device 21, 112 Data memory unit 22, 31, 113, 221 CPU
20, 114 Program memory unit 23, 34, 115, 224 Crystal oscillator 24, 116 Sampling period generation circuit 30, 220 Shared memory 32, 35, 222 Data input / output unit 36, 223 Update period generation circuit 33, 225 Memory 110 input Unit 111 Output unit S2, S11 Data S4, S5, S6, S13, S14 Interrupt signal S12 Data storage completion S15 Synchronization signal S16 Status signal S17 Data storage command 10 to 14, 20 to 24 states

Claims (2)

プログラマブルコントローラとしての機能を有するPLCモジュールと、制御機器とデータの入出力を行う機能を有するオプションモジュールを備え、前記オプションモジュールと前記制御機器間は前記オプションモジュールからのデータを確実に制御機器まで渡すことができるように定周期でデータの入出力を行う機能を有する装置において、
前記PLCモジュールにおいて定周期に割込信号1を発生させる手段と、
前記割込信号1をサンプリング周期とする手段と、
前記PLCモジュールと前記オプションモジュールでデータの受け渡しを行う手段と、
前記PLCモジュールがオプションモジュールとのデータ受け渡しを完了した時に同期信号を発生させる手段と、
前記同期信号をオプションモジュールに入力する手段と、
オプションモジュールにおいて前記同期信号を元に定周期に割込信号2、およびステータス信号を発生させる手段と、
前記割込信号2が入力された時に前記ステータス信号を判別する手段と、
前記オプションモジュールが前記PLCモジュールのデータを格納したことを前記PLCモジュールに知らせる手段とを有し、
前記同期信号が入力された時に、前記オプションモジュールが前記PLCモジュールのデータを格納し、
前記同期信号が入力された時に、前記オプションモジュールは制御機器に出力するデータを算出して、更新周期ごとにデータを制御機器に出力し、
前記PLCモジュールは同PLCモジュールのデータをオプションモジュールが取り込むまでは、ユーザプログラムを実行せず待機状態を保持し、
前記オプションモジュールからのデータ格納完了信号により、ユーザプログラムを前記PLCモジュールが実行することにより、前記PLCモジュールと前記オプションモジュールの同期をとる
構成としたことを特徴とするプログラマブルコントローラの同期方式。
A PLC module having a function as a programmable controller and an option module having a function of inputting and outputting data to and from a control device are provided, and data from the option module is reliably transferred to the control device between the option module and the control device. In a device having a function of inputting and outputting data at regular intervals so that
Means for generating an interrupt signal 1 at regular intervals in the PLC module;
Means for setting the interrupt signal 1 as a sampling period;
Means for transferring data between the PLC module and the option module;
Means for generating a synchronization signal when the PLC module completes data transfer with the option module;
Means for inputting the synchronization signal to an option module;
Means for generating an interrupt signal 2 and a status signal at regular intervals based on the synchronization signal in the optional module;
Means for determining the status signal when the interrupt signal 2 is input;
Means for notifying the PLC module that the option module has stored the data of the PLC module,
When the synchronization signal is input, the option module stores data of the PLC module,
When the synchronization signal is input, the option module calculates data to be output to the control device, and outputs data to the control device every update cycle,
The PLC module holds a standby state without executing a user program until the option module captures data of the PLC module,
A synchronization method for a programmable controller, wherein the PLC module and the option module are synchronized by executing a user program in response to a data storage completion signal from the option module.
プログラマブルコントローラとしての機能を有するPLCモジュールと、制御機器とデータの入出力を行う機能を有するオプションモジュールを備え、前記オプションモジュールと前記制御機器間は前記オプションモジュールからのデータを確実に制御機器まで渡すことができるように定周期でデータの入出力を行う機能を有する装置において、
前記PLCモジュールにおいて定周期に割込信号1を発生させる手段と、
前記割込信号1をサンプリング周期とする手段と、
前記割込信号1をオプションモジュールに同期信号として入力させる手段と、前記PLCモジュールと前記オプションモジュールでデータの受け渡しを行う手段と、
前記PLCモジュールのデータを前記オプションモジュールに格納することを前記オプションモジュールに知らせる手段と、
オプションモジュールにおいて前記割込信号1を元に定周期に割込信号2、およびステータス信号を発生させる手段と、
前記割込信号2が入力された時に前記ステータス信号を判別する手段と、
前記オプションモジュールが前記PLCモジュールのデータを格納したことを前記PLCモジュールに知らせる手段とを有し、
前記PLCモジュールからのデータ格納指令が入力された時に、前記オプションモジュールが前記PLCモジュールのデータを格納し、
前記割込信号が入力された時にステータス信号を判別し更新周期であれば、前記オプションモジュールは制御機器に出力するデータを算出して、データを制御機器に出力し、
前記PLCモジュールは同PLCモジュールのデータをオプションモジュールが取り込むまでは、ユーザプログラムを実行せず待機状態を保持し、
前記オプションモジュールからのデータ格納完了信号により、ユーザプログラムを前記PLCモジュールが実行することにより、前記PLCモジュールと前記オプションモジュールの同期をとる
構成としたことを特徴とするプログラマブルコントローラの同期方式。
A PLC module having a function as a programmable controller and an option module having a function of inputting and outputting data to and from a control device are provided, and data from the option module is reliably transferred to the control device between the option module and the control device. In a device having a function of inputting and outputting data at regular intervals so that
Means for generating an interrupt signal 1 at regular intervals in the PLC module;
Means for setting the interrupt signal 1 as a sampling period;
Means for inputting the interrupt signal 1 to the option module as a synchronization signal, means for transferring data between the PLC module and the option module,
Means for notifying the option module that the data of the PLC module is stored in the option module;
Means for generating an interrupt signal 2 and a status signal at regular intervals based on the interrupt signal 1 in the option module;
Means for determining the status signal when the interrupt signal 2 is input;
Means for notifying the PLC module that the option module has stored the data of the PLC module,
When a data storage command is input from the PLC module, the option module stores data of the PLC module,
When the interrupt signal is input, the status signal is determined and the update cycle is reached, the option module calculates data to be output to the control device, and outputs the data to the control device.
The PLC module holds a standby state without executing a user program until the option module captures data of the PLC module,
A synchronization method for a programmable controller, wherein the PLC module and the option module are synchronized by executing a user program in response to a data storage completion signal from the option module.
JP2002265445A 2002-09-11 2002-09-11 Synchronous system for programmable controller Pending JP2004102791A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002265445A JP2004102791A (en) 2002-09-11 2002-09-11 Synchronous system for programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002265445A JP2004102791A (en) 2002-09-11 2002-09-11 Synchronous system for programmable controller

Publications (1)

Publication Number Publication Date
JP2004102791A true JP2004102791A (en) 2004-04-02

Family

ID=32264588

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002265445A Pending JP2004102791A (en) 2002-09-11 2002-09-11 Synchronous system for programmable controller

Country Status (1)

Country Link
JP (1) JP2004102791A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101281399B (en) * 2005-01-07 2010-09-29 株式会社日立产机*** Programmable controller

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101281399B (en) * 2005-01-07 2010-09-29 株式会社日立产机*** Programmable controller

Similar Documents

Publication Publication Date Title
KR101044521B1 (en) Apparatus for controlling synchronization between slave devices connected to network
JP6152920B2 (en) Programmable controller system, its controller
US8190941B2 (en) Field control system
CN107947888B (en) A kind of task level synchronous method based on network communication
JP2011193457A (en) System and method for performing time synchronization
CN103838149B (en) Microcomputer
JP5067670B2 (en) Machine controller system
JP2003202907A (en) Method for synchronizing plc module with option module
JP2004102791A (en) Synchronous system for programmable controller
JP4961589B2 (en) Network system and slave synchronization method
JP2011123688A (en) Synchronizing programmable controller and synchronizing programmable controller system
JP2006048284A (en) Programmable controller device and method for synchronizing with option module
JP2004086432A (en) Synchronous system of programmable controller
JP2004110120A (en) Synchronization method for modular type programmable controller and modular type programmable controller
JP2004086431A (en) Programmable controller enabling inter-option module synchronization
JP2002333905A (en) Programmable controller apparatus in which synchronization between option modules is possible
JPH11259105A (en) Externally synchronizable programmable controller device
JP2006079480A (en) Method for synchronizing module type programmable controller and programmable controller
CN106020332A (en) Timing processing method and system
JP2007241744A (en) Motion controller and its command method
JPH09219714A (en) Transmission control system
JP4386852B2 (en) Signal processing device
JP2005018605A (en) Numerical control system
JP2006260386A (en) Programmable controller
KR100734521B1 (en) Intellectual Property Module for System on Chip