[go: up one dir, main page]

JP2006079480A - Method for synchronizing modular programmable controller and programmable controller - Google Patents

Method for synchronizing modular programmable controller and programmable controller Download PDF

Info

Publication number
JP2006079480A
JP2006079480A JP2004264772A JP2004264772A JP2006079480A JP 2006079480 A JP2006079480 A JP 2006079480A JP 2004264772 A JP2004264772 A JP 2004264772A JP 2004264772 A JP2004264772 A JP 2004264772A JP 2006079480 A JP2006079480 A JP 2006079480A
Authority
JP
Japan
Prior art keywords
module
data
option
control device
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
JP2004264772A
Other languages
Japanese (ja)
Inventor
Mitsunori Kuzushima
光則 葛島
Tatsuhiko Sato
辰彦 佐藤
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 JP2004264772A priority Critical patent/JP2006079480A/en
Publication of JP2006079480A publication Critical patent/JP2006079480A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

【課題】 オプションモジュールの実装枚数に制限を加えることなく、コントローラと制御機器間のデータの受け渡しを確実に行うことができ、オプションモジュールのデータ更新周期をPLCモジュールのサンプリング周期と異なる値に設定できるモジュール型のプログラマブルコントローラを提供する。
【解決手段】 PLCモジュールは第1の割込信号と、オプションモジュールに出力する第2の割込信号を発生させる手段とを有し、第1の割込信号が入力されると、第2の割込信号を発生させる手段を起動し、データ格納完了信号がセットされるとユーザプログラムを実行し、オプションモジュールは第3の割込信号を生成する手段を有し、第2の割込信号が入力されると、データ格納後、データ格納完了信号をセットし、第3の割込信号を生成する手段を起動し、第3の割込信号が入力されると制御機器にデータを出力するものである。
【選択図】図1
PROBLEM TO BE SOLVED: To reliably transfer data between a controller and a control device without limiting the number of mounted optional modules, and to set a data update cycle of the option module to a value different from the sampling cycle of the PLC module. A modular programmable controller is provided.
The PLC module has a first interrupt signal and a means for generating a second interrupt signal to be output to the option module. When the first interrupt signal is input, The means for generating the interrupt signal is activated, and when the data storage completion signal is set, the user program is executed. The option module has means for generating the third interrupt signal, and the second interrupt signal is When input, after data storage, sets data storage completion signal, activates means to generate third interrupt signal, and outputs data to control device when third interrupt signal is input It is.
[Selection] Figure 1

Description

本発明は、モジュール型のプログラマブルコントローラ(PLC装置)に関する。   The present invention relates to a modular programmable controller (PLC device).

従来のモジュール型のPLC装置について、図を用いて説明する。図5は、一般のモジュール型PLC装置の概略構成図である。図において、モジュール型のPLC装置5は、PLCモジュール2とオプションモジュール3から構成されている。1はプログラム入力装置であり、ユーザはプログラム入力装置1を使用してユーザプログラムを作成する。2はPLCモジュールであり、ユーザプログラムにしたがい、オプションモジュール3との間で入出力データをバスを通して授受する。データの授受を行うタイミング(以下、サンプリング周期と呼ぶ)は、一般にPLCモジュール2に搭載された水晶発振子からのクロックを元にして作成される。3はオプションモジュールであり、動作の異なる複数種の中から任意のモジュールを複数枚実装できる。オプションモジュール3のなかには制御データを一定の更新周期で入出力を行うことにより、複数の制御機器を制御する種類も含まれる。この場合、サンプリング周期はオプションモジュール3に搭載された更新周期発生回路からの信号を元にして作成される。このように、サンプリング周期の作成方法には2種類ある。以下、サンプリング周期の作成方法について説明する。   A conventional modular PLC device will be described with reference to the drawings. FIG. 5 is a schematic configuration diagram of a general modular PLC device. In the figure, the module type PLC device 5 includes a PLC module 2 and an option module 3. Reference numeral 1 denotes a program input device. A user uses the program input device 1 to create a user program. Reference numeral 2 denotes a PLC module which exchanges input / output data with the option module 3 through a bus according to a user program. Data transmission / reception timing (hereinafter referred to as a sampling cycle) is generally generated based on a clock from a crystal oscillator mounted on the PLC module 2. Reference numeral 3 denotes an optional module, which can mount a plurality of arbitrary modules among a plurality of types having different operations. The option module 3 includes a type of controlling a plurality of control devices by inputting / outputting control data at a constant update cycle. In this case, the sampling period is created based on a signal from the update period generation circuit mounted on the option module 3. Thus, there are two types of methods for creating the sampling period. Hereinafter, a method for creating a sampling period will be described.

まず、PLCモジュール2に搭載された水晶発振子からのクロックを元にサンプリング周期を作成する場合のモジュール型のPLC装置の内部構成を図6に示す。図6において、2はPLCモジュールであり、一般に、外部の信号を取り込むための入力部20と、外部へ信号を出力するための出力部21と、データメモリ部22と、ユーザプログラムを記憶しているプログラムメモリ部24と、水晶発振子25と、水晶発振子25からのクロック信号で動作し、プログラムメモリ部24に格納された制御プログラムに従って演算するCPU23と、水晶発振子25からのクロック信号を元にユーザが設定したサンプリング周期を作成し、割込信号S14をCPU23へ入力するサンプリング周期発生回路26から構成される。CPU23は、割込信号S14が入力されると、割込信号S20を発生させ、オプションモジュール3との間でデータS11の授受を行う。3はオプションモジュールであり、PLCモジュール2がセットしたデータS11を自モジュール内に格納するためのメモリ35と、PLCモジュール2からのデータS11を格納するための共有メモリ30と、水晶発振子34と、水晶発振子34で動作するCPU31と、制御機器とのデータ授受をリアルタイムで行うためのデータ入出力部32から構成される。PLCモジュール2とオプションモジュール3との間の同期は、割込信号S20によって保たれる。   First, FIG. 6 shows an internal configuration of a module-type PLC device when a sampling period is created based on a clock from a crystal oscillator mounted on the PLC module 2. In FIG. 6, reference numeral 2 denotes a PLC module, which generally stores an input unit 20 for capturing an external signal, an output unit 21 for outputting a signal to the outside, a data memory unit 22, and a user program. The program memory unit 24, the crystal oscillator 25, the CPU 23 that operates according to the control program stored in the program memory unit 24, and the clock signal from the crystal oscillator 25. A sampling period which is originally set by the user is created, and a sampling period generation circuit 26 for inputting the interrupt signal S14 to the CPU 23 is constituted. When the interrupt signal S14 is input, the CPU 23 generates an interrupt signal S20 and exchanges data S11 with the option module 3. 3 is an optional module, a memory 35 for storing the data S11 set by the PLC module 2 in the own module, a shared memory 30 for storing the data S11 from the PLC module 2, a crystal oscillator 34, The CPU 31 operates on the crystal oscillator 34, and the data input / output unit 32 is used to exchange data with the control device in real time. Synchronization between the PLC module 2 and the option module 3 is maintained by the interrupt signal S20.

次に、オプションモジュール3に搭載された更新周期発生回路40からの信号を元にサンプリング周期を作成する場合のモジュール型のPLC装置の内部構成を図7に示す。このPLC装置は図6のPLC装置と異なり、データを入出力する周期は更新周期発生回路40により作成される。PLCモジュール2と制御機器4との間でデータの整合性をとるために、更新周期発生回路40からの割込信号S30をオプションモジュール3のCPU31とPLCモジュール2のサンプリング周期発生回路26に同時に入力する。PLCモジュール2は、自モジュール内の水晶発振子からの信号を使うことなくオプションモジュール3の更新周期発生回路40からの割込信号S30を使用してサンプリング周期を作成する。このようなモジュール型のPLC装置においては、PLCモジュールとオプションモジュールは、それぞれCPUを搭載し、そのCPUは一般に別々の発振器(水晶発振子)からのクロックで動作する。図7に示したようなオプションモジュール3では、PLCモジュール2からのデータはPLCモジュール2のサンプリング周期で確実に制御機器まで受け渡すことができる。
なお、以上説明した従来技術は特許文献1に記載されている。
特開平11−259105号公報
Next, FIG. 7 shows an internal configuration of a module type PLC device when a sampling period is created based on a signal from the update period generation circuit 40 mounted on the option module 3. This PLC device is different from the PLC device of FIG. 6 in that the cycle for inputting and outputting data is created by the update cycle generation circuit 40. In order to ensure data consistency between the PLC module 2 and the control device 4, the interrupt signal S30 from the update cycle generation circuit 40 is simultaneously input to the CPU 31 of the option module 3 and the sampling cycle generation circuit 26 of the PLC module 2. To do. The PLC module 2 creates a sampling period using the interrupt signal S30 from the update period generation circuit 40 of the option module 3 without using a signal from the crystal oscillator in the module. In such a modular PLC device, each of the PLC module and the option module is equipped with a CPU, and the CPU generally operates with a clock from a separate oscillator (crystal oscillator). In the option module 3 as shown in FIG. 7, the data from the PLC module 2 can be reliably transferred to the control device at the sampling period of the PLC module 2.
The conventional technology described above is described in Patent Document 1.
JP 11-259105 A

一方、図7に示したようなオプションモジュール3と図6に示したPLCモジュール2とで構成されるPLC装置では、たとえ同じサンプリング周期を設定しても、PLCモジュール2とオプションモジュール3のサンプリング周期は微妙にずれてくる。そのため、PLCモジュール2からのデータをオプションモジュール3が受け取れないタイミングが生じ、PLCモジュール2からの時々刻々のデータをオプションモジュール3を介して制御機器4まで確実に受け渡すことができない。   On the other hand, in the PLC device constituted by the option module 3 as shown in FIG. 7 and the PLC module 2 shown in FIG. 6, even if the same sampling period is set, the sampling period of the PLC module 2 and the option module 3 Is slightly different. For this reason, there is a timing at which the option module 3 cannot receive the data from the PLC module 2, and the timely data from the PLC module 2 cannot be reliably transferred to the control device 4 via the option module 3.

この問題を図8のタイミングチャートを用いて説明する。図8において、D〜DはPLCモジュール2が時々刻々払い出すデータを示している。この例では、オプションモジュール3および制御機器4のデータ更新周期を2ms、PLCモジュール2のサンプリング周期を2msとしている。クロックに使用する水晶発振子の精度は、一般に100ppm程度であるため、PLCモジュール2で使用している水晶発振子25とオプションモジュール3で使用している水晶発振子34の誤差は最大200ppmである。よって、1/5000の誤差となる。2msでは、2ms±0.4μsとなり、10秒で1回分(2ms)周期が多いか少なくなる。図8は、PLCモジュール2で使用している水晶発振子25がオプションモジュール3で使用している水晶発振子34よりα分遅いと仮定したときの各モジュールの周期を表したものである。図8において、PLCモジュール2のサンプリング周期とオプションモジュール3のデータ更新周期が時刻A、時刻Bと徐々にずれていき、時刻Cでオプションモジュール3のデータ更新周期がPLCモジュール2のサンプリング周期を抜き、その結果、データDが払い出せずデータを抜かす。時刻Cでは、本来はデータDが制御機器4に渡されなければならないが、時刻Bと同じデータDが制御機器4に渡されてしまう。すなわち、制御機器4に本来渡すデータは、D→D→D→D→D→D6→・・・・・・であるのに対して、実際に制御機器4に渡されるデータは、D→D→D→D→D→D→D6→・・・・・・となる。
これを防ぐために、従来は図7に示したPLCモジュール2を用いて、PLCモジュール2とオプションモジュール3のサンプリング周期がずれないようにしていた。
This problem will be described with reference to the timing chart of FIG. In FIG. 8, D 1 to D 6 indicate data that the PLC module 2 pays out every moment. In this example, the data 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. Since the accuracy of the crystal oscillator used for the clock is generally about 100 ppm, the error between the crystal oscillator 25 used in the PLC module 2 and the crystal oscillator 34 used in the option module 3 is 200 ppm at maximum. . Therefore, the error is 1/5000. At 2 ms, it becomes 2 ms ± 0.4 μs, and the period for one time (2 ms) is increased or decreased in 10 seconds. FIG. 8 shows the period of each module when it is assumed that the crystal oscillator 25 used in the PLC module 2 is slower than the crystal oscillator 34 used in the option module 3 by α. In FIG. 8, the sampling period of the PLC module 2 and the data update period of the option module 3 gradually shift from time A and time B. At time C, the data update period of the option module 3 skips the sampling period of the PLC module 2. As a result, data D 6 is leave out data without Haraidase. At time C, the data D 6 should originally be passed to the control device 4, but the same data D 5 as that at time B is passed to the control device 4. That is, the data originally passed to the control device 4 is actually passed to the control device 4 while D 1 → D 2 → D 3 → D 4 → D 5 → D 6 →. The data is D 1 → D 2 → D 3 → D 4 → D 5 → D 5 → D 6 →...
In order to prevent this, conventionally, the PLC module 2 shown in FIG. 7 is used so that the sampling periods of the PLC module 2 and the option module 3 do not shift.

しかしながら、図7に示したPLCモジュール2の場合、図7に示した機能を持つオプションモジュール3が必ず実装されなければならないが、1枚しか搭載できないといった問題があった。また、図6に示したPLC装置では、PLCモジュール2とオプションモジュール3のサンプリング周期を同じ値にしか設定できず、PLCモジュール2のサンプリング周期を長い値に設定する場合は、オプションモジュール3のサンプリング周期も長い値に設定する必要があり、オプションモジュールと制御機器のデータの入出力を行うデータ更新周期が長くなり、一般に制御精度が低下するといった問題があった。   However, in the case of the PLC module 2 shown in FIG. 7, the option module 3 having the function shown in FIG. 7 must be mounted, but there is a problem that only one can be mounted. In the PLC device shown in FIG. 6, the sampling cycle of the PLC module 2 and the option module 3 can only be set to the same value. When the sampling cycle of the PLC module 2 is set to a long value, the sampling of the option module 3 is performed. The cycle also needs to be set to a long value, and the data update cycle for inputting / outputting data between the option module and the control device becomes long, and there is a problem that the control accuracy is generally lowered.

そこで本発明の目的は、オプションモジュールの実装枚数に制限を加えることなく、PLCモジュールと制御機器との間のデータの受け渡しを確実に行うことができ、また、オプションモジュールのデータ更新周期をPLCモジュールのサンプリング周期と異なる値に設定できるモジュール型のプログラマブルコントローラの同期方法およびプログラマブルコントローラを提供することを目的とする。   Accordingly, an object of the present invention is to reliably transfer data between the PLC module and the control device without restricting the number of mounted optional modules, and to set the data update cycle of the optional module to the PLC module. It is an object of the present invention to provide a method for synchronizing a modular programmable controller and a programmable controller that can be set to a value different from the sampling period.

上記問題を解決するため、本発明は、次のように構成したのである。
請求項1に記載の発明は、プログラマブルコントローラとしての機能を有するPLCモジュールと、制御機器とデータの入出力を行う機能を有するオプションモジュールと、を備え、前記オプションモジュールと前記制御機器間は前記オプションモジュールからのデータを確実に制御機器まで渡すことができるように定周期でデータの入出力を行う機能を有するモジュール型のプログラマブルコントローラの同期方法において、前記PLCモジュールのCPUに第1の割込信号が入力されたとき、前記PLCモジュールは第2の割込信号を発生する手段を起動し、前記PLCモジュールからの前記第2の割込信号が前記オプションモジュールに入力されたとき、前記オプションモジュールが前記PLCモジュールのデータを格納し、データ格納完了信号を前記PLCモジュールに出力し、前記オプションモジュールと制御機器との間でデータの入出力処理を行う第3の割込信号を生成する手段を起動し、前記第3の割込信号が前記オプションモジュールのCPUに入力されたとき、前記オプションモジュールは制御機器に出力するデータを算出して、データを制御機器に出力し、前記PLCモジュールは同PLCモジュールのデータをオプションモジュールが取り込むまでは、ユーザプログラムを実行せず待機状態を保持し、前記オプションモジュールからのデータ格納完了信号により、ユーザプログラムを前記PLCモジュールが実行することにより、前記PLCモジュールと前記オプションモジュールの同期をとることを特徴とするものである。
In order to solve the above problem, the present invention is configured as follows.
The invention described in claim 1 includes a PLC module having a function as a programmable controller and an option module having a function of inputting / outputting data to / from a control device, and the option module and the control device are provided with the option. In a synchronization method of a module-type programmable controller having a function of inputting and outputting data at a constant cycle so that data from the module can be surely passed to the control device, a first interrupt signal is sent to the CPU of the PLC module Is input, the PLC module activates a means for generating a second interrupt signal. When the second interrupt signal from the PLC module is input to the option module, the option module Stores data of the PLC module and stores data A completion signal is output to the PLC module, and a means for generating a third interrupt signal for performing data input / output processing between the option module and the control device is activated, and the third interrupt signal is When input to the CPU of the option module, the option module calculates data to be output to the control device, and outputs the data to the control device. Until the option module takes in the data of the PLC module, A standby state is maintained without executing a user program, and the PLC module and the option module are synchronized by the PLC module executing the user program in response to a data storage completion signal from the option module. To do.

また、請求項2に記載の発明は、プログラマブルコントローラとしての機能を有するPLCモジュールと、制御機器とデータの入出力を行う機能を有するオプションモジュールと、前記PLCモジュールと前記オプションモジュールとの間でデータのやり取りを行う共有メモリと、を備え、前記オプションモジュールと前記制御機器間は前記オプションモジュールからのデータを確実に制御機器まで渡すことができるように定周期でデータの入出力を行う機能を有するモジュール型のプログラマブルコントローラにおいて、前記PLCモジュールは第1の割込信号と第2の割込信号とを発生する手段を有し、前記PLCモジュールは第1の割込信号が入力されると、外部機器との入出力を行い、入出力が完了したときに前記第2の割込信号を発生する手段を起動した後、前記オプションモジュールのデータ格納完了信号待ちとなり、前記オプションモジュールからデータ格納完了信号が前記共有メモリにセットされると、ユーザプログラムを実行し、前記オプションモジュールは第3の割込信号を生成する手段を有し、前記第2の割込信号が入力されると、前記PLCモジュールが該共有メモリにセットしたデータをメモリに格納し、格納が完了すると、データ格納完了信号を前記共有メモリにセットし、前記第3の割込信号を生成する手段を起動し、前記第3の割込信号が入力されると、制御機器に出力するデータを作成し、制御機器に出力することを特徴とするものである。   The invention described in claim 2 is a PLC module having a function as a programmable controller, an option module having a function of inputting / outputting data to / from a control device, and data between the PLC module and the option module. A shared memory for exchanging data, and having a function of inputting / outputting data at regular intervals between the option module and the control device so that the data from the option module can be surely passed to the control device In the module type programmable controller, the PLC module has means for generating a first interrupt signal and a second interrupt signal, and the PLC module is externally connected when the first interrupt signal is inputted. Input / output to / from the device, and when the input / output is complete, the second interrupt signal is After the data generating completion signal is activated, the option module waits for a data storage completion signal. When the data storage completion signal is set in the shared memory from the option module, the user program is executed, and the option module Means for generating an interrupt signal; when the second interrupt signal is input, the data set by the PLC module in the shared memory is stored in the memory; Is set in the shared memory, the means for generating the third interrupt signal is started, and when the third interrupt signal is input, data to be output to the control device is created and output to the control device. It is characterized by doing.

また、請求項3に記載の発明は、プログラマブルコントローラとしての機能を有するPLCモジュールと、制御機器とデータの入出力を行う機能を有するオプションモジュールと、を備え、前記オプションモジュールと前記制御機器間は前記オプションモジュールからのデータを確実に制御機器まで渡すことができるように定周期でデータの入出力を行う機能を有するモジュール型のプログラマブルコントローラの同期方法において、前記PLCモジュールのCPUに第1の割込信号が入力されて前記PLCモジュールからのデータ格納指令が前記オプションモジュールに入力されたとき、前記オプションモジュールが前記PLCモジュールのデータを格納し、データ格納完了信号を前記PLCモジュールに出力し、前記オプションモジュールと制御機器との間でデータの入出力処理を行う第2の割込信号を生成する手段を起動し、前記第2の割込信号が前記オプションモジュールのCPUに入力されたとき、前記オプションモジュールは制御機器に出力するデータを算出して、データを制御機器に出力し、前記PLCモジュールは同PLCモジュールのデータをオプションモジュールが取り込むまでは、ユーザプログラムを実行せず待機状態を保持し、前記オプションモジュールからのデータ格納完了信号により、ユーザプログラムを前記PLCモジュールが実行することにより、前記PLCモジュールと前記オプションモジュールの同期をとることを特徴とするものである。   The invention according to claim 3 includes a PLC module having a function as a programmable controller, and an option module having a function of inputting / outputting data to / from a control device, and the option module and the control device are In a synchronization method of a module-type programmable controller having a function of inputting / outputting data at regular intervals so that data from the option module can be surely passed to a control device, a first allocation is made to the CPU of the PLC module. When the data storage command from the PLC module is input to the option module, the option module stores the data of the PLC module, and outputs a data storage completion signal to the PLC module. Option module When the second interrupt signal is input to the CPU of the option module, a means for generating a second interrupt signal for inputting / outputting data between the control module and the control device is activated. Calculates data to be output to the control device, and outputs the data to the control device. The PLC module does not execute the user program and holds the standby state until the option module captures the data of the PLC module, The PLC module and the option module are synchronized by the PLC module executing a user program in response to a data storage completion signal from the option module.

また、請求項4に記載の発明は、プログラマブルコントローラとしての機能を有するPLCモジュールと、制御機器とデータの入出力を行う機能を有するオプションモジュールと、前記PLCモジュールと前記オプションモジュールとの間でデータのやり取りを行う共有メモリと、を備え、前記オプションモジュールと前記制御機器間は前記オプションモジュールからのデータを確実に制御機器まで渡すことができるように定周期でデータの入出力を行う機能を有するモジュール型のプログラマブルコントローラにおいて、前記PLCモジュールは、第1の割込信号とこれと同じタイミングで同期信号を発生する手段を有し、前記PLCモジュールは、第1の割込信号が入力されると、外部機器との入出力を行い、入出力が完了したときにデータ格納指令を前記オプションモジュールの共有メモリにセットした後、前記オプションモジュールのデータ格納完了信号待ちとなり、前記オプションモジュールからデータ格納完了信号が前記共有メモリにセットされると、ユーザプログラムを実行し、前記オプションモジュールは、第2の割込信号を生成する手段を有し、前記同期信号が入力されると、データ格納指令待ちとなり、前記PLCモジュールからのデータ格納指令が前記共有メモリにセットされると、前記PLCモジュールが該共有メモリにセットしたデータをメモリに格納し、格納が完了すると、データ格納完了信号を前記共有メモリにセットし、前記第2の割込信号を生成する手段を起動し、第2の割込信号が入力されると、制御機器に出力するデータを作成し、制御機器に出力することを特徴とするものである。   According to a fourth aspect of the present invention, there is provided a PLC module having a function as a programmable controller, an option module having a function of inputting / outputting data to / from a control device, and data between the PLC module and the option module. A shared memory for exchanging data, and having a function of inputting / outputting data at regular intervals between the option module and the control device so that the data from the option module can be surely passed to the control device In the module-type programmable controller, the PLC module has a first interrupt signal and means for generating a synchronization signal at the same timing, and the PLC module receives the first interrupt signal. Input / output to / from an external device and After the data storage command is set in the shared memory of the option module, the data storage completion signal of the option module is waited, and when the data storage completion signal is set in the shared memory from the option module, the user program is executed, The option module has means for generating a second interrupt signal. When the synchronization signal is input, the option module waits for a data storage command, and the data storage command from the PLC module is set in the shared memory. The PLC module stores the data set in the shared memory in the memory, and when the storage is completed, sets the data storage completion signal in the shared memory and activates the means for generating the second interrupt signal. When the second interrupt signal is input, data to be output to the control device is created, and the controller It is characterized in that output.

請求項1または請求項3に記載の発明によると、オプションモジュールの実装枚数に制限を加えることなく、PLCモジュールと制御機器との間のデータの受け渡しを確実に行うことができ、また、オプションモジュールのデータ更新周期をPLCモジュールのサンプリング周期と異なる値に設定できるので、PLCモジュールのサンプリング周期を長い値に設定してもオプションモジュールのデータ更新周期をPLCモジュールのサンプリング周期のn分の1に設定でき、制御精度の低下を防止することができる。   According to the invention described in claim 1 or claim 3, it is possible to reliably transfer data between the PLC module and the control device without limiting the number of option modules to be mounted. Because the data update cycle of the module can be set to a value different from the sampling cycle of the PLC module, the data update cycle of the option module is set to 1 / n of the sampling cycle of the PLC module even if the sampling cycle of the PLC module is set to a long value. It is possible to prevent a decrease in control accuracy.

また、請求項2または請求項4に記載の発明によると、1枚のオプションモジュールで接続可能な制御機器を超える多数の制御機器を接続する場合でも、必要枚数分のオプションモジュールを追加し、PLCモジュールに同期させることで、PLCモジュールが払い出すデータを、複数のオプションモジュールを介して確実に制御機器まで渡すことができ、複数のオプションモジュールを使用したモジュール型のPLC装置で同期制御を行うことができる。また、データを生成するPLCモジュールはプログラマブルであるため、任意のデータパターン(データの集まり)を生成することができるので、制御機器で構成される機械の動作に柔軟に対応でき、その結果、高性能、高機能な機械をPLC装置で構成することができる。   According to the invention described in claim 2 or claim 4, even when a large number of control devices exceeding the control devices connectable with one option module are connected, the required number of option modules are added and the PLC is connected. By synchronizing with the module, the data delivered by the PLC module can be reliably passed to the control device via a plurality of option modules, and the module type PLC device using the plurality of option modules performs the synchronization control. Can do. In addition, since the PLC module that generates data is programmable, it can generate an arbitrary data pattern (collection of data), so that it can flexibly cope with the operation of the machine configured by the control equipment. A machine with high performance and high functionality can be configured with a PLC device.

以下、本発明の実施の形態について図を参照して説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本発明のモジュール型のPLC装置の内部構成図である。図1において、2はPLCモジュールであり、プログラマブルコントローラとしての機能を有しており、外部の信号を取り込むための入力部20と、外部へ信号を出力するための出力部21と、データメモリ部22と、ユーザプログラムを記憶しているプログラムメモリ部24と、水晶発振子25と、水晶発振子25からのクロック信号で動作し、プログラムメモリ部に格納された制御プログラムにしたがって演算するCPU23と、ソフトウェアまたはハードウェアで設定された周期にしたがって、割込信号S14を出力するサンプリング周期発生回路26から構成される。サンプリング周期発生回路26の出力信号である割込信号S14がCPU23に入力されたときに、CPU23はプログラマブルコントローラの入力、出力および演算を実行する。また、データの入出力が完了したときに、オプションモジュール3に対し割込信号S20を出力する。3はオプションモジュールであり、PLCモジュール2がセットしたデータを自モジュール内に格納するためのメモリ35と、PLCモジュール2からのデータS11をメモリ35に格納したときにPLCモジュール2にデータS11の取り込みが完了したことを知らせるデータ格納完了信号S12を格納するための共有メモリ30と、水晶発振子34と、水晶発振子34で動作するCPU31と、制御機器との間でデータの入出力を行うためのデータ入出力部32と、オプションモジュール3と制御機器間のデータ更新周期を生成する更新周期発生回路40から構成される。更新周期発生回路40からの出力が割込信号S30として、オプションモジュール3のCPU31に入力される。PLCモジュール2からの出力信号である割込信号S20がCPU31に入力されると同期割込処理が実行され、その同期割込処理から出力された起動信号S16により更新周期発生回路40が起動され、更新周期発生回路40は起動された時点から水晶発振子34からのクロックを元に定周期に信号を生成し出力する。すなわち、更新周期発生回路40は同期割込処理から起動信号S16により起動され、割込信号S30を出力すると同時に、水晶発振子34からのクロックの計測を開始し、予め設定された周期に達すると割込信号S30を出力すると同時に、水晶発振子34からのクロックの計測を開始する。この動作を繰り返し行うことで定周期に信号を生成する。また、更新周期発生回路40からの出力である割込信号S30がCPU31に入力されると、制御機器との間でデータの入出力を行うデータ更新割込処理を実行する。   FIG. 1 is an internal configuration diagram of a modular PLC device according to the present invention. In FIG. 1, reference numeral 2 denotes a PLC module having a function as a programmable controller, an input unit 20 for taking in an external signal, an output unit 21 for outputting a signal to the outside, and a data memory unit 22, a program memory unit 24 storing a user program, a crystal oscillator 25, a CPU 23 that operates with a clock signal from the crystal oscillator 25 and operates according to a control program stored in the program memory unit, The sampling period generation circuit 26 outputs the interrupt signal S14 in accordance with a period set by software or hardware. When an interrupt signal S14, which is an output signal of the sampling cycle generation circuit 26, is input to the CPU 23, the CPU 23 executes input, output and calculation of the programmable controller. When the data input / output is completed, an interrupt signal S20 is output to the option module 3. Reference numeral 3 denotes an optional module. The memory 35 for storing the data set by the PLC module 2 in the own module and the data S11 from the PLC module 2 are stored in the memory 35 when the data S11 is stored in the memory 35. In order to input / output data between the shared memory 30 for storing the data storage completion signal S12 informing that the data has been completed, the crystal oscillator 34, the CPU 31 operating on the crystal oscillator 34, and the control device. Data input / output unit 32 and an update cycle generation circuit 40 that generates a data update cycle between the option module 3 and the control device. An output from the update cycle generation circuit 40 is input to the CPU 31 of the option module 3 as an interrupt signal S30. When an interrupt signal S20, which is an output signal from the PLC module 2, is input to the CPU 31, a synchronous interrupt process is executed, and the update cycle generation circuit 40 is activated by the activation signal S16 output from the synchronous interrupt process. The update cycle generation circuit 40 generates and outputs a signal at a constant cycle based on the clock from the crystal oscillator 34 from the time of activation. That is, the update cycle generation circuit 40 is activated by the activation signal S16 from the synchronous interrupt processing, outputs the interrupt signal S30, and simultaneously starts measuring the clock from the crystal oscillator 34, and reaches a preset cycle. Simultaneously with output of the interrupt signal S30, measurement of the clock from the crystal oscillator 34 is started. By repeating this operation, a signal is generated at regular intervals. When an interrupt signal S30, which is an output from the update cycle generation circuit 40, is input to the CPU 31, a data update interrupt process for inputting / outputting data to / from the control device is executed.

本発明が従来技術と異なる部分は、更新周期発生回路40を起動する起動信号S16と、データ格納完了信号S12を備えた部分である。   The present invention is different from the prior art in that it includes a start signal S16 for starting the update cycle generation circuit 40 and a data storage completion signal S12.

図2は、モジュール型PLC装置におけるPLCモジュールとオプションモジュールのソフトウェアの動作説明図であり、PLCモジュール2のサンプリング周期発生回路26から割込信号S14が入力されたときのPLCモジュール2のソフトウェアの動作、およびPLCモジュール2のCPU23から割込信号S20が入力されたときのオプションモジュール3のソフトウェアの動作を説明したものである。図2において、割込信号S14がPLCモジュール2のCPU23に入力されると、PLCモジュール2はまず、外部機器との入出力を行い(ステート10a)、入出力が完了したときに割込信号S20をオプションモジュール3に出力し(ステート11a)、オプションモジュール3からのデータ格納完了信号S12待ちとなる(ステート12a)。オプションモジュール3からデータ格納完了信号S12が共有メモリ30にセットされると、プログラムメモリ部24に格納されたユーザプログラムが実行され、そのユーザプログラムの中で時々刻々のデータが共有メモリ30にセットされる(ステート13a)。   FIG. 2 is a diagram for explaining the operation of the software of the PLC module and the option module in the modular PLC device. The operation of the software of the PLC module 2 when the interrupt signal S14 is input from the sampling period generation circuit 26 of the PLC module 2. The operation of the software of the option module 3 when the interrupt signal S20 is input from the CPU 23 of the PLC module 2 is described. In FIG. 2, when the interrupt signal S14 is input to the CPU 23 of the PLC module 2, the PLC module 2 first performs input / output with an external device (state 10a), and when the input / output is completed, the interrupt signal S20. Is output to the option module 3 (state 11a), and the data storage completion signal S12 from the option module 3 is awaited (state 12a). When the data storage completion signal S12 from the option module 3 is set in the shared memory 30, the user program stored in the program memory unit 24 is executed, and data in the user program is set in the shared memory 30 every moment. (State 13a).

一方、オプションモジュール3は、割込信号S20がオプションモジュール3のCPU31に入力されると、同期割込処理がCPU31により実行される。同期割込処理の処理内容は、まずPLCモジュール2が共有メモリ30にセットしたデータを自モジュール内のメモリ35に格納する。このデータを総データ量に積算して、制御機器への出力の総データ量とする(ステート20a)。次に、格納が完了すると、データ格納完了信号S12を共有メモリ30にセットして、データの取り込みが完了したことをPLCモジュール2に通知する(ステート21a)。次に、起動信号S16を出力して更新周期発生回路40を起動する(ステート22a)。更新周期発生回路40が起動されると、更新周期発生回路40から割込信号S30が出力され、オプションモジュール3のCPU31に入力され、データ更新割込処理がCPU31により実行される。データ更新割込処理では、制御機器からのデータ入力、および総データ量から今回出力するデータを作成して制御機器に出力する(ステート30a)。   On the other hand, in the option module 3, when the interrupt signal S <b> 20 is input to the CPU 31 of the option module 3, the synchronous interrupt process is executed by the CPU 31. As the processing contents of the synchronous interrupt processing, first, the data set by the PLC module 2 in the shared memory 30 is stored in the memory 35 in the own module. This data is added to the total data amount to obtain the total data amount output to the control device (state 20a). Next, when the storage is completed, a data storage completion signal S12 is set in the shared memory 30 to notify the PLC module 2 that the data capture is completed (state 21a). Next, an activation signal S16 is output to activate the update cycle generation circuit 40 (state 22a). When the update cycle generation circuit 40 is activated, an interrupt signal S30 is output from the update cycle generation circuit 40 and is input to the CPU 31 of the option module 3, and the data update interrupt process is executed by the CPU 31. In the data update interrupt process, data to be output this time is generated from the data input from the control device and the total data amount, and is output to the control device (state 30a).

図3は、本発明のモジュール型のPLC装置の内部構成図である。図3において、2はPLCモジュールであり、プログラマブルコントローラとしての機能を有しており、外部の信号を取り込むための入力部20と、外部へ信号を出力するための出力部21と、データメモリ部22と、ユーザプログラムを記憶しているプログラムメモリ部24と、水晶発振子25と、水晶発振子25からのクロック信号で動作し、プログラムメモリ部に格納された制御プログラムにしたがって演算するCPU23と、ソフトウェアまたはハードウェアで設定された周期にしたがって、割込信号S14およびオプションモジュール3への出力信号である同期信号S15を出力するサンプリング周期発生回路26から構成される。サンプリング周期発生回路26の出力信号である割込信号S14がCPU23に入力されたときに、CPU23はプログラマブルコントローラの入力、出力および演算を実行する。データの入出力が完了したときに、オプションモジュール3に対しデータ格納指令S17がオプションモジュール3の共有メモリに格納される。3はオプションモジュールであり、PLCモジュール2がセットしたデータを自モジュール内に格納するためのメモリ35と、PLCモジュール2からのデータS11をメモリ35に格納した時にPLCモジュール2にデータS11の取り込みが完了したことを知らせるデータ格納完了信号S12を格納するための共有メモリ30と、水晶発振子34と、水晶発振子34で動作するCPU31と、制御機器との間でデータの入出力を行うためのデータ入出力部32と、オプションモジュール3と制御機器間のデータ更新周期を生成する更新周期発生回路40から構成される。更新周期発生回路40からの出力が割込信号S30として、オプションモジュール3のCPU31に入力される。更新周期発生回路40は、PLCモジュール2からの出力信号である同期信号S15がCPU31に入力されると同期割込処理が実行され、その同期割込処理から出力された起動信号S16により起動され、起動された時点から水晶発振子34からのクロックを元に定周期に信号を生成し出力する。すなわち、更新周期発生回路40は同期割込処理から起動信号S16により起動されると、割込信号S30を出力すると同時に、水晶発振子34からのクロックの計測を開始し、予め設定された周期に達すると割込信号S30を出力すると同時に、水晶発振子34からのクロックの計測を開始する。この動作を繰り返し行うことで定周期に信号を生成する。また、更新周期発生回路40からの出力である割込信号S30がCPU31に入力されると、制御機器との間でデータの入出力を行うデータ更新割込処理を実行する。   FIG. 3 is an internal configuration diagram of the module type PLC apparatus of the present invention. In FIG. 3, reference numeral 2 denotes a PLC module having a function as a programmable controller, an input unit 20 for capturing an external signal, an output unit 21 for outputting a signal to the outside, and a data memory unit 22, a program memory unit 24 storing a user program, a crystal oscillator 25, a CPU 23 that operates with a clock signal from the crystal oscillator 25 and operates according to a control program stored in the program memory unit, The sampling period generating circuit 26 outputs an interrupt signal S14 and a synchronization signal S15 that is an output signal to the option module 3 in accordance with a period set by software or hardware. When an interrupt signal S14, which is an output signal of the sampling cycle generation circuit 26, is input to the CPU 23, the CPU 23 executes input, output and calculation of the programmable controller. When the input / output of data is completed, a data storage command S17 is stored in the shared memory of the option module 3 for the option module 3. Reference numeral 3 denotes an optional module, and when the data set by the PLC module 2 is stored in the own module and the data S11 from the PLC module 2 is stored in the memory 35, the data S11 is taken into the PLC module 2. Data input / output between the shared memory 30 for storing the data storage completion signal S12 for notifying completion, the crystal oscillator 34, the CPU 31 operating on the crystal oscillator 34, and the control device. The data input / output unit 32 and an update cycle generation circuit 40 that generates a data update cycle between the option module 3 and the control device. An output from the update cycle generation circuit 40 is input to the CPU 31 of the option module 3 as an interrupt signal S30. The update cycle generation circuit 40 executes a synchronous interrupt process when the synchronization signal S15, which is an output signal from the PLC module 2, is input to the CPU 31, and is activated by the activation signal S16 output from the synchronous interrupt process. A signal is generated and outputted at a fixed period based on the clock from the crystal oscillator 34 from the time of activation. That is, when the update cycle generation circuit 40 is activated by the activation signal S16 from the synchronous interrupt processing, it outputs the interrupt signal S30 and at the same time starts measuring the clock from the crystal oscillator 34 at a preset cycle. When it reaches, the interrupt signal S30 is output, and at the same time, measurement of the clock from the crystal oscillator 34 is started. By repeating this operation, a signal is generated at regular intervals. When an interrupt signal S30, which is an output from the update cycle generation circuit 40, is input to the CPU 31, a data update interrupt process for inputting / outputting data to / from the control device is executed.

本発明が従来技術と異なる部分は、オプションモジュールへの同期信号S15と、更新周期発生回路40およびその起動信号であるS16とその出力信号であるS30と、データ格納指令S17と、データ格納完了信号S12を備えた部分である。 The present invention is different from the prior art in that the synchronization signal S15 to the option module, the update cycle generation circuit 40 and its start signal S16 and its output signal S30, the data storage command S17, and the data storage completion signal It is a part provided with S12.

図4は、モジュール型PLC装置におけるPLCモジュールとオプションモジュールのソフトウェアの動作説明図であり、PLCモジュール2のサンプリング周期発生回路26から割込信号S14が入力された時のPLCモジュール2のソフトウェアの動作、およびPLCモジュール2のサンプリング周期発生回路26から同期信号S15が入力された時のオプションモジュール3のソフトウェアの動作を説明したものである。図4において、割込信号S14がPLCモジュール2のCPU23に入力されると、PLCモジュール2はまず、外部機器との入出力を行い(ステート10b)、入出力が完了したときにデータ格納指令S17を共有メモリ30にセットし(ステート11b)、オプションモジュール3からのデータ格納完了信号待ちとなる(ステート12b)。オプションモジュール3からデータ格納完了信号S12が共有メモリ30にセットされると、プログラムメモリ部24に格納されたユーザプログラムが実行され、そのユーザプログラムの中で時々刻々のデータが共有メモリ30にセットされる(ステート13b)。   FIG. 4 is a diagram for explaining the operation of the software of the PLC module and the option module in the modular PLC apparatus. The operation of the software of the PLC module 2 when the interrupt signal S14 is input from the sampling period generation circuit 26 of the PLC module 2. The operation of the software of the option module 3 when the synchronization signal S15 is input from the sampling cycle generation circuit 26 of the PLC module 2 is described. In FIG. 4, when the interrupt signal S14 is input to the CPU 23 of the PLC module 2, the PLC module 2 first performs input / output to / from an external device (state 10b), and when the input / output is completed, the data storage command S17. Is set in the shared memory 30 (state 11b), and a data storage completion signal from the option module 3 is waited (state 12b). When the data storage completion signal S12 from the option module 3 is set in the shared memory 30, the user program stored in the program memory unit 24 is executed, and data in the user program is set in the shared memory 30 every moment. (State 13b).

一方、オプションモジュール3は、同期信号S15がオプションモジュール3のCPU31に入力されると、同期割込処理がCPU31により実行される。同期割込処理の処理内容は、まずPLCモジュール2からのデータ格納指令S17待ちとなる(ステート200)。次に、PLCモジュール2からデータ格納指令S17が共有メモリ30にセットされると、PLCモジュール2が共有メモリ30にセットしたデータを自モジュール内のメモリ35に格納する。このデータを総データ量に積算して、制御機器への出力の総データ量とする(ステート20b)。格納が完了すると、データ格納完了信号S12を共有メモリ30にセットして、データの取り込みが完了したことをPLCモジュール2に通知する(ステート21b)。次に、起動信号S16を出力して更新周期発生回路40を起動する(ステート22b)。更新周期発生回路40が起動されると、更新周期発生回路40から割込信号S30が出力され、オプションモジュール3のCPU31に入力され、データ更新割込処理がCPU31により実行される。データ更新割込処理では、制御機器からのデータ入力、および総データ量から今回出力するデータを作成して制御機器に出力する(ステート30b)。   On the other hand, in the option module 3, when the synchronization signal S <b> 15 is input to the CPU 31 of the option module 3, the synchronization interrupt process is executed by the CPU 31. The processing content of the synchronous interrupt processing first waits for a data storage command S17 from the PLC module 2 (state 200). Next, when the data storage command S17 is set in the shared memory 30 from the PLC module 2, the data set in the shared memory 30 by the PLC module 2 is stored in the memory 35 in the own module. This data is added to the total data amount to obtain the total data amount output to the control device (state 20b). When the storage is completed, a data storage completion signal S12 is set in the shared memory 30 to notify the PLC module 2 that the data capture is completed (state 21b). Next, an activation signal S16 is output to activate the update cycle generation circuit 40 (state 22b). When the update cycle generation circuit 40 is activated, an interrupt signal S30 is output from the update cycle generation circuit 40 and is input to the CPU 31 of the option module 3, and the data update interrupt process is executed by the CPU 31. In the data update interrupt process, data to be output this time is created from the data input from the control device and the total data amount, and is output to the control device (state 30b).

このように、実施例1においては、PLCモジュールから出力される割込信号S20がオプションモジュールに入力されたときに、実施例2においては、PLCモジュールで定周期に生成される同期信号S15が入力されたときに制御機器への入出力を行うデータ更新割込処理を起動することにより、オプションモジュールの実装枚数に制限を加えることなく、PLCモジュールが払い出すデータを、オプションモジュールを介して確実に制御機器まで渡すことができ、また、オプションモジュールのデータ更新周期をPLCモジュールのサンプリング周期と異なる値に設定できるので、PLCモジュールのサンプリング周期を長い値に設定してもオプションモジュールのデータ更新周期をPLCモジュールのサンプリング周期のn分の1に設定でき、制御精度の低下を防止することができる。   As described above, in the first embodiment, when the interrupt signal S20 output from the PLC module is input to the option module, in the second embodiment, the synchronization signal S15 generated at a fixed period by the PLC module is input. By starting the data update interrupt processing that inputs / outputs to / from the control device when it is done, the data delivered by the PLC module can be reliably transmitted via the option module without limiting the number of installed option modules. Since the data update cycle of the option module can be set to a value different from the sampling cycle of the PLC module, the data update cycle of the option module can be set even if the sampling cycle of the PLC module is set to a long value. 1 / n of the sampling period of the PLC module Constant can, it is possible to prevent deterioration of the control accuracy.

また、1枚のオプションモジュールで接続可能な制御機器を超える多数の制御機器を接続する場合でも、必要枚数分のオプションモジュールを追加し、PLCモジュールに同期させることで、PLCモジュールが払い出すデータを、複数のオプションモジュールを介して確実に制御機器まで渡すことができ、複数のオプションモジュールを使用したモジュール型のPLC装置で同期制御を行うことができる。   Also, even when connecting many control devices that exceed the control devices that can be connected with one option module, add the required number of option modules and synchronize with the PLC module, so that the data delivered by the PLC module can be The control device can be surely passed to the control device via the plurality of option modules, and the synchronous control can be performed by the module type PLC device using the plurality of option modules.

PLCモジュールに同期した複数のオプションモジュールを使用することにより、多数の制御機器をPLCモジュールに同期させることができるので、多数の制御機器の同期を必要とする機械システムにPLC装置を適用できる。   Since a plurality of control devices can be synchronized with the PLC module by using a plurality of option modules synchronized with the PLC module, the PLC device can be applied to a mechanical system that requires synchronization of a large number of control devices.

本発明の実施例1を示すモジュール型PLC装置の内部構成図The internal block diagram of the module type PLC apparatus which shows Example 1 of this invention 本発明の実施例1を示すモジュール型PLC装置におけるPLCモジュールとオプションモジュールのソフトウェアの動作説明図Operation explanatory diagram of software of the PLC module and the option module in the modular PLC apparatus showing the first embodiment of the present invention 本発明の実施例2を示すモジュール型PLC装置の内部構成図The internal block diagram of the module type | mold PLC apparatus which shows Example 2 of this invention 本発明の実施例2を示すモジュール型PLC装置におけるPLCモジュールとオプションモジュールのソフトウェアの動作説明図Software operation explanatory diagram of the PLC module and the option module in the module type PLC apparatus showing Embodiment 2 of the present invention 一般のモジュール型PLC装置の概略構成図Schematic configuration diagram of a general modular PLC device 従来のモジュール型PLC装置の内部構成図Internal configuration diagram of a conventional modular PLC device 従来のモジュール型PLC装置の内部構成図Internal configuration diagram of a conventional modular PLC device 従来のモジュール型PLC装置における問題点を説明するためのタイムチャートTime chart for explaining problems in a conventional modular PLC device

符号の説明Explanation of symbols

1 プログラム入力装置
2 PLCモジュール
3 オプションモジュール
4 制御機器
5 プログラマブルコントローラ
20 入力部
21 出力部
22 データメモリ部
23 CPU
24 プログラムメモリ部
25 水晶発振子
26 サンプリング周期発生回路
30 共有メモリ
31 CPU
32 データ入出力部
34 水晶発振子
35 メモリ
40 更新周期発生回路
S11 データ
S12 データ格納完了信号
S14 割込信号
S15 割込信号
S16 起動信号
S17 データ格納指令
S20 割込信号
S30 割込信号
DESCRIPTION OF SYMBOLS 1 Program input device 2 PLC module 3 Option module 4 Control apparatus 5 Programmable controller 20 Input part 21 Output part 22 Data memory part 23 CPU
24 Program memory unit 25 Crystal oscillator 26 Sampling cycle generation circuit 30 Shared memory 31 CPU
32 Data input / output unit 34 Crystal oscillator 35 Memory 40 Update cycle generation circuit S11 Data S12 Data storage completion signal S14 Interrupt signal S15 Interrupt signal S16 Start signal S17 Data storage command S20 Interrupt signal S30 Interrupt signal

Claims (4)

プログラマブルコントローラとしての機能を有するPLCモジュールと、
制御機器とデータの入出力を行う機能を有するオプションモジュールと、を備え、
前記オプションモジュールと前記制御機器間は前記オプションモジュールからのデータを確実に制御機器まで渡すことができるように定周期でデータの入出力を行う機能を有するモジュール型のプログラマブルコントローラの同期方法において、
前記PLCモジュールのCPUに第1の割込信号が入力されたとき、前記PLCモジュールは第2の割込信号を発生する手段を起動し、
前記PLCモジュールからの前記第2の割込信号が前記オプションモジュールに入力されたとき、前記オプションモジュールが前記PLCモジュールのデータを格納し、データ格納完了信号を前記PLCモジュールに出力し、前記オプションモジュールと制御機器との間でデータの入出力処理を行う第3の割込信号を生成する手段を起動し、
前記第3の割込信号が前記オプションモジュールのCPUに入力されたとき、前記オプションモジュールは制御機器に出力するデータを算出して、データを制御機器に出力し、前記PLCモジュールは同PLCモジュールのデータをオプションモジュールが取り込むまでは、ユーザプログラムを実行せず待機状態を保持し、
前記オプションモジュールからのデータ格納完了信号により、ユーザプログラムを前記PLCモジュールが実行することにより、前記PLCモジュールと前記オプションモジュールの同期をとることを特徴とするモジュール型のプログラマブルコントローラの同期方法。
A PLC module having a function as a programmable controller;
An optional module having a function to input / output data with a control device,
In the synchronization method of the module-type programmable controller having a function of inputting and outputting data at a constant cycle so that data from the option module can be reliably passed to the control device between the option module and the control device.
When a first interrupt signal is input to the CPU of the PLC module, the PLC module activates means for generating a second interrupt signal;
When the second interrupt signal from the PLC module is input to the option module, the option module stores data of the PLC module, and outputs a data storage completion signal to the PLC module. Activating means for generating a third interrupt signal for performing data input / output processing between the control device and the control device
When the third interrupt signal is input to the CPU of the option module, the option module calculates data to be output to the control device and outputs the data to the control device, and the PLC module is connected to the PLC module. Until the option module captures data, the user program is not executed and the standby state is maintained.
A method of synchronizing a module type programmable controller, wherein the PLC module and the option module are synchronized by the PLC module executing a user program in response to a data storage completion signal from the option module.
プログラマブルコントローラとしての機能を有するPLCモジュールと、
制御機器とデータの入出力を行う機能を有するオプションモジュールと、
前記PLCモジュールと前記オプションモジュールとの間でデータのやり取りを行う共有メモリと、を備え、
前記オプションモジュールと前記制御機器間は前記オプションモジュールからのデータを確実に制御機器まで渡すことができるように定周期でデータの入出力を行う機能を有するモジュール型のプログラマブルコントローラにおいて、
前記PLCモジュールは第1の割込信号と第2の割込信号とを発生する手段を有し、前記PLCモジュールは第1の割込信号が入力されると、外部機器との入出力を行い、入出力が完了したときに前記第2の割込信号を発生する手段を起動した後、前記オプションモジュールのデータ格納完了信号待ちとなり、前記オプションモジュールからデータ格納完了信号が前記共有メモリにセットされると、ユーザプログラムを実行し、
前記オプションモジュールは第3の割込信号を生成する手段を有し、前記第2の割込信号が入力されると、前記PLCモジュールが該共有メモリにセットしたデータをメモリに格納し、格納が完了すると、データ格納完了信号を前記共有メモリにセットし、前記第3の割込信号を生成する手段を起動し、前記第3の割込信号が入力されると、制御機器に出力するデータを作成し、制御機器に出力することを特徴とするモジュール型のプログラマブルコントローラ。
A PLC module having a function as a programmable controller;
An option module having a function of inputting / outputting data to / from the control device;
A shared memory for exchanging data between the PLC module and the option module,
In the module-type programmable controller having a function of inputting and outputting data at a constant cycle so that data from the option module can be reliably passed to the control device between the option module and the control device.
The PLC module has means for generating a first interrupt signal and a second interrupt signal, and the PLC module performs input / output with an external device when the first interrupt signal is input. After starting the means for generating the second interrupt signal when the input / output is completed, the option module waits for the data storage completion signal, and the data storage completion signal is set in the shared memory from the option module. Then run the user program,
The option module has means for generating a third interrupt signal. When the second interrupt signal is input, the data set by the PLC module in the shared memory is stored in the memory. When completed, the data storage completion signal is set in the shared memory, the means for generating the third interrupt signal is activated, and when the third interrupt signal is input, the data to be output to the control device A modular programmable controller characterized by creating and outputting to a control device.
プログラマブルコントローラとしての機能を有するPLCモジュールと、
制御機器とデータの入出力を行う機能を有するオプションモジュールと、を備え、
前記オプションモジュールと前記制御機器間は前記オプションモジュールからのデータを確実に制御機器まで渡すことができるように定周期でデータの入出力を行う機能を有するモジュール型のプログラマブルコントローラの同期方法において、
前記PLCモジュールのCPUに第1の割込信号が入力されて前記PLCモジュールからのデータ格納指令が前記オプションモジュールに入力されたとき、前記オプションモジュールが前記PLCモジュールのデータを格納し、データ格納完了信号を前記PLCモジュールに出力し、前記オプションモジュールと制御機器との間でデータの入出力処理を行う第2の割込信号を生成する手段を起動し、
前記第2の割込信号が前記オプションモジュールのCPUに入力されたとき、前記オプションモジュールは制御機器に出力するデータを算出して、データを制御機器に出力し、前記PLCモジュールは同PLCモジュールのデータをオプションモジュールが取り込むまでは、ユーザプログラムを実行せず待機状態を保持し、前記オプションモジュールからのデータ格納完了信号により、ユーザプログラムを前記PLCモジュールが実行することにより、前記PLCモジュールと前記オプションモジュールの同期をとることを特徴とするモジュール型のプログラマブルコントローラの同期方法。
A PLC module having a function as a programmable controller;
An optional module having a function to input / output data with a control device,
In the synchronization method of the module-type programmable controller having a function of inputting and outputting data at a constant cycle so that data from the option module can be reliably passed to the control device between the option module and the control device.
When the first interrupt signal is input to the CPU of the PLC module and the data storage command from the PLC module is input to the option module, the option module stores the data of the PLC module, and the data storage is completed A means for generating a second interrupt signal for outputting a signal to the PLC module and performing data input / output processing between the option module and the control device;
When the second interrupt signal is input to the CPU of the option module, the option module calculates data to be output to the control device and outputs the data to the control device, and the PLC module is connected to the PLC module. Until the option module fetches data, the user program is not executed and the standby state is maintained, and the PLC module and the option are executed by the PLC module executing the user program in response to a data storage completion signal from the option module. A module-type programmable controller synchronization method, wherein the modules are synchronized.
プログラマブルコントローラとしての機能を有するPLCモジュールと、
制御機器とデータの入出力を行う機能を有するオプションモジュールと、
前記PLCモジュールと前記オプションモジュールとの間でデータのやり取りを行う共有メモリと、を備え、
前記オプションモジュールと前記制御機器間は前記オプションモジュールからのデータを確実に制御機器まで渡すことができるように定周期でデータの入出力を行う機能を有するモジュール型のプログラマブルコントローラにおいて、
前記PLCモジュールは、第1の割込信号とこれと同じタイミングで同期信号を発生する手段を有し、前記PLCモジュールは、第1の割込信号が入力されると、外部機器との入出力を行い、入出力が完了したときにデータ格納指令を前記オプションモジュールの共有メモリにセットした後、前記オプションモジュールのデータ格納完了信号待ちとなり、前記オプションモジュールからデータ格納完了信号が前記共有メモリにセットされると、ユーザプログラムを実行し、
前記オプションモジュールは、第2の割込信号を生成する手段を有し、前記同期信号が入力されると、データ格納指令待ちとなり、前記PLCモジュールからのデータ格納指令が前記共有メモリにセットされると、前記PLCモジュールが該共有メモリにセットしたデータをメモリに格納し、格納が完了すると、データ格納完了信号を前記共有メモリにセットし、前記第2の割込信号を生成する手段を起動し、第2の割込信号が入力されると、制御機器に出力するデータを作成し、制御機器に出力することを特徴とするモジュール型のプログラマブルコントローラ。
A PLC module having a function as a programmable controller;
An option module having a function of inputting / outputting data to / from the control device;
A shared memory for exchanging data between the PLC module and the option module,
In the module-type programmable controller having a function of inputting and outputting data at a constant cycle so that data from the option module can be reliably passed to the control device between the option module and the control device.
The PLC module includes a first interrupt signal and a means for generating a synchronization signal at the same timing as the first interrupt signal. When the first interrupt signal is input, the PLC module inputs / outputs from / to an external device. After the input / output is completed, the data storage command is set in the shared memory of the option module, and then the data storage completion signal of the option module is waited, and the data storage completion signal from the option module is set in the shared memory. The user program is executed,
The option module has means for generating a second interrupt signal. When the synchronization signal is input, the option module waits for a data storage command, and the data storage command from the PLC module is set in the shared memory. The PLC module stores the data set in the shared memory in the memory, and when the storage is completed, sets the data storage completion signal in the shared memory and activates the means for generating the second interrupt signal. When the second interrupt signal is input, the module type programmable controller is characterized in that data to be output to the control device is created and output to the control device.
JP2004264772A 2004-09-13 2004-09-13 Method for synchronizing modular programmable controller and programmable controller Pending JP2006079480A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004264772A JP2006079480A (en) 2004-09-13 2004-09-13 Method for synchronizing modular programmable controller and programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004264772A JP2006079480A (en) 2004-09-13 2004-09-13 Method for synchronizing modular programmable controller and programmable controller

Publications (1)

Publication Number Publication Date
JP2006079480A true JP2006079480A (en) 2006-03-23

Family

ID=36158856

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004264772A Pending JP2006079480A (en) 2004-09-13 2004-09-13 Method for synchronizing modular programmable controller and programmable controller

Country Status (1)

Country Link
JP (1) JP2006079480A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023276351A1 (en) * 2021-07-02 2023-01-05 オムロン株式会社 Control device, system program, and method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023276351A1 (en) * 2021-07-02 2023-01-05 オムロン株式会社 Control device, system program, and method
JP7643213B2 (en) 2021-07-02 2025-03-11 オムロン株式会社 CONTROL DEVICE, SYSTEM PROGRAM AND METHOD
EP4365690A4 (en) * 2021-07-02 2025-07-23 Omron Tateisi Electronics Co CONTROL DEVICE, SYSTEM PROGRAM AND METHOD
US12386517B2 (en) 2021-07-02 2025-08-12 Omron Corporation Control device, system program, and method

Similar Documents

Publication Publication Date Title
KR101044521B1 (en) Synchronous control device of slave devices connected to network
JP6152920B2 (en) Programmable controller system, its controller
US20100199003A1 (en) Field control system
JPH11178217A (en) Synchronization method and synchronization method for multiplex system controller
US10025281B2 (en) Control device and system program, and recording medium
JP2016110458A (en) Programmable logic controller, basic unit, control method and program
JP5067670B2 (en) Machine controller system
CN107947888A (en) A kind of task level synchronous method based on network service
KR101704751B1 (en) Apparatus for simulating of multi-core system by using timing information between modules, and method thereof
JPWO2017077628A1 (en) Functional unit and control device
JP2003036101A (en) Redundant controller
JP4961589B2 (en) Network system and slave synchronization method
JP2006079480A (en) Method for synchronizing modular programmable controller and programmable controller
JP2003202907A (en) Synchronization method between PLC module and option module
EP2254012A2 (en) Duplexed field controller
JP2006048284A (en) Programmable controller device and synchronization method with option module
JP2006350768A (en) Motion control system
JP2002333905A (en) Programmable controller that can synchronize between optional modules
JP2004086431A (en) Programmable controller that can synchronize between optional modules
JP2004110120A (en) Modular programmable controller synchronization method and modular programmable controller
JP2004102791A (en) Synchronization method of programmable controller
JPH11259105A (en) Externally Synchronizable Programmable Controller
JP2004086432A (en) Synchronization method of programmable controller
JP2006260386A (en) Programmable controller device
JP2009541889A (en) How data is processed