JPH0934514A - Multitask control system for programmable controller and multitask type programmable controller - Google Patents

Multitask control system for programmable controller and multitask type programmable controller

Info

Publication number
JPH0934514A
JPH0934514A JP17893595A JP17893595A JPH0934514A JP H0934514 A JPH0934514 A JP H0934514A JP 17893595 A JP17893595 A JP 17893595A JP 17893595 A JP17893595 A JP 17893595A JP H0934514 A JPH0934514 A JP H0934514A
Authority
JP
Japan
Prior art keywords
task
program
execution
tasks
system 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.)
Withdrawn
Application number
JP17893595A
Other languages
Japanese (ja)
Inventor
Takuhiro Yoshida
卓弘 吉田
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.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP17893595A priority Critical patent/JPH0934514A/en
Publication of JPH0934514A publication Critical patent/JPH0934514A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To shorten the time necessary for task switching and to improve the processing speed of a programmable controller. SOLUTION: When the tasks X1 to Xn receive the start instructions (a) from a system program SP (S3), these tasks start execution of their processing. Then every task carries on its processing until the information to be saved does not exist when a stop instruction (b) is received after a prescribed time T (S4). When no information to be saved exists, the task execution is stopped and a task request (c) is outputted to a system program SP (S5). The program SP instructs the start of the next task when the request (c) is received from one of tasks X1 to Xn that received the instruction (b) (S6, S2).

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、シーケンスプログ
ラムをマルチタスク方式で処理するプログラマブルコン
トローラのマルチタスク制御方式およびマルチタスク式
プログラマブルコントローラに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a multitasking control system and a multitasking programmable controller for a programmable controller that processes a sequence program in a multitasking system.

【0002】[0002]

【従来の技術】従来より、プログラマブルコントローラ
(以下、シーケンサという)としてマルチタスク方式で
シーケンスプログラムを処理するものが提案されてい
る。すなわち、シーケンスプログラムを複数のタスクに
分割して記述しておき(あるいは、シーケンスプログラ
ムを1つのタスクとして複数のシーケンスプログラムを
同時的に実行することもある)、システムプログラム
(オペレーティングシステム)の一部であるコントロー
ルプログラムにより各タスクの実行と停止とを指示する
ことによって、実行タスクを切り換えながら処理し、見
掛け上で各タスクを並行に処理するのである。各タスク
はタイムスライス制御されるのであって、1つのタスク
が中央処理装置(CPU)を長時間に亙って占有しない
ように、実行タスクは比較的短い時間間隔(通常は一定
時間)で強制的に切り換えられる。このような処理の指
示は、シーケンサの専用言語(現状では専用のBASI
Cを用いている)で記述することができるようになって
いる。
2. Description of the Related Art Conventionally, a programmable controller (hereinafter referred to as a sequencer) that processes a sequence program in a multitasking system has been proposed. That is, the sequence program is divided into a plurality of tasks and described (or, a plurality of sequence programs may be simultaneously executed with the sequence program as one task), and a part of the system program (operating system) By instructing execution and stop of each task by the control program, the processing is performed while switching the execution tasks, and the tasks are apparently processed in parallel. Since each task is time slice controlled, the execution task is forced at a relatively short time interval (usually a fixed time) so that one task does not occupy the central processing unit (CPU) for a long time. Can be switched. Such processing instructions are issued in the dedicated language of the sequencer (currently, the dedicated BASI
C is used).

【0003】上述したマルチタスク方式の中央処理装置
(つまりシステムプログラム)での処理手順を図3
(a)に示す。いま、タスクの個数がmであるとし、タ
スク番号をnで表すものとする。また、各タスクの処理
順序は決まっており、各タスクの実行時間は一定時間で
あるものとする。シーケンスプログラムの処理が開始さ
れると、まずタスク番号nが0に初期化される(S
1)。次に、タスク番号をインクリメントしてタスク番
号を1に設定し(S2)、タスク番号が1のタスクに実
行を指示して起動する(S3)。その後、一定時間が経
過すると、タスク番号が1のタスクに停止を指示する
(S4)。このとき、停止を指示されたタスクは実行中
であっても強制的に停止されるから、実行中の情報をメ
モリ、レジスタなど(以下、メモリという)に一旦退避
して次に起動されるまで待たなければならない。つま
り、実行中の情報をメモリに退避しておき(S5)、次
に起動されたときには退避してあった情報を読み出して
前の実行時の状態から処理を再開するのである。
FIG. 3 shows a processing procedure in the above-mentioned central processing unit (that is, a system program) of the multitask system.
(A). Now, assume that the number of tasks is m and the task number is represented by n. Further, it is assumed that the processing order of each task is fixed and the execution time of each task is a fixed time. When the processing of the sequence program is started, the task number n is first initialized to 0 (S
1). Next, the task number is incremented and the task number is set to 1 (S2), and the task having the task number 1 is instructed to be executed and activated (S3). After that, when a certain period of time elapses, the task with the task number 1 is instructed to stop (S4). At this time, the task instructed to stop is forcibly stopped even if it is being executed. Therefore, until the information is being saved in a memory, register, etc. have to wait. In other words, the information being executed is saved in the memory (S5), the saved information is read out at the next activation, and the process is restarted from the state at the time of the previous execution.

【0004】その後、すべてのタスクを実行したか否か
を判定し(S6)、タスクが残っていれば、タスク番号
nをインクリメントし(S2)、上述のようにタスクの
起動、停止、情報の退避を繰り返す。このようにしてす
べてのタスクを1回ずつ実行した後に、シーケンスプロ
グラムが終了したか否かを判定し、終了していなければ
タスク番号nを再び初期化して(S1)、上記処理を繰
り返す。
After that, it is judged whether or not all the tasks have been executed (S6), and if there are any tasks remaining, the task number n is incremented (S2), and as described above, the tasks are started, stopped, and information is recorded. Repeat evacuation. After all the tasks are executed once in this way, it is judged whether or not the sequence program is completed. If not completed, the task number n is initialized again (S1), and the above process is repeated.

【0005】上述のようにして各タスクを切り換えて順
次実行すれば、各タスクX1 〜Xnは図3(b)のよう
な順序で実行されることになる。図3(b)ではタスク
1〜Xn の起動の指示をaで示し、停止の指示をbで
示してあり、起動から停止までの時間がタスクX1 〜X
n の1回当たりの処理時間Tになる。図中のαは各タス
クX1 〜Xn の停止後に情報をメモリに退避する時間を
示している。さらに、図3(b)に矢印で示すように、
各タスクX1 〜Xn はシステムプログラムSPから一方
的に起動、停止の指示を受け取ることになる。
If the tasks are switched and sequentially executed as described above, the tasks X 1 to X n will be executed in the order shown in FIG. 3B. Figure 3 (b) the shows the start instruction of task X 1 to X n at a, is shown an instruction to stop at b, time task X 1 to X until stop of activation
It becomes the processing time T per n times. In the figure, α indicates the time for saving the information in the memory after stopping the tasks X 1 to X n . Furthermore, as shown by the arrow in FIG.
Each of the tasks X 1 to X n will receive a one-way start / stop instruction from the system program SP.

【0006】[0006]

【発明が解決しようとする課題】上記説明から明らかな
ように、各タスクX1 〜Xn は一定時間ずつタイムスラ
イス制御され、かつシステムプログラムから一方的に起
動、停止の指示を受けるものであるから、タスクX1
n の停止時には次に実行を再開するのに備えて、停止
時点での情報をメモリに退避させておくことが必要にな
る。つまり、各タスクX1 〜Xn は停止のたびに、次の
タスクX1 〜Xn の実行前に情報を退避する時間αが必
要になるのであって、タスクX1 〜Xn の停止から起動
までの間に時間αずつの遅れが生じ、シーケンスプログ
ラムの実行時間がそれだけ長くなる。その結果、単位時
間当たりの処理量が減少し、たとえば実時間での制御を
要する設備には適用できないなどの問題が生じる。
As is clear from the above description, the tasks X 1 to X n are time-slice controlled for a fixed period of time, and one-way start / stop instructions are received from the system program. From task X 1
When X n is stopped, it is necessary to save the information at the time of the stop in the memory in preparation for restarting the execution next. In other words, each task X 1 to X n to the time to stop, there than is needed time α for saving information before execution of the next task X 1 to X n, the Stop Task X 1 to X n A delay of time α occurs before the start-up, and the execution time of the sequence program becomes longer accordingly. As a result, the amount of processing per unit time decreases, and there arises a problem that it cannot be applied to equipment that requires real-time control, for example.

【0007】本発明は上記事由に鑑みて為されたもので
あり、その目的は、タスクの切り換えに要する時間を短
縮することによって、単位時間当たりの処理量を従来よ
りも多くしたプログラマブルコントローラのマルチタス
ク制御方式およびマルチタスク式プログラマブルコント
ローラを提供することにある。
The present invention has been made in view of the above circumstances, and an object of the present invention is to reduce the time required for switching tasks so that the programmable controller multiprocessor has a larger processing amount per unit time than the conventional one. It is to provide a task control system and a multitasking programmable controller.

【0008】[0008]

【課題を解決するための手段】請求項1の発明では、複
数のタスクを有するシーケンスプログラムを処理するに
際して、システムプログラムから各タスクに対して起動
と停止とを指示することにより実行タスクを切り換え、
複数のタスクを見掛け上で並行に処理するプログラマブ
ルコントローラにおいて、各タスクは起動後にシステム
プログラムから停止が指示されると、停止が指示された
時点以降で退避すべき情報が無くなる時点まで実行を継
続した後にタスク切換要求をシステムプログラムに出力
し、システムプログラムは停止を指示したタスクからタ
スク切換要求を受けると次タスクの起動を指示する。
According to a first aspect of the present invention, when a sequence program having a plurality of tasks is processed, the system program instructs each task to start and stop, thereby switching execution tasks,
In a programmable controller that apparently processes multiple tasks in parallel, when each task is instructed to stop by the system program after startup, execution continues until the time when there is no information to be saved after the time when the stop instruction is issued. After that, the task switching request is output to the system program, and when the system program receives the task switching request from the task instructed to stop, the system program instructs to activate the next task.

【0009】請求項2の発明では、複数のタスクを有す
るシーケンスプログラムを格納するプログラムメモリ
と、システムプログラムを格納するシステムメモリと、
システムメモリに格納されたシステムプログラムに従っ
てプログラムメモリに格納されたシーケンスプログラム
を実行する中央処理装置とを備え、システムプログラム
は、シーケンスプログラムの各タスクに対して起動を指
示する起動指示部と、起動指示部による起動の指示から
一定時間後に実行タスクの停止を指示する停止指示部
と、停止指示部による停止の指示に応答して実行タスク
からタスク切換要求が出されると次タスクを実行タスク
に指定した後に起動指示部により次タスクを起動させる
タスク切換部とを備え、各タスクは、システムプログラ
ムから停止が指示されると、停止が指示された時点以降
で退避すべき情報が無くなる時点まで実行を継続した後
にタスク切換要求をシステムプログラムに出力する停止
制御部を備える。
According to a second aspect of the present invention, a program memory for storing a sequence program having a plurality of tasks, a system memory for storing the system program,
A central processing unit that executes the sequence program stored in the program memory according to the system program stored in the system memory, and the system program includes a start instruction unit that instructs each task of the sequence program to start, and a start instruction. When a task switching request is issued from the execution task in response to the stop instruction from the stop instruction unit, the next task is designated as the execution task. A task switching unit that activates the next task later by the activation instruction unit is provided, and when a stop instruction is given from the system program, each task continues execution until the time when there is no information to be saved after the time when the stop instruction is given. After that, a stop control unit for outputting a task switching request to the system program is provided.

【0010】請求項1、2の発明によれば、各タスクは
システムプログラムからの停止の指示後に、退避すべき
情報が無くなる時点まで実行を継続した後にタスク切換
要求をシステムプログラムに出力し、システムプログラ
ムではタスク切換要求を受けると次タスクに起動の指示
を与える。したがって、実行タスクはタスク切換要求を
出力した時点で次にタスクの実行を再開するための情報
を退避する必要がなくなり、従来方法では情報退避に要
していた時間が不要になる。その結果、各タスク間の切
換に要する時間が短縮されることになり、全体としての
処理速度の向上につながるのである。
According to the first and second aspects of the invention, each task outputs a task switching request to the system program after continuing execution until the time when there is no information to be saved after the system program instructs the system program to stop. When the program receives a task switching request, it gives a start instruction to the next task. Therefore, the execution task does not need to save the information for restarting the execution of the task at the time of outputting the task switching request, and the time required for saving the information in the conventional method becomes unnecessary. As a result, the time required for switching between the tasks is shortened, which leads to an improvement in the processing speed as a whole.

【0011】ここにおいて、退避すべき情報が無くなる
時点まで実行を継続するとは、一般にはタスクの強制的
に停止させると次に同じタスクの実行を再開するために
停止時点での情報を保存しておく必要があるのに対し
て、実行の再開用の情報が不要になる区切り目まで実行
を継続することを意味し、タスクの停止の指示を受けた
後は再開用の情報が不要になる区切り目まで処理を実行
した後に実行を停止するのである。つまり、タスクはシ
ステムプログラムからの停止の指示によってただちに実
行を停止しないことがあるが、区切り目に達した後には
実行を停止し、タスク切換要求をシステムプログラムに
与えて次タスクの実行に移行させるのである。
Here, to continue the execution until the time when there is no information to be saved, generally, when the task is forcibly stopped, the information at the time of the stop is saved in order to restart the next execution of the same task. However, it means that the execution is continued until the point where the information for restarting the execution is not needed, and the information for restarting is not needed after receiving the instruction to stop the task. After executing the process up to the eyes, the execution is stopped. In other words, a task may not immediately stop execution due to a stop instruction from the system program, but after the break point is reached, execution is stopped and a task switch request is given to the system program to move to execution of the next task. Of.

【0012】[0012]

【発明の実施の形態】図2にシーケンサの基本構成を示
す。周知のように、シーケンサは、マイクロプロセッサ
よりなる中央処理装置(CPU)1を備え、システムプ
ログラム(オペレーティングシステム)を格納したシス
テムメモリ(ROMおよびRAM)2と、シーケンスプ
ログラムを格納するプログラムメモリ(ROMまたはR
AM)3と、制御対象との間で授受するデータを一時的
に格納するデータメモリ(RAM)4と、制御対象との
インタフェースである入出力I/O5と、電源(図示せ
ず)とを備える。また、システムプログラムやシーケン
スプログラムの作成、修正を行なったり、シーケンサの
動作の監視を行なったりするための支援装置を接続する
支援装置接続用インタフェース6を備えるものある。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 2 shows the basic configuration of a sequencer. As is well known, the sequencer includes a central processing unit (CPU) 1 including a microprocessor, a system memory (ROM and RAM) 2 storing a system program (operating system), and a program memory (ROM storing a sequence program. Or R
AM) 3, a data memory (RAM) 4 for temporarily storing data exchanged with the control target, an input / output I / O 5 which is an interface with the control target, and a power supply (not shown). Prepare There is also provided an assisting device connecting interface 6 for connecting an assisting device for creating and modifying a system program and a sequence program, and for monitoring the operation of a sequencer.

【0013】マルチタスク方式でシーケンスプログラム
を実行するには、シーケンスプログラムをタスク単位で
記述するとともに、システムプログラムを専用言語(こ
こでは専用のBASICを用いている)を用いて記述す
る。本発明では、図1(a)に示す手順でタイムスライ
ス制御を行なう点を特徴としている。ここに、各タスク
にはタスク番号nが付与され、タスク数はmであるもの
とする。すなわち、シーケンスプログラムの処理を開始
すると、従来方法と同様に、まずタスク番号nを0に初
期化し(S1)、タスク番号nをインクリメントしてタ
スク番号を1にする(S2)。次に、タスク番号が1で
あるタスクに対してシステムプログラムから起動を指示
し(S3)、タスク番号が1のタスクを実行する。その
後、一定時間が経過すると、システムプログラムはタス
ク番号が1のタスクに対して停止を要求する(S4)。
ここまでの処理は、従来方法と同様である。ただし、本
発明ではシステムプログラムからタスクの停止要求があ
っても、ただちにタスクを停止するのではなく、タスク
側で退避すべき情報が無くなるまで実行を継続する。タ
スク側で退避すべき情報が無くなればタスクからシステ
ムプログラムにタスク切換要求を発生し(S5)、シス
テムプログラムではタスク切換要求を受けると、すべて
のタスクを実行したか否かを判定し(S6)、実行して
いないタスクが残っていれば、タスク番号nをインクリ
メントして(S2)次タスクを起動するのである(S
3)。また、すべてのタスクを実行した後には、シーケ
ンスプログラムが終了したか否かを判定し(S7)、シ
ーケンスプログラムが終了していなければ、タスク番号
nを再び初期化して上記処理を繰り返す。
In order to execute the sequence program by the multi-task method, the sequence program is described in task units, and the system program is described in a dedicated language (here, dedicated BASIC is used). The present invention is characterized in that time slice control is performed according to the procedure shown in FIG. Here, a task number n is assigned to each task, and the number of tasks is m. That is, when the processing of the sequence program is started, the task number n is first initialized to 0 (S1), and the task number n is incremented to 1 as in the conventional method (S2). Next, the system program instructs the task having the task number 1 to start (S3), and the task having the task number 1 is executed. After that, when a certain time has elapsed, the system program requests the task with the task number 1 to stop (S4).
The processing up to this point is the same as the conventional method. However, in the present invention, even if there is a task stop request from the system program, the task is not stopped immediately, but execution is continued until there is no information to be saved on the task side. If there is no information to be saved on the task side, the task issues a task switching request to the system program (S5), and when the system program receives the task switching request, it is determined whether all the tasks have been executed (S6). If there is a task that has not been executed, the task number n is incremented (S2) and the next task is started (S2).
3). After executing all the tasks, it is determined whether the sequence program is finished (S7). If the sequence program is not finished, the task number n is initialized again and the above process is repeated.

【0014】ところで、タスク側で退避すべき情報と
は、次にタスクの実行を再開するのに必要な情報を意味
している。このようにタスクの区切り目というべき時点
でタスクを停止させれば、タスクの実行の再開に備えて
情報を保存しておく必要がないばかりか、タスク間で授
受される情報もタスクの実行中にメモリ、レジスタ、外
部記憶装置などの所定の場所に読み書きすることがで
き、結局はタスクの停止時点での情報の退避が不要にな
る。
By the way, the information to be saved on the task side means the information necessary for restarting the execution of the task next. If you stop a task at a point where it should be a break point in this way, it is not necessary to save information in preparation for the restart of task execution, and the information exchanged between tasks is also being executed. In addition, it is possible to read and write to a predetermined place such as a memory, a register, an external storage device, etc., and eventually it becomes unnecessary to save the information when the task is stopped.

【0015】つまり、図1(b)に示すように、システ
ムプログラムSPから各タスクX1〜Xn に対して起動
の指示aを行なうと、タスクX1 〜Xn が実行され、起
動の指示aから一定時間Tの経過後に停止の指示bを行
なう。このとき、タスクX1〜Xn において次の実行の
再開に備えて退避すべき情報が有るうちは実行を継続
し、退避すべき情報が無くなればタスクX1 〜Xn から
システムプログラムSPに対してタスク切換要求cを発
生する。タスク切換要求cが発生した時点ではタスクX
1 〜Xn は停止しており、また退避すべき情報も存在し
ないから、システムプログラムSPでは、次タスクに対
する起動の指示aのみを行なう。このようにして、タス
クX1 〜Xn の停止ごとに情報を退避することなく各タ
スクX1 〜Xn を順次実行することになる。ここで、タ
スクX1 〜Xn の停止の指示bから次タスクX1 〜Xn
の起動の指示aが発生するまでの時間をβ1 〜βn とす
れば、各タスクX1 〜Xn が1回の実行に占有する時間
は、T+βi (i=1,2,……n)になる。従来方法
では、同時間はT+αであったから、βi ≒αならば、
タスクX1 〜Xn が1回の実行に占有する時間はあまり
差が生じないが、時間βi は大部分がタスクX1 〜Xn
を実行している時間であり、時間αは情報の退避に用い
られる時間であるから、本発明方法のほうが従来方法に
比較すれば、中央処理装置1をシーケンスプログラムの
実行に用いている時間が長くなり、実質的に処理速度を
大きくしたことになる。言い換えると、従来方法と同処
理を同時間で行なうのであれば、中央処理装置1(シス
テムプログラム)の単位時間当たりの負荷が軽減される
ことになって、従来と同程度の処理を行なうのであれ
ば、従来よりも処理能力の低い中央処理装置1を用いる
ことが可能になる。また、中央処理装置1の処理能力が
従来と同程度であれば、従来方法よりも実時間制御が実
現しやすくなる。
That is, as shown in FIG. 1B, when the system program SP issues a start instruction a to each of the tasks X 1 to X n , the tasks X 1 to X n are executed and the start instruction is issued. After a lapse of a fixed time T from a, a stop instruction b is given. At this time, the tasks X 1 to X n continue execution while there is information to be saved in preparation for the restart of the next execution, and if there is no information to be saved, the tasks X 1 to X n send the system program SP. And a task switching request c is generated. When the task switching request c occurs, task X
Since 1 to X n are stopped and there is no information to be saved, the system program SP only gives the instruction a to start the next task. In this way, the tasks X 1 to X n are sequentially executed without saving the information each time the tasks X 1 to X n are stopped. Here, the task X 1 next task from the instruction b for stopping to X n X 1 to X n
If the time until the activation instruction a of is generated is β 1 to β n , the time occupied by each task X 1 to X n for one execution is T + β i (i = 1, 2, ...). n). In the conventional method, since the same time is T + α, if β i ≈α,
Although there is not much difference in the time occupied by the tasks X 1 to X n for one execution, most of the time β i is the tasks X 1 to X n.
Is the time used for executing the sequence program, and the time α is the time used for saving the information. Therefore, when the method of the present invention is compared with the conventional method, the time used by the central processing unit 1 for executing the sequence program is It is longer and the processing speed is substantially increased. In other words, if the same processing as in the conventional method is performed at the same time, the load per unit time of the central processing unit 1 (system program) is reduced, and the same processing as in the conventional method is performed. For example, it becomes possible to use the central processing unit 1 having a lower processing capacity than the conventional one. Further, if the processing capacity of the central processing unit 1 is about the same as the conventional one, real-time control becomes easier to realize than the conventional method.

【0016】[0016]

【発明の効果】本発明は上述のように、各タスクではシ
ステムプログラムからの停止の指示を受け取ると、停止
の指示を受けた後に退避すべき情報が無くなる時点まで
実行を継続した後にタスク切換要求をシステムプログラ
ムに出力し、システムプログラムではタスク切換要求を
受けると次タスクに起動の指示を与えるので、実行タス
クはタスク切換要求を出力した時点で次にタスクの実行
を再開するための情報を退避する必要がなくなり、従来
方法では情報退避に要していた時間が不要になるのであ
り、各タスク間の切換に要する時間が短縮されることに
なり、全体としての処理速度の向上につながるという利
点がある。
As described above, according to the present invention, when each task receives a stop instruction from the system program, the task switching request is issued after the execution is continued until there is no information to be saved after receiving the stop instruction. Is output to the system program, and the system program gives a start instruction to the next task when the task switching request is received, so the execution task saves the information for restarting the execution of the task at the time when the task switching request is output. Since the time required for saving information in the conventional method is no longer necessary, the time required for switching between tasks is shortened, which leads to an improvement in overall processing speed. There is.

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

【図1】本発明の実施形態を示し、(a)は処理手順を
示すフローチャート、(b)はタスクの実行状態を示す
動作説明図である。
FIG. 1 shows an embodiment of the present invention, (a) is a flowchart showing a processing procedure, and (b) is an operation explanatory view showing a task execution state.

【図2】シーケンサの概略構成を示すブロック図であ
る。
FIG. 2 is a block diagram showing a schematic configuration of a sequencer.

【図3】従来例を示し、(a)は処理手順を示すフロー
チャート、(b)はタスクの実行状態を示す動作説明図
である。
FIG. 3 shows a conventional example, (a) is a flowchart showing a processing procedure, and (b) is an operation explanatory view showing a task execution state.

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

1 中央処理装置 2 システムメモリ 3 プログラムメモリ 4 データメモリ 5 入出力I/O 6 支援装置接続用インタフェース a 起動の指示 b 停止の指示 c タスク切換要求 SP システムプログラム X1 〜Xn タスク1 central processing unit 2 system memory 3 program memory 4 data memory 5 input / output I / O 6 support device connection interface a start instruction b stop instruction c task switching request SP system program X 1 to X n tasks

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 複数のタスクを有するシーケンスプログ
ラムを処理するに際して、システムプログラムから各タ
スクに対して起動と停止とを指示することにより実行タ
スクを切り換え、複数のタスクを見掛け上で並行に処理
するプログラマブルコントローラにおいて、各タスクは
起動後にシステムプログラムから停止が指示されると、
停止が指示された時点以降で退避すべき情報が無くなる
時点まで実行を継続した後にタスク切換要求をシステム
プログラムに出力し、システムプログラムは停止を指示
したタスクからタスク切換要求を受けると次タスクの起
動を指示することを特徴とするプログラマブルコントロ
ーラのマルチタスク制御方式。
1. When processing a sequence program having a plurality of tasks, a system program instructs each task to start and stop, thereby switching execution tasks, and apparently processing a plurality of tasks in parallel. In the programmable controller, when each task is instructed to stop by the system program after starting,
After execution is continued until there is no more information to save after the stop instruction is issued, a task switch request is output to the system program, and the system program starts the next task when the task switch request is received from the task instructed to stop. A multitasking control system for programmable controllers, characterized by instructing.
【請求項2】 複数のタスクを有するシーケンスプログ
ラムを格納するプログラムメモリと、システムプログラ
ムを格納するシステムメモリと、システムメモリに格納
されたシステムプログラムに従ってプログラムメモリに
格納されたシーケンスプログラムを実行する中央処理装
置とを備え、システムプログラムは、シーケンスプログ
ラムの各タスクに対して起動を指示する起動指示部と、
起動指示部による起動の指示から一定時間後に実行タス
クの停止を指示する停止指示部と、停止指示部による停
止の指示に応答して実行タスクからタスク切換要求が出
されると次タスクを実行タスクに指定した後に起動指示
部により次タスクを起動させるタスク切換部とを備え、
各タスクは、システムプログラムから停止が指示される
と、停止が指示された時点以降で退避すべき情報が無く
なる時点まで実行を継続した後にタスク切換要求をシス
テムプログラムに出力する停止制御部を備えることを特
徴とするマルチタスク式プログラマブルコントローラ。
2. A program memory for storing a sequence program having a plurality of tasks, a system memory for storing the system program, and a central processing for executing the sequence program stored in the program memory according to the system program stored in the system memory. The system program includes a device, and a start instruction unit that instructs each task of the sequence program to start,
When a task switching request is issued from the execution task in response to the stop instruction from the stop instruction unit, the next task is changed to the execution task A task switching unit that activates the next task by the activation instructing unit after designation is provided,
Each task must have a stop control unit that outputs a task switching request to the system program after the task is instructed by the system program to continue execution until the time when there is no information to be saved after the time when the stop instruction is issued. Is a multitasking programmable controller.
JP17893595A 1995-07-14 1995-07-14 Multitask control system for programmable controller and multitask type programmable controller Withdrawn JPH0934514A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17893595A JPH0934514A (en) 1995-07-14 1995-07-14 Multitask control system for programmable controller and multitask type programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17893595A JPH0934514A (en) 1995-07-14 1995-07-14 Multitask control system for programmable controller and multitask type programmable controller

Publications (1)

Publication Number Publication Date
JPH0934514A true JPH0934514A (en) 1997-02-07

Family

ID=16057222

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17893595A Withdrawn JPH0934514A (en) 1995-07-14 1995-07-14 Multitask control system for programmable controller and multitask type programmable controller

Country Status (1)

Country Link
JP (1) JPH0934514A (en)

Similar Documents

Publication Publication Date Title
JPH0776894B2 (en) Clock signal control method for processor and information processing system
US6880029B2 (en) Programmable controller
US5940628A (en) Control processor for user setting a change prohibition period during which a program change command will not be executed until the lapse of that period
JPH0934514A (en) Multitask control system for programmable controller and multitask type programmable controller
JPH06208525A (en) Method for switching operation mode of processor
JPH09259004A (en) Debugging method
JPH03118639A (en) Display controller control system for virtual machine
JPH064318A (en) Error detecting system
JPH02236708A (en) Electronic computation processing system
JPS61226820A (en) Data processing resuming system by power restoration
JPS616704A (en) Programmable controller
JP3362673B2 (en) Channel control device
JPH07210403A (en) Task switching system
JPH01169635A (en) Job activating system
JPH0267655A (en) Memory control circuit
JP2000029850A (en) Task controlling method using inter-processor communication of operating system
JPH05250197A (en) Control system of autonomous system configuration circuit
JPH052412A (en) Control program execution system for programmable controller
JPH02113363A (en) Time slice controlling system for multiprocessor system
JPS63173154A (en) System for reading out timer simultaneously in multplex processor system
JPH01217646A (en) Diagnostic process control system for data processor
JP2001147802A (en) Image processor
JPH06105439B2 (en) Program management method
JPS63268003A (en) Programmable controller
JPH0777931A (en) Programable controller

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20021001