JPS62166408A - Numerical controller - Google Patents

Numerical controller

Info

Publication number
JPS62166408A
JPS62166408A JP946686A JP946686A JPS62166408A JP S62166408 A JPS62166408 A JP S62166408A JP 946686 A JP946686 A JP 946686A JP 946686 A JP946686 A JP 946686A JP S62166408 A JPS62166408 A JP S62166408A
Authority
JP
Japan
Prior art keywords
program
statements
control device
numerical control
instruction
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
JP946686A
Other languages
Japanese (ja)
Inventor
Atsushi Shima
淳 島
Naoki Fujita
直樹 藤田
Hiroyuki Watanabe
浩之 渡辺
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 JP946686A priority Critical patent/JPS62166408A/en
Publication of JPS62166408A publication Critical patent/JPS62166408A/en
Pending legal-status Critical Current

Links

Landscapes

  • Numerical Control (AREA)

Abstract

PURPOSE:To reduce storage capacity and to increase an operation speed by adding a function which deletes unnecessary items from a program to a program converting means. CONSTITUTION:A CPU 2 is provided with the program converting means 21 which converts NC statements containing macro statements into a program consisting of only NC statements containing no macro statement and a means 211 which delete sequence numbers (line number) is provided to the converting means 21. Then, when a program containing macro statements is inputted 1, the macro statements are decoded to generate one block of NC statements. Then, it is judged whether or not the start NC address is N and when so, this N is regarded as the address of a sequence number and the head address is deleted. When not, the head address is held as it is. Then, one block of NC statements is outputted.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は数値制御装置に関する。特に、マクロ文を含ん
で作成されたプログラムを、マクロ文を含まずNC文の
みをもって書かれたプログラムに変換するプログラム変
換手段を有する数値制御装置の改良に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a numerical control device. In particular, the present invention relates to an improvement in a numerical control device having a program conversion means for converting a program created including macro statements into a program written only with NC statements without macro statements.

〔従来の技術〕[Conventional technology]

数値制御装置には、マクロ文を含んで作成されたプログ
ラムを、マクロ文を含まずNC文のみをもって書かれた
プログラムに変換する機能を有するプログラム変換手段
がソフト的に具備されている。
The numerical control device is equipped with software-based program conversion means that has the function of converting a program created including macro statements into a program written only with NC statements without macro statements.

本発明は、マクロコンピュータ応用技術をもって構成さ
れた、このプログラム変換手段の改良である。
The present invention is an improvement of this program conversion means constructed using macrocomputer application technology.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

プログラムを構成する各命令にはシーケンス番号(行番
号)が付加されており、これが、その命令の検索標識等
として使用されている。しかし、このシーケンス番号(
行番号)がプログラムの実行において必ず必要的に使用
されているとは限らない。それにもかかわらず、従来技
術においては、プログラムの実行において使用されると
否とにか(わりなく、各命令にはシーケンス番号(行番
号)が付加されている。
A sequence number (line number) is attached to each instruction making up the program, and this is used as a search indicator for that instruction. But this sequence number (
line numbers) are not necessarily used in program execution. Nevertheless, in the prior art, a sequence number (line number) is attached to each instruction regardless of whether it is used in the execution of a program.

このことは、数値制御装置が、必ずしも必要としない情
報まで記憶するための記憶容量を保持することを要求さ
れ、さらに、必ずしも必要としない情報を伝播するため
の動作時間を要求されていることを意味する。
This means that numerical control devices are required to have storage capacity to store information that is not necessarily needed, and are also required to have operating time to propagate information that is not necessarily needed. means.

また、プログラムを構成する命令のなかには、コメント
が付加されているものがある。これは、このコメントを
ディスプレー上に表示して、操作者の便に供するためで
ある。ところが、このコメントが、プログラムの実行」
−1数値制御装置自身によって活用されないことは明ら
かである。したがって、少なくともプログラムの実行段
階においては不必要な要素である。
Also, some of the instructions that make up the program have comments added to them. This is to display this comment on the display for the operator's convenience. However, this comment "execution of the program"
-1 It is clear that it is not utilized by the numerical controller itself. Therefore, it is an unnecessary element at least at the program execution stage.

このことは、全く不要な情報を記憶するための記憶容゛
量を数値制御装置が保有することを求められ、この全く
不要な情報を伝播する時間を使用することを求められて
いることを意味する。
This means that the numerical control device is required to have enough storage capacity to store completely unnecessary information, and is required to use the time to propagate this completely unnecessary information. do.

さらに、複数回反復実行されるべき命令を表わす命令文
に対しては、この反復実行されるべき命令であることを
表わすコード(モーダルコード)が、このグループ(複
数回反復実行されるべき命令を表わす命令文のグループ
)に属するすべての命令文に付加されている。
Furthermore, for an instruction statement that represents an instruction that is to be repeatedly executed multiple times, a code that represents an instruction that is to be repeatedly executed (modal code) is added to this group (an instruction that is to be repeatedly executed multiple times). It is added to all command statements belonging to the group of command statements (representing a group of command statements).

ところが、この反復実行されるべき命令は、連続した一
連の命令のグループとして与えられるものであるから、
この連続した一連の命令のグループの頭初と末尾とにマ
ークを付せば十分の筈である。
However, since the instructions to be repeatedly executed are given as a group of consecutive instructions,
It should be sufficient to mark the beginning and end of this group of consecutive commands.

しかし、従来技術においては、連続した一連の命令のグ
ループを構成する命令文の各々に対して、これらの各命
令文が、連続した一連の命令のグループに属する命令文
であることを表わすコード(モーダルコード)が付加さ
れていた。
However, in the prior art, a code ( modal code) was added.

このことは、」二記と同様、数値制御装置が、必要以上
に大きな記憶容量を有することを求められ、また、命令
の実行速度がそれだけ遅くなることを意味する。
This means that, as in item 2, the numerical control device is required to have a larger storage capacity than necessary, and the instruction execution speed becomes correspondingly slower.

本発明の目的は、”この欠点を解消することにあり、当
初のプログラムとしては必要であっても、あるプロセス
においては不必要である事項を、プログラムから削除す
る機能を、数値制御装置のプログラム変換手段に付加し
て、記憶容量が減少し、動作速度が向上している数値制
御装置を提供することにある。
The purpose of the present invention is to eliminate this drawback, and to provide a program for numerical control devices with the ability to delete items from the program that are necessary in the initial program but are unnecessary in a certain process. It is an object of the present invention to provide a numerical control device which, in addition to a conversion means, has a reduced storage capacity and an improved operating speed.

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

(イ)上記の目的を達成するために本発明が採った第1
の手段は、 マクロ文を含んで作成されたプログラムをNC文のみの
プログラムに変換するプログラム変換手段21に、 プログラムにシーケンス番号が含まれているか否かを判
断し、もし、シーケンス番号が含まれているときは、こ
のシーケンス番号を前記のプログラムから削除する機能
を有するシーケンス番号削除手段211を 伺加することにある。
(b) The first aspect taken by the present invention to achieve the above object.
The means for converting a program created including macro statements into a program containing only NC statements determines whether or not the program includes a sequence number, and if the program does not include a sequence number, When the sequence number is deleted from the program, sequence number deletion means 211 is added which has the function of deleting this sequence number from the program.

(ロ)1−記の目的を達成するために本発明が採った第
2の手段は、 マクロ文を含んで作成されたプログラムをNC文のみの
プログラムに変換するプログラム変換手段21に、 プログラムにコメント文が含まれているか否かを判断し
、もし、コメント文が含まれているときは、この含まれ
ているコメント文を前記のプログラムから削除する機能
を有するコメント文削除手段212を 伺加することにある。
(b) The second means taken by the present invention to achieve the object of item 1-1 is to have the program converting means 21 convert a program created including macro statements into a program containing only NC statements. A comment text deletion means 212 having a function of determining whether a comment text is included and, if a comment text is included, deleting the included comment text from the program, is added. It's about doing.

(ハ)」−記の目的を達成するために本発明が採った第
3の手段は、 マクロ文を含んで作成されたプログラムをNC文のみの
プログラムに変換するプログラム変換手段21に、 プログラム中に、複数回反復実行されるべき命令が含ま
れているか否かを判断し、もし、複数回反復実行される
べき命令が含まれているときは、次に入力される命令に
、前記の複数回反復実行されるべき命令と同一の命令が
含まれているか否かを判断し、もし、この同一の命令が
含まれているときは、この同一の命令を表わすコードを
前記のプログラムから削除する機能を有する同一命令コ
ード削除手段213を 付加することにある。
The third means adopted by the present invention in order to achieve the object stated in "(C)" is that the program conversion means 21 converts a program created including macro statements into a program containing only NC statements. includes an instruction that should be repeatedly executed multiple times, and if it includes an instruction that should be repeatedly executed multiple times, the next input instruction includes the above-mentioned multiple instructions. Determine whether the same instruction as the one to be repeatedly executed is included, and if the same instruction is included, delete the code representing this same instruction from the program. The purpose is to add a same instruction code deletion means 213 having a function.

〔実施例〕〔Example〕

以下、図面を参照しつ−、本発明に係る数値制御装置に
ついてさらに説明する。   。
Hereinafter, the numerical control device according to the present invention will be further explained with reference to the drawings. .

11立1」 シーケンス番号(行番号)を削除する機能を有するシー
ケンス番号削除手段211の付加されたプログラム変換
手段21を有する数値制御装置側こつし)て述べる。
The numerical control device having the program converting means 21 to which the sequence number deleting means 211 having the function of deleting sequence numbers (line numbers) will be described below.

第1a図参照 図においては、1は入・出力装置であり、2はCPUで
あり、3は制御装置であり、4は記憶装置である。CP
U2には、マクロ文を含むNC文を、マクロ文を含まぬ
NC文のみのプログラムに変換するプログラム変換手段
21が設けられており、さらに、このプログラム変換手
段21には、シーケンス番号(行番号)を削除するシー
ケンス番号削除手段211が設けられている。
In the diagram of FIG. 1a, 1 is an input/output device, 2 is a CPU, 3 is a control device, and 4 is a storage device. C.P.
U2 is provided with a program conversion means 21 that converts an NC statement including a macro statement into a program containing only NC statements without a macro statement. ) is provided.

第2図参照 マクロ文を含むプログラムが入力されると、マクロ文を
解読して、lブロック文のNC文を作成する(1)。
When a program including a macro statement (see FIG. 2) is input, the macro statement is decoded and an NC statement of l block statement is created (1).

そして、先頭のNCアドレスがNか否かを判断し、もし
、Nであれば(2)、このNをシーケンス番号のアドレ
スと見做して、先頭のアドレスを削除する。また、もし
、Nでなければ、先頭のアドレスはそのまへ保持する(
3)。
Then, it is determined whether the first NC address is N or not, and if it is N (2), this N is regarded as the address of the sequence number and the first address is deleted. Also, if it is not N, the first address is kept as is (
3).

その後、lブロックのNC文を出力する(4)。After that, the NC statement of l block is output (4).

第」しΩJ[朋 コメントを削除する機能を有するコメント削除手段21
2の付加されたプログラム変換手段21を有する数値制
御装置について述べる。
Comment deletion means 21 having the function of deleting comments
A numerical control device having two additional program converting means 21 will be described.

第1b図参照 図においては、lは入会出力装置であり、2はCPUで
あり、3は制御装置であり、4は記憶装置である。CP
U2には、マクロ文を含むNC文を、マクロ文を含まぬ
NC文のみのプログラムに変換するプログラム変換手段
21が設けらており、さらに、このプログラム変換手段
21には、コメントを削除するコメント削除手段212
が設けられいる。
In the diagram with reference to FIG. 1b, 1 is an admission output device, 2 is a CPU, 3 is a control device, and 4 is a storage device. C.P.
U2 is provided with a program converting means 21 that converts an NC statement including a macro statement into a program containing only NC statements without a macro statement. Deletion means 212
is provided.

第3図参照 マクロ文を含むプログラムが入力されると、マクロ文を
解読して、lブロック文のNC文を作成する(1)。
When a program including a macro statement (see FIG. 3) is input, the macro statement is decoded and an NC statement of l block statement is created (1).

そして、コメント文が含まれているか否かを判断し、も
し、コメント文が含まれているときは(2)、このコメ
ント文を前記のプログラムから削除する(3)。
Then, it is determined whether a comment sentence is included or not, and if a comment sentence is included (2), this comment sentence is deleted from the program (3).

その後、■ブロックのNC文を出力する(4)。After that, the NC statement of block ① is output (4).

乳1匁1期 反復実行されるべき命令を表わすコードを削除する機能
を有する同一命令コード削除手段213の伺加されたプ
ログラム変換手段を有する数値制御装置について述べる
A numerical control device having program converting means added with identical instruction code deleting means 213 having a function of deleting a code representing an instruction to be repeatedly executed once per period will be described.

第1c図参照 図においては、lは入・出力装置であり、2はCPUで
あり、3は制御装置であり、4は記憶装置である。CP
U2には、マクロ文を含むNC文を、マクロ文を含まぬ
NC文のみのプログラムに変換するプログラム変換手段
21が設けらており、さらに、このプログラム変換手段
21には、同一命令コード削除手段213が設けられい
る。
In the diagram with reference to FIG. 1c, 1 is an input/output device, 2 is a CPU, 3 is a control device, and 4 is a storage device. C.P.
U2 is provided with a program conversion means 21 for converting an NC statement including a macro statement into a program containing only NC statements without a macro statement, and further includes a same instruction code deletion means. 213 is provided.

第4図参照 マクロ文を含むプログラムが入力されると、マクロ文を
解読して、1ブロック文のNC文を作成する(1)。
When a program including a macro statement (see FIG. 4) is input, the macro statement is decoded to create one block of NC statements (1).

Gコードか否かを判断して、もし、Gコードであれば(
2)、そのGコードのモーダルは確定しているか否かを
判断しく3)、もし、確定していれば、Gコードは出力
しない。また、もし、確定していなければ、Gコードは
出力する(4)。
Determine whether it is a G code or not, and if it is a G code (
2) It is determined whether the modal of the G code is determined or not. 3) If it is determined, the G code is not output. Furthermore, if it has not been determined, the G code is output (4).

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

以上説明せるとおり、本発明に係る数値制御装置のプロ
グラム変換手段には、それぞれ、シーケンス番号(行番
号)を削除するシーケンス番号削除手段、コメントを削
除するコメント削除手段、または、反復実行されるべき
命令を表わすコードを削除する同一命令コード削除手段
が付加されているので、これらの手段をもって、それぞ
れ、上記の各要素が削除される。そして、これらの各要
素が削除された後のプログラムは、それだけ小さなプロ
グラムとなり、機能には全く何の影響も与えないにもか
覧わらず、数値制御装置の有すべき記憶容量はそれだけ
小さくされ、数値制御装置の実行速度はそれだけ向上し
ている。
As explained above, the program conversion means of the numerical control device according to the present invention includes a sequence number deletion means for deleting sequence numbers (line numbers), a comment deletion means for deleting comments, and a Since identical instruction code deletion means for deleting the code representing an instruction is added, each of the above-mentioned elements is deleted using these means. The program after each of these elements is deleted becomes a smaller program, and although it has no effect on the functionality, the storage capacity that the numerical control device should have is reduced accordingly. , the execution speed of numerical control devices has improved accordingly.

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

第1a図は、本出願の第1の発明に係る数値制御装置の
クレーム対応図である。 第1b図は、本出願の第2の発明に係る数値制御装置の
クレーム対応図である。 第1c図は、本出願の第3の発明に係る数値制御装置の
クレーム対応図である。 第2図は、本出願の第1の発明に係る数値制御装置の要
旨に係る部分のフローチャートである。 第3図は、本出願の第2の発明に係る数値制御装置の要
旨に係る部分のフローチャートである。 第4図は、本出願の第3の発明に係る数イー制御装置の
要旨に係る部分のフローチャートである。 l・・・入会出力装置、  2・・・CPU。 21・・・プログラム変換手段、  211・・・シー
ケンス番号削除手段、  212拳・−コメント削除”
手段、  213・・・同一命令コード削除手段、噛り 3・・・制御装置、 4拳・・記憶装置。
FIG. 1a is a diagram corresponding to the claims of the numerical control device according to the first invention of the present application. FIG. 1b is a diagram corresponding to the claims of the numerical control device according to the second invention of the present application. FIG. 1c is a diagram corresponding to the claims of the numerical control device according to the third invention of the present application. FIG. 2 is a flowchart of a portion related to the gist of the numerical control device according to the first invention of the present application. FIG. 3 is a flowchart of a portion related to the gist of the numerical control device according to the second invention of the present application. FIG. 4 is a flowchart of a portion related to the gist of the numerical E control device according to the third invention of the present application. l... Enrollment output device, 2... CPU. 21...Program conversion means, 211...Sequence number deletion means, 212 Fist-comment deletion"
means, 213...same instruction code deletion means, bite 3...control device, 4 fists...storage device.

Claims (1)

【特許請求の範囲】 [1]マクロ文を含んで作成されたプログラムを入力さ
れて、該プログラムをNC文のみのプログラムに変換す
るプログラム変換手段(21)を有する数値制御装置に
おいて、 前記プログラム変換手段(21)には、前記プログラム
にシーケンス番号が含まれているか否かを判断し、もし
、シーケンス番号が含まれているときは、該含まれてい
るシーケンス番号を前記プログラムから削除するシーケ
ンス番号削除手段(211)が付加されてなることを特
徴とする数値制御装置。 [2]マクロ文を含んで作成されたプログラムを入力さ
れて、該プログラムをNC文のみのプログラムに変換す
るプログラム変換手段(21)を有する数値制御装置に
おいて、 前記プログラム変換手段(21)には、前記プログラム
にコメント文が含まれているか否かを判断し、もし、コ
メント文が含まれているときは、該含まれているコメン
ト文を前記プログラムから削除するコメント文削除手段
(212)が付加されてなることを特徴とする数値制御
装置。 [3]マクロ文を含んで作成されたプログラムを入力さ
れて、該プログラムをNC文のみのプログラムに変換す
るプログラム変換手段(21)を有する数値制御装置に
おいて、 前記プログラム変換手段(21)には、前記プログラム
に、複数回反復実行されるべき命令が含まれているか否
かを判断し、もし、複数回反復実行されるべき命令が含
まれているときは、次に入力される命令に、前記複数回
反復実行されるべき命令と同一の命令が含まれているか
否かを判断し、もし、同一の命令が含まれているときは
、該同一の命令を表わすコードを前記プログラムから削
除する同一命令コード削除手段(213)が付加されて
なることを特徴とする数値制御装置。
[Scope of Claims] [1] A numerical control device comprising a program converting means (21) that receives a program created including macro statements and converts the program into a program containing only NC statements, comprising: The means (21) determines whether or not the program includes a sequence number, and if the program includes a sequence number, deletes the included sequence number from the program. A numerical control device characterized in that a deletion means (211) is added. [2] In a numerical control device having a program converting means (21) that receives a program created including macro statements and converts the program into a program containing only NC statements, the program converting means (21) includes: , a comment text deletion means (212) that determines whether or not the program includes a comment text, and if a comment text is included, deletes the included comment text from the program; A numerical control device characterized by being added. [3] In a numerical control device having a program converting means (21) that receives a program created including macro statements and converts the program into a program containing only NC statements, the program converting means (21) includes: , determine whether the program includes an instruction that should be repeatedly executed multiple times, and if the program includes an instruction that should be repeatedly executed multiple times, the next input instruction is: Determine whether the same instruction as the instruction to be repeatedly executed is included or not, and if the same instruction is included, delete the code representing the same instruction from the program. A numerical control device characterized in that a same instruction code deletion means (213) is added.
JP946686A 1986-01-20 1986-01-20 Numerical controller Pending JPS62166408A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP946686A JPS62166408A (en) 1986-01-20 1986-01-20 Numerical controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP946686A JPS62166408A (en) 1986-01-20 1986-01-20 Numerical controller

Publications (1)

Publication Number Publication Date
JPS62166408A true JPS62166408A (en) 1987-07-22

Family

ID=11721051

Family Applications (1)

Application Number Title Priority Date Filing Date
JP946686A Pending JPS62166408A (en) 1986-01-20 1986-01-20 Numerical controller

Country Status (1)

Country Link
JP (1) JPS62166408A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1989002110A1 (en) * 1987-09-02 1989-03-09 Fanuc Ltd Cnc program execution apparatus
JP2001028585A (en) * 1999-07-13 2001-01-30 Sony Corp Distribution content generating method, method and device for distributing content, and code converting method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1989002110A1 (en) * 1987-09-02 1989-03-09 Fanuc Ltd Cnc program execution apparatus
JP2001028585A (en) * 1999-07-13 2001-01-30 Sony Corp Distribution content generating method, method and device for distributing content, and code converting method
US7653752B2 (en) 1999-07-13 2010-01-26 Sony Corporation Distribution contents forming method, contents distributing method and apparatus, and code converting method

Similar Documents

Publication Publication Date Title
SE455650B (en) DOCUMENT PRESENTATION DEVICE INCLUDING A SYSTEM FOR STORING DOCUMENTS WITH TEXT AND RUST COMPONENTS
JPS62166408A (en) Numerical controller
JP2786206B2 (en) Functional blueprint generation method
JP5966801B2 (en) Language converter, program
JPH0551943B2 (en)
JPS61151753A (en) Computer with guide function
JPS59225449A (en) Sentence number converting system
JPH05250210A (en) Program trace system
JPH0315779B2 (en)
JPS5969831A (en) Device for documentation
JPH025132A (en) Automatic document forming system
JP2718703B2 (en) Key input data processing method
JPS636555A (en) Typesetting system
JPH11167409A (en) Program controller operating by parallel language
JPS6142296B2 (en)
JPS60100226A (en) Test processor for tree structure chart
JPH0236419A (en) Automatic translation execution system for source code
JPH06138913A (en) Programmable controller
JPS5846439A (en) Program editing method of computer
JPH0227404A (en) Programmable controller
JPS62286105A (en) Numerical control device
JPH04248624A (en) Program conversion processor
JPH0690669B2 (en) Character string manipulation instruction compilation processing method
JPS6366651A (en) Status check system using source list
JPS6313097A (en) Cursor control