JPH06738A - Tool exchanging method - Google Patents

Tool exchanging method

Info

Publication number
JPH06738A
JPH06738A JP18433292A JP18433292A JPH06738A JP H06738 A JPH06738 A JP H06738A JP 18433292 A JP18433292 A JP 18433292A JP 18433292 A JP18433292 A JP 18433292A JP H06738 A JPH06738 A JP H06738A
Authority
JP
Japan
Prior art keywords
tool
statement
selection command
machining
executed
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.)
Granted
Application number
JP18433292A
Other languages
Japanese (ja)
Other versions
JP2791733B2 (en
Inventor
Keiichiro Miyajima
敬一郎 宮嶋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fanuc Corp
Original Assignee
Fanuc Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fanuc Corp filed Critical Fanuc Corp
Priority to JP4184332A priority Critical patent/JP2791733B2/en
Publication of JPH06738A publication Critical patent/JPH06738A/en
Application granted granted Critical
Publication of JP2791733B2 publication Critical patent/JP2791733B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Automatic Tool Replacement In Machine Tools (AREA)

Abstract

PURPOSE:To suppress the increase of a machining time owing to an exchange time. CONSTITUTION:Looking ahead of a machining program is executed at S4-S8 during a time in which a tool selection command is read during the stating of machining and each time exchange of a tool is executed. A tool code for a read tool selection command is outputted to a tool exchanging device 3 and preparation operation of exchange of a tool is started at S9. Meanwhile, a machining program is orderly executed by a CNC device 1 at S2, S3, and S11. Since preparation operation of exchange of a tool can be completed during a time in which a tool selection command is read as execution statement, there is no need to re-start the machining program after waiting for take-out of a drilling tool and its movement to a tool exchange position like a conventional method, and a machining time of the whole of one machining program can be sharply saved.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、工作機械を制御する制
御装置および工具交換装置を用いた工具交換方法の改良
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a control device for controlling a machine tool and an improvement of a tool changing method using the tool changing device.

【0002】[0002]

【従来の技術】いわゆるマシニングセンタにおける切削
工具の交換およびCNCパンチプレス機械における穿孔
工具の交換等の分野において、各種工作機械やパンチプ
レス機械等の制御装置からの指令で工具交換装置を駆動
して工具の自動交換作業を行うようにした工具交換方法
が広く知られている。工具交換装置を駆動するための指
令は加工プログラム中に書き込まれた工具選択指令によ
って構成され、加工プログラム中の工具選択指令を実行
対象ステートメントとして読み取った制御装置が工具選
択指令を工具交換装置に入力した時点で工具交換装置の
側での準備動作、即ち、工具選択指令で指定された工具
をポットから取り出したり、この工具を工具交換位置へ
移動させたりする準備動作が開始され、この準備動作が
完了した時点で初めて工具の交換作業が可能となる。
2. Description of the Related Art In the field of exchanging cutting tools in so-called machining centers and exchanging drilling tools in CNC punch press machines, a tool changer is driven by a command from a controller of various machine tools or punch press machines. A method of exchanging tools for performing the automatic exchanging work is widely known. The command for driving the tool changer is composed of the tool selection command written in the machining program, and the controller that reads the tool selection command in the machining program as the execution target statement inputs the tool selection command to the tool changer. At that time, the preparatory operation on the side of the tool changer, that is, the preparatory operation of taking out the tool designated by the tool selection command from the pot or moving the tool to the tool exchanging position is started. Only when completed can the tool be replaced.

【0003】[0003]

【発明が解決しようとする課題】前述したような従来技
術により工具交換の自動化自体は可能となったが、加工
の実行途中で工具交換を行うような場合では、制御装置
が工具選択指令を出力してから工具交換装置の準備動作
が完了するまでの間、加工プログラムの実行、即ち、工
作機械による加工動作を中断して待機状態を保持しなけ
ればならず、全体としての加工所用時間が増大してラン
ニングコストに悪影響を及ぼす欠点があった。特に、最
近では製品形状の複雑化や材質の多様化に伴って1加工
プログラム中での工具交換が頻繁に行われるようにな
り、工具交換による加工所用時間の増大が重要な問題と
なりつつある。そこで、本発明の目的は、工具交換によ
って生じる加工時間の増大を抑制し、工具交換を頻繁に
行った場合でも一連の加工を短時間で行うことのできる
工具交換方法を提供することにある。
Although the conventional technique as described above has made it possible to automate the tool exchange itself, in the case where the tool exchange is performed during the execution of machining, the control device outputs a tool selection command. From the start to the completion of the preparatory operation of the tool changer, the machining program must be executed, that is, the machining operation by the machine tool must be interrupted and the standby state must be maintained, increasing the overall machining time. Then, there was a drawback that adversely affects the running cost. In particular, recently, as the product shape has become complicated and the materials have been diversified, the tool replacement in one machining program has been frequently performed, and the increase of the processing time by the tool replacement is becoming an important issue. Therefore, an object of the present invention is to provide a tool exchanging method that suppresses an increase in machining time caused by tool exchanging and can perform a series of machining in a short time even if the tool exchanging is frequently performed.

【0004】[0004]

【課題を解決するための手段】本発明の工具交換方法
は、加工開始時および工具交換が実行される毎に、工具
選択指令が読み取られるまで制御装置で加工プログラム
を先読みし、読み取られた工具選択指令の工具コードを
制御装置から工具交換装置に出力した後、前記加工プロ
グラムを制御装置により順次実行し、かつ、制御装置か
ら送られてきた工具コードを工具交換装置が受信した段
階で該工具コードの工具を工具交換装置によって工具交
換位置に移動させると共に、前記制御装置からの工具選
択実行指令を入力された工具交換装置により工具の交換
作業を行うことによって前記目的を達成した。
According to the tool exchanging method of the present invention, the machining program is pre-read by the controller until the tool selection command is read at the start of machining and every time tool exchanging is executed, and the read tool is read. After outputting the tool code of the selection command from the control device to the tool exchanging device, the machining programs are sequentially executed by the control device, and the tool code is sent when the tool exchanging device receives the tool code sent from the control device. The object is achieved by moving the tool of the code to the tool replacement position by the tool replacement device and performing the tool replacement work by the tool replacement device to which the tool selection execution command from the control device is input.

【0005】[0005]

【作用】工作機械を制御する制御装置は、加工開始時お
よび工具交換が実行される毎に工具選択指令が読み取ら
れるまで加工プログラムを先読みすると共に、読み取っ
た工具選択指令の工具コードを工具交換装置に出力して
前記加工プログラムを順次実行する。工具交換装置は、
制御装置から送られてきた工具コードを受信した時点で
該工具コードの工具を工具交換位置に移動させる動作を
開始し、制御装置から工具選択実行指令が入力される
と、工具の交換作業を実行する。
The control device for controlling the machine tool pre-reads the machining program until the tool selection command is read at the start of machining and every time tool exchange is executed, and the tool code of the read tool selection command is read by the tool exchange device. And the machining programs are sequentially executed. The tool changer
When the tool code sent from the control device is received, the operation to move the tool of the tool code to the tool replacement position is started, and when the tool selection execution command is input from the control device, the tool replacement work is executed. To do.

【0006】工作機械を制御する制御装置が工具選択指
令を先読みして工具コードを出力することにより工具交
換装置に工具交換のための準備動作、即ち、指定工具の
取り出しや工具交換位置への移動を開始させると共に、
指定工具の取り出しおよび移動が行われる間も制御装置
が工作機械を駆動制御して加工を実行する。しかも、先
読みされた工具選択指令がその後実行対象ステートメン
トとして制御装置に読み込まれて工具選択実行指令とし
て工具交換装置に出力された段階では、既に指定工具の
取り出しおよび移動が完了しており、工具交換装置は工
具選択指令が入力された時点で直ちに工具交換を実行す
ることができるので、工具交換のための加工中断による
加工時間の増大が最大限に抑制される。
A control device for controlling the machine tool pre-reads a tool selection command and outputs a tool code, so that the tool changing device performs a preparatory operation for changing the tool, that is, taking out a designated tool or moving to a tool changing position. And start
The control device drives and controls the machine tool to perform machining even while the designated tool is being taken out and moved. Moreover, at the stage when the pre-read tool selection command is subsequently read by the control device as the execution target statement and output to the tool change device as the tool selection execution command, the specified tool has already been taken out and moved, and the tool replacement Since the device can immediately execute the tool exchange when the tool selection command is input, the increase of the machining time due to the interruption of the machining for the tool exchange is suppressed to the maximum.

【0007】[0007]

【実施例】以下、図面を参照して本発明の実施例を説明
する。図1は本発明の方法を適用したCNCパンチプレ
スシステムの概略を示すブロック図で、このシステム
は、工作機械としてのパンチプレス機械2、工具交換装
置3、および、パンチプレス機械2と工具交換装置3を
制御する制御装置であるCNC装置1によって構成され
る。プロセッサ11はCNC装置1を全体的に制御する
プロセッサであり、バス19を介して、ROM12に格
納されたシステムプログラムを読み出し、このシステム
プログラムに従って、CNC装置1を全体的に制御す
る。RAM13には一時的な計算データや表示データお
よびCRT/MDIユニット20を介してオペレータが
入力した各種データ等が格納される。CMOSメモリ1
4は図示しないバッテリでバックアップされ、CNC装
置1の電源がオフにされても記憶状態が保持される不揮
発性メモリとして構成され、インターフェイス15を介
して読込まれた加工プログラムやCRT/MDIユニッ
ト20を介して入力された加工プログラム等が記憶され
るようになっている。また、ROM12には、加工プロ
グラムの作成および編集のために必要とされる編集モー
ドの処理や自動運転のための再生モードの処理を実施す
るための各種のシステムプログラムが予め書き込まれて
いる。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing an outline of a CNC punch press system to which the method of the present invention is applied. This system includes a punch press machine 2 as a machine tool, a tool changing device 3, and a punch press machine 2 and a tool changing device. It is configured by the CNC device 1 which is a control device for controlling The processor 11 is a processor that controls the CNC device 1 as a whole, reads the system program stored in the ROM 12 via the bus 19, and controls the CNC device 1 as a whole according to the system program. The RAM 13 stores temporary calculation data, display data, various data input by the operator via the CRT / MDI unit 20, and the like. CMOS memory 1
4 is configured as a non-volatile memory that is backed up by a battery (not shown), and retains a stored state even when the power of the CNC device 1 is turned off. The machining program read through the interface 15 and the CRT / MDI unit 20 are stored in the memory 4. A machining program or the like input via the memory is stored. Further, various system programs for executing the edit mode processing required for creating and editing the machining program and the reproduction mode processing for automatic operation are written in the ROM 12 in advance.

【0008】インターフェイス15はCNC装置1に接
続可能な外部機器のためのインターフェイスであり、紙
テープリーダや紙テープパンチャーおよび外部記憶装置
等の外部機器18が接続される。紙テープリーダや外部
記憶装置からは加工プログラム等が読み込まれ、また、
CNC装置1内で編集された加工プログラムを紙テープ
パンチャーや外部記憶装置に出力することができる。P
MC(プログラマブル・マシン・コントローラ)16
は、CNC装置1に内蔵されたシーケンスプログラムで
プロセッサ11からの指令コードを工具交換装置3で必
要な信号に変換してI/Oユニット17から工具交換装
置3に出力し、また、パンチプレス機械2や工具交換装
置3のリミットスイッチおよびパンチプレス機械2の本
体に配備された操作盤の各種スイッチ等の信号を受け、
必要な処理をして、プロセッサ11に渡す。
The interface 15 is an interface for an external device connectable to the CNC device 1, and is connected with an external device 18 such as a paper tape reader, a paper tape puncher, and an external storage device. Processing programs are read from the paper tape reader and external storage device, and
The machining program edited in the CNC device 1 can be output to a paper tape puncher or an external storage device. P
MC (Programmable Machine Controller) 16
Is a sequence program built in the CNC device 1 that converts a command code from the processor 11 into a signal required by the tool changing device 3 and outputs the signal from the I / O unit 17 to the tool changing device 3. 2 and limit switches of the tool changer 3 and signals of various switches of the operation panel provided on the main body of the punch press machine 2,
Perform necessary processing and pass it to the processor 11.

【0009】CRT/MDIユニット20はディスプレ
イやキーボード等を備えた手動データ入力装置であり、
インータフェイス21はCRT/MDIユニット20の
キーボードからのデータを受けてプロセッサ11に渡
す。インターフェイス22は手動パルス発生器23に接
続され、手動パルス発生器23からのパルスを受ける。
手動パルス発生器23はパンチプレス機械2の操作盤に
実装され、手動操作に基く分配パルスによる各軸制御で
パンチプレス機械2の可動部を精密に位置決めするため
に使用される。
The CRT / MDI unit 20 is a manual data input device equipped with a display, a keyboard, etc.
The interface 21 receives data from the keyboard of the CRT / MDI unit 20 and transfers it to the processor 11. The interface 22 is connected to the manual pulse generator 23 and receives pulses from the manual pulse generator 23.
The manual pulse generator 23 is mounted on the operation panel of the punch press machine 2 and is used for precisely positioning the movable part of the punch press machine 2 by controlling each axis by the distribution pulse based on the manual operation.

【0010】軸制御回路30〜32はプロセッサ11か
らの各軸の移動指令を受けて、各軸の指令をサーボアン
プ40〜42に出力する。サーボアンプ40〜42はこ
の指令を受けて、パンチプレス機械2の各軸のサーボモ
ータ50〜52を駆動する。なお、サーボモータ50,
51はダイプレートのX軸,Y軸方向の送り、サーボモ
ータ52は穿孔工具をくわえるチャックの回転位置を変
化させるためのものである。各軸のサーボモータ50〜
52には位置検出用のパルスコーダが内蔵されており、
このパルスコーダからの位置信号がパルス列としてフィ
ードバックされる。場合によっては、位置検出器として
リニアスケールが使用される。また、このパルス列をF
/V(周波数/速度)変換することにより、速度信号を
生成することができる。図1ではパンチプレス機械2の
穿孔工具を駆動するためのフライホイールやその駆動源
となる電動モータ等(油圧回路の場合もある)に関して
は説明を省略している。
The axis control circuits 30 to 32 receive the movement command of each axis from the processor 11 and output the command of each axis to the servo amplifiers 40 to 42. In response to this command, the servo amplifiers 40 to 42 drive the servo motors 50 to 52 of the respective axes of the punch press machine 2. The servo motor 50,
Reference numeral 51 is for feeding the die plate in the X-axis and Y-axis directions, and the servo motor 52 is for changing the rotational position of the chuck holding the drilling tool. Servo motor 50 for each axis
52 has a built-in pulse coder for position detection,
The position signal from this pulse coder is fed back as a pulse train. In some cases, a linear scale is used as the position detector. In addition, this pulse train is F
A speed signal can be generated by converting / V (frequency / speed). In FIG. 1, the description of the flywheel for driving the punching tool of the punch press machine 2 and the electric motor or the like (which may be a hydraulic circuit) as a drive source thereof is omitted.

【0011】また、工具交換装置3の近傍には形状や材
質の異なる様々な穿孔工具を多数ストックしたポットが
配備されており、工具交換装置3の工具交換機能によ
り、パンチプレス機械2のチャックから穿孔工具を回収
してポットに収めたり、指定された穿孔工具をポットか
ら選択して工具交換位置に移動させたり、更には、工具
交換位置に移動された工具をパンチプレス機械2のチャ
ックに取り付けたりできるようになっている。このよう
な機能は、例えば、指定された穿孔工具をポットから取
り出して工具交換位置に移動させた後、パンチプレス機
械2のチャックから穿孔工具が回収されたことを確認し
てから工具交換位置にある穿孔工具をチャックに取り付
ける第1のロボットアームと、パンチプレス機械2のチ
ャックから穿孔工具を回収してポットに収める第2のロ
ボットアームとの協調動作によって実現される。
In the vicinity of the tool exchanging device 3, there is provided a pot in which a large number of various punching tools having different shapes and materials are stocked, and the tool exchanging function of the tool exchanging device 3 causes the chuck of the punch press machine 2 to move. Collect the punching tool and store it in a pot, select a designated punching tool from the pot and move it to the tool change position, and further attach the tool moved to the tool change position to the chuck of the punch press machine 2. You can do it. Such a function is, for example, after taking out the specified drilling tool from the pot and moving it to the tool exchange position, after confirming that the drilling tool has been recovered from the chuck of the punch press machine 2, the function is moved to the tool exchange position. It is realized by the cooperative operation of the first robot arm that attaches a certain punching tool to the chuck and the second robot arm that collects the punching tool from the chuck of the punch press machine 2 and stores it in the pot.

【0012】図2および図3はCNC装置1のプロセッ
サ11(以下、CPUという)が自動運転モードの処理
で実行するシステムプログラムの概略を示すフロチャー
トであり、以下、2つのロボットアームを協調動作させ
て工具の交換作業を行う工具交換装置3を例にとって実
施例の工具交換方法を説明する。なお、再生の対象とな
る加工プログラムは既にCMOSメモリ14に格納され
ているものとする。
2 and 3 are flowcharts showing the outline of the system program executed by the processor 11 (hereinafter referred to as CPU) of the CNC device 1 in the process of the automatic operation mode. Hereinafter, the two robot arms will operate cooperatively. The tool exchanging method of the embodiment will be described by taking the tool exchanging device 3 for exchanging tools as an example. It should be noted that the processing program to be reproduced is already stored in the CMOS memory 14.

【0013】自動運転モードの処理を開始したCPU
は、まず、実行位置記憶指標R0および先読み開始位置
記憶指標R1の値を共に“0”に初期化して先読み禁止
フラグF0をリセットし(ステップS1)、実行位置記
憶指標R0の値を“1”インクリメントした後(ステッ
プS2)、該指標R0の値“1”に基いてCMOSメモ
リ14の加工プログラムからシーケンス番号R0のステ
ートメントを読み込み、実行対象ステートメントとして
RAM13に一時記憶する(ステップS3)。次いで、
CPUは、先読み禁止フラグF0がセットされているか
否かを判別するが(ステップS4)、この場合、ステッ
プS1の処理で先読み禁止フラグF0がリセットされて
いるため、ステップS4の判別結果は偽となる。そこ
で、CPUは、先読み開始位置記憶指標R1の値を
“1”インクリメントし(ステップS5)、該指標R1
の値“1”に基いてCMOSメモリ14の加工プログラ
ムからシーケンス番号R1のステートメントを先読み
し、このステートメントを先読みステートメントとして
RAM13に一時記憶する(ステップS6)。次いで、
CPUは、ステップS6の処理で先読みされたステート
メントに工具選択指令(Tコード)が付されているか否
かを判別するが(ステップS7)、工具選択指令が付さ
れていなければ、更に、このステートメントがプログラ
ムエンドを示すものであるか否かを判別する(ステップ
S8)。そして、プログラムエンドを示すものでもなけ
れば、CPUは再びステップS5の処理へと移行し、工
具選択指令が付されたステートメント、もしくは、プロ
グラムエンドを示すステートメントが先読みされるまで
の間、先読み開始位置記憶指標R1の値を順次インクリ
メントして、ステップS5〜ステップS8までの処理
(以下、先読み処理という)を繰り返し実行する。
CPU that started processing in automatic operation mode
First, the values of the execution position storage index R0 and the prefetch start position storage index R1 are both initialized to "0" to reset the prefetch prohibition flag F0 (step S1), and the value of the execution position storage index R0 is set to "1". After the increment (step S2), the statement with the sequence number R0 is read from the machining program of the CMOS memory 14 based on the value "1" of the index R0, and is temporarily stored in the RAM 13 as an execution target statement (step S3). Then
The CPU determines whether or not the prefetch prohibition flag F0 is set (step S4). In this case, since the prefetch prohibition flag F0 is reset in the process of step S1, the determination result of step S4 is false. Become. Therefore, the CPU increments the value of the prefetch start position storage index R1 by "1" (step S5), and the index R1
The statement with the sequence number R1 is prefetched from the machining program of the CMOS memory 14 based on the value "1" of the above, and this statement is temporarily stored in the RAM 13 as a prefetch statement (step S6). Then
The CPU determines whether or not a tool selection command (T code) is attached to the statement prefetched in the process of step S6 (step S7). If the tool selection command is not attached, this statement is further added. Is determined to indicate the program end (step S8). If it does not indicate the program end, the CPU moves to the processing of step S5 again, and the prefetch start position is continued until the statement with the tool selection command or the statement indicating the program end is prefetched. The value of the storage index R1 is sequentially incremented, and the processing from step S5 to step S8 (hereinafter referred to as the prefetch processing) is repeatedly executed.

【0014】そして、先読み処理を繰り返し実行する間
に工具選択指令が付されたステートメントが先読みされ
た場合、即ち、ステップS7の判別結果が真となった場
合には、CMOSメモリ14に格納されている加工プロ
グラムが少なくとも1回の工具交換作業を含むものであ
ることを意味し、先読み開始位置記憶指標R1には次の
工具交換作業に関するステートメントのシーケンス番号
が保存されることとなる。また、加工プログラムの最後
まで先読みを行っても工具選択指令が付されたステート
メントが読み込まれない場合、即ち、ステップS8の判
別結果が真となった場合には、CMOSメモリ14に格
納されている加工プログラムが工具交換作業を必要とし
ない加工プログラムであることを意味し、先読み開始位
置記憶指標R1には加工プログラムにおける最終ステー
トメントのシーケンス番号“n”が保存される。
Then, when the statement to which the tool selection command is added is pre-read while the pre-reading process is repeatedly executed, that is, when the determination result of step S7 is true, it is stored in the CMOS memory 14. This means that the machining program that is included includes at least one tool change work, and the prefetch start position storage index R1 stores the sequence number of the statement regarding the next tool change work. Further, if the statement with the tool selection command is not read even if prefetching is performed to the end of the machining program, that is, if the determination result in step S8 is true, it is stored in the CMOS memory 14. This means that the machining program is a machining program that does not require tool replacement work, and the prefetch start position storage index R1 stores the sequence number "n" of the last statement in the machining program.

【0015】そこで、まず、CMOSメモリ14に格納
されている加工プログラムが工具交換作業を含むもので
ある場合の処理の流れについて、図4の加工プログラム
を参考にして説明する。なお、図4に示すGコードのス
テートメントはパンチプレス機械2における各軸の送り
やチャックの回転位置等に関する通常の加工動作のため
のものであり、また、Tコードは工具交換のための工具
選択指令であって、必ず、新たな選択対象を示す工具コ
ードによって修飾されている。
Therefore, first, the flow of processing when the machining program stored in the CMOS memory 14 includes a tool changing operation will be described with reference to the machining program of FIG. The G code statement shown in FIG. 4 is for a normal machining operation regarding the feed of each axis and the chuck rotation position in the punch press machine 2, and the T code is a tool selection for tool change. It is a command and is always modified by a tool code indicating a new selection target.

【0016】従って、図4の加工プログラムの例では、
まず、シーケンス番号R0=“1”のステートメントが
実行対象ステートメントとしてRAM13に一時記憶さ
れ、更に、先読み処理が繰り返し実行されて先読み開始
位置記憶指標R1の値が“3”にインクリメントされた
段階で、工具選択指令を有するシーケンス番号“3”の
ステートメントが先読みステートメントとして読み込ま
れ、ステップS7の判別結果が真となってCPUがステ
ップS9の処理へと移行することとなる。
Therefore, in the example of the machining program of FIG.
First, the statement with the sequence number R0 = “1” is temporarily stored in the RAM 13 as the statement to be executed, and further, the prefetch process is repeatedly executed and the value of the prefetch start position storage index R1 is incremented to “3”, The statement of the sequence number "3" having the tool selection command is read as the prefetch statement, the determination result of step S7 becomes true, and the CPU shifts to the processing of step S9.

【0017】ステップS9へと移行したCPUは、シー
ケンス番号R1=“3”の先読みステートメントに書き
込まれている工具コードの値、即ち、図4の例では工具
コードAの値をPMC16に出力して工具交換装置3で
必要な信号に変換した後、更に、I/Oユニット17を
介して工具交換装置3に出力する(以上、ステップS
9)。すると、工具コードAを受信した工具交換装置3
は第1のロボットアームを駆動して工具コードAの穿孔
工具をポットから取り出し、工具交換位置を最終目標位
置として第1のロボットアームの移動を開始させる。
The CPU that has proceeded to step S9 outputs the value of the tool code written in the look-ahead statement of sequence number R1 = "3", that is, the value of the tool code A in the example of FIG. 4, to the PMC16. After the signal is converted into a necessary signal by the tool changing device 3, the signal is further output to the tool changing device 3 via the I / O unit 17 (above, step S
9). Then, the tool changer 3 that has received the tool code A
Drives the first robot arm to take out the drilling tool having the tool code A from the pot, and starts the movement of the first robot arm with the tool exchange position as the final target position.

【0018】また、工具交換装置3に工具コードの値を
出力したCPUは、先読み禁止フラグF0を直ちにセッ
トし(ステップS10)、シーケンス番号R0=“1”
の実行対象ステートメントを実行してパンチプレス機械
2に各軸の送りやチャックの回転位置等に関する通常の
加工動作を行わせた後(ステップS11)、シーケンス
番号R0=“1”の実行対象ステートメントが工具選択
指令を付されたものであったか否か、即ち、今回の処理
周期で工具交換作業が実施されたか否かを判別する(ス
テップS12)。今回の処理周期で工具交換作業が実施
されていればCPUはステップS13の処理へと移行し
て先読み禁止フラグF0をリセットすることとなるが、
図4の例ではシーケンス番号R0=“1”の実行対象ス
テートメントに工具選択指令が付されていないからステ
ップS12の判別結果は偽となり、CPUはステップS
13の処理を非実行としてステップS14の処理へと移
行し、シーケンス番号R0=“1”の実行対象ステート
メントがプログラムエンドを示すものであったか否かを
判別することとなる。以上、図5における処理周期1を
参照。
The CPU which has output the value of the tool code to the tool changer 3 immediately sets the prefetch prohibition flag F0 (step S10), and the sequence number R0 = "1".
The execution target statement of sequence number R0 = "1" is executed after the punch press machine 2 is caused to perform a normal machining operation related to the feed of each axis, the rotational position of the chuck, etc. (step S11). It is determined whether or not the tool selection command has been given, that is, whether or not the tool replacement work has been performed in the current processing cycle (step S12). If the tool exchange work is performed in the current processing cycle, the CPU shifts to the processing of step S13 and resets the prefetch prohibition flag F0.
In the example of FIG. 4, since the tool selection command is not attached to the execution target statement of sequence number R0 = “1”, the determination result of step S12 is false, and the CPU executes step S12.
The process of No. 13 is unexecuted, and the process proceeds to the process of step S14 to determine whether or not the execution target statement of sequence number R0 = "1" indicates the program end. As above, refer to the processing cycle 1 in FIG.

【0019】図4の例ではステップS14の判別結果も
偽となるので、CPUは再びステップS2の処理へと移
行して実行位置記憶指標R0の値を“1”インクリメン
トし、該指標R0の値“2”に基いてCMOSメモリ1
4の加工プログラムからシーケンス番号R0のステート
メントを読み込み、実行対象ステートメントとしてRA
M13に一時記憶する(ステップS3)。次いで、CP
Uは、先読み禁止フラグF0がセットされているか否か
を判別するが(ステップS4)、この場合、前回の処理
周期のステップS10の処理で先読み禁止フラグF0が
セットされているためステップS4の判別結果が真とな
って、ステップS5〜ステップS8の先読み処理とステ
ップS9の工具コードの出力に関する処理およびステッ
プS10の処理が非実行とされ、CPUはステップS1
1の処理へと移行する。そして、CPUはシーケンス番
号R0=“2”の実行対象ステートメントを実行してパ
ンチプレス機械2に各軸の送りやチャックの回転位置等
に関する通常の加工動作を行わせた後(ステップS1
1)、シーケンス番号R0=“2”の実行対象ステート
メントが工具選択指令を付されたものであったか否か、
即ち、今回の処理周期で工具交換作業が実施されたか否
かを判別する(ステップS12)。図4の例ではシーケ
ンス番号R0=“2”の実行対象ステートメントに工具
選択指令が付されていないからステップS12の判別結
果は偽となり、CPUはステップS13の処理を非実行
として先読み禁止フラグF0のセット状態を維持したま
まステップS14の処理へと移行し、シーケンス番号R
0=“2”の実行対象ステートメントがプログラムエン
ドを示すものであったか否かを判別するが、この場合ス
テップS14の判別結果も偽となるので、CPUは再び
ステップS2の処理へと移行することとなる。以上、図
5における処理周期2を参照。
In the example of FIG. 4, since the determination result of step S14 is also false, the CPU moves to the process of step S2 again and increments the value of the execution position storage index R0 by "1" to obtain the value of the index R0. CMOS memory 1 based on "2"
The statement with the sequence number R0 is read from the machining program of No. 4 and RA is executed as the statement to be executed.
It is temporarily stored in M13 (step S3). Then CP
U determines whether or not the prefetching prohibition flag F0 is set (step S4). In this case, since the prefetching prohibition flag F0 has been set in the processing of step S10 of the previous processing cycle, the determination of step S4 is made. When the result becomes true, the pre-reading process of steps S5 to S8, the process related to the output of the tool code of step S9, and the process of step S10 are not executed, and the CPU executes step S1.
The processing shifts to 1. Then, the CPU executes the statement to be executed with the sequence number R0 = “2” to cause the punch press machine 2 to perform a normal machining operation relating to the feed of each axis, the rotational position of the chuck, etc. (step S1
1), whether or not the execution target statement of sequence number R0 = "2" is the one to which the tool selection command is attached,
That is, it is determined whether or not the tool replacement work has been performed in the current processing cycle (step S12). In the example of FIG. 4, since the tool selection command is not attached to the execution target statement of the sequence number R0 = “2”, the determination result of step S12 is false, and the CPU deactivates the processing of step S13 and sets the prefetch prohibition flag F0. While the set state is maintained, the process proceeds to step S14 and the sequence number R
It is determined whether or not the execution target statement of 0 = “2” indicates the program end. In this case, the determination result of step S14 is also false, and therefore the CPU shifts to the processing of step S2 again. Become. As above, refer to the processing cycle 2 in FIG.

【0020】前回の処理周期においてステップS13の
処理が非実行とされた結果、今回の処理周期においても
先読み禁止フラグF0のセット状態がそのまま維持され
ているので、CPUは、以下、前回の処理周期と同様に
してインクリメントされた実行位置記憶指標R0の値
“3”に基いてCMOSメモリ14の加工プログラムか
らシーケンス番号R0のステートメントを読み込み、ス
テップS5〜ステップS8の先読み処理とステップS9
の工具コードの出力に関する処理およびステップS10
の処理を非実行として、ステップS11の処理でシーケ
ンス番号R0=“3”の実行対象ステートメントを実行
することとなるが、図4の例では、シーケンス番号R0
=“3”の実行対象ステートメントに工具選択指令が付
されているから、CPUは、このステートメントに書き
込まれた工具選択指令をPMC16およびI/Oユニッ
ト17を介して工具交換装置3に出力する(以上、ステ
ップS11)。すると、工具選択指令を受信した工具交
換装置3は第2のロボットアームを駆動してパンチプレ
ス機械2のチャックからこれまで使用していた穿孔工具
を回収してポットに収める動作を開始させると共に、パ
ンチプレス機械2のチャックから穿孔工具が回収された
ことを確認した段階で、工具交換位置にある第1のロボ
ットアームを直ちに駆動して工具コードAの穿孔工具を
パンチプレス機械2のチャックに取り付ける。工具コー
ドAの穿孔工具の取り出しおよび工具交換位置への移動
に関する指令は既に2周期前の処理周期で工具交換装置
3に出力されており、この段階では工具の取り出しおよ
び工具交換位置への移動が既に完了しているから、工具
交換装置3は工具交換位置にある工具コードAの穿孔工
具をパンチプレス機械2のチャックに直ちに取り付ける
ことができる。
As a result of the non-execution of the process of step S13 in the previous processing cycle, the set state of the readahead prohibition flag F0 is maintained as it is in the current processing cycle. The statement with the sequence number R0 is read from the machining program of the CMOS memory 14 based on the value "3" of the execution position storage index R0 that is incremented in the same manner as in step S5 to step S8 and the step S9.
Related to output of tool code of step S10
Is executed and the execution target statement of sequence number R0 = "3" is executed in the process of step S11. In the example of FIG.
Since the tool selection command is attached to the execution target statement of = “3”, the CPU outputs the tool selection command written in this statement to the tool changer 3 via the PMC 16 and the I / O unit 17 ( Above, step S11). Then, the tool exchanging device 3 that has received the tool selection command drives the second robot arm to start the operation of collecting the punching tool that has been used so far from the chuck of the punch press machine 2 and storing it in the pot. When it is confirmed that the punching tool is recovered from the chuck of the punch press machine 2, the first robot arm in the tool exchange position is immediately driven to attach the punching tool of the tool code A to the chuck of the punch press machine 2. . The command for taking out the drilling tool of the tool code A and moving it to the tool changing position has already been output to the tool changing device 3 in the processing cycle two cycles before, and at this stage, the tool taking out and the movement to the tool changing position are performed. Since it has already been completed, the tool changer 3 can immediately attach the drilling tool of the tool code A in the tool change position to the chuck of the punch press machine 2.

【0021】そして、工具交換装置3に工具選択指令を
出力したCPUは、シーケンス番号R0=“3”の実行
対象ステートメントが工具選択指令を付されたものであ
ったか否か、即ち、今回の処理周期で工具交換作業が実
施されたか否かを判別するが(ステップS12)、図4
の例ではシーケンス番号R0=“3”の実行対象ステー
トメントに工具選択指令が付されているのでステップS
12の判別結果は真となる。そこで、工具交換作業の実
施を確認したCPUは先読み禁止フラグF0をリセット
し(ステップS13)、シーケンス番号R0=“3”の
実行対象ステートメントがプログラムエンドを示すもの
であったか否かを判別するが、この場合ステップS14
の判別結果は偽となるので、CPUは再びステップS2
の処理へと移行することとなる。以上、図5における処
理周期3を参照。
Then, the CPU which has output the tool selection command to the tool changer 3 determines whether or not the execution target statement of the sequence number R0 = "3" has the tool selection command, that is, the current processing cycle. It is determined whether or not the tool replacement work has been performed (step S12).
In this example, since the tool selection command is attached to the execution target statement of sequence number R0 = “3”, step S
The determination result of 12 is true. Therefore, the CPU that has confirmed the execution of the tool change operation resets the prefetch prohibition flag F0 (step S13) and determines whether or not the execution target statement of sequence number R0 = "3" indicates the program end. In this case, step S14
Since the determination result of is false, the CPU again returns to step S2.
The processing will shift to. As above, refer to the processing cycle 3 in FIG.

【0022】ステップS2の処理へと移行したCPU
は、まず、実行位置記憶指標R0の値を“1”インクリ
メントした後、該指標R0の値“4”に基いてCMOS
メモリ14の加工プログラムからシーケンス番号R0の
ステートメントを読み込み、実行対象ステートメントと
してRAM13に一時記憶する(ステップS3)。次い
で、CPUは、先読み禁止フラグF0がセットされてい
るか否かを判別するが(ステップS4)、この場合、前
回の処理周期におけるステップS13の処理で先読み禁
止フラグF0がリセットされているため、ステップS4
の判別結果は偽となる。そこで、CPUは、先読み開始
位置記憶指標R1の値を“1”インクリメントし(ステ
ップS5)、該指標R1の値“4”に基いてCMOSメ
モリ14の加工プログラムからシーケンス番号R1のス
テートメントを先読みし、以下、先読み処理を繰り返し
実行して工具選択指令が付されたステートメントを検出
することとなる。図4の例ではシーケンス番号“7”の
ステートメントに工具選択指令が付されているので、先
読み開始位置記憶指標R1の値が“7”にインクリメン
トされた段階でステップS7の判別結果が真となる。
CPU that has moved to the processing of step S2
First, after incrementing the value of the execution position storage index R0 by “1”, the CMOS is calculated based on the value “4” of the index R0.
The statement with the sequence number R0 is read from the processing program in the memory 14 and temporarily stored in the RAM 13 as an execution target statement (step S3). Next, the CPU determines whether or not the prefetch prohibition flag F0 is set (step S4). In this case, since the prefetch prohibition flag F0 has been reset in the process of step S13 in the previous processing cycle, S4
The determination result of is false. Therefore, the CPU increments the value of the prefetch start position storage index R1 by "1" (step S5) and prefetches the statement of the sequence number R1 from the machining program of the CMOS memory 14 based on the value "4" of the index R1. Hereinafter, the prefetching process is repeatedly executed to detect the statement to which the tool selection command is added. In the example of FIG. 4, since the tool selection command is added to the statement with the sequence number “7”, the determination result of step S7 becomes true when the value of the prefetch start position storage index R1 is incremented to “7”. .

【0023】ステップS7からステップS9へと移行し
たCPUは、シーケンス番号R1=“7”の先読みステ
ートメントに書き込まれている工具コードの値、即ち、
図4の例では工具コードBの値をPMC16に出力して
工具交換装置3で必要な信号に変換した後、更に、I/
Oユニット17を介して工具交換装置3に出力する。す
ると、工具コードBを受信した工具交換装置3は第1の
ロボットアームを駆動して工具コードBの穿孔工具をポ
ットから取り出し、工具交換位置を最終目標位置として
第1のロボットアームの移動を開始させる。
The CPU that has proceeded from step S7 to step S9 has the value of the tool code written in the look-ahead statement of sequence number R1 = "7", that is,
In the example of FIG. 4, the value of the tool code B is output to the PMC 16 and converted into a necessary signal by the tool changer 3, and then the I / O
Output to the tool changing device 3 via the O unit 17. Then, the tool exchanging device 3 that has received the tool code B drives the first robot arm to take out the drilling tool of the tool code B from the pot, and starts the movement of the first robot arm with the tool exchanging position as the final target position. Let

【0024】また、工具交換装置3に工具コードの値を
出力したCPUは、先読み禁止フラグF0を直ちにセッ
トし(ステップS10)、シーケンス番号R0=“4”
の実行対象ステートメントを実行してパンチプレス機械
2に各軸の送りやチャックの回転位置等に関する通常の
加工動作を行わせた後(ステップS11)、シーケンス
番号R0=“4”の実行対象ステートメントが工具選択
指令を付されたものであったか否か、即ち、今回の処理
周期で工具交換作業が実施されたか否かを判別する(ス
テップS12)。図4の例ではシーケンス番号R0=
“4”の実行対象ステートメントに工具選択指令が付さ
れていないからステップS12の判別結果は偽となり、
CPUはステップS13の処理を非実行としてステップ
S14の処理へと移行し、シーケンス番号R0=“4”
の実行対象ステートメントがプログラムエンドを示すも
のであったか否かを判別することとなる。以上、図5に
おける処理周期4を参照。
The CPU which has output the value of the tool code to the tool changer 3 immediately sets the prefetch prohibition flag F0 (step S10), and the sequence number R0 = "4".
The execution target statement of sequence number R0 = "4" is executed after the punch press machine 2 is caused to perform a normal machining operation related to the feed of each axis, the rotational position of the chuck, etc. (step S11). It is determined whether or not the tool selection command has been given, that is, whether or not the tool replacement work has been performed in the current processing cycle (step S12). In the example of FIG. 4, the sequence number R0 =
Since the tool selection command is not attached to the execution target statement of "4", the determination result of step S12 is false,
The CPU does not execute the process of step S13 and moves to the process of step S14, and the sequence number R0 = "4".
It is determined whether or not the statement to be executed of indicates the program end. As above, refer to the processing cycle 4 in FIG.

【0025】図4の例ではステップS14の判別結果も
偽となるので、CPUは再びステップS2の処理へと移
行して実行位置記憶指標R0の値を“1”インクリメン
トし、該指標R0の値“5”に基いてCMOSメモリ1
4の加工プログラムからシーケンス番号R0のステート
メントを読み込み、実行対象ステートメントとしてRA
M13に一時記憶する(ステップS3)。次いで、CP
Uは、先読み禁止フラグF0がセットされているか否か
を判別するが(ステップS4)、この場合、前回の処理
周期のステップS10の処理で先読み禁止フラグF0が
セットされているためステップS4の判別結果が真とな
って、ステップS5〜ステップS8の先読み処理とステ
ップS9の工具コードの出力に関する処理およびステッ
プS10の処理が非実行とされ、CPUはステップS1
1の処理へと移行する。そして、CPUはシーケンス番
号R0=“5”の実行対象ステートメントを実行してパ
ンチプレス機械2に各軸の送りやチャックの回転位置等
に関する通常の加工動作を行わせた後(ステップS1
1)、シーケンス番号R0=“5”の実行対象ステート
メントが工具選択指令を付されたものであったか否か、
即ち、今回の処理周期で工具交換作業が実施されたか否
かを判別する(ステップS12)。図4の例ではシーケ
ンス番号R0=“5”の実行対象ステートメントに工具
選択指令が付されていないからステップS12の判別結
果は偽となり、CPUはステップS13の処理を非実行
としてステップS14の処理へと移行し、シーケンス番
号R0=“5”の実行対象ステートメントがプログラム
エンドを示すものであったか否かを判別することとな
る。以上、図5における処理周期5を参照。
In the example of FIG. 4, since the determination result of step S14 is also false, the CPU again shifts to the processing of step S2 and increments the value of the execution position storage index R0 by "1" to obtain the value of the index R0. CMOS memory 1 based on "5"
The statement with the sequence number R0 is read from the machining program of No. 4 and RA is executed as the statement to be executed.
It is temporarily stored in M13 (step S3). Then CP
U determines whether or not the prefetching prohibition flag F0 is set (step S4). In this case, since the prefetching prohibition flag F0 has been set in the processing of step S10 of the previous processing cycle, the determination of step S4 is made. When the result becomes true, the pre-reading process of steps S5 to S8, the process related to the output of the tool code of step S9, and the process of step S10 are not executed, and the CPU executes step S1.
The processing shifts to 1. Then, the CPU executes the statement to be executed with the sequence number R0 = “5” to cause the punch press machine 2 to perform a normal machining operation relating to the feed of each axis, the rotational position of the chuck, etc. (step S1
1), whether or not the execution target statement of the sequence number R0 = “5” has been given a tool selection command,
That is, it is determined whether or not the tool replacement work has been performed in the current processing cycle (step S12). In the example of FIG. 4, since the tool selection command is not attached to the execution target statement of sequence number R0 = “5”, the determination result of step S12 is false, and the CPU does not execute the processing of step S13 and proceeds to the processing of step S14. Then, it is determined whether or not the execution target statement having the sequence number R0 = “5” indicates the program end. As above, refer to the processing cycle 5 in FIG.

【0026】図4の例ではステップS14の判別結果も
偽となるので、CPUは再びステップS2の処理へと移
行して実行位置記憶指標R0の値を“1”インクリメン
トし、該指標R0の値“6”に基いて以下の処理を実行
するが、この場合も前記と同様に先読み禁止フラグF0
がセットされているからステップS4の判別結果は真と
なり、ステップS5〜ステップS8の先読み処理とステ
ップS9の工具コードの出力に関する処理およびステッ
プS10の処理が非実行とされ、CPUはステップS1
1の処理へと移行して、シーケンス番号R0=“6”の
実行対象ステートメントを実行してパンチプレス機械2
に各軸の送りやチャックの回転位置等に関する通常の加
工動作を行わせ、ステップS12およびステップS14
の判別処理を実行した後、再び、ステップS2の処理へ
と移行する。以上、図5における処理周期6を参照。
In the example of FIG. 4, since the determination result of step S14 is also false, the CPU moves to the process of step S2 again and increments the value of the execution position storage index R0 by "1" to obtain the value of the index R0. The following processing is executed based on "6", but in this case as well, the prefetch prohibition flag F0 is the same as above.
Is set, the determination result of step S4 becomes true, the prefetching process of steps S5 to S8, the process related to the output of the tool code of step S9, and the process of step S10 are not executed, and the CPU executes step S1.
Punch press machine 2 by executing the statement to be executed with sequence number R0 = "6"
To perform a normal machining operation regarding the feed of each axis, the rotation position of the chuck, and the like, and then perform steps S12 and S14.
After executing the determination process of No., the process again moves to step S2. As above, refer to the processing cycle 6 in FIG.

【0027】そして、ステップS2の処理で実行位置記
憶指標R0の値を“1”インクリメントしたCPUは、
該指標R0の値“7”に基いて以下の処理を実行する
が、この場合も前記と同様に先読み禁止フラグF0がセ
ットされているからステップS4の判別結果は真とな
り、ステップS5〜ステップS8の先読み処理とステッ
プS9の工具コードの出力に関する処理およびステップ
S10の処理が非実行とされ、CPUはステップS11
の処理へと移行してシーケンス番号R0=“7”の実行
対象ステートメントを実行することとなるが、図4の例
ではシーケンス番号R0=“7”の実行対象ステートメ
ントに工具選択指令が付されているから、CPUは、こ
のステートメントに書き込まれた工具選択指令をPMC
16およびI/Oユニット17を介して工具交換装置3
に出力する(以上、ステップS11)。すると、工具選
択指令を受信した工具交換装置3は第2のロボットアー
ムを駆動してパンチプレス機械2のチャックからこれま
で使用していた工具コードAの穿孔工具を回収してポッ
トに収める動作を開始させると共に、パンチプレス機械
2のチャックから穿孔工具が回収されたことを確認した
段階で、工具交換位置にある第1のロボットアームを直
ちに駆動して工具コードBの穿孔工具をパンチプレス機
械2のチャックに取り付ける。工具コードBの穿孔工具
の取り出しおよび工具交換位置への移動に関する指令は
既に3周期前の処理周期で工具交換装置3に出力されて
おり、この段階では工具の取り出しおよび工具交換位置
への移動が既に完了しているから、工具交換装置3は工
具交換位置にある工具コードBの穿孔工具をパンチプレ
ス機械2のチャックに直ちに取り付けることができる。
Then, the CPU that has incremented the value of the execution position storage index R0 by "1" in the process of step S2,
The following processing is executed based on the value "7" of the index R0. In this case as well, since the read-ahead prohibition flag F0 is set similarly to the above, the determination result of step S4 becomes true, and steps S5 to S8 are performed. The prefetching process of step S9, the process of outputting the tool code in step S9, and the process of step S10 are not executed, and the CPU executes step S11.
In the example of FIG. 4, a tool selection command is attached to the execution target statement of sequence number R0 = “7”, in which the execution target statement of sequence number R0 = “7” is executed. Therefore, the CPU sends the tool selection command written in this statement to the PMC.
Tool changer 3 via 16 and I / O unit 17
To the output (above, step S11). Then, the tool exchanging device 3 that has received the tool selection command drives the second robot arm to perform an operation of collecting the punching tool of the tool code A that has been used so far from the chuck of the punch press machine 2 and storing it in the pot. When the punching tool 2 is started and it is confirmed that the punching tool is recovered from the chuck of the punching press machine 2, the first robot arm in the tool changing position is immediately driven to move the punching tool of the tool code B to the punching press machine 2 Attach it to the chuck. The command for taking out the drilling tool of the tool code B and moving it to the tool changing position has already been output to the tool changing device 3 in the processing cycle three cycles before, and at this stage, the tool taking out and the movement to the tool changing position are performed. Since it has already been completed, the tool changing device 3 can immediately attach the drilling tool of the tool code B in the tool changing position to the chuck of the punch press machine 2.

【0028】そして、工具交換装置3に工具選択指令を
出力したCPUは、シーケンス番号R0=“7”の実行
対象ステートメントが工具選択指令を付されたものであ
ったか否か、即ち、今回の処理周期で工具交換作業が実
施されたか否かを判別するが(ステップS12)、図4
の例ではシーケンス番号R0=“7”の実行対象ステー
トメントに工具選択指令が付されているのでステップS
12の判別結果は真となる。そこで、工具交換作業の実
施を確認したCPUは先読み禁止フラグF0をリセット
し(ステップS13)、シーケンス番号R0=“7”の
実行対象ステートメントがプログラムエンドを示すもの
であったか否かを判別するが、この場合ステップS14
の判別結果は偽となるので、CPUは再びステップS2
の処理へと移行することとなる。以上、図5における処
理周期7を参照。
Then, the CPU that has output the tool selection command to the tool changer 3 determines whether or not the execution target statement having the sequence number R0 = "7" has the tool selection command, that is, the current processing cycle. It is determined whether or not the tool replacement work has been performed (step S12).
In this example, since the tool selection command is attached to the execution target statement of sequence number R0 = "7", step S
The determination result of 12 is true. Therefore, the CPU that confirms the execution of the tool exchange work resets the prefetch prohibition flag F0 (step S13), and determines whether or not the statement to be executed with the sequence number R0 = "7" indicates the program end. In this case, step S14
Since the determination result of is false, the CPU again returns to step S2.
The processing will shift to. As above, refer to the processing cycle 7 in FIG.

【0029】ステップS2の処理へと移行したCPU
は、まず、実行位置記憶指標R0の値を“1”インクリ
メントした後、該指標R0の値“8”に基いてCMOS
メモリ14の加工プログラムからシーケンス番号R0の
ステートメントを読み込み、実行対象ステートメントと
してRAM13に一時記憶する(ステップS3)。次い
で、CPUは、先読み禁止フラグF0がセットされてい
るか否かを判別するが(ステップS4)、この場合、前
回の処理周期におけるステップS13の処理で先読み禁
止フラグF0がリセットされているため、ステップS4
の判別結果は偽となる。そこで、CPUは、先読み開始
位置記憶指標R1の値を“1”インクリメントし(ステ
ップS5)、該指標R1の値“8”に基いてCMOSメ
モリ14の加工プログラムからシーケンス番号R1のス
テートメントを先読みし、以下、先読み処理を繰り返し
実行して工具選択指令が付されたステートメントを検出
することとなるが、図4の例ではシーケンス番号“7”
以降に工具選択指令を付されたステートメントが存在し
ないので、プログラムエンドまでの先読みが完了した時
点、即ち、先読み開始位置記憶指標R1の値が“n”に
達した時点でステップS8の判別結果が真となる。そこ
で、CPUはステップS10の処理に移行して先読み禁
止フラグF0をセットすることにより、これ以降の処理
でステップS5〜ステップS8の先読み処理が実行され
るのを禁止し、シーケンス番号R0=“8”の実行対象
ステートメントを実行してパンチプレス機械2に各軸の
送りやチャックの回転位置等に関する通常の加工動作を
行わせた後(ステップS11)、シーケンス番号R0=
“8”の実行対象ステートメントが工具選択指令を付さ
れたものであったか否か、即ち、今回の処理周期で工具
交換作業が実施されたか否かを判別する(ステップS1
2)。図4の例ではシーケンス番号R0=“8”の実行
対象ステートメントに工具選択指令が付されていないか
らステップS12の判別結果は偽となり、CPUはステ
ップS13の処理を非実行として先読み禁止フラグF0
のセット状態を維持したままステップS14の処理へと
移行し、シーケンス番号R0=“8”の実行対象ステー
トメントがプログラムエンドを示すものであったか否か
を判別するが、この場合ステップS14の判別結果も偽
となるので、CPUは再びステップS2の処理へと移行
することとなる。以上、図5における処理周期8を参
照。
CPU that has moved to the processing of step S2
First, after incrementing the value of the execution position storage index R0 by "1", the CMOS is calculated based on the value "8" of the index R0.
The statement with the sequence number R0 is read from the processing program in the memory 14 and temporarily stored in the RAM 13 as an execution target statement (step S3). Next, the CPU determines whether or not the prefetch prohibition flag F0 is set (step S4). In this case, since the prefetch prohibition flag F0 has been reset in the process of step S13 in the previous processing cycle, S4
The determination result of is false. Therefore, the CPU increments the value of the prefetch start position storage index R1 by "1" (step S5), and prefetches the statement of the sequence number R1 from the machining program of the CMOS memory 14 based on the value "8" of the index R1. In the following, the prefetch process is repeatedly executed to detect the statement to which the tool selection command is added. In the example of FIG. 4, the sequence number "7" is set.
Since there is no statement to which the tool selection command is attached thereafter, the determination result of step S8 is obtained when the prefetching up to the program end is completed, that is, when the value of the prefetching start position storage index R1 reaches “n”. Be true. Therefore, the CPU shifts to the process of step S10 and sets the prefetch prohibition flag F0 to prohibit the prefetch process of steps S5 to S8 from being executed in the subsequent process, and the sequence number R0 = “8”. After executing the statement to be executed of "" to cause the punch press machine 2 to perform a normal machining operation regarding the feed of each axis, the rotation position of the chuck, and the like (step S11), the sequence number R0 =
It is determined whether or not the execution target statement of "8" has been given a tool selection command, that is, whether or not the tool replacement work has been performed in the current processing cycle (step S1).
2). In the example of FIG. 4, since the tool selection command is not attached to the execution target statement of sequence number R0 = “8”, the determination result of step S12 is false, and the CPU deactivates the processing of step S13 and the prefetch prohibition flag F0.
While maintaining the set state of step S14, the process proceeds to step S14, and it is determined whether or not the execution target statement of sequence number R0 = "8" indicates the program end. In this case, the determination result of step S14 is also obtained. Since it is false, the CPU shifts to the process of step S2 again. As above, refer to the processing cycle 8 in FIG.

【0030】図4に示す例ではシーケンス番号“7”以
降に工具選択指令を付されたステートメントは存在しな
いから、実行位置記憶指標R0の値が一旦“8”以上に
なってしまえば、実行対象ステートメントをどこまで実
行しても先読み禁止フラグF0が再びリセットされるこ
とはない。従って、CPUは、以下、ステップS2〜ス
テップS4およびステップS11,ステップS12,ス
テップS14の処理のみを繰り返し実行し、前記ステッ
プS11の処理でシーケンス番号R0=“9”〜“n”
の工具交換に関わりのない各ステートメントを実行し、
最終的に、実行位置記憶指標R0の値が“n”となって
ステップS14の判別処理で全ての加工プログラムの実
行が確認された段階で再生モードの処理を終了する。以
上、図5における処理周期9〜nを参照。
In the example shown in FIG. 4, since there is no statement to which the tool selection command is given after the sequence number "7", once the value of the execution position storage index R0 becomes "8" or more, the execution target is executed. The prefetch prohibition flag F0 will not be reset again no matter how far the statement is executed. Therefore, hereinafter, the CPU repeatedly executes only the processes of steps S2 to S4 and steps S11, S12, and S14, and the sequence number R0 = “9” to “n” in the process of step S11.
Execute each statement that is not related to tool change of
Finally, when the value of the execution position storage index R0 becomes "n" and the execution of all the machining programs is confirmed in the determination processing in step S14, the processing in the reproduction mode ends. As above, refer to the processing cycles 9 to n in FIG.

【0031】以上に述べたように、本実施例の工具交換
方法では、加工開始時および工具交換が実行される毎に
ステップS5〜ステップS8の先読み処理を実行して次
に選択すべき穿孔工具の工具コードを工具交換装置3に
出力することにより選択対象となる穿孔工具の取り出し
および工具交換位置への移動を工具交換装置3によって
開始させると共に、工具の取り出しおよび工具交換位置
への移動が行われる間にもCNC装置1で加工プログラ
ムを実行し、工具選択指令が実行対象ステートメントと
して読み込まれた時点で直ちに工具交換を実施するよう
にしているので、従来のように工具選択指令を出力して
から穿孔工具の取り出しおよび工具交換位置への移動を
待ってから加工プログラムを再開する必要がなく、1加
工プログラム全体としての加工時間を大幅に節約するこ
とができる。
As described above, in the tool exchanging method of the present embodiment, the pre-reading process of steps S5 to S8 is executed at the start of machining and every time the tool exchanging is executed to select the next punching tool. By outputting the tool code of the tool code to the tool changing device 3, the picking tool to be selected and the movement to the tool changing position are started by the tool changing device 3, and the tool is taken out and moved to the tool changing position. The machining program is executed by the CNC device 1 even while the tool selection command is being read, and the tool change command is output immediately when the tool selection command is read as the statement to be executed. There is no need to restart the machining program after waiting for the drilling tool to be removed from the machine and moving to the tool change position. The processing time of and it is possible to save a lot.

【0032】なお、加工開始時における先読み処理で加
工プログラムの最後まで先読みを行っても工具選択指令
が付されたステートメントが読み込まれない場合、即
ち、第1回目の処理周期で先読み開始位置記憶指標R1
の値が“n”となってステップS8の判別結果が真とな
ることによりCMOSメモリ14に格納されている加工
プログラムが工具交換作業を必要としない加工プログラ
ムであることが確認された場合には、第1回目の処理周
期におけるステップS10の処理で先読み禁止フラグF
0がセットされ、以下、全ての加工プログラムの実行が
確認されるまでの間、この状態が保持される。この場
合、CPUは、無駄な先読み処理を禁止してステップS
2〜ステップS4およびステップS11,ステップS1
2,ステップS14の処理のみを繰り返し実行し、従来
と同様の加工制御を行うこととなる。また、図4に示さ
れるような加工プログラムの例で最後の工具交換作業が
実行された場合もこれと同様であり、次の処理周期で先
読み禁止フラグF0がセットされる結果、以降の処理周
期では無駄な先読み処理が全て禁止される。
When the statement with the tool selection command is not read even if prefetching is performed to the end of the machining program in the prefetching process at the time of machining start, that is, the prefetch start position storage index in the first processing cycle. R1
Is "n" and the result of the determination in step S8 is true, it is confirmed that the machining program stored in the CMOS memory 14 is a machining program that does not require tool replacement work. , The prefetch prohibition flag F in the processing of step S10 in the first processing cycle.
This state is maintained until 0 is set and the execution of all machining programs is confirmed thereafter. In this case, the CPU prohibits the useless prefetching process and executes step S
2 to step S4 and step S11, step S1
2, Only the processing of step S14 is repeatedly executed, and the same machining control as the conventional one is performed. This also applies to the case where the last tool exchange work is executed in the example of the machining program as shown in FIG. 4, and as a result of the prefetch prohibition flag F0 being set in the next processing cycle, the subsequent processing cycle. Then all useless prefetching is prohibited.

【0033】また、特殊な例として、シーケンス番号
“1”のステートメントに工具選択指令が付されていた
場合では、ステップS9の処理で工具コードが出力され
た後、同一処理周期内のステップS11の処理で工具交
換作業が行われることとなるが、この場合の交換動作は
従来と同様であって、工具コードで指定された穿孔工具
が工具交換位置まで移動するのを待って実施される。
As a special example, in the case where the tool selection command is attached to the statement of sequence number "1", after the tool code is output in the process of step S9, the process of step S11 in the same process cycle is performed. Although the tool exchanging work is performed in the process, the exchanging operation in this case is similar to the conventional one, and is performed after waiting for the drilling tool designated by the tool code to move to the tool exchanging position.

【0034】[0034]

【発明の効果】本発明の工具交換方法は、工作機械を制
御する制御装置が工具選択指令を先読みして工具コード
を出力することにより工具交換装置に工具交換のための
準備動作を開始させ、指定工具の取り出しおよび移動が
行われる間も制御装置により工作機械を駆動制御して加
工を実行するようにしたので、従来のように、工具選択
指令を出力してから穿孔工具の取り出しおよび工具交換
位置への移動を待ってから加工プログラムを再開する必
要がなく、工具の交換作業を必要とする1加工プログラ
ム全体の加工時間を大幅に節約することができる。
According to the tool changing method of the present invention, the control device for controlling a machine tool pre-reads a tool selection command and outputs a tool code to cause the tool changing device to start a preparatory operation for tool change, While the specified tool is being taken out and moved, the machine tool is controlled by the control device to execute machining.Therefore, as in the conventional case, the tool selection command is output and then the drilling tool is taken out and the tool is replaced. Since it is not necessary to restart the machining program after waiting for the movement to the position, it is possible to greatly save the machining time of the entire one machining program which requires the tool replacement work.

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

【図1】本発明の方法を適用したCNCパンチプレスシ
ステムの概略を示すブロック図である。
FIG. 1 is a block diagram showing an outline of a CNC punch press system to which a method of the present invention is applied.

【図2】同実施例における工具交換処理の概略を示すフ
ローチャートである。
FIG. 2 is a flowchart showing an outline of a tool changing process in the embodiment.

【図3】工具交換処理の概略を示すフローチャートの続
きである。
FIG. 3 is a continuation of the flowchart showing the outline of the tool changing process.

【図4】工具交換作業を含む加工プログラムの一例を概
念的に示す図である。
FIG. 4 is a diagram conceptually showing an example of a machining program including a tool changing operation.

【図5】工具交換処理の各処理周期と実行位置記憶指標
R0,先読み開始位置記憶指標R1(最終値),工具コ
ード出力の有無,実行対象ステートメントのシーケンス
番号,先読み禁止フラグF0のセット状態との関係を図
4の例に対応させて示す図である。
FIG. 5 shows each processing cycle of tool exchange processing, execution position storage index R0, prefetch start position storage index R1 (final value), presence / absence of tool code output, sequence number of statement to be executed, and set state of prefetch prohibition flag F0. FIG. 5 is a diagram showing the relationship of [1] corresponding to the example of FIG. 4.

【符号の説明】[Explanation of symbols]

1 CNC装置(工作機械を制御する制御装置) 2 パンチプレス機械(工作機械) 3 工具交換装置 11 プロセッサ(CPU) 14 CMOSメモリ 16 PMC(プログラマブル・マシン・コントロー
ラ) 17 I/Oユニット
1 CNC device (control device for controlling machine tool) 2 Punch press machine (machine tool) 3 Tool changer 11 Processor (CPU) 14 CMOS memory 16 PMC (programmable machine controller) 17 I / O unit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 加工プログラムに基いて工作機械を制御
する制御装置からの工具選択指令により工具交換装置を
駆動して工具の自動交換作業を行う工具交換方法におい
て、加工開始時および工具交換が実行される毎に、前記
制御装置は、工具選択指令が読み取られるまで加工プロ
グラムを先読みし、読み取られた工具選択指令の工具コ
ードを前記工具交換装置に出力した後、前記加工プログ
ラムを順次実行し、前記工具交換装置は、前記制御装置
から送られてきた工具コードを受信すると該工具コード
の工具を工具交換位置に移動させ、前記制御装置から工
具選択実行指令が入力されると工具の交換作業を行うよ
うにした工具交換方法。
1. In a tool changing method in which a tool changing device is driven by a tool selection command from a control device for controlling a machine tool based on a machining program to perform automatic tool changing work, the machining start and the tool change are executed. Each time, the control device pre-reads the machining program until the tool selection command is read, outputs the tool code of the read tool selection command to the tool changing device, and then sequentially executes the machining program, When the tool changer receives the tool code sent from the control device, it moves the tool of the tool code to the tool change position, and when a tool selection execution command is input from the control device, the tool change operation is performed. How to change the tool.
JP4184332A 1992-06-18 1992-06-18 Tool change method Expired - Fee Related JP2791733B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4184332A JP2791733B2 (en) 1992-06-18 1992-06-18 Tool change method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4184332A JP2791733B2 (en) 1992-06-18 1992-06-18 Tool change method

Publications (2)

Publication Number Publication Date
JPH06738A true JPH06738A (en) 1994-01-11
JP2791733B2 JP2791733B2 (en) 1998-08-27

Family

ID=16151463

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4184332A Expired - Fee Related JP2791733B2 (en) 1992-06-18 1992-06-18 Tool change method

Country Status (1)

Country Link
JP (1) JP2791733B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998015371A1 (en) * 1996-10-09 1998-04-16 Amada Company, Limited Machine tool control system
EP1652617A1 (en) 2004-10-29 2006-05-03 Fanuc Ltd Automatic tool changer
JP2012179668A (en) * 2011-02-28 2012-09-20 Brother Industries Ltd Machine tool and tool replacement method
CN104115079A (en) * 2012-02-06 2014-10-22 三菱电机株式会社 Numeric control device
JP2019079244A (en) * 2017-10-24 2019-05-23 ファナック株式会社 Numeric control device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04322935A (en) * 1991-04-24 1992-11-12 Makino Milling Mach Co Ltd Tool change control system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04322935A (en) * 1991-04-24 1992-11-12 Makino Milling Mach Co Ltd Tool change control system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998015371A1 (en) * 1996-10-09 1998-04-16 Amada Company, Limited Machine tool control system
EP1652617A1 (en) 2004-10-29 2006-05-03 Fanuc Ltd Automatic tool changer
JP2012179668A (en) * 2011-02-28 2012-09-20 Brother Industries Ltd Machine tool and tool replacement method
CN104115079A (en) * 2012-02-06 2014-10-22 三菱电机株式会社 Numeric control device
CN104115079B (en) * 2012-02-06 2015-12-23 三菱电机株式会社 Numerical control device
US9494928B2 (en) 2012-02-06 2016-11-15 Mitsubishi Electric Corporation Numerical control apparatus
JP2019079244A (en) * 2017-10-24 2019-05-23 ファナック株式会社 Numeric control device
US10809700B2 (en) 2017-10-24 2020-10-20 Fanuc Corporation Numerical controller

Also Published As

Publication number Publication date
JP2791733B2 (en) 1998-08-27

Similar Documents

Publication Publication Date Title
KR950000839B1 (en) Machine tool numerical controller with a trouble stop function
WO1990006544A1 (en) Method of correcting machining program
JPS62237504A (en) Numerical controller
WO1994017459A1 (en) Method of execution of nc machining program
JP2791733B2 (en) Tool change method
JPH11143514A (en) Numerical controller capable of executing working error check
JPH11143519A (en) Acceleration-deceleration control method for numerical control, and numerical controller
GB2083247A (en) A programmable machine
EP0962844B1 (en) Numerical control apparatus
EP1394642B1 (en) Multi-system numerical control device
JPH04122543A (en) Numerical control device and tool replacing position changing method
JP2675593B2 (en) Tool changer
JP2676512B2 (en) Program restart method
JP2880170B2 (en) Block overlap method
WO1992009018A1 (en) Method for executing auxiliary function in numerical control equipment
JP2852986B2 (en) Processing system
JPH0746287B2 (en) Numerical control device
JP3198010B2 (en) Control method and control device for machine tool
JP2829212B2 (en) Automatic tool change control method and device
JP3460781B2 (en) Numerical control unit
JP2702555B2 (en) Numerical control unit reordering method
JP2992163B2 (en) Numerical control method and device
JP2584225B2 (en) Numerical control unit
JPH0885044A (en) Working load monitoring system
JPH0697413B2 (en) Automatic program generator

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080619

Year of fee payment: 10

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 11

Free format text: PAYMENT UNTIL: 20090619

LAPS Cancellation because of no payment of annual fees