JPH04100122A - Nc working program executing device - Google Patents

Nc working program executing device

Info

Publication number
JPH04100122A
JPH04100122A JP13945590A JP13945590A JPH04100122A JP H04100122 A JPH04100122 A JP H04100122A JP 13945590 A JP13945590 A JP 13945590A JP 13945590 A JP13945590 A JP 13945590A JP H04100122 A JPH04100122 A JP H04100122A
Authority
JP
Japan
Prior art keywords
intermediate language
machining program
format
block
machining
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
JP13945590A
Other languages
Japanese (ja)
Inventor
Masakazu Kudo
雅一 工藤
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.)
Yaskawa Electric Corp
Original Assignee
Yaskawa 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 Yaskawa Electric Corp filed Critical Yaskawa Electric Corp
Priority to JP13945590A priority Critical patent/JPH04100122A/en
Publication of JPH04100122A publication Critical patent/JPH04100122A/en
Pending legal-status Critical Current

Links

Landscapes

  • Numerical Control (AREA)

Abstract

PURPOSE:To efficiently perform working at a high speed by checking the format of an NC working program to convert it to an intermediate language before working. CONSTITUTION:Before working, a compiler part 1 reads in one-block components of an ASCII character string transferred from an input interface part 10 character by character and checks the format to check whether a numerical value following an address is matched to the data type of the address, whether addresses are compatible in one block or not, and whether commanded contents are compatible between blocks or not. If error is not detected, the character string is converted to the intermediate language and is stored in an NC working program memory 2; but otherwise, format error is recognized to generate an alarm. Thus, working is efficiently performed at a high speed.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発胡は、NC加工プログラムを解読して実行するNC
加工プログラム実行装置に関し、加工前にNC加工プロ
グラムのフォーマットチェックを行って中間言語に変換
しておくことにより、効率良く高速加工を行うことがで
きるNC加工プログラム実行装置に関する。
[Detailed description of the invention] [Industrial application field] This invention is based on an NC processing program that decodes and executes an NC machining program.
The present invention relates to an NC machining program execution device that can efficiently perform high-speed machining by checking the format of the NC machining program and converting it into an intermediate language before machining.

〔従来の技術〕[Conventional technology]

従来のNC加工プログラム実行装置は、CNC(Com
puterized Numerical Contr
oller)  装置が内蔵しているNC加工プログラ
ム格納用メモリから所要のNC加工プログラムを1ブロ
ック単位で読み取り、そのブロックに記述されている加
工指令を解読して、機械可動部の動作を制御するための
実行データを作成する。
The conventional NC machining program execution device is CNC (Com
Puterized Numerical Contr
oller) To read the required NC machining program block by block from the NC machining program storage memory built into the device, decode the machining commands written in that block, and control the operation of the machine's movable parts. Create execution data.

ここで、実行データとはサーボモータを制御するたtの
分配パルスデータやATCなどの機械補助装置を制御す
るシーケンサに出力するM、S。
Here, the execution data refers to distribution pulse data for controlling a servo motor, and M and S output to a sequencer for controlling a mechanical auxiliary device such as an ATC.

Tコードなどである。ここに、Mコードとは主軸正転/
逆転/停止指令、クーラント○N/○FF指令、ATC
(自動工具交換)指令等であり、Sコードとは主軸回転
数指令等であり、Tコードとは工具選択指令、工具補正
量選択指令等である。
For example, T code. Here, the M code means spindle normal rotation/
Reverse/stop command, coolant ○N/○FF command, ATC
(automatic tool change) command, etc., the S code is a spindle rotation speed command, etc., and the T code is a tool selection command, a tool correction amount selection command, etc.

ところで、ブロックに記述されている加工指令はASC
II文字で表現されたアドレス+数値の組合せである。
By the way, the processing command written in the block is ASC
It is a combination of address + numeric value expressed in II characters.

したがって、ブロックの解読はASCII文字を1文字
ずつ読み込んでまずアドレスを解釈して、前記アドレス
に続く数値が前記アドレスのデータ型に整合するかどう
かをチエツクして整合すれば、前記アドレスに対応する
レジスタにバイナリデータに変換した数値を格納する。
Therefore, to decode a block, read the ASCII characters one by one, first interpret the address, check whether the number following the address matches the data type of the address, and if it matches, it will correspond to the address. Store the numerical value converted to binary data in the register.

もし、整合しなければフォーマットエラーとしてアラー
ムを発生させる。以後、同様に1文字ずつ読み込んで指
令されたアドレスに対応するレジスタにバイナリデータ
に変換した数値を格納していく。このような読み込みは
、1ブロツクの終わりを意味するr;  (EOB)J
文字が現れるまで行う。そしてr;  (EOB)J文
字を読み込んだら、lブロックの終了とみなし、1ブロ
ツク内でのアドレス相互の整合性及び今読み込んだブロ
ックとそのブロック以前のブロックで指令された内容と
の整合性のチエツクを行い、整合すれば機械可動部の動
作を制御するための実行データを作成する。
If they do not match, an alarm is generated as a format error. Thereafter, it similarly reads one character at a time and stores the numerical value converted into binary data in the register corresponding to the commanded address. Such a read means the end of one block; (EOB)J
Do this until the letters appear. Then r; (EOB) When the J character is read, it is considered as the end of l block, and the consistency between addresses within one block and the consistency between the block just read and the contents commanded in the block before that block are checked. A check is performed, and if they match, execution data for controlling the operation of the mechanical movable parts is created.

もし、整合しなければフォーマットエラーとしてアラー
ムを発生させる。
If they do not match, an alarm is generated as a format error.

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

ところが、従来技術では1ブロツクの解読をASCII
文字を1文字ずつ読み込みながらフォーマットチェック
を行わなければならないため、解読に時間がかかり、実
行時間が短いブロックを連続して実行する場合は、機械
可動部がブロック間停止してしまう。このように、ブロ
ック間停止するとワークを滑らかに加工することができ
ず、送り速度を高くすることができないという問題があ
った。
However, in the conventional technology, one block is decoded using ASCII.
Because the format must be checked while reading each character one by one, it takes time to decipher it, and if blocks with short execution times are executed in succession, the mechanical movable part will stop between blocks. As described above, when stopping between blocks, there is a problem in that the workpiece cannot be processed smoothly and the feed rate cannot be increased.

そこで本発明は、NC加工プログラムをCNC装置に格
納する時に、NC加工プログラムのフォーマットチェッ
クを行いながら中間言語に変換して格納するため、加工
時はNCプログラムのフォーマットチェックを行わず、
前記中間言語を解読して実行することにより、効率良く
、高速加工を行うことができるNC加工プログラム実行
装置4提供することを目的とする。
Therefore, in the present invention, when an NC machining program is stored in a CNC device, the format of the NC machining program is checked while being converted into an intermediate language and stored. Therefore, the format of the NC program is not checked during machining.
It is an object of the present invention to provide an NC machining program execution device 4 that can perform efficient and high-speed machining by decoding and executing the intermediate language.

〔課題を解決するだめの手段〕[Failure to solve the problem]

この目的を達成するため、本発明は、NC加工プログラ
ムを加工前にCNC装置に内蔵しているメモリに格納し
て、前記NC加工プログラムを解読して実行するNC加
ニブログラド実行装置において、 前記NC加工プログラムをCNC装置に格納する時に、
CNC装置特有の中間言語に変換して格納するコンパイ
ラ部と前記中間言語を解読して実行するインタプリタ部
とを有し、かつ同加工コンパイラ部は前記中間言語に変
換するに先立ってNC加工プログラムのフォーマットチ
ェックを行う手段を有することを特徴とする。
In order to achieve this object, the present invention provides an NC machining program execution device that stores an NC machining program in a memory built into the CNC device before machining, decodes and executes the NC machining program, and comprises: When storing machining programs in CNC equipment,
It has a compiler section that converts into an intermediate language specific to the CNC machine and stores it, and an interpreter section that decodes and executes the intermediate language, and the processing compiler section converts the NC processing program into the intermediate language before converting it into the intermediate language. It is characterized by having means for performing a format check.

〔作用〕[Effect]

上記手段により、NC加工プログラムをCNC装置に格
納する時にNC加工プログラムのフォーマットチェック
を行いながら中間言語に変換して格納する。加工時は前
記中間言語を解読して実行する。
With the above means, when an NC machining program is stored in a CNC device, the format of the NC machining program is checked while being converted into an intermediate language and stored. During processing, the intermediate language is decoded and executed.

〔実施例〕〔Example〕

以下、本発明を実施例に基づいて具体的に説明する。 Hereinafter, the present invention will be specifically explained based on Examples.

第1図は本発明の実施例を示ずブ07り図てあり、jは
t菓イ乍パネル8あるいは自動ブロクラミング装置など
のホストコンピュータ9がら入力されたNC加工プログ
ラムをフォーマットチェックしながら中間言語に変換す
るコンパイラ部、2はコンパイラ部1て作成した中間言
語を格納するNC加工プログラムメモリ部、3は加工時
にNC加工プログラムメモリ部2から1ブロツク中1位
で中間言語を読み込み、解読して機械可動部の動作を制
御するた約の実行データを作成するインタプリタ部、4
はインタプリタ部3で作成した実行データを格納してお
く実行データバッファ、5は実行データバッファ4から
1ブロツク単位で実行データを読み込み、袖間演箕を行
−9てサーボ制御部6への指令を作成する補間演算部、
1oは操イ1パネル8あるいはホストコンピュータ9が
らの人力を処理する入力インタフェース部、11は1ブ
ロツク分のNC加工プログラムを格納する1ブロックバ
ッファ部、12は通信用のバッファである通信データバ
ッファ、13は本発明の構成からなるNC加工プログラ
ム実行装置である。
Fig. 1 does not show an embodiment of the present invention, but is a block diagram, and j indicates an intermediate processing while checking the format of an NC machining program inputted from a panel 8 or a host computer 9 such as an automatic block ramming device. 2 is an NC machining program memory unit that stores the intermediate language created by the compiler unit 1; 3 is an NC machining program memory unit that reads the intermediate language from the NC machining program memory unit 2 in the first place in one block during machining, and decodes the intermediate language. an interpreter unit that creates execution data for controlling the operation of the moving parts of the machine;
5 is an execution data buffer that stores the execution data created by the interpreter section 3, and 5 is an execution data buffer that reads the execution data in blocks from the execution data buffer 4, performs a sodoma operation, and sends commands to the servo control section 6. An interpolation calculation section that creates
1o is an input interface section that processes human power from the operation panel 8 or the host computer 9; 11 is a 1-block buffer section that stores one block's worth of NC machining program; 12 is a communication data buffer that is a communication buffer; 13 is an NC machining program execution device having the configuration of the present invention.

次に本発明の特徴である処理を説明する。Next, processing that is a feature of the present invention will be explained.

NC加工プログラムは加工前に操作パネル8からのMD
I (マニュアル操作でのデータ入力)により、あるい
はホストコンピュータ9からの通信によりNC加工プロ
グラム実行装置13に入力される。入力インターフェー
ス部10は人力されてくるNC加工プログラムを1ブロ
ック単位に分割してコンパイラ部1へ渡す。ここで、人
力インターフェース部10が1ブロック単位に分割する
方法は、操作パネル8からのMDI入力の場合は「;(
EOB)」 が入力されるまで入力されるASCII文
字を1ブロツクバツフア11に格納して行く。
NC machining program is MD from operation panel 8 before machining.
The data is input to the NC machining program execution device 13 by I (manual data input) or by communication from the host computer 9. The input interface section 10 divides the manually entered NC machining program into blocks and passes them to the compiler section 1. Here, in the case of MDI input from the operation panel 8, the method by which the human interface unit 10 divides into blocks is ";(
The ASCII characters that are input are stored in one block buffer 11 until ``EOB'' is input.

そしてr;  (EOB)J  が人力されると1ブロ
ツクバツフア11に格納されているASCII文字列を
コンパイラ部1へ渡して、次に入力されてくるASCI
I文字列を1ブロツクバツフア11に格納して行く。以
降、同様に処理して行く。
Then, when r; (EOB)
The I character string is stored in one block buffer 11. From then on, the process will be carried out in the same manner.

ホストコンピュータ9からの通信人力の場合は、送信さ
れてくるASCII文字列を通信データバッファ12に
格納して行くと同時に通信データバッファ12からAS
CII文字を読み出しては「;(EOB)Jが読み出さ
れるまで1ブロツクバツフア11に格納して行く。そし
てr;  (EOB)Jが入力されると1ブロツクバツ
フア11に格納されているASCII文字列をコンパイ
ラ部1へ渡して通信データバッファから引続きASCI
I文字を読み出して1ブロツクバツフア11に格納して
行く。
In the case of manual communication from the host computer 9, the transmitted ASCII character string is stored in the communication data buffer 12, and at the same time, the AS
The CII characters are read and stored in the 1-block buffer 11 until ``; (EOB) J is read. Then, when r; Pass it to part 1 and continue from the communication data buffer to ASCII.
The I character is read out and stored in one block buffer 11.

以降、同様に処理して行く。From then on, the process will be carried out in the same manner.

コンパイラ部1は人力インターフェース部10から渡さ
れた1ブロック分のASCII文字列を1文字ずつ読み
込んでアドレスに続(数値が前記アドレスのデータ型に
整合するかどうかのチエツク、1ブロツク内でのアドレ
ス相互に整合性があるかどうかのチエツク、ブロック間
相互で指令された内容に整合性があるかどうかのチエツ
ク、といったフォーマットチェックを行い、誤りがなけ
れば中間言語に変換して前記NC加エブログラノ、メモ
リ部2に格納し、誤りがあればフォーマットエラーどし
てアラームを発生させる。
The compiler unit 1 reads one block of ASCII character strings passed from the human interface unit 10 one character at a time, following the address (checks whether the numerical value matches the data type of the address, and checks whether the numeric value matches the data type of the address). Format checks are performed, such as checking whether there is consistency between blocks and checking whether the contents commanded between blocks are consistent, and if there are no errors, it is converted into an intermediate language and the NC-processed Ebrograno, The data is stored in the memory unit 2, and if there is an error, a format error is generated and an alarm is generated.

ここで、中間言語のフォーマット例を第2図に示して説
明する。図において、20はNC加工プログラムに記述
されている1ブロック分の加工指令、21〜24は加工
指令20をアドレス毎に分解して、アドレス→数値のパ
ッケージに変換したものである。
Here, an example of the format of the intermediate language will be described with reference to FIG. 2. In the figure, 20 is a machining command for one block written in an NC machining program, and 21 to 24 are machining commands 20 broken down into addresses and converted into packages of addresses→numeric values.

アドレス及び数値はそれぞれデータ処理し易い機械語の
ASCIIコード及びバイナリコードに変換する。21
はGコード指令、22はX軸座標指令、23はY軸座標
指令、24は送り速度指令に対応するパッケージである
Addresses and numerical values are converted into machine language ASCII code and binary code, respectively, which are easy to process. 21
2 is a package corresponding to a G code command, 22 an X-axis coordinate command, 23 a Y-axis coordinate command, and 24 a feed rate command.

本発明で記述している中間言語とは、こういったフォー
マットのパッケージのことである。25は加工指令20
をコンパイルして作成した申開言語指令である。
The intermediate language described in the present invention is a package in this format. 25 is processing command 20
This is a statement language directive created by compiling the following.

加工時は、前記インタプリタ部3が前記NC加工プログ
ラムメモリ部2に格納されている中間言語を1ブロック
単位で読み込み、解読して実行データを作成し、実行デ
ータバッファ4に格納して行く。ところで、NC加工プ
ログラムが既に中間言語の形でNC加工プログラムメモ
リ部2に格納されている時に、そのNC加工プログラム
を操作パネル8からのMDI入力で編集する場合は、前
記コンパイラ部1が編集したいブロックを前記NC加工
プログラムメモリ部2から読み出し、ASC11文字列
に逆コンパイルしてそのASCII文字列に対して編集
処理を行う。
During machining, the interpreter section 3 reads the intermediate language stored in the NC machining program memory section 2 block by block, decodes it, creates execution data, and stores it in the execution data buffer 4. By the way, when the NC machining program is already stored in the NC machining program memory section 2 in the form of an intermediate language, and the NC machining program is edited by MDI input from the operation panel 8, the compiler section 1 The block is read from the NC machining program memory section 2, decompiled into an ASC11 character string, and editing processing is performed on the ASCII character string.

以上のような処理によって、加工時はNC加工プログラ
ムのフォーマットチェックを行う必要がなく、データ処
理しやすい機械工りを解読すればよいので、解読に時間
がかからず実行時間が短いブロックを連続して実行する
場合も機械可動部がブロック間停止することがなくなる
。したがって送り速度を高くすることができるので高速
加工を行うことができる。
With the above processing, there is no need to check the format of the NC machining program during machining, and all you have to do is decode the machining program, which is easy to process data, so blocks that do not take much time to decode and have a short execution time can be created in succession. Even when the machine is executed in the following manner, the mechanical movable part does not stop between blocks. Therefore, since the feed rate can be increased, high-speed machining can be performed.

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

以上に述べたように、本発明によれば加工前にNC加工
プログラムのフォーマットチェックを行って中間言語に
変換しておくので、加工時はNC加工プログラムのフォ
ーマットチェックを行う必要がなく、中間言語を解読し
て実行データを作成すれば良いので、効率良く高速加工
を行うことができる。
As described above, according to the present invention, the format of the NC machining program is checked before machining and converted into an intermediate language, so there is no need to perform a format check of the NC machining program during machining, and the intermediate language All you have to do is decode it and create the execution data, so you can efficiently perform high-speed machining.

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

第1図は本発明の具体的実施例を示すブロック図、第2
図は本発明で作成する中間言語のフォーマット例を示す
説明図である。 1:コンパイラ部 2:NC加工プログラムメモリ 3:インタプリタ部 4:実行データバッファ 5:補間演算部 6:サーボ制御部 7ニサーボモータ 8:模作パネル 9:ホストコンピュータ 10:入力インターフェース部 11:1ブロツクバツフア 12:通信データバッファ 13:Nc加工プログラム実行装置 20:加工指令 21〜24ニアドレス毎の中間言語 25;中間言語指令
FIG. 1 is a block diagram showing a specific embodiment of the present invention, and FIG.
The figure is an explanatory diagram showing an example of the format of the intermediate language created in the present invention. 1: Compiler section 2: NC machining program memory 3: Interpreter section 4: Execution data buffer 5: Interpolation calculation section 6: Servo control section 7 Servo motor 8: Imitation panel 9: Host computer 10: Input interface section 11: 1 block buffer 12: Communication data buffer 13: Nc machining program execution device 20: Machining commands 21 to 24 Intermediate language 25 for each near address; Intermediate language command

Claims (1)

【特許請求の範囲】 1、NC加工プログラムを加工前にCNC装置に内蔵し
ているメモリに格納して、前記NC加工プログラムを解
読して実行するNC加工プログラム実行装置において、 前記NC加工プログラムをCNC装置に格納する時に、
CNC装置特有の中間言語に変換して格納するコンパイ
ラ部と前記中間言語を解読して実行するインタプリタ部
とを有し、かつ同加工コンパイラ部は前記中間言語に変
換するに先立ってNC加工プログラムのフォーマットチ
ェックを行う手段を有することを特徴とするNC加工プ
ログラム実行装置。
[Claims] 1. An NC machining program execution device that stores an NC machining program in a memory built into a CNC device before machining, decodes and executes the NC machining program, When storing in CNC equipment,
It has a compiler section that converts into an intermediate language specific to the CNC machine and stores it, and an interpreter section that decodes and executes the intermediate language, and the processing compiler section converts the NC processing program into the intermediate language before converting it into the intermediate language. An NC machining program execution device characterized by having means for performing a format check.
JP13945590A 1990-05-28 1990-05-28 Nc working program executing device Pending JPH04100122A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13945590A JPH04100122A (en) 1990-05-28 1990-05-28 Nc working program executing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13945590A JPH04100122A (en) 1990-05-28 1990-05-28 Nc working program executing device

Publications (1)

Publication Number Publication Date
JPH04100122A true JPH04100122A (en) 1992-04-02

Family

ID=15245618

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13945590A Pending JPH04100122A (en) 1990-05-28 1990-05-28 Nc working program executing device

Country Status (1)

Country Link
JP (1) JPH04100122A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002093278A1 (en) * 2001-05-16 2002-11-21 Citizen Watch Co., Ltd. Numeric control apparatus, numeric control program execution method, numeric control program
US6731090B1 (en) 1999-12-17 2004-05-04 Mitsubishi Denki Kabushiki Kaisha Method and system for numerical control of machine tool
CN100412736C (en) * 2006-10-17 2008-08-20 哈尔滨工业大学 Edition-translation type numerical-control system and edition-translation and operation control method of same

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6731090B1 (en) 1999-12-17 2004-05-04 Mitsubishi Denki Kabushiki Kaisha Method and system for numerical control of machine tool
WO2002093278A1 (en) * 2001-05-16 2002-11-21 Citizen Watch Co., Ltd. Numeric control apparatus, numeric control program execution method, numeric control program
CN100412736C (en) * 2006-10-17 2008-08-20 哈尔滨工业大学 Edition-translation type numerical-control system and edition-translation and operation control method of same

Similar Documents

Publication Publication Date Title
CN101373379B (en) Numerical controller with program resuming function
JPS63181005A (en) Parallel processing method for numerical controller
JPS62267804A (en) Nc data changing method
US4737919A (en) Numerical control sequential translator
JPH04100122A (en) Nc working program executing device
JPS58175010A (en) Graphic display method of numerical controller for 4-axis lathe
US4956765A (en) Apparatus for processing numerical control program
JP2852986B2 (en) Processing system
JPH02172646A (en) Numerical control device
JP3092744B2 (en) Processing system
JPH04237307A (en) Automatic transformation device for coordinate axis
CN115729174A (en) Control system of non-marking machine tool
JP3000989B2 (en) Numerical control method and device
JPH05274020A (en) Method and device for tool offset shape data input type numerical control
JPH0667712A (en) Ladder program editing method
JPS60222904A (en) Control method of coordinate system conversion of numerically controlled lathe
JP2640456B2 (en) Numerical control method
JPS6252606A (en) Numerical controller
JPS6129909A (en) Numerical controller
JPH03251906A (en) Deciding method for cutting conditions in automatic programming system
JP2654800B2 (en) Control data self-holding drive unit
KR19980083295A (en) G-Code Extension Method of Numerical Controller
JPS6020838A (en) Control of cutting speed of nc machine tool
JPS6299811A (en) Numerical controller
JPS62121515A (en) Numerical controller