JPS6349902A - Controlling method for programmable controller - Google Patents

Controlling method for programmable controller

Info

Publication number
JPS6349902A
JPS6349902A JP19417886A JP19417886A JPS6349902A JP S6349902 A JPS6349902 A JP S6349902A JP 19417886 A JP19417886 A JP 19417886A JP 19417886 A JP19417886 A JP 19417886A JP S6349902 A JPS6349902 A JP S6349902A
Authority
JP
Japan
Prior art keywords
program
sequence
computer program
processor
programmable controller
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
JP19417886A
Other languages
Japanese (ja)
Inventor
Masami Yuki
結城 正美
Takashi Yoshizawa
吉沢 隆司
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP19417886A priority Critical patent/JPS6349902A/en
Publication of JPS6349902A publication Critical patent/JPS6349902A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To shorten processing time and to improve processing capacity by executing one computer program in accordance with priority even if the other computer program is in waiting. CONSTITUTION:In a programmable controller, a general purpose processor 3 is coupled with a sequence processor 4 through a linkage device 5 and various programs are stored in a memory 6. The linkage device 5 is constituted of a program counter 7, a start command F/F 8 and an end informing F/F 9. A control program or the like is stored in the memory 6, and when a computer program Cig starts a sequence program Skl based on said program, the program Cig is waited until the program Skl is ended. On the other hand, the other computer program is executed in accordance with its assigned priority. Consequently, the processing time of the whole system can be shortened.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、プログラマブルコントローラの制御方法に係
り、特に、シーケンスプロセッサと汎用プロセッサとが
結合されたプログラマブルコントローラの制御方法に関
する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a method of controlling a programmable controller, and particularly to a method of controlling a programmable controller in which a sequence processor and a general-purpose processor are combined.

〔従来の技術〕[Conventional technology]

従来の一般に、シーケンスプログラムとコンピュータプ
ログラムを共に実行できるようにしたプログラマブルコ
ントローラは、1つのプロセッサ1を共用してプログラ
ムメモリ2に格納されたシーケンスプログラム5kil
l  およびコンピュータプログラムC1jに基づいて
、時分割制御によりそt、ぞれの仕事を実行する方式の
ものであった(第2図参照)。
In general, conventional programmable controllers that can execute both sequence programs and computer programs share one processor 1 and store 5 kilos of sequence programs in a program memory 2.
It was a type of system in which each task was executed by time-sharing control based on the computer program C1j and the computer program C1j (see Fig. 2).

ところが、最近では制御動作の高速性が要求され、この
要請に応するべく、第3図に示すように、コンピュータ
プログラムCを実行する汎用プロセッサ3とシーケンス
プログラムSを専用的に実行するシーケンスプロセッサ
4とにそれぞれを分割して各プログラムを専用的に実行
させる数列方式%式% 〔発明が解決しようとする問題点〕 上記並列方式のプログラマブルコントローラにおける問
題点は、シーケンスプログラムおよびコンピュータプロ
グラムの効率的な管理が充分に行われていないという点
にある。
However, recently there has been a demand for high-speed control operations, and in order to meet this demand, as shown in FIG. 3, a general-purpose processor 3 that executes a computer program C and a sequence processor 4 that exclusively executes a sequence program [Problems to be Solved by the Invention] The problem with the above-mentioned parallel programmable controller is that it is difficult to efficiently execute sequence programs and computer programs. The problem is that there is not enough management.

すなわち、第4図に示すように、シーケンスプログラム
Sllは内部レジスタG010が起動されることにより
実行され、内部レジスタG○11がONとなることによ
り停止される(第4図(a))。
That is, as shown in FIG. 4, the sequence program Sll is executed when the internal register G010 is activated, and is stopped when the internal register G011 is turned ON (FIG. 4(a)).

コンピュータプログラムC11およびCtxの実行とと
もにシーケンスプログラムが実行される場合は。
If the sequence program is executed along with the execution of the computer programs C11 and Ctx.

まずコンピュータプログラムC11が実行され、終了し
た時点でシーケンスプログラム実行の要求の有無判断を
経て次のコンピュータプログラムCxxに移る(第4図
(b))、この場合に、第4図(c)かられかるように
各プロセッサは時間的に交互に起動され、一方が実行中
は他のプロセッサは時期していることとなる。その結果
、プログラマブルコントローラ全体としての性能はいず
れか処理速度の遅い方のプロセッサによって決まってし
まうこととなり、2つのプロセッサを備えているにも拘
らず、効率的な運用ができず、それが故に高速性に限界
がある。
First, the computer program C11 is executed, and when it is finished, it is determined whether or not there is a request to execute the sequence program, and then the next computer program Cxx is executed (FIG. 4(b)). In this way, the processors are activated alternately, and while one processor is running, the other processors are running. As a result, the performance of the programmable controller as a whole is determined by whichever processor has the slower processing speed, and even though it is equipped with two processors, it cannot be operated efficiently. There are limits to sexuality.

そこで、本発明は、2台の専用プロセッサを備えたプロ
グラマブルコントローラにおいて、各プロセッサを効率
よく動作させることが可能な制御方法を提供することを
目的とする。
SUMMARY OF THE INVENTION Therefore, an object of the present invention is to provide a control method capable of efficiently operating each processor in a programmable controller equipped with two dedicated processors.

〔問題点を解決するための手段〕[Means for solving problems]

上記問題点を解決するために、本発明は、シーケンスプ
ログラムを専用に実行するシーケンスプロセッサと、コ
ンピュータプログラムを実行する汎用プロセッサとを備
えたプログラマブルコントローラの制御方法において、 前記汎用プロセッサによりシーケンスプロセッサを起動
して特定シーケンスプログラムを実行する場合に、前記
起動命令を与えたコンピュータプログラムを起動された
シーケンスプログラムの実行が終了するまで時期状態に
するとともに、この時期期間中は予め登録された優先度
に従って他のコンピュータプログラムを実行させること
を特徴とするものである。
In order to solve the above problems, the present invention provides a method for controlling a programmable controller including a sequence processor that exclusively executes a sequence program and a general-purpose processor that executes a computer program, including: activating the sequence processor by the general-purpose processor. When executing a specific sequence program, the computer program that gave the activation command is kept in the timing state until the execution of the activated sequence program is completed, and during this period, other programs are activated according to the priority registered in advance. It is characterized by causing a computer program to be executed.

〔作用〕[Effect]

上記構成を有する本発明によれば、シーケンスプログラ
ムに対して起動命令を与えたコンピュータプログラムは
当該シーケンスプログラムの実行が終了するまで時期す
ることになるが、この時期期間中は予め登録された優先
度に従イて他のコンピュータプログラムを実行するため
、汎用プロセッサに全くの空き時間が生じることを抑制
しうろこととなり、したがって各プロセッサの効果的な
動作が可能となり、かつ、プログラマブルコントローラ
全体としての処理時間の短縮化、能力の向上を達成する
ことができる。
According to the present invention having the above configuration, the computer program that has given the startup command to the sequence program will wait until the execution of the sequence program is completed, but during this period, the priority registered in advance is Since other computer programs are executed according to the programmable controller, it is possible to prevent the general-purpose processor from having any idle time, and therefore each processor can operate effectively, and the programmable controller as a whole can perform its processing efficiently. It is possible to reduce time and improve abilities.

〔実施例〕〔Example〕

次に、本発明の実施例を図面に基づいて説明する。 Next, embodiments of the present invention will be described based on the drawings.

まず、第5図は、プログラマブルコントローラにおける
コンピュータプログラムCtx〜C,la、シーケンス
プログラム311〜Snsと各設備1〜nとの対応例を
示す概念図である0図示するように、各設備に対しては
各シーケンスプログラムおよびコンピュータプログラム
が割当てられているものとする。
First, FIG. 5 is a conceptual diagram showing an example of correspondence between computer programs Ctx to C, la, sequence programs 311 to Sns, and each equipment 1 to n in a programmable controller. It is assumed that each sequence program and computer program are assigned.

第6図に、本発明の制御方法を実行するプログラマブル
コントローラの構成例を示す、汎用プロセッサ3とシー
ケンスプロセッサ4とはリンケージ装置5を介して結合
されており、各種プログラムはメモリ6に格納されてい
る。
FIG. 6 shows a configuration example of a programmable controller that executes the control method of the present invention. A general-purpose processor 3 and a sequence processor 4 are coupled via a linkage device 5, and various programs are stored in a memory 6. There is.

リンケージ装置t!5は、シーケンスプロセッサ3が実
行すべきプログラムアドレスを示すプログラムカウンタ
7と、シーケンスプロセッサを起動するための起動指令
フリップフロップ(F/F)8と、シーケンスプログラ
ム中にシーケンス終了命令を検出した場合に汎用プロセ
ッサ3に対して終了報告を行うための終了報告フリップ
フロップ(F/F)9とを備えて構成される。
Linkage device t! 5 is a program counter 7 that indicates a program address to be executed by the sequence processor 3, a start command flip-flop (F/F) 8 for starting the sequence processor, and a flip-flop (F/F) 8 for starting a sequence processor when a sequence end command is detected during a sequence program. It is configured to include a completion reporting flip-flop (F/F) 9 for reporting completion to the general-purpose processor 3.

メモリ6には、プログラマブルコントローラ全体を管理
するための管理プログラム(オペレーションシステム:
O8)、シーケンスプログラムSijおよびコンピュー
タプログラムCk12 (アプリケーションプログラム
として)がそれぞれ格納されている。
The memory 6 stores a management program (operation system:
O8), a sequence program Sij, and a computer program Ck12 (as an application program) are stored, respectively.

次に、本発明に係る制御方法を動作順に従って説明する
。なお、動作は管理プログラムにより制御されるもので
ある。本発明は要旨は、管理プログラムによりコンピュ
ータプログラムC1jがシーケンスプログラムSkQを
起動した場合に、そのシーケンスプログラムSkQ が
終了するまでの間。
Next, the control method according to the present invention will be explained according to the order of operation. Note that the operation is controlled by a management program. The gist of the present invention is that when the computer program C1j starts the sequence program SkQ by the management program, the period until the sequence program SkQ ends.

当該コンピュータプログラムC1jが時期する。−方、
他のコンピュータプログラムをその割当てられた優先度
に従って実行させる点にある。
The computer program C1j is executed. - direction,
The point is that other computer programs are executed according to their assigned priorities.

概略動作を説明すると、次の通りである。第6図に示す
ように、コンピュータプログラムC1jは、P1〜P4
と4つあるものとする。各コンピュータプログラムP1
〜P4は、特定の制御ステップにおいて、シーケンスプ
ログラム81〜S3を起動する。
The general operation is as follows. As shown in FIG. 6, the computer program C1j includes P1 to P4.
Assume that there are four. Each computer program P1
~P4 starts the sequence programs 81~S3 in a specific control step.

コンピュータプログラムPr−Plの優先度は適用する
プラント等の特性に適合するよう定め、例えばPL>P
l>Pa>Plとする。まず、Plが動き出し、Stを
起動する。Slを起動後、次の優先度のPzが動き出し
、S3を起動する。Saは、Stが終了後動き出す。P
’zが88を起動後、次の優先度のPaが動き出す。S
lの終了後、シーケンスプロセッサ4は、Saを実行す
る。St終了時、Paが動作中であるが、Plの方が優
先度が高いのでPaは中断され、PLが動作する。あと
は、同様に、第6図のタイムチャートのように、Pz〜
P4゜S1〜S11が動作する。
The priority of the computer program Pr-Pl is determined to suit the characteristics of the plant to which it is applied, for example, PL>P.
Let l>Pa>Pl. First, Pl starts moving and starts St. After activating Sl, Pz with the next priority starts moving and activates S3. Sa starts moving after St ends. P
After 'z starts 88, Pa with the next priority starts moving. S
After completion of l, the sequence processor 4 executes Sa. When St ends, Pa is in operation, but since Pl has a higher priority, Pa is interrupted and PL operates. Similarly, as shown in the time chart of Figure 6, Pz~
P4°S1 to S11 operate.

次に、各動作態様ごとに詳述する。第7図(a)に示す
ように、コンピュータプログラムC1jより。
Next, each operation mode will be explained in detail. As shown in FIG. 7(a), from the computer program C1j.

シーケンスプログラムSkiを起動する場合、CALL
  l5UB (P、NO)記述する。P、NOは起動
したいシーケンスプログラムのプログラムナンバーであ
る。
When starting the sequence program Ski, CALL
l5UB (P, NO) Describe. P and NO are the program numbers of the sequence program to be started.

逆に、シーケンスプログラムよりコンピュータプログラ
ムを起動する場合、第7図(b)に示すように特殊コイ
ルPo1oを使用する。パラメータとしては、起動した
いコンピュータプログラムのプログラムN OP 1 
と属性(タスクまたはサブルーチン)Paである。
Conversely, when starting a computer program from a sequence program, a special coil Po1o is used as shown in FIG. 7(b). As a parameter, program NOP 1 of the computer program you want to start
and the attribute (task or subroutine) Pa.

第10図は、コンピュータプログラムC1jより、シー
ケンスプログラムSkQ  を起動する場合のシーケン
スプロセッサーの待テーブルを示す、各ブロックにはシ
ーケンスプログラムのプログラムNo、100、シーケ
ンスプログラムの先頭アドレス101、起動したコンピ
ュータプログラムのプログラムNo、102次のブロッ
クの先頭アドレス103の情報が格納されている。
FIG. 10 shows the wait table of the sequence processor when the sequence program SkQ is started from the computer program C1j. Each block contains the program number of the sequence program, 100, the start address of the sequence program, 101, and the computer program started. Information about the program number, 102, and the start address 103 of the next block is stored.

第8図は、コンピュータプログラムC1jよりシーケン
スプログラムSkQを起動する場合(第7図(a))の
管理プログラムの概略フローを示す。
FIG. 8 shows a schematic flow of the management program when the sequence program SkQ is started from the computer program C1j (FIG. 7(a)).

まず、パラメータ(プログラムNo)を取出しくステッ
プ200)、コンピュータプログラムC1jのステータ
スを「シーケンスプロセッサ待ち」の状態とする(ステ
ップ201)、次に、第10図のシーケンスプロセッサ
待ちテーブルへ登録する(ステップ202)、シーケン
スプロセッサ4が他のシーケンスプログラム実行中でな
い場合には、シーケンスプログラムを直ちに起動させる
(ステップ203,205)。その後、優先レベルに従
ってコンピュータプログラムを動作させる。
First, the parameter (program number) is extracted (step 200), the status of the computer program C1j is set to "waiting for sequence processor" (step 201), and then it is registered in the sequence processor waiting table shown in FIG. 10 (step 200). 202), if the sequence processor 4 is not executing another sequence program, it immediately starts the sequence program (steps 203, 205). The computer program is then operated according to the priority level.

第9図は、シーケンスプロセッサ4が「シーケンスプロ
グラム終了命令」を検出して、汎用プロセッサ3に報告
した時の管理プログラムの概略フローを示す。まず、第
10図のシーケンスプロセッサ待ちテーブルより削除し
くステップ30o)、コンピュータプログラムのステー
タスを「シーケンスプロセッサ待ち」の状態より更新す
る(ステップ301)。
FIG. 9 shows a schematic flow of the management program when the sequence processor 4 detects a "sequence program end instruction" and reports it to the general-purpose processor 3. First, the computer program is deleted from the sequence processor waiting table in FIG. 10 (step 30o), and the status of the computer program is updated from the "sequence processor waiting" state (step 301).

次に、シーケンスプロセッサ待ちテーブルに待ブロック
があれば、そのシーケンスプログラムを起動する(ステ
ップ302,303)、その後、優先レベルに従ってコ
ンピュータプログラムを動作させる(ステップ304)
Next, if there is a waiting block in the sequence processor waiting table, that sequence program is started (steps 302, 303), and then the computer program is operated according to the priority level (step 304).
.

これにより、シーケンスプロセッサ4と汎用プロセッサ
3を遊ばせることなく効率よく使用することが出きる。
Thereby, the sequence processor 4 and the general-purpose processor 3 can be used efficiently without being idle.

〔発明の効果〕〔Effect of the invention〕

以上述べたように、本発明によれば、−のコンピュータ
プログラムが時期中であっても優先度に応じて他のコン
ピュータプログラムを実行するため、汎用プロセッサの
動作に空き時間が生じることを抑制することができる。
As described above, according to the present invention, other computer programs are executed according to the priority even if the - computer program is in progress, thereby suppressing the occurrence of idle time in the operation of the general-purpose processor. be able to.

その結果、並列的にプロセッサを使用するプログラマブ
ルコントローラにあって、全体としての処理時間の短縮
化、処理能力の向上を達成することができる。
As a result, in a programmable controller that uses processors in parallel, it is possible to shorten the overall processing time and improve processing capacity.

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

第1図(a)は本発明の実施例を示すフローチャート、
(b)はそのタイムチャート、第2図(a)は従来のプ
ログラムコントローラの構成を成を示すブロック図、(
b)はそのタイムチャート、第4図(a)は従来例のシ
ーケンスプログラムのフローチャート、(b)はコンピ
ュータプログラムのフローチャート、(Q)はそのタイ
ムチャート、第5図はプログラムコントローラと設備の
対応関係を示すブロック図、第6図は本発明の制御方法
を実行するプログラマブルコントローラの構成例を示す
ブロック図、第7図(a)はコンピュータプログラムか
らシーケンスプログラムを起動する場合のフローチャー
ト、(b)はシーケンスプログラムからコンピュータプ
ログラムを起動する場合のフローチャート、第8図は管
理プログラム例を示すフローチャート、第9図は他の管
理プログラム例を示すフローチャート、第10図は管理
テーブルの例を示す説明図である。 3・・・汎用プロセッサ、4・・・シーケンスプロセッ
サ、5・・・リンケージ装置、6・・・メモリ、O8・
・・管理プログラム、C1j・・・コンピュータプログ
ラム、5kfl・・・シーケンスプログラム。
FIG. 1(a) is a flowchart showing an embodiment of the present invention;
(b) is a time chart thereof, and FIG. 2(a) is a block diagram showing the configuration of a conventional program controller.
b) is its time chart, Fig. 4 (a) is a flow chart of a conventional sequence program, (b) is a flow chart of a computer program, (Q) is its time chart, and Fig. 5 is the correspondence between the program controller and equipment. FIG. 6 is a block diagram showing a configuration example of a programmable controller that executes the control method of the present invention, FIG. 7(a) is a flowchart when starting a sequence program from a computer program, and FIG. FIG. 8 is a flowchart showing an example of a management program; FIG. 9 is a flowchart showing another example of a management program; FIG. 10 is an explanatory diagram showing an example of a management table. . 3... General-purpose processor, 4... Sequence processor, 5... Linkage device, 6... Memory, O8.
...Management program, C1j...Computer program, 5kfl...Sequence program.

Claims (1)

【特許請求の範囲】 1、シーケンスプログラムを専用に実行するシーケンス
プロセッサと、コンピュータプログラムを実行する汎用
プロセッサとを備えたプログラマブルコントローラの制
御方法において、 前記汎用プロセッサによりシーケンスプロセッサを起動
して特定シーケンスプログラムを実行する場合に、前記
起動命令を与えたコンピュータプログラムを起動された
シーケンスプログラムの実行が終了するまで、待期状態
にするとともに、この待期期間中は予め登録された優先
度に従つて他のコンピュータプログラムを実行させるこ
とを特徴とするプログラマブルコントローラの制御方法
[Claims] 1. A method for controlling a programmable controller including a sequence processor that exclusively executes a sequence program and a general-purpose processor that executes a computer program, wherein the general-purpose processor starts up the sequence processor to execute a specific sequence program. When executing the computer program, the computer program that gave the activation command is placed in a standby state until the sequence program that has been started finishes execution, and during this waiting period, other programs are executed according to the priority registered in advance. A method for controlling a programmable controller, the method comprising: executing a computer program.
JP19417886A 1986-08-20 1986-08-20 Controlling method for programmable controller Pending JPS6349902A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19417886A JPS6349902A (en) 1986-08-20 1986-08-20 Controlling method for programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19417886A JPS6349902A (en) 1986-08-20 1986-08-20 Controlling method for programmable controller

Publications (1)

Publication Number Publication Date
JPS6349902A true JPS6349902A (en) 1988-03-02

Family

ID=16320227

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19417886A Pending JPS6349902A (en) 1986-08-20 1986-08-20 Controlling method for programmable controller

Country Status (1)

Country Link
JP (1) JPS6349902A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013084169A (en) * 2011-10-12 2013-05-09 Hitachi Ltd Controller and processing method of task and ladder

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59214906A (en) * 1983-05-20 1984-12-04 Meidensha Electric Mfg Co Ltd Programmable controller for controlling instrumentation
JPS60156162A (en) * 1984-01-25 1985-08-16 Hitachi Ltd Arithmetic unit

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59214906A (en) * 1983-05-20 1984-12-04 Meidensha Electric Mfg Co Ltd Programmable controller for controlling instrumentation
JPS60156162A (en) * 1984-01-25 1985-08-16 Hitachi Ltd Arithmetic unit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013084169A (en) * 2011-10-12 2013-05-09 Hitachi Ltd Controller and processing method of task and ladder

Similar Documents

Publication Publication Date Title
US8145820B2 (en) Multiprocessor system and computer program product
JP2001265609A (en) Arithmetic processor
JP2001256062A (en) Interruption processing method and operation processor using the same
JPS6349902A (en) Controlling method for programmable controller
JPH07141208A (en) Multitask processor
JP3893136B2 (en) Embedded computer control program, recording medium recording the program, and embedded system
JPH07191863A (en) Multitask execution managing system
JP2643804B2 (en) Debug method
CN110262839B (en) Scheduling method and device of processor and storage medium
JPH0433127A (en) Check point control system
JPH03157733A (en) Task ready queue managing device
JPH01169540A (en) Time division multi-task execution device
JP2581327B2 (en) Virtual machine I / O interrupt handling method
JPH02113363A (en) Time slice controlling system for multiprocessor system
JP2555386B2 (en) Electronic computer system
JPS5995651A (en) Altering method of memory data
JPH02202635A (en) Task control method
JPH07134656A (en) Interruption control method and multi-task system for realizing the same
JPH02110739A (en) Central processing unit for multi-task
JPS6154542A (en) Task control system
JPS6027032A (en) Program starting method
JPH064319A (en) Shared routine control system in operating system
JPH08263317A (en) Check point and restart processing system
JPH02234268A (en) Vector instruction processing system
JPH07210403A (en) Task switching system