[go: up one dir, main page]

JPH01119804A - Scan time fixing system for programmable controller - Google Patents

Scan time fixing system for programmable controller

Info

Publication number
JPH01119804A
JPH01119804A JP27785487A JP27785487A JPH01119804A JP H01119804 A JPH01119804 A JP H01119804A JP 27785487 A JP27785487 A JP 27785487A JP 27785487 A JP27785487 A JP 27785487A JP H01119804 A JPH01119804 A JP H01119804A
Authority
JP
Japan
Prior art keywords
time
scan time
maximum
present
scan
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
JP27785487A
Other languages
Japanese (ja)
Inventor
Tomitsugu Sugimoto
富嗣 杉本
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP27785487A priority Critical patent/JPH01119804A/en
Publication of JPH01119804A publication Critical patent/JPH01119804A/en
Pending legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PURPOSE:To execute a sequence program by a prescribed scan time by executing the sequence program, and thereafter, comparing it with the maximum execution time up to the present and taking its difference and waiting for the next execution by its time difference. CONSTITUTION:A scan time T1' being in the course of operation at present and the maximum scan time T1 up to that time are compared, and when the present scan time T1' is shorter than the maximum scan time T1, an interruption flag is turned ON, and a value which has added a waiting time T4 to the scan time T1' being in the course of operation at present, and the maximum scan time T1 up to that time are compared. When both of them are equal, the present scan time T1' is cleared, the interruption flag is turned OFF and a time waiting processing is completed. Supposing the added value is shorter than the maximum scan time T1, the waiting time T4 is surther provided. Also, when the present scan time T1' is longer than the maximum scan time T1 up to that time, the present scan time T1' is registered as the maximum scan time T1, and a series of processings are completed.

Description

【発明の詳細な説明】 〔産業上の利用分野) 本発明はプログラマブルコントローラのスキャンタイム
一定化方式に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a scan time constant method for a programmable controller.

(従来の技術) 従来のプログラマブルコントローラの処理方式を第5図
及び第6図に基づいて説明する。第5図はプログラマブ
ルコントローラ(以下rPCJと称す)の構成を示す図
で、P C(1)は、周辺機器(2)により作成された
シーケンスプログラムを記憶するプログラム記憶部(3
)と、周辺機器(2)におけるデータを記憶するデータ
記憶部(4)と、プログラム記憶部(3)のシーケンス
プログラムに基づいて演算処理する演算部(5)とを備
えるとともに、人力部(6)及び出力部(7)によって
データを制御するように構成されている。
(Prior Art) A processing method of a conventional programmable controller will be explained based on FIGS. 5 and 6. Figure 5 is a diagram showing the configuration of a programmable controller (hereinafter referred to as rPCJ).
), a data storage unit (4) that stores data in the peripheral device (2), and a calculation unit (5) that performs calculation processing based on the sequence program of the program storage unit (3). ) and an output unit (7).

次にプログラマブルコントローラのスキャンタイムにつ
いて説明すると、スキャンタイムは、PC(1)の周辺
機器(2)からのシーケンスプログラムを0ステツプ目
からENDfi理まて実行させるに要する時間T、と、
このプログラムを動作させるための0N10FF情報を
外部から人力部(6)を介して取り込み、その情報に基
づいて演算部(5)において演算処理し、演算結果を出
力部(7)を介して出力するに要する時間、つまり0N
10FF情報の取り込み及びその出力に要する時間(以
下「リフレッシュタイム」と称す)T2 との和T3を
言い、プログラマブルコントローラはスキャンタイムを
1周期としてシーケンスプログロムに基づいた動作をす
る。
Next, to explain the scan time of the programmable controller, the scan time is the time T required to execute the sequence program from the peripheral device (2) of the PC (1) from the 0th step to the end.
The 0N10FF information for operating this program is imported from the outside via the human power section (6), and based on that information, it is processed in the arithmetic section (5), and the arithmetic results are output via the output section (7). The time required for
The programmable controller operates based on a sequence program with the scan time as one cycle.

通常、P C(1)はプログラムのEND処理実行後に
T10 リフレッシュを行ない、新たに0ステツプ目に
戻り実行を再開するようになされ、この−連の動作を繰
り返し行なうようにしている。
Normally, PC(1) performs a T10 refresh after executing the END process of the program, returns to step 0 and resumes execution, and this series of operations is repeated.

〔発明が解決しようとする問題点) 従来のプログラマブルコントローラのスキャンタイムT
3は、以上のようにプログラムの実行時間TIとリフレ
ッシュタイムT2との和から成るが、同一シーケンスプ
ログラムてあっても、0N10FF状態を異にしたり、
処理中に割り込みが発生するなどすると実行時間T1に
バラツキが生じ、ひいては入出力制御のバラツキが生じ
て外部機器の制御に支障をもたらす虜れがある。
[Problems to be solved by the invention] Scan time T of conventional programmable controller
3 consists of the sum of the program execution time TI and the refresh time T2 as described above, but even if the sequence program is the same, the 0N10FF state may be different,
If an interrupt occurs during processing, there will be variations in the execution time T1, which will in turn cause variations in input/output control, which may cause trouble in controlling external devices.

本発明は上記問題点を解決するためになされたもので、
実行時間T1にバラツキがあっても一定したスキャンタ
イムでシーケンスプログラムを実行することができるよ
うにして外部機器の制御を安定化することを目的として
いる。
The present invention has been made to solve the above problems,
The purpose of this invention is to stabilize the control of external equipment by making it possible to execute a sequence program with a constant scan time even if there are variations in the execution time T1.

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

本発明に係るプログラマブルコントローラのスキャンタ
イム−走化方式は、シーケンスプログラムの実行後、時
間待ち処理プログラム機能によって今までの最大実行時
間と比較してその差をとり、その時間差だけ次の実行を
待ってスキャンタイムを一定化するようにしたものであ
る。
The scan time running method of the programmable controller according to the present invention is that after the sequence program is executed, it is compared with the maximum execution time up to now using the time waiting processing program function, the difference is calculated, and the next execution is waited for the time difference. This is to make the scan time constant.

〔作用) 本発明によれば時間待ち処理プログラム機能によって実
行時間T1のバラツキにも拘らず、常に最大実行時間T
MAXとの時間差を次の実行迄の待ち時間として実行時
間T、に付与するために、スキャンタイムは最大実行時
間TMAxとリフレッシュT2との和となって一定化す
る。
[Operation] According to the present invention, the maximum execution time T1 is always maintained despite variations in the execution time T1 due to the time waiting processing program function.
In order to add the time difference from MAX to the execution time T as a waiting time until the next execution, the scan time becomes constant as the sum of the maximum execution time TMAX and the refresh T2.

〔実施例〕〔Example〕

以下第1図ないし第4図に示す実施例に基づいて従来と
同−又は相当部分には同一符号を付してその説明は省略
し、本発明の特徴を中心に説明する。第1図は時間待ち
処理プログラム機能を備えたプログラムの実行を示した
フローチャートで、現在勤作中のスキャンタイムT3 
 (図中現スキャンタイム)と、それ迄の最大スキャン
タイムを比較しくステップ100)、現スキャンタイム
が最大スキャンタイムより短かりれば割り込みフラグを
ONにしくステップ101)、現在勤作中のスキャンタ
イムにカウンタC(第4図のカウンタCを探す)加算し
た値とそれ迄の最大スキャンタイムとを比較して(ステ
ップ102)、両者が等しければ現スキャンタイムをク
リアし、割り込みフラグをOFFにして(ステップ10
3)、時間待ち処理を完了する。仮にステップ(102
) において加算が最大スキャンタイムにより短かけれ
ば再度割り込みフラグを第4図に示したようにONにし
てカウンタCH,つまり更に待ち時間を付与して最大ス
キャンタイムに達する迄この処理を繰り返し、最大スキ
ャンタイムに達した時点で上述した処理が行われる。
Hereinafter, based on the embodiment shown in FIGS. 1 to 4, the same or equivalent parts as in the conventional art will be given the same reference numerals, and the description thereof will be omitted, and the description will focus on the features of the present invention. FIG. 1 is a flowchart showing the execution of a program equipped with a time waiting processing program function.
(Current scan time in the figure) and the maximum scan time up to that point are compared (step 100), and if the current scan time is shorter than the maximum scan time, turn on the interrupt flag (step 101), the currently active scan time Compare the value added by counter C (search for counter C in Figure 4) with the maximum scan time up to that point (step 102), and if the two are equal, clear the current scan time and turn off the interrupt flag. (Step 10
3) Complete the time waiting process. Temporarily step (102
), if the addition is shorter than the maximum scan time, the interrupt flag is turned ON again as shown in Figure 4 and the counter CH is added, that is, this process is repeated until the maximum scan time is reached by giving an additional waiting time and the maximum scan time is reached. When the time is reached, the above-described processing is performed.

また、ステップ(100) において現スキャンタイム
がそれ迄の最大スキャンタイムより長ければ現スキャン
タイムを最大スキャンタイムとして登録しステップ(1
04)、上述したステップ(103)に穆り一連の処理
を完了する。
Furthermore, if the current scan time is longer than the maximum scan time up to that point in step (100), the current scan time is registered as the maximum scan time and step (100) is performed.
04), a series of processes are completed at step (103) described above.

上記時間割り込みを第2図に基づいて説明すると、割り
込みフラグは現スキャンタイムがそれ迄の最大スキャン
タイムより短い場合にのみON+、てステップ(200
)、必要な待ち時間をカウントしてステップ(201)
、上記ステップ(102)における処理をする。
To explain the above-mentioned time interrupt based on FIG.
), count the required waiting time and step (201)
, performs the process in step (102) above.

上述したスキャンタイムの変動を第3図、第4図に基づ
いて説明すると、現実行時間T1°がそれ迄の最大実行
時間T、より短かければ、ステップ(101)以降の処
理により時間待ち処理プログラム機能により、実行プロ
グラムのEND処理後に待ち時間T4を加算して最大実
行時間T1に等しくしてスキャンタイムT3を最大スキ
ャンタイムに揃える。従ってシーケンスプログラムのス
キャンタイムは逐次最大スキャンタイムに一定化される
ことになる。この場合、最大スキャンタイムは第4図に
示したように逐次更新され、シーケンスプログラムにお
ける最大スキャンタイムにおいて一定になる。換言すれ
ば最初の実行時間が一連の逐次制御の中にあって最大の
スキャンタイムを有しておれは、そのスキャンタイムに
一定化されることになる。以上のようにスキャンタイム
が一定化することによって外部機器の制御が容易になっ
て安定化する。
To explain the fluctuation of the scan time mentioned above based on FIGS. 3 and 4, the actual execution time T1° is the maximum execution time T up to that point, and if it is shorter, the time waiting process is performed by the processing after step (101). By the program function, after the END processing of the execution program, the wait time T4 is added to make it equal to the maximum execution time T1, and the scan time T3 is made equal to the maximum scan time. Therefore, the scan time of the sequence program is successively fixed to the maximum scan time. In this case, the maximum scan time is updated sequentially as shown in FIG. 4, and becomes constant at the maximum scan time in the sequence program. In other words, if the first execution time has the maximum scan time in a series of sequential controls, then the scan time will be fixed. As described above, by making the scan time constant, control of external equipment becomes easier and stabilized.

〔発明の効果] 以上本発明によればプログラマブルコントローラのスキ
ャンタイムを一定化することができ、外部機器の制御が
容易になり、制御が安定化する。
[Effects of the Invention] As described above, according to the present invention, the scan time of the programmable controller can be made constant, making it easier to control external equipment and stabilizing the control.

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

第1図は本発明に係るスキャンタイム一定力式を示すフ
ローチャート、第2図は時間待ちfi埋における待ち時
間の調整過程を示すフローチャート、第3図はスキャン
タイムを示す図、第4図はスキャンタイムにおける一定
化の過程を示す図、第5図はプログラマブルコントロー
ラを示す構成図、第6図は従来のスキャンタイムを示す
第3図相当図である。 尚、各図中、同一符号は同−又は相当部分を示す。
Fig. 1 is a flowchart showing the scan time constant force formula according to the present invention, Fig. 2 is a flowchart showing the process of adjusting the waiting time in the time waiting fi filling, Fig. 3 is a diagram showing the scan time, and Fig. 4 is the scanning FIG. 5 is a block diagram showing the programmable controller, and FIG. 6 is a diagram corresponding to FIG. 3 showing the conventional scan time. In each figure, the same reference numerals indicate the same or corresponding parts.

Claims (2)

【特許請求の範囲】[Claims] (1)プログラマブルコントローラの周辺装置により作
成されたシーケンスプログラムを実行させた後、その実
行に要する時間と最大実行時間とを比較してその時間差
だけ時間待ち処理プログラム機能により待たせて次の実
行をするようにしてスキャンタイムを一定にするように
したことを特徴とするプログラマブルコントローラのス
キャンタイム一定化方式。
(1) After executing the sequence program created by the peripheral device of the programmable controller, compare the time required for its execution with the maximum execution time, wait for the time difference using the time waiting processing program function, and then execute the next execution. A scan time constant method for a programmable controller, characterized in that the scan time is constant in this manner.
(2)上記時間待ち処理プログラム機能をシーケンスプ
ログラムのEND処理の後に備えたことを特徴とする特
許請求の範囲第1項記載のプログラマブルコントローラ
のスキャンタイム一定化方式。
(2) The scan time constant method for a programmable controller according to claim 1, wherein the time waiting processing program function is provided after the END processing of the sequence program.
JP27785487A 1987-11-02 1987-11-02 Scan time fixing system for programmable controller Pending JPH01119804A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27785487A JPH01119804A (en) 1987-11-02 1987-11-02 Scan time fixing system for programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27785487A JPH01119804A (en) 1987-11-02 1987-11-02 Scan time fixing system for programmable controller

Publications (1)

Publication Number Publication Date
JPH01119804A true JPH01119804A (en) 1989-05-11

Family

ID=17589203

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27785487A Pending JPH01119804A (en) 1987-11-02 1987-11-02 Scan time fixing system for programmable controller

Country Status (1)

Country Link
JP (1) JPH01119804A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0377104A (en) * 1989-08-19 1991-04-02 Fuji Electric Co Ltd programmable controller
US10203162B2 (en) 2014-09-02 2019-02-12 Japan New Energy Co., Ltd. Geothermal heat exchanger, liquid transport pipe, liquid raising pipe, geothermal power generation facility, and geothermal power generation method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0377104A (en) * 1989-08-19 1991-04-02 Fuji Electric Co Ltd programmable controller
US10203162B2 (en) 2014-09-02 2019-02-12 Japan New Energy Co., Ltd. Geothermal heat exchanger, liquid transport pipe, liquid raising pipe, geothermal power generation facility, and geothermal power generation method

Similar Documents

Publication Publication Date Title
JPS6134605A (en) Controlling system of programmable controller
JPH01119804A (en) Scan time fixing system for programmable controller
JPS5860318A (en) Programmable controller
JPH03288906A (en) Instruction executing system for pc
JPH043203A (en) Process monitoring controller
JPH0683652A (en) Microcomputer system
JPS61166631A (en) Microprogram control processor
JPS62117003A (en) Multi-cpu constitution programmable controller
JPH01297728A (en) Microprogram start address generating system
JP3260788B2 (en) Robot control device and method
JPS61147335A (en) Parameter registration system of job
JPH05119810A (en) Sequence controller
JPS63223903A (en) Simulation system for programmable controller
JPS628230A (en) Program specialization system
JPH02137054A (en) Information processor
JPS60207915A (en) Displaying method of arithmetic result on the way in compiler type sequence controller
JPH01263759A (en) Execution priority control system
JPS61220001A (en) Sequence control/direct digital control mixing type process control method
JPH05334098A (en) Method and device for interruption control
JPH0328905A (en) Input/output transfer method for programmable controller
JPS62281009A (en) Numerical controller
JPH01118902A (en) Control system for pc data transfer
JPS58163045A (en) Program counter control device
JPH02224131A (en) Computer system
JPH01133174A (en) Program synchronizing circuit