WO2002093278A1 - Appareil a commande numerique, procede d'execution du programme de commande numerique et programme de commande numerique - Google Patents

Appareil a commande numerique, procede d'execution du programme de commande numerique et programme de commande numerique Download PDF

Info

Publication number
WO2002093278A1
WO2002093278A1 PCT/JP2002/004258 JP0204258W WO02093278A1 WO 2002093278 A1 WO2002093278 A1 WO 2002093278A1 JP 0204258 W JP0204258 W JP 0204258W WO 02093278 A1 WO02093278 A1 WO 02093278A1
Authority
WO
WIPO (PCT)
Prior art keywords
numerical control
control program
conversion
program
identifier
Prior art date
Application number
PCT/JP2002/004258
Other languages
English (en)
French (fr)
Inventor
Takayasu Saitou
Tadashi Fujinawa
Original Assignee
Citizen Watch Co., Ltd.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Citizen Watch Co., Ltd. filed Critical Citizen Watch Co., Ltd.
Publication of WO2002093278A1 publication Critical patent/WO2002093278A1/ja

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/4155Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by programme execution, i.e. part programme or machine function execution, e.g. selection of a programme
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/36Nc in input of data, input key till input tape
    • G05B2219/36053Adapt, modify program in real time as function of workpiece configuration

Definitions

  • the present invention relates to a numerical control device, a method of executing a numerical control program, and a program therefor.
  • the present invention is used for a numerically controlled machine tool such as a numerically controlled lathe, and when performing machining of a workpiece, a numerically controlled device that controls the operation of each movable portion of the numerically controlled machine tool, and a method of executing a numerically controlled program. And its programs.
  • NC numerical control
  • An evening is prepared, and based on the data converted into the executable form, the operation of the movable parts such as the main shaft and the tool post of the machine tool is controlled.
  • to convert the contents of the NC program into data in an executable format means that the data contained in the NC program is converted into a machine language data such as a binary number in a form easily processed in the NC device of the machine tool.
  • Means to convert to As a method of executing such an NC program a sequential decoding / conversion processing method and a pre-decoding / conversion processing method are known.
  • the sequential decoding / conversion processing method refers to a method in which an NC program is read block by block from a storage medium such as a database, a flexible disk, a memory card, or a memory, and the operation is performed while performing decoding / conversion on the corresponding block.
  • step S110 one block of the NC program is read from the storage medium storing the NC program (step S111), and the block is decoded and converted (step S112). ). Then, based on the result of the decoding and conversion, an operation command for operating each movable section is output (step S113).
  • Step S115 it is determined whether or not to execute the next cycle. If the next cycle is to be executed, the process returns to Step S111 to read the first block of the NC program. If the next cycle is not to be executed, the machining is terminated (step S116).
  • the “pre-decoding” conversion processing method is a method in which the NC program is previously decoded and converted collectively, and the operation is performed by the NC program that has been decoded and converted.
  • FIG. Fig. 9 (a) shows the procedure of pre-decoding and conversion processing of the NC program, and (b) shows the processing procedure of the pre-decoding and conversion processing of the NC program.
  • step S210 With the start of the pre-decryption / conversion processing (step S210), one block of the NC program is read from the storage medium (step S211), and the decoding / conversion is performed on the block (step S212).
  • the decryption / conversion result is stored in a storage medium such as a memory (step S213). This operation is performed up to the last block of the NC program (step S214), and when the decoding / conversion of the last block is completed, the pre-decoding / conversion processing ends (step S215).
  • Step S 222 the decoded and converted NC program stored in a storage medium such as a memory is read block by block together with the start of processing (step S220), and the workpiece is processed while outputting an operation command based on the block.
  • Step S223 The process returns to Step S221 to read the next block. If the NC program is a program end command for the read block (step S223), it is determined whether or not to execute the next cycle (step S223).
  • step S225 If the next cycle is to be executed, the flow returns to step S221 to read the first block of the NC program. If the next cycle is not to be executed, the machining is terminated (step S225).
  • the sequential decoding / conversion processing method as shown in Fig. 8 is performed by reading the NC program one block at a time and performing the operation while performing decoding / conversion. If complex operations (interpolation) are included in the operation of the tool, decoding and conversion take time, and the operation may stop halfway. Therefore, there is a problem that a waste time is generated, the processing efficiency is reduced, and a cut-off mark is attached.
  • the pre-decoding-to-conversion processing method shown in Fig. 9 reads the NC program whose decoding-conversion has already been completed and performs the operation. Does not occur.
  • the pre-reading / conversion processing method is advantageous when the same machining is repeatedly performed on the same work.
  • the pre-decoding / conversion processing method only repeats one cycle of operation (the execution from the beginning to the end of the NC program is defined as one cycle). It does not decode or convert NC programs. Therefore, to rewrite a part of the NC program to change the predetermined operation or to add a new operation, the rewritten NC program must be decoded and converted again by the pre-decoding and conversion processing method. The problem is that there is no flexible response.
  • the present invention has been made in view of the above problems, and arbitrarily adds or changes a predetermined operation during a cycle while premised on pre-decoding and conversion processing which is excellent in that no dead time occurs. It is an object of the present invention to provide an NC device, a method for executing an NC program, and a program for the NC device, which can be flexibly handled. Disclosure of the invention
  • the invention described in claim 1 reads a numerical control program for processing a workpiece, and the numerical control program controls the operation of each movable part of the machine tool by the numerical control program.
  • a first storage means for storing the numerical control program and the numerical control program is read from the first storage means, and is used for processing the work before processing the work.
  • a decoding / conversion unit for decoding / conversion of the numerical control program, and the numerical control program A predetermined identifier previously attached to the numerical control program is searched from among the above, and when the identifier is found, the program part specified by the identifier is subjected to the decoding / conversion processing by the decoding / conversion unit.
  • the pre-decryption / conversion processing unit performs the pre-decryption / conversion of the numerical control program.
  • the search unit searches for a preset identifier from the numerical control program read from the first storage means, and if the identifier is found, the search unit is designated by the identifier. Pre-decryption and conversion of parts are not performed. For the part specified by the identifier, sequential decoding / conversion processing is performed when the numerical control program is executed for processing. In the part where this sequential decoding and conversion processing is performed, it is easy to change or add set values.
  • the invention described in claim 2 is a case where a second identifier for requesting re-decryption and conversion of the numerical control program is attached to a program part specified by the identifier, A second search unit that searches for the second identifier; and, when the second identifier is found by the second search unit, the numerical control program stored in the storage unit. And a re-decryption / conversion request unit for requesting re-decoding / conversion.
  • the re-decryption / conversion request unit performs a numerical control.
  • the numerical control program stored in the storage means may be sent to the pre-decryption / conversion processing means to perform pre-decryption / conversion.
  • the invention according to claim 4 is characterized in that the pre-decoding / conversion processing means performs pre-decoding / conversion processing in response to the re-decoding / conversion request during execution of the numerical control program, A numerical control program that has been pre-decoded and converted after the execution of the numerical control program is stored in the second storage means.
  • the invention described in claim 6 is a method for executing a numerical control program for controlling the operation of each movable portion of a machine tool and performing a work of a workpiece, etc., wherein the numerical control program is stored. Reading the numerical control program from the first storage means; searching the read numerical control program for an identifier previously assigned to the numerical control program; and, when the identifier is found, the identifier Excluding the program part specified by the above-mentioned decryption / conversion unit from being subjected to the decoding / conversion processing; and deciphering / conversion of the numerical control program excluding the program part excluded from the decoding / conversion processing.
  • Performing the decoding and conversion of the numerical control program including the program portion excluded from the decoding and conversion processing Reading the numerical control program from the second storage means, searching for the identifier from the numerical control program, and finding the identifier. And the step of decoding and converting the program part specified by the identifier, and the step of reading and converting the numerical control program or the decoded and converted program part read from the second storage means. And outputting an operation command to each movable part based on the information.
  • the program specified by the identifier When a second identifier for requesting re-decryption / conversion of the numerical control program is attached to the program portion, a step of searching for the second identifier; and Requesting re-decoding and conversion of the numerical control program stored in the storage means when the second identifier is found.
  • pre-decryption / conversion processing is performed in response to a request for re-decoding / conversion, and after execution of the numerical control program,
  • the decoded and converted numerical control program may be stored in the second storage means.
  • the invention according to claim 9 is a method for requesting re-decoding and conversion of the numerical control program after the execution of the numerical control program is completed.
  • the method of executing a numerical control program according to any one of claims 6 to 9 is a method for executing each step by introducing the program described in claim 10 into a numerical control device. Will be possible. BRIEF DESCRIPTION OF THE FIGURES
  • FIG. 1 is a block diagram of an NC device according to an embodiment of the present invention.
  • FIG. 2 is a diagram showing an example of an NC program executed by the NC device shown in FIG. 1 and showing a part thereof.
  • FIG. 3 is a flowchart for explaining pre-decryption / conversion processing according to the embodiment of the execution method of the present invention.
  • FIG. 4 is a flowchart for explaining a process when processing is performed according to the embodiment of the execution method of the present invention.
  • FIG. 5 is a view showing a first processing example of a workpiece by the NC apparatus or the execution method of the present invention.
  • FIG. 6 is a view showing a second processing example of a workpiece by the NC apparatus or the execution method of the present invention.
  • FIG. 7 is a view showing a third working example of a workpiece by the NC apparatus or the execution method of the present invention.
  • FIG. 8 is a flowchart for explaining a sequential decoding / conversion process according to a conventional example of the present invention.
  • FIG. 9 is a flowchart for explaining a procedure of a pre-decryption / conversion process according to a conventional example of the present invention.
  • FIG. 1 is a block diagram of an NC device according to an embodiment of the present invention
  • FIG. 2 is a diagram showing an example of an NC program executed by the NC device in FIG. 1 and showing a part thereof.
  • the NC device 1 includes a first memory 3 for storing various NC programs input by the NC program input unit 2 and the like, a pre-decoding and conversion processing unit 10 for performing pre-decoding and conversion processing, and a decoding and conversion.
  • the pre-decryption / conversion processing section 10 reads the predetermined NC program from the first memory 3 one block at a time.
  • a sequential decryption / conversion processing search unit 12 for searching whether or not an identifier for performing the process is included; a conversion unit 13 for converting the data included in each block into an executable data format;
  • a memory storage unit 14 for storing the NC program converted into the data in the execution format in the second memory 16.
  • the NC program execution unit 20 reads the NC program one block at a time from the second memory 16, and the NC program reading unit 21 reads out the one block from the second memory 16.
  • a sequential decoding / conversion processing search unit 22 for searching whether the identifier “*” is included, and a decoding / conversion for decoding / converting the processing program part P 2 when the identifier “*” is included
  • An operation command output unit 24 that outputs an operation command to a drive unit such as a motor based on the decoded and converted NC program, and whether or not a re-decoding and conversion request is required is determined.
  • a re-decryption / conversion request section 25 for outputting a re-decryption / conversion request to the memory 16.
  • One block of the NC program shown in FIG. 2 includes a machining program portion P1 for performing actual operations and a macro program portion P2 including a variable portion that can be arbitrarily changed.
  • Machining program part P 1 is the target of pre-decryption and conversion processing by pre-decryption and conversion processing unit 10, and the same operation is cycled without being added or changed during one cycle of operation It is a part that is repeated every time.
  • the macro program portion P2 is called by "* G65P20000" in the machining program portion P1 and is a portion to be subjected to sequential decoding and conversion processing. At the beginning and end of the macro program part P2, a predetermined start code "02000” and an end code “M99” are set, and the macro program part P2 is replaced with another part ( (Including the machining program part P1).
  • G65P20000 is a general command for calling the macro program portion P2, and is called out by adding an identifier "*" at the beginning thereof.
  • the macro program part P2 is defined to perform sequential decoding and conversion processing.
  • the identifier is not limited to the above-mentioned identifier “*” and may be another identifier, such as a tool post or a spindle. It may be an M code, a G code, a T code, or the like used for controlling the movable part of the vehicle.
  • the sequential decoding / conversion processing search section 12 of the pre-decoding / conversion processing section 10 searches one block of the read NC program to determine whether or not the identifier “*” is included. If it is included, the decoding / conversion unit 13 does not perform decoding / conversion on the macro program part P2 specified by “* G65P20000”, The other parts are decoded and converted by the decoding and conversion unit 13.
  • the macro program part P 2 that has not been converted is stored in the second memory 16 by the memory storage unit 14.
  • the NC program stored in the second memory 16 is read by the NC program reading unit 21 into the NC program execution unit 20 block by block.
  • the sequential decoding / conversion processing search unit 22 determines whether or not one block read from the second memory 16 includes the identifier “*”. If the identifier “*” is included, “the macro program part P 2 specified by“ * G65P2000J is sent to the decoding / conversion unit 23, and the decoding / conversion unit 23 performs decoding / conversion.
  • the timing of inputting this correction value is set according to the conditions of the preceding “IF” statement.
  • the identifier “M62” for the re-decryption / conversion request is set in the macro program part P2.
  • the information on the presence or absence of the identifier “M62” in one cycle and the contents of the change of the variable “# 2101” are sent from the decryption / conversion unit 23 to the first memory 3 and when one cycle is completed or immediately.
  • the re-decryption / conversion request is sent from the re-decryption / conversion request unit 25 to the pre-decryption / conversion processing unit 10.
  • the “re-decoding” conversion of the NC program is performed by re-reading the NC program in the first memory 3 into the pre-decoding and conversion unit 10.
  • an NC program to be used for machining is selected from the first memory 3, and a pre-decoding / conversion process is started for the NC program (step S10).
  • a pre-decoding / conversion process is started for the NC program (step S10).
  • one block of the NC program from the first memory 3 is stored in the NC device 1 (Step S11).
  • the pre-decryption / conversion unit 10 of the NC device 1 searches for whether or not a preset identifier “*” is included in this one block (step S12). As a result, if the identifier “*” is not included, the block is decrypted and converted (step S14), and the decrypted and converted NC program is stored in the second memory 16 (step S15). ).
  • the block is stored in the second memory 16 as it is.
  • step S16 The above processing is performed until the last block of the NC program stored in the second memory 16 is reached.
  • step S17 the pre-decryption / conversion processing ends (step S17).
  • step S 20 when the start switch is pressed to start machining of the workpiece (step S 20), the NC program execution unit 20 deletes one block of the NC program from the second memory 16. Read (step S21). The NC program execution unit 20 searches whether or not the identifier “*” is included in this one block (step S22). As a result, if the identifier “*” is not included, the operation command is output based on the pre-decoded and converted NC program (step S24). If the identifier "*" is included, decrypt and convert the block
  • Step S23 An operation command is output based on the result of the decoding and conversion (Step S24).
  • step S25 it is determined whether or not the block is the last block of the NC program. If not, the process returns to step S21 to read the next block. If it is the last block, it is determined whether a re-decryption / conversion request ("M62") exists during this cycle (step S26), and if a re-decryption / conversion request exists, the first memory Reread the NC program from step 3 and re-decode and convert (step S27). The contents of the change are decrypted and converted in advance. It is sent from the unit 23 to the first memory 3. If it is the last block, it is determined whether or not to perform machining repeatedly (step S28), and if not, the operation is terminated (step S29).
  • M62 re-decryption / conversion request
  • step S27 The re-decryption / conversion request in step S27 will be described more specifically using the program shown in FIG.
  • the variable # 2101 is, for example, the position of the cutting edge of the tool in consideration of tool wear when 100 products are produced.
  • FIG. 5 a specific machining example using the NC device 1 and the NC program execution method will be described with reference to FIGS. 5 to 7.
  • FIG. 5 a specific machining example using the NC device 1 and the NC program execution method will be described with reference to FIGS. 5 to 7.
  • the workpiece W is projected from the main shaft S by a predetermined length, and the tip portion is machined by the tool T to produce a predetermined number of the same products Wa.
  • a total of 500 products Wa are produced.
  • the next product collection box B is set to collect 50 products.
  • the identifiers "G510” and “G511” are added in advance to the NC program for machining the product Wa.
  • the identifier “510” is for starting the sequential decoding / conversion processing
  • “G 511” is for terminating the sequential decoding / conversion processing.
  • the portion designated by the identifiers “G510J, G511” is the portion (mac program portion) P2 that performs the sequential decoding and conversion processing.
  • the variables, such as the 100 and 50 numbers, are set in the macro program portion P2.
  • the pre-decryption / conversion processing unit 10 performs pre-decryption / conversion processing except for the macro program part P 2 specified by the identifiers “G510” and “G511”, and outputs the result to the It is stored in the second memory 16. In addition, since the pre-square reading and conversion were performed in advance for the production number of 500 products of Wa, the NC program was repeated 500 times (500 cycles), and 500 products of Wa were produced. You.
  • the macro program portion P 2 specified by the identifiers “G510” and “G511” is excluded from the subject of decryption and conversion by the pre-decryption / conversion processing unit 10 and the identifiers “G510” and “G5 1 1”
  • the variables of the macro program part P2 can be set freely.For example, the first move command is output when 100 units are produced, and the next move command is output when 150 units are produced. Is also possible.
  • an identifier (“M62”) for a re-decryption / conversion request is appropriately added to the pre-decryption / conversion processing unit 10 after the end of the cycle. It can be set to request re-decryption and conversion.
  • the machining example shown in Fig. 6 is a multi-cavity machining process that produces multiple (three in this example) products Wbl, Wb2, and Wb3 at a time in one cycle of the NC program.
  • each time one of the products Wbl, Wb2, and Wb3 is processed the remaining amount of the work W is checked to determine whether the next product can be processed.
  • the remaining amount of work W is determined after machining product Wb1, and the length required to process the next product Wb2 remains. Judge whether it is. And if there is enough length to process the next product Wb 2, Processing of the product Wb 2 is started, and if it is not, the production of the product Wb 2 is not performed. The same applies when processing of the product Wb3 is started.
  • this subprogram includes a pre-decryption / conversion processing part that repeats the same operation, and a serial processing decipher / conversion part that is distinguished from the pre-decryption / conversion processing part by the identifier “*”.
  • the sequential decoding / conversion processing part the remaining amount of the work W that changes every cycle is set as a variable.
  • the length of the products Wb1, Wb2, Wb3 obtained from the NC program is compared with the remaining amount of the work W, and the remaining amount of the work W is calculated from the length of the products Wb1, Wb2, Wb3.
  • the program is set to determine that the next product (for example, product Wb 2) will not be processed when the length of the workpiece W becomes shorter, and to replace the workpiece W.
  • a tool T 1100 ′ and a tool T 1100 ⁇ ⁇ ⁇ are prepared as spares for the tool T 1 100, and a tool T 2100 ′ and a tool T 2100 ⁇ are prepared as spares for the tool T 2100.
  • the macro program for determining the tool life is common to tool T1100 and tool T2100, as shown in FIG. 7 (b). Also in this processing example, the part performing pre-decryption / conversion and the part performing sequential decryption / conversion processing are distinguished by the identifier “*”.
  • the tool T 1100 and the tool T 2100 are subjected to sequential decoding and conversion processing, and the number of products produced is counted.
  • the tool T 1100 replacement command is issued from the macro program. Is output.
  • a replacement command for the tool T 2100 is output from the macro program when the number of tools T 2100 to be replaced is reached.
  • a portion where the same operation (processing or processing) is repeated is performed. Performs pre-decryption and conversion, and executes the NC program converted and decoded by the pre-decoding and conversion processing, and sequentially decodes and converts parts that add or change set values while executing the NC program. It is possible to flexibly respond to various operations such as replacement of the number and workpieces, inspection and replacement of tools.
  • a program for executing each step of the processing method of the present invention includes CD and
  • the present invention In addition to storage media such as FD and ROM, it can be read into the NC device via a communication line. Since the present invention is configured as described above, it is possible to combine a pre-execution method with less wasted time and a sequential decoding / conversion processing method in which setting values can be freely changed. For the part to be performed, the decryption / conversion is performed in advance by the pre-decryption / conversion method, and for the part where the setting may be changed, the sequential decryption / conversion processing can be performed. Therefore, it is possible to flexibly respond to the setting and change of various setting values, and to obtain an NC device that has the advantages of pre-decoding and conversion processing and the advantages of sequential decoding and conversion processing and has excellent machining efficiency. Can be. Industrial applicability
  • the present invention can be applied to any numerically controlled machine tool that processes a workpiece by executing a predetermined program, and is not limited to a lathe and a drilling machine, but is also applicable to a milling machine, a machining center, various types of processing machines, and various types of assembly machines. Is possible.

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Numerical Control (AREA)

Description

数値制御装置、 数値制御プログラムの実行方法及びそのプログラム 技術分野
本発明は、 数値制御旋盤等の数値制御工作機械に用いられ、 ワークの加工を行 う際に、 前記数値制御工作機械の各可動部の動作を制御する数値制御装置、 数値 制御プログラムの実行方法及びそのプログラムに関する。 背景技術
数値制御旋盤等の工作機械においては、 ワークを加工するための数値制御 (以 下、 N Cと略記することがある) プログラムの内容を解読 ·変換して、 パフレス分 配用の実行形式のデ一夕を用意し、 この実行形式に変換したデータに基づいて、 工作機械の主軸や刃物台等の可動部の動作を制御するようにしている。 ここで、 N Cプログラムの内容を実行形式のデー夕に変換するとは、 N Cプログラムに含 まれているデータを、 工作機械の N C装置の内部で処理しやすい形の 2進数等の 機械語デ一夕に変換することをいう。 そして、 このような N Cプログラムの実行 方法として、 逐次解読 ·変換処理方式と事前解読 ·変換処理方式とが知られてい る。
逐次解読 ·変換処理方式とは、 データベースやフレキシブルディスク、 メモリ カード、 メモリ等の記憶媒体から N Cプログラムを一ブロックずつ読み取り、 当 該ーブロックについて解読 ·変換を行いながら動作を行うものをいう。
第 8図のフローチャートに、 逐次解読 ·変換処理方式の処理を簡単に示す。 加工開始とともに (ステップ S 1 1 0 ) 、 N Cプログラムが記憶された記憶媒 体から N Cプログラムを一ブロック読み込み (ステップ S 1 1 1 ) 、 当該ブロッ クについて解読 ·変換を行う (ステップ S 1 1 2 ) 。 そして、 この解読 ·変換結 果に基づいて、 各可動部を動作させるための動作指令を出力する (ステップ S 1 1 3 ) 。
読み込んだプロッ
ステップ S 1 1 1に戻って次のブロックを読み込む。 (ステップ S I 14) 、 次のサイクルを実行するかどうかを判断し (ステップ S 115) 、 次のサイクルを実行するのであればステップ S 111に戻って NCプ ログラムの先頭のブロックを読み込む。 次のサイクルを実行しないのであれば、 加工を終了する (ステップ S 116) 。
また、 事前解読'変換処理方式とは、 予め NCプログラムを一括して解読'変 換しておき、 解読 '変換の終了した NCプログラムにより、 動作を行わせるもの をいう。
第 9図のフローチャートに、 事前解読 ·変換処理方式の処理を簡単に示す。 第 9図 (a) は NCプログラムの事前解読 ·変換処理の手順を示すもので、 (b) は事前解読 ·変換処理された NCプログラムによる加工の手順を示すもの である。
事前解読 ·変換処理の開始 (ステップ S 210) とともに、 記憶媒体から NC プログラムを一ブロック読み込み (ステップ S 211) 、 当該ブロックについて 解読 ·変換を行う (ステップ S 212) 。 解読'変換結果は、 メモリ等の記憶媒 体に記憶させる (ステップ S 213) 。 この作業を、 NCプログラムの最後のブ ロックまで行い (ステップ S 214) 、 最後のブロックについて解読 ·変換を終 了したところで、 事前解読 ·変換処理を終了する (ステップ S 215) 。
次いで、 メモリ等の記憶媒体に記憶された解読 ·変換済みの NCプログラムを、 加工開始 (ステップ S 220) とともに一ブロックずつ読み込み、 当該ブロック に基づいて動作指令を出力しながら、 ワークの加工を行う (ステップ S 222)
(ステップ S 223) 、 ステップ S 221に戻って次のブロックを読み込む。 読み込んだブロックに N Cプログラムがプログラムェンドコマンドであれば (ステップ S 223) 、 次のサイクルを実行するかどうかを判断し (ステップ S
224) 、 次のサイクルを実行するのであればステップ S 221に戻って NCプ 口グラムの先頭のプロックを読み込む。 次のサイクルを実行しないのであれば、 加工を終了する (ステップ S 225) 。
ところで、 第 8図に示したような逐次解読 ·変換処理方式は、 NCプログラム をーブロックずつ読み込んで解読 ·変換を行いながら動作を行うため、 一プロッ クの動作に複雑な加工 (補間) が含まれていると解読 ·変換に時間がかかり、 動 作が途中で停止するということがある。 そのため、 無駄時間が生じ、 加工効率が 低下し、 カツ夕一マークが付くという問題がある。
これに対し、 第 9図に示したような事前解読'変換処理方式は、 既に解読-変 換の終了した N Cプログラムを読み込んで動作を行うため、 逐次解読 ·変換処理 方式で生じるような無駄時間は生じないという利点がある。 事前 読 ·変換処理 方式は、 同一のワークに対して同一の加工を繰り返し行う場合に有利である。 しかしながら、 事前解読 ·変換処理方式は、 一サイクル (N Cプログラムの先 頭から終端までの実行を一サイクルとする) の動作を繰り返し実行するのみであ り、 一サイクルの動作を開始すると、 その間に N Cプログラムの解読,変換を行 うことはない。 そのため、 N Cプログラムの一部を書き換えて所定の動作を変更 したり、 新たな動作を追加したりするには、 書き換えた N Cプログラムを再び事 前解読 ·変換処理方式によって解読 ·変換しなければならず、 柔軟な対応ができ ないという問題がある。
したがって、 例えば、 ワークの総生産個数を 5 0 0個に設定し、 一ロットごと の取り個数を 1 0 0個に設定して解読 ·変換を行ってしまうと、 一口ットの取り 個数を途中で 5 0個や 3 0偭などの任意の数に変更することは困難である。 本発明は上記の問題にかんがみてなされたもので、 無駄時間が発生しないとい う点で優れる事前解読 ·変換処理を前提としながら、 所定の動作をサイクル中に 任意に追加したり変更したりすることができる、 柔軟な対応が可能な N C装置、 N Cプロダラムの実行方法及びそのプログラムを提供することを目的とする。 発明の開示
上記の目的を達成するために請求の範囲第 1項に記載の発明は、 ワークの加工 を行うための数値制御プログラムを読み込み、 この数値制御プログラムによって 工作機械の各可動部の動作を制御する数値制御装置において、 前記数値制御プロ グラムを記憶する第一の記憶手段と、 この第一の記憶手段から前記数値制御プ口 グラムを読み込み、 前記ワークの加工を行う前に、 当該ワークの加工のための数 値制御プログラムの解読 ·変換を行う解読 ·変換部と、 前記数値制御プログラム の中から予め前記数値制御プログラムに付された所定の識別子を検索し、 前記識 別子が発見されたときに、 当該識別子で指定されたプログラム部分を前記解読 · 変換部による解読 ·変換処理の対象から除外する検索部とを有する事前解読 ·変 換処理手段と、 前記解読 ·変換処理の対象から除外された前記プログラム部分を 含めて、 前記事前解読 ·変換処理手段で解読 ·変換された数値制御プログラムを 記憶する第二の記憶手段と、 前記ワークの加工を行う際に、 前記第二の記憶手段 から読み出した前記数値制御プログラムの中から前記識別子を検索する検索部と、 この検索部で前記識別子が発見されたときに、 当該識別子で指定されたプロダラ ム部分の解読 ·変換を行う解読 ·変換部と、 解読 ·変換された数値制御プロダラ ムに基づいて各可動部に動作指令を出力する動作指令出力部とを有する数値制御 プログラム実行手段とを備える構成としてある。
上記構成の数値制御装置では、 事前解読 ·変換処理部が数値制御プログラムの 事前解読 '変換を行う。 この場合、 第一の記憶手段から読み込まれた数値制御プ ログラムの中から、 検索部が、 予め設定された識別子を検索し、 当該識別子が発 見された場合には、 当該識別子によって指定された部分の事前解読 ·変換は行わ ない。 識別子で指定された部分については、 加工のために数値制御プログラムを 実行する際に、 逐次解読 ·変換処理を行う。 この逐次解読 ·変換処理を行う部分 では、 設定値を変更したり追加することが容易に行える。
したがって、 本発明では、 事前解読 ·変換処理の長所と逐次解読'変換処理の 長所とを併せ持つ数値制御装置を得ることができる。
請求の範囲第 2項に記載の発明は、 前記識別子で指定されたプログラム部分に、 前記数値制御プログラムの再解読 ·変換を要求するための第二の識別子が付され ている場合であって、 この第二の識別子の検索を行う第二の検索部と、 この第二 の検索部によつて前記第二の識別子が発見されたときに、 前記記憶手段に記憶さ れた前記数値制御プログラムの再解読 ·変換の要求を行う再解読 ·変換要求部と をさらに備える構成としてある。
この構成によれば、 設定値の追加や変更によって数値制御プログラムのパスが 変化するような場合であっても、 前記数値制御プログラムについて再解読 ·変換 を行い、 以後の数値制御プログラムの実行を正常に継続することができる。
請求の範囲第 3項に記載するように、 前記再解読 ·変換要求部によつて数値制 御プログラムの再解読 ·変換が要求されたときには、 前記記憶手段に記憶されて いる前記数値制御プログラムを前記事前解読 ·変換処理手段に送って事前解読 · 変換を行うようにするとよい。
請求の範囲第 4項に記載の発明は、 前記事前解読 ·変換処理手段は、 前記数値 制御プログラムの実行中に、 前記再解読 ·変換の要求に応じて事前解読 ·変換処 理を行い、 前記数値制御プログラムの実行後に事前解読 ·変換処理された数値制 御プログラムを前記第二の記憶手段に格納する構成としてある。
また、 請求の範囲第 5項に記載するように、 前記数値制御プログラムの実行終 了後に、 前記数値制御プログラムの再解読 ·変換を要求するようにすることも可 能である。 本発明の目的は、 請求の範囲第 6項から第 9項に記載の実行方法によっても達 成が可能である。
すなわち、 請求の範囲第 6項に記載の発明は、 工作機械の各可動部の動作を制 御してワークの加工等を行うための数値制御プログラムの実行方法において、 数 値制御プログラムを記憶する第一の記憶手段から数値制御プログラムを読み込む ステップと、 読み込んだ数値制御プログラムの中から予め数値制御プログラムに 付された識別子を検索するステップと、 前記識別子が発見されたときに、 当該識 別子で指定されたプログラム部分を前記解読 ·変換部による解読 ·変換処理の対 象から除外するステップと、 解読 ·変換処理の対象から除外されたプログラム部 分を除いて数値制御プログラムの解読 ·変換を行うステップと、 前記解読 ·変換 処理の対象から除外された前記プログラム部分を含めて、 解読 ·変換された数値 制御プログラムを第二の記憶手段に記憶するステツプと、 前記第二の記憶手段か ら前記数値制御プログラムを読み込み、 この数値制御プログラムの中から前記識 別子を検索するステップと、 前記識別子が発見されたときに、 当該識別子で指定 されたプログラム部分の解読 ·変換を行うステツプと、 前記第二の記憶手段から 読み込まれた解読 ·変換済みの数値制御プログラム又は解読 ·変換された前記プ ログラム部分に基づいて、 各可動部に動作指令を出力するステップとを有する方 法としてある。
また、 請求の範囲第 7項に記載に記載するように、 前記識別子で指定されたプ ログラム部分に、 前記数値制御プログラムの再解読 ·変換を要求するための第二 の識別子が付されている場合には、 この第二の識別子の検索を行うステップと、 この検索によつて前記第二の識別子が発見されたときに、 前記記憶手段に記憶さ れた前記数値制御プログラムの再解読 ·変換の要求を行うステップとを有するよ うにしてもよい。 請求の範囲第 8項に記載の発明のように、 前記数値制御プログ ラムの実行中に、 再解読 '変換の要求に応じて事前解読 ·変換処理を行い、 前記 数値制御プログラムの実行終了後に事前解読 ·変換処理された数値制御プロダラ ムを前記第二の記憶手段に格納するようにしてもよい。
さらに、 請求の範囲第 9項に記載の発明は、 前記数値制御プログラムの実行終 了後に、 前記数値制御プログラムの再解読 ·変換を要求する方法である。
請求の範囲第 6項〜第 9項のいずれかに記載の数値制御プログラムの実行方法 は、 請求の範囲第 1 0項に記載のプログラムを数値制御装置に導入することで、 各ステツプの実行が可能になる。 図面の簡単な説明
第 1図は、 本発明の一実施形態にかかる N C装置のプロック図である。
第 2図は、 第 1図の N C装置で処理が行われる N Cプログラムの一例にかかり、 その一部分を示す図である。
第 3図は、 本発明の実行方法の実施形態にかかり、 事前解読 ·変換の処理を説 明するためのフローチャートである。
第 4図は、 本発明の実行方法の実施形態にかかり、 加工を行う際の処理を説明 するためのフローチャートである。
第 5図は、 本発明の N C装置又は実行方法によるワークの第一の加工例を示す 図である。
第 6図は、 本発明の N C装置又は実行方法によるワークの第二の加工例を示す 図である。
第 7図は、 本発明の N C装置又は実行方法によるワークの第三の加工例を示す 図である。
第 8図は、 本発明の従来例にかかり、 逐次解読'変換処理の処理の手順を説明 するためのフローチャートである。 第 9図は、 本発明の従来例にかかり、 事前解読 ·変換処理の手順を説明するた めのフローチヤ一卜である。 発明を実施するための最良の形態
以下、 本発明の好適な実施形態を、 図面を参照しながら詳細に説明する。
[N C装置の実施形態]
まず、 第 1図及び第 2図を参照しながら、 本発明の N C装置の実施形態を説明 する。
第 1図は、 本発明の一実施形態にかかる N C装置のブロック図、 第 2図は、 第 1図の N C装置で処理が行われる N Cプログラムの一例にかかり、 その一部分を 示す図である。
N C装置 1は、 N Cプログラム入力部 2等によって入力された各種の N Cプロ グラムを記憶する第一のメモリ 3と、 事前解読 ·変換処理を行う事前解読 ·変換 処理部 1 0と、 解読 ·変換処理を終えた N Cプログラムを記憶する第二のメモリ 1 6と、 この第二のメモリ 1 6から N Cプログラムを読み出し、 N Cプログラム にしたがって刃物台や主軸等を実際に動作させる N Cプログラム実行部 2 0とを 有している。
事前解読 ·変換処理部 1 0は、 第一のメモリ 3から、 所定の N Cプログラムを、 一プロックずつ読み込む N Cプログラム読み込み部 1 1と、 読み込んだ前記ーブ ロックの中に、 逐次解読 ·変換処理を行うための識別子が含まれているかどうか を検索する逐次解読 ·変換処理検索部 1 2と、 各プロックに含まれているデータ を、 実行形式のデ一夕に変換する変換部 1 3と、 前記実行形式のデータに変換さ れた N Cプログラムを第二のメモリ 1 6に記憶するメモリ格納部 1 4とを有して いる。
N Cプログラム実行部 2 0は、 第二のメモリ 1 6から N Cプログラムを一プロ ックずつ読み込む N Cプログラム読み込み部 2 1と、 読み込んだ前記一ブロック の中に、 逐次解読'変換処理を行うための識別子 「*」 が含まれているかどうか を検索する逐次解読'変換処理検索部 2 2と、 識別子 「*」 が含まれている場合 には、 加工プログラム部分 P 2の解読 ·変換を行う解読 ·変換部 2 3と、 この解 読 ·変換部 2 3で解読 ·変換された N Cプログラム又は第二のメモリ 1 6に記憶 された解読 ·変換済みの N Cプログラムに基づいてモータ等の駆動部に動作指令 を出力する動作指令出力部 2 4と、 再解読 ·変換要求を行う必要があるかどうか を判断して、 第二のメモリ 1 6に対して再解読 ·変換要求を出力する再解読 ·変 換要求部 2 5とを有している。
第 2図に示す N Cプログラムの一プロックには、 実際の動作を行う加工プログ ラム部分 P 1と、 任意に変更が可能な変数部分を含むマクロプログラム部分 P 2 とが含まれている。
加工プログラム部分 P 1は、 事前解読 ·変換処理部 1 0による事前解読 ·変換 処理の対象となる部分で、 一サイクルの動作中に追加や変更が行われることがな く、 同一の動作をサイクルごとに繰り返し行わせる部分である。
マクロプログラム部分 P 2は、 加工プログラム部分 P 1の中の 「* G 6 5 P 2 0 0 0」 によって呼び出されるもので、 逐次解読 ·変換処理の対象となる部分で ある。 このマクロプログラム部分 P 2の最初と最後には、 予め定められた開始コ ード 「0 2 0 0 0」 と終了コード 「M 9 9」 が設定され、 マクロプログラム部分 P 2を他の部分 (加工プログラム部分 P 1を含む) から識別している。
なお、 前記した 「G 6 5 P 2 0 0 0」 は、 マクロプログラム部分 P 2の呼び出 しを行う一般的なコマンドであるが、 その先頭に識別子 「*」 を付すことで、 呼 び出すマクロプログラム部分 P 2については逐次解読 ·変換処理を行うように定 義している。
もちろん、 逐次解読 ·変換処理を行うプログラム部分を他のプログラム部分か ら識別することができるのであれば、 上記した識別子 「*」 に限らず他の識別子 であってもよく、 刃物台や主軸等の可動部の制御に用いられる Mコードや Gコ一 ド、 Tコード等であってもよい。
したがって、 事前解読 ·変換処理部 1 0の逐次解読 ·変換処理検索部 1 2は、 読み込まれた N Cプログラムの一ブロックの中を検索して、 識別子 「*」 が含ま れているか否かを判断し、 含まれている場合には、 「* G 6 5 P 2 0 0 0」 によ つて指定されたマクロプログラム部分 P 2については解読 ·変換部 1 3で解読 · 変換を行わないようにし、 それ以外の部分について解読 ·変換部 1 3で解読 ·変 換を行うようにする。
解読 ·変換部 1 3で解読 ·変換が行われた加工プログラム部分 P 1及び解読 · 変換を行わなかったマクロプログラム部分 P 2は、 メモリ格納部 14によって、 第二のメモリ 16に記憶される。
第二のメモリ 16に記憶された NCプログラムは、 NCプログラム読み込み部 21がーブロックずつ NCプログラム実行部 20に読み込む。 逐次解読 ·変換処 理検索部 22は、 第二のメモリ 16から読み込んだ一ブロックの中に識別子 「*」 が含まれているかどうかを判断する。 そして、 識別子 「*」 が含まれてい る場合には、 「*G65P2000J で指定されるマクロプログラム部分 P 2を 解読 ·変換部 23に送り、 解読 ·変換部 23で解読 ·変換を行う。
なお、 第 2図に示すマクロプログラム部分 P 2には、 加工プログラム部分 P 1 の部分のパスが変化するような補正値の入力を、 「#2101=#2101+ 0. 01」 で行っている。 この補正値の入力のタイミングは、 前段の 「I F」 文の条 件によって設定される。 第 2図で示す場合は、 「#1=# 1+ 1」 でカウントさ れている製品の生産個数が 100個になったときに、 変数 「#2101」 の変更 を行うようにしている。 このような補正があった場合には、 補正後の内容につい て加工プログラム部分 P 1の再解読 ·変換を行う必要がある。 そのため、 第 2図 に示すブロックでは、 再解読'変換要求のための識別子 「M62」 を、 マクロプ ログラム部分 P 2に設定している。
一サイクル中の識別子 「M62」 の有無に関する情報及び変数 「#2101」 の変更の内容は、 解読'変換部 23から第一のメモリ 3に送られるとともに、 一 サイクルが終了したときに、 又は即時、 再解読'変換要求が、 再解読 ·変換要求 部 25から事前解読 ·変換処理部 10に送られる。
NCプログラムの再解読'変換は、 第一のメモリ 3内の NCプログラムを、 事 前解読 ·変換部 10に再読み込みすることによって行う。
次に、 第 3図及び第 4図を参照しながら、 本発明の NCプログラムの実行方法 を説明する。
なお、 以下の説明では、 第 1図に示した NC装置及び第 2図に示した NCプロ グラムのブロックを適宜参照するものとする。
まず、 加工に使用する NCプログラムを第一のメモリ 3の中から選択し、 当該 NCプログラムについて事前解読'変換処理を開始する (ステップ S 10) 。 こ れにより、 第一のメモリ 3の中から、 NCプログラムの一ブロックが NC装置 1 に読み込まれる (ステップ S 11) 。
NC装置 1の事前解読'変換部 10は、 この一ブロックの中に、 予め設定され た識別子 「*」 が含まれているかどうかを検索する (ステップ S 12) 。 その結 果、 識別子 「*」 が含まれていなければ、 当該ブロックについて解読 ·変換を行 い (ステップ S 14) 、 解読'変換された NCプログラムを第二のメモリ 16に 記憶する (ステップ S 15) 。
識別子 「*」 が含まれていれば、 マクロプログラム内の各ブロック 「# 1=# 1 + 1」 · · · 「M99」 の先頭に識別子 「*」 を付け、 逐次解読'変換処理を 行うためのコマンドに変換する (ステップ S 13)
そして、 「*G65P2000」 で指定されたマクロプログラム部分 P 2の各 ブロックの解読 ·変換を行うことなく、 そのまま第二のメ'モリ 16に記憶する
(ステップ S 15) 。
以上の処理は、 第二のメモリ 16に記憶された NCプログラムの最終ブロック に達するまで行う (ステップ S 16) 。
以上で、 事前解読 ·変換処理を終了する (ステップ S 17) 。
第 4図に示すように、 ワークの加工を開始するために、 スタートスィッチを押 すと (ステップ S 20) 、 NCプログラム実行部 20が、 第二のメモリ 16の中 から NCプログラムの一ブロックを読み込む (ステップ S 21) 。 NCプロダラ ム実行部 20は、 この一ブロックの中に、 識別子 「*」 が含まれているかどうか を検索する (ステップ S 22) 。 その結果、 識別子 「*」 が含まれていなければ、 事前解読 ·変換済みの NCプログラムに基づいて動作指令出力を行う (ステップ S 24) 。 識別子 「*」 が含まれていれば、 そのブロックの解読 ·変換を行い
(ステップ S 23) 、 解読 ·変換結果に基づいて動作指令出力を行う (ステップ S 24) 。
その後、 当該ブロックが N Cプログラムの最終ブロックであるかどうかを判断 し (ステップ S 25) 、 最終ブロックでなければステップ S 21に戻って次のブ ロックを読み込む。 最終プロックであれば、 このサイクル中に再解読 ·変換要求 ( 「M62」 ) が存在したかどうかを判断し (ステップ S 26) 、 再解読 '変換 要求が存在する場合には、 第一のメモリ 3から NCプログラムを再読み込みして、 再解読 ·変換を行う (ステップ S 27) 。 なお、 変更の内容は、 予め解読 ·変換 部 23から第一のメモリ 3に送られている。 また、 最終ブロックであれば、 繰り 返して加工を行うかどうかを判断し (ステップ S 28) 、 行わないのであれば運 転を終了する (ステップ S 29) 。
なお、 N Cプログラムの実行中に再解読 ·変換要求を事前解読 ·変換処理部 1 0に送り、 再解読変換をバックグラウンドで行うことも可能である。
ステップ S 27の再解読 ·変換要求を、 第 2図のプログラムを用いてやや具体 的に説明する。 マクロプログラム部分 P 2の I F文で設定された条件になったと き、 すなわち、 製品の生産個数が 100個に達したときに、 変数 # 2101を # 2101 + 0. 01に置き換え、 # 1=0としてカウン夕をリセットして、 識別 子 「M62」 で再解読 ·変換要求を指令する。 なお、 ここで、 変数 # 2101は、 例えば、 製品を 100個生産したときの工具磨耗を考慮した工具の刃先位置であ る。
[加工例の説明 第一の加工例]
次に、 第 5図〜第 7図を参照しながら、 上記 NC装置 1及び NCプログラムの 実行方法を用いた具体的な加工例について説明する。
第 5図に示す加工例では、 主軸 Sからワーク Wを所定長さ突出させ、 その先端 部分を工具 Tで加工して、 同一の製品 Waを予め設定された個数生産するものと する。 この例では、 製品 Waは全部で 500個生産するものとして説明する。 ま た、 生産の途中で、 製品回収箱 Aに 100個の製品を回収した後、 次の製品回収 箱 Bには 50個の製品を回収するように設定するものとする。
第 5図 (b) に示すように、 この加工例では、 製品 Waを加工するための NC プログラムに、 予め識別子 「G510」 , 「G511」 が付されている。 識別子 「510」 は逐次解読 ·変換処理の開始のためのもので、 「G 511」 は逐次解 読 '変換処理の終了のためのものである。 そして、 この識別子 「G510J , 「G511」 によって指定される部分が、 逐次解読 ·変換処理を行う部分 (マク 口プログラム部分) P2である。 変数である前記 100個、 50個等の数字は、 このマクロプログラム部分 P 2内で設定される。
事前解読 ·変換処理部 10は、 識別子 「G510」 , 「G511」 で指定され たマクロプログラム部分 P 2を除いて事前解読 ·変換処理を行い、 その結果を第 二のメモリ 16に記憶する。 なお、 製品 W aの生産個数 500個についても、 予 め事前角読 ·変換が行われているため、 NCプログラムが 500回 (500サイ クル) 繰り返えされて、 製品 Waが 500個生産される。
識別子 「G510」 , 「G511」 によって指定されたマクロプログラム部分 P 2については、 事前解読 ·変換処理部 10での解読 ·変換の対象から除外され、 識別子 「G 510」 , 「G 5 1 1」 間の各ブロック 「# 100 = # 100 + 1」 · · · 「M62」 の先頭に識別子 「*」 を付けて、 第二のメモリ 16に記憶 される。
マクロプログラム部分 P 2には、 製品 W aの生産個数をカウントする指令と、 そのカウント数が最初の設定数の 100 (個) になったときに、 Z 2軸を 70m m移動させて製品回収箱 Aを交換するように出力する移動指令が含まれている。 さらに、 100個生産した後に、 次の設定値である 50 (個) を新たに設定する ようにしている。
なお、 マクロプログラム部分 P 2の変数の設定は自由で、 例えば、 100個生 産したときに最初の移動指令を出力し、 150個生産したときに次の移動指令を 出力するように設定することも可能である。
また、 このマクロプログラム部分 P 2においても、 必要があるときは、 適宜に 再解読 ·変換要求のための識別子 ( 「M62」 ) を付し、 サイクル終了後に事前 解読 ·変換処理部 10に対して再解読 ·変換要求をするように設定することがで さる。
[第二の加工例]
第 6図に示す加工例は、 NCプログラムの一サイクルで、 一度に複数個 (この 例では 3個) の製品 Wb l, Wb 2, Wb 3を生産する多数個取り加工の場合で ある。
この加工例では、 製品 Wb l, Wb 2, Wb 3のうちの一つを加工するごとに、 ワーク Wの残量を確認し、 次の製品が加工できるかどうかを判断する。 製品 Wb 1, Wb 2, Wb 3をこの順で生産する場合には、 製品 Wb 1の加工後にワーク Wの残量を求め、 次の製品 Wb 2の加工を行うのに必要な長さが残っているかど うかを判断する。 そして、 次の製品 Wb 2の加工を行うのに必要な長さがあれば、 製品 Wb 2の加工を開始し、 無ければ、 製品 Wb 2の生産は行わない。 製品 Wb 3の加工を開始する際についても同様である。
この加工例では、 第 6図 (b) に示すように、 M98 P 1000でサブプログ ラムの指定個所に移行し、 このサブプログラムの中で、 ワーク Wの加工指令とヮ ーク Wの残量確認とを行うようにしている。 したがって、 このサブプログラムは、 同一動作を繰り返し行う事前解読 ·変換処理部分と、 識別子 「*」 によって事前 解読 ·変換処理部分とは区別された逐時処理解読 ·変換部分とを含んでいる。 逐次解読 ·変換処理部分には、 変数として一サイクルごとに変化するワーク W の残量が変数として設定される。 そして、 NCプログラムから求められた製品 W b 1, Wb 2, Wb 3の長さと、 ワーク Wの残量とを比較し、 ワーク Wの残量が 製品 Wb l, Wb 2, Wb 3の長さよりも短くなつたときに、 次の製品 (例えば 製品 Wb 2) の加工を行わないように判断し、 ワーク Wの交換を行うようにプロ グラムが設定されている。
[第三の加工例]
第 7図に示す加工例は、 工具の使用回数 (製品 W aの生産個数) が一定回数に なったときに、 工具寿命と判断して予備工具と交換して加工を続けるものである。 この加工例では、 工具 T 1 100の予備として工具 T 1 100 ' と工具 T 1 100〃 が準備され、 工具 T2100の予備として工具 T 2100 ' と工具 T 2100〃が準備されている。
工具寿命を判断するためのマクロプログラムは、 第 7図 (b) に示すように、 工具 T 1100と工具 T 2100とで共通である。 また、 この加工例でも、 識別 子 「*」 で、 事前解読 ·変換を行う部分と、 逐次解読 ·変換処理を行う部分を区 別している。
工具 T 1100と工具 T 2100とは、 逐次解読 ·変換処理を行う部分でそれ ぞれ生産個数がカウントされ、 工具 T1100の交換を行う個数になったときに、 マクロプログラムから工具 T 1100の交換指令が出力される。 同様に、 工具 T 2100について交換を行う個数になったどきに、 マクロプログラムから工具 T 2100の交換指令が出力される。
このように、 本発明では、 同じ動作 (加工や処理) を繰り返す部分については 事前解読 ·変換を行い、 事前解読 ·変換処理によって解読 ·変換された N Cプロ グラムを実行しつつ、 設定値の追加や変更を行う部分については逐次解読 ·変換 処理を行うことで、 製品の取り個数やワークの交換、 工具の検査や交換等の種々 の動作に対して、 柔軟な対応が可能になる。
本発明の好適な実施形態について説明してきたが、 本発明は上記の実施形態に より何ら限定されるものではない。
本発明は、 本発明の技術的範囲内で種々に変更して実施することが可能である。 また、 本発明の加工方法の各ステップを実行するためのプログラムは、 C Dや
F D、 R OM等の記憶媒体の他、 通信回線を介して、 N C装置に読み込むことが できる。 本発明は上記のように構成されているので、 無駄時間の少ない事前実行方法と、 設定値の変更等が自由に行える逐次解読 ·変換処理方法とを組み合わせることが 可能になり、 繰り返し同じ処理を行う部分については事前解読 ·変換法で予め解 読'変換を行い、 設定の変更を行うことのある部分については、 逐次解読'変換 処理を行うことができるようになる。 そのため、 各種設定値の設定や変更に対し て柔軟に対応することが可能で、 事前解読 ·変換処理の長所と逐次解読 ·変換処 理の長所とを併せ持った加工効率に優れる N C装置を得ることができる。 産業上の利用可能性
本発明は、 所定プログラムの実行によってワークの加工を行う数値制御工作機 械であれば適用が可能で、 旋盤やボール盤に限らず、 フライス盤ゃマシニングセ ンタ、 各種加工機, 各種組立機械にも適用が可能である。

Claims

請 求 の 範 囲
1 . ワークの加工を行うための数値制御プログラムを読み込み、 この数値制御 プログラムによって工作機械の各可動部の動作を制御する数値制御装置において、 前記数値制御プログラムを記憶する第一の記憶手段と、
この第一の記億手段から前記数値制御プログラムを読み込み、 前記ヮ一クの加 ェを行う前に、 当該ワークの加工のための数値制御プログラムの解読 ·変換を行 う解読 ·変換部と、 前記数値制御プログラムの中から予め前記数値制御プロダラ ムに付された所定の識別子を検索し、 前記識別子が発見されたときに、 当該識別 子で指定されたプログラム部分を前記解読 ·変換部による解読 ·変換処理の対象 から除外する検索部とを有する事前解読 ·変換処理手段と、
前記解読 ·変換処理の対象から除外された前記プログラム部分を含めて、 前記 事前解読 ·変換処理手段で解読 ·変換された数値制御プログラムを記憶する第二 の記憶手段と、
前記ワークの加工を行う際に、 前記第二の記憶手段から読み出した前記数値制 御プログラムの中から前記識別子を検索する検索部と、 この検索部で前記識別子 が発見されたときに、 当該識別子で指定されたプログラム部分の解読 ·変換を行 う解読 ·変換部と、 解読 ·変換された数値制御プログラムに基づいて各可動部に 動作指令を出力する動作指令出力部とを有する数値制御プログラム実行手段と、 を備えることを特徴とする数値制御装置。
2 . 前記識別子で指定されたプログラム部分に、 前記数値制御プログラムの再 解読 ·変換を要求するための第二の識別子が付されている場合であって、 この第 二の識別子の検索を行う第二の検索部と、 この第二の検索部によって前記第二の 識別子が発見されたときに、 前記第一の記憶手段に記憶された前記数値制御プロ グラムの再解読 ·変換の要求を行う再解読 ·変換要求部とをさらに備えることを 特徴とする請求の範囲第 1項に記載の数値制御装置。
3 . 前記再解読 ·変換要求部によつて数値制御プログラムの再解読 ·変換が要 求されたときに、 前記第一の記憶手段に記憶されている前記数値制御プログラム を前記事前解読 ·変換処理手段に送って事前解読 ·変換を行うことを特徴とする 請求の範囲第 2項に記載の数値制御装置。
4. 前記事前解読 ·変換処理手段は、 前記数値制御プログラムの実行中に、 前 記再解読 ·変換の要求に応じて事前解読 ·変換処理を行い、 前記数値制御プログ ラムの実行後に事前解読 ·変換処理された数値制御プログラムを前記第二の記憶 手段に格納することを特徴とする請求の範囲第 2項又は第 3項に記載の数値制御
5 . 前記再解読 ·変換要求部は、 前記数値制御プログラムの実行終了後に、 前 記数値制御プログラムの再解読 ·変換を要求することを特徴とする請求の範囲第 2項〜第 4項のいずれかに記載の数値制御装置。
6 . 工作機械の各可動部の動作を制御してワークの加工等を行うための数値制 御プログラムの実行方法において、
数値制御プログラムを記憶する第一の記憶手段から数値制御プログラムを読み 込むステップと、
読み込んだ数値制御プログラムの中から予め数値制御プログラムに付された識 別子を検索するステップと、
前記識別子が発見されたときに、 当該識別子で指定されたプログラム部分を前 記解読 ·変換部による解読 ·変換処理の対象から除外するステップと、
解読 ·変換処理の対象から除外されたプログラム部分を除いて数値制御プログ ラムの解読 ·変換を行うステップと、
前記解読 ·変換処理の対象から除外された前記プログラム部分を含めて、 解 読 ·変換された数値制御プログラムを第二の記憶手段に記憶するステップと、 前記第二の記憶手段から前記数値制御プログラムを読み込み、 この数値制御プ ログラムの中から前記識別子を検索するステップと、
前記識別子が発見されたときに、 当該識別子で指定されたプログラム部分の解 読 ·変換を行うステップと、
前記第二の記憶手段から読み込まれた解読 ·変換済みの数値制御プログラム又 は角?読 ·変換された前記プログラム部分に基づいて、 各可動部に動作指令を出力 するステップと、
を有することを特徵とする数値制御プログラムの実行方法。
7 . 前記識別子で指定されたプログラム部分に、 前記数値制御プログラムの再 解読 ·変換を要求するための第二の識別子が付されている場合であって、 この第二の識別子の検索を行うステップと、
この検索によつて前記第二の識別子が発見されたときに、 前記第一の記憶手段 に記憶された前記数値制御プログラムの再解読 ·変換の要求を行うステップとを 有することを特徴とする請求の範囲第 6項に記載の数値制御プログラムの実行方 法。
8 . 前記数値制御プログラムの実行中に、 再解読 ·変換の要求に応じて事前解 読 ·変換処理を行い、 前記数値制御プログラムの実行終了後に事前解読 ·変換処 理された数値制御プログラムを前記第二の記憶手段に格納することを特徴とする 請求の範囲第 7項に記載の数値制御プログラムの実行方法。
9 . 前記数値制御プログラムの実行終了後に、 前記数値制御プログラムの再解 読 ·変換を要求することを特徴とする請求の範囲第 7項又は第 8項に記載の数値 制御プログラムの実行方法。
1 0 . 請求の範囲第 6項〜第 9項のいずれかに記載の数値制御プログラムの実 行方法の各ステップを実行するためのプログラム。
PCT/JP2002/004258 2001-05-16 2002-04-26 Appareil a commande numerique, procede d'execution du programme de commande numerique et programme de commande numerique WO2002093278A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2001-146995 2001-05-16
JP2001146995A JP4718040B2 (ja) 2001-05-16 2001-05-16 数値制御装置、数値制御プログラムの実行方法及びそのプログラム

Publications (1)

Publication Number Publication Date
WO2002093278A1 true WO2002093278A1 (fr) 2002-11-21

Family

ID=18992545

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2002/004258 WO2002093278A1 (fr) 2001-05-16 2002-04-26 Appareil a commande numerique, procede d'execution du programme de commande numerique et programme de commande numerique

Country Status (3)

Country Link
JP (1) JP4718040B2 (ja)
CN (1) CN1270220C (ja)
WO (1) WO2002093278A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103930240A (zh) * 2011-07-27 2014-07-16 西铁城控股株式会社 机床用控制装置

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4613003B2 (ja) * 2003-11-17 2011-01-12 本田技研工業株式会社 ソースプログラム変換方法
JP2010097414A (ja) * 2008-10-16 2010-04-30 Citizen Machinery Co Ltd 工作機械の制御装置及び制御方法
JP5526880B2 (ja) * 2010-03-12 2014-06-18 三菱電機株式会社 数値制御方法及びその装置
CN104407569B (zh) * 2014-10-21 2017-01-25 中国科学院长春光学精密机械与物理研究所 数控研抛中的进退刀路径规划方法
CN110147075A (zh) * 2019-05-31 2019-08-20 苏州卡利肯新光讯科技有限公司 一种数控研抛中接刀刀痕的消除方法
JP7513677B2 (ja) 2022-09-12 2024-07-09 株式会社ソディック 解析装置、解析プログラム、加工システムおよびその加工機
CN117647953A (zh) * 2024-01-29 2024-03-05 陕西空天信息技术有限公司 一种刀轨数据的转换方法、装置及计算机存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6149209A (ja) * 1984-08-17 1986-03-11 Fanuc Ltd 数値制御装置におけるプログラム実行方式
JPS6462705A (en) * 1987-09-02 1989-03-09 Fanuc Ltd Cnc program executing device
JPH04100122A (ja) * 1990-05-28 1992-04-02 Yaskawa Electric Corp Nc加工プログラム実行装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002006918A (ja) * 2000-06-20 2002-01-11 Toshiba Mach Co Ltd ロボットの制御装置および制御方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6149209A (ja) * 1984-08-17 1986-03-11 Fanuc Ltd 数値制御装置におけるプログラム実行方式
JPS6462705A (en) * 1987-09-02 1989-03-09 Fanuc Ltd Cnc program executing device
JPH04100122A (ja) * 1990-05-28 1992-04-02 Yaskawa Electric Corp Nc加工プログラム実行装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103930240A (zh) * 2011-07-27 2014-07-16 西铁城控股株式会社 机床用控制装置

Also Published As

Publication number Publication date
JP4718040B2 (ja) 2011-07-06
CN1463394A (zh) 2003-12-24
JP2002341912A (ja) 2002-11-29
CN1270220C (zh) 2006-08-16

Similar Documents

Publication Publication Date Title
US7155303B2 (en) Numeric control method and numeric control system
WO2002093278A1 (fr) Appareil a commande numerique, procede d'execution du programme de commande numerique et programme de commande numerique
US20100204818A1 (en) Numerical control device
US6591156B1 (en) Method and apparatus for providing numerical control information
CN101373379A (zh) 具有程序恢复功能的数值控制器
US20160062336A1 (en) Numerical controller for facilitating adjustment of machining motion
JP2004126956A (ja) 数値制御装置
JP5210070B2 (ja) 数値制御工作機械
JP5800869B2 (ja) プログラム再開機能を備えた数値制御装置
JP2006172388A (ja) 数値制御装置
CN104956274A (zh) 数控装置
JP2019079244A (ja) 数値制御装置
CN102187287B (zh) 机床的控制装置及其控制方法
GB2083247A (en) A programmable machine
US20210124331A1 (en) Optimization device
US10671053B2 (en) Numerical controller and machine tool system
JP4494303B2 (ja) 数値制御装置
JPH02151909A (ja) 産業用機械の制御装置
JPS6089202A (ja) 数値制御方式
CN100375938C (zh) 机械的控制装置
JPH0421202B2 (ja)
JPH06320388A (ja) 横型マシニングセンタ加工における加工順序決定方式
JPH11194808A (ja) 数値制御装置
KR0161318B1 (ko) 원토치 프라즈마절단기를 이용한 미러절단방법
JP2005131775A (ja) 工作機械の軸平行処理装置

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): CN

WWE Wipo information: entry into national phase

Ref document number: 028017382

Country of ref document: CN