JPS6111856A - Operating method of digital control device - Google Patents

Operating method of digital control device

Info

Publication number
JPS6111856A
JPS6111856A JP59131086A JP13108684A JPS6111856A JP S6111856 A JPS6111856 A JP S6111856A JP 59131086 A JP59131086 A JP 59131086A JP 13108684 A JP13108684 A JP 13108684A JP S6111856 A JPS6111856 A JP S6111856A
Authority
JP
Japan
Prior art keywords
interpreter
compiler
program
storage device
address
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
JP59131086A
Other languages
Japanese (ja)
Inventor
Hiroshi Nagase
博 長瀬
Miki Kajita
梶田 美樹
Tsutomu Omae
大前 力
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 Engineering Co Ltd
Hitachi Ltd
Original Assignee
Hitachi Engineering Co Ltd
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 Engineering Co Ltd, Hitachi Ltd filed Critical Hitachi Engineering Co Ltd
Priority to JP59131086A priority Critical patent/JPS6111856A/en
Publication of JPS6111856A publication Critical patent/JPS6111856A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To execute debugging while testing the control of a motional function on the basis of an interpreter system and to attain quick control processing by handling the interpreter and a compiler under the same source program. CONSTITUTION:A digital control device is constituted of an arithmetic unit 11 for executing calculation in accordance with an instruction outputted from a storage device 14, an nput device 12 and an output device 13 for inputting/ outputting signals from/to an external apparatus, storage device 14, 15 for storing data and instructions, a control bus and a data bus for connecting these devices each other. An interpreter and a compiler are stored in respective storage devices 14, 15 and a user select an optional storage device storing the interpreter or compiler to be required.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は自動機械の運動機構を制御するディジタル制御
装置のプログラムの開発方法及びそのディジタル制御装
置によりプログラムケ実行する方法に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Application of the Invention] The present invention relates to a method for developing a program for a digital control device that controls a motion mechanism of an automatic machine, and a method for executing the program by the digital control device.

〔発明の背景〕[Background of the invention]

一般に、自動機械の運動機構(モータ、リレー、バルブ
等)を制御するディジタル制御装置の演算装置(マイク
ロプロセッサ)を動作させるプログラムをユーザーが使
用対象に応じて変える場合、プログラムしやすく、かつ
、デパックしやすいものが必要である。そのため、この
演算装置を動かすプログラムが高度の演算を必要とする
ときは高級言語を用いるとプログラムしやすい。この高
級言語には7オート2ンやベーシックがある。
In general, when a user changes the program that operates the arithmetic unit (microprocessor) of a digital control device that controls the movement mechanism (motor, relay, valve, etc.) of an automatic machine depending on the purpose of use, it is easy to program and easy to use. You need something that is easy to do. Therefore, when a program that operates this arithmetic unit requires high-level calculations, it is easier to program using a high-level language. This high-level language includes 7 autos and 2 autos and basic.

このプログラムの実行には二つの方法がある。There are two ways to run this program.

一つはコンパイ2方式、もう一つはインタプリタ方式で
ある。
One is the Compiler 2 method and the other is the Interpreter method.

コンパイラ方式はユーザーが記述したソースプログラム
をディジタル制御装置の実行に先だって総べて機械語に
翻訳して、ディジタル制御装置が実行できるようにする
ものである。このため、処理速度は速いがユーザーがプ
ログラムの修正を行ない再実行するためにはコンパイラ
による翻訳処理全再度行なう必要がオシ、デパックに時
間がか。
The compiler method is a system in which a source program written by a user is translated into machine language prior to execution by a digital control device, so that the program can be executed by the digital control device. Therefore, although the processing speed is fast, if the user modifies the program and re-executes it, the compiler must perform the entire translation process again, and depacking takes time.

かる欠点がある。更に、デパック中にトラブルが生じた
とき、それがプログラムのどこに原因があるかえ調べる
のに時間がかかる。
There are some drawbacks. Furthermore, when a problem occurs during depacking, it takes time to find out where in the program the problem lies.

インタプリタ方式はプログラムの実行の途上でソースプ
ログラムのステートメントが実行される都度、機械語に
変換して処理を実行するも9である。ソースプログラム
だけを修正すれば、プログラムを実行し逐がら自動変換
するため、再実行までの時間がかからずデバッグが簡単
であるが、インタプリタがソースプログラムを機械語に
変換しながら処理を実行するため、処理速度はコンパイ
ラ方式より遅い。従って、制御装置によって駆動す′る
連結部を所定時間または所定の速さで応答させることが
できない。
In the interpreter method, each time a statement of a source program is executed during program execution, it is converted into machine language and executed. If only the source program is modified, the program will be automatically converted as it runs, so debugging will be easy since it will not take much time to re-run the program, but the interpreter will execute the process while converting the source program into machine language. Therefore, the processing speed is slower than the compiler method. Therefore, it is not possible to cause the coupling section driven by the control device to respond within a predetermined time or at a predetermined speed.

〔発明の目的〕[Purpose of the invention]

本発明の目的は信頼性の高いプログラム開発及びその処
理を行なうディジタル制御装置を提供するにある。。
An object of the present invention is to provide a digital control device that performs highly reliable program development and processing. .

〔発明の概要〕 本発明の特徴はプログラム開発中はデパック機能のすぐ
れたインタプリタ方式を用いて開発を行ない、開発が終
了して開発したプログラムを運用す°る段階では、コン
パイラで翻訳した機械語プログラムを実行して処理し、
コンパイラとインタプリタとソースプログラムと機械語
プログラムを記、憶装置に組込み、制御装置が選択する
ことによりブバッグをしやすく、かつ、実行速度を速く
プログラムの処理を行なうようにし、ソースプログラム
と機械語を対応させるようにしたことにある。
[Summary of the Invention] The feature of the present invention is that during program development, an interpreter method with excellent depacking function is used. Run the program and process it,
A compiler, an interpreter, a source program, and a machine language program are stored in a storage device, and the control device selects one to make it easier to program and process the program at a faster execution speed. The reason is that we have made it compatible.

〔発明の実施例〕[Embodiments of the invention]

第1図に実施例を示す。ディジタル制御装置は記憶装置
14の命令に従って演算を実行する演算装置11、外部
機器と信号をやりとりする入力装置12及び出力装置1
3、データ及び命令を格納しておく記憶装置14,15
.及び、これらを互いに接続する制御バスとデータバス
により構成される。記憶装置15は記憶装置14のアド
レスXからアト・レスYまでの同一アドレスとなる並列
記憶装置でおる。ディジタル制御装置は入力装置12が
取シ込んだデータに応じて記憶装置14゜15に格納さ
れた命令を演算装置11が実行し、出力装置13を通し
て外部に接続された運動機構を制御する。
An example is shown in FIG. The digital control device includes an arithmetic device 11 that executes arithmetic operations according to instructions from a storage device 14, an input device 12 and an output device 1 that exchange signals with external equipment.
3. Storage devices 14 and 15 for storing data and instructions
.. It is also composed of a control bus and a data bus that connect these to each other. The storage device 15 is a parallel storage device in which addresses from address X to address Y of the storage device 14 are the same. In the digital control device, an arithmetic unit 11 executes instructions stored in storage devices 14 and 15 in accordance with data input by an input device 12, and controls a motion mechanism connected to the outside through an output device 13.

この実施例の特徴は、同一アドレス上に並列にある二つ
の記憶装置14 、15を切り裸えて実行する点にある
。それぞれの記憶装置14.15にインタプリタとコン
パイラを格納しておき、ユ゛−ザーが使用しだい方を格
納している記憶装置を選択して用いる。
The feature of this embodiment is that the two storage devices 14 and 15 located in parallel at the same address are executed by cutting them apart. An interpreter and a compiler are stored in each of the storage devices 14 and 15, and the user selects and uses the storage device that stores one as needed.

第2図に並列記憶装置と切シ換え回路のハード構成を示
す。21は第1図の記憶装置14のアドレスXからアド
レスYに対応する記憶装置でインタプリタを記憶したも
の、15はその同一アドレス上にある記憶装置でコンパ
イラを記憶したもの、22はこれらのうち一つを選択す
る切少換え回路である。ディジタル制御装置を起動する
際、あるいは、起動中に演算装置11よ多信号が出され
この切り換え回路22により一方の記憶装置がマスクさ
れread/writeが不可能となる。よって、演算
装置11がアドレスバスを通してこれらの記憶装置のア
ドレスXよシアドレスYを参照した場合、一方の記憶装
置のみread/write が行なえるため、ア゛ド
レスXからアドレスYには一つの記憶装置しか存在しな
いことになる。切シ換え回路22はO8Xまたは、ユー
ザーのプログラムによって自由に変更でき記憶装置21
と15を切り換えることができる。このため、ディジタ
ル制御装置はインタプリンタとコンパイラをすばやく切
シ換えて動作させることができる。記憶装置にはアドレ
スXよりO81並列アドレス領域のアドレスXよシアド
レスYにそれぞれにインタプリタとコンパイラが格納さ
れ、さらにアドレスYからアドレスZまでにリースプロ
グラム、アドレスZ以降に機械語プログラムが格納され
ている。これらの動作は、ソースプログラムをインタプ
リタで実行し表からデバッグを行ないプログラムを完成
させる。記憶装置を切シ換えてコンパイラでこの完成さ
れたソースプログラムを処理し機械語プログラムを自動
作成する。運動機構の制御にはこの処理の早い機械語プ
ログラムを実行して処理をする。
FIG. 2 shows the hardware configuration of the parallel storage device and switching circuit. 21 is a storage device corresponding to address X to address Y of the storage device 14 in FIG. 1 that stores an interpreter, 15 is a storage device located at the same address that stores a compiler, and 22 is one of these storage devices. This is a switching circuit that selects one. When or during startup of the digital control device, the arithmetic unit 11 outputs multiple signals, and the switching circuit 22 masks one of the storage devices, making read/write impossible. Therefore, when the arithmetic unit 11 refers to address X and address Y of these storage devices through the address bus, only one storage device can read/write, so there is only one storage from address X to address Y. Only the device will exist. The switching circuit 22 is an O8X or a storage device 21 that can be freely changed by the user's program.
and 15 can be switched. Therefore, the digital control device can quickly switch between the interpreter and the compiler. In the storage device, an interpreter and a compiler are stored respectively from address X to address Y in the O81 parallel address area, and a lease program is stored from address Y to address Z, and a machine language program is stored from address Z onwards. There is. These operations execute the source program with an interpreter, perform debugging from the table, and complete the program. The storage device is switched and the completed source program is processed by a compiler to automatically create a machine language program. The motion mechanism is controlled by executing this fast-processing machine language program.

よって、プログ2ムの開発、デパックの時間が短かくな
り、さらに、処理の早い制御ができる。
Therefore, the time for program development and depacking is shortened, and furthermore, faster processing control is possible.

このようにするとコンパイラとインタプリタで同一のソ
ースプログラムを取り扱え、その処理結果が同一となる
ため、インタブリタヘソースプログラムの動作をチェッ
クしながらデパックが行なえ、最終的にコンパイラで機
械語プログラムに翻訳し、処理の早いプログラムで運動
機構を制御できる。
In this way, the same source program can be handled by the compiler and interpreter, and the processing results will be the same, so depacking can be performed while checking the operation of the source program to the interpreter, and finally the compiler will translate it into a machine language program. , the movement mechanism can be controlled with a fast-processing program.

また、演算装置からの信号により、コンパイラとインタ
プリタを選択できるため、ソースプログラムを変更しな
がら、同時に、コンパイラで処理を行なうようにOSレ
ベルで自動切シ換えを行なうことができる。よってソー
スプログラムの修正終了と同時に、機械語プログラムへ
の翻訳も終了することができ、開発時間をよシ短縮する
ことができる。
Furthermore, since the compiler and interpreter can be selected by a signal from the arithmetic unit, it is possible to change the source program and simultaneously perform automatic switching at the OS level so that processing is performed by the compiler. Therefore, the translation into a machine language program can be completed at the same time as the modification of the source program is completed, and the development time can be significantly shortened.

さらに、ソースプログラムはもちろんインタプリタ、コ
ンパイラは記憶装置に格納済みであるためプログラムの
転送及びインタプリタとコンパイラの入れ換えのための
read/writeがまったくない。転送及びre 
act /wr i t eの手間がないので、このと
きに生じるおそれがある誤動作がなく、信頼性が大きく
向上する。また、プログラムを転送するためのメそり領
域の必要もないので、メモリ容量を小さくすることがで
きる。
Furthermore, since the source program, interpreter, and compiler are already stored in the storage device, there is no need to read/write to transfer the program or exchange the interpreter and compiler. transfer and re
Since there is no need for act/write, there are no malfunctions that may occur at this time, and reliability is greatly improved. Furthermore, since there is no need for a memory area for transferring programs, the memory capacity can be reduced.

第3図にその他の実施例を示す。31は演算装置11が
取り扱う命令を格納している記憶装置のアドレスを示す
制御カウンタであシ、演算装置11の一部分である。こ
の実施例の特徴は記憶装置14にコンパイラはアドレス
aからアドレスbに、インタプリタはアドレスbからア
ドレスCに格納アドレスを変えて在中させ、実行アドレ
スを切シ換えて、それぞれを実行できるようにした点で
ある。両者の実行は制御カウンタにセットされる実行ア
ドレスをコンパイラ及びインタプリタそれぞれの先頭ア
ドレスにすることで実行できる。
FIG. 3 shows another embodiment. Reference numeral 31 is a control counter indicating the address of a storage device storing instructions handled by the arithmetic unit 11, and is a part of the arithmetic unit 11. The feature of this embodiment is that the compiler resides in the storage device 14 by changing the storage address from address a to address b, and the interpreter changes the storage address from address b to address C, and the execution address is switched so that each can be executed. This is the point. Both can be executed by setting the execution address set in the control counter to the start address of each of the compiler and interpreter.

よって、第1図′の実施例の場合と同様に操作すること
により、制御カウンタの内容を切シ換えることでコンパ
イラ及びインタプリタをすぐに動作させることができ、
プログラムの開発、デバッグの時間が短縮される。
Therefore, by performing the same operations as in the embodiment shown in FIG. 1', the compiler and interpreter can be operated immediately by switching the contents of the control counter.
Program development and debugging time is reduced.

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

本発明によれば、ディジタル制御装置においてインタプ
リタ方式とコンパイラ方式の欠点を補い、各長所を合わ
せもつことができる。
According to the present invention, the drawbacks of the interpreter method and the compiler method can be compensated for in a digital control device, and the advantages of each can be combined.

すなわち、インタプリタとコンパイラが同一のソースプ
ログラムで取シ扱かえるため、運動機構の制御をインタ
プリタ方式によ坊検証しつつデバッグを行なうことがで
き、最終的にサンバイラによって機械語プログラムに翻
訳して処理の早い制御が行なえる。
In other words, since the interpreter and compiler handle the same source program, it is possible to perform debugging while verifying the control of the motion mechanism using the interpreter method, and finally translate it into a machine language program using the sunbyer and process it. can be quickly controlled.

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

第1図は本発明の一実施例の構成図、第2図は記憶装置
の切シ換え回路構成図、第3図はその他の実施例の構成
図である。 11・・・CPU、12・・・入力装置、13・・・出
力装置、14・・・主記憶装置、15.21・・・並列
記憶装置、第10
FIG. 1 is a block diagram of one embodiment of the present invention, FIG. 2 is a block diagram of a switching circuit of a storage device, and FIG. 3 is a block diagram of another embodiment. 11...CPU, 12...Input device, 13...Output device, 14...Main storage device, 15.21...Parallel storage device, 10th

Claims (1)

【特許請求の範囲】 1、プログラム及びデータを格納する記憶装置と、この
記憶装置に格納された前記プログラムの命令に従つて演
算を実行する演算装置と、外部との信号のやりとりをす
る入出力装置とからなるディジタル制御装置において、 前記記憶装置にコンパイラとインタプリタを格納してお
き、前記演算装置からの信号により前記コンパイラか前
記インタプリタかを選択して演算をすることを特徴とす
るディジタル制御装置の演算方法。
[Claims] 1. A storage device that stores programs and data, an arithmetic device that executes operations according to instructions of the program stored in this storage device, and input/output that exchanges signals with the outside. A digital control device comprising: a compiler and an interpreter stored in the storage device; and a computation is performed by selecting either the compiler or the interpreter based on a signal from the arithmetic device. calculation method.
JP59131086A 1984-06-27 1984-06-27 Operating method of digital control device Pending JPS6111856A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59131086A JPS6111856A (en) 1984-06-27 1984-06-27 Operating method of digital control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59131086A JPS6111856A (en) 1984-06-27 1984-06-27 Operating method of digital control device

Publications (1)

Publication Number Publication Date
JPS6111856A true JPS6111856A (en) 1986-01-20

Family

ID=15049649

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59131086A Pending JPS6111856A (en) 1984-06-27 1984-06-27 Operating method of digital control device

Country Status (1)

Country Link
JP (1) JPS6111856A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01259429A (en) * 1988-04-08 1989-10-17 Meidensha Corp Inference system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01259429A (en) * 1988-04-08 1989-10-17 Meidensha Corp Inference system

Similar Documents

Publication Publication Date Title
JPS62182939A (en) Logic simulation method for information processor
JPH02156334A (en) Information processor
JPS6111856A (en) Operating method of digital control device
JP2000284964A (en) Efficient sub-instruction emulation in vliw processor
JPH04149658A (en) Information processor
JPS6120900B2 (en)
JPH0219937A (en) Electronic computer system
JP2619416B2 (en) emulator
JPH0193838A (en) Microprocessor for debug
JPS58166454A (en) Data processor
JPH0259829A (en) Microcomputer
JPH03164945A (en) Data processor
JPS6028014B2 (en) microprocessor
JPH0150936B2 (en)
JPH0234058B2 (en)
JPH0353321A (en) Information processor
JPS6214240A (en) Program inspecting system
JPH02153442A (en) Debugging method of multiprocessor
JPS6349942A (en) Arithmetic processing unit
JPS6223894B2 (en)
JPS63228332A (en) Control system for executing instruction
JPS61267137A (en) System for controlling interrupting action
JPS63153637A (en) Data processor
JPS6113612B2 (en)
JPS59167764A (en) Memory access system