JPH0330164B2 - - Google Patents

Info

Publication number
JPH0330164B2
JPH0330164B2 JP60044445A JP4444585A JPH0330164B2 JP H0330164 B2 JPH0330164 B2 JP H0330164B2 JP 60044445 A JP60044445 A JP 60044445A JP 4444585 A JP4444585 A JP 4444585A JP H0330164 B2 JPH0330164 B2 JP H0330164B2
Authority
JP
Japan
Prior art keywords
program
storage means
address
time
command
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.)
Expired - Lifetime
Application number
JP60044445A
Other languages
Japanese (ja)
Other versions
JPS61204704A (en
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 filed Critical
Priority to JP60044445A priority Critical patent/JPS61204704A/en
Priority claimed from EP86111200A external-priority patent/EP0256149B1/en
Publication of JPS61204704A publication Critical patent/JPS61204704A/en
Publication of JPH0330164B2 publication Critical patent/JPH0330164B2/ja
Granted 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/00Program-control systems
    • G05B19/02Program-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of program data in numerical form
    • G05B19/414Structure of the control system, e.g. common controller or multiprocessor systems, interface to servo, programmable interface controller
    • G05B19/4147Structure of the control system, e.g. common controller or multiprocessor systems, interface to servo, programmable interface controller characterised by using a programmable interface controller [PIC]

Landscapes

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

Description

【発明の詳細な説明】 (発明の技術分野) この発明は、シーケンス制御やサーボ制御を行
なうのに適したコンピユータシステムに関する。
DETAILED DESCRIPTION OF THE INVENTION (Technical Field of the Invention) The present invention relates to a computer system suitable for performing sequence control and servo control.

(発明の技術的背景とその問題点) 従来、シーケンスやサーボ系の制御はPC
(Programmable Controller)やCNC
(Computerized Numerical Control)によつて
行なわれて来たが、これらシステムにはプログラ
ミングにおいていくつかの欠点がある。PCの場
合には、ラダー回路によつてプログラミングする
ため、一般のコンピユータで行なわれているよう
なプログラミングができないことが大きな欠点と
なる。すなわち、ラダー回路によつてプログラミ
ングを行なうと、順序回路のように、過去の回路
の状態によつて結果が異なるものについてのプロ
グラミングが困難となる。また、たとえそのよう
なプログラミングを行なえたとしても、コンピユ
ータのプログラミングのような、複雑かつ高度な
内容のプログラミングはさらに困難となる。これ
に加えて、プログラムの開発支援手段やプログラ
ミングテクニツクの技術では、一般のコンピユー
タの方がはるかに進歩しており、これらを利用で
きないことも問題となる。
(Technical background of the invention and its problems) Conventionally, sequences and servo systems were controlled using a PC.
(Programmable Controller) and CNC
(Computerized Numerical Control), these systems have several drawbacks in programming. In the case of a PC, programming is done using a ladder circuit, so a major drawback is that it cannot be programmed in the way that is done with a general computer. That is, when programming is performed using a ladder circuit, it becomes difficult to program a circuit such as a sequential circuit whose result varies depending on the past state of the circuit. Further, even if such programming can be performed, programming of complex and advanced contents such as computer programming will be even more difficult. In addition, general computers are far more advanced in terms of program development support means and programming techniques, and the inability to utilize these is also a problem.

また、PCによる制御の速度には、PCのサイク
ルタイムによる制約があり、数ミリ秒以下の早い
応答を望むことができない。また、PCの入出力
点数が限られているため、数値データの入出力が
不可能となつてしまうことが多い。さらに、PC
では算術演算を含む条件の判別が困難であるな
ど、PCで直接シーケンスやサーボ系を制御する
ことは無理が多かつた。
Furthermore, the speed of control by the PC is limited by the cycle time of the PC, and a quick response of several milliseconds or less cannot be expected. Furthermore, because the number of input/output points on a PC is limited, it is often impossible to input/output numerical data. Furthermore, the PC
In many cases, it was difficult to control sequences and servo systems directly with a PC, as it was difficult to determine conditions that included arithmetic operations.

一方、CNCの場合にはコンピユータを用いて
いるため、装置のハードウエアのみならずソフト
ウエアも複雑なものになつている。このため、ソ
フトウエアに関する知識の少ない機械技術者や現
場の担当者などが、プログラムを作成したりシー
ケンスを変更することは困難である。このような
システム言語を用いる困難さを回避するために、
シーケンス専用のマクロ言語を持つシステムも存
在するが、従来のマクロ言語はインタプリタであ
るため実行速度が遅いし、機能も限定されてい
た。
On the other hand, in the case of CNC, since a computer is used, not only the hardware but also the software of the device is complicated. Therefore, it is difficult for mechanical engineers or on-site personnel with little knowledge of software to create programs or change sequences. To avoid the difficulties of using such system languages,
Although there are systems that have macro languages dedicated to sequences, conventional macro languages are interpreted, resulting in slow execution speed and limited functionality.

(発明の目的) この発明は上述の点を考慮してなされたもので
あり、シーケンス制御やサーボ制御のためのプロ
グラム言語とそれを実行するコンピユータシステ
ムを提供することを目的としている。
(Object of the Invention) The present invention has been made in consideration of the above points, and an object thereof is to provide a program language for sequence control and servo control, and a computer system for executing the program language.

(発明の概要) この発明は、シーケンス制御やサーボ制御を行
なうのに適したコンピユータシステムに関するも
ので、オープン命令、クローズ命令及びポーズ命
令の3種の並行処理命令をもつたプログラミング
言語とそれを実行するコンピユータを提供するこ
とによつて、シーケンス制御やサーボ制御を容易
に効率良く行ない得るようにしたものである。
(Summary of the Invention) This invention relates to a computer system suitable for performing sequence control and servo control, and includes a programming language that has three types of parallel processing instructions: an open instruction, a close instruction, and a pause instruction. By providing a computer that does this, it is possible to perform sequence control and servo control easily and efficiently.

(発明の実施例) この発明では、シーケンス制御やサーボ制御の
プログラミング言語としてシステム言語を使用せ
ず、装置のソフトウエアについての知識が少なく
ても使用できるベーシツク、フオートランなどの
言語を使用する。勿論必要な場合は、システム言
語の使用も可能である。
(Embodiment of the Invention) In the present invention, a system language is not used as a programming language for sequence control or servo control, but a language such as Basic or Fortran, which can be used even with little knowledge of device software, is used. Of course, the system language can also be used if necessary.

このような言語を用いた場合、コンピユータの
動作速度に比較して、機械シーケンスの動作が遅
いためにプログラミング上問題がある。すなわ
ち、プログラムに待ち時間が多くなるので、待ち
時間の間コンピユータはループを実行することと
なり、その間システムは遊んでしまうことにな
る。また。待ち時間を正確に作り出すため、多く
のフラグやタイマーが必要となり、プログラムが
必要以上複雑になる。
When such a language is used, there is a problem in programming because the operation of the machine sequence is slow compared to the operation speed of the computer. That is, the program will have a lot of waiting time, and during the waiting time the computer will run a loop, and the system will be idle during that time. Also. In order to accurately generate wait times, many flags and timers are required, making the program unnecessarily complex.

これらの問題を解決する並行処理によるプログ
ラミングは、システム言語において行なうことが
できるが、ベーシツク、フオートランなどの言語
では行なえなかつた。この発明は、オープン命
令、クローズ命令及びポーズ命令の3種の並行処
理命令を導入することにより、これを可能にする
ものである。
Programming using parallel processing to solve these problems can be done in system languages, but not in languages such as Basic and Fortran. The present invention makes this possible by introducing three types of parallel processing instructions: an open instruction, a close instruction, and a pause instruction.

オープン命令OPENβの動作を第1図にフロー
チヤートで示す。オープン命令OPENβは、現在
実行されているプログラムαから別のプログラム
βの実行を開始させる。この命令が実行された後
は、プログラムα及びβは同時に並行処理され
る。シーケンス制御では、同時にいくつかのシー
ケンスが並行して実行されるが、そのような場合
にこの命令を用いて並行処理を行なう。
The operation of the open command OPENβ is shown in a flowchart in FIG. The open command OPENβ starts execution of a different program β from the currently executed program α. After this instruction is executed, programs α and β are simultaneously processed in parallel. In sequence control, several sequences are executed in parallel at the same time, and in such cases this instruction is used to perform parallel processing.

クローズ命令CLOSEβの動作を第2図及び第3
図に示す。クローズ命令CLOSEβは、現在実行さ
れているプログラミングαにより、並行して実行
中のプログラムβを強制的に終了させるための命
令である。プログラムβはこの命令が実行された
時点で、実行中の命令をもつて実行が強制的に終
了させられる。ここで、同じプログラムを実行す
るタスクが複数個あつた場合、例えばプログラム
βがいくつか並行処理されていた場合には、プロ
グラムβのすべての実行が強制的に終了させられ
ることとなる。このクローズ命令CLOSEβを用い
ることにより、処理の完了条件等の監視と処理の
終了を別に設けた専用のプログラムによつて行な
うことができる。また、このクローズ命令を自分
自身のプログラムの終了のためにも使用すること
ができる。
The operation of the close command CLOSEβ is shown in Figures 2 and 3.
As shown in the figure. The close instruction CLOSEβ is an instruction for forcibly terminating the program β currently being executed in parallel with the programming α currently being executed. When this instruction is executed, the execution of the program β is forcibly terminated with the instruction being executed. Here, if there are multiple tasks executing the same program, for example, if several programs β are being processed in parallel, the execution of all programs β will be forcibly terminated. By using this close command CLOSEβ, monitoring of processing completion conditions and the like and termination of processing can be performed by a separate dedicated program. You can also use this close command to terminate your own program.

ポーズ命令PAUSE tの動作を第4図に示す。
この命令が実行されると、パラメータtで与えら
れた時間(単位はミリ秒)だけプログラムの実行
が中断された後に次の処理が再開される。例えば
パラメータtが“35”であつたとすると、処理γ
が実行された後、35ミリ秒間プログラムαのサー
ビスが中断され、その後にプログラムαのサービ
スが再開され、処理δ実行される。ポーズ命令を
実行中に他のプログラムの処理は中断されること
なく、実行され続ける。このポーズ命令PAUSE
tにより、機械動作や入出力の完了を待つための
タイミングが、特別なタイマーを設けることなし
に作り出される。また、ループを用いてタイミン
グを待つ場合と異なり、中断中に他のシーケンス
の処理を待たせることもない。
FIG. 4 shows the operation of the pause command PAUSE t.
When this instruction is executed, the execution of the program is interrupted for the time (in milliseconds) given by the parameter t, and then the next process is resumed. For example, if the parameter t is “35”, the processing γ
is executed, the service of the program α is interrupted for 35 milliseconds, and then the service of the program α is restarted and the process δ is executed. While the pause command is being executed, the processing of other programs continues to be executed without being interrupted. This pause instruction PAUSE
t creates timing for waiting for the completion of machine operations and input/outputs without the need for special timers. Also, unlike the case where a loop is used to wait for timing, processing of other sequences is not made to wait during the interruption.

以上述べたようなオープン命令、クローズ命令
及びポーズ命令の3種の並行処理命令を用いて、
シーケンス制御やサーボ制御を行なう方法を第5
図で示された例を参照して説明する。
Using the three types of parallel processing instructions, the open instruction, the close instruction, and the pause instruction, as described above,
The fifth method explains how to perform sequence control and servo control.
This will be explained with reference to the example shown in the figure.

第5図のフローチヤートで示されるサブプログ
ラムALARMは、プログラムSERVO中のエラー
フラグを常時監視し、プログラム中でエラーが発
生した時にメツセージを出力するプログラムであ
る。メインプログラムSERVOではエラーが起き
た場合、エラーの種類に応じて配列ERROR中の
要素の値を“1”にセツトする。配列ERROR中
の各要素に対し表示すべきエラーメツセージは、
配列TABLE中の対応する要素にあらかじめ格納
しておく。このプログラムALARMは、メイン
プログラム中のオープン命令OPEN ALARMを
用いて起動され、プログラムSERVOと並行して
実行される。起動されると、変数R1をまず“0”
にセツトし(ステツプS1)、配列ERRORの要素
ERROR(R1)が“1”にセツトされているかど
うかを調べる(ステツプS2)。“1”にセツトさ
れていなかつた場合には、配列ERRORの次の要
素を調べるため、R1=R1+1による変数R1をイ
ンクリメントし(ステツプS3)、同様の動作を繰
り返す。こうして65個ある配列ERRORの全要素
が“1”でなかつた時には、エラーが発見されな
かつたこととなるので、ポーズ命令PAUSE50
(ステツプS5)により50ミリ秒待つてから、再び
同じプログラムを繰り返す。
The subprogram ALARM shown in the flowchart of FIG. 5 is a program that constantly monitors the error flag in the program SERVO and outputs a message when an error occurs in the program. When an error occurs in the main program SERVO, the value of the element in the array ERROR is set to "1" depending on the type of error. The error message that should be displayed for each element in the array ERROR is
Store it in the corresponding element in the array TABLE in advance. This program ALARM is started using the open command OPEN ALARM in the main program and is executed in parallel with the program SERVO. When started, variable R1 is first set to “0”
(step S1), and set the elements of the array ERROR to
Check whether ERROR (R1) is set to "1" (step S2). If it is not set to "1", the variable R1 is incremented by R1=R1+1 in order to check the next element of the array ERROR (step S3), and the same operation is repeated. In this way, when all the elements of the 65 array ERROR are not "1", it means that no error has been found, so the pause command PAUSE50
After waiting 50 milliseconds (step S5), repeat the same program again.

一方、条件分岐命令ERROR(R1)=1におい
て、ERROR(R1)が“1”にセツトされている
ことが検出されると、MESSAGE=TABLE
(R1)により、配列ERRORの“1”となつてい
る要素に対応する配列TABLEの中のメツセージ
が変数MESSAGEに代入される(ステツプS2、
S6)。そして、オープン命令OPEN DISPLAYに
より表示用のプログラムが起動され(ステツプ
S7)、変数MESSAGEに格納されたメツセージが
表示される。また、エラーを起したプログラム
SERVOは、クローズ命令CLOGE SERVOによ
つて強制終了させられる(ステツプS8)。このよ
うなオープン命令、クローズ命令及びポーズ命令
を使用した並行処理プログラムにより、プログラ
ムSERVOとは独立して、50ミリ秒ごとのエラー
のチエツク、エラー表示及びエラーを起したプロ
グラムの強制終了を行なうことができる。
On the other hand, when it is detected that ERROR (R1) is set to "1" in the conditional branch instruction ERROR (R1) = 1, MESSAGE = TABLE
(R1), the message in the array TABLE corresponding to the element that is "1" in the array ERROR is assigned to the variable MESSAGE (step S2,
S6). Then, the display program is started by the open command OPEN DISPLAY (step
S7), the message stored in the variable MESSAGE is displayed. Also, the program that caused the error
SERVO is forcibly terminated by the close command CLOGE SERVO (step S8). Parallel processing programs using such open, close, and pause commands can check for errors every 50 milliseconds, display errors, and forcibly terminate the program that caused the error, independently of the program SERVO. Can be done.

次に、サーボ系及びシーケンスを制御するプロ
グラムの例を第6図に示して説明する。
Next, an example of a program for controlling the servo system and sequence will be described with reference to FIG.

プログラム上では常に30ミリ秒間隔でスタート
信号をチエツクしており(ステツプS10、S11)、
このチエツクによりスタート信号が検出された場
合はサーボ系の速度を200rpmに指令し(ステツ
プS12)、5ミリ秒おきにサーボプログラムを
OPENする(ステツプS13、S14)。そして、スト
ツプ信号の入力及びリミツトスイツチのON、
OFFをチエツクし(ステツプS15、S16)、ストツ
プ信号が無くリミツトスイツチがオフの場合には
上記動作を繰り返し、ストツプ信号が検出された
場合やリミツトスイツチがオンの場合には、サー
ボ系の速度をOrpmに指令する(ステツプS20)。
その後、5ミリ秒おきにサーボプログラムを
OPENし(ステツプS21、S22)、電源が切れるの
を待つ(ステツプS23)。
The program always checks the start signal at 30 millisecond intervals (steps S10 and S11).
If a start signal is detected by this check, the speed of the servo system is commanded to 200 rpm (step S12), and the servo program is executed every 5 milliseconds.
OPEN (steps S13, S14). Then input the stop signal and turn on the limit switch.
Check OFF (steps S15 and S16), and if there is no stop signal and the limit switch is off, repeat the above operation, and if a stop signal is detected or the limit switch is on, set the servo system speed to Orpm. command (step S20).
After that, run the servo program every 5 milliseconds.
OPEN (steps S21, S22) and wait for the power to turn off (step S23).

以上述べたように、ベーシツク、フオートラン
などの言語にオープン命令、クローズ命令及びポ
ーズ命令を付加することにより、シーケンス制御
やサーボ制御を容易に行なうことができるので、
次にこれらの並行処理命令を導入するためのコン
ピユータシステムについて第7図を参照して説明
する。
As mentioned above, sequence control and servo control can be easily performed by adding open commands, close commands, and pause commands to languages such as Basic and Fortran.
Next, a computer system for introducing these parallel processing instructions will be explained with reference to FIG.

中央演算処理装置(CPU)2には、プログラ
ムカウンタ3及びプログラムメモリ4が接続され
ており、プログラムメモリ4中のプログラムカウ
ンタ3に格納された番地の命令が取出されて、中
央演算処理装置2に読込まれて処理が実行される
ようになつている。タイマ1はその時点での時刻
を計数しているカウンタであり、央演算処理装置
2に接続されていて、中央演算処理装置2からそ
の時点での時刻を読取ることができるようになつ
ている。また、中央演算処理装置2には、アドレ
ステーブル5、タイムテーブル7及びポインタ6
が接続されており、ポインタ6に格納された番地
に対応するようなタイムテーブル7中の時刻のデ
ータ及びアドレステーブル5中の番地のデータ
が、それぞれ中央演算処理装置2から読取れるよ
うになつている。
A program counter 3 and a program memory 4 are connected to the central processing unit (CPU) 2, and the instruction at the address stored in the program counter 3 in the program memory 4 is retrieved and sent to the central processing unit 2. It is loaded and the process is executed. The timer 1 is a counter that counts the current time, and is connected to the central processing unit 2 so that the current time can be read from the central processing unit 2. The central processing unit 2 also includes an address table 5, a time table 7, and a pointer 6.
is connected, and the time data in the time table 7 and the address data in the address table 5 that correspond to the address stored in the pointer 6 can be read from the central processing unit 2. There is.

このような構成のコンピユータシステムを使用
して、一般の命令とこの発明による、オープン命
令、クローズ命令及びポーズ命令とを実行する方
法を説明する。
A method of executing general instructions and an open instruction, a close instruction, and a pause instruction according to the present invention using a computer system having such a configuration will be described.

初期状態において、プログラムメモリ4には、
実行するべきシーケンス制御またはサーボ制御等
のプログラムが格納され、プログラムカウンタ3
のプログラムの実行開始番地を保持している。ま
た、タイマ1は“0”にリセツトされており、ア
ドレステーブル5及びタイムテーブル7は空とな
つていて、ポインタ6はアドレステーブル5およ
びタイムテーブル7の先頭を指すようになつてい
る。中央演算処理装置2は、プログラムカウンタ
3の保持している番地の命令を読込んで実行する
という動作を繰り返す。読込まれた命令が、オー
プン命令、クローズ命令及びポーズ命令以外の一
般命令だつた場合、通常のコンピユータと同様に
命令が実行され、プログラムカウンタ3が更新さ
れる。読込まれた命令がオープン命令だつた場合
には、まずポインタ6によりタイムテーブル7が
スキヤンされ、テーブルの空いた部分が見つけ出
される。次に、中央演算処理装置置2によりタイ
マ1の値が読込まれ、タイムテーブル7の空きが
見つけ出された位置に書込まれ、さらにアドレス
テーブル5の同じ位置にはオープンされるべきプ
ログラムの開始番地が書込まれる。この後、プロ
グラムカウンタの値がオープン命令に引き続く命
令の番地に更新され、次の命令の実行に移る。
In the initial state, the program memory 4 contains:
Programs such as sequence control or servo control to be executed are stored, and the program counter 3
It holds the execution start address of the program. Further, the timer 1 has been reset to "0", the address table 5 and the time table 7 are empty, and the pointer 6 points to the beginning of the address table 5 and the time table 7. The central processing unit 2 repeatedly reads and executes the instruction at the address held by the program counter 3. If the read instruction is a general instruction other than an open instruction, a close instruction, or a pause instruction, the instruction is executed and the program counter 3 is updated in the same way as a normal computer. If the read instruction is an open instruction, first the time table 7 is scanned by the pointer 6 and an empty portion of the table is found. Next, the value of the timer 1 is read by the central processing unit 2 and written to the position in the time table 7 where an empty space is found, and the same position in the address table 5 is used to start the program to be opened. The address is written. Thereafter, the value of the program counter is updated to the address of the instruction following the open instruction, and execution of the next instruction begins.

読込まれた命令がクローズ命令で、そのクロー
ズ命令を含むプログラム自身を終了させるクロー
ズ命令の場合には、まず中央演算処理装置2によ
りタイマ1の値が読込まれ、ポインタ6によりタ
イムテーブル7をスキヤンしてタイマ1の値より
も小さな値が検索される。もしそのような値がな
ければ、再びタイマ1を読込んで同じ動作が繰り
返される。タイマ1の値よりも小さな値が登録さ
れていたら、そのときのポインタ6で示されるア
ドレステーブル5の内容がプログラムカウンタ3
に移され、ポインタ6で示されるタイムテーブル
7及びアドレステーブル5の内容が抹消されて、
プログラムカウンタ3で示される命令から実行が
開始される。このようにしてもとのプログラムは
終了させられ、他のプログラムに実行が移され
る。
If the read instruction is a close instruction that terminates the program itself that includes the close instruction, the central processing unit 2 first reads the value of timer 1 and scans the time table 7 using the pointer 6. A value smaller than the value of timer 1 is searched for. If there is no such value, timer 1 is read again and the same operation is repeated. If a value smaller than the value of timer 1 is registered, the contents of address table 5 indicated by pointer 6 at that time are stored in program counter 3.
The contents of the time table 7 and address table 5 indicated by the pointer 6 are deleted,
Execution starts from the instruction indicated by program counter 3. In this way, the original program is terminated and execution is transferred to another program.

読込まれた命令が上述以外のクローズ命令の場
合には、ポインタ6によりアドレステーブル5が
スキヤンされて、クローズされるべきプログラム
が抹消され、同じ位置のタイムテーブル7の内容
も抹消される。このようにして、クローズ命令に
よるプログラムが強制終了させられる。
If the read instruction is a close instruction other than the above, the address table 5 is scanned by the pointer 6, the program to be closed is deleted, and the contents of the time table 7 at the same position are also deleted. In this way, the program is forcibly terminated by the close instruction.

読込まれた命令がポーズ命令の場合には、まず
ポインタ6によりタイムテーブル7がスキヤンさ
れ、テーブルの空いた部分が見つけ出される。次
に、中央演算処理装置2によりタイマ1の値が読
込まれてポーズ時間に加えられ、タイムテーブル
7の空き見つけ出された位置に書込まれる。ま
た、アドレステーブル5の同じ位置にもポーズ命
令に続く命令の番地が書込まれる。以上で、プロ
グラムの実行が休止させられたので、休止中に実
行できる他のプログラムをを探す。まず中央処理
演算装置2によりタイマ1の値が読込まれ、ポイ
ンタ6によりタイムテーブル7をスキヤンしてタ
イマ1の他よりも小さな値が検索される。もしそ
のような値がなければ再びタイマ1を読込んで、
同じ動作が繰り返される。タイマ1の値よりも小
さな値が登録されていたら、そのときのポインタ
6で示されるアドレステーブル5の内容がプログ
ラムカウンタ3に移され、ポインタ6で示される
タイムテーブル7及びアドレステーブル5の内容
が抹消されて、プログラムカウンタ3で示される
命令から実行が開始される。このようにしても元
のプログラムは休止させられ、他のプログラムに
実行が移される。
If the read command is a pause command, first the time table 7 is scanned by the pointer 6 and an empty part of the table is found. Next, the value of the timer 1 is read by the central processing unit 2, added to the pause time, and written in the time table 7 at the position where an empty space is found. Further, the address of the instruction following the pause instruction is also written at the same position in the address table 5. Now that the program has been suspended, look for other programs that can be executed while the program is suspended. First, the value of the timer 1 is read by the central processing unit 2, and the time table 7 is scanned by the pointer 6 to search for a value smaller than the other values of the timer 1. If there is no such value, read timer 1 again,
The same action is repeated. If a value smaller than the value of timer 1 is registered, the contents of address table 5 indicated by pointer 6 at that time are transferred to program counter 3, and the contents of time table 7 and address table 5 indicated by pointer 6 are transferred to program counter 3. The instruction is deleted and execution starts from the instruction indicated by the program counter 3. Even in this case, the original program is suspended and execution is transferred to another program.

このようにして、上記コンピユータシステムに
より一般の命令、オープン命令、クローズ命令及
びポーズ命令を実行することができる。
In this way, general commands, open commands, close commands and pause commands can be executed by the computer system.

以上のようにタイマ1の値をもとにオープン命
令、クローズ命令及びポーズ命令を実行すること
ができるが、第8図に示すようにポーズ命令別に
サービス回路9を設けることにより、同様の動作
をより効率よく実行することができる。
As described above, the open command, close command, and pause command can be executed based on the value of timer 1, but similar operations can be performed by providing a service circuit 9 for each pause command as shown in FIG. It can be executed more efficiently.

中央演算処理装置(CPU)2にはプログラム
カウンタ3及びプログラムメモリ4が接続されて
おり、プログラムメモリ4中のプログラムカウン
タ3に格納された番地の命令が取出されて中央演
算処理装置2に読込まれて実行されるようになつ
ている。割込クロツク11は中央演算処理装置2
に接続されており、一定時間間隔で中央演算処理
装置2に割込みをかけるようになつている。ま
た、中央演算処理装置2には、サービス回路9が
複数個とポーズポインタ71とが接続されてお
り、ポースポインタ71で示されるサービス回路
9が選択されるようになつている。それぞれのサ
ービス回路9はアドレステーブル5と、その内容
を参照するためのサービスポインタ61と、トツ
プポインタ62と、カタログポインタ63とによ
り構成されている。オープン命令、クローズ命令
およびポーズ命令には、サービス回路9を選択す
るためのアーギユメントが付加されている。
A program counter 3 and a program memory 4 are connected to the central processing unit (CPU) 2, and the instruction at the address stored in the program counter 3 in the program memory 4 is retrieved and read into the central processing unit 2. It is now being executed. The interrupt clock 11 is connected to the central processing unit 2.
The central processing unit 2 is connected to the central processing unit 2 and is configured to interrupt the central processing unit 2 at regular intervals. Further, a plurality of service circuits 9 and a pause pointer 71 are connected to the central processing unit 2, and the service circuit 9 indicated by the pause pointer 71 is selected. Each service circuit 9 is composed of an address table 5, a service pointer 61 for referring to its contents, a top pointer 62, and a catalog pointer 63. An argument for selecting the service circuit 9 is added to the open command, close command, and pause command.

このような構成の第8図で示されるコンピユー
タシステムを使用して、一般の命令とこの発明に
よるオープン命令、クローズ命令及びポーズ命令
とを実行する方法は次のようになる。
A method for executing general commands and the open command, close command, and pause command according to the present invention using the computer system shown in FIG. 8 having such a configuration is as follows.

最初に、中央演算処理装置2の動作が開始され
た後の動作は、ポースポインタ71でポーズタイ
ムに対応したサービス回路9が選択される。ポー
スポインタ71は、各サービス回路9があらかじ
め決められたポースポインタに対応して選択され
るように、中央演算処理装置2によつて設定され
る。このときポーズタイムは割込みクロツク11
によつて計られる。この時、トツプポインタ62
の内容がサービスポインタ61に移され、カタロ
グポインタ63の内容がトツプポインタ62に移
される。そして、サービスポインタ61で示され
るアドレステーブル上の番地がプログラムカウン
タ3に移され、プログラムカウンタ3で示される
プログラムメモリ4上の命令が実行される。その
後、通常のコンピユータと同様に、実行された命
令に従つてプログラムカウンタ3の内容が更新さ
れ、サービスが継続される。
First, after the central processing unit 2 starts operating, the pause pointer 71 selects the service circuit 9 corresponding to the pause time. The pose pointer 71 is set by the central processing unit 2 so that each service circuit 9 is selected corresponding to a predetermined pose pointer. At this time, the pause time is interrupt clock 11.
It is measured by. At this time, the top pointer 62
The contents of the catalog pointer 63 are moved to the service pointer 61, and the contents of the catalog pointer 63 are moved to the top pointer 62. Then, the address on the address table indicated by the service pointer 61 is moved to the program counter 3, and the instruction on the program memory 4 indicated by the program counter 3 is executed. Thereafter, the contents of the program counter 3 are updated in accordance with the executed instructions, and the service is continued, as in a normal computer.

次に、オープン命令が実行された時の動作は、
先ず示されるサービス回路9の付加されたアーギ
ユメントで、カタログポインンタ63で示された
アドレステーブル5上にオープンすべきプログラ
ムの開始番地が登録される。そして、カタログポ
インタ63の内容が、アドレステーブル5の次の
位置を示すように更新される。サービスポインタ
61およびカタログポインタ63の内容は、各々
アドレステーブル5の最後までくると、アドレス
テーブル5の先頭を示すように更新される。
Next, the operation when the open instruction is executed is as follows.
First, with the added argument of the service circuit 9 shown, the start address of the program to be opened is registered in the address table 5 indicated by the catalog pointer 63. The contents of the catalog pointer 63 are then updated to indicate the next position in the address table 5. When the contents of the service pointer 61 and the catalog pointer 63 reach the end of the address table 5, they are updated to indicate the beginning of the address table 5.

また、クローズ命令が実行された時の動作は、
示されるサービス回路9の付加されたアーギユメ
ントでアドレステーブル5がスキヤンされ、クロ
ーズすべきプログラムが抹消される。
Also, the operation when the close instruction is executed is as follows.
The address table 5 is scanned with the added argument of the service circuit 9 shown, and the program to be closed is deleted.

最後に、ポーズ命令が実行された時の動作は、
先ず示されるサービス回路9の付加されたアーギ
ユメントで、カタログポインタ63で示されるア
ドレステーブル5に、ポーズ命令の次の番地が登
録される。そして、ポーズポインタ71で示され
るサービス回路9のサービスポインタ61の内容
が次のアドレステーブル5の次の位置を示すよう
に更新され、サービスポインタ61の内容とトツ
プポインタ62の内容とが比較され、一致しない
場合は上記CPU2の動作が開始された後の動作
へ分岐する。また、両者が一致した場合は上記開
始動作へ分岐し、中央処理装置2によつてポーズ
ポインタ71が更新されるのを待つ。
Finally, the behavior when the pause command is executed is
First, with the added argument of the service circuit 9 shown, the next address of the pause command is registered in the address table 5 indicated by the catalog pointer 63. Then, the contents of the service pointer 61 of the service circuit 9 indicated by the pause pointer 71 are updated to indicate the next position in the next address table 5, and the contents of the service pointer 61 and the top pointer 62 are compared, If they do not match, the process branches to the operation after the operation of the CPU 2 is started. Furthermore, if the two match, the process branches to the start operation described above and waits for the pause pointer 71 to be updated by the central processing unit 2.

以上のようにして、第8図に示されたコンピユ
ータシステムにより、一般の命令、オープン命
令、クローズ命令及びポーズ命令を実行すること
ができる。
As described above, the computer system shown in FIG. 8 can execute general commands, open commands, close commands, and pause commands.

なお、上述では、システムがアドレステーブル
5、ポインタ6及びタイムテーブル7等を持つ専
用のハードウエアにより実現されているが、この
システムは汎用のコンピユータにタイマ1を付加
したシステムとソフトウエアのみによつても実現
可能である。
In addition, in the above, the system is realized by dedicated hardware having an address table 5, a pointer 6, a time table 7, etc., but this system is implemented only by a general-purpose computer with a timer 1 and software. It is still possible.

(発明の効果) 以上のようにこの発明によれば、シーケンス制
御やサーボ制御などをベーシツク、フオートラン
などのシステム言語でない言語によつて容易に行
なうことができる。しかも、フラグやタイマが大
幅に節減されるため、プログラムが単純かつ平明
になる。高速を要する場合や特殊な演算を要する
場合などには、アセンブラなどのシステム言語を
併用することもできる。また、この発明をタイム
テーブルとアドレステーブルを持つハードウエア
により実現するとにより、効率的な制御を行なう
ことが可能である。
(Effects of the Invention) As described above, according to the present invention, sequence control, servo control, etc. can be easily performed using a language other than a system language such as Basic or Fortran. Furthermore, the flags and timers are greatly reduced, making the program simpler and clearer. If high speed or special calculations are required, a system language such as an assembler can also be used. Further, by implementing the present invention using hardware having a time table and an address table, efficient control can be performed.

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

第1図はオープン命令の動作を示すフローチヤ
ート、第2図及び第3図はクローズ命令の動作を
示すフローチヤート、第4図はポーズ命令の動作
を示すフローチヤート、第5図及び第6図はそれ
ぞれオープン命令、クローズ命令及びポーズ命令
を使用したサーボ制御プログラムの例を示すフロ
ーチヤート、第7図及び第8図はそれぞれこの発
明のコーピユータシステムの例を示す構成図であ
る。 1……タイマ、2……中央演算処理装置、3…
…プログラムカウンタ、4……プログラムメモ
リ、5……アドレステーブル、6……ポインタ、
7……タイムテーブル、11……割込みクロツ
ク、61……サービスポインタ、62……トツプ
ポインタ、63……カタログポインタ、71……
ポーズポインタ。
Figure 1 is a flowchart showing the operation of the open command, Figures 2 and 3 are flowcharts showing the operation of the close command, Figure 4 is a flowchart showing the operation of the pause command, and Figures 5 and 6. 7 is a flowchart showing an example of a servo control program using an open command, a close command, and a pause command, respectively, and FIGS. 7 and 8 are block diagrams showing an example of the copier system of the present invention, respectively. 1...Timer, 2...Central processing unit, 3...
...Program counter, 4...Program memory, 5...Address table, 6...Pointer,
7... Time table, 11... Interrupt clock, 61... Service pointer, 62... Top pointer, 63... Catalog pointer, 71...
pause pointer.

Claims (1)

【特許請求の範囲】[Claims] 1 シーケンス制御またはサーボ制御用のコンピ
ユータシステムにおいて、複数のプログラムが格
納されるプログラム格納手段と、計時手段と、前
記プログラムの開始番地が格納される番地格納手
段と、前記計時手段による計時値が格納される計
時値格納手段と、実行すべきプログラムを登録す
るためのオープン命令と、実行中のプログラムの
強制終了または前記登録されたプログラムの登録
抹消するためのクローズ命令と、前記実行中のプ
ログラムを一定時間停止させるためのポーズ命令
と、前記オープン命令を実行する場合には、その
実行時における前記計時手段の計時値を前記計時
値格納手段の空領域に格納すると共に前記番地格
納手段の対応する空領域に当該オープン命令に係
るプログラムの開始番地を格納し、前記クローズ
命令を実行する場合には、前記登録抹消するため
のクローズ命令のときはそれに係るプログラムの
開始番地及び計時値を前記番地格納手段及び前記
計時値格納手段から抹消し、前記強制終了するた
めのクローズ命令のときは前記実行中のプログラ
ムに係る開始番地及び計時値を前記番地格納手段
及び前記計時値格納手段から抹消すると共に当該
クローズ命令の実行時における前記計時手段の計
時値よりも小さい計時値を前記計時値格納手段よ
り検索して前記番地格納手段内の対応する開始番
地に係るプログラムを実行開始し、前記ポーズ命
令を実行する場合には、当該ポーズ命令の実行時
における前記計時手段の計時値に当該ポーズ命令
に係るポーズ時間を加えた値及び当該ポーズ命令
に続く命令の番地をそれぞれ前記計時値格納手段
の空領域及び前記番地格納手段の対応する空領域
に格納すると共に当該実行時における計時値より
も小さい計時値を前記計時値格納手段より検索し
て前記番地格納手段内の対応する開始番地に係る
プログラムを実行開始するように制御を行なう制
御手段とを有することを特徴とするシーケンス制
御及びサーボ制御に適したコンピユータシステ
ム。
1. A computer system for sequence control or servo control, comprising a program storage means in which a plurality of programs are stored, a timekeeping means, an address storage means in which a start address of the program is stored, and a time value measured by the timekeeping means is stored. an open instruction for registering a program to be executed; a close instruction for forcibly terminating a running program or deregistering the registered program; and a clock value storage means for registering a program to be executed; When executing a pause command for stopping for a certain period of time and the open command, the time value of the time measurement means at the time of execution is stored in the empty area of the time value storage means, and the corresponding value of the address storage means is stored. The start address of the program related to the open instruction is stored in the empty area, and when the close instruction is executed, the start address and clock value of the program related to it are stored at the address if the close instruction is for deregistering the registration. and the clock value storage means, and in the case of a close command for forcibly terminating the program, the start address and clock value of the program being executed are deleted from the address storage means and the clock value storage means, and the relevant clock value storage means is deleted. Searching the time value storage means for a time value smaller than the time value of the time measurement means at the time of execution of the close command, starting execution of a program related to a corresponding start address in the address storage means, and executing the pause command. In this case, the value obtained by adding the pause time related to the pause command to the time value of the clock when the pause command is executed and the address of the command following the pause command are stored in the empty area of the clock value storage means and the address of the command following the pause command, respectively. Store the program in the corresponding empty area of the address storage means, search the time value storage means for a timed value smaller than the timed value at the time of execution, and start executing the program related to the corresponding start address in the address storage means. 1. A computer system suitable for sequence control and servo control, characterized in that it has a control means for performing control so as to perform control so as to perform control.
JP60044445A 1985-03-06 1985-03-06 Computer system suitable for sequence control and servo-control Granted JPS61204704A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60044445A JPS61204704A (en) 1985-03-06 1985-03-06 Computer system suitable for sequence control and servo-control

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP60044445A JPS61204704A (en) 1985-03-06 1985-03-06 Computer system suitable for sequence control and servo-control
EP86111200A EP0256149B1 (en) 1986-08-13 1986-08-13 Computer system

Publications (2)

Publication Number Publication Date
JPS61204704A JPS61204704A (en) 1986-09-10
JPH0330164B2 true JPH0330164B2 (en) 1991-04-26

Family

ID=26102395

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60044445A Granted JPS61204704A (en) 1985-03-06 1985-03-06 Computer system suitable for sequence control and servo-control

Country Status (1)

Country Link
JP (1) JPS61204704A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1992008171A1 (en) * 1990-11-06 1992-05-14 Koyo Electronics Industries Co., Ltd. Programmable controller

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5569873A (en) * 1978-11-20 1980-05-26 Toshiba Corp Programmable logic controller
JPS56168214A (en) * 1980-05-29 1981-12-24 Idec Izumi Corp Process step-forward type sequence controller

Also Published As

Publication number Publication date
JPS61204704A (en) 1986-09-10

Similar Documents

Publication Publication Date Title
JPH0561646B2 (en)
JP2526688B2 (en) Programmable controller and partial execution method of sequence program
US7168075B1 (en) Automation device and updating method
US4722043A (en) Control system with changable time-shared execution of ladder and non-ladder programs
JPH0330164B2 (en)
US4907190A (en) Computer control system and method for effecting sequence controls and servo-controls
EP0256149B1 (en) Computer system
US6978190B2 (en) Programming of cyclical machines
KR900008536B1 (en) Computer control system suitable for execution of sequence control and servo control
CN1040588C (en) Computer system for sequential and servo control
US20020082718A1 (en) Method of operating an industrial controller
JP3015793B1 (en) Programmable controller
JPH0410081B2 (en)
JP3460747B2 (en) Numerical control unit
JPH06259115A (en) Programmable controller
JP3548782B2 (en) Control device and method
JPH03288906A (en) Instruction executing system for pc
CA1259417A (en) Computer systems suitable for effecting sequence controls and servo-controls
KR100254779B1 (en) Multiple task high speed execution apparatus in the plc system
JPH0262639A (en) Interruption system for language debugger
JPS6249502A (en) Programmable controller
JPS615349A (en) Programmable controller
JPH01119804A (en) Scan time fixing system for programmable controller
JPH08263127A (en) Numerical control device and program creation method thereof
JPS61183705A (en) Operating trace processing method of programmable controller