JPS63298406A - Automatic programming device - Google Patents

Automatic programming device

Info

Publication number
JPS63298406A
JPS63298406A JP62132704A JP13270487A JPS63298406A JP S63298406 A JPS63298406 A JP S63298406A JP 62132704 A JP62132704 A JP 62132704A JP 13270487 A JP13270487 A JP 13270487A JP S63298406 A JPS63298406 A JP S63298406A
Authority
JP
Japan
Prior art keywords
program
undefined
sentence
editing
definition
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
JP62132704A
Other languages
Japanese (ja)
Inventor
Kazuaki Hino
日野 和晃
Yutaka Tanaka
豊 田中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP62132704A priority Critical patent/JPS63298406A/en
Publication of JPS63298406A publication Critical patent/JPS63298406A/en
Pending legal-status Critical Current

Links

Landscapes

  • Numerical Control (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To avoid the useless delay of the time needed for the end of a program analyzing process by newly defining an undefined error detected by a program analyzing means at this detecting time point to correct and edit a working program and starting continuation of the program analyzing process by the edited defined sentence. CONSTITUTION:A working program supplied by a program input means 1a is analyzed by a program analyzing means 1b. In this case, a correcting/editing command is given to a program editing input means 1c to newly define an undefined sentence at a time point when an undefined error is detected with the variables, pattern numbers, etc., contained in the working program. When said correcting/editing job is through, a program changing means 1d starts continuation of the program analyzing process by the newly defined sentence and its following undefined sentence. Thus it is possible to reduce the debug processing load and also to avoid the delay of the time needed for the program analyzing process.

Description

【発明の詳細な説明】 [産業上の利用分野] この発明は、数値制御装置によって工作機械を駆動制御
して被加工物を加工するためのNCデータを作成する自
動プログラミング装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an automatic programming device that generates NC data for controlling the drive of a machine tool and machining a workpiece using a numerical control device.

[従来の技術] 第7図は、従来の自動プログラミング装置の構成図であ
る。第7図において、(1)はキーボード(6)から入
力される液加゛工物の加工プログラム等の各データを処
理するCPU、(2)は入力された各データを記憶する
メモリ、(3)は入力された各データを印字するプリン
タ、(4)は紙テープに各種データを穿孔したり、穿孔
された紙テープの情報を読み取ったりする紙テープ人出
力装置、(5)は入力された図形又は文字を表示するC
RT、(6)はデータを入力するためのキーボード、(
8)は入出力装置(7) を介してCP U (1)と
の間でデータの授受を行なうフレキシブルディスク、(
lO)はインターフェース(9)を介して伝送されるデ
ータを処理して、工作機械(12)を駆動制御をするN
C装置、(11)は各データを伝送するバスである。
[Prior Art] FIG. 7 is a block diagram of a conventional automatic programming device. In FIG. 7, (1) is a CPU that processes each data such as a machining program for a liquid-processed product inputted from a keyboard (6), (2) is a memory that stores each inputted data, and (3) ) is a printer that prints each input data, (4) is a paper tape output device that punches various data on the paper tape and reads information from the punched paper tape, and (5) is the input figure or character. C to display
RT, (6) is a keyboard for inputting data, (
8) is a flexible disk that exchanges data with the CPU (1) via the input/output device (7);
lO) processes the data transmitted via the interface (9) and controls the machine tool (12).
C device (11) is a bus for transmitting each data.

次に、従来の自動プログラミング装置の動作について説
明する。まず、編集機能にして、キーボード(6)より
加工プログラムを入力する。第4図に、加工プログラム
の一例を載せる。CPU(1)は、入力された加工プロ
グラムをメモリ(2)又は、入出力装置(7)を介して
フレキシブルディスク(8)に記憶させる。
Next, the operation of the conventional automatic programming device will be explained. First, use the editing function and input the machining program from the keyboard (6). FIG. 4 shows an example of a machining program. The CPU (1) stores the input machining program in the memory (2) or the flexible disk (8) via the input/output device (7).

次いで、加工プログラム解析機能にすると、メモリ(2
)又は、フレキシブルディスク(8)に記憶させた加工
プログラム中の各定義文を、先頭の行から順に解析し、
NC装置が実際に加工できるNCデータに変換する。又
、加工プログラムの解析結果を基にして、CRT (5
)上で、加工工具の経路等を確認することができる。
Next, when you turn on the machining program analysis function, the memory (2
) or analyze each definition statement in the machining program stored in the flexible disk (8) in order from the first line,
Convert to NC data that can be actually processed by the NC device. Also, based on the analysis results of the machining program, CRT (5
), you can check the path of the machining tool, etc.

CP U (1)は、この様にして得られたNCデータ
を、紙テープ入出力装置(4)によって紙テープに出力
するか、入出力装置(7)を介してフレキシブルディス
クに記憶させるか、又は工作機M (12)を駆動制御
すべく、インターフェース(9)を介してNC装置(1
0)に伝送する。
The CPU (1) outputs the NC data obtained in this way onto a paper tape using the paper tape input/output device (4), stores it on a flexible disk via the input/output device (7), or outputs the NC data obtained in this way to a paper tape via the paper tape input/output device (7), or In order to drive and control the machine M (12), the NC device (1) is connected via the interface (9).
0).

[発明が解決しようとする問題点] 従来の自動プログラミング装置は以上の様に構成されて
おり、加工プログラムの先頭の行より順に解析するので
、定義されていない変数や図形番号があると、その時点
でエラーエラセージを出力して解析処理を終了してしま
う。よって、再び編集機能にして加工プログラムを編集
し直さねばならず、操作が面倒であるなどの問題点があ
った。
[Problems to be solved by the invention] The conventional automatic programming device is configured as described above, and analyzes the machining program in order from the first line, so if there is an undefined variable or figure number, the At this point, an error message is output and the analysis process ends. Therefore, it is necessary to use the editing function again and edit the machining program again, which causes problems such as troublesome operation.

この発明は上記のような問題点を解消するためになされ
たもので、加工プログラム解析の際に、変数や図形番号
等が未定義であれば、自動的に加工プログラムの修正編
集ができ、修正後は再び解析処理を続行することのでき
る自動プログラミング装置を得ることを目的とする。
This invention was made to solve the above-mentioned problems. When analyzing a machining program, if variables, figure numbers, etc. are undefined, the machining program can be automatically edited and corrected. The purpose of this invention is to obtain an automatic programming device that can continue the analysis process again.

[問題点を解決するための手段] この発明に係る自動プログラミング装置は、プログラム
人力手段によって人力された加工プログラムを、プログ
ラム解析手段によって解析処理した時、加工プログラム
中の変数や図形番号等に未定義エラーが検出された時点
でプログラム編集人力手段に未定義文を新たに定義する
修正編集を指令し、修正編集後はプログラム変更手段に
より、新たに定義した定義文そして次に定義された未定
義文より解析処理を続行するようにしたものである。
[Means for Solving the Problems] The automatic programming device according to the present invention has an automatic programming device that, when a machining program manually created by a human program means is analyzed by a program analysis means, there are no errors in variables, figure numbers, etc. in the machining program. When a definition error is detected, the program editing manual means is commanded to perform a correction edit to newly define an undefined statement. After the correction editing, the program change means edits the newly defined definition statement and the next defined undefined statement. The parsing process continues from the beginning of the sentence.

[作用] この発明によるプログラム編集手段によれば、プログラ
ム解析手段によって検出された未定義エラーをエラー検
出の時点で新たに定義化して加工プログラムを修正編集
した後、プログラム変更手段に編集完了後の定義文より
加工プログラムの解析処理を続行させる為、解析処理完
了時間を無駄に長びかせることがない。
[Operation] According to the program editing means according to the present invention, after the undefined error detected by the program analysis means is newly defined at the time of error detection and the machining program is corrected and edited, the program changing means Since the analysis processing of the machining program is continued from the definition statement, the analysis processing completion time is not unnecessarily prolonged.

[実施例] 第1図はこの発明による自動プログラミング装置の一実
施例の全体構成図である。この実施例は第1図から明ら
かなように、加工プログラムを所定のデータ入力装置に
よって入力するプログラム入力手段(1a)と、入力さ
れた加工プログラムを先゛ 頭より順に解析し、加工プ
ログラム中に変数や図形番号等が未定義であれば、エラ
ーメツセージを出力すると共に、未定義文を修正編集さ
せる自動編集モードを選択するプログラム解析手段(1
b)と、前記自動編集モード選択時に、未定義文を新た
に定義化する定義文を、キーボードより入力し加工プロ
グラムを修正編集するプログラム編集人力手段(lc)
と、プログラム修正編集後、加工プログラムの解析処理
を新たに定義した定義文より解析処理を行ない、次に未
定義文への解析処理を指令するプログラム変更手段(1
d)より構成されている。
[Embodiment] FIG. 1 is an overall configuration diagram of an embodiment of an automatic programming device according to the present invention. As is clear from FIG. 1, this embodiment includes a program input means (1a) for inputting a machining program using a predetermined data input device, and a program input means (1a) for inputting a machining program using a predetermined data input device. If variables, figure numbers, etc. are undefined, a program analysis means (1) outputs an error message and selects an automatic editing mode to modify and edit undefined statements.
b) and a program editing manual means (LC) for correcting and editing the machining program by inputting from the keyboard a definition sentence that newly defines an undefined sentence when the automatic editing mode is selected.
After editing the program, the program changing means (1) executes the analysis process of the machining program from the newly defined definition statement, and then instructs the analysis process to the undefined statement.
d).

第2図は、本発明に係る自動プログラミング装置の構成
図である。第2図に於いて、(1)はキーボード(6)
、デジタイザー(7)、又はマウス(8)から入力され
る被加工物の加工プログラム等の各データを処理すると
共に、第3図のフローチャートに示す処理を実行するc
pu、(2)は入力された各データを記憶するメモリ、
(3) は入力された各データを印字するプリンタ、(
4)は紙テープに各種データを穿孔したり、穿孔された
紙テープの情報を読み取ったりする紙テープ人出力装置
、(5)は人力された図形や文字を表示するCRT、(
10)は入出力装置(9)を介してCP U (1) 
との間でデータの授受を行なうフレキシブルディスク、
(12)はインターフェイス(11)を介して伝送され
るデータを処理して、工作機械(14)を駆動制御する
NC装置、(13)は各データを伝送するバスである。
FIG. 2 is a configuration diagram of an automatic programming device according to the present invention. In Figure 2, (1) is the keyboard (6)
, digitizer (7), or mouse (8), process each data such as a processing program for the workpiece, and execute the process shown in the flowchart of FIG.
pu, (2) is a memory that stores each input data;
(3) is a printer that prints each input data; (
4) is a paper tape human output device that perforates various data on paper tape and reads information from the perforated paper tape; (5) is a CRT that displays human-generated figures and characters;
10) is the CPU (1) via the input/output device (9).
A flexible disk that sends and receives data between
(12) is an NC device that processes data transmitted via the interface (11) to drive and control the machine tool (14), and (13) is a bus that transmits each data.

次に、本発明に係る自動プログラミング装置の動作につ
いて、第3図のフローチャートを参照して説明する。
Next, the operation of the automatic programming device according to the present invention will be explained with reference to the flowchart shown in FIG.

(1)ステップS1 プログラム編集モードにすると、c p U (1)は
、キーボード(6)より加工プログラムの入力を受けつ
ける。この入力されたプログラムは、メモリ(2)又は
入出力装置(9)を介してフレキシブルディスク(lO
)に記憶させる。
(1) Step S1 When set to program editing mode, cpU (1) receives input of a machining program from the keyboard (6). This input program is stored on a flexible disk (IO) via memory (2) or input/output device (9).
).

(2)ステップS2.S7 プログラム解析モードにすると、CPU(1)は、人力
された加工プログラムを先頭より順に解析する。エラー
がなければ解析処理を終了するが、変数等が未定義であ
れば(ステップS3)へ、その他のエラーであれば、C
RT(5)にエラーメツセージを出力する(ステップS
7)。
(2) Step S2. S7 When set to program analysis mode, the CPU (1) analyzes the manually-written machining program in order from the beginning. If there is no error, the analysis process ends, but if variables etc. are undefined, go to (step S3), and if there are other errors, go to C
Output an error message to RT(5) (step S
7).

(3)ステップ33〜5 ステップS2のプログラム解析処理で未定義エラーが発
生した時は、CP U (1)は、自動編集モードを選
択する(ステップS3)。そして、CP U (1)は
、未定義エラーになった行と、未定義になった変数名又
は図形番号を、メモリ(2)に記憶させる(ステップS
4)。
(3) Steps 33 to 5 When an undefined error occurs in the program analysis process of step S2, the CPU (1) selects automatic editing mode (step S3). Then, the CPU (1) stores the line in which the undefined error occurred and the undefined variable name or figure number in the memory (2) (step S
4).

c p U (1)は、プログラム編集機能を呼び出し
、未定義エラーとなった行の前に一行空白をあけ、キー
ボード(6)より、入力を待つ。例えば、第5図に示す
加工プログラムを、解析したとする。すると、■行目の
ところで、図形「L4」が定義されていないから、メモ
リ(2)には、未定義エラーの発生した■行目と、「L
4」という図形番号が記憶される。よって、■行目と■
行目の間に1行空白ができて、図形「L4」が定義でき
る様になる。
c p U (1) calls the program editing function, leaves a blank line in front of the line where the undefined error occurs, and waits for input from the keyboard (6). For example, suppose that the machining program shown in FIG. 5 is analyzed. Then, since the figure "L4" is not defined at the line ■, the memory (2) contains the line ■ where the undefined error occurred and the figure "L4".
4" is stored. Therefore, ■ line and ■
A blank line will be created between the lines, and the figure "L4" can now be defined.

未定義であった変数又は、図形番号を定義し終えると、
CP U (1)は、メモリ(2)からどの行で未定義
が発生したかという情報と、新しく定義した行が何行目
であるかという情報を取り出して、自動編集モードを終
了する(ステップS5)。
When you finish defining undefined variables or figure numbers,
The CPU (1) retrieves from the memory (2) the information on which line the undefined occurs and the information on the number of the newly defined line, and ends the automatic editing mode (step S5).

(4)ステップS6 自動編集モードを終了すると、CP U (1)は、新
しく定義した行をまず初めに解析し、次いで未定義エラ
ーの発生性から再び解析を始める。第5図で説明すれば
、まず■行目と■行目の間に挿入された図形「L4」の
データを解析し、次いで■行目より順にプログラムを解
析していくのである。
(4) Step S6 When the automatic editing mode is ended, the CPU (1) first analyzes the newly defined line, and then starts the analysis again from the occurrence of undefined errors. To explain this with reference to FIG. 5, first, the data of the figure "L4" inserted between the ■-th line and the ■-th line is analyzed, and then the program is analyzed sequentially from the ■-th line.

なお、上記実施例では、プログラム解析中の動作として
示したが、メモリ(2)に所定の行を記憶できることか
ら、プログラム編集機能の際に、今まで未定義の図形を
参照する様な文を書いた時に゛ 自動編集モードを選択
すれば、その行の前に、参照する図形データを定義でき
る空白が設けられ、自動編集モード終了後は、キーボー
ド入力待ち記号(以後、カーソルと呼ぶ)は、自動編集
モードを呼び出したところの行に戻る。例えば、第6図
の[1]では、■行目で未定義の図形rL10Jを参照
する様になっている。ここで自動選択モードにすると、
[2]の様に、[株]行目と■行目の間に1行空白がで
きて、カーソルがこの空白行に存在して、図形rL10
Jが定義されるのを待つ。
In the above example, the operation was shown as an operation during program analysis, but since a predetermined line can be stored in the memory (2), when using the program editing function, it is possible to write a statement that refers to a previously undefined figure. If you select the automatic editing mode when writing, a blank space will be provided before the line where you can define the reference figure data, and after the automatic editing mode ends, the symbol waiting for keyboard input (hereinafter referred to as the cursor) will be Return to the line where automatic editing mode was called. For example, in [1] of FIG. 6, the undefined figure rL10J is referred to in the ■th line. If you switch to automatic selection mode here,
As shown in [2], there is a blank line between the [stock] line and the ■ line, the cursor is on this blank line, and the shape rL10
Wait for J to be defined.

定義し終えて自動編集モードを抜けると、[3]に示す
様に、カーソルは再び■行目の末尾にあられれる。
When the definition is completed and the automatic editing mode is exited, the cursor is placed again at the end of the line ■, as shown in [3].

[発明の効果] 以上説明したようにこの発明によれば、一定の順序で書
かれた複数の定義文からなる加工プログラムの解析処理
中に、未定義文エラーが検出された際には新たな定義文
を加工プログラムに挿入してプログラムを修正編集し、
新定義文より解析処理を続行する為デバッグ処理の負担
が軽減されると共に、プログラム解析処理時間の長時間
化を省ける効果がある。
[Effects of the Invention] As explained above, according to the present invention, when an undefined statement error is detected during analysis processing of a machining program consisting of a plurality of definition statements written in a certain order, a new Insert the definition statement into the machining program, modify and edit the program,
Since the analysis process continues from the new definition statement, the burden of debugging processing is reduced and the program analysis processing time can be saved from increasing.

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

第1図はこの発明による自動プログラミング装置の一実
施例の全体構成図、第2図は自動プログラミング装置の
システム構成図、第3図は第2図に示した自動プログラ
ミング装置の動作を示すフローチャート、第4図は加工
プログラムの一例を示す説明図、第5図は未定義エラー
の発生する加工プログラムの一例を示す説明図、第6図
は本発明の転用例を示す説明図、第7図は従来の自動プ
ログラミング装置の構成図である。 図において、(1)はCPU、(1a)はプログラム入
力手段、(1b)はプログラム解析手段、(1c)はプ
ログラム編集入力手段、(1d)はプログラム変更手段
、(lO)はNC装置、(12)は工作機械。 なお、図中、同一符号は同一、又は相当部分を示す。 代理人  大  岩  増  雄 第2図 第3図 第5図 第6図 第7図
FIG. 1 is an overall configuration diagram of an embodiment of an automatic programming device according to the present invention, FIG. 2 is a system configuration diagram of the automatic programming device, and FIG. 3 is a flowchart showing the operation of the automatic programming device shown in FIG. FIG. 4 is an explanatory diagram showing an example of a machining program, FIG. 5 is an explanatory diagram showing an example of a machining program in which an undefined error occurs, FIG. 6 is an explanatory diagram showing an example of a diversion of the present invention, and FIG. FIG. 1 is a configuration diagram of a conventional automatic programming device. In the figure, (1) is a CPU, (1a) is a program input means, (1b) is a program analysis means, (1c) is a program editing input means, (1d) is a program change means, (1O) is an NC device, ( 12) is a machine tool. In addition, in the figures, the same reference numerals indicate the same or equivalent parts. Agent Masuo Oiwa Figure 2 Figure 3 Figure 5 Figure 6 Figure 7

Claims (1)

【特許請求の範囲】[Claims] 被工作物を数値制御により一定形状に仕上げる各種定義
文から成る加工プログラムを入力するプログラム入力手
段と、各種定義文を順次解析し、数値制御装置向けの数
値制御データに変換してデータ出力装置へ出力すると共
に、未定義エラー検出時にはプログラム修正編集モード
を指令するプログラム解析手段と、プログラム修正編集
モード指令に基づき未定義文を読み出し定義化した後、
未定義文を修正編集するプログラム編集入力手段と、未
定義文の修正編集後、定義文解析処理順を未定義文の定
義編集文よりに変更するプログラム変更手段とを具備し
たことを特徴とする自動プログラミング装置。
A program input means for inputting a machining program consisting of various definition statements to finish a workpiece into a fixed shape through numerical control, and a data output device that sequentially analyzes the various definition statements and converts them into numerical control data for a numerical control device. In addition to outputting the program, there is also a program analysis means which commands the program correction editing mode when an undefined error is detected, and after reading and defining the undefined statement based on the program correction editing mode command,
The present invention is characterized by comprising: a program editing input means for modifying and editing an undefined sentence; and a program changing means for changing the order of definition sentence analysis processing after modifying and editing an undefined sentence, so that the order of definition sentence analysis is higher than the definition editing sentence of the undefined sentence. Automatic programming device.
JP62132704A 1987-05-28 1987-05-28 Automatic programming device Pending JPS63298406A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62132704A JPS63298406A (en) 1987-05-28 1987-05-28 Automatic programming device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62132704A JPS63298406A (en) 1987-05-28 1987-05-28 Automatic programming device

Publications (1)

Publication Number Publication Date
JPS63298406A true JPS63298406A (en) 1988-12-06

Family

ID=15087608

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62132704A Pending JPS63298406A (en) 1987-05-28 1987-05-28 Automatic programming device

Country Status (1)

Country Link
JP (1) JPS63298406A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1990009626A1 (en) * 1989-02-07 1990-08-23 Fanuc Ltd Automatic programming method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1990009626A1 (en) * 1989-02-07 1990-08-23 Fanuc Ltd Automatic programming method

Similar Documents

Publication Publication Date Title
JPH03158908A (en) Automatic programming system in compound working machine
JPS63298406A (en) Automatic programming device
JPS5958505A (en) Numerical controller
JPH0194404A (en) Nc data generation system
JP2584229B2 (en) CAD / CAM automatic programming device
JP2875135B2 (en) Program device for programmable controller
JPS60263209A (en) Working restart controlling method of numerically controlled machine tool
JP3259987B2 (en) Interactive numerical controller
JPS6149206A (en) Process operation method
KR19980083294A (en) How to edit graphic G-code of numeric controller
JPH01177613A (en) System for displaying nc program
JPH06250722A (en) Interactive numerical controller
JPH0394307A (en) Numerical controller
JP3000987B2 (en) Numerical control unit
JPH01282609A (en) Method for setting nc data output form
JPS6232503A (en) Numerical controller
JP3000986B2 (en) Machining program creating device and machining program creating method
JP2565509B2 (en) Automatic programming method
JPH02139603A (en) Numerical controller
JPS6299051A (en) Automatic programming apparatus
KR970066772A (en) Automatic Programming Method of Numerical Control Unit
JPH07230307A (en) Program developing device for sequencer
JPH01226004A (en) Numerical control system
JPH036527B2 (en)
JPH0760340B2 (en) Numerical control device user program execution method