JPS6119380B2 - - Google Patents

Info

Publication number
JPS6119380B2
JPS6119380B2 JP13997478A JP13997478A JPS6119380B2 JP S6119380 B2 JPS6119380 B2 JP S6119380B2 JP 13997478 A JP13997478 A JP 13997478A JP 13997478 A JP13997478 A JP 13997478A JP S6119380 B2 JPS6119380 B2 JP S6119380B2
Authority
JP
Japan
Prior art keywords
tool
machining
breakage
block
broken
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
Application number
JP13997478A
Other languages
Japanese (ja)
Other versions
JPS5565047A (en
Inventor
Taio Yamashita
Yasuji Sakakibara
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.)
Toyoda Koki KK
Original Assignee
Toyoda Koki KK
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 Toyoda Koki KK filed Critical Toyoda Koki KK
Priority to JP13997478A priority Critical patent/JPS5565047A/en
Publication of JPS5565047A publication Critical patent/JPS5565047A/en
Publication of JPS6119380B2 publication Critical patent/JPS6119380B2/ja
Granted legal-status Critical Current

Links

Description

【発明の詳細な説明】[Detailed description of the invention]

本発明はプログラムされた数値制御プログラム
に基づいて工具と工作物の相対位置を制御して工
作物を所望の形状に加工するようにした数値制御
工作機械において、折損工具の交換を行つた後で
工作物の加工を再開するための方法に関し、その
目的とするところは、加工中に工具の折損が生じ
た場合には折損工具を交換した後で工具折損が生
じた加工工程の最初に戻つて数値制御を再開する
ようにして、工具の折損が生じても工作物の加工
が継続して行えるようにすることにある。 数値制御工作機械においては工具の切味低下等
の原因で工具が加工中に折損することがあるた
め、加工途中で工具の折損を検出して折損工具に
よる加工が継続して行われないようにする必要が
ある。このため、従来の数値制御工作機械におい
ては、加工の途中の適当な間隔で工具の折損検出
を行い、工具の折損が検出された場合には工作物
の加工を中断して折損工具で交換するようにして
いた。 しかしながら、一般の数値制御工作機械におい
ては工具の折損が生じた時の工具の位置を折損工
具を交換した後で知ることができないため、折損
工具を交換しても工具を元の位置に戻すことがで
きない。 したがつて、従来の数値制御工作機械において
は折損した工具を交換しても、工作物の加工を継
続して行うことはできず、加工途中の工作物は、
未加工の部分を手動操作で加工するか、最初から
加工をやり直す必要があつた。工作物の加工形状
が簡単な場合には、未加工部分を手動操作で加工
したり、加工サイクルを最初からやり直しても、
時間はそれほどかからないためそれほど問題とは
ならないが、3次元曲線を有する工作物を加工す
る場合等においては、手動で未加工部分を加工す
ることが不可能な上、工作物の加工に数時間以上
の時間を必要とすることが多いため、工作物の加
工を最初から直すことは工作物加工のサイクルタ
イムを著しく増大させる原因となり大きな問題と
なる。 本発明はこのような従来の問題点に鑑みてなさ
れたもので、工具交換時または折損検出時におい
ては工具が予め定められた定位置に位置決めさ
れ、工具交換または折損検出に続いてプログラム
されている加工プログラムは必ず前記定位置を移
動開始点としてプログラムされていることに着目
し、工具折損の検出時またはおよび工具交換時に
おいて、工具折損検出指令またはおよび工具交換
指令に続いてプログラムされた次の加工プログラ
ムの先頭ブロツク番号に関連するデータを更新記
憶するようにし、工具折損が生じた場合には折損
した工具を交換した後で、折損検出時に記憶され
ていたブロツク番号の数値制御プログラムに遡つ
て数値制御加工を再開するようにしたことを特徴
とするものである。 以下本発明の実施例を図面に基づいて説明す
る。第1図および第2図において10は、後端部
にコラム11を有するベツドで、このベツド10
上にはサドル12を介してスライドテーブル13
が載置され、このスライドテーブル13上に工作
物Wを載置する回転テーブル14が設けられてい
る。サドル12はベツド10に対して第2図にお
いて左右方向(Z軸方向)へ移動可能に案内さ
れ、ベツド10の後端部に設けられたサーボモー
タ15によつて移動されるようになつている。ま
た、スライドテーブル13はサドル12に対して
第1図において左右方向(X軸方向)へ移動可能
に案内され、サドル12の端部に設けられたサー
ボモータ16によつて移動されるようになつてい
る。 一方、コラム11には主軸17を軸架する主軸
頭18が上下方向(Y軸方向)へ移動できるよう
に案内されており、コラム11の上部に固着され
たサーボモータ19によつて移動されるようにな
つている。また、コラム11の上部には多数の工
具Tを収納する工具マガジン20が載置されてお
り、この工具マガジン20に収納されている工具
Tの1本が工具交換アーム21によつて主軸17
に装着されるようになつている。なお、工具マガ
ジン20内には、同じ工具が複数本ずつ収納され
ており、工具Tが加工中に折損した場合には同じ
工具を捜して折損工具と交換するようになつてい
る。 さらに、前記スライドテーブル13上のコラム
11側には、工作物Wの加工中において工具Tの
折損を検出するための折損検出用ヘツド22が載
置されている。この折損検出用ヘツド22は、第
3図に示すように、ヘツド本体23と、このヘツ
ド本体23の内部でz軸方向(第3図において左
右方向)に移動可能に案内され先端部に工具当り
部24を有する移動軸25と、この移動軸25と
ヘツド本体23との間に縮設され移動軸25をz
軸方向へ押圧するスプリング26とによつて主
に構成されており、ヘツド本体23には、移動軸
25の移動によつて、移動軸25に形成された環
状溝25aを介して大気に連通される圧搾空気供
給路27が穿設されている。圧搾空気供給路27
と環状溝25aの位置関係は、正常な工具TがZ
軸に沿つて移動されて第3図の2点鎖線に示す折
損検出位置決めされたときに圧搾空気供給路27
が環状溝25aに連通するようになつており、工
具Tが折損して工具長が短かくなつていた場合に
は連通しない。この圧搾空気供給路27には、絞
り弁28を介して圧搾空気が供給されるようにな
つており、工具Tが折損していない場合には、工
具Tが折損検出位置に位置決めされると絞り弁2
8を通つた後の空気圧が低下する。折損検出回路
29は、圧力スイツチPSからの信号によつて絞
り弁28を通つた後の空気圧の低下を検出して工
具Tの折損を検出する回路で、後述する数値制御
装置30から折損検出指令信号TSKが与えられ
ると工具Tの折損の有無を判別し、工具Tが折損
していた場合には折損検出信号TSSを出力するよ
うになつている。 第4図は上述した機械本体の動作を制御して工
作物Wの加工を行うための制御回路を示し、数値
制御装置30とサーボモータ駆動回路31と割出
制御回路32と工具変換検出回路33と折損検出
回路29とによつて主に構成されている。 サーボモータ駆動回路31は、数値制御装置3
0から出力される分配パルスに応じてサーボモー
タ15,16,19を駆動するもので、偏差カウ
ンタ、DA変換器、駆動増幅器等によつて構成さ
れている。一方割出制御回路32は数値制御プロ
グラムのTコードで指定された工具Tの収納され
ている工具ソケツトSを工具交換位置に割出すた
めのもので、数値制御装置30からソケツト番号
のデータが与えられるとマガジン駆動装置34を
付勢して指定された工具ソケツトSを工具交換位
置に割出し、割出しが完了すると割出完了WFS
を数値制御装置30に出力するようになつてい
る。また、工具交換制御回路33は、工具交換位
置に割出された工具Tと主軸17の工具とを交換
するための回路と、数値制御装置30から工具交
換指令TCCが与えられるアーム駆動装置35を
付勢して工具Tの交換を行い、工具交換が完了す
ると数値制御装置30に工具交換完了信号TCF
を出力するようになつている。 数値制御装置30は予めプログラムされた数値
制御プログラムに基づいてパルス分配を行うとと
もに工具交換等の指令を外部に送出して工作物W
の一連の加工を全自動で行うためのもので、ミニ
コンピユータ等の小形のコンピユータによつて構
成されている。なお本実施例においては、工作物
Wの加工中において工具Tが折損しているかどう
かを検出し、工具Tの折損が検出された場合は折
損した工具を予備工具と交換して加工を再開する
機能も有している。 すなわち、第5図に示すように、複数の加工箇
所の加工を単位とする各加工工程の加工が完了す
る度に工具折損の検出を行うようにした場合、工
程の途中で工具Tが折損しても工具Tの折損は工
程の最後でないと検出されないため、工具Tが折
損した時に加工を行つていた加工箇所がどこであ
るかを知ることはできないが、工具折損が生じた
のは少なくとも前に折損検出を行つた時以後であ
るため、第5図に2点鎖線で示すように前の折損
検出点まで遡つて加工を再開するようにすれば、
加工時間を殆んど増加させることなく工作物Wの
加工を継続することができる。このため、本実施
例の数値制御装置30においては、工具の折損が
検出されなかつた場合には折損検出指令がプログ
ラムされていたブロツク番号を記憶しておくよう
にし、工具Tが折損した場合には記憶したブロツ
クの次のブロツクまで遡つて数値制御加工を再開
して工具が折損した加工工程の最初から加工が再
開されるようにしている。 第6図は加工中に工具折損の検出を行うように
した数値制御プログラムの一例を示すもので、加
工プログラムの中に折損検出用のMコードM48が
所定の間隔で挿入されている。なお、折損検出を
行う場合には工具Tを前述した折損検出位置に位
置決めしなければならないため、折損検出を行う
プログラムの前には工具Tを加工位置から折損検
出位置に移動させる数値制御データがプログラム
され、折損検出のプログラムの後には工具Tを折
損検出位置からの次の加工位置へ移動させる数値
制御データがプログラムされている。このような
数値制御プログラムに基づいて数値制御加工をし
ている場合において、例えば工具T01による2回
目の加工が完了してN046のブロツクにプログラ
ムされている折損検出指令M48の実行によつて工
具の折損が検出された場合には、折損工具を交換
した後で、前の折損検出指令がプログラムされて
いるブロツクの次のブロツクであるN024に遡つ
て加工が再開される。また、3回目の加工のよう
に途中で工具交換を伴う加工工程の後で工具Tの
折損が検出された場合には、交換後の工具T02に
よる加工の途中で工具が折損したことになるの
で、このような場合には、折損工具を交換した後
で、工具T02へ工具交換をした後の加工プログラ
ムの先頭プロツクN064まで遡つて数値制御加工
を再開するようになつている。 第7図a,bは、折損工具を予備工具に交換す
るための数値制御プログラムで、工具Tの折損が
検出された場合にこれらのプログラムが実行され
る。工具Tが折損した時の処理は、折損が検出さ
れる前の加工工程の途中で工具交換が行われたか
どうかによつて異なる。第7図aに示す折損処理
Aの数値制御プログラムは加工工程の途中で工具
交換が行われなかつた場合のもので、折損工具を
予備工具に交換した後で工具を折損検出位置に戻
すようにしている。一方、第7図bに示す折損処
理Bの数値制御プログラムは加工工程の途中で工
具交換が行われた場合のもので、工具交換を行つ
た後の加工は原点は移動開始位置としてプログラ
ムされていることに対応して交換された予備工具
が原位置に位置決めされるようになつている。な
お、プログラム中の工具番号〓〓と##はそれぞ
れ予備工具と次工程工具の番号を示し、折損工具
の交換を行う前に刻当する工具番号を当てはめて
工具交換が行われる。 これらの折損工具の交換のための数値制御プロ
グラムは、前述した加工用のプログラムととも
に、テープリーダTRによつて読込まれ、第8図
に示すように記憶装置36内のNCデータエリア
に記憶される。そして、このNCデータエリアに
記憶された加工用の数値制御データが数値制御装
置30によつて順番に読出されて工作物Wの加工
が行われ、工具の折損が検出されると、折損処理
用の数値制御プログラムが読出されて折損工具の
交換が行われる。 また、記憶装置36の内部には、第8図に示す
ように、工具交換のための工具テーブルとマガジ
ンテーブルの形成する工具交換用データエリア
と、折損処理を行うためのデータエリアも設けら
れており、これらのデータエリアが必要に応じて
アクセスされる。 工具エーブルは、表1に示すように工具の使用
可否を表わすデータと予備工具の番号とを工具番
号に関連して記憶するもので、工具の折損が検出
された場合には、折損が検出された工具の使用可
否の欄に零が書込まれるようになつている。一
方、マガジンテーブルは、どの工具ソケツトにど
の工具が装着されているかを記憶するもので、工
具交換の度に書換えが行われる。
The present invention is a numerically controlled machine tool that processes a workpiece into a desired shape by controlling the relative positions of a tool and a workpiece based on a programmed numerical control program, after replacing a broken tool. Regarding the method for restarting machining of a workpiece, the purpose is to replace the broken tool when a tool breaks during machining and then return to the beginning of the machining process where the tool broke. To restart numerical control so that machining of a workpiece can be continued even if a tool breaks. In numerically controlled machine tools, tools may break during machining due to factors such as reduced sharpness of the tool, so tools are designed to detect tool breakage during machining and prevent machining from continuing with a broken tool. There is a need to. For this reason, in conventional numerically controlled machine tools, tool breakage is detected at appropriate intervals during machining, and if a tool breakage is detected, machining of the workpiece is interrupted and the broken tool is replaced. That's what I was doing. However, in general numerically controlled machine tools, the position of the tool at the time of tool breakage cannot be known after the broken tool is replaced, so even if the broken tool is replaced, the tool cannot be returned to its original position. I can't. Therefore, with conventional numerically controlled machine tools, even if a broken tool is replaced, it is not possible to continue machining the workpiece, and the workpiece that is being machined is
It was necessary to manually process the unprocessed parts or to start over from the beginning. If the shape of the workpiece is simple, you can manually machine the unmachined part or restart the machining cycle from the beginning.
However, when machining a workpiece with a three-dimensional curve, it is impossible to manually machine the unmachined part, and machining the workpiece takes several hours or more. Therefore, restarting the machining of the workpiece from the beginning causes a significant increase in the cycle time of workpiece machining, which is a big problem. The present invention has been made in view of such conventional problems, and the present invention is designed to position the tool at a predetermined fixed position when changing a tool or detecting a breakage, and to program the tool after changing the tool or detecting a breakage. Focusing on the fact that the machining program is always programmed with the fixed position as the movement start point, when a tool breakage is detected or when a tool is replaced, the next program that is programmed following the tool breakage detection command or the tool change command is The data related to the first block number of the machining program will be updated and stored, and if a tool breaks, after replacing the broken tool, the data will be traced back to the numerical control program of the block number that was stored when the breakage was detected. This feature is characterized in that the numerically controlled machining is restarted. Embodiments of the present invention will be described below based on the drawings. In FIGS. 1 and 2, 10 is a bed having a column 11 at the rear end.
A slide table 13 is installed above via the saddle 12.
A rotary table 14 on which a workpiece W is placed is provided on the slide table 13. The saddle 12 is guided so as to be movable in the left-right direction (Z-axis direction) in FIG. 2 with respect to the bed 10, and is moved by a servo motor 15 provided at the rear end of the bed 10. . Further, the slide table 13 is guided so as to be movable in the left-right direction (X-axis direction) in FIG. ing. On the other hand, a spindle head 18 that supports the spindle 17 is guided in the column 11 so that it can move in the vertical direction (Y-axis direction), and is moved by a servo motor 19 fixed to the top of the column 11. It's becoming like that. Further, a tool magazine 20 that stores a large number of tools T is placed on the top of the column 11, and one of the tools T stored in this tool magazine 20 is transferred to the main shaft 17 by the tool exchange arm 21.
It is now being installed on Note that a plurality of the same tools are stored in the tool magazine 20, and when the tool T is broken during machining, the same tool is searched for and replaced with the broken tool. Further, on the column 11 side of the slide table 13, a breakage detection head 22 for detecting breakage of the tool T during machining of the workpiece W is mounted. As shown in FIG. 3, this breakage detection head 22 is guided movably in the z-axis direction (horizontal direction in FIG. 3) by a head body 23 and inside this head body 23, and is guided so that it can move in the z-axis direction (horizontal direction in FIG. 3). A moving shaft 25 having a section 24 and a moving shaft 25 compressed between the moving shaft 25 and the head body 23 and moving the moving shaft 25 to z
When the moving shaft 25 moves, the head body 23 is connected to the atmosphere through an annular groove 25a formed in the moving shaft 25. A compressed air supply path 27 is bored. Compressed air supply path 27
The positional relationship between the annular groove 25a and the annular groove 25a is such that the normal tool T
When the compressed air supply path 27 is moved along the axis and positioned at the breakage detection position shown by the two-dot chain line in FIG.
is adapted to communicate with the annular groove 25a, and will not communicate if the tool T is broken and the tool length is shortened. Compressed air is supplied to this compressed air supply path 27 via a throttle valve 28, and if the tool T is not broken, the throttle is opened when the tool T is positioned at the breakage detection position. valve 2
After passing through 8, the air pressure decreases. The breakage detection circuit 29 is a circuit that detects a breakage of the tool T by detecting a drop in air pressure after passing through the throttle valve 28 based on a signal from the pressure switch PS, and receives a breakage detection command from the numerical control device 30 described later. When the signal TSK is applied, it is determined whether or not the tool T is broken, and if the tool T is broken, a breakage detection signal TSS is output. FIG. 4 shows a control circuit for controlling the operation of the machine body described above to process the workpiece W, including a numerical control device 30, a servo motor drive circuit 31, an index control circuit 32, and a tool conversion detection circuit 33. and a breakage detection circuit 29. The servo motor drive circuit 31 is connected to the numerical control device 3
The servo motors 15, 16, and 19 are driven in accordance with the distribution pulse outputted from 0, and is composed of a deviation counter, a DA converter, a drive amplifier, and the like. On the other hand, the index control circuit 32 is for indexing the tool socket S in which the tool T specified by the T code of the numerical control program is housed to the tool exchange position. When the indexing is completed, the magazine drive device 34 is energized to index the specified tool socket S to the tool exchange position, and when the indexing is completed, the indexing is completed WFS.
is output to the numerical control device 30. The tool exchange control circuit 33 also includes a circuit for exchanging the tool T indexed to the tool exchange position and a tool on the spindle 17, and an arm drive device 35 to which a tool exchange command TCC is given from the numerical control device 30. The tool T is energized and replaced, and when the tool replacement is completed, a tool replacement completion signal TCF is sent to the numerical control device 30.
is now output. The numerical control device 30 distributes pulses based on a numerical control program programmed in advance and sends commands such as tool exchange to the outside to control the workpiece W.
It is designed to perform a series of processes fully automatically, and is constructed using a small computer such as a minicomputer. In this embodiment, it is detected whether the tool T is broken during machining of the workpiece W, and if breakage of the tool T is detected, the broken tool is replaced with a spare tool and machining is restarted. It also has functions. In other words, as shown in Fig. 5, if tool breakage is detected every time the machining of multiple machining points is completed, the tool T will break during the process. However, since the breakage of tool T is not detected until the end of the process, it is not possible to know where the machine was being machined when tool T broke, but the tool breakage occurred at least before. Since this is after the time when the breakage was detected, if the machining is resumed by going back to the previous breakage detection point as shown by the two-dot chain line in Fig. 5,
Machining of the workpiece W can be continued without almost increasing the machining time. For this reason, in the numerical control device 30 of this embodiment, when no tool breakage is detected, the block number in which the breakage detection command was programmed is stored, and when the tool T is broken, the block number is stored. The numerically controlled machining is restarted by going back to the block next to the stored block so that the machining is restarted from the beginning of the machining process in which the tool broke. FIG. 6 shows an example of a numerical control program for detecting tool breakage during machining, in which M codes M48 for detecting breakage are inserted at predetermined intervals in the machining program. In addition, when detecting breakage, the tool T must be positioned at the breakage detection position described above, so the numerical control data for moving the tool T from the machining position to the breakage detection position is required before the breakage detection program. After the breakage detection program, numerical control data for moving the tool T from the breakage detection position to the next machining position is programmed. When numerically controlled machining is performed based on such a numerical control program, for example, after the second machining with tool T01 is completed, the tool is stopped by executing breakage detection command M48 programmed in block N046. If a breakage is detected, after replacing the broken tool, machining is resumed going back to the block N024 following the block in which the previous breakage detection command is programmed. In addition, if tool T is detected to be broken after a machining process that requires a tool change in the middle, such as the third machining, it means that the tool was broken in the middle of machining with the replaced tool T02. In such a case, after replacing the broken tool, numerically controlled machining is restarted by tracing back to the first block N064 of the machining program after the tool exchange to tool T02. FIGS. 7a and 7b show numerical control programs for replacing a broken tool with a spare tool, and these programs are executed when a breakage of the tool T is detected. The process when the tool T breaks differs depending on whether the tool was replaced during the machining process before the breakage was detected. The numerical control program for breakage processing A shown in Fig. 7a is for the case where the tool is not replaced during the machining process, and after replacing the broken tool with a spare tool, the tool is returned to the breakage detection position. ing. On the other hand, the numerical control program for breakage treatment B shown in Figure 7b is for a case where a tool is changed in the middle of the machining process, and the machining after the tool change is programmed with the origin as the movement start position. The spare tool that has been replaced in response to the current situation is positioned at its original position. Note that the tool numbers 〓〓〓 and ## in the program indicate the numbers of the spare tool and the next process tool, respectively, and the tool is replaced by applying the tool number stamped before replacing the broken tool. The numerical control program for replacing these broken tools is read by the tape reader TR and stored in the NC data area in the storage device 36, together with the aforementioned machining program, as shown in FIG. . The numerical control data for machining stored in this NC data area is sequentially read out by the numerical control device 30 to perform machining of the workpiece W, and when a breakage of the tool is detected, a breakage processing The numerical control program is read out and the broken tool is replaced. Further, inside the storage device 36, as shown in FIG. 8, a data area for tool exchange formed by a tool table and a magazine table for exchanging tools, and a data area for handling breakage are also provided. These data areas are accessed as needed. As shown in Table 1, the tool enable stores data indicating whether the tool can be used and the number of a spare tool in relation to the tool number. A zero is written in the column indicating whether or not the tool can be used. On the other hand, the magazine table stores which tool is attached to which tool socket, and is rewritten every time a tool is replaced.

【表】 また、折損処理用のデータエリアには、現在使
用されている工具の番号を記憶する現在工具レジ
スタTNR、次の工程が使用される工具の番号を
記憶する次工程工具レジスタNTR、現在実行さ
れている数値制御プログラムのブロツク番号を記
憶する現在ブロツクレジスタNOR、工具折損が
生じたときに戻るブロツク番号を記憶する戻りブ
ロツクレジスタNAR、工作物Wの加工中である
のか折損工具の交換中であるのかを記憶するモー
ドレジスタMOR等がある。 次に、工作物加工時、特に工具折損検出時にお
ける数値制御装置30の具体的な動作を第9図か
ら第12図に示すフローチヤートに基づいて説明
する。 今、第6図に示す数値制御プログラムが記憶装
置36内に書込まれた状態で、図略の起動スイツ
チが押圧されると、数値制御装置30は第9図に
示すメインルーチンのプログラムを最初に実行す
る。まず、ステツプ10で、現在ブロツクレジス
タNORと折損検出ブロツクレジスタNARとを零
リセツトした後、ステツプ11でモードレジスタ
MORに工作物加工のモードであることを表わす
5をセツトし、ステツプ12へ移行する。ステツ
プ12になると、現在ブロツクレジスタNORの
内容に1が加算され、現在ブロツクレジスタ
NORの内容が1となる。 ステツプ13は現在ブロツクレジスタNORで
指定されたブロツクの数値制御データを順番に読
出すステツプで、この場合にはブロツクレジスタ
NORの記憶値が1となつているためN001の最初
にプログラムされているTコードのデータが読出
される。ステツプ14は、読出されたデータがブ
ロツクの終りを表わすデータであるかどうかを判
別し、ブロツクの終りを表わすデータである場合
にはステツプ12へ戻つて現在ブロツクレジスタ
NORの記憶値に1を加算するステツプで、ブロ
ツクの終りを表わすデータでない場合にはステツ
プ15へ移行する。 ステツプ15からステツプ18までは、読出さ
れたコードを解読して、解読されたコードに応じ
た処理ルーチンへ動作を移行させるもので、読出
されたコードが、X,Y,Zのいずれかである場
合には第10図に示すパルス分配ルーチンPGEN
へジヤンプし、Gコードである場合にはステツプ
20〜25のルーチンへジヤンプし、Mコードで
ある場合には第11図に示すMコードルーチン
MCRにジヤンプし、Tコードである場合には第
12図に示す工具選択ルーチンTSRにジヤンプ
する。 この場合には読出されたコードがTコードであ
るので工具割出ルーチンTSRにジヤンプして、
工具割出のための処理が行われる。すなわち、ス
テツプ80でTコードに続いてプログラムされて
いる工具番号を読出し、ステツプ81で、工具テ
ーブルを参照して指定された工具が使用できるか
を判別する。そして、指定された工具が使用でき
る場合にはステツプ85へ直接移行し、指定され
た工具が使用できない場合にはステツプ82で予
備工具をサーチしてステツプ85へ移行する。な
お、使用できる予備工具がない場合にはステツプ
83でこれが判別され、ステツプ84で工具なし
の表示が行われて数値制御装置30の運転が停止
される。 ステツプ85は、指定された工具番号を次工程
工具レジスタNTRに記憶させるステツプで、こ
の場合には工具番号として01がプログラムされて
いるため、次工程工具レジスタNTRに01が書込
まれる。また、これに続くステツプ86は指定さ
れた工具が入つている工具ソケツトSの番号をマ
ガジンテーブルを参照して捜し出すステツプで、
指定された工具の入つているソケツト番号がサー
チされると、ステツプ87へ移行し、サーチされ
たソケツト番号を割出制御回路32へ出力する。
これにより、プログラムで指定された工具かまた
は指定された工具の予備工具が工具変換位置に割
出される。そして、工具の割出しが完了したこと
がステツプ88で判別されると、メインルーチン
のステツプ13へ戻り、次の数値制御データを読
出す。 N001のブロツクにはT01しかプログラムされて
いないため、T01の次にはブロツクの終りを示す
データがプログラムされれており、これがステツ
プ13で読出される。ブロツクの終りを示すデー
タが読出されると、これがステツプ14で判別さ
れてステツプ12へ戻り、現在ブロツクレジスタ
NORの記憶値に1を加えて再びステツプ13で
数値データの読出しが行われる。これにより、
N002のブロツクの最初にプログラムされている
Mコードのデータが読出される。 読出されたデータがMコードである場合には、
ステツプ17からMコードルーチンMCRにジヤ
ンプしM機能の処理が行われる。まず、ステツプ
50でMコードに続いてプログラムされている数
値データを読込み、ステツプ51からステツプ5
3で、指令された命令が何であるかを判別する。
本実施例では、M02によつて運転の停止を指令
し、M06によつて工具交換を指令し、M48によつ
て工具の折損検出を指令するようになつており、
読出された数値データが02,06,48であるときに
それぞれステツプ75,56,61へジヤンプし
て指令された動作を行う処理が行われる。 N002のブロツクにプログラムされているのは
M06であるのでステツプ56へ移行する。ステツ
プ56はモードレジスタMORの内容が5である
かどうかによつて動作モードが加工モードである
かどうかを判別してステツプ57,58を介して
ステツプ59へ移行するかステツプ59へ直接移
行するかを判別するステツプであるが、この場合
には、モードレジスタMORの内容が5となつて
いるためステツプ57,58を介してステツプ5
9へ移行する。ステツプ57は折損工具の交換が
完了した後で戻るブロツク番号を工具交換の度に
更新記憶するステツプで、現在ブロツクレジスタ
NORの記憶値である002が戻りブロツクレジスタ
NARに転送される。また、ステツプ58は、工
具折損時に戻るブロツク以後にプログラムされて
いる加工プログラム工具交換位置を移動開始点と
してプログラムされていることを記憶するステツ
プで戻りブロツクレジスタNAR内のブロツク番
号データの書込まれない1ビツト目に1が書込ま
れる。 ステツプ59は、工具交換を指令するステツプ
で、工具交換制御回路33に工具交換指令TCC
を出力する。これにより、アーム駆動装置35が
付勢されて工具交換アーム21によつて工具交換
が行われ工具番号01の工具Tが主軸17に装着さ
れる。 このようにして工具Tの装着が完了すると、ス
テツプ60で装着された工具Tの番号01を現在工
具レジスタTNRに記憶させた後、メインルーチ
ンのステツプ13へ移行し、次の数値制御データ
の読出しが行われる。N002のブロツクにはM06
の次にT02がプログラムされているため、前述し
た方法と同様にして工具番号02の工具Tが工具交
換位置に割出され、次工程工具レジスタNTRに
02が記憶される。 ブロツクN003以後のプログラムは工具交換位
置を移動開始点とした1回目の加工を行う加工プ
ログラムで、ブロツクN003にプログラムされて
いるG00 X2000 Y70000 Z25000が順番に読出さ
れると、工具交換位置を始点として移動が開始さ
れる。すなわち、最初にプログラムされているG
コードG00が読出されると、ステツプ16からス
テツプ20へと移行してステツプ21でパルス分
配の速度が早送りの速度にセツトされ、Gコード
に続いてプログラムされている移動量プログラム
が読出される。 X,Y,Zのコードが読出された場合にはいず
れも第10図に示すパルス分配ルーチンPGENへ
ジヤンプしパルス分配が行われる。まず、ステツ
プ30a〜30bで移動方向を判別してステツプ
31a〜31cで移動方向を移動方向レジスタ
MDRのX,Y,Z軸に対応したフラツグをセツ
トし、ステツプ32で移動量の数値データを読込
む。そして、ステツプ33で移動量のデータを移
動量カウンタMVCにプリセツトした後で、ステ
ツプ34へ移行して移動方向が正であるか負であ
るかを記憶し、ステツプ35へ移行する。ステツ
プ35になると、指定された方向へパルスを1パ
ルス分配し、ステツプ36で移動量カウンタ
MVCのプリセツト値から1減ずる。ブロツク003
では最初にX2000がプログラムされているため、
最初に工作物WがX軸に沿つて正の方向へ移動さ
れ、工具TのX軸方向の位置決めが行われる。そ
して、工具Tの位置決めが完了して移動量カウン
タMVCの計数値が零となると、これがステツプ
37で判別されて、メインルーチンのステツプ1
3へ戻り、同じ動作がY軸およびZ軸の移動指令
について行われ、工具Tが最初の加工箇所へ位置
決めされる。 ブロツクN004のブロツクには工具を切削送り
でZ軸方向へ1200パルス分配するプログラム
G01 Z1200がプログラムされており、このプログ
ラムが読出されると、メインルーチンのステツプ
23で送り速度が切削速度にプリセツトされた
後、パルス分配ルーチンPGENにジヤンプしてZ
軸へ1200個のパルスが分配される。これによ
り、工作物Wの最初の加工箇所の加工が行われ
る。以下同様にしてブロツクN005以降の加工用
の数値制御プログラムに基づいて適当な数の加工
箇所に加工が1回目の加工として行われる。 このようにして複数の加工箇所の加工から成る
1回目の加工が完了すると、工具T01の折損検出
が行われる。すなわち、ブロツクN021,022,
023の移動指令用のプログラムが読出されると工
具T01が加工位置から折損検出位置に位置決めさ
れて工具T01の先端が折損検出用ヘツド22の工
具当り部24に係合せしめられ、この後ブロツク
N023にプログラムされているM48のデータが読
出されると折損検出の処理が行われる。 M48の数値制御装置データが読出されると、M
コードルーチンMCRのステツプ53からステツ
プ61へ移行して折損検出回路29から送出され
る信号を読込む。ステツプ62は折損検出回路2
9から送出されている信号によつて工具Tが折損
しているかどうかを判別するステツプで、工具T
が折損していると判別された場合にはステツプ6
5へ移行し工具Tが折損していないと判別された
場合にはステツプ63へ移行する。今、1回目の
加工では工具T01が折損しなかつたものとすれ
ば、ステツプ62からステツプ63へと移行す
る。 ステツプ63は折損工具の交換が完了した後
で、戻るブロツク番号を折損検出を行う度に更新
記憶するステツプで、前述したステツプ57と同
様に現在ブロツクレジスタNORの記憶値を戻り
ブロツクレジスタNARに転送する。この場合に
はNORの記憶値が023となつているため、戻りブ
ロツクレジスタNARの記憶値が002から023に更
新される。このように、戻りブロツクレジスタ
NARに記憶されている戻りブロツク番号のデー
タは、工具Tの交換が行われた時と折損検出が行
われて工具Tの折損が検出されなかつた時の両方
の場合に書替えが行われることになる。また、ス
テツプ64は折損工具を交換した後に戻るブロツ
ク以後にプログラムされている加工プログラムが
折損検出位置を移動開始点としてプログラムされ
ていることが記憶するステツプで戻りブロツクレ
ジスタNARの1ビツト目に0が書込まれる。 このようにしてM48で指令された折損検出の処
理が完了すると、再びメインルーチンに復帰し、
次のブロツクN024のプログラムが読出される。
ブロツクN024からN045までのプログラムの工具
T01による2回目の加工を行うもので、N024以後
の数ブロツクのデータによつて工具T01が折損検
出位置から加工位置に移動され、この後T01によ
つて複数の加工箇所の加工が行われる。そして、
加工が完了すると、工具T01が再び折損検出位置
に位置決めされ、ブロツクN046のM48によつて
工具折損の検出が指令される。 今、2回目の加工の途中で工具T01が折損した
ものとすると、MコードルーチンMCRのステツ
プ62でこれが判別され、ステツプ65以降の折
損処理のためのプログラムを実行する。まず、ス
テツプ65でモードレジスタMORに3を書込ん
で折損処理モードに入つたことを記憶し、この後
ステツプ66へ移行して工具テーブルの工具T01
の使用可否の欄に零を書込み工具T01が折損した
ことを記憶する。そして、この後、ステツプ67
で、戻りブロツクレジスタNARの1ビツト目が
0であるかどうかによつて、戻りブロツク以後に
プログラムされている加工プログラムが、折損検
出位置を移動開始点としてプログラムされている
か、工具交換位置を移動開始点としてプログラム
されているかを判別し、折損検出位置を移動開始
点としてプログラムされていることが判別された
場合にはステツプ68へ移行し、工具交換位置を
移動開始点としてプログラムされていることが判
別された場合にはステツプ69へ移行する。 ステツプ68と69は、折損工具を予備工具に
交換する折損処理プログラムの先頭ブロツク番号
を現在ブロツクレジスタNORにプリセツトする
ステツプで、ステツプ68では折損処理Aの先頭
ブロツク番号である980を現在ブロツクレジスタ
NORにプリセツトし、ステツプ69では折損処
理Bの先頭ブロツク番号である990を現在ブロツ
クレジスタNORにプリセツトする。この場合に
は、戻りブロツクレジスタNARの1ビツト目が
零となつているため、ステツプ68で現在ブロツ
クレジスタNORに980がプリセツトされる。 ステツプ70は工具テーブルを参照して折損し
た工具の予備工具をサーチするステツプで、工具
T01の予備工具がサーチされる。使用可能な予備
工具がない場合にはステツプ71でこれが判別さ
れて、ステツプ72で予備工具なしの表示として
運転を停止するが、この場合には表1に示すよう
にT01の予備工具としてのT06が使用できるた
め、ステツプ73へ移行する。ステツプ73と7
4は、折損処理プログラムの工具番号〓〓,
##の欄に予備工具と次工程工具の工具番号を代
入するステツプで、この場合には06と02が代入さ
れる。 ステツプ74の処理が完了するとメインルーチ
ンへ復帰して数値制御データの読込みが行われる
が、現在ブロツクレジスタNORの記憶値が980と
なつているため、980を先頭ブロツク番号とする
折損処理Aの数値制御プログラムのデータが読出
される。折損処理Aのプログラムは、折損工具を
交換した後で工具Tを折損検出位置まで戻すプロ
グラムで、ブロツクN980のZ2500とN981の
G28YOで工具T01を装着したスピンドル17を工
具交換位置に戻し、ブロツクN982のT〓〓で予
備工具T06を工具交換位置に割出し、ブロツク
N983のM06で工具T01を予備工具T06に交換す
る。そして、ブロツクN983のT##によつて次
工程の工具T02を再び工具交換位置に割出してお
く。このようにして工具T01の交換が完了する
と、ブロツク984と985のプログラムによつてスピ
ンドル17に装着された予備工具T06を折損検出
位置に再び位置決めする。ブロツクN986にプロ
グラムされているM02は、折損処理プログラムの
終りを示すもので、このM02のプログラムが読出
されると、MコードルーチンMCRのステツプ5
1からステツプ75へ移行して、M02の処理が行
われる。ステツプ75は、モードレジスタMOR
の記憶値が3になつているかどうかによつていま
まで実行してきた数値制御プログラムが折損処理
用のものであるのか、加行用のものであるかを判
別するステツプで、折損用のものであると判別さ
れた場合にはステツプ76へ移行し、加工用のも
のであると判別された場合には運転を停止する。
この場合にはモードレジスタMORの記憶値が3
となつているため、ステツプ76へ移行する。 ステツプ76と77は、戻りブロツクレジスタ
NARに記憶されているブロツク番号に続く加工
プログラムに戻つて運転を再開するためのステツ
プで、ステツプ76で戻りブロツクレジスタ
NARに記憶されているブロツク番号023を現在ブ
ロツクレジスタNORにプリセツトした後、ステ
ツプ77でモードレジスタMORに5を書込み、
これらの動作が完了すると、メインルーチンのス
テツプ12へ戻る。 メインルーチンのステツプ12へ戻ると、現在
ブロツクレジスタNORの記憶値に1が加算され
るため、戻りブロツクレジスタNARに記憶され
ているブロツク番号の次のブロツク以降にプログ
ラムされている数値制御プログラムが実行され
る。この場合には戻りブロツクレジスタMARに
戻りブロツクの番号として023が記憶されている
ため、N024のブロツク以降にプログラムされて
いる2回目の加工を行うためのプログラムが再び
実行される。これにより、工具T01の予備工具
T06によつて2回目以後の加工が継続して行われ
る。 一方、3回目の加工のように、加工工程の途中
で工具が行われる加工工程の後で工具の折損が検
出された場合、すなわち、3回目の加工プログラ
ムの後にプログラムされているN088のM48のプ
ログラムの指令による折損検出において工具Tの
折損が検出された場合には次のような折損処理が
行われる。すなわち、加工工程の途中で工具交換
が行われた場合には、工具Tの交換時において戻
りブロツクレジスタNARの1ビツト目に1が書
込まれるため、工具Tの折損が検出されると工具
折損処理ルーチンのステツプ66からステツプ6
8へ移行し、現在ブロツクレジスタNORに990が
プリセツトされる。 このため、加工工程の途中で工具交換が行われ
た場合には、第7図bに示す折損処理Bの数値制
御プログラムに従つて折損工具が予備工具に交換
される。この折損処理Bのプログラムは、折損工
具を予備工具に交換した後で、工具を折損検出位
置に位置決めすることは行われず、工具交換後に
おいては予備工具の装着された主軸17が各軸方
向の原点に位置するようにプログラムされている
ため、主軸17が各軸方向の原位置に位置する状
態で折損処理が完了する。 折損処理が完了してN994のブロツクにプログ
ラムされているM02が読出されると、Mコードル
ーチンMCRのステツプ75から76に移行し
て、戻りブロツクレジスタNARの記憶値を現在
ブロツクレジスタNORに転送した後、メインル
ーチンに復帰するが、途中で工具交換が行われた
場合には、工具交換の行われたブロツク番号が戻
りブロツクレジスタNARに記憶されているた
め、メインルーチンに復帰すると工具交換を行つ
たブロツクの次のブロツクからプログラムされて
いる加工プログラムが実行されることになる。 このため、加工工程の途中で工具の交換が行わ
れた場合でも、折損工具を交換した後で工作物の
加工を継続して行うことができる。 なお、上記実施例は、折損工具の工具交換位置
への位置決め、予備工具のサーチ、予備工具への
交換、予備工具の折損検出位置への位置決めの各
動作を自動的に連続して行えるようになつていた
が、これらの動作の一部または全部を手動操作に
よつて行うようにした数値制御工作機械に対して
も本発明を利用することができる。 また、上記実施例においては、工具交換時と折
損検出時の両方の時に先頭ブロツク番号の更新記
憶するようにしていたが、工具が折損した場合に
は途中で折損検出を行つていても工具交換時点ま
で戻つて加工を再開するようにすれば、工具交換
時にのみ先頭ブロツク番号の更新記憶を行うにし
てもよく、加工工程の途中で工具交換を行わない
ようにすれば折損検出時にのみ先頭ブロツク番号
を更新記憶するようにしてもよい。 以上述べたように、本発明においては、工具交
換またはおよび工具折損の検出に続いてプログラ
ムされている加工工程の先頭ブロツク番号に関連
するデータを工具交換またはおよび折損検出が行
われる度に更新記憶するようにし、工具折損が生
じた場合には折損した工具を交換した後で、折損
が検出された時に記憶されていたブロツク番号の
数値制御プログラムに遡つて数値制御を再開する
ようにしているから、工作物加工の途中で工具が
折損しても、折損工具の交換を行えば数値制御に
よる自動加工を継続して行うことができる。この
ため、工作物の加工中に工具が折損しても、従来
のように工作物の加工を最初からやり直したり、
残る未加工部分を手動操作で加工したりする必要
がない利点を有している。
[Table] In addition, the data area for breakage processing includes the current tool register TNR that stores the number of the currently used tool, the next process tool register NTR that stores the number of the tool that will be used in the next process, and the current Current block register NOR stores the block number of the numerical control program being executed, return block register NAR stores the block number to return to when a tool breaks, and whether workpiece W is being machined or a broken tool is being replaced. There is a mode register MOR etc. that stores whether the Next, specific operations of the numerical control device 30 during workpiece machining, particularly when detecting tool breakage, will be explained based on the flowcharts shown in FIGS. 9 to 12. Now, when a start switch (not shown) is pressed with the numerical control program shown in FIG. 6 written in the storage device 36, the numerical control device 30 starts the main routine program shown in FIG. to be executed. First, in step 10, the current block register NOR and the breakage detection block register NAR are reset to zero, and then in step 11, the mode register is reset to zero.
Set MOR to 5, which indicates the workpiece machining mode, and proceed to step 12. At step 12, 1 is added to the contents of the current block register NOR, and the current block register is
The content of NOR becomes 1. Step 13 is a step for sequentially reading out the numerical control data of the block currently specified by the block register NOR.
Since the stored value of NOR is 1, the data of the T code programmed first in N001 is read out. In step 14, it is determined whether the read data represents the end of the block. If the data represents the end of the block, the process returns to step 12 and the current block register is stored.
At the step of adding 1 to the stored value of NOR, if the data does not represent the end of the block, the process moves to step 15. Steps 15 to 18 are for decoding the read code and moving the operation to a processing routine according to the decoded code, and if the read code is one of X, Y, or Z. In this case, the pulse distribution routine PGEN shown in FIG.
If it is a G code, it jumps to the routine of steps 20 to 25, and if it is an M code, it jumps to the M code routine shown in FIG.
Jumps to MCR, and if it is a T code, jumps to tool selection routine TSR shown in FIG. In this case, since the read code is a T code, jump to the tool indexing routine TSR,
Processing for tool indexing is performed. That is, in step 80, the programmed tool number is read following the T code, and in step 81, the tool table is referenced to determine whether the designated tool can be used. If the specified tool can be used, the process directly proceeds to step 85; if the specified tool cannot be used, a spare tool is searched for in step 82, and the process proceeds to step 85. Incidentally, if there is no spare tool available, this is determined in step 83, and in step 84, a display indicating that there is no tool is made and the operation of the numerical control device 30 is stopped. Step 85 is a step for storing the specified tool number in the next process tool register NTR. In this case, since 01 is programmed as the tool number, 01 is written in the next process tool register NTR. Further, the following step 86 is a step of searching the magazine table for the number of the tool socket S containing the specified tool.
When the socket number containing the designated tool is searched, the process moves to step 87 and the searched socket number is output to the index control circuit 32.
As a result, the tool specified by the program or the spare tool of the specified tool is indexed to the tool conversion position. When it is determined in step 88 that the indexing of the tool has been completed, the process returns to step 13 of the main routine to read out the next numerical control data. Since only T01 is programmed in the block N001, data indicating the end of the block is programmed next to T01, and this is read out in step 13. When the data indicating the end of the block is read, this is determined in step 14 and the process returns to step 12, where the current block register is read.
1 is added to the stored value of NOR, and the numerical data is read out again in step 13. This results in
The M code data programmed at the beginning of block N002 is read out. If the read data is M code,
From step 17, the program jumps to the M code routine MCR, where M function processing is performed. First, in step 50, the numerical data programmed following the M code is read, and from step 51 to step 5.
In step 3, it is determined what the command is.
In this embodiment, M02 commands to stop operation, M06 commands tool exchange, and M48 commands tool breakage detection.
When the read numerical data is 02, 06, or 48, the process jumps to steps 75, 56, and 61, respectively, and performs the commanded operation. What is programmed into the N002 block is
Since it is M06, the process moves to step 56. Step 56 determines whether the operation mode is the machining mode based on whether the content of the mode register MOR is 5 or not, and then proceeds to step 59 via steps 57 and 58 or directly proceeds to step 59. However, in this case, since the content of the mode register MOR is 5, the process goes to step 5 via steps 57 and 58.
Move to 9. Step 57 is a step in which the block number returned after the replacement of the broken tool is completed is updated and memorized every time the tool is replaced.
The stored value of NOR, 002, is returned to the block register.
Transferred to NAR. In addition, step 58 is a step for writing the block number data in the return block register NAR at a step for storing that the machining program that is programmed after the block to return to when the tool breaks is set to the tool exchange position as the movement start point. 1 is written to the first bit that does not exist. Step 59 is a step for instructing a tool change, and a tool change command TCC is sent to the tool change control circuit 33.
Output. As a result, the arm drive device 35 is energized, the tool exchange arm 21 performs tool exchange, and the tool T with tool number 01 is mounted on the spindle 17. When the installation of the tool T is completed in this way, the number 01 of the installed tool T is stored in the current tool register TNR in step 60, and then the process moves to step 13 of the main routine to read the next numerical control data. will be held. N002 block has M06
Since T02 is programmed next to T02, tool T with tool number 02 is indexed to the tool change position in the same manner as described above, and is stored in the next process tool register NTR.
02 is stored. The program after block N003 is a machining program that performs the first machining with the tool change position as the starting point.When G00 X2000 Y70000 Z25000 programmed in block N003 are read out in order, Movement begins. That is, the initially programmed G
When the code G00 is read out, the process moves from step 16 to step 20, and in step 21, the pulse distribution speed is set to the fast forward speed, and following the G code, the programmed movement amount program is read out. When the X, Y, and Z codes are read, the program jumps to the pulse distribution routine PGEN shown in FIG. 10 and pulse distribution is performed. First, the moving direction is determined in steps 30a to 30b, and the moving direction is registered in the moving direction register in steps 31a to 31c.
Flags corresponding to the X, Y, and Z axes of the MDR are set, and in step 32, the numerical data of the amount of movement is read. Then, in step 33, the movement amount data is preset in the movement amount counter MVC, and then the process proceeds to step 34, where it is stored whether the movement direction is positive or negative, and the process proceeds to step 35. At step 35, one pulse is distributed in the specified direction, and at step 36, the movement amount counter is
Subtract 1 from the MVC preset value. Block 003
Since X2000 is programmed first,
First, the workpiece W is moved in the positive direction along the X-axis, and the tool T is positioned in the X-axis direction. Then, when the positioning of the tool T is completed and the count value of the movement amount counter MVC becomes zero, this is determined in step 37, and step 1 of the main routine is started.
Returning to step 3, the same operation is performed for the Y-axis and Z-axis movement commands, and the tool T is positioned to the first processing location. Block N004 has a program that distributes 1200 pulses in the Z-axis direction by cutting the tool.
When the G01 Z1200 is programmed and this program is read, the feed rate is preset to the cutting speed in step 23 of the main routine, then jumps to the pulse distribution routine PGEN and the Z1200 is programmed.
1200 pulses are distributed to the axis. As a result, the first machining location of the workpiece W is machined. Thereafter, machining is similarly performed at an appropriate number of machining locations as the first machining based on the numerical control program for machining from block N005 onwards. When the first machining consisting of machining a plurality of machining locations is completed in this manner, breakage of the tool T01 is detected. That is, blocks N021, 022,
When the movement command program 023 is read out, the tool T01 is positioned from the machining position to the breakage detection position, the tip of the tool T01 is engaged with the tool contact part 24 of the breakage detection head 22, and then the block
When the data of M48 programmed in N023 is read out, breakage detection processing is performed. When the numerical controller data of M48 is read, M
The code routine MCR moves from step 53 to step 61 to read the signal sent from the breakage detection circuit 29. Step 62 is the breakage detection circuit 2.
In this step, it is determined whether or not the tool T is broken based on the signal sent from the tool T.
If it is determined that the
If it is determined that the tool T is not broken, the process moves to step 63. Assuming that the tool T01 did not break during the first machining, the process moves from step 62 to step 63. Step 63 is a step in which the return block number is updated and stored every time a breakage is detected after the replacement of the broken tool is completed, and the value currently stored in the block register NOR is transferred to the return block register NAR in the same manner as in step 57 described above. do. In this case, since the stored value of NOR is 023, the stored value of return block register NAR is updated from 002 to 023. In this way, the return block register
The return block number data stored in the NAR is rewritten both when the tool T is replaced and when breakage of the tool T is not detected. Become. Further, step 64 is a step in which it is stored that the machining program programmed after the block returned after replacing the broken tool is programmed with the breakage detection position as the movement start point, and the 1st bit of the return block register NAR is set to 0. is written. When the breakage detection process commanded by M48 is completed in this way, the main routine returns again.
The program of the next block N024 is read out.
Tools for programs from blocks N024 to N045
The second machining by T01 is performed, and the tool T01 is moved from the breakage detection position to the machining position based on the data of several blocks after N024, and after that, machining of a plurality of machining locations is performed by T01. and,
When the machining is completed, the tool T01 is again positioned at the breakage detection position, and M48 of block N046 issues a command to detect the tool breakage. Assuming that the tool T01 breaks during the second machining, this is determined in step 62 of the M code routine MCR, and the breakage processing program from step 65 onwards is executed. First, in step 65, 3 is written to the mode register MOR to remember that the breakage processing mode has been entered, and then the process moves to step 66 where tool T01 in the tool table is set.
Write 0 in the usability column to remember that tool T01 is broken. And after this, step 67
Depending on whether the first bit of the return block register NAR is 0 or not, the machining program programmed after the return block is programmed with the breakage detection position as the movement start point, or the tool change position is moved. It is determined whether the breakage detection position is programmed as the start point, and if it is determined that the breakage detection position is programmed as the start point of movement, the process moves to step 68 to confirm that the tool exchange position is programmed as the start point of movement. If it is determined, the process moves to step 69. Steps 68 and 69 are steps for presetting the first block number of the breakage processing program for replacing a broken tool with a spare tool in the current block register NOR.In step 68, 980, which is the first block number of the breakage processing A, is preset in the current block register NOR.
In step 69, 990, which is the leading block number of breakage processing B, is preset in the current block register NOR. In this case, since the first bit of the return block register NAR is 0, 980 is preset to the current block register NOR in step 68. Step 70 is a step in which a spare tool for the broken tool is searched by referring to the tool table.
Spare tool T01 is searched. If there is no spare tool available, this is determined in step 71, and the operation is stopped in step 72 with an indication that there is no spare tool, but in this case, as shown in Table 1, T06 as a spare tool for T01 can be used, the process moves to step 73. Steps 73 and 7
4 is the tool number of the breakage processing program〓〓,
In this step, the tool numbers of the spare tool and the next process tool are substituted in the ## column, and in this case, 06 and 02 are substituted. When the process of step 74 is completed, the main routine is returned and the numerical control data is read, but since the value currently stored in the block register NOR is 980, the numerical value of breakage processing A with 980 as the first block number is Control program data is read. The breakage processing program A is a program that returns the tool T to the breakage detection position after replacing the broken tool.
Return the spindle 17 with tool T01 attached to the tool exchange position using G28YO, index the spare tool T06 to the tool exchange position using T of block N982, and
Replace tool T01 with spare tool T06 in M06 of N983. Then, the tool T02 for the next process is indexed to the tool exchange position again by T## of block N983. When the replacement of the tool T01 is completed in this manner, the spare tool T06 mounted on the spindle 17 is positioned again at the breakage detection position according to the programs of blocks 984 and 985. M02 programmed in block N986 indicates the end of the breakage processing program, and when this M02 program is read out, step 5 of the M code routine MCR is executed.
The process moves from step 1 to step 75, and the process of M02 is performed. Step 75 is the mode register MOR.
This is a step to determine whether the numerical control program that has been executed up to now is for handling breakage or addition, depending on whether the memorized value of is 3. If it is determined that there is one, the process moves to step 76, and if it is determined that it is for processing, the operation is stopped.
In this case, the value stored in the mode register MOR is 3.
Therefore, the process moves to step 76. Steps 76 and 77 are return block registers.
This is a step to return to the machining program following the block number stored in the NAR and resume operation.In step 76, the return block register is
After presetting block number 023 stored in NAR into the current block register NOR, 5 is written into the mode register MOR in step 77.
When these operations are completed, the process returns to step 12 of the main routine. When returning to step 12 of the main routine, 1 is added to the value currently stored in the block register NOR, so the numerical control program programmed after the block number next to the block number stored in the return block register NAR is executed. be done. In this case, since 023 is stored as the return block number in the return block register MAR, the program for performing the second machining programmed after block N024 is executed again. This allows the spare tool for tool T01 to be
Processing after the second time is continued by T06. On the other hand, if tool breakage is detected after a machining process in which the tool is used in the middle of the machining process, such as the third machining, in other words, if the tool is When a breakage of the tool T is detected in the breakage detection according to the commands of the program, the following breakage processing is performed. In other words, if a tool is replaced during the machining process, 1 is written to the first bit of the return block register NAR when tool T is replaced, so if tool T is detected as broken, the tool is broken. Steps 66 to 6 of the processing routine
8, and 990 is currently preset in the block register NOR. Therefore, when a tool is replaced during the machining process, the broken tool is replaced with a spare tool according to the numerical control program for breakage treatment B shown in FIG. 7b. In this breakage processing B program, after replacing the broken tool with a spare tool, the tool is not positioned at the breakage detection position, and after the tool is replaced, the main spindle 17 on which the spare tool is mounted is rotated in each axial direction. Since the main shaft 17 is programmed to be located at the original position, the breakage process is completed with the main shaft 17 located at the original position in each axis direction. When the breakage process is completed and M02 programmed in the block of N994 is read out, the process moves to steps 75 and 76 of the M code routine MCR, and the value stored in the return block register NAR is transferred to the current block register NOR. After that, the main routine returns to the main routine, but if a tool is changed during the process, the block number in which the tool was changed is stored in the return block register NAR, so the tool is not replaced when the main routine is returned. The programmed machining program will be executed from the block next to the block that was entered. Therefore, even if tools are replaced during the machining process, machining of the workpiece can be continued after replacing the broken tool. In addition, in the above embodiment, each operation of positioning a broken tool to a tool exchange position, searching for a spare tool, replacing it with a spare tool, and positioning a spare tool to a breakage detection position can be performed automatically and continuously. However, the present invention can also be applied to numerically controlled machine tools in which some or all of these operations are performed manually. Furthermore, in the above embodiment, the first block number is updated and memorized both when replacing the tool and when detecting breakage. If you return to the point of replacement and restart machining, you may be able to update and store the first block number only when the tool is replaced.If you do not change the tool in the middle of the machining process, the first block number will be updated only when a breakage is detected. The block number may be updated and stored. As described above, in the present invention, data related to the first block number of the machining process that is programmed following tool exchange or tool breakage detection is updated and stored every time tool change or tool breakage is detected. If a tool breaks, the broken tool is replaced and then numerical control is resumed by going back to the numerical control program of the block number that was stored when the breakage was detected. Even if a tool breaks during machining of a workpiece, automatic machining using numerical control can be continued by replacing the broken tool. Therefore, even if a tool breaks while machining a workpiece, the workpiece can be machined again from the beginning as in the conventional method.
This has the advantage that there is no need to manually process the remaining unprocessed portion.

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

第1図および第2図は本発明にかかる数値制御
工作機械を構成する機械本体の概略構成を示すも
ので第1図は機械本体の正面図、第2図は機械本
体の側面図、第3図は第1図、第2図における折
損検出用ヘツド22の構造を示す断面図、第4図
は本発明にかかる数値制御工作機械の制御回路の
一例を示すブロツク図、第5図は本発明の動作原
理を説明するための図、第6図は工作物の加工中
に工具の折損検出を行うようにした数値制御プロ
グラムの一例を示すプログラムシートを示す図、
第7図a,bは折損工具を予備工具に交換するた
めの数値制御プログラムを示す図、第8図は第4
図における記憶装置36内のメモリマツプを示す
図、第9図から第12図までは第3図における数
値制御装置30の動作を説明するためのフローチ
ヤートで第9図はメインルーチン、第10図はパ
ルス分配ルーチンPGEN、第11図はMコードル
ーチンMCR、第12図は工具選択ルーチンTSR
を示す図である。 10……ベツド、11……コラム、13……ス
ライドテーブル、15,16,19……サーボモ
ータ、17……主軸、18……主軸頭、20……
マガジン、21……工具交換アーム、22……折
損検出用ヘツド、29……折損検出回路、30…
…数値制御装置、31……サーボモータ駆動回
路、32……割出制御回路、33……工具交換制
御回路、34……マガジン駆動装置、35……ア
ーム駆動装置、36……記憶装置、57……工具
交換時にブロツク番号を更新記憶するステツプ、
63……工具折損が検出されなかつたときにブロ
ツク番号を更新記憶するステツプ、76,77…
…折損工具を交換した後において記憶されたブロ
ツクに戻つて数値制御加工を再開するためのステ
ツプ、T……工具、W……工作物。
1 and 2 show the schematic structure of the machine body constituting the numerically controlled machine tool according to the present invention. FIG. 1 is a front view of the machine body, FIG. 2 is a side view of the machine body, and FIG. The figure is a cross-sectional view showing the structure of the breakage detection head 22 in FIGS. 1 and 2, FIG. 4 is a block diagram showing an example of the control circuit of the numerically controlled machine tool according to the present invention, and FIG. 6 is a diagram showing a program sheet showing an example of a numerical control program for detecting tool breakage during machining of a workpiece.
Figures 7a and b are diagrams showing the numerical control program for replacing a broken tool with a spare tool, and Figure 8 is a diagram showing the numerical control program for replacing a broken tool with a spare tool.
9 to 12 are flowcharts for explaining the operation of the numerical control device 30 in FIG. 3. FIG. 9 is a main routine, and FIG. Pulse distribution routine PGEN, Figure 11 shows M code routine MCR, Figure 12 shows tool selection routine TSR.
FIG. 10...Bed, 11...Column, 13...Slide table, 15, 16, 19...Servo motor, 17...Spindle, 18...Spindle head, 20...
Magazine, 21... Tool exchange arm, 22... Breakage detection head, 29... Breakage detection circuit, 30...
... Numerical control device, 31 ... Servo motor drive circuit, 32 ... Index control circuit, 33 ... Tool exchange control circuit, 34 ... Magazine drive device, 35 ... Arm drive device, 36 ... Storage device, 57 ...The step of updating and memorizing the block number when replacing the tool,
63... Step of updating and storing the block number when no tool breakage is detected, 76, 77...
...Step for returning to the stored block and restarting numerically controlled machining after replacing a broken tool, T...Tool, W...Workpiece.

Claims (1)

【特許請求の範囲】[Claims] 1 工作物の加工途中において適当な間隔で工具
を折損検出位置に位置決めして工具の折損検出を
行うようにした数値制御工作機械において折損工
具を交換した後で工作物の加工を再開するための
方法であつて、工具折損の検出時またはおよび工
具交換時において工具折損指令またはおよび工具
交換指令のプログラムに続いてプログラムされて
いる加工プログラムの先頭ブロツク番号に関連し
たデータを順番に更新記憶するようにし、工具の
折損が検出された場合には折損工具を新しい工具
に交換した後で前記更新記憶された先頭ブロツク
番号の数値制御プログラムに遡つて数値制御加工
を再開するようにしたことを特徴とする数値制御
工作機械における加工再開方法。
1 A method for restarting machining of a workpiece after replacing a broken tool in a numerically controlled machine tool that detects tool breakage by positioning the tool at a breakage detection position at appropriate intervals during machining of the workpiece. A method for sequentially updating and storing data related to the first block number of a machining program programmed following a tool breakage command or a tool change command program when a tool breakage is detected or when a tool is replaced. and when a broken tool is detected, the broken tool is replaced with a new tool, and then numerical control machining is restarted by going back to the numerical control program of the updated and stored first block number. A method for restarting machining in numerically controlled machine tools.
JP13997478A 1978-11-13 1978-11-13 Method for resuming machining by numerical-controlled machine tool Granted JPS5565047A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13997478A JPS5565047A (en) 1978-11-13 1978-11-13 Method for resuming machining by numerical-controlled machine tool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13997478A JPS5565047A (en) 1978-11-13 1978-11-13 Method for resuming machining by numerical-controlled machine tool

Publications (2)

Publication Number Publication Date
JPS5565047A JPS5565047A (en) 1980-05-16
JPS6119380B2 true JPS6119380B2 (en) 1986-05-16

Family

ID=15257994

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13997478A Granted JPS5565047A (en) 1978-11-13 1978-11-13 Method for resuming machining by numerical-controlled machine tool

Country Status (1)

Country Link
JP (1) JPS5565047A (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59152050A (en) * 1983-02-15 1984-08-30 Fanuc Ltd Restart of profiling operation
JPS6186152A (en) * 1984-10-01 1986-05-01 Yamazaki Mazak Corp Returning method of tool in numerically controlled machine tool
JPH0187817U (en) * 1987-11-30 1989-06-09
JP4984135B2 (en) * 2007-03-29 2012-07-25 ブラザー工業株式会社 Machine tool, tool magazine control program and recording medium

Also Published As

Publication number Publication date
JPS5565047A (en) 1980-05-16

Similar Documents

Publication Publication Date Title
EP0002750B1 (en) Computerized numerical controller for a machine tool
US7016760B2 (en) Numerically controlled machine tool and a program transforming method therefor
EP0088870B1 (en) Numerically controlled machine tool system capable of setting up tools into tool magazine
JPH0238342B2 (en)
JPH046001B2 (en)
CN101373379A (en) Numerical controller with program resuming function
US4751652A (en) Numerical control drilling restart control system
JP4947534B2 (en) Machine tool and method of operating machine tool
JPH01146642A (en) Stop control device for cutting tool
JPS6365469B2 (en)
JPWO2004074953A1 (en) Numerical controller
JPS6119380B2 (en)
GB2083247A (en) A programmable machine
JP2882534B2 (en) Turning center tool calling device Built-in numerical controller
JPH0746287B2 (en) Numerical control device
JPH0321301B2 (en)
JPH0630011B2 (en) Numerical control Machining restart control method
JP4341118B2 (en) Tool changing device and tool changing method
JPS6147652B2 (en)
JPH06218645A (en) Automatic tool change control and device therefor
GB2187308A (en) An operation program checking method for a numerical control device
JP4261708B2 (en) NC machining equipment
JPH0424180B2 (en)
JPS6230082Y2 (en)
KR830002110B1 (en) Sequence control method of numerical machine tool