Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0827648B2 - NC part program generator - Google Patents
[go: Go Back, main page]

JPH0827648B2 - NC part program generator - Google Patents

NC part program generator

Info

Publication number
JPH0827648B2
JPH0827648B2 JP62155070A JP15507087A JPH0827648B2 JP H0827648 B2 JPH0827648 B2 JP H0827648B2 JP 62155070 A JP62155070 A JP 62155070A JP 15507087 A JP15507087 A JP 15507087A JP H0827648 B2 JPH0827648 B2 JP H0827648B2
Authority
JP
Japan
Prior art keywords
part program
statement
created
language
machine
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 - Fee Related
Application number
JP62155070A
Other languages
Japanese (ja)
Other versions
JPS63318605A (en
Inventor
純一 平井
益夫 恩田
孝夫 米田
敬 小比賀
和裕 五十嵐
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 Ltd
Original Assignee
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 Ltd filed Critical Hitachi Ltd
Priority to JP62155070A priority Critical patent/JPH0827648B2/en
Publication of JPS63318605A publication Critical patent/JPS63318605A/en
Publication of JPH0827648B2 publication Critical patent/JPH0827648B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Numerical Control (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はNCパートプログラム生成装置に係わり、特に
複雑な幾何形状を加工するNCパートプログラムの記述を
容易にするのに適したNCパートプログラム生成装置に関
する。
The present invention relates to an NC part program generation device, and particularly, an NC part program generation suitable for facilitating the description of an NC part program for machining a complicated geometric shape. Regarding the device.

〔従来の技術〕[Conventional technology]

従来、数値制御(以下「NC」と言う)パートプログラ
ムの生成装置としては、特開昭59−172008号に記載のよ
うに、NC言語と高級言語例えばBASIC言語とを同時に使
ってプラグラミングを行い、NCパートプログラムを生成
するやり方がある。
Conventionally, as a numerical control (hereinafter referred to as "NC") part program generation device, as described in Japanese Patent Laid-Open No. 59-172008, NC language and high-level language such as BASIC language are simultaneously used for programming. , There is a way to generate an NC part program.

また特開昭59−75307号に記載のように、各加工工程
毎にサブプログラムを作成しておき、このサブプログラ
ムを利用してNCパートプログラムを生成する方式もあ
る。
Also, as described in Japanese Patent Laid-Open No. 59-75307, there is a method in which a subprogram is created for each machining step and an NC part program is generated using this subprogram.

また、特開昭60−3008号公報記載の方法は、加工パタ
ーンを選択し、選択された加工パターンに用意されたプ
ロンプト文に従い、加工データを入力し(第3頁左上欄
第1乃至8行)、この入力されたデータからNCプログラ
ムを作成する(第3頁右上欄第15乃至18行)もので、ま
た、第2頁左下欄第6乃至8行には、「これにより、オ
ペレータはNCコードではなく汎用の簡易言語(ここで
は、ベーシック)により入力することができる」と開示
されている。
Further, in the method described in Japanese Patent Laid-Open No. 60-3008, a processing pattern is selected and processing data is input in accordance with a prompt statement prepared for the selected processing pattern (page 3, upper left column, lines 1 to 8). ), An NC program is created from this input data (page 3, upper right column, lines 15 to 18), and page 2 lower left column, lines 6 to 8 says, "This makes the operator NC It is possible to input in a general-purpose simple language (here, basic) instead of a code. "

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

特開昭59−17008号に記載の方法においては、高級言
語の記述に訓練を要し、また簡便な幾何形状の計算を行
う場合でも高級言語による複雑なプログラミングを行う
必要があった。このため、NCパートプログラムの記述に
多大な時間を要するという問題があった。
In the method described in Japanese Patent Laid-Open No. 59-17008, training is required to describe a high-level language, and complicated programming in a high-level language is required even when performing simple geometrical shape calculation. Therefore, there is a problem that it takes a lot of time to describe the NC part program.

また、後者の特開昭59−75307号に記載の方式におい
ては、サブプログラムの多重呼び出し機能により、まと
まった機能単位に比較的簡単にパートプログラムの記述
が行える。しかしながら、サブプログラムが有する幾何
形状の計算能力が高級言語による場合よりも劣るため、
複雑な幾何形状の計算をすることができないという問題
があった。
Also, in the latter method disclosed in Japanese Patent Laid-Open No. 59-75307, the part program can be described relatively easily in a unit of functional units by the multiple calling function of subprograms. However, since the subprogram has a geometry calculation capability that is lower than that in a high-level language,
There is a problem that it is not possible to calculate complicated geometric shapes.

また、特開昭60−3008号公報記載の方式にあっては、
それぞれの加工パターンはデータ入力装置に接続された
NC加工機専用であり、オペレータはその加工パターンを
用いて対話形式でデータを入力するものであり、一旦入
力したデータはそのNC加工機にしか適用できず、汎用性
に乏しいものである。また、新しい加工パターンを追加
する場合等は、新たに追加する加工パターンに合わせた
プラグラムを開発する必要があり、拡張性に乏しいとい
う問題がある。また、更に、既存のプログラムにしか適
用できず、それらを組み合わせて使用することもできな
いため、新しいパートプログラムの作成にあたっては、
逐一順序よくすべてのデータをプラグラミングしていく
しかなく、新しいプログラム作成には、長時間を要する
ことになるという問題を有しているものである。
Further, in the system described in JP-A-60-3008,
Each processing pattern was connected to the data input device
It is dedicated to the NC processing machine, the operator inputs data interactively using the processing pattern, and once input data can be applied only to the NC processing machine, it is not versatile. Further, when a new processing pattern is added, it is necessary to develop a program according to the newly added processing pattern, and there is a problem that the expandability is poor. In addition, since it can be applied only to existing programs and they can not be used in combination, when creating a new part program,
There is a problem that it takes a long time to create a new program, because all data must be programmed in order one by one.

従って、本発明の目的は、NCパートプログラム生成装
置において、容易にパートプログラムデータの記述が行
え、且つ、汎用性があり、また、複雑な幾何形状を加工
するNCパートプログラムをも作成できるようにし、合わ
せて新規プログラムの作成が既作成プログラムを利用し
て容易に行える様にすることにある。
Therefore, an object of the present invention is to enable an NC part program generation device to easily describe part program data, have general versatility, and create an NC part program for processing a complicated geometric shape. In addition, it is to make it easy to create a new program by using an already created program.

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

上記目的は、NC言語と幾何形状演算機能を有する点定
義文,直線定義文及び円定義文からなる幾何定義文と四
則演算機能を有する演算文からなる宣言文から構成され
る簡易言語とにより記述されたパートプログラムデータ
が読み込まれるワークエリアと、このワークエリアに読
み込まれたNC言語と簡易言語により記述されたパートプ
ログラムデータを解読し、その解読結果に基づき、幾何
形状演算や四則演算の実行とパートプログラム実行順序
の制御を行いながら、数値制御に用いる数値を演算する
パートプログラムデータ解読部と、NC機械固有の情報を
格納する機械情報記憶部と、上記パートプログラムデー
タ解読部によって演算された数値及び上記機械情報記憶
部に格納されたNC機械固有の情報に基づき対象とするNC
機械に適合したNC言語からなるNCパートプログラムを生
成するNCパートプログラム生成部と、既作成のパートプ
ログラムを記憶する既作成パートプログラム記憶部とを
備え、上記簡易言語は、さらに、パートプログラム実行
制御機能を有し、上記パートプログラム解読部は、上記
パートプログラムデータの中の上記パートプログラム実
行制御機能に基づいて、上記既作成パートプログラム記
憶部から上記既作成パートプログラムを読み出し、読み
出された既作成パートプログラムの解読と実行を行い、
上記NCパートプログラム生成部は、上記パートプログラ
ム解読部により解読実行された既作成パートプログラム
に基づいて、新規作成パートプログラムの作成を可能と
することを特徴とするNCパートプログラム生成装置によ
って達成される。
The above-mentioned purpose is described by the NC language and a simple language composed of a geometry definition statement including a point definition statement, a straight line definition statement, and a circle definition statement having a geometric shape calculation function, and a declaration statement including an operation statement having a four arithmetic operation function. The work area from which the specified part program data is read, and the part program data written in the NC language and simple language that is read into this work area are decoded, and based on the decoding result, geometric shape calculation and four arithmetic operations are executed. A part program data decoding unit that calculates numerical values used for numerical control while controlling the order of execution of part programs, a machine information storage unit that stores information specific to NC machines, and numerical values calculated by the above part program data decoding unit And the target NC based on the information unique to the NC machine stored in the machine information storage section
An NC part program generation unit for generating an NC part program in an NC language suitable for a machine, and a prepared part program storage unit for storing a prepared part program are provided. The part program decoding unit has a function, reads the created part program from the created part program storage unit based on the part program execution control function in the part program data, and reads the created part program. Decode and execute the created part program,
The NC part program generation unit is achieved by an NC part program generation device characterized by enabling creation of a newly created part program based on an already created part program decoded and executed by the part program decoding unit. .

〔作用〕[Action]

以上のように構成した本発明においては、パートプロ
グラムデータをNC言語と簡易言語により記述し、そのパ
ートプログラムデータを読込手段に入力するだけで自動
的にNCパートプログラムが作成される。ここで、簡易言
語は、ベーシックのような高級言語と異なるので、パー
トプログラム作成に際しての記述が容易となる。
In the present invention configured as described above, the NC part program is automatically created by describing the part program data in the NC language and the simple language and inputting the part program data into the reading means. Here, since a simple language is different from a high-level language such as basic, it is easy to describe when creating a part program.

また、NC言語との組合せで簡易言語を用いることによ
り、3次元形状を加工するプログラムを作成できると共
に、簡易言語として幾何形状演算機能及び四則演算機能
を有するものを用いるので、複雑な幾何形状を加工する
NCパートプログラムの生成が可能となる。
Also, by using a simple language in combination with the NC language, a program for machining a three-dimensional shape can be created, and a simple language that has a geometric shape calculation function and a four arithmetic operation function is used. Process
NC part program can be generated.

更に、機械情報記憶部にNC機械固有の情報を格納して
おくので、その情報を適宜変更することにより、同じパ
ートプログラムを用いて仕様の異なる複数のNC機械用の
NCパートプログラムを生成することができ、汎用性の高
い装置が得られる。
Further, since information unique to the NC machine is stored in the machine information storage unit, it is possible to use the same part program for multiple NC machines with different specifications by changing the information as appropriate.
An NC part program can be generated and a highly versatile device can be obtained.

また、既作成パートプログラム記憶部に格納された既
作成パートプログラムを利用することにより、新規パー
トプログラムを容易かつ短時間に作成できる。
Further, by using the already-created part program stored in the already-created part program storage unit, a new part program can be easily created in a short time.

〔実施例〕〔Example〕

以下本発明の実施例を図面により説明する。 Embodiments of the present invention will be described below with reference to the drawings.

第1図におて、符号1は本発明のNCパートプログラム
生成装置の全体を示し、このNCパートプログラム生成装
置1は、NC言語と簡易言語ととにより記述されたパート
プログラムデータ2を入力し、所定の手順で処理してNC
パートプログラムを生成し、NCテープ情報3を出力す
る。NCテープ情報3は、テープを媒体とするか、データ
伝送によりNC機械4に入力される。NC言語と共にパート
プログラムデータ2を記述するのに使用される簡易言語
は、後述するごとく幾何形状機能、四則演算機能、パー
トプログラム実行制御機能等を有している。
In FIG. 1, reference numeral 1 denotes the entire NC part program generation device of the present invention. The NC part program generation device 1 inputs the part program data 2 described in NC language and simple language. , NC according to the prescribed procedure
Generate a part program and output NC tape information 3. The NC tape information 3 is input to the NC machine 4 by using a tape as a medium or by data transmission. The simplified language used to describe the part program data 2 together with the NC language has a geometrical shape function, four arithmetic operations function, part program execution control function, etc., as described later.

NCパートプログラム生成装置1は、既作成パートプロ
グラム記憶部10と、入力データ記憶部11と、ワークエリ
ア12と、パートプログラムデータ解読部13と、機械情報
記憶部14と、NCパートプログラム生成部15とからなって
いる。
The NC part program generation device 1 includes a created part program storage unit 10, an input data storage unit 11, a work area 12, a part program data decoding unit 13, a machine information storage unit 14, and an NC part program generation unit 15. It consists of

パートプログラムデータ2はワークエリア12に読み込
まれ、パートプログラムデータ解読部13は、このワーク
エリア12に読み込まれたパートプログラムデータ2を1
文づつ解読する。そしてパートプログラムデータ解読部
13は、その解読結果に基づき、幾何形状演算や四則演算
の実行とパートプログラム実行順序の制御を行いなが
ら、数値制御に用いる数値を演算する。またパートプロ
グラム解読部13は、入力されたパートプログラムデータ
2のパートプログラムの要求に応じて、対応する既作成
パートプログラム記憶部10から既作成パートプログラム
をワークエリア12に読み出し、その解読と実行を行うと
共に、計算に必要な入力データを入力データ記憶部11か
らワークエリア12に読み出す。
The part program data 2 is read in the work area 12, and the part program data decoding unit 13 sets the part program data 2 read in this work area 1 to 1
Decode each sentence. And the part program data decoding section
Based on the result of the decoding, 13 calculates the numerical value to be used for numerical control while executing the geometrical shape calculation and the four arithmetic operations and controlling the part program execution order. Further, the part program decoding unit 13 reads the created part program from the corresponding created part program storage unit 10 into the work area 12 in response to the request of the inputted part program data 2 for the part program, and decodes and executes it. At the same time, the input data required for calculation is read from the input data storage unit 11 to the work area 12.

NCパートプログラム生成部15では、パートプログラム
解読部13で計算されワークエリア12に格納されている数
値を用いて、NCパートプログラムを生成する。このとき
NCパートプログラム生成部15は、機械情報記憶部14に格
納されているNC機械固有の情報を読み込み、NCパートプ
ログラムのアドレス等を変更し、対象とするNC機械に適
合したNCテープ情報3を作成する。
The NC part program generation unit 15 generates an NC part program using the numerical values calculated by the part program decoding unit 13 and stored in the work area 12. At this time
The NC part program generation unit 15 reads the information specific to the NC machine stored in the machine information storage unit 14, changes the address of the NC part program, etc., and creates the NC tape information 3 suitable for the target NC machine. To do.

パートプログラムデータ2は、前述したようにNC言語
と簡易言語とにより記述されており、この簡易言語は、
第2図の「大項目」の欄に示すように、機能定義文、宣
言文、実行制御文、幾何定義文及び入出力文から構成さ
れている。なお大項目の「NC文」はNC言語に対応してい
る。
The part program data 2 is described in the NC language and the simple language as described above.
As shown in the "major item" column in FIG. 2, it is composed of a function definition statement, a declaration statement, an execution control statement, a geometry definition statement, and an input / output statement. The major item “NC sentence” corresponds to the NC language.

簡易言語の機能定義文は、その「小項目」の欄に示す
ように、テープヘッダラベル文、加工面指定文、シーケ
ンスNo設定文、及びデバック文からなり、宣言文は、配
列宣言文及び演算文とからなり、実行制御文は、GOTO
文,IF文、CALL文、MACRO文、及びEND文からなり、幾何
定義文は、点定義文、直線定義文及び円定義文からな
り、入出力文は、メッセージ出力文、SPACE出力文及びR
EAD文からなっている。これら小項目の各文は、それぞ
れ「機能」の欄に示す機能を有している。
The function definition statement of the simple language consists of a tape header label statement, a processing surface specification statement, a sequence No setting statement, and a debug statement, as shown in the “Sub-item” column. The declaration statement is an array declaration statement and an operation statement. Statement and the execution control statement is GOTO
Statements, IF statements, CALL statements, MACRO statements, and END statements, geometric definition statements consist of point definition statements, line definition statements, and circle definition statements, and input / output statements include message output statements, SPACE output statements, and R
It consists of an EAD sentence. Each sentence of these small items has the function shown in the "function" column.

このようにNC言語と共に使用される簡易言語は種々の
機能を持ち、特に、幾何定義文の点定義文、直線定義文
及び円定義文が持つ機能により任意の幾何形状を演算す
ることができ、宣言文の演算文の持つ機能により四則演
算を行うことができる。即ちこの簡易言語は、幾何形状
演算機能と四則演算機能とを有し、これにより複雑な幾
何形状を加工するパートプログラムであっても記述でき
るようになっている。
In this way, the simple language used with the NC language has various functions, and in particular, it is possible to calculate an arbitrary geometric shape by the functions of the point definition statement, the straight line definition statement, and the circle definition statement of the geometry definition statement. The four arithmetic operations can be performed by the function of the operation statement of the declaration statement. That is, this simple language has a geometric shape calculation function and a four arithmetic operation function, so that even a part program for processing a complicated geometric shape can be described.

この簡易言語の幾何定義文における点定義文、直線定
義文及び円定義文の具体的内容は、それぞれ第3図、第
4図及び第5図に示す通りである。この幾何定義文を用
いれば、任意の幾何形状の演算が可能となるだけでな
く、幾何形状演算結果のX座標値、Y座標値、半径値等
を取り出す機能を併用することにより、その演算値を変
数として取り扱うことができ、NC指令の移動量として設
定することが可能となる。
The concrete contents of the point definition sentence, the straight line definition sentence, and the circle definition sentence in the geometric definition sentence of this simple language are as shown in FIGS. 3, 4, and 5, respectively. By using this geometric definition statement, not only is it possible to calculate an arbitrary geometric shape, but also by using the function of extracting the X coordinate value, Y coordinate value, radius value, etc. of the geometric shape calculation result, the calculated value can be calculated. Can be treated as a variable and can be set as the movement amount of the NC command.

なお簡易言語の演算文は、通常の数学的手法により定
義することができる。
The operation sentence in the simple language can be defined by a usual mathematical method.

次にこの第6図に示すフローチャートに基づきNCパー
トプログラム生成装置1の動作を説明する。このフロー
チャートの処理手順はパートプログラム解読部13に予め
格納されているのもである。
Next, the operation of the NC part program generator 1 will be described with reference to the flowchart shown in FIG. The processing procedure of this flowchart is stored in the part program decoding unit 13 in advance.

最初にステップ21において、入力されたパートプログ
ラムデータ2を全てワークエリア12に読み込む。次にス
テップ22で、ワークエリア12からパートプログラムの1
文を取り出し、ステップ23で文の種別を判定し、ステッ
プ24で文の文法チェックを行う。次にステップ25からス
テップ30までの判定結果に従い、文の実行処理を行う。
ステップ25で実行制御文と判定されたならばステップ31
に移行し、GOTO文、IF文、CALL文等のパートプログラム
の実行を制御する実行制御文実行処理を行い、ステップ
26で機能定義文と判定されたならばステップ32に移行
し、加工面指定等を行う機能定義文実行処理を行い、ス
テップ27で宣言文と判定されたならばステップ33に移行
し、配列宣言、四則演算等を処理する宣言文実行処理を
行い、ステップ28できか定義文と判定されたならばステ
ップ34に移行し、点、直線、円の形状定義を処理する幾
何定義文実行処理を行い、ステップ29でNC文と判定され
たならばステップ35に移行し、NC文を作成するNC文実行
処理を行い、ステップ30で入出力文と判定されたならば
ステップ36に移行し、外部からの入力データの読み込み
等を処理する入出力文実行処理を行う。
First, in step 21, all the input part program data 2 are read into the work area 12. Next, in step 22, from work area 12 to part program 1
The sentence is taken out, the type of the sentence is determined in step 23, and the grammar of the sentence is checked in step 24. Next, according to the determination results from step 25 to step 30, sentence execution processing is performed.
If the execution control statement is determined in step 25, step 31
And execute the execution control statement execution process to control the execution of the part program such as GOTO statement, IF statement, CALL statement, and
If it is determined in 26 that it is a function definition statement, the process proceeds to step 32, where the function definition statement execution process that specifies the machining surface is performed, and if it is determined in step 27 that it is a declaration statement, the process proceeds to step 33 and the array declaration. , Performs a declarative statement execution process for processing four arithmetic operations, etc., and proceeds to step 34 if step 28 is determined to be a definition statement, and performs a geometric definition statement execution process for processing shape definitions of points, straight lines, and circles. If it is determined to be an NC sentence in step 29, the process proceeds to step 35, the NC sentence execution process for creating an NC sentence is performed, and if it is determined to be an input / output sentence in step 30, the process proceeds to step 36, and externally. Input / output statement execution processing that processes reading of input data of

最後に、ステップ37でパートプログラムが終了したか
どうかを判定し、終了していなければステップ22に戻っ
て上記処理を繰り返す。
Finally, in step 37, it is determined whether or not the part program is completed, and if it is not completed, the process returns to step 22 and the above process is repeated.

ステップ31においてなされる実行制御文実行処理の内
容を第7図及び第8図に基づき説明する。
The contents of the execution control statement execution process performed in step 31 will be described with reference to FIGS. 7 and 8.

第7図は、実行制御文実行処理の流れを示すフローチ
ャートであり、第8図は、多重呼び出しを用いたパート
プログラム例を示す図である。
FIG. 7 is a flow chart showing the flow of execution control statement execution processing, and FIG. 8 is a diagram showing an example of a part program using multiple calls.

第8図に示す、パートプログラムデータ2に含まれて
いるメインパートプログラムMの文No Iで、サブパート
プログラムAを呼び出す実行制御文であるCALL文を解読
すると、実行制御文実行処理では、第7図に示すステッ
プ41でCALL文と判定し、ステップ51でパートプログラム
名Mと次ぎに実行されるべき文No I+1をスタック100
に格納し、スタックポインタ101をMにセットする(第
8図左上)。次にステップ52で、計算途中の変数データ
をワークエリア12に退避させ、ステップ53で、既作成パ
ートプログラム記憶部10の中からサブパートプログラム
Aを検索し、サブパートプログラムAをワークエリア12
に読み込み、次に実行する文Noをサブパートプログラム
Aの先頭に設定し、メインパートプログラムMからのパ
ラメータの引渡しを行う。
When the CALL statement which is the execution control statement for calling the subpart program A is decoded with the statement No I of the main part program M included in the part program data 2 shown in FIG. In step 41 shown in the figure, it is determined as a CALL statement, and in step 51, the part program name M and the statement No I + 1 to be executed next are stacked 100
And the stack pointer 101 is set to M (upper left in FIG. 8). Next, in step 52, the variable data being calculated is saved in the work area 12, and in step 53, the subpart program A is searched from the created part program storage unit 10, and the subpart program A is stored in the work area 12.
, And the statement number to be executed next is set at the beginning of the subpart program A, and the parameters are passed from the main part program M.

サブパートプログラムAの文No Jでサブパートプログ
ラムBを呼び出すCALL文を解読すると、実行制御文実行
処理では、上記と同様に、ステップ51からステップ53ま
での処理を実行する。その結果、スタック100の中に
は、パートプログラム名Aと、文No J+1がセットさ
れ、スタックポインタ101はAにセットされる。(第8
図右上) 次にサブパートプログラムBの最後で、パートプログ
ラムの最後を示す実行制御文であるEND文を解読する
と、実行制御文実行処理では、ステップ42でEND文と判
定し、ステップ61でスタック100が空かどうかを判定す
る。この場合、スタック100にはデータがセットされて
いるので、ステップ62でスタック100の先頭にあるパー
トプログラム名Aと次に実行されるべき文No J+1をス
タック100から取り出し、スタックポインタ101をMにセ
ットする(第8図右下)。ステップ63で、変数データを
ワークエリア12から復帰させ、ステップ64で、既作成パ
ートプログラム記憶部10の中からサブパートプログラム
Aを検索し、サブパートプログラムAをワークエリア12
に読み込み、次に実行する文NoをJ+1に設定する。
When the CALL statement that calls the subpart program B is decoded by the statement No J of the subpart program A, the execution control statement execution processing executes the processing from step 51 to step 53 in the same manner as above. As a result, the part program name A and the sentence No J + 1 are set in the stack 100, and the stack pointer 101 is set to A. (Eighth
(Upper right in the figure) Next, at the end of the subpart program B, when the END statement, which is the execution control statement indicating the end of the part program, is decoded, in the execution control statement execution process, it is determined to be the END statement at step 42, and the stack 100 at step 61. Determines if is empty. In this case, since data is set in the stack 100, the part program name A at the top of the stack 100 and the statement No J + 1 to be executed next are taken out from the stack 100 in step 62, and the stack pointer 101 is set to M. Set (bottom right of Fig. 8). In step 63, the variable data is returned from the work area 12, and in step 64, the subpart program A is searched from the created part program storage unit 10, and the subpart program A is set in the work area 12.
And the statement number to be executed next is set to J + 1.

同様に、サブパートプログラムAの最後でEND文を解
読すると、ステップ62からステップ64までの処理を実行
し、メインパートプログラムMの文No I+1を次に実行
する文Noとして設定すると共に、スタック100を空にす
る(第8図左下)。最後に、メインパートプログラムM
の最後でEND文を解読すると、ステップ61でスタックが
空と判定されるため、ステップ65でパートプログラム終
了処理を実行する。
Similarly, when the END statement is decoded at the end of the subpart program A, the processing from step 62 to step 64 is executed, the statement No I + 1 of the main part program M is set as the statement No to be executed next, and the stack 100 is set. Empty (bottom left of Fig. 8). Finally, the main part program M
When the END statement is decoded at the end of the step, the stack is determined to be empty in step 61, so the part program end processing is executed in step 65.

なお以上の説明では、パートプログラムの呼び出し深
さが2のときを示したが、本発明によれば任意の深さま
でサブパートプログラムの呼び出しが同様の処理手順で
実行可能である。
In the above description, the case in which the calling depth of the part program is 2 has been described, but according to the present invention, the calling of the subpart program can be executed to an arbitrary depth by the same processing procedure.

次にステップ43でGOTO文と判定されたならば、ステッ
プ71で、飛べ先ラベルが設定されている文Noを捜し、ス
テップ72で次ぎに実行すべき文Noを該文Noに設定する。
ステップ44でIF文と判定されたならば、ステップ81でIF
文の判定を行い、ステップ82で判定結果をもとに飛び先
ラベルが設定されている文Noを捜し、ステップ83で次ぎ
に実行すべき文Noを該文Noに設定する。
Next, if it is determined in step 43 that the sentence is a GOTO sentence, then in step 71, the sentence No. for which the destination label is set is searched, and in step 72 the sentence No. to be executed next is set in the sentence No.
If it is judged as an IF statement in step 44, IF is judged in step 81.
The sentence is determined, and in step 82, the sentence number for which the jump destination label is set is searched based on the determination result, and in step 83, the sentence number to be executed next is set to the sentence number.

以上の手順に基づき、入力されたパートプログラムデ
ータを解読し、その解読結果に従って処理することによ
り、NC言語のみからなるNC機械用のNCパートプログラム
を生成することができる。
Based on the above procedure, the input part program data is decoded, and by processing according to the decoding result, an NC part program for the NC machine consisting only of the NC language can be generated.

なお上記実施例において、既作成パートプログラム記
憶部10の中には、ユーザマクロやNCサブパートプログラ
ムを含めることも可能である。
In the above-described embodiment, the created part program storage unit 10 may include user macros and NC subpart programs.

従って、本実施例のNCパートプログラム生成装置にお
いては、幾何形状演算機能及び四則演算機能を有する簡
易言語をNC言語に付加して使用できるようにしたので、
複雑な幾何形状を加工するパートプログラムをも作成す
ることができると共に、パートプログラムの記述が容易
となり、NCパートプログラムの作成工数を低減すること
ができる。
Therefore, in the NC part program generation device of the present embodiment, since a simple language having a geometric shape calculation function and four arithmetic operations functions can be added to the NC language and used,
It is possible to create a part program for machining a complicated geometric shape, easily describe the part program, and reduce the man-hours for creating the NC part program.

またその簡易言語はパートプログラム実行制御機能を
も有しているので、変数をパラメータとしてパートプロ
グラムの多重呼び出しが可能となり、パートプログラム
を細かい機能単位のサブパートプログラムに分割して格
納しておくことにより、新規作成のパートプログラムは
既作成のパートプログラムを組み合わせて呼び出すだけ
で作成したり、一部それを利用して作成することができ
るようになり、新規パートプログラムの作成に要する工
数を大幅に低減することができる。
The simple language also has a part program execution control function, so it is possible to call multiple part programs with variables as parameters, and by dividing the part program into sub-part programs of small functional units and storing them. , A newly created part program can be created by simply calling a combination of already created part programs, or a part of it can be used to create a new part program, significantly reducing the number of steps required to create a new part program. can do.

またこのように既作成のパートプログラムを既作成パ
ートプログラム記憶部に格納しておくことにより、技術
の蓄積をすることができる。
Further, by storing the created part program in the created part program storage unit in this way, it is possible to accumulate technology.

〔発明の効果〕〔The invention's effect〕

以上明らかなように、本発明のパートプログラム生成
装置においては、NC言語と少なくとも幾何形状演算機能
及び四則演算機能を有する簡易言語とによりパートプロ
グラムを記述することを可能としたので、複雑な幾何形
状を加工するパートプログラムをも作成することができ
ると共に、パートプログラムの記述が容易となり、NCパ
ートプログラムの作成工数を大幅に低減することができ
るものである。
As is apparent from the above, in the part program generation device of the present invention, since it is possible to describe a part program in the NC language and a simple language having at least a geometric shape calculation function and four arithmetic operations functions, it is possible to complicate a complicated geometric shape. It is possible to create a part program for machining, and it is easy to describe the part program, and the man-hours for creating the NC part program can be greatly reduced.

更に、簡易言語をNC言語に付加して使用するため、3
次元の複雑な形状を加工するNCパートプログラムを生成
することができる。また、更に、機械情報記憶部には、
NC機械固有の情報を格納できるため、その情報を適宜変
更することにより、同じパートプログラムを用いて仕様
の異なる複数のNC機械用のNCパートプログラムを生成可
能である。また、既作成パートプログラム記憶部に格納
された既作成パートプログラムを利用することにより、
新規パートプログラムを容易に短時間で作成できる。
Furthermore, since a simple language is used by adding it to the NC language, 3
It is possible to generate an NC part program that processes complicated shapes of dimensions. Furthermore, in the machine information storage unit,
Since information unique to the NC machine can be stored, it is possible to generate NC part programs for a plurality of NC machines having different specifications by using the same part program by changing the information as appropriate. In addition, by using the created part program stored in the created part program storage unit,
A new part program can be easily created in a short time.

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

第1図は本発明の位置実施例によるNCパートプログラム
生成装置の概要を示すブロック図であり、第2図は本発
明で使用する簡易言語の仕様を示す説明図であり、第3
図はその簡易言語の幾何定義文における点定義文の定義
方法と機能を示す説明図であり、第4図はその幾何定義
文における直線定義文の定義方法と機能を示す説明図で
あり、第5図は同幾何定義文における円定義文の定義方
法の機能を示す説明図であり、第6図はNCパートプログ
ラム生成装置のパートプログラムデータ解読部によって
なされる処理手順を示すフローチャートであり、第7図
はそのフローチャートにおける実行制御文実行処理の処
理手順の内容を示すフローチャートであり、第8図はそ
の実行制御文実行処理におけるパートプログラムの多重
呼び出しを示す説明図である。 図中、符号1……NCパートプログラム生成装置、2……
パートプログラムデータ、12……ワークエリア(読込手
段)、13……パートプログラムデータ解読部(解読手
段)、15……NCパートプログラム生成部(生成手段)
FIG. 1 is a block diagram showing an outline of an NC part program generation device according to a position embodiment of the present invention, FIG. 2 is an explanatory diagram showing specifications of a simplified language used in the present invention, and FIG.
FIG. 4 is an explanatory diagram showing a definition method and a function of a point definition sentence in the geometric definition sentence of the simplified language, and FIG. 4 is an explanatory diagram showing a definition method and a function of a straight line definition sentence in the geometric definition sentence. FIG. 5 is an explanatory view showing the function of the method of defining a circle definition statement in the same geometry definition statement, and FIG. 6 is a flowchart showing the processing procedure performed by the part program data decoding unit of the NC part program generation device. FIG. 7 is a flowchart showing the contents of the processing procedure of the execution control statement execution processing in the flowchart, and FIG. 8 is an explanatory view showing multiple invocation of part programs in the execution control statement execution processing. In the figure, reference numeral 1 ... NC part program generator, 2 ...
Part program data, 12 ... work area (reading means), 13 ... part program data decoding section (decoding means), 15 ... NC part program generation section (generation means)

フロントページの続き (72)発明者 小比賀 敬 茨城県日立市幸町3丁目1番1号 株式会 社日立製作所日立工場内 (72)発明者 五十嵐 和裕 茨城県日立市幸町3丁目1番1号 株式会 社日立製作所日立工場内 (56)参考文献 特開 昭60−3008(JP,A) 特開 昭59−172008(JP,A)Front Page Continuation (72) Inventor Takashi Obiga 3-1-1, Saiwaicho, Hitachi City, Ibaraki Hitachi Ltd. Hitachi factory (72) Inventor Kazuhiro Igarashi 3-1-1, Saiwaicho, Hitachi City, Ibaraki Hitachi, Ltd., Hitachi Works (56) References JP-A-60-3008 (JP, A) JP-A-59-172008 (JP, A)

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】NC言語と幾何形状演算機能を有する点定義
文,直線定義文及び円定義文からなる幾何定義文と四則
演算機能を有する演算文からなる宣言文から構成される
簡易言語とにより記述されたパートプログラムデータが
読み込まれるワークエリア(12)と、 このワークエリア(12)に読み込まれたNC言語と簡易言
語により記述されたパートプログラムデータを解読し、
その解読結果に基づき、幾何形状演算や四則演算の実行
とパートプログラム実行順序の制御を行いながら、数値
制御に用いる数値を演算するパートプログラムデータ解
読部(13)と、 NC機械固有の情報を格納する機械情報記憶部(14)と、 上記パートプログラムデータ解読部(13)によって演算
された数値及び上記機械情報記憶部(14)に格納された
NC機械固有の情報に基づき対象とするNC機械に適合した
NC言語からなるNCパートプログラムを生成するNCパート
プログラム生成部(15)と、 既作成のパートプログラムを記憶する既作成パートプロ
グラム記憶部(10)とを備え、 上記簡易言語は、さらに、パートプログラム実行制御機
能を有し、 上記パートプログラム解読部(13)は、上記パートプロ
グラムデータの中の上記パートプログラム実行制御機能
に基づいて、上記既作成パートプログラム記憶部(10)
から上記既作成パートプログラムを読み出し、読み出さ
れた既作成パートプログラムの解読と実行を行い、 上記NCパートプログラム生成部(15)は、上記パートプ
ログラム解読部(13)により解読実行された既作成パー
トプログラムに基づいて、新規作成パートプグラムの作
成を可能とすることを特徴とするNCパートプログラム生
成装置。
1. A simple language composed of an NC language and a geometric definition statement having a geometric definition function, a point definition statement, a straight line definition statement, and a circle definition statement, and a declaration statement having an arithmetic statement function having four arithmetic operations. The work area (12) from which the written part program data is read, and the part program data written in NC language and simple language read in this work area (12) are decoded,
Based on the decoding result, the part program data decoding part (13) that calculates the numerical value used for numerical control while storing geometric information and four arithmetic operations and controlling the part program execution order, and stores information unique to the NC machine Machine information storage unit (14), the numerical value calculated by the part program data decoding unit (13) and the machine information storage unit (14)
Adapted to the target NC machine based on information specific to the NC machine
An NC part program generation unit (15) for generating an NC part program in the NC language and an already-created part program storage unit (10) for storing an already-created part program are provided. The part program decoding section (13) has an execution control function, and the part program decoding section (13) is based on the part program execution control function in the part program data, and the created part program storage section (10).
The above-mentioned created part program is read from and the read created part program is decoded and executed, and the NC part program generation unit (15) is created and executed by the part program decoding unit (13). An NC part program generation device capable of creating a newly created part program based on a part program.
JP62155070A 1987-06-22 1987-06-22 NC part program generator Expired - Fee Related JPH0827648B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62155070A JPH0827648B2 (en) 1987-06-22 1987-06-22 NC part program generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62155070A JPH0827648B2 (en) 1987-06-22 1987-06-22 NC part program generator

Publications (2)

Publication Number Publication Date
JPS63318605A JPS63318605A (en) 1988-12-27
JPH0827648B2 true JPH0827648B2 (en) 1996-03-21

Family

ID=15598002

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62155070A Expired - Fee Related JPH0827648B2 (en) 1987-06-22 1987-06-22 NC part program generator

Country Status (1)

Country Link
JP (1) JPH0827648B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04149707A (en) * 1990-10-15 1992-05-22 Koyou Sokushin Jigyodan Numerical control program input device
JPH05143353A (en) * 1991-11-25 1993-06-11 Fanuc Ltd Function expanding device for automatic programming device
GB0303270D0 (en) * 2003-02-13 2003-03-19 Renishaw Plc A machine tool control process and apparatus therefor

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS603008A (en) * 1983-06-20 1985-01-09 Toyota Motor Corp Data input device of numerically controlled working machine

Also Published As

Publication number Publication date
JPS63318605A (en) 1988-12-27

Similar Documents

Publication Publication Date Title
JPH0375299B2 (en)
JPH0827648B2 (en) NC part program generator
JPH0766286B2 (en) Processing method of NC device
JP2004110828A (en) Method and system for generating a numerically controlled toolpath on a solid model
JPS61170807A (en) Numerical controller
Herzog From elementary knowledge schemes towards heuristic expertise—designing an ITS in the field of parallel programming
JPS61160108A (en) Working control method of numerically controlled machine tool
KR100205337B1 (en) N.c program simulation device and method
JP2875135B2 (en) Program device for programmable controller
JP2696206B2 (en) Automatic part program creation method
JP2629759B2 (en) Data generation method for numerical control machining
JPS63127333A (en) Flowchart type programming device
KR0136142B1 (en) The method of graphic simulation using numerical control apparatus
JPH10247142A (en) Process control program programming system and programming method
JP2500632B2 (en) Program pattern customization method
EP0576678A1 (en) Method of expanding function of automatic programming apparatus
Matsumoto et al. SPS: A Software Production System for mini-computers and micro-computers
JPH0410003A (en) Drawing method for polyhedral machining
Inoue et al. Synthesizing Synchronous Program from Timing Diagram
JP3240647B2 (en) Computer language structured processing
Wiedmann Efficiency in the APL environment—a full arsenal for attacking CPU hogs
JP2002215212A (en) Interpolation execution method
JPS60205886A (en) Tape editing system
JPH0734166B2 (en) Method for creating offset shape of numerical control device
Cheng A chatter-free pocketing routine for any two-and-a-half-dimensional pocket with islands

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees