JPS59212905A - Control system of programmable controller - Google Patents

Control system of programmable controller

Info

Publication number
JPS59212905A
JPS59212905A JP8596683A JP8596683A JPS59212905A JP S59212905 A JPS59212905 A JP S59212905A JP 8596683 A JP8596683 A JP 8596683A JP 8596683 A JP8596683 A JP 8596683A JP S59212905 A JPS59212905 A JP S59212905A
Authority
JP
Japan
Prior art keywords
program
level
processing
sequence
processed
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
JP8596683A
Other languages
Japanese (ja)
Inventor
Akira Nagamine
永峰 侃
Seiji Ishii
石井 清次
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.)
Fanuc Corp
Original Assignee
Fanuc 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 Fanuc Corp filed Critical Fanuc Corp
Priority to JP8596683A priority Critical patent/JPS59212905A/en
Publication of JPS59212905A publication Critical patent/JPS59212905A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)

Abstract

PURPOSE:To prevent the increment of the processing cycle by processing a sequence program after dividing said program into three levels in accordance with the processing speed. CONSTITUTION:A sequence program is divided into three levels, that is, the 1st level for processing at a high speed, the 2nd level for processing at a comparatively high speed and the 3rd level for processing at a comparatively low speed respectively. The program of the 1st level is processed for every cycle tau, and the program of the 2nd level is processed for every several cycles. The program of the 3rd level is processed in a period excepting the processing periods of the 1st and 2nd level programs. In such a way of processing, the increment of the processing cycle can be avoided.

Description

【発明の詳細な説明】 発明の技術と従来技術 本発明は、プログラマブル・コン1−ローラの制御方式
に関する。
DETAILED DESCRIPTION OF THE INVENTION Technical Field of the Invention and Prior Art The present invention relates to a control system for a programmable controller.

プログラマブル・コントローラ(以下PCという)は、
シーケンス・プログラムを繰返して処理を行う繰返し演
算方式が採用されており、1つのシーケンス・プログラ
ムを処理する周期番まできるだけ短いほうが望まれてい
る。しかし、PCの用途が拡大するにつれて、シーケン
ス・プログラムの大きさは大きくなり、そのため処理周
期は長くなり問題になってきた。そこで、従来は高速で
処理しなければならぬシーケンス・プログラム(以後筒
ルベルのプログラムという)と、それ以外のシーケンス
・プログラム(以後第2レベルのプログラムという)と
に分けて処理していた。例えば、第1図に示すように、
第ルベルのプログラムは、一定周期τ(例えば8III
SeC)毎に1回処理を行い、第2レベルのプログラム
は適当に分割して数周期で1回の処理を行っていた(第
1図で示す例では4つに分割し、4周期で第2レベルの
プログラムを1回処理するようにしている)。そして、
これを繰返し処理を行っていた。し7J\し、月1途が
さらに拡大し、例えば、CRT画面に種々の表示を行わ
せるプログラムや自己診断プログラム等の格別処理スピ
ードを必要としないプログラムも第2レベルのプログラ
ムとして処理せざるを得ないため、第2レベルのプログ
ラムサイズが大きくなり、本来処理を早くやらねばなら
ない第2レベルのプログラムの処理周期が長くなるとい
う問題が生じていた。
The programmable controller (hereinafter referred to as PC) is
An iterative calculation method is adopted in which processing is performed by repeating a sequence program, and it is desired that the cycle number for processing one sequence program be as short as possible. However, as the uses of PCs have expanded, the size of sequence programs has become larger, and therefore the processing cycle has become longer, which has become a problem. Therefore, in the past, sequence programs that had to be processed at high speed (hereinafter referred to as Tsutsu Lebel programs) and other sequence programs (hereinafter referred to as second level programs) were processed separately. For example, as shown in Figure 1,
Lebel's program has a constant period τ (e.g. 8III
SeC), and the second level program was divided appropriately and processed once in several cycles (in the example shown in Figure 1, it was divided into four parts, and the second level program was processed once in several cycles). (The two-level program is processed once.) and,
This process was repeated. 7J\However, the number of applications per month has further expanded, and programs that do not require special processing speed, such as programs that display various displays on a CRT screen and self-diagnosis programs, have to be processed as second-level programs. As a result, the size of the second level program becomes large, resulting in a problem that the processing cycle of the second level program, which should originally be processed quickly, becomes long.

発明の目的 本発明の目的は、上記第2レベルのプログラムのうち、
比較的早いスピードを必要としないプログラムを第3レ
ベルのプログラムとして分け、第2レベルのプログラム
の処理周期の増大を防止することにある。
OBJECT OF THE INVENTION The object of the present invention is to provide, among the above-mentioned second level programs,
The purpose of this invention is to separate programs that do not require relatively high speed as third-level programs to prevent an increase in the processing cycle of second-level programs.

発明の構成と作用 本発明は、第2図に示すように、高速で処理する必要の
ある第ルベルのプログラムは、各周期で毎に処理を行い
、次にスビーを要求される第2レベルのプログラムを数
周用で1回処理を行うようにし、第ルベル、第2レベル
のプログラムの処理時間以外の残りの時間で、従来アイ
ドリング詩画であった時間に第3レベルのプログラム、
すなわちち、オペレータメツセージの表示、自己診断等
の大きなプログラムでスピードを必要としないプログラ
ムを非同期で処理するようにする。
Structure and operation of the invention As shown in FIG. 2, the present invention provides a first level program that requires high-speed processing to perform processing in each cycle, and then a second-level program that requires high-speed processing. The program is processed once for several rounds, and in the remaining time other than the processing time of the 2nd level program, the 3rd level program is executed during the time that was conventionally used as idling poetry.
That is, large programs such as operator message display and self-diagnosis that do not require speed are processed asynchronously.

実施例 第3図は、PCのブロック図で、PClは、シーケンス
・コントローラ本体101と、シーケンス・プログラム
を作成するときのみ使用され、入力されたシーケンス・
プログラムを機械語に変換したり、シーケンス・プログ
ラムの修正等を行うプログラマ102を有している。
Embodiment FIG. 3 is a block diagram of a PC. The PCI is used only when creating a sequence controller main body 101 and a sequence program, and is used only when creating a sequence program.
It has a programmer 102 that converts programs into machine language, modifies sequence programs, and the like.

102aは、シーケンス・プログラムを作成するとき使
用するキーボード、102bは、シーケンス・プログラ
ムを記憶するランダム・アクセス・メモリ(RAM)で
ある。102Cは、シーケンス・プログラムのオペラン
ドで指示された各機能情報とデータメモリ101aの記
憶位置との対応関係を記憶するテーブルである。102
dは、プログラマ102全体で制御する制御プログラム
及びキーボード102aから入力されたシーケンス・プ
ログラム機械語に翻訳する言語翻訳プログラム等を記憶
するリード・オンリー・メモリ(ROM)である。10
2eは、ROM102dに記憶されたプログラムに応じ
てシーケンス・プログラムの翻訳、修正等を実行する処
理装置(CPU)、102fは、シーケンス・コントロ
ーラ本体101との間でデータの授受を行うバッファ等
を有する送受信部、102gはバス線である。
102a is a keyboard used when creating a sequence program, and 102b is a random access memory (RAM) that stores the sequence program. 102C is a table that stores the correspondence between each piece of functional information designated by the operand of the sequence program and the storage location of the data memory 101a. 102
d is a read-only memory (ROM) that stores a control program that is controlled by the entire programmer 102, a language translation program that translates sequence programs input from the keyboard 102a into machine language, and the like. 10
2e has a processing unit (CPU) that executes translation, modification, etc. of the sequence program according to the program stored in the ROM 102d, and 102f has a buffer etc. that exchanges data with the sequence controller main body 101. The transmitter/receiver section 102g is a bus line.

101aはデータメモリで、101bは、プログラマ1
02との間でデータの授受を司どるバッフ7等を有する
送受信部、1010は、プログラマ102で、機械語に
翻訳されたシーケンス・プログラムを記憶するRAM1
101dはシーケンス・コントローラ101を制御する
制御プログラムを記憶するROM、101cは、演算処
理を行うためのRAM、101fは制御プログラムを及
びシーケンス・プログラムに応じて所定のシーケンス処
理を行う処理装置、101(1,101hは、外部機器
と接続するための入力回路、出力回路である。
101a is a data memory, 101b is a programmer 1
A transmitting/receiving unit 1010 having a buffer 7 and the like that controls data transfer between the programmer 102 and the RAM 1 which stores sequence programs translated into machine language.
101d is a ROM that stores a control program for controlling the sequence controller 101; 101c is a RAM for performing arithmetic processing; 101f is a processing device that stores a control program and performs predetermined sequence processing according to the sequence program; 1,101h is an input circuit and an output circuit for connecting with external equipment.

上記構成において、シーケンス・プログラムを作成する
ときには、まず、キーボード102aから、シーケンス
・プログラムで指示する各機能とデータメモリ101a
の記憶位置との対応表を入力してテーブル102Cに記
憶させ、次に、作成しようとする第1.第2.第3レベ
ルのシーケンス・プログラムをキーボード102aから
第4図に示すように、第ルベル、第2レベル、第3レベ
ル毎に指示して入力し、RAM102bに記憶させる。
In the above configuration, when creating a sequence program, first, from the keyboard 102a, each function to be instructed by the sequence program and the data memory 101a are
102C and stores it in the table 102C, and then the first . Second. The sequence program of the third level is inputted from the keyboard 102a as shown in FIG. 4 by instructing each level, second level, and third level, and is stored in the RAM 102b.

これら、対応表、シーケンス・プログラムが記憶されれ
ば、ROM102dに記憶されている言語処理プログラ
ムが起動し、シーケンス・プログラムの各命令をRAM
102cより順次呼出し命令コードとオペランドを機械
語に変換する。
Once these correspondence tables and sequence programs are stored, the language processing program stored in the ROM 102d is started and each instruction of the sequence program is transferred to the RAM.
From 102c, the calling instruction code and operand are sequentially converted into machine language.

さらに、第ルベルの終わりには、第2レベルへのジャン
プ命令が付され、さらに第2レベルのプログラムは適切
に分割され、分割コードが付される。なお、オペランド
は対応表を用いてデータメモリ101aの所定番地、所
定ビットを表わす機械語に変換される。これら機械語に
変換されたシーケンス・プログラムは、プログラマ10
2の送受信部102f及びシーケンス・コントローラの
送受信部101bを介してRAM101Cに転送記憶せ
しめられる。
Further, at the end of the second level, a jump instruction to the second level is attached, and furthermore, the second level program is appropriately divided and a division code is attached. Note that the operand is converted into machine language representing a predetermined location and a predetermined bit in the data memory 101a using a correspondence table. These sequence programs converted into machine language are sent to the programmer 10.
The data is transferred and stored in the RAM 101C via the transmitting/receiving section 102f of No. 2 and the transmitting/receiving section 101b of the sequence controller.

こうして、第1.第2.第3レベルの各プログラムは、
RAM101cに記憶され、このプログラム及びROM
101dに記憶された制御プログラムに従って処理装置
101fはシーケンス処理を行うが、このときのプログ
ラム実行フローは、第5図に示すフローで処理される。
Thus, the first. Second. Each third level program is
This program and ROM are stored in the RAM 101c.
The processing device 101f performs sequence processing according to the control program stored in the control program 101d, and the program execution flow at this time is processed according to the flow shown in FIG.

すなわち、シーケンス・コントローラは、通常、第3レ
ベルのプログラムの処理を行っており、一定周期τ(前
記例では8m5ec)toにタロツクタイマーから出さ
れる割込要求信号INTにより、第3レベルから第ルベ
ルのプログラムにジャンプし、第3レベルのプログラム
処理途中のレジスタの内容を退避サセ、第ルベルのプロ
グラムを実行する。この第ルベルのプログラム処理が終
了すると、前記プログラマ102によって付加された第
2レベルへのジャンプ命令■により第2レベルへジャン
プし、第2レベルのプログラムを処理する。そして、第
2レベルのプログラムの処理途中で、前記プログラマ1
02によって付加された分割コード0が読まれると、(
分割コードはcall命令でできており、分割コードの
call命令によりcallされたプログラムでは普通
のリターンを行なって分割コードの次へ帰るようなこと
はせず、リターン先は次回の第ルベルの終りのジャンプ
先のためにとっておく。)レジスタ類を復元し、次のリ
ターン命令■により第3レベルの割込位置へ復帰し、そ
こから再び第3レベルのプログラム処理を行う。そして
、クロックタイマーから次の割込要求信号が出ると再び
第ルベルのプログラムでジャンプし、前と同様、第ルベ
ルのプログラムを処理し、次に第2レベルのプログラム
の続きの処理を行う。
That is, the sequence controller normally processes a third-level program, and is triggered from the third level to the third-level program by the interrupt request signal INT issued from the tarok timer at a constant period τ (8 m5ec in the above example). Jump to the level program, save the contents of the register during the third level program processing, and execute the level level program. When the program processing of this second level is completed, the program jumps to the second level by the second level jump command (2) added by the programmer 102, and processes the second level program. Then, in the middle of processing the second level program, the programmer 1
When the division code 0 added by 02 is read, (
Divided code is made up of call instructions, and a program called by the call instruction of divided code does not perform a normal return and return to the next part of the divided code, but returns to the end of the next label. Save it for the jump destination. ) The registers are restored, and the next return instruction (2) returns to the third level interrupt position, from which the third level program processing is performed again. Then, when the next interrupt request signal is output from the clock timer, the program jumps again to the program of the second level, processes the program of the second level as before, and then continues processing of the program of the second level.

このように、第ルベルのプログラム処理は一定周期τ毎
に1回処理を行い、第2レベルのプログラムは、プログ
ラマ102によって適切に分割されて数周期(本実施例
では4周期)で1回の処理を行い、これを繰返す。そし
て、第3レベルのプログラムは、上記第1.第2レベル
のプログラム処理で残った時間で処理を行い、処理が終
われば、再び初めから処理を行う。このようにして、第
2図に示すようなタイミングで処理が行なわれることに
なる。
In this way, the program processing of the level 2 is performed once every fixed period τ, and the program of the 2nd level is appropriately divided by the programmer 102 and processed once in several cycles (4 cycles in this embodiment). Process and repeat. The third level program is the first level program described above. Processing is performed using the time remaining in the second level program processing, and when the processing is completed, processing is performed again from the beginning. In this way, processing is performed at the timing shown in FIG.

発明の効果 本発明は、プログラマブル・コントローラ(PC)が処
理するシーケンス・プログラムを高速で処即しなければ
ならない第ルベルのプログラムと、次に処理スピードが
要求される第2レベルのプログラムと、比較的処理スピ
ードが要求されない第3レベルのプログラムに分け、第
ルベルのプログラムは一定周期毎、第2レベルのプログ
ラムは数周期で1回処理を行い、第3レベルのプログラ
ムは、上記第1.第2レベルのプログラム処理で残った
時間に上記第1.第2レベルのプログラム処理とは非同
期で処理するように3ランクの処理スピードを設けたか
ら、シーケンス・プログラムの用途や性質に応じてシー
ケンス・プログラムの処理スピードを変えることができ
、シーケンス・プログラムの増大によっても処理スピー
ドを格別要求されないプログラムが他のプログラムの処
理スピードを落とすことはなくなる。
Effects of the Invention The present invention compares a sequence program processed by a programmable controller (PC) with a second-level program that requires high-speed processing and a second-level program that requires high processing speed. It is divided into 3rd level programs that do not require high processing speed.The 3rd level program processes once every fixed cycle, the 2nd level program processes once every several cycles, and the 3rd level program processes the above 1st level program. The time remaining after the second level program processing is used to complete the first step. Three ranks of processing speeds are provided so that the processing is asynchronous with the second level program processing, so the processing speed of the sequence program can be changed depending on the purpose and nature of the sequence program, which increases the number of sequence programs. Therefore, programs that do not particularly require high processing speed will not slow down the processing speed of other programs.

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

第1図は、プログラマブル・コントローラの従来の制御
方式、第2図は、本発明によるプログラマブル・コント
ローラの制御方式の一例、第3図は、本発明の一実施例
のハードウェアブロック図、第4図は、入力プログラム
の構成図、第5図は、本発明の一実施例の制御方式フロ
ーである。 1・・・プログラマブル・コントローラ、101・・・
シーケンス・コントローラ、102・・・プログラマ、
102、a−・・キーボード、101b、102f、、
、送受信部。 特許出願人 ノアナック 株式会社 (ほか1名) 第1図 第2図 第4図 第3図 01
FIG. 1 is a conventional control method for a programmable controller, FIG. 2 is an example of a control method for a programmable controller according to the present invention, FIG. 3 is a hardware block diagram of an embodiment of the present invention, and FIG. This figure is a configuration diagram of an input program, and FIG. 5 is a flowchart of a control method according to an embodiment of the present invention. 1...Programmable controller, 101...
Sequence controller, 102...programmer,
102, a--keyboard, 101b, 102f, .
, transmitting and receiving section. Patent applicant Noanack Co., Ltd. (and 1 other person) Figure 1 Figure 2 Figure 4 Figure 3 01

Claims (1)

【特許請求の範囲】[Claims] シーケンス・プログラムを、高速で処理を行う第ルベル
のプログラムと、次に処理スピードが要求される第2レ
ベルのプログラムと、格別処理スピードが要求されない
第3レベルのプログラムとに分け、上記第ルベルのプロ
グラムは一定周期毎処理し、上記第2レベルのプログラ
ムは数周期で1回処理を行い、第3レベルのプログラム
は一定周期内の上記第ルベル、第2レベルのプログラム
処理で残った時間で処理を行わせるプログラマブル・コ
ントローラの制御方式。
The sequence program is divided into a first-level program that processes at high speed, a second-level program that requires processing speed, and a third-level program that does not require special processing speed. The program is processed every fixed cycle, the second level program is processed once every several cycles, and the third level program is processed using the time remaining from the above second level program processing within a fixed cycle. A control method for a programmable controller that performs
JP8596683A 1983-05-18 1983-05-18 Control system of programmable controller Pending JPS59212905A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8596683A JPS59212905A (en) 1983-05-18 1983-05-18 Control system of programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8596683A JPS59212905A (en) 1983-05-18 1983-05-18 Control system of programmable controller

Publications (1)

Publication Number Publication Date
JPS59212905A true JPS59212905A (en) 1984-12-01

Family

ID=13873471

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8596683A Pending JPS59212905A (en) 1983-05-18 1983-05-18 Control system of programmable controller

Country Status (1)

Country Link
JP (1) JPS59212905A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63284604A (en) * 1987-05-18 1988-11-21 Fanuc Ltd Programmable controller
JPH02227703A (en) * 1989-02-28 1990-09-10 Okuma Mach Works Ltd Programmable controller system
WO1991003008A1 (en) * 1989-08-25 1991-03-07 Fanuc Ltd System for controlling program of pc
JP2021071864A (en) * 2019-10-30 2021-05-06 ファナック株式会社 Programmable controller

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63284604A (en) * 1987-05-18 1988-11-21 Fanuc Ltd Programmable controller
JPH02227703A (en) * 1989-02-28 1990-09-10 Okuma Mach Works Ltd Programmable controller system
WO1991003008A1 (en) * 1989-08-25 1991-03-07 Fanuc Ltd System for controlling program of pc
JP2021071864A (en) * 2019-10-30 2021-05-06 ファナック株式会社 Programmable controller

Similar Documents

Publication Publication Date Title
JPS58195966A (en) Resource switching by user's control for multi-task processing word processor
CA1145478A (en) High speed synchronous computer
US4539635A (en) Pipelined digital processor arranged for conditional operation
US4967338A (en) Loosely coupled pipeline processor
US3698007A (en) Central processor unit having simulative interpretation capability
US4598358A (en) Pipelined digital signal processor using a common data and control bus
JPS59212905A (en) Control system of programmable controller
US5390306A (en) Pipeline processing system and microprocessor using the system
JP2861962B2 (en) Computer program simulation apparatus and method
GB2069733A (en) Conditional instruction execution in a pipelined processor
JP2808757B2 (en) Microprocessor for debugging
JPS5896345A (en) Hierarchical arithmetic system
JP2866410B2 (en) How to test the program
JPS58200349A (en) Microprogram controller
JPH01195505A (en) Numerical controller
JP2979108B2 (en) Synchronization method for asynchronous processing in data processing equipment
JP3074809B2 (en) Programmable controller
JPS61241843A (en) Information processor
Kerner Microprogramming by data flow
JPS5843770B2 (en) Asynchronous processing method for external devices
JPH01137339A (en) Microprocessor
JPS6143347A (en) Simulation method of vector instruction
JPS6368924A (en) System for controlling data processing of microprocessor
JPS5896346A (en) Hierarchical arithmetic system
JPH05120026A (en) Language processing program generation device