JP2017062758A - Control system and control method - Google Patents

Control system and control method Download PDF

Info

Publication number
JP2017062758A
JP2017062758A JP2016032611A JP2016032611A JP2017062758A JP 2017062758 A JP2017062758 A JP 2017062758A JP 2016032611 A JP2016032611 A JP 2016032611A JP 2016032611 A JP2016032611 A JP 2016032611A JP 2017062758 A JP2017062758 A JP 2017062758A
Authority
JP
Japan
Prior art keywords
interrupt
interrupt program
module
digital signal
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2016032611A
Other languages
Japanese (ja)
Other versions
JP6686521B2 (en
Inventor
崇 光井
Takashi Mitsui
崇 光井
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.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Co Ltd
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 Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Publication of JP2017062758A publication Critical patent/JP2017062758A/en
Application granted granted Critical
Publication of JP6686521B2 publication Critical patent/JP6686521B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Programmable Controllers (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a control system capable of preventing degradation of control capacity and resolution in a piece of equipment to be controlled irrespective of increase of capacity of an execution program.SOLUTION: The control system has an input-output module 126 that includes: a condition determination section that determines whether or not an interrupt condition associated with an interrupt program is satisfied; and an interrupt program execution section that executes the interrupt program when the condition determination section determines that the interrupt condition is satisfied. The calculation module 122 includes non-interrupt program execution section that refers to an execution result by the interrupt program execution section and executes a non-interrupt program.SELECTED DRAWING: Figure 3

Description

本発明は、演算モジュールと入力モジュールとを備える制御システムおよび制御方法に関する。   The present invention relates to a control system and a control method including an arithmetic module and an input module.

大規模な制御システムでは、システムの構築やメンテナンスの容易性の観点から、必要な機能を複数のモジュールに分散させたプログラマブルコントローラを採用することがある。プログラマブルコントローラは、例えば、演算モジュール、通信モジュール、入出力モジュール(入力モジュール+出力モジュール)、電源モジュールといった複数種類のモジュールで構成され、それぞれのモジュール数を制御対象に合わせて変更可能とすることで、メンテナンスやシステムの拡張性を高めている。   In a large-scale control system, a programmable controller in which necessary functions are distributed among a plurality of modules may be employed from the viewpoint of system configuration and ease of maintenance. The programmable controller is composed of, for example, a plurality of types of modules such as an arithmetic module, a communication module, an input / output module (input module + output module), and a power supply module, and the number of modules can be changed according to the control target. , Enhance the maintenance and expandability of the system.

プログラマブルコントローラでは、例えば、通信モジュールが、アプリケーションを実行するための実行プログラムを演算モジュールにダウンロードし、演算モジュールが、ダウンロードされた実行プログラムを用い、入出力モジュールを通じて下位の被制御機器から入力データを収集すると共に演算処理を実行し、その演算結果を、入出力モジュールを通じて下位の被制御機器に伝達している(例えば、特許文献1)。   In a programmable controller, for example, a communication module downloads an execution program for executing an application to an arithmetic module, and the arithmetic module uses the downloaded execution program to input data from a lower controlled device through an input / output module. Collecting and executing arithmetic processing are performed, and the arithmetic result is transmitted to a lower-level controlled device through an input / output module (for example, Patent Document 1).

特開2014−120187号公報JP 2014-120187 A

上述したように、プログラマブルコントローラでは、演算モジュールが実行プログラムを用いて他のモジュールおよび下位の被制御機器を制御する。このような実行プログラムに基づく演算モジュールの処理は、割込条件の成立に基づいて実行される割込処理と、割込処理による時間的な制約を受けない非割込処理とに大別される。演算モジュールでは、非割込処理を周期的に実行しつつ、また、割込条件が成立すると割込処理を優先的に実行し、割込処理以外の有余時間を有効利用して非割込処理を実行していた。   As described above, in the programmable controller, the arithmetic module controls other modules and lower-level controlled devices using the execution program. Processing of an arithmetic module based on such an execution program is roughly divided into interrupt processing executed based on the establishment of the interrupt condition and non-interrupt processing that is not subject to time restrictions due to the interrupt processing. . In the arithmetic module, non-interrupt processing is executed periodically, and when the interrupt condition is satisfied, the interrupt processing is executed preferentially, and the remaining time other than the interrupt processing is effectively used to perform the non-interrupt processing. Was running.

しかし、アプリケーションの多様化に伴い、実行プログラムの容量も増大し、割込処理および非割込処理の処理時間が共に長期化して、想定される処理時間内で完了することが困難となってきた。ここで、単純に非割込処理の周期を長くしてしまうと、情報の更新頻度も低くなるので、被制御機器の制御能力や分解能の劣化を招くことになってしまう。また、割込処理の処理結果も周期的にしか入出力モジュールに伝達されないので、非割込処理の周期の長期化に伴い割込処理の処理結果が伝達されるタイミングも遅くなることとなる。   However, with the diversification of applications, the capacity of execution programs has increased, and the processing time for both interrupt processing and non-interrupt processing has become longer, making it difficult to complete within the expected processing time. . Here, if the non-interrupt processing cycle is simply lengthened, the information update frequency is also lowered, leading to deterioration in the control capability and resolution of the controlled device. In addition, since the processing result of the interrupt process is also transmitted to the input / output module only periodically, the timing at which the processing result of the interrupt process is transmitted is delayed with an increase in the period of the non-interrupt process.

そこで、本発明は、このような課題に鑑み、実行プログラムの容量の増大に拘わらず、被制御機器の制御能力や分解能の劣化を防止することが可能な制御システムおよび制御方法を提供することを目的としている。   Therefore, in view of such a problem, the present invention provides a control system and a control method capable of preventing deterioration of control capability and resolution of a controlled device regardless of increase in the capacity of an execution program. It is aimed.

上記課題を解決するために、外部からデータを入力する入力モジュールと、入力モジュールとバスを通じて接続され、入力モジュールから受信したデータに基づいて演算を行う演算モジュールと、を備えた本発明の制御システムでは、制御システムで実行されるプログラムは、割込条件の成立を実行契機とする割込プログラムと、割込プログラムを除いた非割込プログラムとを含んでなり、入力モジュールは、割込プログラムに対応付けられた割込条件が成立しているか否か判定する条件判定部と、割込条件が成立していると判定されると、割込プログラムを実行する割込プログラム実行部と、を備え、演算モジュールは、割込プログラム実行部の実行結果を参照し、非割込プログラムを実行する非割込プログラム実行部を備えることを特徴とする。   In order to solve the above problems, the control system of the present invention includes an input module for inputting data from the outside, and an arithmetic module connected to the input module through a bus and performing an operation based on data received from the input module. Then, the program executed in the control system includes an interrupt program triggered by the establishment of the interrupt condition and a non-interrupt program excluding the interrupt program. A condition determination unit that determines whether or not an associated interrupt condition is satisfied, and an interrupt program execution unit that executes an interrupt program when it is determined that the interrupt condition is satisfied The arithmetic module includes a non-interrupt program execution unit that refers to an execution result of the interrupt program execution unit and executes a non-interrupt program. To.

所定の契機に、割込プログラムを入力モジュールに複製するプログラム複製部をさらに備えてもよい。   You may further provide the program replication part which replicates an interruption program to an input module at a predetermined opportunity.

所定の契機は、演算モジュールおよび入力モジュールの起動時であり、プログラム複製部は、割込プログラムを、演算モジュールから入力モジュールに複製してもよい。   The predetermined trigger is when the arithmetic module and the input module are activated, and the program duplicating unit may duplicate the interrupt program from the arithmetic module to the input module.

入力モジュールは、割込プログラム実行部が割込プログラムに基づく割込処理を完了すると、割込処理が完了した旨の情報を演算モジュールに送信する履歴通知部をさらに備えてもよい。   The input module may further include a history notification unit that transmits information indicating that the interrupt process is completed to the arithmetic module when the interrupt program execution unit completes the interrupt process based on the interrupt program.

入力モジュールは、外部のアナログ信号をデジタル信号に変換するADコンバータと、ADコンバータの変換制御を行うAD制御回路と、を備え、割込プログラム実行部は、割込プログラムの実行途中で任意のデジタル信号が必要になると、AD制御回路にADコンバータの変換制御を実行させ、ADコンバータの変換完了後に、任意のデジタル信号のみ正規化して正規化デジタル信号を生成し、正規化デジタル信号によって割込プログラムを実行してもよい。   The input module includes an AD converter that converts an external analog signal into a digital signal, and an AD control circuit that performs conversion control of the AD converter, and the interrupt program execution unit performs arbitrary digital processing during the execution of the interrupt program. When a signal is required, the AD control circuit executes AD converter conversion control, and after the AD converter conversion is completed, only a digital signal is normalized to generate a normalized digital signal, and an interrupt program is generated by the normalized digital signal. May be executed.

入力モジュールは、デジタル信号をアナログ信号に変換して外部に出力するDAコンバータと、DAコンバータの変換制御を行うDA制御回路と、を備え、割込プログラム実行部は、割込プログラムの実行途中で任意のデジタル信号が生成されると、任意のデジタル信号のみ非正規化して非正規化デジタル信号を生成し、DA制御回路に、非正規化デジタル信号によってDAコンバータの変換制御を実行させてもよい。   The input module includes a DA converter that converts a digital signal to an analog signal and outputs the analog signal to the outside, and a DA control circuit that performs conversion control of the DA converter. The interrupt program execution unit is in the middle of executing the interrupt program. When an arbitrary digital signal is generated, only the arbitrary digital signal may be denormalized to generate a denormalized digital signal, and the DA control circuit may be caused to execute conversion control of the DA converter by the denormalized digital signal. .

入力モジュールは、外部のアナログ信号をデジタル信号に変換するADコンバータと、ADコンバータの変換制御を行うAD制御回路と、を備え、AD制御回路は、所定の周期でADコンバータの変換制御を実行し、変換されたデジタル信号を保持し、割込プログラム実行部は、割込プログラムの実行途中で任意のデジタル信号が必要になると、AD制御回路に保持された任意のデジタル信号のみ正規化して正規化デジタル信号を生成し、正規化デジタル信号によって割込プログラムを実行してもよい。   The input module includes an AD converter that converts an external analog signal into a digital signal, and an AD control circuit that performs conversion control of the AD converter, and the AD control circuit executes conversion control of the AD converter at a predetermined cycle. Holds the converted digital signal, and the interrupt program execution unit normalizes and normalizes only the arbitrary digital signal held in the AD control circuit when an arbitrary digital signal is required during the execution of the interrupt program A digital signal may be generated and the interrupt program may be executed with the normalized digital signal.

入力モジュールは、デジタル信号をアナログ信号に変換して外部に出力するDAコンバータと、DAコンバータの変換制御を行うDA制御回路と、を備え、割込プログラム実行部は、割込プログラムの実行途中で任意のデジタル信号が生成されると、任意のデジタル信号のみ非正規化して非正規化デジタル信号を生成し、非正規化デジタル信号をDA制御回路に保持させ、DA制御回路は、非正規化デジタル信号によってDAコンバータの変換制御を実行してもよい。   The input module includes a DA converter that converts a digital signal to an analog signal and outputs the analog signal to the outside, and a DA control circuit that performs conversion control of the DA converter. The interrupt program execution unit is in the middle of executing the interrupt program. When an arbitrary digital signal is generated, only the arbitrary digital signal is denormalized to generate a denormalized digital signal, and the non-normalized digital signal is held in the DA control circuit. Conversion control of the DA converter may be executed by a signal.

入力モジュールは、第1入力モジュールおよび第2入力モジュールを含み、バスは、演算モジュールと第1入力モジュールとを接続する第1バス、および、演算モジュールと第2入力モジュールとを接続する第2バスを含み、演算モジュールは、所定のタクトタイム毎に、第1バスを通じて、第1入力モジュールからデータを入力し、第2入力モジュールの割込プログラム実行部は、タクトタイムに関係ない所定のタイミングで、第2バスを通じて、第2入力モジュールのデータを演算モジュールに入力させてもよい。   The input module includes a first input module and a second input module, and the bus includes a first bus that connects the arithmetic module and the first input module, and a second bus that connects the arithmetic module and the second input module. The arithmetic module inputs data from the first input module through the first bus at every predetermined tact time, and the interrupt program execution unit of the second input module has a predetermined timing not related to the tact time. The data of the second input module may be input to the arithmetic module through the second bus.

演算モジュールは、所定のタクトタイム毎に、第1バスを通じて、第1入力モジュールにデータを出力し、タクトタイムに関係ない所定のタイミングで、第2バスを通じて、第2入力モジュールにデータを出力してもよい。   The arithmetic module outputs data to the first input module through the first bus at every predetermined tact time, and outputs data to the second input module through the second bus at a predetermined timing not related to the tact time. May be.

第1バスは、シリアル伝送方式であり、第2バスは、パラレル伝送方式であってもよい。   The first bus may be a serial transmission method, and the second bus may be a parallel transmission method.

上記課題を解決するための、外部からデータを入力する入力モジュールと、入力モジュールとバスを通じて接続され、入力モジュールから受信したデータに基づいて演算を行う演算モジュールと、を備える制御システムを用いた本発明の制御方法では、制御システムで実行されるプログラムは、割込条件の成立を実行契機とする割込プログラムと、割込プログラムを除いた非割込プログラムとを含んでなり、入力モジュールが、割込プログラムに対応付けられた割込条件が成立しているか否か判定し、割込条件が成立していると判定すると、割込プログラムを実行し、演算モジュールが、割込プログラムの実行結果を参照し、非割込プログラムを実行することを特徴とする。   A book using a control system comprising an input module for inputting data from the outside, and an arithmetic module connected to the input module through a bus and performing an operation based on data received from the input module, in order to solve the above problem In the control method of the invention, the program executed in the control system includes an interrupt program triggered by the establishment of the interrupt condition, and a non-interrupt program excluding the interrupt program. It is determined whether the interrupt condition associated with the interrupt program is satisfied. If it is determined that the interrupt condition is satisfied, the interrupt program is executed, and the operation module executes the execution result of the interrupt program. And a non-interrupt program is executed.

本発明によれば、実行プログラムの容量の増大に拘わらず、被制御機器の制御能力や分解能の劣化を防止することが可能となる。   According to the present invention, it is possible to prevent deterioration in control capability and resolution of a controlled device regardless of increase in the capacity of an execution program.

制御システムを構成する各装置の概略的な接続関係を示した外観図である。It is the external view which showed the rough connection relation of each apparatus which comprises a control system. 制御システムの概略的な構成を示した説明図である。It is explanatory drawing which showed the schematic structure of the control system. 実行プログラムに基づく処理のタイミングを説明するためのタイミングチャートである。It is a timing chart for demonstrating the timing of the process based on an execution program. 演算モジュールのハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions of a calculation module. 入出力モジュールのハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions of an input / output module. 演算モジュールおよび入出力モジュールの処理の流れを説明するタイミングチャートである。It is a timing chart explaining the flow of processing of an arithmetic module and an input / output module. プログラム複製部の処理を説明するための説明図である。It is explanatory drawing for demonstrating the process of a program duplication part. 非割込プログラム実行部と割込プログラム実行部の処理の流れを説明するための説明図である。It is explanatory drawing for demonstrating the flow of a process of a non-interrupt program execution part and an interrupt program execution part. 入出力部の構成を示したブロック図である。It is the block diagram which showed the structure of the input / output part. 割込プログラムの処理の一例を示したタイミングチャートである。It is a timing chart which showed an example of processing of an interruption program. 割込プログラムの処理の他の例を示したタイミングチャートである。It is the timing chart which showed the other example of the processing of the interruption program. 割込プログラムの処理のさらに他の例を示したタイミングチャートである。It is the timing chart which showed the further another example of the processing of the interruption program. 非割込処理の一例を説明するためのタイミングチャートである。It is a timing chart for explaining an example of non-interrupt processing. 非割込処理の他の例を説明するためのタイミングチャートである。It is a timing chart for explaining other examples of non-interrupt processing.

以下に添付図面を参照しながら、本発明の好適な実施形態について詳細に説明する。かかる実施形態に示す寸法、材料、その他具体的な数値などは、発明の理解を容易とするための例示にすぎず、特に断る場合を除き、本発明を限定するものではない。なお、本明細書および図面において、実質的に同一の機能、構成を有する要素については、同一の符号を付することにより重複説明を省略し、また本発明に直接関係のない要素は図示を省略する。   Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. The dimensions, materials, and other specific numerical values shown in the embodiment are merely examples for facilitating understanding of the invention, and do not limit the present invention unless otherwise specified. In the present specification and drawings, elements having substantially the same function and configuration are denoted by the same reference numerals, and redundant description is omitted, and elements not directly related to the present invention are not illustrated. To do.

(第1の実施形態:制御システム100)
図1は、制御システム100を構成する各装置の概略的な接続関係を示した外観図であり、図2は、制御システム100の概略的な構成を示した説明図である。制御システム100は、管理装置110と、プログラマブルコントローラ120と、被制御機器130とを含んで構成される。また、管理装置110とプログラマブルコントローラ120とは、例えば、ギガ(G)ベース等のEthernet(登録商標)によるネットワーク配線140によって互いに接続される。さらに、プログラマブルコントローラ120と被制御機器130とは、例えば、専用の接続配線142を通じて通信や信号伝達可能に接続されている。
(First embodiment: control system 100)
FIG. 1 is an external view showing a schematic connection relationship of each device constituting the control system 100, and FIG. 2 is an explanatory diagram showing a schematic configuration of the control system 100. The control system 100 includes a management device 110, a programmable controller 120, and a controlled device 130. In addition, the management device 110 and the programmable controller 120 are connected to each other by a network wiring 140 based on Ethernet (registered trademark) such as a Giga (G) base. Furthermore, the programmable controller 120 and the controlled device 130 are connected to each other through a dedicated connection wiring 142 so that communication and signal transmission are possible.

上記管理装置110は、制御システム100全体がアプリケーションに定められた工程に沿って動作するように、複数のプログラマブルコントローラ120を一括して制御する。例えば、管理装置110は、個々のプログラマブルコントローラ120からステータス情報や制御結果を収集したり、その収集した内容に応じて、個々のプログラマブルコントローラ120に各種制御指令を出力したりする。   The management device 110 collectively controls the plurality of programmable controllers 120 so that the entire control system 100 operates in accordance with a process defined in the application. For example, the management apparatus 110 collects status information and control results from the individual programmable controllers 120, and outputs various control commands to the individual programmable controllers 120 according to the collected contents.

プログラマブルコントローラ120は、PLC(Programmable Logic Controller)とも呼ばれ、図2に示すように、演算モジュール122、通信モジュール124、入出力(I/O)モジュール126、電源モジュール128等の複数のモジュールを含んで構成される。また、各モジュールはベースボードに着脱可能に固定され、電源モジュール128を除く各モジュール同士は、ベースボード上のバスを通じて接続される。かかるバスには、例えば、シリアル伝送方式の第1バス(不図示)や、パラレル伝送方式の第2バス(不図示)が準備されている。本実施形態では、複数の入出力モジュール126が、それぞれ第1バスまたは第2バスのいずれかを通じて演算モジュール122と接続されている。   The programmable controller 120 is also called a PLC (Programmable Logic Controller), and includes a plurality of modules such as an arithmetic module 122, a communication module 124, an input / output (I / O) module 126, and a power supply module 128 as shown in FIG. Consists of. Each module is detachably fixed to the base board, and each module except the power supply module 128 is connected through a bus on the base board. For example, a serial transmission type first bus (not shown) and a parallel transmission type second bus (not shown) are prepared as such buses. In the present embodiment, the plurality of input / output modules 126 are connected to the arithmetic module 122 through either the first bus or the second bus, respectively.

ここで、演算モジュール122は、制御システム100に定められたアプリケーションを実現するために、それぞれのプログラマブルコントローラ120用に分割されたプログラムである実行プログラムを管理装置110からダウンロードし、その実行プログラムを遂行したり、プログラマブルコントローラ120の動作状況を不図示のモニタに表示したりする。その際、管理装置110から受信した制御指令、入出力モジュール126を通じて入力された被制御機器130のセンサ検出結果等に基づいて被制御機器130を制御する。   Here, the arithmetic module 122 downloads an execution program, which is a program divided for each programmable controller 120, from the management device 110 in order to realize an application defined in the control system 100, and executes the execution program. Or the operation status of the programmable controller 120 is displayed on a monitor (not shown). At that time, the controlled device 130 is controlled based on the control command received from the management device 110, the sensor detection result of the controlled device 130 input through the input / output module 126, and the like.

通信モジュール124は、Ethernet(登録商標)によるネットワーク配線140を通じて、管理装置110、他のプログラマブルコントローラ120、および、他のモジュールに接続され、それぞれと通信を確立することができる。   The communication module 124 is connected to the management apparatus 110, the other programmable controller 120, and another module through the network wiring 140 by Ethernet (registered trademark), and can establish communication with each other.

入出力モジュール126は、被制御機器130(外部)からの入力管理を行う入力モジュールと、被制御機器130に対する出力管理を行う出力モジュールとを結合したモジュールである。例えば、被制御機器130がセンサであれば、センサ検出結果を収集し、電動機であれば、ディスクリートで表される制御指令を送信するとともに、その制御結果を収集する。電源モジュール128は、演算モジュール122、通信モジュール124、入出力モジュール126等の各モジュールに電力を供給する。   The input / output module 126 is a module in which an input module that performs input management from the controlled device 130 (external) and an output module that manages output to the controlled device 130 are combined. For example, if the controlled device 130 is a sensor, the sensor detection result is collected, and if the controlled device 130 is an electric motor, a control command represented by a discrete is transmitted and the control result is collected. The power supply module 128 supplies power to each module such as the arithmetic module 122, the communication module 124, and the input / output module 126.

被制御機器130は、例えば、FA(Factory Automation)における様々な状態を検知するセンサ、そのセンサの検知結果に応じて動作する電動機、エンコーダ等の電気機器で構成される。   The controlled device 130 includes, for example, sensors that detect various states in FA (Factory Automation), and electric devices such as an electric motor and an encoder that operate according to detection results of the sensors.

このような制御システム100は、様々な制御対象に適用できる。例えば、生産実行システム(MES:Manufacturing Execution System)に制御システム100を適用した場合、被制御機器130としての、モーションコントロールユニット(Motion Control Unit)、センタシーラユニット(Center Sealer Unit)、および、フィルムユニット(Film Unit)等の生産機器にプログラマブルコントローラ120を接続する。そして、プログラマブルコントローラ120の演算モジュール122は、入出力モジュール126から生産機器の動作状態を入力データとして取り込み、実行プログラムを用いて入力データを処理した後、入出力モジュール126を通じて生産機器への指令を行う。このようなアプリケーションは、以下のような実行プログラムにより実現される。   Such a control system 100 can be applied to various control objects. For example, when the control system 100 is applied to a production execution system (MES), a motion control unit, a center sealer unit, and a film unit as the controlled device 130 are used. The programmable controller 120 is connected to production equipment such as (Film Unit). Then, the arithmetic module 122 of the programmable controller 120 takes in the operation state of the production equipment from the input / output module 126 as input data, processes the input data using the execution program, and then issues a command to the production equipment through the input / output module 126. Do. Such an application is realized by the following execution program.

図3は、実行プログラムに基づく処理のタイミングを説明するためのタイミングチャートである。一般的に、実行プログラムに基づく演算モジュール122の処理は、入出力モジュール126における割込条件の成立に基づいて実行される割込処理(割込条件の成立を実行契機とする処理)と、割込処理による時間的な制約を受けない非割込処理とに大別される。ここでは、割込処理に用いられるプログラムを割込プログラム、非割込処理に用いられるプログラムを非割込プログラムとする。なお、本実施形態では、割込条件として、入出力モジュール126への入力状態(例えば、離散信号の状態やカウント値)に基づく条件について説明する。   FIG. 3 is a timing chart for explaining processing timing based on the execution program. In general, the processing of the arithmetic module 122 based on the execution program includes an interrupt process (a process triggered by the establishment of the interrupt condition) executed based on the establishment of the interrupt condition in the input / output module 126, and an interrupt. It is broadly divided into non-interrupt processing that is not subject to time restrictions due to interrupt processing. Here, a program used for interrupt processing is an interrupt program, and a program used for non-interrupt processing is a non-interrupt program. In the present embodiment, a condition based on an input state (for example, a state of a discrete signal or a count value) to the input / output module 126 will be described as an interrupt condition.

演算モジュール122は、例えば、図3(a)に示すように、非割込プログラムを用いて非割込処理を周期的に(例えばタクトタイム20msec毎に)実行し、周期の始めにデータを入力し、周期の終わりにその処理結果を出力する。ここで、入出力モジュール126において割込条件が成立すると、図3(a)のように、演算モジュール122は、割込プログラムを用いて割込処理を優先的に実行し、割込処理以外の有余時間を有効利用して、非割込処理を実行する。具体的には、割込処理が発生すると、その割込処理が終了するまで非割込処理が中断され、割込処理終了後に非割込処理が再開される。そして、周期の終わりに、割込処理および非割込処理の処理結果が出力される。   For example, as shown in FIG. 3A, the arithmetic module 122 executes non-interrupt processing periodically (for example, every tact time 20 msec) using a non-interrupt program, and inputs data at the beginning of the cycle. At the end of the cycle, the processing result is output. Here, when the interrupt condition is satisfied in the input / output module 126, the arithmetic module 122 preferentially executes the interrupt process using the interrupt program as shown in FIG. Execute the non-interrupt process using the available time effectively. Specifically, when an interrupt process occurs, the non-interrupt process is interrupted until the interrupt process ends, and the non-interrupt process is resumed after the interrupt process ends. At the end of the cycle, the processing results of the interrupt processing and non-interrupt processing are output.

しかし、アプリケーションの多様化に伴い、そのアプリケーションを実現するための実行プログラムの容量が増大すると、図3(b)のように、割込処理に費やす時間が長くなり、有余時間が短くなる。一方、割込処理と同様に、非割込処理に費やす時間も長くなるが、短くなった有余時間内では処理を完了することができなくなる。ここで、単純に非割込処理を実行する周期を長くすると、有余時間の長期化は図れるが、情報の更新頻度が低くなり、被制御機器130の制御能力や分解能の劣化を招くこととなる。特に、割込処理の処理結果も周期的にしか(周期の終わりにしか)入出力モジュール126に伝達されないので、所定の上下限値に達すると制御方式を変更するような即時反応を要する割込処理の場合でも、非割込処理の周期の長期化に伴い、その反応が遅くなってしまう。   However, when the capacity of the execution program for realizing the application increases with the diversification of the application, the time spent for the interrupt process becomes longer and the surplus time becomes shorter as shown in FIG. On the other hand, as with the interrupt process, the time spent for the non-interrupt process becomes longer, but the process cannot be completed within the reduced time. Here, if the cycle for executing the non-interrupt processing is simply lengthened, the surplus time can be prolonged, but the information update frequency is lowered, and the control capability and resolution of the controlled device 130 are deteriorated. . In particular, since the processing result of the interrupt processing is also transmitted to the input / output module 126 only periodically (only at the end of the cycle), an interrupt that requires an immediate reaction that changes the control method when a predetermined upper and lower limit value is reached. Even in the case of processing, the reaction becomes slow as the period of non-interrupt processing becomes longer.

そこで、本実施形態では、割込処理の一部または全部を他のモジュール(ここでは入出力モジュール126)で行い、演算モジュール122では、主として非割込処理を行うことで(残った割込処理も含む)、分散処理を実現する。例えば、図3(c)のように、突発的に発生する割込処理を入出力モジュール126内で完結的に実行し、並行して、非割込処理を演算モジュール122で周期的に実行する。かかる構成により、即時反応を要する割込処理が生じた場合でも、演算モジュール122における非割込処理の周期の影響を受けることなく、入出力モジュール126内で割込処理を迅速に実行し、その結果を即座に反映できるので、実行プログラムの容量の増大に拘わらず、被制御機器130の制御能力や分解能の劣化を防止することが可能となる。   Therefore, in this embodiment, part or all of the interrupt processing is performed by another module (here, the input / output module 126), and the arithmetic module 122 mainly performs non-interrupt processing (remaining interrupt processing). To achieve distributed processing. For example, as shown in FIG. 3C, suddenly generated interrupt processing is completely executed in the input / output module 126, and in parallel, non-interrupt processing is periodically executed by the arithmetic module 122. . With this configuration, even when an interrupt process requiring an immediate reaction occurs, the interrupt process is quickly executed in the input / output module 126 without being affected by the cycle of the non-interrupt process in the arithmetic module 122. Since the result can be reflected immediately, it is possible to prevent deterioration of the control capability and resolution of the controlled device 130 regardless of the increase in the capacity of the execution program.

また、本実施形態では、このような割込処理を行う割込プログラムを起動時等、所定の契機に自動的に入出力モジュール126に配置する。かかる構成により、個々のモジュールへの煩雑なインストール作業を回避できるとともに、入出力モジュール126を新設または交換した場合においても当該割込処理を即座に開始することが可能となる。以下、かかる目的を実現する演算モジュール122および入出力モジュール126のハードウェア構成を詳述する。   In the present embodiment, an interrupt program for performing such an interrupt process is automatically arranged in the input / output module 126 at a predetermined timing, such as at the time of activation. With this configuration, it is possible to avoid complicated installation work for each module, and it is possible to immediately start the interrupt process even when the input / output module 126 is newly installed or replaced. Hereinafter, the hardware configurations of the arithmetic module 122 and the input / output module 126 that realize such an object will be described in detail.

(演算モジュール122)
図4は、演算モジュール122のハードウェア構成の一例を示す図である。図4に示す演算モジュール122は、I/F部150と、不揮発性メモリ152と、共有メモリ154と、固有メモリ156と、制御部158とを含んで構成される。
(Calculation module 122)
FIG. 4 is a diagram illustrating an example of a hardware configuration of the arithmetic module 122. 4 includes an I / F unit 150, a nonvolatile memory 152, a shared memory 154, a specific memory 156, and a control unit 158.

I/F部150は、第1バスや第2バスを通じて、通信モジュール124および入出力モジュール126と通信を確立し、その通信モジュール124を通じて、管理装置110、他のプログラマブルコントローラ120と通信することができる。   The I / F unit 150 can establish communication with the communication module 124 and the input / output module 126 through the first bus and the second bus, and can communicate with the management device 110 and other programmable controllers 120 through the communication module 124. it can.

不揮発性メモリ152は、ROM、EEPROM、フラッシュメモリ、HDD等の記憶媒体で構成され、コンピュータを動作させる基本プログラムであるシステムプログラム、ならびに、実行プログラム(非割込プログラムおよび割込プログラム)を保持する。共有メモリ154は、RAM等の記憶媒体で構成され、入力データや、制御部158が非割込プログラムを遂行することにより更新される出力データを記憶する。なお、I/F部150と、不揮発性メモリ152と、共有メモリ154とは、共通バス160によりアクセス可能に接続されている。したがって、不揮発性メモリ152や共有メモリ154は、他のモジュールからのアクセスも受け付ける。   The non-volatile memory 152 includes a storage medium such as a ROM, EEPROM, flash memory, and HDD, and holds a system program that is a basic program for operating the computer, and an execution program (non-interrupt program and interrupt program). . The shared memory 154 is configured by a storage medium such as a RAM, and stores input data and output data updated by the control unit 158 executing a non-interrupt program. The I / F unit 150, the nonvolatile memory 152, and the shared memory 154 are connected to be accessible via a common bus 160. Therefore, the non-volatile memory 152 and the shared memory 154 also accept access from other modules.

例えば、共有の作業領域として利用可能なメモリ領域が各モジュールに分割して割り当てられる場合、割り当てられたメモリ領域に共有メモリ154を対応付ける。したがって、演算モジュール122に割り当てられたメモリ領域には、他のモジュールのメモリが存在せず、当該メモリ領域にアクセスすると、唯一、演算モジュール122の共有メモリ154のみデータを読み出しまたは書き込みできる。   For example, when a memory area that can be used as a shared work area is divided and allocated to each module, the shared memory 154 is associated with the allocated memory area. Therefore, there is no memory of another module in the memory area allocated to the arithmetic module 122, and when the memory area is accessed, only the shared memory 154 of the arithmetic module 122 can be read or written.

固有メモリ156は、共有メモリ154同様、RAM等の記憶媒体で構成され、入力データや、制御部158が非割込プログラムを遂行することにより更新される内部データを記憶する。ただし、固有メモリ156は、共通バス160に接続されておらず、制御部158からのみアクセス可能となる。このようなメモリへのアクセス制限は、FPGA(Field-Programmable Gate Array)等を用いたデコーダによって実現できる。   Like the shared memory 154, the private memory 156 is configured by a storage medium such as a RAM, and stores input data and internal data updated by the control unit 158 executing a non-interrupt program. However, the private memory 156 is not connected to the common bus 160 and can be accessed only from the control unit 158. Such access restriction to the memory can be realized by a decoder using an FPGA (Field-Programmable Gate Array) or the like.

制御部158は、中央処理装置(CPU)等を含む半導体集積回路で構成され、非割込プログラムを不揮発性メモリ152から読み出し、固有メモリ156に展開して非割込処理を実行する。そして、制御部158は、プログラム複製部170、非割込プログラム実行部172、履歴管理部174といった機能部として機能する。かかる機能部の動作については後程詳述する。   The control unit 158 includes a semiconductor integrated circuit including a central processing unit (CPU) and the like, reads a non-interrupt program from the non-volatile memory 152, develops it in the specific memory 156, and executes a non-interrupt process. The control unit 158 functions as functional units such as a program duplication unit 170, a non-interrupt program execution unit 172, and a history management unit 174. The operation of the functional unit will be described in detail later.

(入出力モジュール126)
図5は、入出力モジュール126のハードウェア構成の一例を示す図である。本実施形態では、入出力モジュール126が複数準備されている。ここでは、複数の入出力モジュール126のうち、比較的高速に動作する入出力モジュール126を挙げて説明する。図5に示す入出力モジュール126は、I/F部180と、不揮発性メモリ182と、共有メモリ184と、固有メモリ186と、入出力部188と、制御部190とを含んで構成される。
(I / O module 126)
FIG. 5 is a diagram illustrating an example of a hardware configuration of the input / output module 126. In this embodiment, a plurality of input / output modules 126 are prepared. Here, the input / output module 126 that operates at a relatively high speed among the plurality of input / output modules 126 will be described. The input / output module 126 illustrated in FIG. 5 includes an I / F unit 180, a nonvolatile memory 182, a shared memory 184, a specific memory 186, an input / output unit 188, and a control unit 190.

I/F部180は、第1バスや第2バスを通じて、演算モジュール122、通信モジュール124および入出力モジュール126と通信を確立する。   The I / F unit 180 establishes communication with the arithmetic module 122, the communication module 124, and the input / output module 126 through the first bus and the second bus.

不揮発性メモリ182は、ROM、EEPROM、フラッシュメモリ、HDD(Hard Disk Drive)等の記憶媒体で構成され、システムプログラムを保持する。共有メモリ184は、RAM等の記憶媒体で構成され、実行プログラムの一部である割込プログラムや、入力データ、制御部190が割込プログラムを遂行することにより更新される出力データを記憶する。なお、I/F部180と、不揮発性メモリ182と、共有メモリ184と、入出力部188は、共通バス192によりアクセス可能に接続されている。したがって、不揮発性メモリ182や共有メモリ184は、他のモジュールからのアクセスも受け付ける。ただし、複数ある共有メモリ184それぞれの配置場所は、その共有メモリ184へのアクセス頻度が高いモジュールとするとよい。例えば、共有メモリ184へのアクセス頻度は入出力モジュール126が高いので、共有メモリ184は入出力モジュール126に配置される。   The nonvolatile memory 182 includes a storage medium such as a ROM, an EEPROM, a flash memory, and an HDD (Hard Disk Drive), and holds a system program. The shared memory 184 includes a storage medium such as a RAM, and stores an interrupt program that is a part of the execution program, input data, and output data that is updated when the control unit 190 executes the interrupt program. The I / F unit 180, the nonvolatile memory 182, the shared memory 184, and the input / output unit 188 are connected to each other via a common bus 192. Therefore, the nonvolatile memory 182 and the shared memory 184 also accept access from other modules. However, the arrangement location of each of the plurality of shared memories 184 may be a module having a high access frequency to the shared memory 184. For example, since the input / output module 126 has a high access frequency to the shared memory 184, the shared memory 184 is arranged in the input / output module 126.

固有メモリ186は、共有メモリ184同様、RAM等の記憶媒体で構成され、入力データや、制御部190が割込プログラムを遂行することにより更新される内部データを記憶する。ただし、固有メモリ186は、共通バス192に接続されておらず、制御部190からのみアクセス可能となる。   Like the shared memory 184, the private memory 186 is configured by a storage medium such as a RAM, and stores input data and internal data that is updated when the control unit 190 executes an interrupt program. However, the private memory 186 is not connected to the common bus 192 and can be accessed only from the control unit 190.

入出力部188は、被制御機器130に接続され、被制御機器130との通信および信号伝達を行う。例えば、入出力部188は、FPGA、ADコンバータ、DAコンバータ、フォトカプラ、トランジスタ等で構成され、アナログ信号、デジタル信号、矩形波(カウンタ入力)等を入出力する。特に、アナログ信号については、後述するように、ADコンバータ、DAコンバータに対する個々の変換制御をFPGAで行うことで、処理負荷の分散を果たしている。   The input / output unit 188 is connected to the controlled device 130 and performs communication and signal transmission with the controlled device 130. For example, the input / output unit 188 includes an FPGA, an AD converter, a DA converter, a photocoupler, a transistor, and the like, and inputs / outputs analog signals, digital signals, rectangular waves (counter input), and the like. In particular, for analog signals, as described later, the individual conversion control for the AD converter and the DA converter is performed by the FPGA, thereby distributing the processing load.

制御部190は、演算モジュール122とスペックが同等の中央処理装置(CPU)等を含む半導体集積回路で構成され、割込プログラムを共有メモリ184から読み出し、固有メモリ186に展開して割込処理を実行する。そして、制御部190は、条件判定部200、割込プログラム実行部202、履歴通知部204といった機能部としても機能する。かかる機能部の動作については後程詳述する。以下、割込プログラムの入出力モジュール126への複製処理や割込処理を遂行するための、演算モジュール122および入出力モジュール126の処理の流れを説明する。   The control unit 190 is composed of a semiconductor integrated circuit including a central processing unit (CPU) having the same specifications as the arithmetic module 122. The control unit 190 reads an interrupt program from the shared memory 184, develops it in the private memory 186, and performs interrupt processing. Run. The control unit 190 also functions as functional units such as the condition determination unit 200, the interrupt program execution unit 202, and the history notification unit 204. The operation of the functional unit will be described in detail later. Hereinafter, the processing flow of the arithmetic module 122 and the input / output module 126 for performing the duplication processing of the interrupt program to the input / output module 126 and the interrupt processing will be described.

(プログラム複製処理S300)
図6は、演算モジュール122および入出力モジュール126の処理(制御方法)の流れを説明するタイミングチャートである。当該制御システム100が起動され、演算モジュール122および入出力モジュール126に電力の供給が開始されると、演算モジュール122の制御部158や入出力モジュール126の制御部190は、それぞれ、システムプログラムを固有メモリ156、186に展開し、演算モジュール122のプログラム複製部170は、かかる起動を契機に、不揮発性メモリ152に記憶している実行プログラムのうち割込プログラムを入出力モジュール126に複製する(S300)。なお、不揮発性メモリ152内の割込プログラムは、当該複製によって削除されず、そのまま保持される。
(Program replication processing S300)
FIG. 6 is a timing chart for explaining the flow of processing (control method) of the arithmetic module 122 and the input / output module 126. When the control system 100 is activated and the supply of power to the arithmetic module 122 and the input / output module 126 is started, the control unit 158 of the arithmetic module 122 and the control unit 190 of the input / output module 126 each have a unique system program. The program copying unit 170 of the arithmetic module 122 expands the memories 156 and 186, and the interrupt program among the execution programs stored in the nonvolatile memory 152 is copied to the input / output module 126 in response to the activation (S300). ). Note that the interrupt program in the non-volatile memory 152 is not deleted by the duplication and is held as it is.

図7は、プログラム複製部170の処理を説明するための説明図である。例えば、当該制御システム100における実行プログラムは、それぞれが独立した(他のプログラムの影響を受けない)6つのプログラムに分割することができ、その内訳は、非割込プログラム3つと、割込プログラム3つであるとする。ただし、この時点では、6つのプログラムは、それぞれコンパイルが完了し、実行形式となっている。プログラム複製部170は、このうち3つの割込プログラムを、その割込プログラムが制御対象としている被制御機器130に接続された入出力モジュール126にそれぞれ複製する。   FIG. 7 is an explanatory diagram for explaining the processing of the program duplicating unit 170. For example, the execution program in the control system 100 can be divided into six independent programs (not affected by other programs), which are divided into three non-interrupt programs and interrupt program 3 Suppose that However, at this point, each of the six programs has been compiled and is in an executable format. The program duplicating unit 170 duplicates three of these interrupt programs to the input / output module 126 connected to the controlled device 130 controlled by the interrupt program.

ここで、割込プログラムには、それぞれ、割込処理に関する情報である複製ステータスが付されている。したがって、プログラム複製部170は、割込プログラムに付されている複製ステータスを読み出し、複製先として入出力モジュール126の識別子が登録されていれば、その識別子によって特定される入出力モジュール126に、当該複製ステータスに対応付けられた割込プログラムを複製する。入出力モジュール126では、演算モジュール122から受信した割込プログラムを共有メモリ184の所定のメモリ位置に保持させる。なお、複製ステータスには、識別子の他、割込ポート番号と、割込条件も含まれている。ここで、割込ポート番号は、入出力部188における割込対象となるポート(割込端子)の番号を示し、割込条件は、割込を発生させる条件、例えば、割込ポート番号に入力された離散信号がTRUEかFALSEか、もしくは、サーボ等の出力信号を計数したカウント値が所定の値に到達したか等の条件を示す。   Here, each interrupt program is given a replication status, which is information relating to the interrupt processing. Therefore, the program duplicating unit 170 reads the duplication status attached to the interrupt program, and if the identifier of the input / output module 126 is registered as a duplication destination, the program duplicating unit 170 stores the duplication status in the input / output module 126 specified by the identifier. Duplicate the interrupt program associated with the replication status. The input / output module 126 holds the interrupt program received from the arithmetic module 122 at a predetermined memory location in the shared memory 184. Note that the replication status includes an interrupt port number and an interrupt condition in addition to the identifier. Here, the interrupt port number indicates the number of the port (interrupt terminal) to be interrupted in the input / output unit 188, and the interrupt condition is input to the condition for generating the interrupt, for example, the interrupt port number Whether the discrete signal is TRUE or FALSE, or whether the count value obtained by counting the output signals from the servo, etc. has reached a predetermined value is shown.

図7の例では、割込プログラム(1)および割込プログラム(2)の識別子が「1」となっているので、プログラム複製部170は、割込プログラム(1)および割込プログラム(2)を、識別子「1」によって特定される入出力モジュール(1)の共有メモリ184の所定のメモリ位置に複製する。また、割込プログラム(3)の識別子が「2」となっているので、プログラム複製部170は、割込プログラム(3)を、識別子「2」によって特定される入出力モジュール(2)の共有メモリ184に複製する。   In the example of FIG. 7, since the identifiers of the interrupt program (1) and the interrupt program (2) are “1”, the program duplicating unit 170 determines that the interrupt program (1) and the interrupt program (2) Is copied to a predetermined memory location in the shared memory 184 of the input / output module (1) specified by the identifier “1”. Since the identifier of the interrupt program (3) is “2”, the program duplicating unit 170 shares the interrupt program (3) with the input / output module (2) identified by the identifier “2”. Copy to memory 184.

続いて、プログラム複製部170は、各割込プログラムの作業領域となるメモリ領域を確保する。具体的に、プログラム複製部170は、図7のように、割込プログラム(1)を入出力モジュール(1)の共有メモリ184に複製するとともに、その割込プログラム(1)に対し予め定められた容量のメモリ領域(1)を入出力モジュール(1)の共有メモリ184内に確保する。同様に、プログラム複製部170は、割込プログラム(2)に対し予め定められた容量のメモリ領域(2)を入出力モジュール(1)の共有メモリ184内に確保し、割込プログラム(3)に対し予め定められた容量のメモリ領域(3)を入出力モジュール(2)の共有メモリ184内に確保する。   Subsequently, the program duplication unit 170 secures a memory area as a work area for each interrupt program. Specifically, as shown in FIG. 7, the program duplicating unit 170 duplicates the interrupt program (1) to the shared memory 184 of the input / output module (1) and is predetermined for the interrupt program (1). A memory area (1) having a sufficient capacity is secured in the shared memory 184 of the input / output module (1). Similarly, the program duplication unit 170 secures a memory area (2) having a predetermined capacity for the interrupt program (2) in the shared memory 184 of the input / output module (1), and the interrupt program (3). A memory area (3) having a predetermined capacity is secured in the shared memory 184 of the input / output module (2).

(非割込プログラム設定処理S302)
図8は、非割込プログラム実行部172と割込プログラム実行部202の処理の流れを説明するための説明図である。上述したように割込プログラムの複製が完了すると、演算モジュール122の非割込プログラム実行部172は、非割込プログラムの実行準備を行う。具体的に、非割込プログラム実行部172は、図8に示すように、非割込プログラム(1)〜(3)を不揮発性メモリ152から読み出し、固有メモリ156に展開する。
(Non-interrupt program setting process S302)
FIG. 8 is an explanatory diagram for explaining the flow of processing of the non-interrupt program execution unit 172 and the interrupt program execution unit 202. As described above, when the duplication of the interrupt program is completed, the non-interrupt program execution unit 172 of the arithmetic module 122 prepares to execute the non-interrupt program. Specifically, the non-interrupt program execution unit 172 reads the non-interrupt programs (1) to (3) from the nonvolatile memory 152 and expands them in the private memory 156 as shown in FIG.

(割込プログラム設定処理S304)
同様に、上述したように割込プログラムの複製が完了すると、入出力モジュール126の割込プログラム実行部202は、割込プログラムの実行準備を行う。具体的に、図8に示すように、入出力モジュール(1)の割込プログラム実行部202は、割込プログラム(1)、(2)を共有メモリ184から読み出し、固有メモリ186に展開する。同様に、入出力モジュール(2)の割込プログラム実行部202は、割込プログラム(3)を共有メモリ184から読み出し、固有メモリ186に展開する。
(Interrupt program setting process S304)
Similarly, when duplication of the interrupt program is completed as described above, the interrupt program execution unit 202 of the input / output module 126 prepares for execution of the interrupt program. Specifically, as shown in FIG. 8, the interrupt program execution unit 202 of the input / output module (1) reads the interrupt programs (1) and (2) from the shared memory 184 and expands them in the private memory 186. Similarly, the interrupt program execution unit 202 of the input / output module (2) reads the interrupt program (3) from the shared memory 184 and expands it in the private memory 186.

(非割込プログラム実行処理S310)
続いて、非割込プログラム実行部172は、固有メモリ156に展開された非割込プログラムを用い非割込プログラムを実行する。ここで、非割込プログラム実行部172は、必要に応じて、後述する入出力モジュール126の割込プログラム実行部202の実行結果を参照し(共有メモリ184からデータを読み出し)、例えば20msec毎に当該非割込プログラムの実行結果を導出する。
(Non-interrupt program execution process S310)
Subsequently, the non-interrupt program execution unit 172 executes the non-interrupt program using the non-interrupt program expanded in the private memory 156. Here, the non-interrupt program execution unit 172 refers to the execution result of the interrupt program execution unit 202 of the input / output module 126 described later (reads data from the shared memory 184) as necessary, for example, every 20 msec. The execution result of the non-interrupt program is derived.

(条件判定処理S312)
条件判定部200は、割込プログラムに対応付けられた割込条件が成立しているか否か判定する。図7の複製ステータスを参照すると、本実施形態では、割込プログラム(1)〜(3)に、それぞれ割込条件「1234」、「TRUE」、「5678」が対応付けられている。したがって、入出力モジュール(1)の条件判定部200は、割込ポート番号「1」で特定される、サーボ等の動作に応じて積算されたカウント値を参照し、そのカウント値が「1234」と一致すると、割込プログラム(1)の割込条件が成立したと判定する。そして、一度、割込条件が成立したと判定するとカウント値を0にリセットする。
(Condition determination process S312)
The condition determining unit 200 determines whether or not an interrupt condition associated with the interrupt program is satisfied. Referring to the replication status in FIG. 7, in this embodiment, interrupt conditions “1234”, “TRUE”, and “5678” are associated with interrupt programs (1) to (3), respectively. Therefore, the condition determination unit 200 of the input / output module (1) refers to the count value specified according to the operation of the servo or the like specified by the interrupt port number “1”, and the count value is “1234”. If it matches, it is determined that the interrupt condition of the interrupt program (1) is satisfied. Once it is determined that the interrupt condition is satisfied, the count value is reset to zero.

同様に、入出力モジュール(1)の条件判定部200は、割込ポート番号「3」で特定される離散信号を参照し、その離散信号がTRUEであれば、割込プログラム(2)の割込条件が成立したと判定する。また、入出力モジュール(2)の条件判定部200は、割込ポート番号「1」で特定される、サーボ等の動作に応じて積算されたカウント値を参照し、そのカウント値が「5678」と一致すると、割込プログラム(3)の割込条件が成立したと判定する。   Similarly, the condition determination unit 200 of the input / output module (1) refers to the discrete signal specified by the interrupt port number “3”, and if the discrete signal is TRUE, the interrupt determination of the interrupt program (2). It is determined that the inclusion condition is satisfied. The condition determination unit 200 of the input / output module (2) refers to the count value specified according to the operation of the servo or the like specified by the interrupt port number “1”, and the count value is “5678”. If it matches, it is determined that the interrupt condition of the interrupt program (3) is satisfied.

(割込プログラム実行処理S314)
割込プログラム実行部202は、条件判定部200が所定の割込条件が成立していると判定すると、その割込条件に対応する割込プログラムを実行する。例えば、入出力モジュール(1)の条件判定部200が、割込ポート番号「1」で特定されるカウント値が「1234」に到達したと判定すると、割込プログラム実行部202は、割込プログラム(1)を実行する。そして、割込プログラム実行部202は、割込プログラム(1)に基づく割込処理の処理結果を、プログラム複製部170が共有メモリ184内に確保したメモリ領域(1)に記憶する。こうして、演算モジュール122の非割込プログラム実行部172は、任意のタイミングで、共有メモリ184から処理結果を読み出すことが可能となる。
(Interrupt program execution process S314)
When the condition determining unit 200 determines that a predetermined interrupt condition is satisfied, the interrupt program executing unit 202 executes an interrupt program corresponding to the interrupt condition. For example, when the condition determination unit 200 of the input / output module (1) determines that the count value specified by the interrupt port number “1” has reached “1234”, the interrupt program execution unit 202 sets the interrupt program (1) is executed. The interrupt program execution unit 202 stores the processing result of the interrupt process based on the interrupt program (1) in the memory area (1) secured in the shared memory 184 by the program replication unit 170. In this way, the non-interrupt program execution unit 172 of the arithmetic module 122 can read the processing result from the shared memory 184 at an arbitrary timing.

ここで、割込プログラム実行部202は、非割込プログラム実行部172による周期的な処理の制限を受けることなく、独立かつ最優先に割込プログラムを実行し、その処理結果を迅速に反映することができる。したがって、例えば、所定の上下限値に達すると制御方式を変更するような即時反応を要する割込処理については、反応時間の短縮化を図ることが可能となる。また、非割込プログラム実行部172による制限を受けない(非割込処理の周期の影響を受けない)ので、非割込処理の周期より短い時間で割込処理を繰り返し実行することもでき、割込処理を高頻度で実現することも可能となる。こうして、実行プログラムの容量の増大に拘わらず、被制御機器130の制御能力や分解能の劣化を防止することができる。   Here, the interrupt program execution unit 202 executes the interrupt program independently and with the highest priority without being restricted by the periodic processing by the non-interrupt program execution unit 172, and quickly reflects the processing result. be able to. Therefore, for example, for an interrupt process that requires an immediate reaction that changes the control method when a predetermined upper and lower limit value is reached, the reaction time can be shortened. In addition, since it is not limited by the non-interrupt program execution unit 172 (not affected by the cycle of the non-interrupt process), the interrupt process can be repeatedly executed in a shorter time than the cycle of the non-interrupt process It is also possible to implement interrupt processing at a high frequency. In this way, it is possible to prevent deterioration of the control capability and resolution of the controlled device 130 regardless of the increase in the capacity of the execution program.

また、入出力モジュール126に離散信号による割込が発生した場合、本来、入出力モジュール126が、一旦、離散信号をバス信号に置き換えて演算モジュール122に伝達し、演算モジュール122で、その条件を判定した上で割込処理を行っていたところ、本実施形態では、バス信号に置き換えることなく、入出力モジュール126内で処理を完結することができるので、割込処理に費やす時間自体を短縮することができる。   In addition, when an interruption due to a discrete signal occurs in the input / output module 126, the input / output module 126 originally replaces the discrete signal with a bus signal and transmits it to the arithmetic module 122, and the arithmetic module 122 sets the condition. In the present embodiment, the interrupt processing is performed after the determination. In this embodiment, the processing can be completed in the input / output module 126 without replacing with the bus signal, so that the time spent for the interrupt processing itself is shortened. be able to.

(履歴通知処理S316)
履歴通知部204は、割込プログラム実行部202が割込プログラムに基づく割込処理を完了すると、それに伴って、割込処理が完了した旨の情報を演算モジュール122に送信する。これは、演算モジュール122において、割込処理が想定通りに遂行されているか否か管理するためである。
(History notification process S316)
When the interrupt program execution unit 202 completes the interrupt process based on the interrupt program, the history notification unit 204 transmits information indicating that the interrupt process has been completed to the arithmetic module 122. This is for managing whether or not the interrupt processing is performed as expected in the arithmetic module 122.

(履歴管理処理S318)
履歴管理部174は、履歴通知部204から割込処理が完了した旨の情報を受信すると、それを履歴(ログ)として管理し、割込処理の数やタイミングが、想定された範囲に収まるか否か判定し、想定された範囲を逸脱すると、割込処理にエラーが生じたとして、エラー処理を行う。
(History management process S318)
When the history management unit 174 receives information indicating that the interrupt processing has been completed from the history notification unit 204, the history management unit 174 manages the information as a history (log), and whether the number and timing of the interrupt processing are within the assumed range. If it is determined whether or not it deviates from the assumed range, an error process is performed assuming that an error has occurred in the interrupt process.

以上、説明した制御システム100では、実行プログラムを、演算モジュール122と入出力モジュール126で分散処理することで、たとえ、実行プログラムの容量が増大したとしても、演算モジュール122の処理負荷を増大させることなく、かつ、割込処理を非割込処理から独立したタイミングで迅速に実行することができ、被制御機器130の制御能力や分解能の劣化を防止することが可能となる。   In the control system 100 described above, the execution program is distributedly processed by the arithmetic module 122 and the input / output module 126, thereby increasing the processing load of the arithmetic module 122 even if the capacity of the execution program is increased. In addition, the interrupt process can be quickly executed at a timing independent of the non-interrupt process, and the control capability and resolution of the controlled device 130 can be prevented from deteriorating.

また、このような割込処理を行う割込プログラムを起動時に自動的に入出力モジュール126に配置しているので、個々のモジュールへの煩雑なインストール作業を回避できるとともに、入出力モジュール126を新設または交換した場合においても当該割込処理を即座に開始することが可能となる。したがって、既存の入出力モジュール126を、実行プログラムがインストールされていない出荷状態の入出力モジュール126と交換したとしても、既存の入出力モジュール126と同状態を迅速に復元できるので、メンテナンス性を高めることができる。   In addition, since the interrupt program for performing such interrupt processing is automatically arranged in the input / output module 126 at the time of startup, it is possible to avoid complicated installation work for each module and to newly install the input / output module 126. Alternatively, even in the case of replacement, the interrupt process can be started immediately. Therefore, even if the existing input / output module 126 is replaced with the input / output module 126 in the shipping state in which the execution program is not installed, the same state as the existing input / output module 126 can be quickly restored, so that maintainability is improved. be able to.

(第2の実施形態)
このように、演算モジュール122で本来実行すべき処理を入出力モジュール126に分散することで、演算モジュール122自体の処理負荷を低減することができる。しかし、その一方で、演算モジュール122で低減された処理負荷分、入出力モジュール126の処理負荷が増大する場合がある。そこで、入出力モジュール126における、特に、ADコンバータやDAコンバータに割く処理負荷を低減し、入出力モジュール126の処理負担を低減する。
(Second Embodiment)
As described above, the processing load of the arithmetic module 122 itself can be reduced by distributing the processing that should be originally executed by the arithmetic module 122 to the input / output module 126. However, on the other hand, the processing load of the input / output module 126 may increase by the processing load reduced by the arithmetic module 122. Therefore, in particular, the processing load on the input / output module 126 that is allocated to the AD converter and the DA converter is reduced, and the processing load on the input / output module 126 is reduced.

図9は、入出力部188の構成を示したブロック図である。入出力モジュール126の入出力部188は、ADコンバータ220、DAコンバータ222、FPGA224、を含んで構成される。   FIG. 9 is a block diagram showing the configuration of the input / output unit 188. The input / output unit 188 of the input / output module 126 includes an AD converter 220, a DA converter 222, and an FPGA 224.

ADコンバータ220は、外部のアナログ信号をデジタル信号に変換する。DAコンバータ222は、デジタル信号をアナログ信号に変換して外部に出力する。FPGA224は、ADコンバータ220の変換制御を行うAD制御回路224aやDAコンバータの変換制御を行うDA制御回路224bとしても機能する。また、AD制御回路224aには、ADコンバータ220で変換されたデジタル信号を保持するバッファが設けられ、DA制御回路224bには、DAコンバータ222の変換対象となるデジタル信号を保持するバッファが設けられている。   The AD converter 220 converts an external analog signal into a digital signal. The DA converter 222 converts a digital signal into an analog signal and outputs it to the outside. The FPGA 224 also functions as an AD control circuit 224a that performs conversion control of the AD converter 220 and a DA control circuit 224b that performs conversion control of the DA converter. The AD control circuit 224a is provided with a buffer for holding the digital signal converted by the AD converter 220, and the DA control circuit 224b is provided with a buffer for holding the digital signal to be converted by the DA converter 222. ing.

図10は、割込プログラムの処理の一例を示したタイミングチャートである。図10の例では、AD制御回路224aやDA制御回路224bが主体となり、所定の周期(例えば、25μsec)でAD変換およびDA変換を繰り返し、その途中でADコンバータ220によってデジタル信号が生成されたことを契機に割込プログラムが実行される。   FIG. 10 is a timing chart showing an example of interrupt program processing. In the example of FIG. 10, the AD control circuit 224a and the DA control circuit 224b are mainly used, and AD conversion and DA conversion are repeated at a predetermined cycle (for example, 25 μsec), and a digital signal is generated by the AD converter 220 in the middle. As a result, the interrupt program is executed.

具体的に、AD制御回路224aは、所定の周期に基づく、例えば時点(a)でADコンバータ220の変換制御を開始し、変換されたデジタル信号を保持し、時点(b)において、制御部190を通じ、デジタル信号を正規化して正規化デジタル信号を生成する。   Specifically, the AD control circuit 224a starts conversion control of the AD converter 220 based on a predetermined cycle, for example, at time (a), holds the converted digital signal, and at time (b), the control unit 190 Through normalization, the digital signal is normalized to generate a normalized digital signal.

かかる正規化は、以下の処理を含む。すなわち、AD制御回路224aは、制御部190を通じて、ADコンバータ220のハードフェア特性であるオフセットおよびゲインを調整するアナログ値調整処理、ADコンバータ220の出力値(例えば65536)を割込プログラムの利用範囲(例えば10000)に変換するスケール変換処理、過去の複数(例えば8や16)のデジタル値の平均を示す移動平均処理を行う。   Such normalization includes the following processing. In other words, the AD control circuit 224a uses the control unit 190 to convert the analog value adjustment processing for adjusting the offset and gain, which are the hardware characteristics of the AD converter 220, and the output value (for example, 65536) of the AD converter 220 to be used by the interrupt program. A scale conversion process for converting to (for example, 10000) and a moving average process for indicating an average of a plurality of digital values (for example, 8 and 16) in the past are performed.

なお、ここで用いられるADコンバータ220は複数(例えば4つ)のチャンネルを有しており、割込プログラムによってどのチャンネルのデジタル値が利用されるか把握できないため、正規化は複数のチャンネル全てに対して行われ、その総時間はチャンネル数分だけ長くなる。   Since the AD converter 220 used here has a plurality of channels (for example, four channels) and the digital value of which channel is used by the interrupt program cannot be grasped, normalization is performed for all the plurality of channels. The total time is increased by the number of channels.

そして、AD変換に対する一通りの処理が終了すると、DA制御回路224bは、時点(c)において、DA制御回路224bのバッファに保持されたデジタル信号を、制御部190を通じて非正規化して非正規化デジタル信号を生成し、非正規化デジタル信号によってDAコンバータ222の変換制御を実行する。こうして、DAコンバータ222からアナログ信号が出力される。   When a series of processing for AD conversion ends, the DA control circuit 224b denormalizes the digital signal held in the buffer of the DA control circuit 224b through the control unit 190 at time (c). A digital signal is generated, and conversion control of the DA converter 222 is executed by the non-normalized digital signal. In this way, an analog signal is output from the DA converter 222.

かかる非正規化は、以下の処理を含む。すなわち、DA制御回路224bは、制御部190を通じて、割込プログラムの利用範囲(例えば10000)をDAコンバータ222の出力値(例えば65536)に変換するスケール変換処理、DAコンバータ222のハードフェア特性であるオフセットおよびゲインを調整するアナログ値調整処理を行う。   Such denormalization includes the following processing. That is, the DA control circuit 224b is a scale conversion process that converts the use range (for example, 10000) of the interrupt program into an output value (for example, 65536) of the DA converter 222 through the control unit 190, and the hardware characteristics of the DA converter 222. Performs analog value adjustment processing to adjust offset and gain.

なお、ここで用いられるDAコンバータ222は複数(例えば4つ)のチャンネルを有しており、割込プログラムによってどのチャンネルの出力を要するか把握できないため、非正規化は複数のチャンネル全てに対して行われ、その総時間はチャンネル数分だけ長くなる。   Note that the DA converter 222 used here has a plurality of (for example, four) channels, and since it is impossible to grasp which channel output is required by the interrupt program, denormalization is performed for all the plurality of channels. The total time is increased by the number of channels.

このように、所定の周期でAD変換およびDA変換が繰り返される途中、AD制御回路224aが主体となり、割込プログラムを動作させる。具体的に、AD制御回路224aは、正規化デジタル信号を生成したことを契機に、制御部190に割込処理をかけ、時点(d)から割込プログラム実行部202に、割込プログラムを実行させる。そして、割込プログラムにおいて、当該正規化デジタル信号の処理が終了すると、時点(e)において、DA制御回路224bに正規化デジタル信号を保持させ、DA制御回路224bが、割込プログラムの処理結果をDAコンバータ222に反映する。   In this way, while AD conversion and DA conversion are repeated at a predetermined cycle, the AD control circuit 224a mainly plays a role in operating the interrupt program. Specifically, the AD control circuit 224a triggers an interrupt process to the control unit 190 when the normalized digital signal is generated, and executes the interrupt program to the interrupt program execution unit 202 from the time point (d). Let Then, when the processing of the normalized digital signal is completed in the interrupt program, at time (e), the DA control circuit 224b holds the normalized digital signal, and the DA control circuit 224b displays the processing result of the interrupt program. This is reflected in the DA converter 222.

しかし、制御部190においては、ADコンバータ220やDAコンバータ222を正確な時間で周期的に行うため、デジタル信号の全チャンネル分の正規化処理や非正規化処理が優先される。したがって、非同期の割込プログラムは、図10においてハッチングで示されるように、デジタル信号の正規化処理や非正規化処理と排他的に実行されるので、その結果、割込プログラムの中断、再開を繰り返し、割込プログラムが完了するまでの時間が長期化し、ひいては、DAコンバータ222に処理結果が反映される時間が遅延する。   However, in the control unit 190, since the AD converter 220 and the DA converter 222 are periodically performed with accurate time, normalization processing and denormalization processing for all channels of the digital signal are given priority. Therefore, as shown by hatching in FIG. 10, the asynchronous interrupt program is executed exclusively with the digital signal normalization process and the denormalization process. As a result, the interrupt program is interrupted and resumed. Repeatedly, the time until the interrupt program is completed is prolonged, and as a result, the time when the processing result is reflected in the DA converter 222 is delayed.

そこで、本実施形態では、デジタル信号の正規化処理や非正規化処理を必要最小限に留め、かつ、正規化処理や非正規化処理を実行する場合であっても必要なチャンネルのみに限定することで、その分、割込プログラムに時間を解放する。   Therefore, in the present embodiment, digital signal normalization processing and denormalization processing are kept to the minimum necessary, and even when normalization processing and denormalization processing are executed, only the necessary channels are limited. That frees up time for the interrupt program.

図11は、割込プログラムの処理の他の例を示したタイミングチャートである。図11の例では、制御部190の割込プログラム実行部202が主体となり、割込プログラムの要求に応じて必要最小限のAD変換およびDA変換を行う。   FIG. 11 is a timing chart showing another example of interrupt program processing. In the example of FIG. 11, the interrupt program execution unit 202 of the control unit 190 is the main body, and performs the minimum necessary AD conversion and DA conversion in response to a request from the interrupt program.

具体的に、割込プログラム実行部202は、割込プログラムの実行途中の時点(a)で任意のデジタル信号が必要になると、例えば、ADコンバータ220に接続されたアナログ信号のアドレスに対してアクセスを検出すると、AD制御回路224aにADコンバータ220の変換制御を実行させる。こうして時点(b)からAD変換が開始される。   Specifically, the interrupt program execution unit 202 accesses an analog signal address connected to the AD converter 220, for example, when an arbitrary digital signal is required at the time point (a) during the execution of the interrupt program. Is detected, the AD control circuit 224a is caused to execute conversion control of the AD converter 220. Thus, AD conversion is started from time (b).

そして、ADコンバータの変換が完了すると、AD制御回路224aは、時点(c)において、変換されたデジタル信号を保持し、制御部190を通じ、デジタル信号を正規化して正規化デジタル信号を生成する。かかる正規化は、図10を用いて説明したのと同様、アナログ値調整処理、スケール変換処理、移動平均処理からなる。   Then, when the conversion of the AD converter is completed, the AD control circuit 224a holds the converted digital signal at the time point (c), normalizes the digital signal through the control unit 190, and generates a normalized digital signal. Such normalization includes analog value adjustment processing, scale conversion processing, and moving average processing as described with reference to FIG.

ただし、ここでは、ADコンバータ220に複数備わっているチャンネルのうち、デジタル信号が必要なチャンネルのみを正規化する。したがって、その正規化処理に費やされる処理時間は図10と比べて1/チャンネル数(ここでは1/4)となる。これは、以下の理由による。すなわち、従来のように、割込処理を演算モジュール122で実行すると、デジタル信号が必要な入出力が、入出力モジュール126のいずれのチャンネルに対応するか演算モジュール122では把握できなかったところ、図11の例では、割込処理を入出力モジュール126自体で実行しているので、デジタル信号が必要な入出力とチャンネルとの対応を把握可能となったからである。   However, here, only a channel that requires a digital signal is normalized from among a plurality of channels provided in the AD converter 220. Therefore, the processing time spent for the normalization process is 1 / the number of channels (here, 1/4) compared to FIG. This is due to the following reason. That is, when the interrupt processing is executed by the arithmetic module 122 as in the prior art, the arithmetic module 122 cannot grasp which channel of the input / output module 126 corresponds to an input / output that requires a digital signal. In the example 11, since the interrupt processing is executed by the input / output module 126 itself, it is possible to grasp the correspondence between the input / output that requires a digital signal and the channel.

続いて、割込プログラム実行部202は、正規化デジタル信号によって割込プログラムを実行し、時点(d)において、処理結果として任意のデジタル信号が生成されると、任意のデジタル信号を非正規化して非正規化デジタル信号を生成し、DA制御回路224bのバッファに保持させる。かかる非正規化は、図10を用いて説明したのと同様、スケール変換処理、アナログ値調整処理からなる。   Subsequently, the interrupt program execution unit 202 executes the interrupt program using the normalized digital signal. When an arbitrary digital signal is generated as a processing result at the time point (d), the arbitrary digital signal is denormalized. The denormalized digital signal is generated and held in the buffer of the DA control circuit 224b. Such denormalization includes a scale conversion process and an analog value adjustment process, as described with reference to FIG.

ただし、ここでは、DAコンバータ222に複数備わっているチャンネルのうち、デジタル信号を出力する対象となっているチャンネルのみを非正規化する。したがって、その非正規化処理に費やされる処理時間は図10と比べて1/チャンネル数(ここでは1/4)となる。   However, here, only a channel for which a digital signal is to be output is denormalized among a plurality of channels provided in the DA converter 222. Therefore, the processing time spent for the denormalization processing is 1 / the number of channels (here, 1/4) compared to FIG.

最後に、割込プログラム実行部202は、時点(e)において、DA制御回路224bに、非正規化デジタル信号によってDAコンバータ222の変換制御を実行させる。こうして、DAコンバータ222からアナログ信号が出力される。   Finally, the interrupt program execution unit 202 causes the DA control circuit 224b to execute conversion control of the DA converter 222 by the non-normalized digital signal at the time point (e). In this way, an analog signal is output from the DA converter 222.

かかる図11の処理では、図10での処理と比べ、AD変換やDA変換を周期的に行っていないので、そのAD変換やDA変換に伴うデジタル信号の正規化処理や非正規化処理が行われない。また、制御部190が主体となり、必要なチャンネルのみ正規化処理や非正規化処理を実行し、他のチャンネルについての正規化処理や非正規化処理を実行していない(前回値をそのまま利用する)。   Since the AD conversion and DA conversion are not periodically performed in the process of FIG. 11 as compared with the process of FIG. 10, the digital signal normalization process or the denormalization process associated with the AD conversion or DA conversion is performed. I will not. In addition, the control unit 190 mainly performs normalization processing and denormalization processing only on necessary channels, and does not execute normalization processing or denormalization processing on other channels (the previous value is used as it is). ).

したがって、図11にハッチングで示すように、正規化処理や非正規化処理によって割込プログラムが中断させられることもなく、割込プログラムが図10に比べて短時間で終了することが理解できる。このように、図11の例では、割込プログラムの実行時間を確保し、資源の有効利用を図ることができる。   Therefore, as indicated by hatching in FIG. 11, it can be understood that the interrupt program is terminated in a shorter time than in FIG. 10 without being interrupted by the normalization process or the denormalization process. As described above, in the example of FIG. 11, it is possible to secure the execution time of the interrupt program and to effectively use the resources.

また、他の処理でも、デジタル信号の正規化処理や非正規化処理を必要最小限に留め、かつ、正規化処理や非正規化処理を実行する場合であっても必要なチャンネルのみに限定することで、その分、割込プログラムに処理時間を解放することができる。   In other processing, digital signal normalization processing and denormalization processing are kept to the minimum necessary, and even when normalization processing and denormalization processing are executed, they are limited to only necessary channels. Thus, the processing time can be released to the interrupt program accordingly.

図12は、割込プログラムの処理のさらに他の例を示したタイミングチャートである。図12の例では、AD制御回路224aやDA制御回路224bが主体となり、所定の周期(例えば、25μsec)でAD変換およびDA変換を繰り返しつつ、その途中で、制御部190の割込プログラム実行部202が主体となり、割込プログラムの要求に応じてデジタル信号の処理を行う。   FIG. 12 is a timing chart showing still another example of interrupt program processing. In the example of FIG. 12, the AD control circuit 224a and the DA control circuit 224b are mainly used, and while the AD conversion and DA conversion are repeated at a predetermined cycle (for example, 25 μsec), the interrupt program execution unit of the control unit 190 is in the middle. 202 is the main body, and processes digital signals in response to a request from an interrupt program.

具体的に、AD制御回路224aは、所定の周期に基づく、例えば時点(a)において、ADコンバータ220の変換制御を開始し、変換されたデジタル信号をバッファに保持する。また、DA制御回路224bは、AD制御回路224aと独立した所定の周期に基づく、例えば時点(b)において、DA制御回路224bのバッファに保持された非正規化デジタル信号によってDAコンバータ222の変換制御を実行する。こうして、DAコンバータ222からアナログ信号が出力される。ここでは、正規化処理および非正規化処理を除くAD変換およびDA変換が周期的に行われる。   Specifically, the AD control circuit 224a starts the conversion control of the AD converter 220 based on a predetermined cycle, for example, at the time point (a), and holds the converted digital signal in the buffer. Also, the DA control circuit 224b performs conversion control of the DA converter 222 based on a predetermined cycle independent of the AD control circuit 224a, for example, at a time point (b), by the denormalized digital signal held in the buffer of the DA control circuit 224b. Execute. In this way, an analog signal is output from the DA converter 222. Here, AD conversion and DA conversion excluding normalization processing and non-normalization processing are periodically performed.

そして、制御部190の割込プログラム実行部202は、割込プログラムの実行途中の時点(c)で任意のデジタル信号が必要になると、例えば、ADコンバータ220に接続されたアナログ信号のアドレスに対してアクセスを検出すると、時点(d)において、AD制御回路224aに保持された、変換後の最新のデジタル信号を読み出し、デジタル信号を正規化して正規化デジタル信号を生成する。かかる正規化は、図10を用いて説明したのと同様、アナログ値調整処理、スケール変換処理、移動平均処理からなる。ここで、時点(d)では、ADコンバータ220が次の変換を開始しているが、変換結果が生成されていないので、前回の変換結果が用いられる。   Then, the interrupt program execution unit 202 of the control unit 190, when an arbitrary digital signal is required at the time (c) during the execution of the interrupt program, for example, for the address of the analog signal connected to the AD converter 220 At time (d), the latest digital signal after conversion held in the AD control circuit 224a is read, and the digital signal is normalized to generate a normalized digital signal. Such normalization includes analog value adjustment processing, scale conversion processing, and moving average processing as described with reference to FIG. Here, at the time point (d), the AD converter 220 starts the next conversion. However, since the conversion result is not generated, the previous conversion result is used.

ただし、ここでも、ADコンバータ220に複数備わっているチャンネルのうち、デジタル信号が必要なチャンネルのみを正規化する。したがって、その正規化処理に費やされる処理時間は図10と比べて1/チャンネル数(ここでは1/4)となる。   However, here too, only the channels that require a digital signal among the channels provided in the AD converter 220 are normalized. Therefore, the processing time spent for the normalization process is 1 / the number of channels (here, 1/4) compared to FIG.

続いて、割込プログラム実行部202は、正規化デジタル信号によって割込プログラムを実行し、時点(e)において、処理結果として任意のデジタル信号が生成されると、任意のデジタル信号を非正規化して非正規化デジタル信号を生成し、DA制御回路224bのバッファに保持させる。かかる非正規化は、図10を用いて説明したのと同様、スケール変換処理、アナログ値調整処理からなる。   Subsequently, the interrupt program execution unit 202 executes the interrupt program with the normalized digital signal. When an arbitrary digital signal is generated as a processing result at the time point (e), the arbitrary digital signal is denormalized. The denormalized digital signal is generated and held in the buffer of the DA control circuit 224b. Such denormalization includes a scale conversion process and an analog value adjustment process, as described with reference to FIG.

ただし、ここでも、DAコンバータ222に複数備わっているチャンネルのうち、デジタル信号を出力する対象となっているチャンネルのみを非正規化する。したがって、その非正規化処理に費やされる処理時間は図10と比べて1/チャンネル数(ここでは1/4)となる。   However, here too, only the channel for which a digital signal is to be output is denormalized from among a plurality of channels provided in the DA converter 222. Therefore, the processing time spent for the denormalization processing is 1 / the number of channels (here, 1/4) compared to FIG.

そして、DA制御回路224bは、バッファに保持している非正規化デジタル信号によってDAコンバータ222の変換制御を実行させる。   Then, the DA control circuit 224b performs conversion control of the DA converter 222 by the denormalized digital signal held in the buffer.

かかる図12の処理でも、図10の処理と比べ、デジタル信号の正規化処理や非正規化処理を周期的に行っていない。また、制御部190が主体となって実行されるAD変換やDA変換においては、必要なチャンネルのみ正規化処理や非正規化処理を実行し、他のチャンネルについての正規化処理や非正規化処理を実行していない(前回値をそのまま利用する)。   In the process of FIG. 12 as well, the digital signal normalization process and the denormalization process are not periodically performed as compared with the process of FIG. Further, in AD conversion and DA conversion executed mainly by the control unit 190, normalization processing and denormalization processing are executed only for necessary channels, and normalization processing and denormalization processing for other channels are performed. Is not executed (the previous value is used as it is).

したがって、図12にハッチングで示すように、正規化処理や非正規化処理によって割込プログラムが中断させられることもなく、かつ、AD変換を待つことすらないので、割込プログラムが、図10や図11に比べて短時間で終了することが理解できる。このように、図12の例では、割込プログラムの実行時間を確保し、資源のさらなる有効利用を図ることができる。   Therefore, as indicated by hatching in FIG. 12, the interrupt program is not interrupted by normalization processing or denormalization processing, and does not wait for AD conversion. It can be understood that the process is completed in a shorter time compared to FIG. Thus, in the example of FIG. 12, it is possible to secure the execution time of the interrupt program and to further effectively use the resources.

また、正規化処理や非正規化処理の負荷が最小化されるので、制御部190の駆動時間が短くなり、発熱や消費電力を抑えることもできる。   In addition, since the load of normalization processing and denormalization processing is minimized, the drive time of the control unit 190 is shortened, and heat generation and power consumption can be suppressed.

(第3の実施形態)
図3でも説明したように、実行プログラムは、割込プログラムと非割込プログラムに大別され、割込プログラムに基づく割込処理については、入出力モジュール126に完結的に割り当てることができる。そして、演算モジュール122は、非割込プログラムに基づく非割込処理によって入出力モジュール126から割込処理の結果を取得することができる。
(Third embodiment)
As described with reference to FIG. 3, the execution program is roughly divided into an interrupt program and a non-interrupt program, and interrupt processing based on the interrupt program can be completely assigned to the input / output module 126. Then, the arithmetic module 122 can acquire the result of the interrupt process from the input / output module 126 by the non-interrupt process based on the non-interrupt program.

図13は、非割込処理の一例を説明するためのタイミングチャートである。まず、入出力モジュール126の割込プログラム実行部202は、時点(a)において割込処理が発生すると、割込プログラムに基づいて演算処理を実行し、その処理結果を、時点(b)において、共有メモリ184に保持する。   FIG. 13 is a timing chart for explaining an example of non-interrupt processing. First, when an interrupt process occurs at the time point (a), the interrupt program execution unit 202 of the input / output module 126 executes an arithmetic process based on the interrupt program, and the processing result is obtained at the time point (b). It is held in the shared memory 184.

続いて、演算モジュール122は、周期的に、非割込プログラムに基づく非割込処理を実行し、その開始時点(c)において、入出力モジュール126の共有メモリ184から入力データを取得する。そして、非割込プログラムの実行途中の時点(d)で当該入力データを演算し、その演算結果である出力データを、周期の終了時点(e)において、共有メモリ184に保持する。最後に、入出力モジュール126の割込プログラム実行部202は、任意の時点(f)において共有メモリ184から出力データを取得する。   Subsequently, the arithmetic module 122 periodically executes non-interrupt processing based on the non-interrupt program, and acquires input data from the shared memory 184 of the input / output module 126 at the start time (c). Then, the input data is calculated at a point (d) in the middle of execution of the non-interrupt program, and the output data as the calculation result is held in the shared memory 184 at the end point (e) of the cycle. Finally, the interrupt program execution unit 202 of the input / output module 126 acquires output data from the shared memory 184 at an arbitrary time point (f).

このように、周期的に非割込処理を実行することで、データの入出力をタクトタイムに正確に同期させることが可能となる。しかし、入力データが生成されてから非割込プログラムで処理される入力応答時間や、非割込プログラムで処理されてから出力データが反映されるまでの出力応答時間は長くなってしまう。このような入力応答時間や出力応答時間は、タクトタイムに影響を受けている。例えば、入出力モジュール126の数や、入出力モジュール126で用いる入出力数が増加し、それに応じて非割込処理が長くなると、タクトタイムを長くせざるを得なくなり、それに伴って、入力応答時間や出力応答時間も長期化する。そうすると、制御システム100全体の制御精度や応答性が低下するおそれがある。   As described above, by periodically executing the non-interrupt processing, the input / output of data can be accurately synchronized with the tact time. However, the input response time that is processed by the non-interrupt program after the input data is generated and the output response time that is processed by the non-interrupt program until the output data is reflected become long. Such input response time and output response time are affected by tact time. For example, if the number of input / output modules 126 and the number of input / outputs used in the input / output modules 126 increase and the non-interrupt processing becomes longer accordingly, the tact time must be increased, and accordingly, the input response Longer time and output response time. If it does so, there exists a possibility that the control precision and responsiveness of the control system 100 whole may fall.

ここで、入出力の即応性が必要となる場合、プログラマブルコントローラ120を別途独立して設け、その独立したプログラマブルコントローラ120において、演算処理や入出力数を必要最小限に抑え、タクトタイムを短縮して高速に入出力処理を実行し、その結果を、通信モジュール124を介して送受信することも考えられる。しかし、かかる手法では制御システム100が大規模化してしまう。   Here, when input / output responsiveness is required, a programmable controller 120 is provided separately, and in the independent programmable controller 120, the arithmetic processing and the number of input / outputs are minimized to shorten the tact time. It is also possible to execute input / output processing at high speed and transmit / receive the result via the communication module 124. However, such a method increases the size of the control system 100.

そこで、プログラマブルコントローラ120内で、即応性より同期性を優先する処理と、同期性より即応性を優先する処理とを分け、それぞれにバスおよび入出力モジュール126を個別に割り当てる。具体的には、上述したように、ベースボードにシリアル伝送方式の第1バスや、パラレル伝送方式の第2バスといった複数のバスを準備し、それぞれ異なる複数の入出力モジュール126に接続する。ここでシリアル伝送方式は、データのビット数未満のラインに対し1ビットずつ順番に情報を伝達する方式であり、パラレル伝送方式は、少なくともデータのビット数のラインに対し、全ての情報を各ラインに並行して同時に伝送する方式をいう。   Therefore, in the programmable controller 120, processing that prioritizes synchronization over responsiveness and processing that prioritizes responsiveness over synchronization are divided, and the bus and the input / output module 126 are individually assigned to each. Specifically, as described above, a plurality of buses such as a serial transmission type first bus and a parallel transmission type second bus are prepared on the base board and connected to different input / output modules 126, respectively. Here, the serial transmission method is a method in which information is sequentially transmitted one bit at a time to a line less than the number of data bits, and the parallel transmission method is a method in which all information is transferred to each line at least for a line having the number of data bits. A method of transmitting simultaneously in parallel.

例えば、任意の入出力モジュール126(以下、単に第1入出力モジュールという)は、第1バスのみを通じて演算モジュール122と接続し、任意の他の入出力モジュール126(以下、単に第2入出力モジュールという)は、第2バスのみを通じて演算モジュール122と接続する。そして、第1バスを通じた第1入出力モジュール(第1入力モジュール)については、図13のように周期的に処理し、第2バスを通じた第2入出力モジュール(第2入力モジュール)については、以下に示すように高速処理を行い、かかる同期性を優先する処理と即応性を優先する処理とを並行して実行する。   For example, an arbitrary input / output module 126 (hereinafter simply referred to as a first input / output module) is connected to the arithmetic module 122 only through the first bus, and an arbitrary other input / output module 126 (hereinafter simply referred to as a second input / output module). Is connected to the arithmetic module 122 only through the second bus. The first input / output module (first input module) through the first bus is processed periodically as shown in FIG. 13, and the second input / output module (second input module) through the second bus is processed. As described below, high-speed processing is performed, and processing that prioritizes such synchronization and processing that prioritizes responsiveness are executed in parallel.

図14は、非割込処理の他の例を説明するためのタイミングチャートである。ここでは、図13を用いて説明した周期的な処理ではなく、データが生成されたタイミングで処理を開始する割込処理が行われる。入出力モジュール126の割込プログラム実行部202は、時点(a)において割込処理が発生すると、割込プログラムに基づいて演算処理を実行し、その処理結果を、時点(b)において、共有メモリ184に保持し、演算モジュール122に、入力データの準備ができた旨伝達する(割込通知)。   FIG. 14 is a timing chart for explaining another example of non-interrupt processing. Here, not the periodic process described with reference to FIG. 13 but an interrupt process for starting the process at the timing when the data is generated is performed. When an interrupt process occurs at the time point (a), the interrupt program execution unit 202 of the input / output module 126 executes an arithmetic process based on the interrupt program, and the processing result is shared memory at the time point (b). It is held at 184, and the arithmetic module 122 is notified that the input data is ready (interrupt notification).

続いて、演算モジュール122は、非割込プログラムに基づく非割込処理を実行し、入出力モジュール126からの伝達に応じて、時点(c)において、入出力モジュール126の共有メモリ184から入力データを取得し、当該入力データを演算し、その演算結果である出力データを、周期の終了時点(d)において、共有メモリ184に保持し、入出力モジュール126に、入力データの準備ができた旨伝達する(割込通知)。最後に、入出力モジュール126の割込プログラム実行部202は、演算モジュール122からの伝達に応じて、時点(e)において共有メモリ184から出力データを取得する。   Subsequently, the arithmetic module 122 executes a non-interrupt process based on the non-interrupt program, and receives input data from the shared memory 184 of the input / output module 126 at a time point (c) according to the transmission from the input / output module 126. , The input data is calculated, the output data that is the result of the calculation is held in the shared memory 184 at the end of the cycle (d), and the input / output module 126 is ready for the input data. Communicate (interrupt notice). Finally, the interrupt program execution unit 202 of the input / output module 126 acquires the output data from the shared memory 184 at the time (e) in response to the transmission from the arithmetic module 122.

ここでは、データが生成されたタイミングで割込通知を行い、タクトタイムに関係なく、データが生成された直後にモジュール間でデータの送受信を行っているので、入力応答時間や出力応答時間を短縮することが可能となる。   Here, interrupt notification is performed at the timing when data is generated, and data is transmitted and received between modules immediately after data is generated, regardless of tact time, so input response time and output response time are shortened It becomes possible to do.

図13、図14を用いて説明したように、即応性より同期性を優先する処理と、同期性より即応性を優先する処理とを並行して実行することで以下の効果を得られる。すなわち、第1バスを通じた第1入出力モジュールにより、従来通り、データの入力、出力をタクトタイムに正確に同期させることが可能となる。また、第2バスを通じた第2入出力モジュールにより、入力応答時間や出力応答時間を短縮できるので、入出力モジュール126の数や、入出力モジュール126で用いる入出力数が増加し、それに応じて非割込処理が長くなり、タクトタイムを長くせざるを得なくなったとしても、制御システム100全体の制御精度や応答性を向上することが可能となる。   As described with reference to FIGS. 13 and 14, the following effects can be obtained by executing in parallel the processing that gives priority to synchrony over responsiveness and the processing that gives priority to responsiveness over synchrony. In other words, the first input / output module through the first bus can accurately synchronize the input and output of data with the tact time as usual. In addition, since the input response time and output response time can be shortened by the second input / output module through the second bus, the number of input / output modules 126 and the number of input / outputs used in the input / output module 126 are increased. Even if the non-interrupt process becomes longer and the tact time has to be increased, the control accuracy and responsiveness of the entire control system 100 can be improved.

このように複数の伝送方式を採用し、それぞれの特性を活かして入出力を分配することで、制御システム100全体として処理効率や汎用性を高めることができる。また、少ないプログラマブルコントローラ120による少ないモジュール数で、同期性と即応性とをいずれも実現することが可能となる。   As described above, by adopting a plurality of transmission schemes and distributing input / output utilizing each characteristic, it is possible to improve the processing efficiency and versatility of the control system 100 as a whole. In addition, both the synchronism and the quick response can be realized with a small number of modules by the small programmable controller 120.

また、コンピュータを制御システム100として機能させるプログラムや、当該プログラムを記録した、コンピュータで読み取り可能なフレキシブルディスク、光磁気ディスク、ROM、CD、DVD、BD等の記憶媒体も提供される。ここで、プログラムは、任意の言語や記述方法にて記述されたデータ処理手段をいう。   Also provided are a program that causes a computer to function as the control system 100, and a storage medium such as a computer-readable flexible disk, magneto-optical disk, ROM, CD, DVD, or BD on which the program is recorded. Here, the program refers to data processing means described in an arbitrary language or description method.

以上、添付図面を参照しながら本発明の好適な実施形態について説明したが、本発明はかかる実施形態に限定されないことは言うまでもない。当業者であれば、特許請求の範囲に記載された範疇において、各種の変更例または修正例に想到し得ることは明らかであり、それらについても当然に本発明の技術的範囲に属するものと了解される。   As mentioned above, although preferred embodiment of this invention was described referring an accompanying drawing, it cannot be overemphasized that this invention is not limited to this embodiment. It will be apparent to those skilled in the art that various changes and modifications can be made within the scope of the claims, and these are naturally within the technical scope of the present invention. Is done.

例えば、上述した実施形態においては、説明の便宜上、入出力モジュール126において割込プログラムを用い、演算モジュール122で、その割込プログラムを除く非割込プログラムを用いる例を挙げて説明したが、入出力モジュール126に割り当てる割込プログラムは、実行プログラムに含まれる全ての割込プログラムの一部であればよく、残りの割込プログラムを演算モジュール122自体で用いることができる。したがって、非割込プログラムは、入出力モジュール126に割り当てた割込プログラムを除く全てのプログラムを含むこととなる。   For example, in the embodiment described above, for the sake of convenience of explanation, an example in which an interrupt program is used in the input / output module 126 and a non-interrupt program other than the interrupt program is used in the arithmetic module 122 has been described. The interrupt program assigned to the output module 126 may be a part of all the interrupt programs included in the execution program, and the remaining interrupt programs can be used in the arithmetic module 122 itself. Therefore, the non-interrupt programs include all programs except the interrupt program assigned to the input / output module 126.

また、上述した実施形態においては、プログラム複製部170が演算モジュール122に備わっている例を挙げて説明したが、かかる場合に限らず、入出力モジュール126や他のモジュール、もしくは、管理装置110に備わるとしてもよい。同様に、複製対象となる割込プログラムが演算モジュール122の不揮発性メモリ152に保持されている例を挙げて説明したが、その保持されるメモリは制御システム100内のいずれのメモリであってもよい。また、上述した実施形態においては、割込プログラムを入出力モジュール126に複製する例を挙げたが、非割込プログラムをいずれかのメモリに保持しておき、所定の契機に、非割込プログラムを演算モジュール122に複製するとしてもよい。   Further, in the above-described embodiment, the example in which the program duplication unit 170 is provided in the arithmetic module 122 has been described. However, the present invention is not limited to this, and the input / output module 126, other modules, or the management apparatus 110 is not limited thereto. It may be provided. Similarly, an example in which the interrupt program to be copied is held in the nonvolatile memory 152 of the arithmetic module 122 has been described, but the held memory may be any memory in the control system 100. Good. In the above-described embodiment, an example in which the interrupt program is copied to the input / output module 126 has been described. However, the non-interrupt program is held in one of the memories and the non-interrupt program is triggered at a predetermined opportunity. May be copied to the arithmetic module 122.

また、上述した実施形態においては、割込プログラムを複製する所定の契機として、制御システム100の起動時を挙げて説明したが、他の任意のタイミングを排除するものではなく、様々なタイミングを選択することができる。なお、上述した実施形態においては、制御システム100を起動する度に割込プログラムを入出力モジュール126の共有メモリ184に複製する例を挙げて説明したが、入出力モジュール126において割込プログラムを保持するメモリが不揮発性であれば、そのメモリに割込プログラムが既に複製されているか否か判定し、複製されていない場合にのみ割込プログラムを複製するとしてもよい。   In the above-described embodiment, the control system 100 is started as a predetermined trigger for copying the interrupt program. However, any other timing is not excluded, and various timings are selected. can do. In the above-described embodiment, the example in which the interrupt program is copied to the shared memory 184 of the input / output module 126 every time the control system 100 is activated has been described. However, the input / output module 126 holds the interrupt program. If the memory to be used is non-volatile, it may be determined whether or not the interrupt program has already been duplicated in the memory, and the interrupt program may be duplicated only when it has not been duplicated.

上述した実施形態においては、制御システム100を例に挙げて説明したが、分散型制御装置(DCS)等、様々な機器に適用することができる。また、上述した実施形態においては、入力モジュールと出力モジュールが結合された入出力モジュール126を通じて外部からデータを入力する例を挙げているが、出力モジュールは必須の構成ではなく、少なくとも入力モジュールがあれば本実施形態を適用することができる。   In the above-described embodiment, the control system 100 has been described as an example, but the present invention can be applied to various devices such as a distributed control device (DCS). In the above-described embodiment, an example is given in which data is input from the outside through the input / output module 126 in which the input module and the output module are combined. However, the output module is not an essential configuration, and at least the input module is included. The present embodiment can be applied.

また、上述した実施形態においては、実行プログラムのうち割込プログラムを入出力モジュール126に複製し、入出力モジュール126にて割込処理を実行する例を挙げて説明したが、パラレル伝送方式の第2バスによって接続される場合、その割込処理の一部を、さらに演算モジュール122に割り当て、割込処理を分散することもできる。   In the above-described embodiment, an example in which an interrupt program among the execution programs is copied to the input / output module 126 and the interrupt process is executed by the input / output module 126 has been described. When connected by two buses, a part of the interrupt processing can be further allocated to the arithmetic module 122 to distribute the interrupt processing.

また、上述した実施形態においては、複数のバスとして、シリアル伝送方式の第1バスとパラレル伝送方式の第2バスを挙げて説明したが、かかる場合に限らず、複数のバスがいずれもシリアル伝送方式であってもよいし、パラレル伝送方式であってもよい。また、上述した実施形態においては、いずれのバスにも制御部190を有する入出力モジュール126を接続する例を挙げて説明したが、即応性を要さない第1バスに接続する入出力モジュール126は、制御部190を有さないFPGA等により入出力を管理する入出力モジュールであってもよい。   In the above-described embodiment, the first bus of the serial transmission method and the second bus of the parallel transmission method are described as the plurality of buses. However, the present invention is not limited to this, and the plurality of buses are all serially transmitted. It may be a system or a parallel transmission system. In the above-described embodiment, an example in which the input / output module 126 having the control unit 190 is connected to any bus has been described. However, the input / output module 126 connected to the first bus that does not require responsiveness. May be an input / output module that manages input / output by an FPGA or the like that does not have the control unit 190.

なお、本明細書の制御方法の各工程は、必ずしもタイミングチャートとして記載された順序に沿って時系列に処理する必要はなく、また、並列的あるいはサブルーチンによる処理を含んでもよい。   Note that each step of the control method of the present specification does not necessarily have to be processed in time series in the order described as the timing chart, and may include processing in parallel or by a subroutine.

本発明は、演算モジュールと入力モジュールとを備える制御システムおよび制御方法に利用することができる。   The present invention can be used in a control system and a control method including an arithmetic module and an input module.

100 制御システム
122 演算モジュール
126 入出力モジュール(入力モジュール、第1入力モジュール、第2入力モジュール)
170 プログラム複製部
172 非割込プログラム実行部
174 履歴管理部
200 条件判定部
202 割込プログラム実行部
204 履歴通知部
220 ADコンバータ
222 DAコンバータ
224a AD制御回路
224b DA制御回路
100 control system 122 arithmetic module 126 input / output module (input module, first input module, second input module)
170 Program replication unit 172 Non-interrupt program execution unit 174 History management unit 200 Condition determination unit 202 Interrupt program execution unit 204 History notification unit 220 AD converter 222 DA converter 224a AD control circuit 224b DA control circuit

Claims (12)

外部からデータを入力する入力モジュールと、前記入力モジュールとバスを通じて接続され、該入力モジュールから受信したデータに基づいて演算を行う演算モジュールと、を備えた制御システムであって、
前記制御システムで実行されるプログラムは、割込条件の成立を実行契機とする割込プログラムと、該割込プログラムを除いた非割込プログラムとを含んでなり、
前記入力モジュールは、
前記割込プログラムに対応付けられた割込条件が成立しているか否か判定する条件判定部と、
前記割込条件が成立していると判定されると、前記割込プログラムを実行する割込プログラム実行部と、
を備え、
前記演算モジュールは、
前記割込プログラム実行部の実行結果を参照し、前記非割込プログラムを実行する非割込プログラム実行部
を備えることを特徴とする制御システム。
A control system comprising: an input module for inputting data from the outside; and an arithmetic module connected to the input module through a bus and performing an operation based on data received from the input module,
The program executed in the control system includes an interrupt program triggered by the establishment of the interrupt condition, and a non-interrupt program excluding the interrupt program,
The input module is
A condition determination unit for determining whether or not an interrupt condition associated with the interrupt program is satisfied;
When it is determined that the interrupt condition is satisfied, an interrupt program execution unit that executes the interrupt program;
With
The arithmetic module is
A control system comprising a non-interrupt program execution unit that refers to an execution result of the interrupt program execution unit and executes the non-interrupt program.
所定の契機に、前記割込プログラムを前記入力モジュールに複製するプログラム複製部をさらに備えることを特徴とする請求項1に記載の制御システム。   The control system according to claim 1, further comprising a program duplicating unit that duplicates the interrupt program to the input module at a predetermined opportunity. 前記所定の契機は、前記演算モジュールおよび前記入力モジュールの起動時であり、
前記プログラム複製部は、前記割込プログラムを、前記演算モジュールから前記入力モジュールに複製することを特徴とする請求項2に記載の制御システム。
The predetermined opportunity is when the arithmetic module and the input module are activated,
The control system according to claim 2, wherein the program duplicating unit duplicates the interrupt program from the arithmetic module to the input module.
前記入力モジュールは、前記割込プログラム実行部が前記割込プログラムに基づく割込処理を完了すると、割込処理が完了した旨の情報を前記演算モジュールに送信する履歴通知部をさらに備えることを特徴とする請求項1から3のいずれか1項に記載の制御システム。   The input module further includes a history notification unit that transmits information indicating that the interrupt process is completed to the arithmetic module when the interrupt program execution unit completes the interrupt process based on the interrupt program. The control system according to any one of claims 1 to 3. 前記入力モジュールは、外部のアナログ信号をデジタル信号に変換するADコンバータと、該ADコンバータの変換制御を行うAD制御回路と、を備え、
前記割込プログラム実行部は、
前記割込プログラムの実行途中で任意のデジタル信号が必要になると、前記AD制御回路に前記ADコンバータの変換制御を実行させ、
前記ADコンバータの変換完了後に、前記任意のデジタル信号のみ正規化して正規化デジタル信号を生成し、
前記正規化デジタル信号によって前記割込プログラムを実行することを特徴とする請求項1から4のいずれか1項に記載の制御システム。
The input module includes an AD converter that converts an external analog signal into a digital signal, and an AD control circuit that performs conversion control of the AD converter,
The interrupt program execution unit
When an arbitrary digital signal is required during the execution of the interrupt program, the AD control circuit executes conversion control of the AD converter,
After the conversion of the AD converter is completed, only the arbitrary digital signal is normalized to generate a normalized digital signal,
The control system according to any one of claims 1 to 4, wherein the interrupt program is executed by the normalized digital signal.
前記入力モジュールは、デジタル信号をアナログ信号に変換して外部に出力するDAコンバータと、該DAコンバータの変換制御を行うDA制御回路と、を備え、
前記割込プログラム実行部は、
前記割込プログラムの実行途中で任意のデジタル信号が生成されると、前記任意のデジタル信号のみ非正規化して非正規化デジタル信号を生成し、
前記DA制御回路に、前記非正規化デジタル信号によって前記DAコンバータの変換制御を実行させることを特徴とする請求項5に記載の制御システム。
The input module includes a DA converter that converts a digital signal into an analog signal and outputs the analog signal, and a DA control circuit that performs conversion control of the DA converter,
The interrupt program execution unit
When an arbitrary digital signal is generated during the execution of the interrupt program, only the arbitrary digital signal is denormalized to generate a denormalized digital signal,
6. The control system according to claim 5, wherein the DA control circuit is caused to execute conversion control of the DA converter by the non-normalized digital signal.
前記入力モジュールは、外部のアナログ信号をデジタル信号に変換するADコンバータと、該ADコンバータの変換制御を行うAD制御回路と、を備え、
前記AD制御回路は、
所定の周期で前記ADコンバータの変換制御を実行し、
変換されたデジタル信号を保持し、
前記割込プログラム実行部は、
前記割込プログラムの実行途中で任意のデジタル信号が必要になると、前記AD制御回路に保持された該任意のデジタル信号のみ正規化して正規化デジタル信号を生成し、
前記正規化デジタル信号によって前記割込プログラムを実行することを特徴とする請求項1から4のいずれか1項に記載の制御システム。
The input module includes an AD converter that converts an external analog signal into a digital signal, and an AD control circuit that performs conversion control of the AD converter,
The AD control circuit includes:
Execute conversion control of the AD converter at a predetermined cycle;
Hold the converted digital signal,
The interrupt program execution unit
When an arbitrary digital signal is required during the execution of the interrupt program, only the arbitrary digital signal held in the AD control circuit is normalized to generate a normalized digital signal,
The control system according to any one of claims 1 to 4, wherein the interrupt program is executed by the normalized digital signal.
前記入力モジュールは、デジタル信号をアナログ信号に変換して外部に出力するDAコンバータと、該DAコンバータの変換制御を行うDA制御回路と、を備え、
前記割込プログラム実行部は、
前記割込プログラムの実行途中で任意のデジタル信号が生成されると、前記任意のデジタル信号のみ非正規化して非正規化デジタル信号を生成し、
前記非正規化デジタル信号を前記DA制御回路に保持させ、
前記DA制御回路は、
前記非正規化デジタル信号によって前記DAコンバータの変換制御を実行することを特徴とする請求項7に記載の制御システム。
The input module includes a DA converter that converts a digital signal into an analog signal and outputs the analog signal, and a DA control circuit that performs conversion control of the DA converter,
The interrupt program execution unit
When an arbitrary digital signal is generated during the execution of the interrupt program, only the arbitrary digital signal is denormalized to generate a denormalized digital signal,
Holding the non-normalized digital signal in the DA control circuit;
The DA control circuit
8. The control system according to claim 7, wherein conversion control of the DA converter is executed by the non-normalized digital signal.
前記入力モジュールは、第1入力モジュールおよび第2入力モジュールを含み、
前記バスは、前記演算モジュールと前記第1入力モジュールとを接続する第1バス、および、前記演算モジュールと前記第2入力モジュールとを接続する第2バスを含み、
前記演算モジュールは、所定のタクトタイム毎に、前記第1バスを通じて、前記第1入力モジュールからデータを入力し、
前記第2入力モジュールの前記割込プログラム実行部は、前記タクトタイムに関係ない所定のタイミングで、前記第2バスを通じて、前記第2入力モジュールのデータを前記演算モジュールに入力させることを特徴とする請求項1から8のいずれか1項に記載の制御システム。
The input module includes a first input module and a second input module;
The bus includes a first bus that connects the arithmetic module and the first input module, and a second bus that connects the arithmetic module and the second input module,
The arithmetic module inputs data from the first input module through the first bus every predetermined tact time,
The interrupt program execution unit of the second input module causes the operation module to input data of the second input module through the second bus at a predetermined timing not related to the tact time. The control system according to any one of claims 1 to 8.
前記演算モジュールは、
所定のタクトタイム毎に、前記第1バスを通じて、前記第1入力モジュールにデータを出力し、
前記タクトタイムに関係ない所定のタイミングで、前記第2バスを通じて、前記第2入力モジュールにデータを出力することを特徴とする請求項9に記載の制御システム。
The arithmetic module is
Data is output to the first input module through the first bus at every predetermined tact time,
The control system according to claim 9, wherein data is output to the second input module through the second bus at a predetermined timing not related to the tact time.
前記第1バスは、シリアル伝送方式であり、
前記第2バスは、パラレル伝送方式であることを特徴とする請求項9または10に記載の制御システム。
The first bus is a serial transmission method,
The control system according to claim 9 or 10, wherein the second bus is a parallel transmission system.
外部からデータを入力する入力モジュールと、前記入力モジュールとバスを通じて接続され、該入力モジュールから受信したデータに基づいて演算を行う演算モジュールと、を備える制御システムを用いた制御方法であって、
前記制御システムで実行されるプログラムは、割込条件の成立を実行契機とする割込プログラムと、該割込プログラムを除いた非割込プログラムとを含んでなり、
前記入力モジュールが、
前記割込プログラムに対応付けられた割込条件が成立しているか否か判定し、
前記割込条件が成立していると判定すると、前記割込プログラムを実行し、
前記演算モジュールが、
前記割込プログラムの実行結果を参照し、前記非割込プログラムを実行することを特徴とする制御方法。
A control method using a control system comprising: an input module that inputs data from outside; and an arithmetic module that is connected to the input module through a bus and performs an operation based on data received from the input module,
The program executed in the control system includes an interrupt program triggered by the establishment of the interrupt condition, and a non-interrupt program excluding the interrupt program,
The input module is
Determining whether an interrupt condition associated with the interrupt program is satisfied;
If it is determined that the interrupt condition is satisfied, the interrupt program is executed,
The arithmetic module is
A control method comprising: executing the non-interrupt program with reference to an execution result of the interrupt program.
JP2016032611A 2015-09-24 2016-02-24 Control system and control method Active JP6686521B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2015186289 2015-09-24
JP2015186289 2015-09-24

Publications (2)

Publication Number Publication Date
JP2017062758A true JP2017062758A (en) 2017-03-30
JP6686521B2 JP6686521B2 (en) 2020-04-22

Family

ID=58428930

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016032611A Active JP6686521B2 (en) 2015-09-24 2016-02-24 Control system and control method

Country Status (1)

Country Link
JP (1) JP6686521B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021157134A1 (en) * 2020-02-04 2021-08-12 株式会社日立製作所 Control system
JP7034399B1 (en) * 2021-06-25 2022-03-11 三菱電機株式会社 Input unit, control system, communication method and program

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021157134A1 (en) * 2020-02-04 2021-08-12 株式会社日立製作所 Control system
JP2021124907A (en) * 2020-02-04 2021-08-30 株式会社日立製作所 Control system
US11734201B2 (en) 2020-02-04 2023-08-22 Hitachi, Ltd. Control system
JP7034399B1 (en) * 2021-06-25 2022-03-11 三菱電機株式会社 Input unit, control system, communication method and program
WO2022269889A1 (en) * 2021-06-25 2022-12-29 三菱電機株式会社 Input unit, control system, communication method, and program
CN116710857A (en) * 2021-06-25 2023-09-05 三菱电机株式会社 Input unit, control system, communication method, and program

Also Published As

Publication number Publication date
JP6686521B2 (en) 2020-04-22

Similar Documents

Publication Publication Date Title
EP2687927B1 (en) Cpu of plc, system program for plc, and recording medium storing system program for plc
US10761515B2 (en) Control system for controlling control object and control device for linking control applications in control system
JP5819575B2 (en) Method and apparatus for upgrading and providing control redundancy in a process plant
US10274936B2 (en) Control apparatus
US10877803B2 (en) Control apparatus, control method and non-transitory storage medium
JP2016194830A (en) Control device
JP2016110458A (en) Programmable logic controller, basic unit, control method and program
JP2012194667A (en) Cpu unit of plc, system program for plc, and recording medium storing system program for plc
JPWO2019097800A1 (en) Control device
JP2021012405A (en) Control system, setting device and computer program
US11287793B2 (en) Control device, control method for control device, information processing program, and recording medium
JP2017062758A (en) Control system and control method
US20140005808A1 (en) Cpu of plc, system program for plc, and recording medium storing system program for plc
JP6419400B1 (en) PLC, network unit, CPU unit, and data transfer method
JPH09330106A (en) Control system with backup function
JP2016130947A (en) Control system and control device
CN112422704B (en) Address allocation method and device for multiple devices and storage medium
JP2019159532A (en) Control device and control system
JP7244364B2 (en) Slave unit and servo drive system
JP2008077265A (en) Program update method for programmable controller
JP7110911B2 (en) Control method for controller and communication control unit provided in controller
JP6356736B2 (en) Controller system and control method
JP2016224600A (en) Controller, storage device, and reproduction device
JP2023051319A (en) Control system and processor
CN116909678A (en) Implementation method and system of containerized PLC and management server

Legal Events

Date Code Title Description
AA64 Notification of invalidation of claim of internal priority (with term)

Free format text: JAPANESE INTERMEDIATE CODE: A241764

Effective date: 20160315

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160328

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190111

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20191113

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20191119

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200116

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200303

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200316

R150 Certificate of patent or registration of utility model

Ref document number: 6686521

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250