JP2005267335A - Program execution processor - Google Patents

Program execution processor Download PDF

Info

Publication number
JP2005267335A
JP2005267335A JP2004079970A JP2004079970A JP2005267335A JP 2005267335 A JP2005267335 A JP 2005267335A JP 2004079970 A JP2004079970 A JP 2004079970A JP 2004079970 A JP2004079970 A JP 2004079970A JP 2005267335 A JP2005267335 A JP 2005267335A
Authority
JP
Japan
Prior art keywords
background
program
executed
scan
blocks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2004079970A
Other languages
Japanese (ja)
Inventor
Hideto Shiratsu
英仁 白津
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.)
Yokogawa Electric Corp
Original Assignee
Yokogawa Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yokogawa Electric Corp filed Critical Yokogawa Electric Corp
Priority to JP2004079970A priority Critical patent/JP2005267335A/en
Publication of JP2005267335A publication Critical patent/JP2005267335A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an execution processor capable of ensuring the scan time of a program block needing high-speed processing. <P>SOLUTION: This processor comprises a general scan system composed of a mechanism for repeating successive execution of program blocks and I/O data update processing of updating the data processed in the program blocks concerned, and the general scan system includes a background scan executing background programs in a background of a fixed time while executing the general scan system. The background program blocks are successively executed in the order of registration only for the fixed time, the program execution processing is interrupted at that stage when the fixed time comes, and the residual processing at arrival of the next background scan. This processor further comprises a background scan system composed of a mechanism for repeating background I/O data update processing of performing, in case that all the background program blocks are executed, update processing of the data executed. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、プログラム実行処理装置に関し、詳しくはストアードプログラムの繰り返し演算方式のプログラマブルコントローラのCPUモジュールのプログラム実行処理装置に関する。   The present invention relates to a program execution processing device, and more particularly to a program execution processing device of a CPU module of a programmable controller of a stored program repetitive calculation method.

従来技術におけるプログラマブルコントローラは、図5に示すように、プログラム実行処理とIOデータ更新処理を行うCPUモジュール111と、外部との入出力を行うIOチャネルを持つIOモジュール(又は演算機能付きの高機能IOモジュール113a、113b)112a、112bをバス114を介して接続して構成されている。   As shown in FIG. 5, the programmable controller in the prior art includes a CPU module 111 that performs program execution processing and IO data update processing, and an IO module that has an IO channel that performs input and output with the outside (or a high function with an arithmetic function). IO modules 113a and 113b) 112a and 112b are connected via a bus 114.

図6は、プログラマブルコントローラのCPUモジュール111の動作を示したもので、ストアーされたプログラムの実行115とIOデータ更新116を繰返す機構になっている。この繰返し1回を1スキャンと呼ぶ。
ストアーされるプログラムは、処理単位ごとに分割されている。分割されたプログラムをプログラムブロックと呼ぶ。このプログラムブロックは、プログラムから起動要求と停止要求を行うことができる。プログラムブロックの実行/非実行制御はプログラム実行処理装置で行われる。
FIG. 6 shows the operation of the CPU module 111 of the programmable controller, and has a mechanism for repeating the stored program execution 115 and the IO data update 116. This repeated one time is called one scan.
Stored programs are divided into processing units. The divided program is called a program block. This program block can make a start request and a stop request from the program. Execution / non-execution control of the program block is performed by the program execution processing device.

図7(A)は、このプログラムブロックの実行/非実行制御を示したもので、高速応答が必要なプログラムブロックA(115)と、I/Oデータ更新処理116とから構成されている。このように高速応答のみのプログラムブロックA(115)のみの場合には、プログラムブロックA(115)のみを実行すればよいため、その入出力応答は速くなる。
図7(B)は、プログラム全体が、高速の入出力応答時間が必要なプログラムブロックAと、一回の処理時間が長いファイルアクセス処理を行うプログラムブロックBと、I/Oデータ更新処理とで構成されている。
このような構成において、プログラムブロックA(115)は、高速応答が必要なプログラムブロックであるので、その実行は高速に行われるが、プログラムブロックB(117)はファイルアクセス処理を行う関係上その処理全体の時間は長くなる。
従って、あるタイミングでプログラムブロックB(117)が起動すると、一般的にスキャンタイムが大きく増大する。スキャンタイムが増大することで、I/Oデータ更新処理116の時間間隔が長くなり、入出力応答時間が増大してしまう。この結果、高速の入出力応答時間が必要なプログラムブロックA(115)は、入出力応答時間の増大により、本来必要とされる高速応答ができなくなる。高速応答ができなくなることで、プログラマブルコントローラにより制御されている装置自身の制御が、パフォーマンス不足になる可能性がある。
FIG. 7A shows the execution / non-execution control of the program block, and is composed of a program block A (115) that requires a high-speed response and an I / O data update process 116. In this way, in the case of only the program block A (115) having only the high-speed response, only the program block A (115) has to be executed, and the input / output response becomes faster.
FIG. 7B shows that the entire program includes a program block A that requires a fast input / output response time, a program block B that performs a file access process that requires a long processing time, and an I / O data update process. It is configured.
In such a configuration, since the program block A (115) is a program block that requires a high-speed response, the program block A (115) is executed at a high speed. The overall time will be longer.
Therefore, when the program block B (117) is activated at a certain timing, the scan time generally increases greatly. As the scan time increases, the time interval of the I / O data update processing 116 becomes longer, and the input / output response time increases. As a result, the program block A (115) that requires high-speed input / output response time cannot perform the high-speed response that is originally required due to the increase in input / output response time. Since the high-speed response cannot be performed, there is a possibility that the performance of the control of the device itself controlled by the programmable controller is insufficient.

図8は、プログラマブルコントローラにより制御される装置の遷移状態により、処理ごとに分割されているプログラムブロックの起動数が5個から3個に変動したときのスキャンタイムを表したもので、
図8(A)に示すように、プログラムブロック1〜5を実行すれば当然に、それぞれの処理する時間が必要であるため、そのスキャンタイムは長くなる。
又、図8(B)に示すように、プログラムブロック1〜3を実行すれば、プログラムブロック1〜5を実行したときに比べて、そのスキャンタイムは短くなる。
このように、プログラムブロック1〜5が最大起動数であり、プログラムブロック1〜3が最低起動数であるとすると、その最大起動数の時と、最低起動数の時では、スキャンタイムが変動する。スキャンタイムの変動により、入出力応答時間が変動して、プログラマブルコントローラにより制御されている装置自身の制御が不安定になる可能性がある。
特開平2000−311008号公報(第2頁 第1図)
FIG. 8 shows the scan time when the number of program blocks activated for each process varies from 5 to 3 depending on the transition state of the device controlled by the programmable controller.
As shown in FIG. 8 (A), if the program blocks 1 to 5 are executed, the time required for each processing is naturally required, so that the scan time becomes longer.
Further, as shown in FIG. 8B, when the program blocks 1 to 3 are executed, the scan time is shorter than when the program blocks 1 to 5 are executed.
As described above, when the program blocks 1 to 5 have the maximum number of activations and the program blocks 1 to 3 have the minimum number of activations, the scan time varies between the maximum number of activations and the minimum number of activations. . Due to variations in scan time, the input / output response time may vary, and the control of the device itself controlled by the programmable controller may become unstable.
Japanese Patent Laid-Open No. 2000-311008 (Page 2, Fig. 1)

しかし、従来技術で説明したプログラマブルコントローラにおいて、高速応答が必要なプログラムブロックの中に低速応答でも良いプログラムブロックが混在しているため、プログラムブロックの起動が他のプログラムブロックの入出力応答時間に影響を与えてしまうという問題がある。   However, in the programmable controller described in the related art, since program blocks that require low-speed response are mixed in program blocks that require high-speed response, the activation of the program block affects the input / output response time of other program blocks. There is a problem of giving.

又、高速応答が必要なプログラムブロックと低速応答でも良いプログラムブロックを混在して処理すると、そのスキャンタイムが安定しなくなるという問題もある。   In addition, if a program block that requires a high-speed response and a program block that requires a low-speed response are mixed and processed, the scan time becomes unstable.

従って、プログラムブロックの起動が他のプログラムブロックの入出力応答時間に影響を与えないようにすると共に、スキャンタイムを安定させるようにしたプログラム実行処理装置に解決しなければならない課題を有する。   Therefore, there is a problem that must be solved in a program execution processing device in which activation of a program block does not affect the input / output response time of other program blocks and the scan time is stabilized.

上記課題を解決するために、本願発明のプログラム実行処理装置は、次に示す構成にしたことである。
(1)プログラム実行処理装置は、登録されている単一又は複数のプログラムブロックを順次に実行すると共に、そのプログラムブロックで処理されたデータを更新処理するI/Oデータ更新処理を繰返す機構からなる通常スキャン系と、前記通常スキャン系に、前記単一又は複数のプログラムブロックを実行する間に一定時間のバックグランドで実行する単一又は複数のバックグランドプログラムブロックを実行するバックグランドスキャンを設け、前記一定時間で実行する前記単一又は複数のバックグランドプログラムブロックは、該一定時間だけ登録されている順に順次に実行し、一定時間に達するとその段階でプログラム実行処理を中断し、次の前記バックグランドスキャンが到来したときに続きを実行するようにすると共に、登録されている全ての複数のバックグランドプログラムブロックが実行されたときに、その実行されたデータの更新処理を行うバックグランドI/Oデータ更新処理を繰返す機構からなるバックグランドスキャン系と、を備えてなる。
(2)前記通常スキャン系に設けたバックグランドスキャンは、複数設けるようにしたことを特徴とする(1)に記載のプログラム実行処理装置。
In order to solve the above problems, the program execution processing device of the present invention is configured as follows.
(1) The program execution processing device includes a mechanism that sequentially executes a single or a plurality of registered program blocks and repeats an I / O data update process for updating data processed by the program blocks. A normal scan system and a background scan for executing a single or a plurality of background program blocks to be executed in the background for a predetermined time while executing the single or a plurality of program blocks are provided in the normal scan system, The single or plural background program blocks executed in the predetermined time are sequentially executed in the order registered for the predetermined time, and when the predetermined time is reached, the program execution process is interrupted at that stage, and the next Register to run and continue when a background scan arrives And a background scan system comprising a mechanism that repeats the background I / O data update process for updating the executed data when all the plurality of background program blocks are executed. Become.
(2) The program execution processing device according to (1), wherein a plurality of background scans provided in the normal scan system are provided.

(3)プログラム実行処理装置は、登録されている単一又は複数のプログラムブロックを順次に実行すると共に、そのプログラムブロックで処理されたデータを更新処理するI/Oデータ更新処理を繰返す機構からなる通常スキャン系と、前記通常スキャン系に、前記単一又は複数のプログラムブロックを実行する間に一定時間のバックグランドで実行する単一又は複数のバックグランドプログラムブロックを実行するバックグランドスキャンを設け、前記一定時間で実行する前記単一又は複数のバックグランドプログラムブロックは、前記一定時間を前記単一又は複数のバックグランドプログラムブロックで等分し、その等分された一定時間づつ前記単一又は複数のバックグランドプログラムブロックを切り替えて実行すると共に、実行が終了したバックグランドプログラムブロック毎にその実行されたデータの更新処理を行うバックグランドI/Oデータ更新処理を繰返す機構からなるバックグランドスキャン系と、を備えてなる。
(4)前記通常スキャン系に設けたバックグランドスキャンは、複数設けるようにしたことを特徴とする(3)に記載のプログラム実行処理装置。
(3) The program execution processing device includes a mechanism that sequentially executes a registered single or plural program blocks and repeats I / O data update processing for updating data processed by the program blocks. A normal scan system and a background scan for executing a single or a plurality of background program blocks to be executed in the background for a predetermined time while executing the single or a plurality of program blocks are provided in the normal scan system, The single or plural background program blocks to be executed at the predetermined time are divided equally by the single or plural background program blocks, and the single or plural background program blocks are equally divided by the constant time. The background program block is switched and executed. Ryo and a background scan system consisting mechanism repeating the background I / O data updating process for updating the execution data for each background program blocks, consisting comprise.
(4) The program execution processing device according to (3), wherein a plurality of background scans provided in the normal scan system are provided.

本発明のプログラム実行処理装置は、高速応答が必要なプログラムブロックを通常スキャン系にし、且つ一定時間のみをバックグランドスキャンに割り振ることで、高速応答が必要なプログラムブロックの実行時間が延長されても、バックグランドスキャンに割り振る時間は一定時間のみであるから、その時間のみが高速応答が必要なプログラムブロックに影響することになり、これは高速応答が必要なプログラムブロックの実行の許容範囲内でバックグランドスキャンの一定時間を設定しておけば、装置全体のパフォーマンスを落すことなく維持できる。   The program execution processing device of the present invention uses a program block that requires a high-speed response as a normal scan system and allocates only a fixed time to a background scan, so that the execution time of a program block that requires a high-speed response can be extended. Since the time allotted to the background scan is only a fixed time, that time only affects program blocks that require high-speed response, which is within the allowable range of program blocks that require high-speed response. If a fixed time for the ground scan is set, the performance of the entire apparatus can be maintained without deterioration.

又、プログラムブロックの中で、通常スキャン系のスキャン毎に動作しないもの又は安定応答が不要なものをバックグランドスキャン系に登録することで、通常スキャン系におけるスキャンを安定させることができ、これにより装置の制御が安定する。   Also, by registering program blocks that do not operate for each scan of the normal scan system or that do not require a stable response in the background scan system, the scan in the normal scan system can be stabilized. The device control is stable.

以下、本発明のプログラム実行処理装置について、図面を用いて詳細に説明する。   The program execution processing apparatus of the present invention will be described in detail below with reference to the drawings.

本発明の第1の実施例のプログラム実行処理装置は、図1に示すように、通常のスキャンをしてプログラムブロックを実行するプログラム実行処理を行う通常スキャン系11と、この通常スキャン系11とは別にバックグランドスキャンと呼ぶプログラム実行処理を行うバックグランドスキャン系21とから構成されている。
通常スキャン系11は、高速応答が必要なプログラムブロック12で構成され、通常のスキャンをしてプログラムブロック12を実行する、所謂、ラダーブロック実行には、プログラムをブロック化したプログラムブロック12、実施例においてプログラムブロックBLOCKA〜BLOCKH(12)を実行し、その次に一定時間割り当てられているバックグランドスキャン系21をアクセスするバックグランドスキャン13が存在し、最後に通常スキャンで行われたI/Oデータを処理する通常スキャンI/Oデータ更新処理14が存在する。
通常スキャン系11で実行するプログラムブロックBLOCKA〜BLOCKH(12)は、それぞれのスキャンで実行したいプログラムブロックを任意に登録変更することが可能で、スキャン毎に登録されたプログラムブロックBLOCKA〜BLOCKH(12)が実行されることになる。又、プログラムブロックBLOCKA〜BLOCKH(12)のそれぞれが実行する時間は、みな同じでなく、それぞれのプログラムブロック毎に実行時間が異なる。
バックグランドスキャン13は通常のスキャンの一部で一定時間Tが割り当てられており、この一定時間Tは任意に設定可能になっている。
バックグランドスキャン系21は、比較的低速応答でもよいプログラムブロック22であり、バックグランドで実行するプログラムブロックBLOCKI〜BLOCKO(22)で構成され、これらのプログラムブロックBLOCKI〜BLOCKO(22)の次にバックグランドスキャンで行われたI/Oデータを更新処理するバックグランドスキャンI/Oデータ更新処理23からなる。
As shown in FIG. 1, the program execution processing apparatus according to the first embodiment of the present invention includes a normal scan system 11 that performs a program execution process for executing a program block by performing a normal scan, and the normal scan system 11. In addition, it is composed of a background scan system 21 that performs a program execution process called background scan.
The normal scan system 11 is composed of program blocks 12 that require a high-speed response. The program blocks 12 are executed by performing a normal scan. For so-called ladder block execution, a program block 12 in which a program is blocked, the embodiment , The program blocks BLOCKA to BLOCKH (12) are executed, and then there is a background scan 13 for accessing the background scan system 21 assigned for a certain period of time, and the last I / O data performed in the normal scan There is a normal scan I / O data update process 14 for processing.
The program blocks BLOCKA to BLOCKH (12) executed in the normal scan system 11 can arbitrarily change the registration of the program blocks to be executed in each scan, and the program blocks BLOCKA to BLOCKH (12) registered for each scan. Will be executed. Further, the execution times of the program blocks BLOCKA to BLOCKH (12) are not all the same, and the execution times are different for each program block.
The background scan 13 is part of a normal scan and is assigned a fixed time T, and this fixed time T can be set arbitrarily.
The background scan system 21 is a program block 22 which may have a relatively low-speed response, and is composed of program blocks BLOCKI to BLOCKO (22) executed in the background, and these program blocks BLOCKI to BLOCKO (22) are followed by a backdrop. The process comprises a background scan I / O data update process 23 for updating the I / O data performed in the ground scan.

バックグランドで実行するプログラムブロックBLOCKI〜BLOCKO(22)は、予め任意に登録できる構成になっており、プログラムブロックBLOCKI〜BLOCKO(22)のそれぞれが実行する時間は、みな同じでなく、それぞれのプログラムブロック毎に実行時間が異なる。   The program blocks BLOCKI to BLOCKO (22) to be executed in the background can be arbitrarily registered in advance, and the execution time of each of the program blocks BLOCKI to BLOCKO (22) is not the same. Execution time is different for each block.

このような構成において、通常スキャン系11のバックグランドスキャン13に割り当てられた一定時間Tで、バックグランドスキャン系21の登録されているプログラムブロックBLOCKI〜BLOCKO(22)を実行する。一定時間Tに達した場合は、プログラムブロックの途中であっても処理を一時中断して、通常スキャン系11の次のスキャンのバックグランドスキャン13に残りの処理を委ねる。   In such a configuration, the program blocks BLOCKI to BLOCKO (22) registered in the background scan system 21 are executed at a predetermined time T assigned to the background scan 13 of the normal scan system 11. When the predetermined time T is reached, the process is temporarily interrupted even in the middle of the program block, and the remaining process is left to the background scan 13 of the next scan of the normal scan system 11.

このバックグランドスキャン13で行う一定時間T内でのプログラム動作は、登録されているバックグランドで実行するプログラムブロックBLOCKI〜BLOCKO(22)を順次に一定時間Tだけ実行する順次実行パターンと、登録されているバックグランドで実行するプログラムブロックBLOCKI〜BLOCKO(22)を一定時間Tで均等割付し、その均等割付した割り付け時間T1のみを各プログラムブロックBLOCKI〜BLOCKO(22)のそれぞれを実行するTSSパターンとがある。   The program operation within a predetermined time T performed in the background scan 13 is registered as a sequential execution pattern in which the program blocks BLOCKI to BLOCKO (22) executed in the registered background are sequentially executed for a predetermined time T. The program blocks BLOCKI to BLOCKO (22) to be executed in the background are equally allocated at a predetermined time T, and only the allocated time T1 is assigned to the TSS pattern for executing each of the program blocks BLOCKI to BLOCKO (22). There is.

順次実行パターンは、図2に示すように、登録されている順にバックグランドで実行するプログラムブロックBLOCKI〜O(22)を実行し、一定時間Tに達するとその段階でプログラム実行処理を中断し、通常スキャン系11の次のバックグランドスキャン13で続きを実行する。
バックグランドスキャン系21に登録されているプログラムブロックBLOCKI〜BLOCKO(22)の全ての実行が終了すると、登録されているプログラムブロックBLOCKI〜BLOCKO(22)が扱うI/Oのデータ更新処理を行い、再び登録順にプログラムブロック22を実行して、この動作を繰返す。
As shown in FIG. 2, the sequential execution pattern executes program blocks BLOCKI to O (22) that are executed in the background in the registered order. When a predetermined time T is reached, the program execution processing is interrupted at that stage. The continuation is executed in the background scan 13 next to the normal scan system 11.
When execution of all the program blocks BLOCKI to BLOCKO (22) registered in the background scan system 21 is completed, I / O data update processing handled by the registered program blocks BLOCKI to BLOCKO (22) is performed. The program block 22 is executed again in the order of registration, and this operation is repeated.

TSS実行パターンは、図3に示すように、通常スキャン系11におけるバックグランドスキャン13における一定時間Tを、バックグランドスキャン系21に登録されているバックグランドで実行するプログラムブロックBLOCKI〜BLOCKO(22)の数で等分して均等割付し、均等割付された一定時間T1づつプログラムブロックBLOCKI〜BLOCKO(22)を切り替えて実行する。
そして、通常スキャン系11のバックグランドスキャン13を繰返し、最後まで実行されたプログラムブロックはI/O更新処理を経て再び先頭から実行を繰返し、この動作を繰返す。
このようにすることで、たとえバックグランドで処理するプログラムブロックであってもある程度の高速性を望むプログラムブロックの場合には、登録順をかえるといった作業がなくして、高速性を達成することができるのである。
As shown in FIG. 3, the TSS execution pattern includes program blocks BLOCKI to BLOCKO (22) for executing a predetermined time T in the background scan 13 in the normal scan system 11 in the background registered in the background scan system 21. The program blocks BLOCKI to BLOCKO (22) are switched and executed at regular time intervals T1 that are equally allocated.
Then, the background scan 13 of the normal scan system 11 is repeated, and the program block executed to the end is repeatedly executed from the beginning through the I / O update process, and this operation is repeated.
In this way, even in the case of a program block that is processed in the background, in the case of a program block that requires a certain degree of high speed, there is no need to change the registration order, and high speed can be achieved. It is.

このように、順次実行パターン、或いはTSS実行パターンでも、高速応答が必要なプログラムブロックを通常スキャン系11にし、且つ一定時間のみをバックグランドスキャン13に割り振ることで、高速応答が必要なプログラムブロック12の実行時間が延長されても、バックグランドスキャン13に割り振る時間は一定時間Tのみであるから、その時間のみが高速応答が必要なプログラムブロック12に影響することになる。即ち、高速応答が必要なプログラムブロック12の実行の許容範囲内でバックグランドスキャン13の一定時間Tを設定しておけば、装置全体パフォーマンスの劣化等が起こらないことになる。   As described above, even in a sequential execution pattern or a TSS execution pattern, a program block that requires a high-speed response is assigned to the normal scan system 11 and only a predetermined time is assigned to the background scan 13 so that the program block 12 that requires a high-speed response. Even if the execution time is extended, the time allocated to the background scan 13 is only the fixed time T, so that only that time affects the program block 12 that requires a high-speed response. That is, if the fixed time T of the background scan 13 is set within the allowable range of execution of the program block 12 that requires a high-speed response, the overall performance of the apparatus will not deteriorate.

更に、プログラムブロック12の中で、通常スキャン系11のスキャン毎に動作しないもの又は安定応答が不要なものをバックグランドスキャン系21に登録することで、通常スキャン系11におけるスキャンを安定させることにができ、これにより装置の制御が安定する。   Furthermore, in the program block 12, those that do not operate every scan of the normal scan system 11 or those that do not require a stable response are registered in the background scan system 21, thereby stabilizing the scan in the normal scan system 11. This stabilizes the control of the device.

このようにして、本発明を用いたプログラマブルコントローラにおいては、従来よりも安価で低速なプログラマブルコントローラでも装置自体の制御が可能になり、又、処理分散のプログラミングを行う必要がなくなり、開発工数を削減できるというものである。   In this way, in the programmable controller using the present invention, it is possible to control the apparatus itself even with a cheaper and slower programmable controller than before, and it is not necessary to perform processing distribution programming, thereby reducing development man-hours. It can be done.

次に、本発明の第2の実施例のプログラム実行処理装置について、図面を参照して説明する。   Next, a program execution processing apparatus according to a second embodiment of the present invention will be described with reference to the drawings.

第2の実施例のプログラム実行処理装置は、図4に示すように、通常スキャン系11にバックグランドスキャンを複数個存在させた構成にすることで優先順位を様々に変えることができるようにしたものであり、通常のスキャンをしてプログラムブロック12を実行するプログラム実行処理を行う通常スキャン系11と、この通常スキャン系11とは別にバックグランドスキャンと呼ぶプログラム実行処理を行うバックグランドスキャン系21とから構成されている。
通常スキャン系11は、高速応答が必要なプログラムブロック12で構成され、通常のスキャンをしてプログラムブロックを実行する、所謂、ラダーブロック実行には、プログラムをブロック化したプログラムブロック、実施例においてプログラムブロックBLOCKA〜BLOCKH(12)を実行し、その次に一定時間割り当てられているバックグランドスキャン系21をアクセスする複数のバックグランドスキャン(1)13A、バックグランドスキャン(2)13Bが存在し、最後に通常スキャンで行われたI/Oデータを処理する通常スキャンI/Oデータ更新処理14が存在する。
通常スキャン系11で実行するプログラムブロックBLOCKA〜BLOCKH(12)は、それぞれのスキャンで実行したいプログラムブロックを任意に登録変更することが可能で、スキャン毎に登録されたプログラムブロックBLOCKA〜BLOCKH(12)が実行されることになる。又、プログラムブロックBLOCKA〜BLOCKH(12)のそれぞれが実行する時間は、みな同じでなく、それぞれのプログラムブロック毎に実行時間が異なる。
バックグランドスキャン(1)13A及びバックグランドスキャン(2)13Bは通常のスキャンの一部で一定時間(1)T及び一定時間(2)Tが割り当てられており、この一定時間Tは任意に設定可能になっている。
バックグランドスキャン系21は、比較的低速応答でもよいプログラムブロックであり、バックグランドスキャン(1)13Aで実行するプログラムブロックBLOCKI〜BLOCKO(22A)で構成され、これらのプログラムブロックBLOCKI〜BLOCKO(22A)の次にバックグランドスキャン(1)13Aで行われたI/Oデータを更新処理するバックグランドスキャン(1)I/Oデータ更新処理23Aと、バックグランドスキャン(2)13Bで実行するプログラムブロックBLOCKP〜BLOCKS(22B)で構成され、これらのプログラムブロックBLOCKP〜BLOCKS(22B)の次にバックグランドスキャン(2)13Bで行われたI/Oデータを更新処理するバックグランドスキャン(2)I/Oデータ更新処理23Bが存在する。
As shown in FIG. 4, the program execution processing apparatus according to the second embodiment is configured such that a plurality of background scans exist in the normal scan system 11 so that the priority order can be changed variously. A normal scan system 11 that performs a program execution process for executing a program block 12 by performing a normal scan, and a background scan system 21 that performs a program execution process called a background scan separately from the normal scan system 11 It consists of and.
The normal scan system 11 is composed of program blocks 12 that require a high-speed response. The program blocks are executed by performing a normal scan. For so-called ladder block execution, a program block obtained by blocking a program, in the embodiment, a program block. There are a plurality of background scans (1) 13A and background scans (2) 13B that execute blocks BLOCKA to BLOCKH (12) and then access the background scan system 21 assigned for a certain period of time. In addition, there is a normal scan I / O data update process 14 for processing the I / O data performed in the normal scan.
The program blocks BLOCKA to BLOCKH (12) executed in the normal scan system 11 can arbitrarily change the registration of the program blocks desired to be executed in each scan, and the program blocks BLOCKA to BLOCKH (12) registered for each scan. Will be executed. Further, the execution times of the program blocks BLOCKA to BLOCKH (12) are not all the same, and the execution times are different for each program block.
The background scan (1) 13A and the background scan (2) 13B are part of a normal scan and are assigned a fixed time (1) T and a fixed time (2) T. The fixed time T is arbitrarily set. It is possible.
The background scan system 21 is a program block that may have a relatively low speed response, and is composed of program blocks BLOCKI to BLOCKO (22A) executed by the background scan (1) 13A, and these program blocks BLOCKI to BLOCKO (22A). Next, a background scan (1) I / O data update process 23A for updating the I / O data performed in the background scan (1) 13A, and a program block BLOCKP executed in the background scan (2) 13B ~ BLOCKS (22B), and after these program blocks BLOCKP ~ BLOCKS (22B), background scan (2) background scan (2) I / O update processing performed in 13B There is a data update process 23B.

バックグランドで実行するプログラムブロックBLOCKI〜BLOCKO(22A)及びBLOCKP〜BLOCKS(22B)は、予め任意に登録できる構成になっており、プログラムブロックBLOCKI〜BLOCKO(22A)及びBLOCKP〜BLOCKS(22B)のそれぞれが実行する時間は、みな同じでなく、それぞれのプログラムブロック毎に実行時間が異なる。   The program blocks BLOCKI to BLOCKO (22A) and BLOCKP to BLOCKS (22B) executed in the background can be arbitrarily registered in advance, and each of the program blocks BLOCKI to BLOCKO (22A) and BLOCKP to BLOCKS (22B) Are not the same, and the execution time differs for each program block.

このような構成において、通常スキャン系11のバックグランドスキャン(1)13A及びバックグランドスキャン(2)13Bに割り当てられた一定時間(1)T及び一定時間(2)Tで、バックグランドスキャン系21の登録されているプログラムブロックBLOCKI〜BLOCKO(22A)、BLOCKP〜BLOCKS(22B)を実行する。一定時間Tに達した場合は、プログラムブロックの途中であっても処理を一時中断して、通常スキャン系11の次のスキャンのバックグランドスキャン(1)、(2)13A、13Bに残りの処理を委ねる。   In such a configuration, the background scan system 21 has a fixed time (1) T and a fixed time (2) T allocated to the background scan (1) 13A and the background scan (2) 13B of the normal scan system 11. , Registered program blocks BLOCKI to BLOCKO (22A) and BLOCKP to BLOCKS (22B) are executed. When the predetermined time T is reached, the processing is temporarily interrupted even in the middle of the program block, and the remaining scans are processed in the background scans (1) and (2) 13A and 13B of the next scan of the normal scan system 11. Entrust.

このバックグランドスキャン(1)13A及びバックグランドスキャン(2)13Bで行う一定時間T内でのプログラム動作は、登録されているバックグランドで実行するプログラムブロックBLOCKI〜BLOCKO(22A)、BLOCKP〜BLOCKS(22B)を順次に一定時間Tだけ実行する順次実行パターンと、登録されているバックグランドで実行するプログラムブロックBLOCKI〜BLOCKO(22A)、BLOCKP〜BLOCKS(22B)を一定時間Tで均等割付し、その均等割付した割り付け時間T1のみを各プログラムブロックBLOCKI〜BLOCKO(22A)、BLOCKP〜BLOCKS(22B)のそれぞれを実行するTSSパターンとがある。この順次実行パターンは、図2を参照して上述したので、その説明は省略する。TSSパターンについても、図3を参照して上述したので、その説明は省略する。   The program operation within a predetermined time T performed in the background scan (1) 13A and the background scan (2) 13B is performed by program blocks BLOCKI to BLOCKO (22A), BLOCKP to BLOCKS ( 22B) is sequentially allocated for a predetermined time T, and program blocks BLOCKI to BLOCKO (22A) and BLOCKP to BLOCKS (22B) to be executed in the registered background are equally allocated at a predetermined time T. There are TSS patterns for executing each of the program blocks BLOCKI to BLOCKO (22A) and BLOCKP to BLOCKS (22B) only for the equally allocated time T1. Since this sequential execution pattern has been described above with reference to FIG. 2, its description is omitted. Since the TSS pattern is also described above with reference to FIG. 3, the description thereof is omitted.

このように、通常スキャン系11で通常スキャン中に複数のバックグランドスキャンを設定して、バックグランド用の一定時間(一定時間(1)、一定時間(2))を各々変えることで、通常スキャンタイムに影響を与えることなくプログラム実行の優先度を変えることができるのである。   As described above, the normal scan system 11 sets a plurality of background scans during the normal scan, and changes the background constant time (constant time (1), constant time (2)), respectively. The priority of program execution can be changed without affecting time.

高速応答が必要なプログラムブロックを通常スキャン系にし、且つ一定時間のみをバックグランドスキャンに割り振ることで、高速応答が必要なプログラムブロックの実行時間が延長されても、バックグランドスキャンに割り振る時間は一定時間のみであるから、その時間のみが高速応答が必要なプログラムブロックに影響することになり、これは高速応答が必要なプログラムブロックの実行の許容範囲内でバックグランドスキャンの一定時間を設定しておけば、装置全体のパフォーマンスを落すことなく維持できるプログラム実行処理装置を提供する。   Even if the execution time of a program block that requires high-speed response is extended by assigning a program block that requires high-speed response to the normal scan system and allocating only a certain time to the background scan, the time allocated to the background scan is constant. Because it is only time, only that time will affect program blocks that require fast response, and this is done by setting a fixed time for background scanning within the allowable range of program blocks that require fast response. If this is the case, a program execution processing apparatus that can maintain the performance of the entire apparatus without deteriorating is provided.

本願発明の第1の実施例のプログラム実行処理装置のブロック図であるIt is a block diagram of the program execution processing apparatus of 1st Example of this invention. 同、順次実行パターンのブロック図である。It is a block diagram of a sequential execution pattern. 同、TSSパターンのブロック図である。It is a block diagram of a TSS pattern. 本願発明の第2の実施例のプログラム実行処理装置のブロック図であるIt is a block diagram of the program execution processing apparatus of 2nd Example of this invention. 従来技術におけるプログラマブルコントローラの構成を示した説明図である。It is explanatory drawing which showed the structure of the programmable controller in a prior art. プログラマブルコントローラを構成するCPUモジュールの動作を示したブロック図である。It is the block diagram which showed operation | movement of CPU module which comprises a programmable controller. プログラム起動によるプログラム実行時間(スキャンタイム)を増大させたときのブロック図である。It is a block diagram when the program execution time (scan time) by program starting is increased. プログラム起動によるプログラム実行時間(スキャンタイム)を増大させたときのブロック図である。It is a block diagram when the program execution time (scan time) by program starting is increased.

符号の説明Explanation of symbols

11 通常スキャン系
12 プログラムブロック
13 バックグランドスキャン
13A バックグランドスキャン(1)
13B バックグランドスキャン(2)
14 通常スキャンI/Oデータ更新処理
21 バックグランドスキャン系
22 プログラムブロック
22A プログラムブロック
22B プログラムブロック
23 バックグランドスキャンI/Oデータ更新処理
23A バックグランドスキャン(1)I/Oデータ更新処理
23B バックグランドスキャン(2)I/Oデータ更新処理。
11 Normal Scan System 12 Program Block 13 Background Scan 13A Background Scan (1)
13B Background scan (2)
14 Normal Scan I / O Data Update Processing 21 Background Scan System 22 Program Block 22A Program Block 22B Program Block 23 Background Scan I / O Data Update Processing 23A Background Scan (1) I / O Data Update Processing 23B Background Scan (2) I / O data update processing.

Claims (4)

登録されている単一又は複数のプログラムブロックを順次に実行すると共に、そのプログラムブロックで処理されたデータを更新処理するI/Oデータ更新処理を繰返す機構からなる通常スキャン系と、
前記通常スキャン系に、前記単一又は複数のプログラムブロックを実行する間に一定時間のバックグランドで実行する単一又は複数のバックグランドプログラムブロックを実行するバックグランドスキャンを設け、
前記一定時間で実行する前記単一又は複数のバックグランドプログラムブロックは、該一定時間だけ登録されている順に順次に実行し、一定時間に達するとその段階でプログラム実行処理を中断し、次の前記バックグランドスキャンが到来したときに続きを実行するようにすると共に、登録されている全ての複数のバックグランドプログラムブロックが実行されたときに、その実行されたデータの更新処理を行うバックグランドI/Oデータ更新処理を繰返す機構からなるバックグランドスキャン系と、
を備えてなるプログラム実行処理装置。
A normal scan system comprising a mechanism that sequentially executes a registered program block or a plurality of program blocks and repeats an I / O data update process for updating data processed in the program block;
The normal scan system is provided with a background scan for executing a single or a plurality of background program blocks that are executed in the background for a fixed time during the execution of the single or a plurality of program blocks,
The single or plural background program blocks executed in the predetermined time are sequentially executed in the order registered for the predetermined time, and when the predetermined time is reached, the program execution process is interrupted at that stage, and the next When the background scan arrives, the continuation is executed, and when all the registered plurality of background program blocks are executed, the background I / I for updating the executed data is executed. A background scan system comprising a mechanism for repeating the O data update process;
A program execution processing apparatus comprising:
前記通常スキャン系に設けたバックグランドスキャンは、複数設けるようにしたことを特徴とする請求項1に記載のプログラム実行処理装置。   2. The program execution processing apparatus according to claim 1, wherein a plurality of background scans provided in the normal scan system are provided. 登録されている単一又は複数のプログラムブロックを順次に実行すると共に、そのプログラムブロックで処理されたデータを更新処理するI/Oデータ更新処理を繰返す機構からなる通常スキャン系と、
前記通常スキャン系に、前記単一又は複数のプログラムブロックを実行する間に一定時間のバックグランドで実行する単一又は複数のバックグランドプログラムブロックを実行するバックグランドスキャンを設け、
前記一定時間で実行する前記単一又は複数のバックグランドプログラムブロックは、前記一定時間を前記単一又は複数のバックグランドプログラムブロックで等分し、その等分された一定時間づつ前記単一又は複数のバックグランドプログラムブロックを切り替えて実行すると共に、実行が終了したバックグランドプログラムブロック毎にその実行されたデータの更新処理を行うバックグランドI/Oデータ更新処理を繰返す機構からなるバックグランドスキャン系と、
を備えてなるプログラム実行処理装置。
A normal scan system comprising a mechanism that sequentially executes a registered program block or a plurality of program blocks and repeats an I / O data update process for updating data processed in the program block;
The normal scan system is provided with a background scan for executing a single or a plurality of background program blocks that are executed in the background for a fixed time during the execution of the single or a plurality of program blocks,
The single or plural background program blocks to be executed at the predetermined time are divided equally by the single or plural background program blocks, and the single or plural background program blocks are equally divided by the constant time. A background scan system comprising a mechanism that repeats the background I / O data update process for performing the update process of the executed data for each background program block that has been executed, while switching the background program blocks of ,
A program execution processing apparatus comprising:
前記通常スキャン系に設けたバックグランドスキャンは、複数設けるようにしたことを特徴とする請求項3に記載のプログラム実行処理装置。
4. The program execution processing apparatus according to claim 3, wherein a plurality of background scans provided in the normal scan system are provided.
JP2004079970A 2004-03-19 2004-03-19 Program execution processor Pending JP2005267335A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004079970A JP2005267335A (en) 2004-03-19 2004-03-19 Program execution processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004079970A JP2005267335A (en) 2004-03-19 2004-03-19 Program execution processor

Publications (1)

Publication Number Publication Date
JP2005267335A true JP2005267335A (en) 2005-09-29

Family

ID=35091812

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004079970A Pending JP2005267335A (en) 2004-03-19 2004-03-19 Program execution processor

Country Status (1)

Country Link
JP (1) JP2005267335A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4894961B1 (en) * 2011-03-15 2012-03-14 オムロン株式会社 PLC CPU unit, PLC system program, and recording medium storing PLC system program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4894961B1 (en) * 2011-03-15 2012-03-14 オムロン株式会社 PLC CPU unit, PLC system program, and recording medium storing PLC system program
WO2012124133A1 (en) * 2011-03-15 2012-09-20 オムロン株式会社 Cpu of plc, system program for plc, and recording medium storing system program for plc
CN103403633A (en) * 2011-03-15 2013-11-20 欧姆龙株式会社 Cpu of plc, system program for plc, and recording medium storing system program for plc
CN103403633B (en) * 2011-03-15 2016-08-10 欧姆龙株式会社 The central processor unit of Programmable Logic Controller
US9618922B2 (en) 2011-03-15 2017-04-11 Omron Corporation CPU of PLC, system program for PLC, and recording medium storing system program for PLC

Similar Documents

Publication Publication Date Title
KR970016979A (en) Queuing system and method of tasks in a multiprocessing system
JP2009301500A (en) Task processing system and task processing method
CN108292236B (en) Information processing method and device
JP2001202258A (en) Rear time processor
JP2005267335A (en) Program execution processor
CN111158875A (en) Multi-module-based multi-task processing method, device and system
US9442761B2 (en) Sequence controller
US20100180279A1 (en) Field control device and field control method
JP2006277744A (en) Structuring staggered job termination pattern
US10769090B2 (en) Information processing apparatus, control method of information processing, and non-transitory computer-readable storage medium for storing program
US7076641B2 (en) Programmable controller
CN109948785B (en) High-efficiency neural network circuit system and method
JPH06259115A (en) Programmable controller
JP6940283B2 (en) DMA transfer control device, DMA transfer control method, and DMA transfer control program
JP2005173859A (en) Memory access control circuit
KR20220138137A (en) Method and apparatus for processing programmable logic controller commands
JPH06295246A (en) Instruction scheduling system
JPH04257915A (en) Information processor
JPH1165624A (en) Programmable controller
JP6204313B2 (en) Electronics
JP2013125288A (en) Data processing device and data processing method
CN113778640A (en) Task execution method and device, electronic equipment and storage medium
JPS6146532A (en) Microprogram control circuit
JPH0895805A (en) Task management device
JPH0754497B2 (en) Shared I / O device control method

Legal Events

Date Code Title Description
A621 Written request for application examination

Effective date: 20060703

Free format text: JAPANESE INTERMEDIATE CODE: A621

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090113

A131 Notification of reasons for refusal

Effective date: 20090119

Free format text: JAPANESE INTERMEDIATE CODE: A131

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090220

A02 Decision of refusal

Effective date: 20090330

Free format text: JAPANESE INTERMEDIATE CODE: A02