JP6686521B2 - Control system and control method - Google Patents
Control system and control method Download PDFInfo
- Publication number
- JP6686521B2 JP6686521B2 JP2016032611A JP2016032611A JP6686521B2 JP 6686521 B2 JP6686521 B2 JP 6686521B2 JP 2016032611 A JP2016032611 A JP 2016032611A JP 2016032611 A JP2016032611 A JP 2016032611A JP 6686521 B2 JP6686521 B2 JP 6686521B2
- Authority
- JP
- Japan
- Prior art keywords
- interrupt
- program
- digital signal
- module
- interrupt 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims description 86
- 238000012545 processing Methods 0.000 claims description 173
- 238000006243 chemical reaction Methods 0.000 claims description 70
- 230000005540 biological transmission Effects 0.000 claims description 17
- 230000001960 triggered effect Effects 0.000 claims description 10
- 230000015654 memory Effects 0.000 description 83
- 238000010606 normalization Methods 0.000 description 29
- 238000004891 communication Methods 0.000 description 14
- 230000004044 response Effects 0.000 description 14
- 230000004043 responsiveness Effects 0.000 description 10
- 238000003860 storage Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 6
- 238000004519 manufacturing process Methods 0.000 description 4
- 238000001514 detection method Methods 0.000 description 3
- 230000006866 deterioration Effects 0.000 description 3
- 230000002542 deteriorative effect Effects 0.000 description 3
- 230000012447 hatching Effects 0.000 description 3
- 230000003111 delayed effect Effects 0.000 description 2
- 238000009434 installation Methods 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000008054 signal transmission Effects 0.000 description 2
- 230000015556 catabolic process Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000020169 heat generation Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 230000035484 reaction time Effects 0.000 description 1
- 230000010076 replication Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Landscapes
- Stored Programmes (AREA)
- Programmable Controllers (AREA)
Description
本発明は、演算モジュールと入力モジュールとを備える制御システムおよび制御方法に関する。 The present invention relates to a control system and a control method including a calculation module and an input module.
大規模な制御システムでは、システムの構築やメンテナンスの容易性の観点から、必要な機能を複数のモジュールに分散させたプログラマブルコントローラを採用することがある。プログラマブルコントローラは、例えば、演算モジュール、通信モジュール、入出力モジュール(入力モジュール+出力モジュール)、電源モジュールといった複数種類のモジュールで構成され、それぞれのモジュール数を制御対象に合わせて変更可能とすることで、メンテナンスやシステムの拡張性を高めている。 A large-scale control system may employ a programmable controller in which necessary functions are distributed to a plurality of modules from the viewpoint of ease of system construction and maintenance. The programmable controller is composed of 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 each module can be changed according to the control target. , Maintenance and system extensibility are enhanced.
プログラマブルコントローラでは、例えば、通信モジュールが、アプリケーションを実行するための実行プログラムを演算モジュールにダウンロードし、演算モジュールが、ダウンロードされた実行プログラムを用い、入出力モジュールを通じて下位の被制御機器から入力データを収集すると共に演算処理を実行し、その演算結果を、入出力モジュールを通じて下位の被制御機器に伝達している(例えば、特許文献1)。 In the programmable controller, for example, the communication module downloads the execution program for executing the application to the arithmetic module, the arithmetic module uses the downloaded execution program, and inputs the input data from the lower controlled device through the input / output module. The data is collected and arithmetic processing is executed, and the arithmetic result is transmitted to a lower controlled device through an input / output module (for example, Patent Document 1).
上述したように、プログラマブルコントローラでは、演算モジュールが実行プログラムを用いて他のモジュールおよび下位の被制御機器を制御する。このような実行プログラムに基づく演算モジュールの処理は、割込条件の成立に基づいて実行される割込処理と、割込処理による時間的な制約を受けない非割込処理とに大別される。演算モジュールでは、非割込処理を周期的に実行しつつ、また、割込条件が成立すると割込処理を優先的に実行し、割込処理以外の有余時間を有効利用して非割込処理を実行していた。 As described above, in the programmable controller, the arithmetic module controls the other modules and the subordinate controlled devices by using the execution program. The processing of the arithmetic module based on such an execution program is roughly classified into an interrupt processing executed based on the satisfaction of an interrupt condition and a non-interrupt processing not subject to the time constraint of the interrupt processing. . The arithmetic module executes non-interrupt processing cyclically, and preferentially executes interrupt processing when the interrupt conditions are met, and effectively uses the extra time other than interrupt processing to perform non-interrupt processing. Was running.
しかし、アプリケーションの多様化に伴い、実行プログラムの容量も増大し、割込処理および非割込処理の処理時間が共に長期化して、想定される処理時間内で完了することが困難となってきた。ここで、単純に非割込処理の周期を長くしてしまうと、情報の更新頻度も低くなるので、被制御機器の制御能力や分解能の劣化を招くことになってしまう。また、割込処理の処理結果も周期的にしか入出力モジュールに伝達されないので、非割込処理の周期の長期化に伴い割込処理の処理結果が伝達されるタイミングも遅くなることとなる。 However, with the diversification of applications, the capacity of the execution program also increases, and the processing time of both interrupt processing and non-interrupt processing becomes long, making it difficult to complete within the expected processing time. . Here, if the cycle of the non-interruption process is simply lengthened, the frequency of updating the information also becomes low, resulting in deterioration of the control capability and resolution of the controlled device. In addition, since the processing result of the interrupt processing is also transmitted to the input / output module only periodically, the timing of transmitting the processing result of the interrupt processing is delayed as the cycle of the non-interrupt processing becomes longer.
そこで、本発明は、このような課題に鑑み、実行プログラムの容量の増大に拘わらず、被制御機器の制御能力や分解能の劣化を防止することが可能な制御システムおよび制御方法を提供することを目的としている。 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 an increase in the capacity of an execution program. Has an aim.
上記課題を解決するために、外部からデータを入力する入力モジュールと、入力モジュールとバスを通じて接続され、入力モジュールから受信したデータに基づいて演算を行う演算モジュールと、を備えた本発明の制御システムでは、制御システムで実行されるプログラムは、割込条件の成立を実行契機とする割込プログラムと、割込プログラムを除いた非割込プログラムとを含んでなり、入力モジュールは、割込プログラムに対応付けられた割込条件が成立しているか否か判定する条件判定部と、割込条件が成立していると判定されると、割込プログラムを実行する割込プログラム実行部と、外部のアナログ信号をデジタル信号に変換するADコンバータと、ADコンバータの変換制御を行うAD制御回路と、を備え、割込プログラム実行部は、割込プログラムの実行途中で任意のデジタル信号が必要になると、AD制御回路にADコンバータの変換制御を実行させ、ADコンバータの変換完了後に、任意のデジタル信号のみ正規化して正規化デジタル信号を生成し、正規化デジタル信号によって割込プログラムを実行し、演算モジュールは、割込プログラム実行部の実行結果を参照し、非割込プログラムを実行する非割込プログラム実行部を備えることを特徴とする。
入力モジュールは、デジタル信号をアナログ信号に変換して外部に出力するDAコンバータと、DAコンバータの変換制御を行うDA制御回路と、を備え、割込プログラム実行部は、割込プログラムの実行途中で任意のデジタル信号が生成されると、任意のデジタル信号のみ非正規化して非正規化デジタル信号を生成し、DA制御回路に、非正規化デジタル信号によってDAコンバータの変換制御を実行させてもよい。
上記課題を解決するために、外部からデータを入力する入力モジュールと、入力モジュールとバスを通じて接続され、入力モジュールから受信したデータに基づいて演算を行う演算モジュールと、を備えた本発明の制御システムでは、制御システムで実行されるプログラムは、割込条件の成立を実行契機とする割込プログラムと、割込プログラムを除いた非割込プログラムとを含んでなり、入力モジュールは、割込プログラムに対応付けられた割込条件が成立しているか否か判定する条件判定部と、割込条件が成立していると判定されると、割込プログラムを実行する割込プログラム実行部と、外部のアナログ信号をデジタル信号に変換するADコンバータと、ADコンバータの変換制御を行うAD制御回路と、を備え、AD制御回路は、所定の周期でADコンバータの変換制御を実行し、変換されたデジタル信号を保持し、割込プログラム実行部は、割込プログラムの実行途中で任意のデジタル信号が必要になると、AD制御回路に保持された任意のデジタル信号のみ正規化して正規化デジタル信号を生成し、正規化デジタル信号によって割込プログラムを実行し、演算モジュールは、割込プログラム実行部の実行結果を参照し、非割込プログラムを実行する非割込プログラム実行部を備えることを特徴とする。
入力モジュールは、デジタル信号をアナログ信号に変換して外部に出力するDAコンバータと、DAコンバータの変換制御を行うDA制御回路と、を備え、割込プログラム実行部は、割込プログラムの実行途中で任意のデジタル信号が生成されると、任意のデジタル信号のみ非正規化して非正規化デジタル信号を生成し、非正規化デジタル信号をDA制御回路に保持させ、DA制御回路は、非正規化デジタル信号によってDAコンバータの変換制御を実行してもよい。
In order to solve the above problems, the control system of the present invention includes an input module that inputs data from the outside, and an arithmetic module that is connected to the input module through a bus and performs an arithmetic operation based on the data received from the input module. Then, the program executed by the control system includes an interrupt program triggered by the satisfaction of the interrupt condition and a non-interrupt program excluding the interrupt program. A condition determination unit that determines whether the associated interrupt condition is satisfied, an interrupt program execution unit that executes the interrupt program when it is determined that the interrupt condition is satisfied, and an external comprising an AD converter for converting an analog signal into a digital signal, and AD control circuit for converting the control of the AD converter, the execution interrupt program When an arbitrary digital signal is required during the execution of the interrupt program, the AD control circuit executes the conversion control of the AD converter, and after the conversion of the AD converter is completed, normalizes only the arbitrary digital signal to obtain a normalized digital signal. Is generated and executes the interrupt program by the normalized digital signal, and the arithmetic module includes a non-interrupt program execution unit that refers to the execution result of the interrupt program execution unit and executes the non-interrupt program. And
The input module includes a DA converter that converts a digital signal into an analog signal and outputs the 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 DA control circuit may be caused to execute the conversion control of the DA converter by the denormalized digital signal. .
In order to solve the above problems, the control system of the present invention includes an input module that inputs data from the outside, and an arithmetic module that is connected to the input module through a bus and performs an arithmetic operation based on the data received from the input module. Then, the program executed by the control system includes an interrupt program triggered by the satisfaction of the interrupt condition and a non-interrupt program excluding the interrupt program. A condition determination unit that determines whether the associated interrupt condition is satisfied, an interrupt program execution unit that executes the interrupt program when it is determined that the interrupt condition is satisfied, and an external The AD control circuit includes an AD converter that converts an analog signal into a digital signal, and an AD control circuit that controls conversion of the AD converter. The conversion control of the AD converter is executed in a cycle of, and the converted digital signal is held. The interrupt program execution unit holds the digital signal in the AD control circuit when an arbitrary digital signal is required during execution of the interrupt program. Generates a normalized digital signal by normalizing only an arbitrary digital signal, executes the interrupt program with the normalized digital signal, and the arithmetic module refers to the execution result of the interrupt program execution unit to execute the non-interrupt program. It is characterized by comprising a non-interruption program execution unit for executing.
The input module includes a DA converter that converts a digital signal into an analog signal and outputs the 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 denormalized digital signal is held in the DA control circuit. The conversion control of the DA converter may be executed by the signal.
所定の契機に、割込プログラムを入力モジュールに複製するプログラム複製部をさらに備えてもよい。 A program duplication unit that duplicates the interrupt program in the input module may be further provided at a predetermined occasion.
所定の契機は、演算モジュールおよび入力モジュールの起動時であり、プログラム複製部は、割込プログラムを、演算モジュールから入力モジュールに複製してもよい。 The predetermined trigger is when the arithmetic module and the input module are activated, and the program duplication 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 processing is completed to the arithmetic module when the interrupt program execution unit completes the interrupt processing based on the interrupt program.
入力モジュールは、第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 has a first bus connecting the arithmetic module and the first input module and a second bus connecting 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 irrespective of 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 via the first bus at predetermined tact times and outputs data to the second input module via the second bus at a predetermined timing regardless of the tact time. May be.
第1バスは、シリアル伝送方式であり、第2バスは、パラレル伝送方式であってもよい。 The first bus may be a serial transmission system and the second bus may be a parallel transmission system.
上記課題を解決するための、外部からデータを入力する入力モジュールと、入力モジュールとバスを通じて接続され、入力モジュールから受信したデータに基づいて演算を行う演算モジュールと、を備える制御システムを用いた本発明の制御方法では、制御システムで実行されるプログラムは、割込条件の成立を実行契機とする割込プログラムと、割込プログラムを除いた非割込プログラムとを含んでなり、入力モジュールが、割込プログラムに対応付けられた割込条件が成立しているか否か判定し、割込条件が成立していると判定すると、割込プログラムを実行し、割込プログラムの実行途中で任意のデジタル信号が必要になると、外部のアナログ信号をデジタル信号に変換するADコンバータの変換制御を行うAD制御回路にADコンバータの変換制御を実行させ、ADコンバータの変換完了後に、任意のデジタル信号のみ正規化して正規化デジタル信号を生成し、正規化デジタル信号によって割込プログラムを実行し、演算モジュールが、割込プログラムの実行結果を参照し、非割込プログラムを実行することを特徴とする。
上記課題を解決するための、外部からデータを入力する入力モジュールと、入力モジュールとバスを通じて接続され、入力モジュールから受信したデータに基づいて演算を行う演算モジュールと、を備える制御システムを用いた本発明の制御方法では、制御システムで実行されるプログラムは、割込条件の成立を実行契機とする割込プログラムと、割込プログラムを除いた非割込プログラムとを含んでなり、入力モジュールが、割込プログラムに対応付けられた割込条件が成立しているか否か判定し、割込条件が成立していると判定すると、割込プログラムを実行し、外部のアナログ信号をデジタル信号に変換するADコンバータの変換制御を行うAD制御回路が、所定の周期でADコンバータの変換制御を実行し、変換されたデジタル信号を保持し、入力モジュールが、割込プログラムの実行途中で任意のデジタル信号が必要になると、AD制御回路に保持された任意のデジタル信号のみ正規化して正規化デジタル信号を生成し、正規化デジタル信号によって割込プログラムを実行し、演算モジュールが、割込プログラムの実行結果を参照し、非割込プログラムを実行することを特徴とする。
A book using a control system including an input module for inputting data from the outside to solve the above problem, and an arithmetic module connected to the input module through a bus and performing an arithmetic operation based on data received from the input module In the control method of the invention, the program executed by the control system includes an interrupt program triggered by the establishment of an interrupt condition and a non-interrupt program excluding the interrupt program, and the input module has: If it is determined whether the interrupt condition associated with the interrupt program is satisfied, and if it is determined that the interrupt condition is satisfied, the interrupt program is executed and any digital signal is executed during execution of the interrupt program. When a signal is required, the AD control circuit performs the conversion control of the AD converter that converts an external analog signal into a digital signal. To execute the conversion control data, after conversion completion of the AD converter to generate a normalized digital signal is normalized only arbitrary digital signals, executing an interrupt program by the normalized digital signals, computation module interrupt program The non-interruption program is executed by referring to the execution result of.
A book using a control system including an input module for inputting data from the outside to solve the above problem, and an arithmetic module connected to the input module through a bus and performing an arithmetic operation based on data received from the input module In the control method of the invention, the program executed by the control system includes an interrupt program triggered by the establishment of an interrupt condition and a non-interrupt program excluding the interrupt program, and the input module has: 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 external analog signal is converted to a digital signal. An AD control circuit that performs conversion control of the AD converter executes conversion control of the AD converter at a predetermined cycle, and the converted digital signal When the input module holds an arbitrary digital signal during the execution of the interrupt program, the input module normalizes only the arbitrary digital signal held in the AD control circuit to generate a normalized digital signal. Is executed, the arithmetic module refers to the execution result of the interrupt program, and executes the non-interrupt program.
本発明によれば、実行プログラムの容量の増大に拘わらず、被制御機器の制御能力や分解能の劣化を防止することが可能となる。 According to the present invention, it is possible to prevent the control capability and resolution of the controlled device from deteriorating regardless of the increase in the capacity of the execution program.
以下に添付図面を参照しながら、本発明の好適な実施形態について詳細に説明する。かかる実施形態に示す寸法、材料、その他具体的な数値などは、発明の理解を容易とするための例示にすぎず、特に断る場合を除き、本発明を限定するものではない。なお、本明細書および図面において、実質的に同一の機能、構成を有する要素については、同一の符号を付することにより重複説明を省略し、また本発明に直接関係のない要素は図示を省略する。 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 embodiments are merely examples for facilitating the understanding of the invention, and do not limit the invention unless otherwise specified. In this specification and the drawings, elements having substantially the same function and configuration are denoted by the same reference numerals to omit redundant description, and elements not directly related to the present invention are omitted. 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
上記管理装置110は、制御システム100全体がアプリケーションに定められた工程に沿って動作するように、複数のプログラマブルコントローラ120を一括して制御する。例えば、管理装置110は、個々のプログラマブルコントローラ120からステータス情報や制御結果を収集したり、その収集した内容に応じて、個々のプログラマブルコントローラ120に各種制御指令を出力したりする。
The
プログラマブルコントローラ120は、PLC(Programmable Logic Controller)とも呼ばれ、図2に示すように、演算モジュール122、通信モジュール124、入出力(I/O)モジュール126、電源モジュール128等の複数のモジュールを含んで構成される。また、各モジュールはベースボードに着脱可能に固定され、電源モジュール128を除く各モジュール同士は、ベースボード上のバスを通じて接続される。かかるバスには、例えば、シリアル伝送方式の第1バス(不図示)や、パラレル伝送方式の第2バス(不図示)が準備されている。本実施形態では、複数の入出力モジュール126が、それぞれ第1バスまたは第2バスのいずれかを通じて演算モジュール122と接続されている。
The
ここで、演算モジュール122は、制御システム100に定められたアプリケーションを実現するために、それぞれのプログラマブルコントローラ120用に分割されたプログラムである実行プログラムを管理装置110からダウンロードし、その実行プログラムを遂行したり、プログラマブルコントローラ120の動作状況を不図示のモニタに表示したりする。その際、管理装置110から受信した制御指令、入出力モジュール126を通じて入力された被制御機器130のセンサ検出結果等に基づいて被制御機器130を制御する。
Here, the
通信モジュール124は、Ethernet(登録商標)によるネットワーク配線140を通じて、管理装置110、他のプログラマブルコントローラ120、および、他のモジュールに接続され、それぞれと通信を確立することができる。
The
入出力モジュール126は、被制御機器130(外部)からの入力管理を行う入力モジュールと、被制御機器130に対する出力管理を行う出力モジュールとを結合したモジュールである。例えば、被制御機器130がセンサであれば、センサ検出結果を収集し、電動機であれば、ディスクリートで表される制御指令を送信するとともに、その制御結果を収集する。電源モジュール128は、演算モジュール122、通信モジュール124、入出力モジュール126等の各モジュールに電力を供給する。
The input /
被制御機器130は、例えば、FA(Factory Automation)における様々な状態を検知するセンサ、そのセンサの検知結果に応じて動作する電動機、エンコーダ等の電気機器で構成される。
The controlled
このような制御システム100は、様々な制御対象に適用できる。例えば、生産実行システム(MES:Manufacturing Execution System)に制御システム100を適用した場合、被制御機器130としての、モーションコントロールユニット(Motion Control Unit)、センタシーラユニット(Center Sealer Unit)、および、フィルムユニット(Film Unit)等の生産機器にプログラマブルコントローラ120を接続する。そして、プログラマブルコントローラ120の演算モジュール122は、入出力モジュール126から生産機器の動作状態を入力データとして取り込み、実行プログラムを用いて入力データを処理した後、入出力モジュール126を通じて生産機器への指令を行う。このようなアプリケーションは、以下のような実行プログラムにより実現される。
Such a
図3は、実行プログラムに基づく処理のタイミングを説明するためのタイミングチャートである。一般的に、実行プログラムに基づく演算モジュール122の処理は、入出力モジュール126における割込条件の成立に基づいて実行される割込処理(割込条件の成立を実行契機とする処理)と、割込処理による時間的な制約を受けない非割込処理とに大別される。ここでは、割込処理に用いられるプログラムを割込プログラム、非割込処理に用いられるプログラムを非割込プログラムとする。なお、本実施形態では、割込条件として、入出力モジュール126への入力状態(例えば、離散信号の状態やカウント値)に基づく条件について説明する。
FIG. 3 is a timing chart for explaining the timing of processing based on the execution program. In general, the processing of the
演算モジュール122は、例えば、図3(a)に示すように、非割込プログラムを用いて非割込処理を周期的に(例えばタクトタイム20msec毎に)実行し、周期の始めにデータを入力し、周期の終わりにその処理結果を出力する。ここで、入出力モジュール126において割込条件が成立すると、図3(a)のように、演算モジュール122は、割込プログラムを用いて割込処理を優先的に実行し、割込処理以外の有余時間を有効利用して、非割込処理を実行する。具体的には、割込処理が発生すると、その割込処理が終了するまで非割込処理が中断され、割込処理終了後に非割込処理が再開される。そして、周期の終わりに、割込処理および非割込処理の処理結果が出力される。
The
しかし、アプリケーションの多様化に伴い、そのアプリケーションを実現するための実行プログラムの容量が増大すると、図3(b)のように、割込処理に費やす時間が長くなり、有余時間が短くなる。一方、割込処理と同様に、非割込処理に費やす時間も長くなるが、短くなった有余時間内では処理を完了することができなくなる。ここで、単純に非割込処理を実行する周期を長くすると、有余時間の長期化は図れるが、情報の更新頻度が低くなり、被制御機器130の制御能力や分解能の劣化を招くこととなる。特に、割込処理の処理結果も周期的にしか(周期の終わりにしか)入出力モジュール126に伝達されないので、所定の上下限値に達すると制御方式を変更するような即時反応を要する割込処理の場合でも、非割込処理の周期の長期化に伴い、その反応が遅くなってしまう。
However, when the capacity of the execution program for realizing the application increases with the diversification of the application, as shown in FIG. 3B, the time spent for interrupt processing becomes long and the surplus time becomes short. On the other hand, similarly to the interrupt processing, the time spent for the non-interrupt processing becomes long, but the processing cannot be completed within the shortened dead time. Here, if the cycle of executing the non-interruption process is simply lengthened, the surplus time can be lengthened, but the frequency of updating information becomes low, and the controllability and resolution of the controlled
そこで、本実施形態では、割込処理の一部または全部を他のモジュール(ここでは入出力モジュール126)で行い、演算モジュール122では、主として非割込処理を行うことで(残った割込処理も含む)、分散処理を実現する。例えば、図3(c)のように、突発的に発生する割込処理を入出力モジュール126内で完結的に実行し、並行して、非割込処理を演算モジュール122で周期的に実行する。かかる構成により、即時反応を要する割込処理が生じた場合でも、演算モジュール122における非割込処理の周期の影響を受けることなく、入出力モジュール126内で割込処理を迅速に実行し、その結果を即座に反映できるので、実行プログラムの容量の増大に拘わらず、被制御機器130の制御能力や分解能の劣化を防止することが可能となる。
Therefore, in the present embodiment, some or all of the interrupt processing is performed by another module (here, the input / output module 126), and the
また、本実施形態では、このような割込処理を行う割込プログラムを起動時等、所定の契機に自動的に入出力モジュール126に配置する。かかる構成により、個々のモジュールへの煩雑なインストール作業を回避できるとともに、入出力モジュール126を新設または交換した場合においても当該割込処理を即座に開始することが可能となる。以下、かかる目的を実現する演算モジュール122および入出力モジュール126のハードウェア構成を詳述する。
Further, in the present embodiment, an interrupt program for performing such an interrupt process is automatically arranged in the input /
(演算モジュール122)
図4は、演算モジュール122のハードウェア構成の一例を示す図である。図4に示す演算モジュール122は、I/F部150と、不揮発性メモリ152と、共有メモリ154と、固有メモリ156と、制御部158とを含んで構成される。
(Operation module 122)
FIG. 4 is a diagram illustrating an example of the hardware configuration of the
I/F部150は、第1バスや第2バスを通じて、通信モジュール124および入出力モジュール126と通信を確立し、その通信モジュール124を通じて、管理装置110、他のプログラマブルコントローラ120と通信することができる。
The I /
不揮発性メモリ152は、ROM、EEPROM、フラッシュメモリ、HDD等の記憶媒体で構成され、コンピュータを動作させる基本プログラムであるシステムプログラム、ならびに、実行プログラム(非割込プログラムおよび割込プログラム)を保持する。共有メモリ154は、RAM等の記憶媒体で構成され、入力データや、制御部158が非割込プログラムを遂行することにより更新される出力データを記憶する。なお、I/F部150と、不揮発性メモリ152と、共有メモリ154とは、共通バス160によりアクセス可能に接続されている。したがって、不揮発性メモリ152や共有メモリ154は、他のモジュールからのアクセスも受け付ける。
The
例えば、共有の作業領域として利用可能なメモリ領域が各モジュールに分割して割り当てられる場合、割り当てられたメモリ領域に共有メモリ154を対応付ける。したがって、演算モジュール122に割り当てられたメモリ領域には、他のモジュールのメモリが存在せず、当該メモリ領域にアクセスすると、唯一、演算モジュール122の共有メモリ154のみデータを読み出しまたは書き込みできる。
For example, when a memory area that can be used as a shared work area is divided and assigned to each module, the shared memory 154 is associated with the assigned memory area. Therefore, the memory area allocated to the
固有メモリ156は、共有メモリ154同様、RAM等の記憶媒体で構成され、入力データや、制御部158が非割込プログラムを遂行することにより更新される内部データを記憶する。ただし、固有メモリ156は、共通バス160に接続されておらず、制御部158からのみアクセス可能となる。このようなメモリへのアクセス制限は、FPGA(Field-Programmable Gate Array)等を用いたデコーダによって実現できる。
Like the shared memory 154, the
制御部158は、中央処理装置(CPU)等を含む半導体集積回路で構成され、非割込プログラムを不揮発性メモリ152から読み出し、固有メモリ156に展開して非割込処理を実行する。そして、制御部158は、プログラム複製部170、非割込プログラム実行部172、履歴管理部174といった機能部として機能する。かかる機能部の動作については後程詳述する。
The
(入出力モジュール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 showing an example of the hardware configuration of the input /
I/F部180は、第1バスや第2バスを通じて、演算モジュール122、通信モジュール124および入出力モジュール126と通信を確立する。
The I /
不揮発性メモリ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
固有メモリ186は、共有メモリ184同様、RAM等の記憶媒体で構成され、入力データや、制御部190が割込プログラムを遂行することにより更新される内部データを記憶する。ただし、固有メモリ186は、共通バス192に接続されておらず、制御部190からのみアクセス可能となる。
Like the shared memory 184, the
入出力部188は、被制御機器130に接続され、被制御機器130との通信および信号伝達を行う。例えば、入出力部188は、FPGA、ADコンバータ、DAコンバータ、フォトカプラ、トランジスタ等で構成され、アナログ信号、デジタル信号、矩形波(カウンタ入力)等を入出力する。特に、アナログ信号については、後述するように、ADコンバータ、DAコンバータに対する個々の変換制御をFPGAで行うことで、処理負荷の分散を果たしている。
The input /
制御部190は、演算モジュール122とスペックが同等の中央処理装置(CPU)等を含む半導体集積回路で構成され、割込プログラムを共有メモリ184から読み出し、固有メモリ186に展開して割込処理を実行する。そして、制御部190は、条件判定部200、割込プログラム実行部202、履歴通知部204といった機能部としても機能する。かかる機能部の動作については後程詳述する。以下、割込プログラムの入出力モジュール126への複製処理や割込処理を遂行するための、演算モジュール122および入出力モジュール126の処理の流れを説明する。
The
(プログラム複製処理S300)
図6は、演算モジュール122および入出力モジュール126の処理(制御方法)の流れを説明するタイミングチャートである。当該制御システム100が起動され、演算モジュール122および入出力モジュール126に電力の供給が開始されると、演算モジュール122の制御部158や入出力モジュール126の制御部190は、それぞれ、システムプログラムを固有メモリ156、186に展開し、演算モジュール122のプログラム複製部170は、かかる起動を契機に、不揮発性メモリ152に記憶している実行プログラムのうち割込プログラムを入出力モジュール126に複製する(S300)。なお、不揮発性メモリ152内の割込プログラムは、当該複製によって削除されず、そのまま保持される。
(Program duplication processing S300)
FIG. 6 is a timing chart illustrating the flow of processing (control method) of the
図7は、プログラム複製部170の処理を説明するための説明図である。例えば、当該制御システム100における実行プログラムは、それぞれが独立した(他のプログラムの影響を受けない)6つのプログラムに分割することができ、その内訳は、非割込プログラム3つと、割込プログラム3つであるとする。ただし、この時点では、6つのプログラムは、それぞれコンパイルが完了し、実行形式となっている。プログラム複製部170は、このうち3つの割込プログラムを、その割込プログラムが制御対象としている被制御機器130に接続された入出力モジュール126にそれぞれ複製する。
FIG. 7 is an explanatory diagram for explaining the processing of the
ここで、割込プログラムには、それぞれ、割込処理に関する情報である複製ステータスが付されている。したがって、プログラム複製部170は、割込プログラムに付されている複製ステータスを読み出し、複製先として入出力モジュール126の識別子が登録されていれば、その識別子によって特定される入出力モジュール126に、当該複製ステータスに対応付けられた割込プログラムを複製する。入出力モジュール126では、演算モジュール122から受信した割込プログラムを共有メモリ184の所定のメモリ位置に保持させる。なお、複製ステータスには、識別子の他、割込ポート番号と、割込条件も含まれている。ここで、割込ポート番号は、入出力部188における割込対象となるポート(割込端子)の番号を示し、割込条件は、割込を発生させる条件、例えば、割込ポート番号に入力された離散信号がTRUEかFALSEか、もしくは、サーボ等の出力信号を計数したカウント値が所定の値に到達したか等の条件を示す。
Here, each interrupt program is provided with a copy status, which is information about the interrupt process. Therefore, the
図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
続いて、プログラム複製部170は、各割込プログラムの作業領域となるメモリ領域を確保する。具体的に、プログラム複製部170は、図7のように、割込プログラム(1)を入出力モジュール(1)の共有メモリ184に複製するとともに、その割込プログラム(1)に対し予め定められた容量のメモリ領域(1)を入出力モジュール(1)の共有メモリ184内に確保する。同様に、プログラム複製部170は、割込プログラム(2)に対し予め定められた容量のメモリ領域(2)を入出力モジュール(1)の共有メモリ184内に確保し、割込プログラム(3)に対し予め定められた容量のメモリ領域(3)を入出力モジュール(2)の共有メモリ184内に確保する。
Subsequently, the
(非割込プログラム設定処理S302)
図8は、非割込プログラム実行部172と割込プログラム実行部202の処理の流れを説明するための説明図である。上述したように割込プログラムの複製が完了すると、演算モジュール122の非割込プログラム実行部172は、非割込プログラムの実行準備を行う。具体的に、非割込プログラム実行部172は、図8に示すように、非割込プログラム(1)〜(3)を不揮発性メモリ152から読み出し、固有メモリ156に展開する。
(Non-interruption program setting process S302)
FIG. 8 is an explanatory diagram for explaining the processing flow of the non-interruption program execution unit 172 and the interruption
(割込プログラム設定処理S304)
同様に、上述したように割込プログラムの複製が完了すると、入出力モジュール126の割込プログラム実行部202は、割込プログラムの実行準備を行う。具体的に、図8に示すように、入出力モジュール(1)の割込プログラム実行部202は、割込プログラム(1)、(2)を共有メモリ184から読み出し、固有メモリ186に展開する。同様に、入出力モジュール(2)の割込プログラム実行部202は、割込プログラム(3)を共有メモリ184から読み出し、固有メモリ186に展開する。
(Interrupt program setting process S304)
Similarly, when the duplication of the interrupt program is completed as described above, the interrupt
(非割込プログラム実行処理S310)
続いて、非割込プログラム実行部172は、固有メモリ156に展開された非割込プログラムを用い非割込プログラムを実行する。ここで、非割込プログラム実行部172は、必要に応じて、後述する入出力モジュール126の割込プログラム実行部202の実行結果を参照し(共有メモリ184からデータを読み出し)、例えば20msec毎に当該非割込プログラムの実行結果を導出する。
(Non-interrupt program execution process S310)
Subsequently, the non-interruption program execution unit 172 executes the non-interruption program using the non-interruption program expanded in the
(条件判定処理S312)
条件判定部200は、割込プログラムに対応付けられた割込条件が成立しているか否か判定する。図7の複製ステータスを参照すると、本実施形態では、割込プログラム(1)〜(3)に、それぞれ割込条件「1234」、「TRUE」、「5678」が対応付けられている。したがって、入出力モジュール(1)の条件判定部200は、割込ポート番号「1」で特定される、サーボ等の動作に応じて積算されたカウント値を参照し、そのカウント値が「1234」と一致すると、割込プログラム(1)の割込条件が成立したと判定する。そして、一度、割込条件が成立したと判定するとカウント値を0にリセットする。
(Condition determination processing S312)
The
同様に、入出力モジュール(1)の条件判定部200は、割込ポート番号「3」で特定される離散信号を参照し、その離散信号がTRUEであれば、割込プログラム(2)の割込条件が成立したと判定する。また、入出力モジュール(2)の条件判定部200は、割込ポート番号「1」で特定される、サーボ等の動作に応じて積算されたカウント値を参照し、そのカウント値が「5678」と一致すると、割込プログラム(3)の割込条件が成立したと判定する。
Similarly, the
(割込プログラム実行処理S314)
割込プログラム実行部202は、条件判定部200が所定の割込条件が成立していると判定すると、その割込条件に対応する割込プログラムを実行する。例えば、入出力モジュール(1)の条件判定部200が、割込ポート番号「1」で特定されるカウント値が「1234」に到達したと判定すると、割込プログラム実行部202は、割込プログラム(1)を実行する。そして、割込プログラム実行部202は、割込プログラム(1)に基づく割込処理の処理結果を、プログラム複製部170が共有メモリ184内に確保したメモリ領域(1)に記憶する。こうして、演算モジュール122の非割込プログラム実行部172は、任意のタイミングで、共有メモリ184から処理結果を読み出すことが可能となる。
(Interrupt program execution process S314)
When the
ここで、割込プログラム実行部202は、非割込プログラム実行部172による周期的な処理の制限を受けることなく、独立かつ最優先に割込プログラムを実行し、その処理結果を迅速に反映することができる。したがって、例えば、所定の上下限値に達すると制御方式を変更するような即時反応を要する割込処理については、反応時間の短縮化を図ることが可能となる。また、非割込プログラム実行部172による制限を受けない(非割込処理の周期の影響を受けない)ので、非割込処理の周期より短い時間で割込処理を繰り返し実行することもでき、割込処理を高頻度で実現することも可能となる。こうして、実行プログラムの容量の増大に拘わらず、被制御機器130の制御能力や分解能の劣化を防止することができる。
Here, the interrupt
また、入出力モジュール126に離散信号による割込が発生した場合、本来、入出力モジュール126が、一旦、離散信号をバス信号に置き換えて演算モジュール122に伝達し、演算モジュール122で、その条件を判定した上で割込処理を行っていたところ、本実施形態では、バス信号に置き換えることなく、入出力モジュール126内で処理を完結することができるので、割込処理に費やす時間自体を短縮することができる。
Also, when an interrupt due to a discrete signal occurs in the input /
(履歴通知処理S316)
履歴通知部204は、割込プログラム実行部202が割込プログラムに基づく割込処理を完了すると、それに伴って、割込処理が完了した旨の情報を演算モジュール122に送信する。これは、演算モジュール122において、割込処理が想定通りに遂行されているか否か管理するためである。
(History notification processing S316)
When the interrupt
(履歴管理処理S318)
履歴管理部174は、履歴通知部204から割込処理が完了した旨の情報を受信すると、それを履歴(ログ)として管理し、割込処理の数やタイミングが、想定された範囲に収まるか否か判定し、想定された範囲を逸脱すると、割込処理にエラーが生じたとして、エラー処理を行う。
(History management process S318)
When the
以上、説明した制御システム100では、実行プログラムを、演算モジュール122と入出力モジュール126で分散処理することで、たとえ、実行プログラムの容量が増大したとしても、演算モジュール122の処理負荷を増大させることなく、かつ、割込処理を非割込処理から独立したタイミングで迅速に実行することができ、被制御機器130の制御能力や分解能の劣化を防止することが可能となる。
In the
また、このような割込処理を行う割込プログラムを起動時に自動的に入出力モジュール126に配置しているので、個々のモジュールへの煩雑なインストール作業を回避できるとともに、入出力モジュール126を新設または交換した場合においても当該割込処理を即座に開始することが可能となる。したがって、既存の入出力モジュール126を、実行プログラムがインストールされていない出荷状態の入出力モジュール126と交換したとしても、既存の入出力モジュール126と同状態を迅速に復元できるので、メンテナンス性を高めることができる。
In addition, since the interrupt program for performing such interrupt processing is automatically arranged in the input /
(第2の実施形態)
このように、演算モジュール122で本来実行すべき処理を入出力モジュール126に分散することで、演算モジュール122自体の処理負荷を低減することができる。しかし、その一方で、演算モジュール122で低減された処理負荷分、入出力モジュール126の処理負荷が増大する場合がある。そこで、入出力モジュール126における、特に、ADコンバータやDAコンバータに割く処理負荷を低減し、入出力モジュール126の処理負担を低減する。
(Second embodiment)
In this way, by distributing the processing that should originally be executed by the
図9は、入出力部188の構成を示したブロック図である。入出力モジュール126の入出力部188は、ADコンバータ220、DAコンバータ222、FPGA224、を含んで構成される。
FIG. 9 is a block diagram showing the configuration of the input /
ADコンバータ220は、外部のアナログ信号をデジタル信号に変換する。DAコンバータ222は、デジタル信号をアナログ信号に変換して外部に出力する。FPGA224は、ADコンバータ220の変換制御を行うAD制御回路224aやDAコンバータの変換制御を行うDA制御回路224bとしても機能する。また、AD制御回路224aには、ADコンバータ220で変換されたデジタル信号を保持するバッファが設けられ、DA制御回路224bには、DAコンバータ222の変換対象となるデジタル信号を保持するバッファが設けられている。
The
図10は、割込プログラムの処理の一例を示したタイミングチャートである。図10の例では、AD制御回路224aやDA制御回路224bが主体となり、所定の周期(例えば、25μsec)でAD変換およびDA変換を繰り返し、その途中でADコンバータ220によってデジタル信号が生成されたことを契機に割込プログラムが実行される。
FIG. 10 is a timing chart showing an example of the processing of the interrupt program. In the example of FIG. 10, the
具体的に、AD制御回路224aは、所定の周期に基づく、例えば時点(a)でADコンバータ220の変換制御を開始し、変換されたデジタル信号を保持し、時点(b)において、制御部190を通じ、デジタル信号を正規化して正規化デジタル信号を生成する。
Specifically, the
かかる正規化は、以下の処理を含む。すなわち、AD制御回路224aは、制御部190を通じて、ADコンバータ220のハードフェア特性であるオフセットおよびゲインを調整するアナログ値調整処理、ADコンバータ220の出力値(例えば65536)を割込プログラムの利用範囲(例えば10000)に変換するスケール変換処理、過去の複数(例えば8や16)のデジタル値の平均を示す移動平均処理を行う。
Such normalization includes the following processes. That is, the
なお、ここで用いられるADコンバータ220は複数(例えば4つ)のチャンネルを有しており、割込プログラムによってどのチャンネルのデジタル値が利用されるか把握できないため、正規化は複数のチャンネル全てに対して行われ、その総時間はチャンネル数分だけ長くなる。
Since the
そして、AD変換に対する一通りの処理が終了すると、DA制御回路224bは、時点(c)において、DA制御回路224bのバッファに保持されたデジタル信号を、制御部190を通じて非正規化して非正規化デジタル信号を生成し、非正規化デジタル信号によってDAコンバータ222の変換制御を実行する。こうして、DAコンバータ222からアナログ信号が出力される。
Then, when a series of processes for AD conversion is completed, the
かかる非正規化は、以下の処理を含む。すなわち、DA制御回路224bは、制御部190を通じて、割込プログラムの利用範囲(例えば10000)をDAコンバータ222の出力値(例えば65536)に変換するスケール変換処理、DAコンバータ222のハードフェア特性であるオフセットおよびゲインを調整するアナログ値調整処理を行う。
Such denormalization includes the following processes. That is, the
なお、ここで用いられるDAコンバータ222は複数(例えば4つ)のチャンネルを有しており、割込プログラムによってどのチャンネルの出力を要するか把握できないため、非正規化は複数のチャンネル全てに対して行われ、その総時間はチャンネル数分だけ長くなる。
Since the
このように、所定の周期でAD変換およびDA変換が繰り返される途中、AD制御回路224aが主体となり、割込プログラムを動作させる。具体的に、AD制御回路224aは、正規化デジタル信号を生成したことを契機に、制御部190に割込処理をかけ、時点(d)から割込プログラム実行部202に、割込プログラムを実行させる。そして、割込プログラムにおいて、当該正規化デジタル信号の処理が終了すると、時点(e)において、DA制御回路224bに正規化デジタル信号を保持させ、DA制御回路224bが、割込プログラムの処理結果をDAコンバータ222に反映する。
In this way, the
しかし、制御部190においては、ADコンバータ220やDAコンバータ222を正確な時間で周期的に行うため、デジタル信号の全チャンネル分の正規化処理や非正規化処理が優先される。したがって、非同期の割込プログラムは、図10においてハッチングで示されるように、デジタル信号の正規化処理や非正規化処理と排他的に実行されるので、その結果、割込プログラムの中断、再開を繰り返し、割込プログラムが完了するまでの時間が長期化し、ひいては、DAコンバータ222に処理結果が反映される時間が遅延する。
However, in the
そこで、本実施形態では、デジタル信号の正規化処理や非正規化処理を必要最小限に留め、かつ、正規化処理や非正規化処理を実行する場合であっても必要なチャンネルのみに限定することで、その分、割込プログラムに時間を解放する。 Therefore, in the present embodiment, the normalization process and the non-normalization process of the digital signal are kept to a necessary minimum, and even when the normalization process and the non-normalization process are executed, only the necessary channels are limited. This frees up time for the interrupt program.
図11は、割込プログラムの処理の他の例を示したタイミングチャートである。図11の例では、制御部190の割込プログラム実行部202が主体となり、割込プログラムの要求に応じて必要最小限のAD変換およびDA変換を行う。
FIG. 11 is a timing chart showing another example of the processing of the interrupt program. In the example of FIG. 11, the interrupt
具体的に、割込プログラム実行部202は、割込プログラムの実行途中の時点(a)で任意のデジタル信号が必要になると、例えば、ADコンバータ220に接続されたアナログ信号のアドレスに対してアクセスを検出すると、AD制御回路224aにADコンバータ220の変換制御を実行させる。こうして時点(b)からAD変換が開始される。
Specifically, when the interrupt
そして、ADコンバータの変換が完了すると、AD制御回路224aは、時点(c)において、変換されたデジタル信号を保持し、制御部190を通じ、デジタル信号を正規化して正規化デジタル信号を生成する。かかる正規化は、図10を用いて説明したのと同様、アナログ値調整処理、スケール変換処理、移動平均処理からなる。
Then, when the conversion of the AD converter is completed, the
ただし、ここでは、ADコンバータ220に複数備わっているチャンネルのうち、デジタル信号が必要なチャンネルのみを正規化する。したがって、その正規化処理に費やされる処理時間は図10と比べて1/チャンネル数(ここでは1/4)となる。これは、以下の理由による。すなわち、従来のように、割込処理を演算モジュール122で実行すると、デジタル信号が必要な入出力が、入出力モジュール126のいずれのチャンネルに対応するか演算モジュール122では把握できなかったところ、図11の例では、割込処理を入出力モジュール126自体で実行しているので、デジタル信号が必要な入出力とチャンネルとの対応を把握可能となったからである。
However, here, of the plurality of channels provided in the
続いて、割込プログラム実行部202は、正規化デジタル信号によって割込プログラムを実行し、時点(d)において、処理結果として任意のデジタル信号が生成されると、任意のデジタル信号を非正規化して非正規化デジタル信号を生成し、DA制御回路224bのバッファに保持させる。かかる非正規化は、図10を用いて説明したのと同様、スケール変換処理、アナログ値調整処理からなる。
Subsequently, the interrupt
ただし、ここでは、DAコンバータ222に複数備わっているチャンネルのうち、デジタル信号を出力する対象となっているチャンネルのみを非正規化する。したがって、その非正規化処理に費やされる処理時間は図10と比べて1/チャンネル数(ここでは1/4)となる。
However, here, of the plurality of channels provided in the
最後に、割込プログラム実行部202は、時点(e)において、DA制御回路224bに、非正規化デジタル信号によってDAコンバータ222の変換制御を実行させる。こうして、DAコンバータ222からアナログ信号が出力される。
Finally, the interrupt
かかる図11の処理では、図10での処理と比べ、AD変換やDA変換を周期的に行っていないので、そのAD変換やDA変換に伴うデジタル信号の正規化処理や非正規化処理が行われない。また、制御部190が主体となり、必要なチャンネルのみ正規化処理や非正規化処理を実行し、他のチャンネルについての正規化処理や非正規化処理を実行していない(前回値をそのまま利用する)。
In the processing of FIG. 11, compared with the processing of FIG. 10, since AD conversion and DA conversion are not periodically performed, normalization processing and denormalization processing of digital signals accompanying the AD conversion and DA conversion are performed. I don't know. In addition, the
したがって、図11にハッチングで示すように、正規化処理や非正規化処理によって割込プログラムが中断させられることもなく、割込プログラムが図10に比べて短時間で終了することが理解できる。このように、図11の例では、割込プログラムの実行時間を確保し、資源の有効利用を図ることができる。 Therefore, as shown by hatching in FIG. 11, it can be understood that the interrupt program is not interrupted by the normalization process or the non-normalization process, and the interrupt program ends in a shorter time than in FIG. 10. As described above, in the example of FIG. 11, it is possible to secure the execution time of the interrupt program and effectively use the resources.
また、他の処理でも、デジタル信号の正規化処理や非正規化処理を必要最小限に留め、かつ、正規化処理や非正規化処理を実行する場合であっても必要なチャンネルのみに限定することで、その分、割込プログラムに処理時間を解放することができる。 Also, in other processing, the normalization processing and the non-normalization processing of the digital signal are kept to a minimum, and even when the normalization processing and the non-normalization processing are executed, they are limited to only the necessary channels. As a result, the processing time can be released to the interrupt program.
図12は、割込プログラムの処理のさらに他の例を示したタイミングチャートである。図12の例では、AD制御回路224aやDA制御回路224bが主体となり、所定の周期(例えば、25μsec)でAD変換およびDA変換を繰り返しつつ、その途中で、制御部190の割込プログラム実行部202が主体となり、割込プログラムの要求に応じてデジタル信号の処理を行う。
FIG. 12 is a timing chart showing still another example of the processing of the interrupt program. In the example of FIG. 12, the
具体的に、AD制御回路224aは、所定の周期に基づく、例えば時点(a)において、ADコンバータ220の変換制御を開始し、変換されたデジタル信号をバッファに保持する。また、DA制御回路224bは、AD制御回路224aと独立した所定の周期に基づく、例えば時点(b)において、DA制御回路224bのバッファに保持された非正規化デジタル信号によってDAコンバータ222の変換制御を実行する。こうして、DAコンバータ222からアナログ信号が出力される。ここでは、正規化処理および非正規化処理を除くAD変換およびDA変換が周期的に行われる。
Specifically, the
そして、制御部190の割込プログラム実行部202は、割込プログラムの実行途中の時点(c)で任意のデジタル信号が必要になると、例えば、ADコンバータ220に接続されたアナログ信号のアドレスに対してアクセスを検出すると、時点(d)において、AD制御回路224aに保持された、変換後の最新のデジタル信号を読み出し、デジタル信号を正規化して正規化デジタル信号を生成する。かかる正規化は、図10を用いて説明したのと同様、アナログ値調整処理、スケール変換処理、移動平均処理からなる。ここで、時点(d)では、ADコンバータ220が次の変換を開始しているが、変換結果が生成されていないので、前回の変換結果が用いられる。
Then, the interrupt
ただし、ここでも、ADコンバータ220に複数備わっているチャンネルのうち、デジタル信号が必要なチャンネルのみを正規化する。したがって、その正規化処理に費やされる処理時間は図10と比べて1/チャンネル数(ここでは1/4)となる。
However, also here, of the plurality of channels provided in the
続いて、割込プログラム実行部202は、正規化デジタル信号によって割込プログラムを実行し、時点(e)において、処理結果として任意のデジタル信号が生成されると、任意のデジタル信号を非正規化して非正規化デジタル信号を生成し、DA制御回路224bのバッファに保持させる。かかる非正規化は、図10を用いて説明したのと同様、スケール変換処理、アナログ値調整処理からなる。
Subsequently, the interrupt
ただし、ここでも、DAコンバータ222に複数備わっているチャンネルのうち、デジタル信号を出力する対象となっているチャンネルのみを非正規化する。したがって、その非正規化処理に費やされる処理時間は図10と比べて1/チャンネル数(ここでは1/4)となる。
However, also here, of the plurality of channels provided in the
そして、DA制御回路224bは、バッファに保持している非正規化デジタル信号によってDAコンバータ222の変換制御を実行させる。
Then, the
かかる図12の処理でも、図10の処理と比べ、デジタル信号の正規化処理や非正規化処理を周期的に行っていない。また、制御部190が主体となって実行されるAD変換やDA変換においては、必要なチャンネルのみ正規化処理や非正規化処理を実行し、他のチャンネルについての正規化処理や非正規化処理を実行していない(前回値をそのまま利用する)。
Even in the process of FIG. 12, the normalizing process and the denormalizing process of the digital signal are not periodically performed as compared with the process of FIG. Further, in AD conversion and DA conversion mainly performed by the
したがって、図12にハッチングで示すように、正規化処理や非正規化処理によって割込プログラムが中断させられることもなく、かつ、AD変換を待つことすらないので、割込プログラムが、図10や図11に比べて短時間で終了することが理解できる。このように、図12の例では、割込プログラムの実行時間を確保し、資源のさらなる有効利用を図ることができる。 Therefore, as shown by hatching in FIG. 12, the interrupt program is not interrupted by the normalization process or the non-normalization process, and the AD conversion is not waited. It can be understood that the processing is completed in a shorter time than in FIG. As described above, in the example of FIG. 12, the execution time of the interrupt program can be secured and the resources can be used more effectively.
また、正規化処理や非正規化処理の負荷が最小化されるので、制御部190の駆動時間が短くなり、発熱や消費電力を抑えることもできる。
Moreover, since the load of the normalization process and the non-normalization process is minimized, the drive time of the
(第3の実施形態)
図3でも説明したように、実行プログラムは、割込プログラムと非割込プログラムに大別され、割込プログラムに基づく割込処理については、入出力モジュール126に完結的に割り当てることができる。そして、演算モジュール122は、非割込プログラムに基づく非割込処理によって入出力モジュール126から割込処理の結果を取得することができる。
(Third Embodiment)
As described with reference to FIG. 3, the execution program is roughly divided into the interrupt program and the non-interrupt program, and the interrupt processing based on the interrupt program can be completely assigned to the input /
図13は、非割込処理の一例を説明するためのタイミングチャートである。まず、入出力モジュール126の割込プログラム実行部202は、時点(a)において割込処理が発生すると、割込プログラムに基づいて演算処理を実行し、その処理結果を、時点(b)において、共有メモリ184に保持する。
FIG. 13 is a timing chart for explaining an example of non-interrupt processing. First, when the interrupt process occurs at the time point (a), the interrupt
続いて、演算モジュール122は、周期的に、非割込プログラムに基づく非割込処理を実行し、その開始時点(c)において、入出力モジュール126の共有メモリ184から入力データを取得する。そして、非割込プログラムの実行途中の時点(d)で当該入力データを演算し、その演算結果である出力データを、周期の終了時点(e)において、共有メモリ184に保持する。最後に、入出力モジュール126の割込プログラム実行部202は、任意の時点(f)において共有メモリ184から出力データを取得する。
Subsequently, the
このように、周期的に非割込処理を実行することで、データの入出力をタクトタイムに正確に同期させることが可能となる。しかし、入力データが生成されてから非割込プログラムで処理される入力応答時間や、非割込プログラムで処理されてから出力データが反映されるまでの出力応答時間は長くなってしまう。このような入力応答時間や出力応答時間は、タクトタイムに影響を受けている。例えば、入出力モジュール126の数や、入出力モジュール126で用いる入出力数が増加し、それに応じて非割込処理が長くなると、タクトタイムを長くせざるを得なくなり、それに伴って、入力応答時間や出力応答時間も長期化する。そうすると、制御システム100全体の制御精度や応答性が低下するおそれがある。
As described above, by periodically executing the non-interruption process, it becomes possible to accurately synchronize the input / output of data with the takt time. However, the input response time after the input data is generated and processed by the non-interrupt program, and the output response time after the non-interrupt program is processed until the output data is reflected become long. Such input response time and output response time are affected by the takt time. For example, if the number of input /
ここで、入出力の即応性が必要となる場合、プログラマブルコントローラ120を別途独立して設け、その独立したプログラマブルコントローラ120において、演算処理や入出力数を必要最小限に抑え、タクトタイムを短縮して高速に入出力処理を実行し、その結果を、通信モジュール124を介して送受信することも考えられる。しかし、かかる手法では制御システム100が大規模化してしまう。
Here, when input / output responsiveness is required, the
そこで、プログラマブルコントローラ120内で、即応性より同期性を優先する処理と、同期性より即応性を優先する処理とを分け、それぞれにバスおよび入出力モジュール126を個別に割り当てる。具体的には、上述したように、ベースボードにシリアル伝送方式の第1バスや、パラレル伝送方式の第2バスといった複数のバスを準備し、それぞれ異なる複数の入出力モジュール126に接続する。ここでシリアル伝送方式は、データのビット数未満のラインに対し1ビットずつ順番に情報を伝達する方式であり、パラレル伝送方式は、少なくともデータのビット数のラインに対し、全ての情報を各ラインに並行して同時に伝送する方式をいう。
Therefore, in the
例えば、任意の入出力モジュール126(以下、単に第1入出力モジュールという)は、第1バスのみを通じて演算モジュール122と接続し、任意の他の入出力モジュール126(以下、単に第2入出力モジュールという)は、第2バスのみを通じて演算モジュール122と接続する。そして、第1バスを通じた第1入出力モジュール(第1入力モジュール)については、図13のように周期的に処理し、第2バスを通じた第2入出力モジュール(第2入力モジュール)については、以下に示すように高速処理を行い、かかる同期性を優先する処理と即応性を優先する処理とを並行して実行する。
For example, the arbitrary input / output module 126 (hereinafter, simply referred to as the first input / output module) is connected to the
図14は、非割込処理の他の例を説明するためのタイミングチャートである。ここでは、図13を用いて説明した周期的な処理ではなく、データが生成されたタイミングで処理を開始する割込処理が行われる。入出力モジュール126の割込プログラム実行部202は、時点(a)において割込処理が発生すると、割込プログラムに基づいて演算処理を実行し、その処理結果を、時点(b)において、共有メモリ184に保持し、演算モジュール122に、入力データの準備ができた旨伝達する(割込通知)。
FIG. 14 is a timing chart for explaining another example of the non-interrupt processing. Here, instead of the periodical processing described with reference to FIG. 13, an interrupt processing for starting the processing at the timing when the data is generated is performed. When the interrupt processing occurs at the time point (a), the interrupt
続いて、演算モジュール122は、非割込プログラムに基づく非割込処理を実行し、入出力モジュール126からの伝達に応じて、時点(c)において、入出力モジュール126の共有メモリ184から入力データを取得し、当該入力データを演算し、その演算結果である出力データを、周期の終了時点(d)において、共有メモリ184に保持し、入出力モジュール126に、入力データの準備ができた旨伝達する(割込通知)。最後に、入出力モジュール126の割込プログラム実行部202は、演算モジュール122からの伝達に応じて、時点(e)において共有メモリ184から出力データを取得する。
Subsequently, the
ここでは、データが生成されたタイミングで割込通知を行い、タクトタイムに関係なく、データが生成された直後にモジュール間でデータの送受信を行っているので、入力応答時間や出力応答時間を短縮することが可能となる。 Here, the interrupt notification is given at the timing when the data is generated, and the data is sent and received between the modules immediately after the data is generated, regardless of the tact time, so the 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 the processing that prioritizes synchronism over responsiveness and the processing that prioritizes responsiveness over synchronism in parallel. That is, the first input / output module via the first bus enables the input and output of data to be accurately synchronized with the tact time as in the conventional case. In addition, since the second input / output module through the second bus can reduce the input response time and the output response time, the number of input /
このように複数の伝送方式を採用し、それぞれの特性を活かして入出力を分配することで、制御システム100全体として処理効率や汎用性を高めることができる。また、少ないプログラマブルコントローラ120による少ないモジュール数で、同期性と即応性とをいずれも実現することが可能となる。
In this way, by adopting a plurality of transmission methods and utilizing the respective characteristics to distribute the input and output, it is possible to improve the processing efficiency and versatility of the
また、コンピュータを制御システム100として機能させるプログラムや、当該プログラムを記録した、コンピュータで読み取り可能なフレキシブルディスク、光磁気ディスク、ROM、CD、DVD、BD等の記憶媒体も提供される。ここで、プログラムは、任意の言語や記述方法にて記述されたデータ処理手段をいう。
In addition, a program that causes a computer to function as the
以上、添付図面を参照しながら本発明の好適な実施形態について説明したが、本発明はかかる実施形態に限定されないことは言うまでもない。当業者であれば、特許請求の範囲に記載された範疇において、各種の変更例または修正例に想到し得ることは明らかであり、それらについても当然に本発明の技術的範囲に属するものと了解される。 The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, but it goes without saying that the present invention is not limited to such embodiments. It is obvious to those skilled in the art that various changes or modifications can be conceived within the scope of the claims, and it should be understood that these also belong to the technical scope of the present invention. To be done.
例えば、上述した実施形態においては、説明の便宜上、入出力モジュール126において割込プログラムを用い、演算モジュール122で、その割込プログラムを除く非割込プログラムを用いる例を挙げて説明したが、入出力モジュール126に割り当てる割込プログラムは、実行プログラムに含まれる全ての割込プログラムの一部であればよく、残りの割込プログラムを演算モジュール122自体で用いることができる。したがって、非割込プログラムは、入出力モジュール126に割り当てた割込プログラムを除く全てのプログラムを含むこととなる。
For example, in the above-described embodiment, for convenience of description, an example in which the input /
また、上述した実施形態においては、プログラム複製部170が演算モジュール122に備わっている例を挙げて説明したが、かかる場合に限らず、入出力モジュール126や他のモジュール、もしくは、管理装置110に備わるとしてもよい。同様に、複製対象となる割込プログラムが演算モジュール122の不揮発性メモリ152に保持されている例を挙げて説明したが、その保持されるメモリは制御システム100内のいずれのメモリであってもよい。また、上述した実施形態においては、割込プログラムを入出力モジュール126に複製する例を挙げたが、非割込プログラムをいずれかのメモリに保持しておき、所定の契機に、非割込プログラムを演算モジュール122に複製するとしてもよい。
Further, in the above-described embodiment, an example in which the
また、上述した実施形態においては、割込プログラムを複製する所定の契機として、制御システム100の起動時を挙げて説明したが、他の任意のタイミングを排除するものではなく、様々なタイミングを選択することができる。なお、上述した実施形態においては、制御システム100を起動する度に割込プログラムを入出力モジュール126の共有メモリ184に複製する例を挙げて説明したが、入出力モジュール126において割込プログラムを保持するメモリが不揮発性であれば、そのメモリに割込プログラムが既に複製されているか否か判定し、複製されていない場合にのみ割込プログラムを複製するとしてもよい。
Further, in the above-described embodiment, the case where the
上述した実施形態においては、制御システム100を例に挙げて説明したが、分散型制御装置(DCS)等、様々な機器に適用することができる。また、上述した実施形態においては、入力モジュールと出力モジュールが結合された入出力モジュール126を通じて外部からデータを入力する例を挙げているが、出力モジュールは必須の構成ではなく、少なくとも入力モジュールがあれば本実施形態を適用することができる。
In the above-described embodiment, the
また、上述した実施形態においては、実行プログラムのうち割込プログラムを入出力モジュール126に複製し、入出力モジュール126にて割込処理を実行する例を挙げて説明したが、パラレル伝送方式の第2バスによって接続される場合、その割込処理の一部を、さらに演算モジュール122に割り当て、割込処理を分散することもできる。
Further, in the above-described embodiment, an example in which the interrupt program of the execution programs is duplicated in the input /
また、上述した実施形態においては、複数のバスとして、シリアル伝送方式の第1バスとパラレル伝送方式の第2バスを挙げて説明したが、かかる場合に限らず、複数のバスがいずれもシリアル伝送方式であってもよいし、パラレル伝送方式であってもよい。また、上述した実施形態においては、いずれのバスにも制御部190を有する入出力モジュール126を接続する例を挙げて説明したが、即応性を要さない第1バスに接続する入出力モジュール126は、制御部190を有さないFPGA等により入出力を管理する入出力モジュールであってもよい。
Further, in the above-described embodiments, the first bus of the serial transmission system and the second bus of the parallel transmission system have been described as the plurality of buses, but the present invention is not limited to such a case, and all the plurality of buses perform serial transmission. It may be a system or a parallel transmission system. Further, in the above-described embodiment, the example in which the input /
なお、本明細書の制御方法の各工程は、必ずしもタイミングチャートとして記載された順序に沿って時系列に処理する必要はなく、また、並列的あるいはサブルーチンによる処理を含んでもよい。 It should be noted 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 be processed in parallel or by a subroutine.
本発明は、演算モジュールと入力モジュールとを備える制御システムおよび制御方法に利用することができる。 INDUSTRIAL APPLICABILITY The present invention can be used for 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
170 Program Duplication Unit 172 Non-Interrupt
Claims (12)
前記制御システムで実行されるプログラムは、割込条件の成立を実行契機とする割込プログラムと、該割込プログラムを除いた非割込プログラムとを含んでなり、
前記入力モジュールは、
前記割込プログラムに対応付けられた割込条件が成立しているか否か判定する条件判定部と、
前記割込条件が成立していると判定されると、前記割込プログラムを実行する割込プログラム実行部と、
外部のアナログ信号をデジタル信号に変換するADコンバータと、
該ADコンバータの変換制御を行うAD制御回路と、
を備え、
前記割込プログラム実行部は、
前記割込プログラムの実行途中で任意のデジタル信号が必要になると、前記AD制御回路に前記ADコンバータの変換制御を実行させ、
前記ADコンバータの変換完了後に、前記任意のデジタル信号のみ正規化して正規化デジタル信号を生成し、
前記正規化デジタル信号によって前記割込プログラムを実行し、
前記演算モジュールは、
前記割込プログラム実行部の実行結果を参照し、前記非割込プログラムを実行する非割込プログラム実行部
を備えることを特徴とする制御システム。 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 arithmetic operation based on data received from the input module,
The program executed by the control system includes an interrupt program triggered by the establishment of an interrupt condition and a non-interrupt program excluding the interrupt program,
The input module is
A condition determination unit that determines 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,
An AD converter for converting an external analog signal into a digital signal,
An AD control circuit for controlling conversion of the AD converter;
Equipped with
The interrupt program execution unit,
When an arbitrary digital signal is required during execution of the interrupt program, the AD control circuit is caused to execute 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,
Executing the interrupt program by the normalized digital signal,
The arithmetic module is
A control system comprising a non-interruption program execution unit for executing the non-interruption program with reference to the execution result of the interruption program execution unit.
前記割込プログラム実行部は、
前記割込プログラムの実行途中で任意のデジタル信号が生成されると、前記任意のデジタル信号のみ非正規化して非正規化デジタル信号を生成し、
前記DA制御回路に、前記非正規化デジタル信号によって前記DAコンバータの変換制御を実行させることを特徴とする請求項1に記載の制御システム。 The input module includes a DA converter that converts a digital signal into 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,
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,
The control system according to claim 1 , wherein the DA control circuit is caused to execute conversion control of the DA converter by the denormalized digital signal.
前記制御システムで実行されるプログラムは、割込条件の成立を実行契機とする割込プログラムと、該割込プログラムを除いた非割込プログラムとを含んでなり、
前記入力モジュールは、
前記割込プログラムに対応付けられた割込条件が成立しているか否か判定する条件判定部と、
前記割込条件が成立していると判定されると、前記割込プログラムを実行する割込プログラム実行部と、
外部のアナログ信号をデジタル信号に変換するADコンバータと、
該ADコンバータの変換制御を行うAD制御回路と、
を備え、
前記AD制御回路は、
所定の周期で前記ADコンバータの変換制御を実行し、
変換されたデジタル信号を保持し、
前記割込プログラム実行部は、
前記割込プログラムの実行途中で任意のデジタル信号が必要になると、前記AD制御回路に保持された該任意のデジタル信号のみ正規化して正規化デジタル信号を生成し、
前記正規化デジタル信号によって前記割込プログラムを実行し、
前記演算モジュールは、
前記割込プログラム実行部の実行結果を参照し、前記非割込プログラムを実行する非割込プログラム実行部
を備えることを特徴とする制御システム。 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 arithmetic operation based on data received from the input module,
The program executed by the control system includes an interrupt program triggered by the establishment of an interrupt condition and a non-interrupt program excluding the interrupt program,
The input module is
A condition determination unit that determines 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,
An AD converter for converting an external analog signal into a digital signal,
An AD control circuit for controlling conversion of the AD converter;
Equipped with
The AD control circuit is
The conversion control of the AD converter is executed 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,
Executing the interrupt program by the normalized digital signal,
The arithmetic module is
A control system comprising a non-interruption program execution unit for executing the non-interruption program with reference to the execution result of the interruption program execution unit.
前記割込プログラム実行部は、
前記割込プログラムの実行途中で任意のデジタル信号が生成されると、前記任意のデジタル信号のみ非正規化して非正規化デジタル信号を生成し、
前記非正規化デジタル信号を前記DA制御回路に保持させ、
前記DA制御回路は、
前記非正規化デジタル信号によって前記DAコンバータの変換制御を実行することを特徴とする請求項3に記載の制御システム。 The input module includes a DA converter that converts a digital signal into 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,
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 denormalized digital signal in the DA control circuit,
The DA control circuit is
The control system according to claim 3 , wherein conversion control of the DA converter is executed by the denormalized digital signal.
前記プログラム複製部は、前記割込プログラムを、前記演算モジュールから前記入力モジュールに複製することを特徴とする請求項5に記載の制御システム。 The predetermined trigger is when the arithmetic module and the input module are activated,
The control system according to claim 5 , wherein the program duplication unit duplicates the interrupt program from the arithmetic module to the input module.
前記バスは、前記演算モジュールと前記第1入力モジュールとを接続する第1バス、および、前記演算モジュールと前記第2入力モジュールとを接続する第2バスを含み、
前記演算モジュールは、所定のタクトタイム毎に、前記第1バスを通じて、前記第1入力モジュールからデータを入力し、
前記第2入力モジュールの前記割込プログラム実行部は、前記タクトタイムに関係ない所定のタイミングで、前記第2バスを通じて、前記第2入力モジュールのデータを前記演算モジュールに入力させることを特徴とする請求項1から7のいずれか1項に記載の制御システム。 The input module includes a first input module and a second input module,
The bus includes a first bus connecting the arithmetic module and the first input module, and a second bus connecting 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,
The interrupt program execution unit of the second input module causes the data of the second input module to be input to the arithmetic module via the second bus at a predetermined timing irrelevant to the tact time. The control system according to any one of claims 1 to 7 .
所定のタクトタイム毎に、前記第1バスを通じて、前記第1入力モジュールにデータを出力し、
前記タクトタイムに関係ない所定のタイミングで、前記第2バスを通じて、前記第2入力モジュールにデータを出力することを特徴とする請求項8に記載の制御システム。 The arithmetic module is
Outputting data to the first input module through the first bus at every predetermined tact time,
9. The control system according to claim 8 , wherein data is output to the second input module through the second bus at a predetermined timing irrelevant to the takt time.
前記第2バスは、パラレル伝送方式であることを特徴とする請求項8または9に記載の制御システム。 The first bus is a serial transmission system,
Said second bus, the control system according to claim 8 or 9, characterized in that a parallel transmission scheme.
前記制御システムで実行されるプログラムは、割込条件の成立を実行契機とする割込プログラムと、該割込プログラムを除いた非割込プログラムとを含んでなり、
前記入力モジュールが、
前記割込プログラムに対応付けられた割込条件が成立しているか否か判定し、
前記割込条件が成立していると判定すると、前記割込プログラムを実行し、
前記割込プログラムの実行途中で任意のデジタル信号が必要になると、外部のアナログ信号をデジタル信号に変換するADコンバータの変換制御を行うAD制御回路に前記ADコンバータの変換制御を実行させ、
前記ADコンバータの変換完了後に、前記任意のデジタル信号のみ正規化して正規化デジタル信号を生成し、
前記正規化デジタル信号によって前記割込プログラムを実行し、
前記演算モジュールが、
前記割込プログラムの実行結果を参照し、前記非割込プログラムを実行することを特徴とする制御方法。 A control method using a control system, comprising: an input module for inputting data from the outside; and an arithmetic module that is connected to the input module through a bus and performs an arithmetic operation based on data received from the input module.
The program executed by the control system includes an interrupt program triggered by the establishment of an interrupt condition and a non-interrupt program excluding the interrupt program,
The input module is
It is determined whether or not 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,
When an arbitrary digital signal is required during the execution of the interrupt program, an AD control circuit that performs conversion control of an AD converter that converts an external analog signal into a digital signal is caused to execute 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,
Executing the interrupt program by the normalized digital signal,
The arithmetic module is
A control method for executing the non-interruption program by referring to an execution result of the interruption program.
前記制御システムで実行されるプログラムは、割込条件の成立を実行契機とする割込プログラムと、該割込プログラムを除いた非割込プログラムとを含んでなり、
前記入力モジュールが、
前記割込プログラムに対応付けられた割込条件が成立しているか否か判定し、
前記割込条件が成立していると判定すると、前記割込プログラムを実行し、
外部のアナログ信号をデジタル信号に変換するADコンバータの変換制御を行うAD制御回路が、
所定の周期で前記ADコンバータの変換制御を実行し、
変換されたデジタル信号を保持し、
前記入力モジュールが、
前記割込プログラムの実行途中で任意のデジタル信号が必要になると、前記AD制御回路に保持された該任意のデジタル信号のみ正規化して正規化デジタル信号を生成し、
前記正規化デジタル信号によって前記割込プログラムを実行し、
前記演算モジュールが、
前記割込プログラムの実行結果を参照し、前記非割込プログラムを実行することを特徴とする制御方法。 A control method using a control system, comprising: an input module for inputting data from the outside; and an arithmetic module that is connected to the input module through a bus and performs an arithmetic operation based on data received from the input module.
The program executed by the control system includes an interrupt program triggered by the establishment of an interrupt condition and a non-interrupt program excluding the interrupt program,
The input module is
It is determined whether or not 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,
An AD control circuit that performs conversion control of an AD converter that converts an external analog signal into a digital signal,
The conversion control of the AD converter is executed at a predetermined cycle,
Hold the converted digital signal,
The input module is
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,
Executing the interrupt program by the normalized digital signal,
The arithmetic module is
A control method for executing the non-interruption program by referring to an execution result of the interruption program.
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 JP2017062758A (en) | 2017-03-30 |
JP6686521B2 true 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) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7132257B2 (en) * | 2020-02-04 | 2022-09-06 | 株式会社日立製作所 | control system |
CN116710857B (en) * | 2021-06-25 | 2024-06-25 | 三菱电机株式会社 | Input unit, control system, communication method, and recording medium |
-
2016
- 2016-02-24 JP JP2016032611A patent/JP6686521B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2017062758A (en) | 2017-03-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2687927B1 (en) | Cpu of plc, system program for plc, and recording medium storing system program for plc | |
US10274936B2 (en) | Control apparatus | |
JP6409557B2 (en) | Control device, controller system, output control method, and program | |
US20140207254A1 (en) | Cpu unit for plc, plc-use system program, recording medium in which plc-use system program is stored, plc system, plc support device, plc support program, and recording medium in which plc support program is stored | |
CN101233460B (en) | Robot control system and control method for robot | |
US8504176B2 (en) | CPU unit of PLC, system program for PLC, and recording medium storing system program for PLC | |
US20190272197A1 (en) | Control apparatus, control method and non-transitory storage medium | |
JP2016194830A (en) | Control device | |
KR102294177B1 (en) | control device | |
US20220244697A1 (en) | Control system, setting device, and computer-readable storage medium | |
US11287793B2 (en) | Control device, control method for control device, information processing program, and recording medium | |
JP6686521B2 (en) | Control system and control method | |
US11886170B2 (en) | Control system, setting device and setting program | |
JP7391629B2 (en) | Motor control equipment, numerical control equipment, robot controllers and integrated controller systems | |
WO2020075351A1 (en) | Control device | |
CN110278716B (en) | PLC, network unit, CPU unit, and data transfer method | |
US20190033834A1 (en) | Slave device, industrial network system, and method of controlling slave device | |
CN116909678A (en) | An implementation method, system and management server of containerized PLC | |
JP2008186426A (en) | Unit extension system | |
CN114064225A (en) | Self-adaptive scheduling method, device, computer storage medium and system | |
JP7110911B2 (en) | Control method for controller and communication control unit provided in controller | |
JP2023028829A (en) | Controller and method of controlling controller | |
CN118661414A (en) | Control System | |
JP4854598B2 (en) | Data transfer control device | |
JP2017130039A (en) | Programmable controller |
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 |