JP2002333905A - Programmable controller apparatus in which synchronization between option modules is possible - Google Patents

Programmable controller apparatus in which synchronization between option modules is possible

Info

Publication number
JP2002333905A
JP2002333905A JP2001119340A JP2001119340A JP2002333905A JP 2002333905 A JP2002333905 A JP 2002333905A JP 2001119340 A JP2001119340 A JP 2001119340A JP 2001119340 A JP2001119340 A JP 2001119340A JP 2002333905 A JP2002333905 A JP 2002333905A
Authority
JP
Japan
Prior art keywords
module
option
data
plc
control device
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
JP2001119340A
Other languages
Japanese (ja)
Inventor
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 JP2001119340A priority Critical patent/JP2002333905A/en
Publication of JP2002333905A publication Critical patent/JP2002333905A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Systems (AREA)
  • Programmable Controllers (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a programmable controller apparatus capable of surely transferring data between a controller and control equipment without limiting the number of mounting of option modules, and making it unnecessary to consider the difference between a clock generating the sampling cycle of a PLC module and a clock generating a communication cycle between the option module and the control equipment. SOLUTION: A PLC module 100 is provided with a means for generating an interrupting signal in a fixed cycle, a means for outputting the interrupting signal in a sampling cycle, and a means for inputting the interrupting signal to an option module. An option module 200 is provided with a means 223 for generating a communication cycle for transmitting and receiving data between the option module and control equipment synchronously with the interrupting signal, a means for transferring data between the PLC module 100 and the option module 200, and a means for informing the PLC module 100 that the data of the PLC module 100 have been stored by the option module 200.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、コントローラと制
御機器間のデータの受け渡しを確実に行うことができる
ように定周期で通信を行う機能を有する装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an apparatus having a function of performing communication at a fixed period so that data can be reliably transferred between a controller and a control device.

【0002】[0002]

【従来の技術】一般に、モジュール型のPLC装置は図
6のような構成になっている。図6において、1はプロ
グラム入力装置で、アプリケーションプログラムS1を
作成する。2はPLCモジュールでアプリケーションプ
ログラムS1にしたがい、オプションモジュール3との
間で入出力データS2をバスを通して授受する。データ
の授受を行うタイミング(以下、サンプリング周期と呼
ぶ)は一般にPLCモジュール2に搭載された水晶発振
子からのクロックを元にして作成される。オプションモ
ジュール3は、動作の異なる複数種の中から任意のモジ
ュールを複数枚実装できる。オプションモジュール3の
なかには通信データS3を定周期の通信周期で送受信す
ることにより、複数の制御機器4、5を制御する種類も
含まれる。この場合、サンプリング周期はオプションモ
ジュール3に搭載された通信周期発生回路からの信号を
元にして作成される。このように、サンプリング周期作
成法には2種類がある。PLCモジュール2に搭載され
た水晶発振子からのクロックを元にサンプリング周期を
作成する場合のPLC装置の構成を図7に示す。図7に
おいて、2はPLCモジュールで、プログラマブルコン
トローラとしての機能を有している。一般にPLCモジ
ュール2は、データメモリ部21と、アプリケーション
プログラムを記憶しているプログラムメモリ部20と、
前記プログラムメモリ部20に格納された制御プログラ
ムに従って演算する演算部(CPU)22から構成され
る。CPU22は水晶発振子23からのクロック信号で
動作する。24はサンプリング周期発生回路で、水晶発
振子23からのクロック信号を元にユーザが設定したサ
ンプリング周期を作成し、割込信号S5をCPU22へ
入力する。CPU22は割込信号S5が入ると、割込信
号S4を発生させ、オプションモジュール3との間でデ
ータS2の授受を行う。オプションモジュール3は、P
LCモジュール2がセットしたデータを自モジュール内
に格納するためのメモリ33と、PLCモジュール2か
らのデータS2と、CPU22からの割込信号を受ける
ための共有メモリ30と、水晶発振子34で動作するC
PU31と、制御機器4とのデータ授受をリアルタイム
で行うためのデータ入出力部32から構成される。PL
Cモジュール2とオプションモジュール3との間の同期
は割込信号S4によって保たれる。オプションモジュー
ル3に搭載された通信周期発生回路36からの信号を元
にしてサンプリング周期を作成する場合のPLC装置の
構成を図8に示す。図7と異なり、オプションモジュー
ルと制御機器との間のデータ入出力はデータ送受信回路
35によって実行され、データを送受信する周期は通信
周期発生回路36により作成される。PLCモジュール
2と制御機器4との間でデータの整合性をとるために、
通信周期発生回路36からの割込信号S6をオプション
モジュール3のCPU31とPLCモジュール2のサン
プリング周期発生回路24に同時に入力する。PLCモ
ジュール2は自モジュール内の水晶発振子からの信号を
使うことなくオプションモジュール3内の通信周期発生
回路36からの割込信号を使用してサンプリング周期を
作成する。このようなモジュール型のPLC装置におい
ては、PLCモジュールとオプションモジュールは、そ
れぞれCPUを搭載し、そのCPUは一般に別々の発振
器からのクロックで動作する。図8に示したようなオプ
ションモジュールではPLCモジュールからのデータは
PLCモジュールのサンプリング周期で確実に制御機器
まで受け渡すことができる。一方、図6に示したような
オプションモジュール3と図7に示したPLCモジュー
ル2とで構成されるPLC装置では、たとえ同じサンプ
リング周期を設定しても、PLCモジュール2とオプシ
ョンモジュール3のサンプリング周期は微妙にずれてく
る。そのため、PLCモジュール2からのデータをオプ
ションモジュール3が受け取れないタイミングが生じ、
PLCモジュール2からの時々刻々のデータをオプショ
ンモジュール3を介して制御機器4まで確実に受け渡す
ことができない。図9を用いて説明する。図9におい
て、〜はPLCモジュール2が時々刻々払い出すデ
ータを示している。この例では、オプションモジュール
3および制御機器4の通信周期を2ms、PLCモジュ
ール2のサンプリング周期を2msとしている。一般に
クロックに使用する水晶発振子の精度は100ppm程
度であるため、PLCモジュール2で使用している水晶
発振子とオプションモジュール3で使用している水晶発
振子の誤差は最大200ppmである。よって、1/5
000の誤差となる。2msでは、2ms±0.4μs
となり、10秒で1回分2ms周期が多いか少なくな
る。図9は、PLCモジュール2で使用している水晶発
振子がオプションモジュール3で使用している水晶発振
子よりα分遅いと仮定した時の各モジュールの周期を表
したものである。図9において、徐々にPLCモジュー
ル2のサンプリング周期とオプションモジュール3の通
信周期がずれていき、時刻A,Bと近づき、時刻Cでオ
プションモジュール3の通信周期がPLCモジュール2
のサンプリング周期を抜き、その結果、データが払い
出せずデータを抜かす。時刻Cでは、本来はデータが
制御機器に送信されなければならないが、時刻Bと同じ
データが制御機器4に送信されてしまう。すなわち、
本来制御機器4に送信するデータは、→→→→
→→・・・・であるのに対して、実際に制御機器4
に送信されるデータは、→→→→→→→
・・・・となる。上記問題を防ぐため、従来は図8に示
したPLCモジュール2を用いて、PLCモジュール2
とオプションモジュール3のサンプリング周期がずれな
いようにしていた。しかし、図8に示したPLCモジュ
ール2の場合、必ず図8に示した機能を持つオプション
モジュール3が実装されなければならないが、1枚しか
搭載できないといった問題があった。
2. Description of the Related Art In general, a modular PLC device has a configuration as shown in FIG. In FIG. 6, reference numeral 1 denotes a program input device for creating an application program S1. Reference numeral 2 denotes a PLC module which exchanges input / output data S2 with the option module 3 via a bus according to the application program S1. 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. Some of the option modules 3 include a type that controls the plurality of control devices 4 and 5 by transmitting and receiving the communication data S3 at a fixed communication period. In this case, the sampling cycle is created based on a signal from a communication cycle generation circuit mounted on the option module 3. 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. Generally, the PLC module 2 includes a data memory unit 21, a program memory unit 20 storing an application program,
It comprises an operation unit (CPU) 22 which performs an operation according to a control program stored in the program memory unit 20. The 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 CPU 22. When receiving the interrupt signal S5, the CPU 22 generates an interrupt signal S4 and exchanges data S2 with the option module 3. Optional module 3 is P
A memory 33 for storing the data set by the LC module 2 in its own module, data S2 from the PLC module 2, a shared memory 30 for receiving an interrupt signal from the CPU 22, and a crystal oscillator 34 C
It comprises a PU 31 and a data input / output unit 32 for exchanging data with the control device 4 in real time. PL
Synchronization between the C 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 a communication cycle generating circuit 36 mounted on the option module 3. Unlike FIG. 7, the data input / output between the option module and the control device is executed by the data transmission / reception circuit 35, and the data transmission / reception cycle is created by the communication cycle generation circuit 36. In order to ensure data consistency between the PLC module 2 and the control device 4,
The interrupt signal S6 from the communication 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. The PLC module 2 creates a sampling cycle using an interrupt signal from the communication cycle generating circuit 36 in the option module 3 without using a signal from a crystal oscillator in the PLC module 2 itself. 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 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. On the other hand, in a PLC device including the option module 3 as shown in FIG. 6 and the PLC module 2 as shown in FIG. Slightly shifts. Therefore, there occurs a timing at which the option module 3 cannot receive the data from the PLC module 2,
The momentary data from the PLC module 2 cannot be reliably transferred to the control device 4 via the option module 3. This will be described with reference to FIG. In FIG. 9, 〜 indicates data that the PLC module 2 pays out moment by moment. In this example, the communication 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, so that 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, 1/5
000 error. In 2ms, 2ms ± 0.4μs
Thus, the period of 2 ms for one time in 10 seconds is increased or decreased. 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 communication cycle of the option module 3 gradually deviate, approach time A and time B, and at time C, the communication cycle of the option module 3 decreases.
The sampling period is skipped, and as a result, data is not delivered and data is skipped. At time C, the data must be transmitted to the control device, but the same data as at time B is transmitted to the control device 4. That is,
The data originally transmitted to the control device 4 is →→→→
→→ ..., but actually the control device 4
The data sent to →→→→→→→
... Conventionally, in order to prevent the above problem, the PLC module 2 shown in FIG.
And the sampling cycle of the option module 3 was not shifted. 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.

【0003】[0003]

【発明が解決しようとする課題】そこで本発明の目的
は,オプションモジュールの実装枚数に制限を加えるこ
となく、コントローラと制御機器間のデータの受け渡し
を確実に行うことができ、またPLCモジュールのサン
プリング周期を生成しているクロックと、オプションモ
ジュールと制御機器間の通信周期を生成しているクロッ
ク差を意識する必要がないプログラマブルコントローラ
装置を提供することを目的とする。
SUMMARY OF THE INVENTION Accordingly, 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 perform sampling of a PLC module. It is an object of the present invention to provide a programmable controller device which does not need to be aware of a difference between a clock generating a cycle and a clock generating a communication cycle between an option module and a control device.

【0004】[0004]

【課題を解決するための手段】上記問題を解決するた
め、本発明のプログラマブルコントローラ装置は、プロ
グラマブルコントローラとしての機能を有するPLCモ
ジュールと、制御機器にデータを通信で渡す機能を有す
るオプションモジュールを備え、前記オプションモジュ
ールと前記制御機器間は前記オプションモジュールから
のデータを確実に制御機器まで渡すことができるように
定周期で通信を行う機能を有する装置において、前記P
LCモジュールにおいて定周期に割込信号を発生させる
手段と、前記割込信号をサンプリング周期とする手段
と、前記割込信号をオプションモジュールに入力する手
段と、オプションモジュールにおいて前記割込信号に同
期してオプションモジュールと制御機器の送受信を行う
通信周期を発生させる手段と、前記PLCモジュールと
前記オプションモジュールでデータの受け渡しを行う手
段と、前記オプションモジュールが前記PLCモジュー
ルのデータを格納したことを前記PLCモジュールに知
らせる手段とを有し、請求項1記載のとおり、前記割込
信号が入力された時に、前記オプションモジュールは制
御機器に送信するデータを算出して、通信周期ごとにデ
ータを制御機器に送信し、前記PLCモジュールは同P
LCモジュールのデータをオプションモジュールが取り
込むまでは、ユーザプログラムを実行せず待機状態を保
持し、前記オプションモジュールからのデータ格納完了
信号により、ユーザプログラムを前記PLCモジュール
が実行することにより、また、請求項2記載のとおり、
前記オプションモジュールは通信周期ごとにデータを前
記制御機器に送信し、前記PLCモジュールはこのPL
Cモジュールのデータを前記オプションモジュールが取
り込むまでは、ユーザプログラムを実行せず待機状態を
保持し、前記オプションモジュールからのデータ格納完
了信号により、ユーザプログラムを前記PLCモジュー
ルが実行することにより、前記PLCモジュールと前記
オプションモジュールの同期をとる構成としたものであ
る。
To solve the above problems, a programmable controller device according to the present invention includes a PLC module having a function as a programmable controller and an option module having a function of transferring data to a control device by communication. An apparatus having a function of performing communication at a fixed period between the option module and the control device so that data from the option module can be reliably transferred to the control device.
Means for generating an interrupt signal at a fixed period in the LC module, means for making the interrupt signal a sampling period, means for inputting the interrupt signal to the option module, and means for synchronizing with the interrupt signal in the option module. Means for generating a communication cycle for transmitting and receiving between the option module and the control device, means for transferring data between the PLC module and the option module, and information indicating that the option module has stored data of the PLC module. Means for notifying the control module, as described in claim 1, wherein when the interrupt signal is input, the option module calculates data to be transmitted to the control device, and transmits the data to the control device for each communication cycle. And the PLC module transmits
Until the option module captures the data of the LC module, the user module does not execute the program and holds a standby state, and the PLC module executes the user program according to a data storage completion signal from the option module. As described in item 2,
The option module transmits data to the control device every communication cycle, and the PLC module
Until the option module fetches the data of the C module, the user module does not execute the program and holds a standby state, and the PLC module executes the user program in response to the data storage completion signal from the option module. In this configuration, the module and the option module are synchronized.

【0005】[0005]

【発明の実施の形態】以下、本発明の実施例を図に基づ
いて説明する。図1は、本発明の第1の実施例の制御装
置の構成例である。図1において、100はPLCモジ
ュールで、プログラマブルコントローラとしての機能を
有している。一般にプログラマブルコントローラは、外
部の信号を取り込むための入力部110と、外部へ信号
を出力するための出力部111と、データメモリ部11
2と、ユーザプログラムを記憶しているプログラムメモ
リ部114と、前記プログラムメモリ部に格納された制
御プログラムに従って演算する演算部113から構成さ
れる。一般に演算部(CPU)は水晶発振子115から
のクロック信号で動作する。116はサンプリング周期
発生回路で、ソフトウェアまたはハードウェアで設定さ
れた周期に従って、割込信号S14が出力される。前記
サンプリング周期発生回路116からの出力信号である
割込信号S14がCPU113に入力された時に、プロ
グラマブルコントローラの入力、出力および演算を実行
する。200は、オプションモジュールで、PLCモジ
ュールがセットしたデータを自モジュール内に格納する
ためのメモリ225と、PLCモジュール100からの
データS11と、データS11をデータ送受信回路22
2に格納した時にPLCモジュール100にデータS1
1の取り込みが完了したことを知らせるデータ格納完了
S12を格納するための共有メモリ220と、水晶発振
子224で動作するCPU221と、制御機器にデータ
S11を送信するためのデータ送受信回路222と、P
LCモジュール100のサンプリング周期発生回路11
6からの出力信号である割込信号S14に同期してオプ
ションモジュール200と制御機器間の通信周期を生成
する通信周期発生回路223から構成される。また、通
信周期発生回路223からの出力が割込信号S13とし
て、オプションモジュール200のCPU221に入力
される。また、PLCモジュ−ルのサンプリング周期発
生回路からの割込信号S14がCPU221に入力され
る。図2は、本発明の第1の実施例におけるサンプリン
グ周期に同期した通信周期を発生する通信周期発生回路
の動作を説明した図である。図2において、サンプリン
グ周期が通信周期より遅い場合と速い場合に分けて説明
する。遅い場合の例ではサンプリング周期を4ms、通
信周期を2msとし、サンプリング周期が通信周期の2
倍としている。この場合、サンプリング周期に同期して
通信周期の信号を発生し、この時点から2ms経過後、
次の通信周期の信号を発生し、次のサンプリング周期に
同期して通信周期の信号を出力する。前記を繰り返して
通信周期の信号を発生させる。一方、速い場合の例では
サンプリング周期を2ms、通信周期を4msとし、サ
ンプリング周期が通信周期の1/2倍としている。この
場合、サンプリング周期に同期して通信周期の信号を発
生し、次のサンプリング周期では通信周期の信号は発生
せず、その次のサンプリング周期、すなわち最初のサン
プリング周期開始から4ms経過後、次の通信周期の信
号を発生する。前記を繰り返して通信周期の信号を発生
させる。図3は、本発明の実施例1において、PLCモ
ジュール100のサンプリング周期発生回路116から
割込信号S14が入力された時の、オプションモジュー
ル200とPLCモジュール100のソフトウェアの動
作、およびオプションモジュール200の通信周期発生
回路223から割込信号S13が入力された時のオプシ
ョンモジュール200のソフトウェアの動作を説明した
図である。図3において、割込信号S14がPLCモジ
ュール100に入力されると、PLCモジュール100
はまず、外部機器との入出力を行い(ステート10)、
オプションモジュール200からのデータ格納完了待ち
となる(ステート11)。オプションモジュール200
からデータ格納完了S12が共有メモリ220にセット
されると、プログラムメモリ部114に格納されたユー
ザプログラムが実行され、そのユーザプログラムの中で
時々刻々のデータが共有メモリ220にセットされる
(ステート12)。一方、オプションモジュール200
は、割込信号S14が入力されると、まずPLCモジュ
ール100が共有メモリ220にセットしたデータを自
モジュール内のメモリ225に格納する。このデータを
積算して、送信開始時点からの総データ量とする。(ス
テート20)。格納が完了すると、データ格納完了S1
2を共有メモリ220にセットして、データの取り込み
が完了したことをPLCモジュール100に知らせる
(ステート21)。また、オプションモジュールは、割
込信号S13が入力されると、総データ量から今回送信
するデータを作成して(ステート30)、送受信回路2
22にセットし制御機器に送信する(ステート31)。
図4は、本発明の第2の実施例による制御装置の構成例
である。図4において、図1と同じ符号のものはその説
明を省略する。図1と異なる点はメモリ225がなく、
割込信号S14がCPU221に入力しない点である。
図5は、本発明の実施例2において、PLCモジュール
100のサンプリング周期発生回路116から割込信号
S14が入力された時の、オプションモジュール200
とPLCモジュール100のソフトウェアの動作、およ
びオプションモジュール200の通信周期発生回路22
3から割込信号S13が入力された時のオプションモジ
ュール200のソフトウェアの動作を説明した図であ
る。図5において、割込信号S14がPLCモジュール
100に入力されると、PLCモジュール100はま
ず、外部機器との入出力を行い(ステート10)、オプ
ションモジュール200からのデータ格納完了待ちとな
る(ステート11)。オプションモジュール200から
データ格納完了S12が共有メモリ220にセットされ
ると、プログラムメモリ部114に格納されたユーザプ
ログラムが実行され、そのユーザプログラムの中で時々
刻々のデータが共有メモリ220にセットされる(ステ
ート12)。一方、オプションモジュール200は、割
込信号S13が入力されると、まずPLCモジュール1
00が共有メモリ220にセットしたデータをデータ送
受信回路222にセツトする(ステート20)。このデ
ータをデータ送受信回路222が制御機器に送信する。
格納が完了すると、データ格納完了S12を共有メモリ
220にセットして、データの取り込みが完了したこと
をPLCモジュール100に知らせる(ステート2
1)。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a configuration example of a control device according to a first embodiment of 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, and a data memory unit 11.
2, a program memory unit 114 that stores a user program, and a calculation unit 113 that performs calculation 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 period generating circuit 116, is input to the CPU 113, the input, output and operation of the programmable controller are executed. 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 transmitting / receiving circuit 22.
2 when the data S1 is stored in the PLC module 100.
1, a shared memory 220 for storing a data storage completion S12 for notifying that the data S11 has been captured, a CPU 221 operated by the crystal oscillator 224, a data transmission / reception circuit 222 for transmitting the data S11 to the control device,
Sampling period generation circuit 11 of LC module 100
6 includes a communication cycle generation circuit 223 that generates a communication cycle between the option module 200 and the control device in synchronization with the interrupt signal S14 output from the control module 6. The output from the communication cycle generation circuit 223 is input to the CPU 221 of the option module 200 as an interrupt signal S13. Further, an interrupt signal S14 from the sampling cycle generation circuit of the PLC module is input to the CPU 221. FIG. 2 is a diagram illustrating the operation of a communication cycle generation circuit that generates a communication cycle synchronized with a sampling cycle according to the first embodiment of the present invention. In FIG. 2, the case where the sampling cycle is slower and the case where it is faster than the communication cycle will be described separately. In the case of a slow case, the sampling period is 4 ms, the communication period is 2 ms, and the sampling period is 2 communication periods.
And double. In this case, a signal of the communication cycle is generated in synchronization with the sampling cycle, and after a lapse of 2 ms from this point,
A signal of the next communication cycle is generated, and a signal of the communication cycle is output in synchronization with the next sampling cycle. By repeating the above, a signal of the communication cycle is generated. On the other hand, in an example of a fast case, the sampling period is 2 ms, the communication period is 4 ms, and the sampling period is 倍 of the communication period. In this case, a signal of the communication cycle is generated in synchronization with the sampling cycle, no signal of the communication cycle is generated in the next sampling cycle, and after the lapse of 4 ms from the start of the next sampling cycle, that is, the start of the first sampling cycle, the next signal is generated. Generates signal of communication cycle. By repeating the above, a signal of the communication cycle is generated. FIG. 3 shows the operation of the option module 200 and the software of the PLC module 100 and the operation of the option module 200 when the interrupt signal S14 is input from the sampling cycle generation circuit 116 of the PLC module 100 in the first embodiment of the present invention. FIG. 9 is a diagram illustrating an operation of software of the option module 200 when an interrupt signal S13 is input from the communication cycle generation circuit 223. In FIG. 3, when the interrupt signal S14 is input to the PLC module 100, the PLC module 100
First performs input / output with an external device (state 10),
It waits for the completion of data storage from the option module 200 (state 11). Option module 200
When the data storage completion S12 is set in the shared memory 220, 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, option module 200
When the interrupt signal S14 is input, the PLC module 100 first stores the data set in the shared memory 220 in the memory 225 in the own module. This data is integrated to obtain the total data amount from the start of transmission. (State 20). When storage is completed, data storage completion S1
2 is set in the shared memory 220 to notify the PLC module 100 that the data fetch has been completed (state 21). Further, when the interrupt signal S13 is input, the option module creates data to be transmitted this time from the total data amount (state 30),
22 and sends it to the control device (state 31).
FIG. 4 is a configuration example of a control device according to a second embodiment of the present invention. 4, the description of the same reference numerals as in FIG. 1 is omitted. The difference from FIG. 1 is that there is no memory 225,
The point is that the interrupt signal S14 is not input to the CPU 221.
FIG. 5 is a diagram illustrating the option module 200 when the interruption signal S14 is input from the sampling cycle generation circuit 116 of the PLC module 100 in the second embodiment of the present invention.
Of the software of the PLC module 100 and the communication cycle generation circuit 22 of the option module 200
FIG. 9 is a diagram illustrating an operation of software of the option module 200 when an interrupt signal S13 is input from No. 3; 5, when the interrupt signal S14 is input to the PLC module 100, the PLC module 100 first performs input / output with an external device (state 10), and waits for completion of data storage from the option module 200 (state 10). 11). When the data storage completion S12 from the option module 200 is set in the shared memory 220, 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 is input, the option module 200
00 sets the data set in the shared memory 220 in the data transmission / reception circuit 222 (state 20). The data transmission / reception circuit 222 transmits this data to the control device.
When the storage is completed, the data storage completion S12 is set in the shared memory 220 to notify the PLC module 100 of the completion of the data capture (state 2
1).

【0006】[0006]

【発明の効果】以上述べたように本発明によれば,PL
Cモジュールが払い出すデータを、オプションモジュー
ルを介して、確実に制御機器まで渡すことができ、モジ
ュール型の制御装置で同期制御が可能となる効果があ
る。また、1枚のオプションモジュールで接続可能な制
御機器を超える制御装置においても、必要数分のオプシ
ョンモジュールを追加し、PLCモジュールに同期させ
ることで、PLCモジュールが払い出すデータを、複数
のオプションモジュールを介して、確実に制御機器まで
渡すことができ、複数のオプションモジュールを使用し
た多数の制御機器を使用した制御装置で同期制御が可能
となる効果がある。また、データを生成するPLCモジ
ュールはプログラマブルであるため、任意のデータパタ
ーン(データの集まり)を生成することができるので、
制御機器で構成される機械の動作に柔軟に対応できる。
従って、高性能、高機能な機械をPLC装置で構成する
ことが可能となる効果がある。
As described above, according to the present invention, the PL
The data paid out by the C 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 that can be connected 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 transferred to a plurality of option modules. And the control device can be transferred to the control device without fail, and there is an effect that a control device using a large number of control devices using a plurality of option modules can perform synchronous control. Further, since the PLC module for generating data is programmable, an arbitrary data pattern (a group of data) can be generated.
It is possible to flexibly cope with the operation of a machine composed of control devices.
Therefore, there is an effect that a high-performance and high-performance machine can be constituted by the PLC device.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 本発明の第1の実施例を説明する図である。FIG. 1 is a diagram illustrating a first embodiment of the present invention.

【図2】 本発明の第1の実施例における通信周期発生
回路の説明図である。
FIG. 2 is an explanatory diagram of a communication cycle generation circuit according to the first embodiment of the present invention.

【図3】 本発明の第1の実施例におけるPLCモジュ
ールとオプションモジュー ルのソフトウェア説明図で
ある。
FIG. 3 is an explanatory diagram of software of a PLC module and an option module according to the first embodiment of the present invention.

【図4】 本発明の第2の実施例を説明する図である。FIG. 4 is a diagram illustrating a second embodiment of the present invention.

【図5】 本発明の第2の実施例におけるPLCモジュ
ールとオプションモジュールのソフトウェア説明図であ
る。
FIG. 5 is an explanatory diagram of software of a PLC module and an option module according to a second embodiment of the present invention.

【図6】 一般のモジュール型のPLC装置の構成概略
図である。
FIG. 6 is a schematic configuration diagram of a general modular PLC device.

【図7】 従来技術を示すブロック図である。FIG. 7 is a block diagram showing a conventional technique.

【図8】 従来技術を示すブロック図である。FIG. 8 is a block diagram showing a conventional technique.

【図9】 従来技術における問題点を説明するためのタ
イムチャートである。
FIG. 9 is a time chart for explaining a problem in the related art.

【符号の説明】[Explanation of symbols]

100 PLCモジュール 110 外部の信号を取り込むための入力部 111 外部へ信号を出力するための出力部 112 データメモリ部 114 プログラムメモリ部 113 演算部 115 水晶発振子 116 サンプリング周期発生回路 S13,S14 割込信号 200 オプションモジュール 225 メモリ S11 データ S11 データ 220 共有メモリ 221 CPU 222 データ送受信回路 223 通信周期発生回路 REFERENCE SIGNS LIST 100 PLC module 110 Input section for taking in external signal 111 Output section for outputting signal to the outside 112 Data memory section 114 Program memory section 113 Operation section 115 Crystal oscillator 116 Sampling cycle generation circuit S13, S14 Interrupt signal 200 Option module 225 Memory S11 data S11 data 220 Shared memory 221 CPU 222 Data transmission / reception circuit 223 Communication cycle generation circuit

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 プログラマブルコントローラとしての機
能を有するPLCモジュールと、制御機器にデータを通
信で渡す機能を有するオプションモジュールを備え、前
記オプションモジュールと前記制御機器間は前記オプシ
ョンモジュールからのデータを確実に制御機器まで渡す
ことができるように定周期で通信を行う機能を有する装
置において、 前記PLCモジュールにおいて定周期に割込信号を発生
させる手段と、前記割込信号をサンプリング周期とする
手段と、前記割込信号をオプションモジュールに入力す
る手段と、オプションモジュールにおいて前記割込信号
に同期してオプションモジュールと制御機器の送受信を
行う通信周期を発生させる手段と、前記PLCモジュー
ルと前記オプションモジュールでデータの受け渡しを行
う手段と、前記オプションモジュールが前記PLCモジ
ュールのデータを格納したことを前記PLCモジュール
に知らせる手段とを有し、前記割込信号が入力された時
に、前記オプションモジュールは制御機器に送信するデ
ータを算出して、通信周期ごとにデータを制御機器に送
信し、前記PLCモジュールは同PLCモジュールのデ
ータをオプションモジュールが取り込むまでは、ユーザ
プログラムを実行せず待機状態を保持し、前記オプショ
ンモジュールからのデータ格納完了信号により、ユーザ
プログラムを前記PLCモジュールが実行することによ
り、前記PLCモジュールと前記オプションモジュール
の同期をとる構成としたことを特徴とするオプションモ
ジュール間同期可能なプログラマブルコントローラ装
置。
An information processing apparatus comprising: a PLC module having a function as a programmable controller; and an option module having a function of transferring data to a control device by communication. Data between the option module and the control device is securely transmitted between the option module and the control device. An apparatus having a function of performing communication at a fixed period so that it can be transferred to a control device; a means for generating an interrupt signal at a fixed cycle in the PLC module; a means for setting the interrupt signal to a sampling cycle; Means for inputting an interrupt signal to the option module; means for generating a communication cycle for transmitting and receiving between the option module and the control device in synchronization with the interrupt signal in the option module; Hand to deliver And a means for notifying the PLC module that the option module has stored data of the PLC module. When the interrupt signal is input, the option module calculates data to be transmitted to a control device. The PLC module transmits data to the control device at each communication cycle, and the PLC module holds a standby state without executing a user program until the option module captures the data of the PLC module, and stores data from the option module. A programmable controller device capable of synchronizing option modules, wherein the PLC module and the option module are synchronized by executing the user program by the completion signal in response to the PLC module.
【請求項2】 プログラマブルコントローラとしての機
能を有するPLCモジュールと、制御機器にデータを通
信で渡す機能を有するオプションモジュールを備え、前
記オプションモジュールと前記制御機器間は前記オプシ
ョンモジュールからのデータを確実に制御機器まで渡す
ことができるように定周期で通信を行う機能を有する装
置において、 前記PLCモジュールにおいて定周期に割込信号を発生
させる手段と、前記割込信号をサンプリング周期とする
手段と、前記割込信号をオプションモジュールに入力す
る手段と、オプションモジュールにおいて前記割込信号
に同期してオプションモジュールと制御機器の送受信を
行う通信周期を発生させる手段と、前記PLCモジュー
ルと前記オプションモジュールでデータの受け渡しを行
う手段と、前記オプションモジュールが前記PLCモジ
ュールのデータを格納したことを前記PLCモジュール
に知らせる手段とを有し、前記オプションモジュールは
通信周期ごとにデータを前記制御機器に送信し、前記P
LCモジュールはこのPLCモジュールのデータを前記
オプションモジュールが取り込むまでは、ユーザプログ
ラムを実行せず待機状態を保持し、前記オプションモジ
ュールからのデータ格納完了信号により、ユーザプログ
ラムを前記PLCモジュールが実行することにより、前
記PLCモジュールと前記オプションモジュールの同期
をとる構成としたことを特徴とするオプションモジュー
ル間同期可能なプログラマブルコントローラ装置。
And a PLC module having a function as a programmable controller, and an option module having a function of transferring data to a control device by communication. The data from the option module is reliably transmitted between the option module and the control device. An apparatus having a function of performing communication at a fixed period so that it can be transferred to a control device; a means for generating an interrupt signal at a fixed cycle in the PLC module; a means for setting the interrupt signal to a sampling cycle; Means for inputting an interrupt signal to the option module; means for generating a communication cycle for transmitting and receiving between the option module and the control device in synchronization with the interrupt signal in the option module; Hand to deliver When, and means for notifying that the option module stores data of the PLC module to the PLC module, the option module sends the data to each communication period to the control device, the P
The LC module holds a standby state without executing the user program until the option module captures the data of the PLC module, and the PLC module executes the user program in response to a data storage completion signal from the option module. Wherein the PLC module and the option module are synchronized with each other.
JP2001119340A 2001-03-08 2001-04-18 Programmable controller apparatus in which synchronization between option modules is possible Pending JP2002333905A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001119340A JP2002333905A (en) 2001-03-08 2001-04-18 Programmable controller apparatus in which synchronization between option modules is possible

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2001064285 2001-03-08
JP2001-64285 2001-03-08
JP2001119340A JP2002333905A (en) 2001-03-08 2001-04-18 Programmable controller apparatus in which synchronization between option modules is possible

Publications (1)

Publication Number Publication Date
JP2002333905A true JP2002333905A (en) 2002-11-22

Family

ID=26610833

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001119340A Pending JP2002333905A (en) 2001-03-08 2001-04-18 Programmable controller apparatus in which synchronization between option modules is possible

Country Status (1)

Country Link
JP (1) JP2002333905A (en)

Similar Documents

Publication Publication Date Title
KR101044521B1 (en) Apparatus for controlling synchronization between slave devices connected to network
CN107947888B (en) A kind of task level synchronous method based on network communication
JP2011193457A (en) System and method for performing time synchronization
JP5067670B2 (en) Machine controller system
US8422613B2 (en) Clock-synchronous communication apparatus and communication system
JP2003202907A (en) Method for synchronizing plc module with option module
JP4961589B2 (en) Network system and slave synchronization method
JP2006048284A (en) Programmable controller device and method for synchronizing with option module
JP6423971B2 (en) Functional unit and control device
JP2002333905A (en) Programmable controller apparatus in which synchronization between option modules is possible
JP2004110120A (en) Synchronization method for modular type programmable controller and modular type programmable controller
JP2004086432A (en) Synchronous system of programmable controller
JP2004102791A (en) Synchronous system for programmable controller
JP2004086431A (en) Programmable controller enabling inter-option module synchronization
JP6608019B2 (en) Functional unit and control device
JP2006079480A (en) Method for synchronizing module type programmable controller and programmable controller
CN106020332A (en) Timing processing method and system
JPH11259105A (en) Externally synchronizable programmable controller device
JP2006260386A (en) Programmable controller
JP4176720B2 (en) Synchronization control device and synchronization control method
KR100734521B1 (en) Intellectual Property Module for System on Chip
US6760798B1 (en) Interface mechanism and method for interfacing a real-time clock with a data processing circuit
JP2024074460A (en) Semiconductor chip, debug system, and synchronization method
CN118426570A (en) Memory control circuit resetting method, device, equipment and medium
JP2003099152A (en) Signal controller