JP2017157194A - Numerical controller for machine tool - Google Patents

Numerical controller for machine tool Download PDF

Info

Publication number
JP2017157194A
JP2017157194A JP2016234809A JP2016234809A JP2017157194A JP 2017157194 A JP2017157194 A JP 2017157194A JP 2016234809 A JP2016234809 A JP 2016234809A JP 2016234809 A JP2016234809 A JP 2016234809A JP 2017157194 A JP2017157194 A JP 2017157194A
Authority
JP
Japan
Prior art keywords
program
auxiliary
execution
machine tool
processing
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
JP2016234809A
Other languages
Japanese (ja)
Other versions
JP6316919B2 (en
Inventor
善典 西城
Yoshinori Saijo
善典 西城
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 DE102017001765.4A priority Critical patent/DE102017001765A1/en
Priority to US15/440,210 priority patent/US10120363B2/en
Priority to CN201710126354.4A priority patent/CN107132818B/en
Publication of JP2017157194A publication Critical patent/JP2017157194A/en
Application granted granted Critical
Publication of JP6316919B2 publication Critical patent/JP6316919B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a numerical controller for a machine tool which improves a real-time property and is capable of performing proper processing operation at a high execution speed.SOLUTION: A numerical controller comprises: an analysis section 72 for analyzing a processing program and each of multiple auxiliary programs; a command element extraction section 74 for judging the presence/absence of relevancy between the auxiliary programs; a load calculation section 76 for calculating processing times of the processing program and each of the multiple auxiliary programs; an execution order calculation section 78 for calculating an execution order of the processing program and the multiple auxiliary programs in such a manner that the auxiliary programs having mutual relevancy are executed within the same execution cycle; and an execution processing section 80 for executing the processing program and the auxiliary programs in the calculated execution order.SELECTED DRAWING: Figure 4

Description

本発明は、工作機械の数値制御装置に関し、一層詳細には、予め決められた実行周期で加工プログラムを実行するとともに、加工プログラムの実行周期内において、複数の補助プログラムのうち1つ以上の補助プログラムを実行する工作機械の数値制御装置に関する。   The present invention relates to a numerical control device for a machine tool. More specifically, the present invention executes a machining program at a predetermined execution cycle and at least one auxiliary program among a plurality of auxiliary programs within the execution cycle of the machining program. The present invention relates to a numerical control device of a machine tool that executes a program.

本出願人は、既に、多軸工作機械のシーケンス制御を行うシーケンスプログラムのように、周期的に繰り返し実行するプログラムと、実行指令により加工工程を開始し各軸のモーション(動作)の制御を行うNCプログラムとを、全てNCプログラム形式で記述することにより、実行するプログラムの変換に特別な装置を必要とせずに、軸動作(モーション)制御とシーケンス制御の両方を簡便に実行することができる数値制御装置の開発に成功し、特許を得た(特許文献1参照)。   The present applicant has already started a machining process according to a program repeatedly executed periodically, such as a sequence program for performing sequence control of a multi-axis machine tool, and controls the motion (motion) of each axis. Numerical values that allow both axis motion (motion) control and sequence control to be executed easily without requiring a special device to convert the program to be executed by describing all NC programs in the NC program format. The control device was successfully developed and patented (see Patent Document 1).

また、例えば、制御ソフトウェアにおいて、実行するタスクの指定方式に柔軟性を持たせて、各タスクに適切な処理時間を与えることにより、効率的に実行することができるようにした制御ソフトウェアの実行システムの制御方法が提案されている(特許文献2参照)。   In addition, for example, in the control software, a control software execution system that can be executed efficiently by giving flexibility to a method for specifying a task to be executed and giving an appropriate processing time to each task. A control method has been proposed (see Patent Document 2).

これに関連して、プログラムの実行条件によりタスクの処理時間の差が大きいタスクを解析対象として抽出することによって、タスク数の多いプログラムに対して短時間で並列化スケジューリング結果を得ることが可能な並列化スケジューリング装置も提案されている(特許文献3参照)。   In this connection, it is possible to obtain a parallel scheduling result for a program with a large number of tasks in a short time by extracting a task having a large difference in task processing time depending on the program execution condition as an analysis target. A parallel scheduling device has also been proposed (see Patent Document 3).

さらに、プロセスに優先度をつけ、優先度の高いプロセスを優先的に処理する方法において、単位時間毎の複数の実行段階のうち、単位時間の終了までに、優先度の高い実行段階から順にプログラムの実行に必要なリソースを各プログラムに割り当てることにより、多数のプログラムを実行する際に、CPU能力を十分に利用して処理能力を向上させることができるプログラムの実行処理方法及び装置も提案されている(特許文献4参照)。   Furthermore, in the method of giving priority to processes and preferentially processing high priority processes, among the multiple execution stages for each unit time, programs are executed in order from the execution stage with the highest priority until the end of the unit time. Also proposed is a program execution processing method and apparatus capable of improving the processing capacity by fully utilizing the CPU capacity when a large number of programs are executed by allocating resources necessary for execution of the program. (See Patent Document 4).

特許第3764436号公報Japanese Patent No. 3764436 特許第3727637号公報Japanese Patent No. 3727637 特許第5381302号公報Japanese Patent No. 5381302 特許第5469128号公報Japanese Patent No. 5469128

従来における数値制御装置の制御システムでは、自動切削装置を例にすると、実際に加工を行う切削時間と、加工の準備動作や計測等を行う非切削時間とからなる加工プログラムから非切削時間の加工プログラムを除外し、この除外した非切削時間に係る加工プログラムを前記実際に加工を行う切削時間に係る加工プログラムの自動運転の実行周期内において実行することにより、前記加工プログラムの実行周期に対するサイクルタイムの短縮を図ることが可能である。   In the control system of a conventional numerical control device, when an automatic cutting device is taken as an example, processing of non-cutting time from a processing program consisting of cutting time for actual processing and non-cutting time for performing preparatory operation and measurement of processing, etc. By removing the program and executing the machining program related to the excluded non-cutting time within the execution period of the automatic operation of the machining program related to the cutting time for actually performing machining, the cycle time with respect to the execution period of the machining program Can be shortened.

すなわち、このような数値制御装置の制御システムにおいては、自動運転の状況に応じて、位置情報や信号情報等を取得して所望の加工動作を実現するようなプログラムの処理が行われる。従って、前記加工プログラムの実行処理に際しては、リアルタイム性が求められるとともに、高速である実行周期で処理動作が行われる必要性がある。   That is, in such a control system of a numerical control device, processing of a program that acquires position information, signal information, and the like and realizes a desired machining operation is performed according to the state of automatic driving. Accordingly, in the execution processing of the machining program, real-time performance is required, and processing operation needs to be performed at a high-speed execution cycle.

そこで、リアルタイム性が満足され且つ実行周期内に完了する必要がある実行処理について、図8に沿って説明する。以下では、加工の準備動作や計測等を行うプログラムを補助プログラムと言い、実際に加工を行うプログラムについてのみ加工プログラムと言う。ここで、図8は、従来の数値制御装置において、加工プログラムの実行周期内で実行される補助プログラムが実行周期内で実行処理を完了する状態を示す説明図である。   An execution process that satisfies the real-time property and needs to be completed within the execution cycle will be described with reference to FIG. In the following, a program for performing machining preparation operation and measurement is referred to as an auxiliary program, and only a program for actually performing machining is referred to as a machining program. Here, FIG. 8 is an explanatory diagram showing a state in which the auxiliary program executed within the execution cycle of the machining program completes the execution process within the execution cycle in the conventional numerical control device.

図8において、「自動運転実行処理」は、加工プログラムによる工作機械の自動運転に関する実行処理状態を示し、また「補助プログラム1実行処理」、「補助プログラム2実行処理」、「補助プログラム3実行処理」は、加工プログラムの実行周期内に実行される補助プログラムの実行処理状態を示す。   In FIG. 8, “automatic operation execution processing” indicates an execution processing state related to automatic operation of the machine tool by the machining program, and “auxiliary program 1 execution processing”, “auxiliary program 2 execution processing”, “auxiliary program 3 execution processing”. "" Indicates an execution processing state of the auxiliary program executed within the execution cycle of the machining program.

この場合、工作機械による加工の高度化が達成されるのに伴い、加工プログラムによる自動運転の実行処理の途中に動作させるアプリケーション数が増加すれば、当然に実行周期内に完了すべき実行処理が増大する。従って、実行周期内に実行処理が完了しない場合には、システムダウン等につながるため、これを避けるべく増大する実行周期内に実行される処理の負荷を緩和させる必要がある。   In this case, if the number of applications to be operated increases during the execution process of automatic operation by the machining program as the machining of the machine tool is advanced, naturally the execution process to be completed within the execution cycle Increase. Therefore, if the execution process is not completed within the execution cycle, the system will be down, so that it is necessary to reduce the load of the process executed within the increasing execution cycle to avoid this.

そこで、前記増大する実行周期内に実行される処理の負荷を緩和する例を図9に示す。この場合、「補助プログラム3実行処理」を次の実行周期で実行し、実行周期内の負荷を単純に平準化し、実行周期内で処理が可能な補助プログラム1と補助プログラム2の実行処理を行い、増大した負荷としての補助プログラム3の実行処理を次なる実行周期に移して当初の実行周期内の負荷を緩和している。   FIG. 9 shows an example of mitigating the load of processing executed within the increasing execution cycle. In this case, “auxiliary program 3 execution processing” is executed in the next execution cycle, the load in the execution cycle is simply leveled, and the execution processing of auxiliary program 1 and auxiliary program 2 that can be processed in the execution cycle is performed. The execution process of the auxiliary program 3 as an increased load is shifted to the next execution cycle to reduce the load within the initial execution cycle.

図10は、前記補助プログラム3の実行処理に関連した説明である。この場合、関連性の高い補助プログラムの実行処理について例示している。例えば、個々に実行処理が行われる「補助プログラム1」、「補助プログラム2」、「補助プログラム3」の中、「補助プログラム1」の演算結果を使用して「補助プログラム3」を実行するアプリケーションが作成されている場合、図9に示すような処理負荷の緩和によって、「補助プログラム3」が次の実行周期で実行処理が行われると、処理負荷に係る変数#100、#101を含む「補助プログラム1」の開始から読み取り処理の負荷に係る変数#100、#101を含む「補助プログラム3」の完了までに、少なくとも変数#100と#101に係る処理については2回の実行周期が必要になる。このように、補助プログラムの実行順によって実際の工作機械動作に遅れが生じリアルタイム性が損なわれるという難点がある。   FIG. 10 is an explanation related to the execution process of the auxiliary program 3. In this case, the execution process of a highly relevant auxiliary program is illustrated. For example, an application that executes “auxiliary program 3” using the operation result of “auxiliary program 1” among “auxiliary program 1”, “auxiliary program 2”, and “auxiliary program 3” that are individually executed. When the “auxiliary program 3” is executed in the next execution cycle by reducing the processing load as shown in FIG. 9, the variables # 100 and # 101 related to the processing load are included. From the start of “auxiliary program 1” to the completion of “auxiliary program 3” including variables # 100 and # 101 related to the load of the reading process, at least two processing cycles are required for the processes related to variables # 100 and # 101. become. As described above, there is a problem in that the actual machine tool operation is delayed depending on the execution order of the auxiliary programs, and the real-time property is impaired.

本発明は、前記の課題を考慮してなされたものであり、加工プログラムの実行周期内で実行する複数の補助プログラムに対し、個々の補助プログラムの関連性を解析して、それらの実行順を決定し、リアルタイム性に優れ、高速の実行速度で適正な処理動作を行うことが可能な工作機械の数値制御装置を提供することを目的とする。   The present invention has been made in consideration of the above-described problems. For a plurality of auxiliary programs executed within the execution cycle of the machining program, the relevance of each auxiliary program is analyzed, and the execution order thereof is determined. It is an object of the present invention to provide a numerical control device for a machine tool that is determined and excellent in real-time property and capable of performing an appropriate processing operation at a high execution speed.

本発明の態様は、予め決められた実行周期で加工プログラムを実行するとともに、実行周期内において、複数の補助プログラムのうち1つ以上の補助プログラムを実行する工作機械の数値制御装置であって、加工プログラム及び複数の補助プログラムの各々を解析する解読部と、解読部の解析結果に基づいて、補助プログラム同士の関連性の有無を判断する指令要素抽出部と、解読部の解析結果に基づいて、加工プログラムの処理時間及び複数の補助プログラムの各々の処理時間を算出する負荷算出部と、互いに関連性を有する補助プログラムを同一の実行周期内で実行するように、加工プログラムの処理時間及び複数の補助プログラムの各々の処理時間に応じて、加工プログラム及び複数の補助プログラムの実行順を算出する実行順算出部と、算出された実行順に従って、加工プログラム及び補助プログラムを実行する実行処理部と、を備える。   An aspect of the present invention is a numerical control device for a machine tool that executes a machining program at a predetermined execution cycle and executes one or more auxiliary programs among a plurality of auxiliary programs within the execution cycle, On the basis of the analysis result of the decoding unit for analyzing each of the machining program and the plurality of auxiliary programs, on the basis of the analysis result of the decoding unit, on the basis of the analysis result of the decoding unit A processing time of the machining program and a plurality of processing times of the machining program so that the load calculation unit for calculating the processing time of the machining program and the processing time of each of the plurality of auxiliary programs and the auxiliary program having relevance are executed within the same execution cycle An execution order calculation unit that calculates the execution order of the machining program and the plurality of auxiliary programs according to the processing time of each auxiliary program Provided in accordance with the calculated execution order, the execution processing unit for executing machining programs and auxiliary programs, the.

この構成によれば、解読部と、指令要素抽出部によって複数の補助プログラム相互間の関連性の有無が判断され、一方、負荷算出部は加工プログラム及び補助プログラムの処理時間を算出し、これら関連性の有無と加工プログラム及び補助プログラムの処理時間に基づき加工プログラム及び補助プログラムの実行順を算出して実行処理する。これによって、補助プログラムを実行処理するリアルタイム性に優れ且つ高速の実行速度で適正な処理を行なうことができる。   According to this configuration, the decoding unit and the command element extraction unit determine whether or not there is a relationship between the plurality of auxiliary programs, while the load calculation unit calculates the processing time of the machining program and the auxiliary program, The execution order of the machining program and the auxiliary program is calculated and executed based on the presence / absence of the property and the processing time of the machining program and the auxiliary program. As a result, it is possible to perform an appropriate process at a high execution speed with excellent real-time performance for executing the auxiliary program.

また、指令要素抽出部は、解読部の解析結果に基づいて、二以上の補助プログラムにおいて共通で使用している変数を抽出し、変数を共通で使用している補助プログラム同士を関連性有りと決定してもよい。これにより、補助プログラム同士の関連性を精度よく判断することができる。   In addition, the command element extraction unit extracts variables that are commonly used in two or more auxiliary programs based on the analysis result of the decoding unit, and the auxiliary programs that commonly use the variables are related to each other. You may decide. Thereby, it is possible to accurately determine the relevance between the auxiliary programs.

さらに、指令要素抽出部は、解読部の解析結果に基づいて、共通で使用している変数が多いほど、関連性を有する補助プログラム間の関連度を高く設定し、実行順算出部は、関連度が高い補助プログラム同士が隣り合うように実行順を算出してもよい。   Furthermore, the command element extraction unit sets the degree of association between auxiliary programs having higher relevance as the number of variables used in common increases based on the analysis result of the decoding unit, and the execution order calculation unit The execution order may be calculated so that auxiliary programs having high degrees are adjacent to each other.

これにより、関連度が高い補助プログラム同士は、共通で使用する変数の個数が多く、これらの補助プログラムを同一の実行周期内において実行することにより補助プログラムの実行速度を向上させることができる。   Thus, auxiliary programs having a high degree of association have a large number of variables used in common, and the execution speed of the auxiliary programs can be improved by executing these auxiliary programs within the same execution cycle.

さらにまた、指令要素抽出部は、解読部の解析結果に基づいて、関連性を有する補助プログラム間の実行順を決める優先度を設定し、実行順算出部は、関連度が高い補助プログラム同士が隣り合い、且つ、優先度が高い順となるように、実行順を算出してもよい。   Furthermore, the command element extraction unit sets a priority for determining the execution order between the auxiliary programs having relevance based on the analysis result of the decoding unit, and the execution order calculation unit determines whether the auxiliary programs having high relevance are The execution order may be calculated so that they are adjacent and in the order of priority.

これにより、関連性を有する補助プログラムのうち、優先度が低い補助プログラムは、優先度が高い補助プログラムの処理結果を用いて、処理を行うことができるため、補助プログラムの実行処理エラーを抑制することができる。   As a result, among auxiliary programs having relevance, an auxiliary program having a low priority can be processed using the processing result of the auxiliary program having a high priority, so that an execution processing error of the auxiliary program is suppressed. be able to.

またさらに、指令要素抽出部は、変数を共通で使用している補助プログラムの各々について、共通で使用している変数を書き込みで使用しているのか、共通で使用している変数を読み込みで使用しているのかを判断し、共通で使用している変数を書き込みで使用している補助プログラムの優先度を、共通で使用している変数を読み込みで使用している補助プログラムの優先度よりも高く設定してもよい。   Furthermore, for each auxiliary program that uses variables in common, the command element extractor uses the commonly used variables for writing, or uses the commonly used variables for reading. The priority of the auxiliary program that is used for writing the variables that are used in common, and the priority of the auxiliary program that is used for reading the variables that are used in common You may set it high.

これにより、先に実行される補助プログラムにより書き込みが行われた変数を、後で実行される補助プログラムにより読み込みが行われるため、補助プログラムの実行処理エラーを防止することができる。   Thereby, since the variable written by the auxiliary program executed first is read by the auxiliary program executed later, an execution processing error of the auxiliary program can be prevented.

また、加工プログラム及び補助プログラムが実行処理部において実行されているときに、加工プログラムの処理時間及び補助プログラムの処理時間を計測する別異の負荷算出部を有し、実行順算出部は、別異の負荷算出部が計測した加工プログラムの処理時間及び補助プログラムの処理時間に基づいて、実行順を見直してもよい。   Further, when the machining program and the auxiliary program are executed in the execution processing unit, the machining program and the auxiliary program have different load calculation units that measure the processing time of the machining program and the processing time of the auxiliary program. The execution order may be reviewed based on the processing time of the machining program and the processing time of the auxiliary program measured by different load calculation units.

これにより、負荷算出部が解読部の解析結果から算出した処理時間に対して、別異の負荷算出部が計測した実際の処理時間が異なるときには、随時実行順を見直すことができ、実際の処理時間に即した実行順を設定することができる。よって、補助プログラムの実行処理についてリアルタイム性を向上させるとともに、補助プログラムより高速に処理することができる。   As a result, when the actual processing time measured by a different load calculation unit is different from the processing time calculated by the load calculation unit from the analysis result of the decoding unit, the execution order can be reviewed at any time. Execution order can be set according to time. Therefore, real-time performance of the auxiliary program execution processing can be improved and processing can be performed at a higher speed than the auxiliary program.

さらに、指令要素抽出部は、解読部の解析結果に基づいて、繰り返し処理を行う命令を示す継続指令を抽出し、実行順算出部は、継続指令を有する補助プログラムが実行処理部において繰り返し実行されるように実行順を算出してもよい。これにより、継続指令を有する補助プログラムを繰り返し実行することができる。   Further, the command element extraction unit extracts a continuation command indicating a command for performing the repetition process based on the analysis result of the decoding unit, and the execution order calculation unit repeatedly executes the auxiliary program having the continuation command in the execution processing unit. The execution order may be calculated so that Thereby, the auxiliary program having the continuation command can be repeatedly executed.

さらにまた、継続指令を有する補助プログラムが実行処理部において実行されているときに、継続指令を有する補助プログラムの処理時間を計測する別異の負荷算出部を有し、実行順算出部は、別異の負荷算出部が計測した継続指令を有する補助プログラムの処理時間に基づいて、実行順を見直してもよい。   Furthermore, when an auxiliary program having a continuation command is being executed in the execution processing unit, it has a different load calculation unit that measures the processing time of the auxiliary program having a continuation command. The execution order may be reviewed based on the processing time of the auxiliary program having the continuation command measured by the different load calculation unit.

継続指令を有する補助プログラムは、繰り返し実行される毎に実際に実行する制御内容によって負荷が異なるため、処理時間も異なる。そこで、負荷算出部では、継続指令を有する補助プログラムについては、最も負荷が大きくなるときの処理時間を算出する。そのため、実際に継続指令を有する補助プログラムを実行したときの処理時間は、負荷算出部が算出した処理時間よりも短いことがある。別異の負荷算出部により、継続指令を有する補助プログラムの実際の処理時間を計測し、計測した処理時間に基づいて実行順を見直すことにより、実際の処理時間に即した実行順を算出することができる。よって、補助プログラムの実行処理についてリアルタイム性を向上させるとともに、補助プログラムより高速に処理することができる。   The auxiliary program having a continuation command has a different processing time because the load varies depending on the control content that is actually executed every time it is repeatedly executed. Therefore, the load calculation unit calculates the processing time when the load becomes maximum for the auxiliary program having the continuation command. For this reason, the processing time when the auxiliary program having the continuation command is actually executed may be shorter than the processing time calculated by the load calculation unit. By measuring the actual processing time of the auxiliary program having a continuation command by a different load calculation unit and reconsidering the execution order based on the measured processing time, calculating the execution order according to the actual processing time Can do. Therefore, real-time performance of the auxiliary program execution processing can be improved and processing can be performed at a higher speed than the auxiliary program.

またさらに、実行順算出部は、実行周期内で加工プログラム及び補助プログラムを実行可能な処理時間を処理負荷の制限値として設定し、加工プログラムの処理時間と、実行周期内で実行される補助プログラムの処理時間との合計が制限値以下となるように、実行順を算出してもよい。   Still further, the execution order calculation unit sets a processing time during which the machining program and the auxiliary program can be executed within the execution cycle as a limit value of the processing load, and the auxiliary program executed within the processing time of the machining program and the execution cycle. The order of execution may be calculated so that the sum of the processing times is equal to or less than the limit value.

これにより加工プログラムの実行周期内に補助プログラムを実行する際に、次の加工プログラムが実行される前に補助プログラムの処理を終了することができ、システムダウンを回避することができる。   As a result, when the auxiliary program is executed within the machining program execution cycle, the processing of the auxiliary program can be terminated before the next machining program is executed, and system down can be avoided.

また、負荷算出部は、加工プログラムが実行処理部において実行されているときに、加工プログラムの処理時間を計測し、実行順算出部は、計測された加工プログラムの処理時間に応じて、実行順を算出してもよい。   The load calculation unit measures the processing time of the machining program when the machining program is being executed in the execution processing unit, and the execution order calculation unit determines the execution order according to the measured processing time of the machining program. May be calculated.

補助プログラムは、加工プログラムの処理が完了した後に実行されるため、先に実行されている加工プログラムの処理時間を計測し、実際の加工プログラムの処理時間に応じて、後に実行される補助プログラムの実行順を設定することができる。よって、実際の加工プログラムの処理時間に即した実行順を算出することができる。よって、補助プログラムの実行処理についてリアルタイム性を向上させるとともに、補助プログラムより高速に処理することができる。   Since the auxiliary program is executed after the processing of the machining program is completed, the processing time of the machining program that is executed first is measured, and the auxiliary program that is executed later is measured according to the processing time of the actual machining program. Execution order can be set. Therefore, it is possible to calculate the execution order according to the processing time of the actual machining program. Therefore, real-time performance of the auxiliary program execution processing can be improved and processing can be performed at a higher speed than the auxiliary program.

本発明によれば、リアルタイム性に優れ、高速の実行速度で適正な処理動作を行うことができる。   According to the present invention, it is excellent in real-time property, and an appropriate processing operation can be performed at a high execution speed.

本発明に係る加工プログラムの実行周期内において、複数の補助プログラムを実行処理する工作機械の数値制御装置の要部制御系統図である。It is a principal part control system diagram of the numerical control apparatus of the machine tool which executes and processes a plurality of auxiliary programs in the execution cycle of the machining program concerning the present invention. 本発明に係る加工プログラム及び複数の補助プログラムを実行処理する制御系のブロック系統図である。It is a block system diagram of a control system for executing and executing a machining program and a plurality of auxiliary programs according to the present invention. 本発明の数値制御装置において複数の補助プログラムの関連度、優先度及びプログラム負荷の算出処理方法を示す説明図である。It is explanatory drawing which shows the calculation processing method of the relevance degree, priority, and program load of a some auxiliary program in the numerical control apparatus of this invention. 図3に示す複数の補助プログラムの関連度、優先度及びプログラム負荷の算出例に基づく補助プログラムの実行順を決定する方法を示す説明図である。It is explanatory drawing which shows the method of determining the execution order of an auxiliary program based on the example of calculation of the relevance degree of several auxiliary programs shown in FIG. 3, a priority, and a program load. 本発明の数値制御装置において補助プログラムの関連度、優先度及びプログラム負荷の算出処理方法の別の実施例を示す説明図である。It is explanatory drawing which shows another Example of the calculation processing method of the relevance degree of an auxiliary program, a priority, and a program load in the numerical control apparatus of this invention. 図5に示す継続指令のある複数の補助プログラムの関連度、優先度及びプログラム負荷の算出例に基づく補助プログラムの実行順を決定する方法を示す説明図である。It is explanatory drawing which shows the method of determining the execution order of an auxiliary program based on the calculation example of the relevance degree of a some auxiliary program with a continuation command shown in FIG. 5, a priority, and a program load. 図6に示す継続指令のある補助プログラムの実行順の決定に対する見直し方法を示す説明図である。It is explanatory drawing which shows the review method with respect to determination of the execution order of the auxiliary program with a continuation command shown in FIG. 従来の数値制御装置において複数の補助プログラムが実行周期内に完了する補助プログラムの実行処理状態を示す説明図である。It is explanatory drawing which shows the execution processing state of the auxiliary program which a some auxiliary program completes within an execution period in the conventional numerical control apparatus. 従来の数値制御装置において複数の補助プログラムが実行周期内に完了しない場合の単純な平準化による補助プログラムの実行処理状態を示す説明図である。It is explanatory drawing which shows the execution processing state of the auxiliary | assistant program by simple leveling in case the some auxiliary | assistant program is not completed within an execution period in the conventional numerical control apparatus. 従来の数値制御装置において複数の補助プログラムの関連性を示す説明図である。It is explanatory drawing which shows the relationship of several auxiliary programs in the conventional numerical control apparatus.

本発明に係る工作機械の数値制御装置としての好適な実施形態を例示し、添付の図面を参照しながら以下詳細に説明する。   A preferred embodiment as a numerical control device for a machine tool according to the present invention will be exemplified and described in detail below with reference to the accompanying drawings.

図1は、本発明の一実施形態である多軸工作機械の数値制御装置の要部制御系統図を示すものである。   FIG. 1 shows a main part control system diagram of a numerical controller for a multi-axis machine tool according to an embodiment of the present invention.

数値制御装置10はCPU12を備え、CPU12は数値制御装置10の各部を制御する。CPU12は、ROM14に格納されたシステムプログラムをバス16を介して読み出し、このシステムプログラムに従って数値制御装置10の各部を制御する。なお、ROM14には、加工プログラム等の作成及び編集のために必要とされる編集モードの処理や自動運転のための処理を実施するための各種のシステムプログラムが予め書き込まれている。RAM18には一時的な計算データや表示データ及びLCD/MDIユニット20を介してオペレータが入力した各種データ等が格納される。   The numerical control device 10 includes a CPU 12, and the CPU 12 controls each unit of the numerical control device 10. The CPU 12 reads a system program stored in the ROM 14 via the bus 16 and controls each unit of the numerical control device 10 according to the system program. In the ROM 14, various system programs for executing processing in an edit mode and processing for automatic operation necessary for creating and editing a machining program and the like are written in advance. The RAM 18 stores temporary calculation data, display data, various data input by the operator via the LCD / MDI unit 20, and the like.

SRAM22は図示しないバッテリでバックアップされ、数値制御装置10の電源がオフされても記憶状態が保持される不揮発性メモリとして構成され、初期位置を測定するプログラムや工作機械の熱変位補正を行うプログラム、インタフェース24を介して読み込まれた後述する加工プログラム、LCD/MDIユニット20を介して入力された加工プログラム等が記憶されるようになっている。   The SRAM 22 is backed up by a battery (not shown), and is configured as a non-volatile memory that retains a stored state even when the power of the numerical controller 10 is turned off. The program for measuring the initial position and the program for correcting the thermal displacement of the machine tool, A machining program, which will be described later, read via the interface 24, a machining program input via the LCD / MDI unit 20, and the like are stored.

インタフェース24は数値制御装置10に接続可能な外部機器のためのインタフェースであり、外部記憶装置等の外部機器26が接続される。外部記憶装置からは加工プログラム、熱変位測定プログラム等が読み込まれる。PMC(プログラマブル・マシン・コントローラ)28は、数値制御装置10に内蔵されたシーケンスプログラムで工作機械側の補助装置等を制御する。すなわち、加工プログラムで指令されたM機能、S機能及びT機能に従って、これらシーケンスプログラムの補助装置側で必要な信号を変換し、I/Oユニット30から補助装置側に出力する。この出力信号により各種アクチュエータ等の補助装置が作動する。また、工作機械の本体に配備された操作盤の各種スイッチ等の信号を受け、必要な処理をしてCPU12に渡す。   The interface 24 is an interface for an external device that can be connected to the numerical controller 10, and is connected to an external device 26 such as an external storage device. A machining program, a thermal displacement measurement program, and the like are read from the external storage device. A PMC (programmable machine controller) 28 controls an auxiliary device or the like on the machine tool side with a sequence program built in the numerical controller 10. That is, in accordance with the M function, S function, and T function commanded by the machining program, necessary signals are converted on the auxiliary device side of these sequence programs and output from the I / O unit 30 to the auxiliary device side. Auxiliary devices such as various actuators are activated by this output signal. In addition, it receives signals from various switches on the operation panel provided in the machine tool body, performs necessary processing, and passes it to the CPU 12.

工作機械の各軸の現在位置、アラーム、パラメータ、画像データ等の画像信号はLCD/MDIユニット20に送られ、そのディスプレイに表示される。LCD/MDIユニット20はディスプレイやキーボード等を備えた手動データ入力装置であり、インタフェース32はLCD/MDIユニット20のキーボードからデータを受けてCPU12に渡す。   Image signals such as the current position of each axis of the machine tool, alarms, parameters, and image data are sent to the LCD / MDI unit 20 and displayed on the display. The LCD / MDI unit 20 is a manual data input device provided with a display, a keyboard and the like, and the interface 32 receives data from the keyboard of the LCD / MDI unit 20 and passes it to the CPU 12.

インタフェース34は手動パルス発生器36に接続され、手動パルス発生器36は工作機械の操作盤に実装され、手動操作に基づく分配パルスによる各軸制御で工作機械の可動部を精密に位置決めするために使用される。   The interface 34 is connected to a manual pulse generator 36. The manual pulse generator 36 is mounted on the operation panel of the machine tool so as to precisely position the movable part of the machine tool by controlling each axis by a distributed pulse based on manual operation. used.

工作機械を構成する図示しないテーブルを移動させるX、Y軸の軸制御回路及びZ軸の軸制御回路50、52、54はCPU12からの各軸の移動指令を受けて、各軸の指令をサーボアンプ44、46、48に出力する。サーボアンプ44、46、48はこの指令を受けて工作機械の各軸のサーボモータ38、40、42を駆動する。各軸のサーボモータ38、40、42には位置検出用の図示しないパルスコーダが内蔵されており、このパルスコーダからの位置信号がパルス列としてフィードバックされる。   The X and Y axis control circuits 50, 52 and 54 for moving a table (not shown) constituting the machine tool receive the movement commands for each axis from the CPU 12, and servo the commands for each axis. Output to amplifiers 44, 46 and 48. The servo amplifiers 44, 46, 48 receive this command and drive the servo motors 38, 40, 42 of each axis of the machine tool. The servomotors 38, 40, 42 of each axis incorporate a pulse coder (not shown) for position detection, and a position signal from this pulse coder is fed back as a pulse train.

スピンドル制御回路60は、工作機械への主軸回転指令を受け、スピンドルアンプ58にスピンドル速度信号を出力する。スピンドルアンプ58はこのスピンドル速度信号を受けて、工作機械のスピンドルモータ56を指令された回転速度で回転させ、工具を駆動する。   The spindle control circuit 60 receives a spindle rotation command to the machine tool and outputs a spindle speed signal to the spindle amplifier 58. The spindle amplifier 58 receives the spindle speed signal, rotates the spindle motor 56 of the machine tool at the commanded rotational speed, and drives the tool.

スピンドルモータ56には歯車あるいはベルト等でポジションコーダ62が結合され、ポジションコーダ62が主軸の回転に同期して帰還パルスを出力し、その帰還パルスはインタフェース64を経由してCPU12によって読み取られる。時計回路66は現在時刻に同期するように調整された時計装置である。   A position coder 62 is coupled to the spindle motor 56 by a gear or a belt. The position coder 62 outputs a feedback pulse in synchronization with the rotation of the main shaft, and the feedback pulse is read by the CPU 12 via the interface 64. The clock circuit 66 is a clock device adjusted to be synchronized with the current time.

図2は、本発明に係る工作機械の数値制御装置における加工プログラム及び補助プログラムを実行処理するための制御系のブロック系統図を示すものである。   FIG. 2 shows a block system diagram of a control system for executing a machining program and an auxiliary program in the numerical control device for a machine tool according to the present invention.

加工プログラムは工作機械により加工を行う自動運転処理に関するプログラムであり、補助プログラムは加工の準備動作や計測等を行う処理に関するプログラムである。加工プログラムは予め決められた実行周期で実行される。補助プログラムは、加工プログラムの実行周期内において実行される。   The machining program is a program related to automatic operation processing in which machining is performed by a machine tool, and the auxiliary program is a program related to processing for performing machining preparation operation and measurement. The machining program is executed at a predetermined execution cycle. The auxiliary program is executed within the execution cycle of the machining program.

補助プログラムは、それぞれの処理に対応して複数用意されている。複数の補助プログラムは、通常は予め決められた実行順で実行されるが、後述する補助プログラム同士の関連性に応じて実行順が並べ替えられる。なお、補助プログラムは、処理に応じて、1回だけ実行される補助プログラムがある一方、繰り返し実行されるコマンドである継続指令を含む補助プログラムもある。補助プログラムの実行順は、さらにこの継続指令に基づいて並べ替えられる。   A plurality of auxiliary programs are prepared for each process. The plurality of auxiliary programs are normally executed in a predetermined execution order, but the execution order is rearranged according to the relationship between auxiliary programs described later. The auxiliary program includes an auxiliary program that is executed only once according to processing, and there is an auxiliary program that includes a continuation command that is a command that is repeatedly executed. The order of execution of the auxiliary programs is further rearranged based on this continuation command.

図2において示されるプログラム70は、加工プログラム及び補助プログラムであり、SRAM22に格納されている。ここで、プログラム70は、CPU12内の解読部72によって解析(プログラム解析)され、実行データが作成される。次いで、CPU12内の指令要素抽出部74において、プログラム解析された個々の補助プログラムから、他の補助プログラムとの関連性の高さが判断され、その結果は「関連度」としてSRAM22に記憶される。さらにCPU12内の指令要素抽出部74では前記「関連度」及び前記関連性を有する補助プログラム間の実行順を決定する「優先度」が決定され、次いで、加工工程中、繰り返し命令されることを表す「継続指令」の抽出が行われる。これらの関連度、優先度及び継続指令に係るデータは、例えば、図1に示されるRAM18に格納してもよい。さらに、CPU12内の負荷算出部76において、加工プログラムの処理時間と、補助プログラムの処理時間とが算出され、その算出結果はRAM18に格納される。   A program 70 shown in FIG. 2 is a machining program and an auxiliary program, and is stored in the SRAM 22. Here, the program 70 is analyzed (program analysis) by the decoding unit 72 in the CPU 12 to create execution data. Next, in the command element extraction unit 74 in the CPU 12, the degree of relevance with other auxiliary programs is determined from the individual auxiliary programs analyzed by the program, and the result is stored in the SRAM 22 as “relevance”. . Further, the command element extraction unit 74 in the CPU 12 determines the “relevance” and the “priority” for determining the execution order between the auxiliary programs having the relevance, and then repeatedly commands during the machining process. The “continuation command” to be expressed is extracted. Data related to these relevance levels, priority levels, and continuation commands may be stored in, for example, the RAM 18 shown in FIG. Further, the processing time of the machining program and the processing time of the auxiliary program are calculated by the load calculation unit 76 in the CPU 12, and the calculation result is stored in the RAM 18.

そして、CPU12内の実行順算出部78において、前記「関連度」及び「優先度」、さらには「処理時間」及び「継続指令」から、加工プログラム及び補助プログラムの実行順の算出を行う。実行順の算出結果が得られると前記実行順算出部78により算出された実行順に基づいて、実行処理部80を介して加工プログラム及び補助プログラムの実行処理が行われる。   Then, the execution order calculation unit 78 in the CPU 12 calculates the execution order of the machining program and the auxiliary program from the “relevance” and “priority”, as well as “processing time” and “continuation command”. When the execution order calculation result is obtained, the processing program and the auxiliary program are executed through the execution processing unit 80 based on the execution order calculated by the execution order calculation unit 78.

この場合、CPU12内の前記実行処理部80で実行される加工プログラム及び補助プログラムに対して、別異の負荷算出部82により、加工プログラムの処理時間及び補助プログラムの処理時間を計測し、前記実行順算出部78にフィードバックし、適宜加工プログラム及び補助プログラムの実行順の見直しを行ってもよい。   In this case, the processing time of the machining program and the processing time of the auxiliary program are measured by the different load calculation unit 82 for the machining program and the auxiliary program executed by the execution processing unit 80 in the CPU 12, and the execution is performed. The order calculation unit 78 may be fed back and the execution order of the machining program and the auxiliary program may be reviewed as appropriate.

次に、加工プログラム及び複数の補助プログラムの実行順の算出処理の実施例について説明する。   Next, an embodiment of processing for calculating the execution order of the machining program and the plurality of auxiliary programs will be described.

(実施例1)
図3は、補助プログラムの関連度、優先度及びプログラム負荷の算出処理方法を示すものである。図3の上段は各補助プログラムに記載される命令文や変数等のコマンドを示し、中段は指令要素抽出部74により各補助プログラムから抽出した変数を示し、下段は各補助プログラムの関連度、優先度及びプログラム負荷の情報を示す。
Example 1
FIG. 3 shows a calculation processing method for the degree of association, priority, and program load of the auxiliary program. The upper part of FIG. 3 shows commands such as statements and variables described in each auxiliary program, the middle part shows variables extracted from each auxiliary program by the command element extraction unit 74, and the lower part shows the relevance and priority of each auxiliary program. Shows degree and program load information.

図3の上段に示す、各補助プログラムのそれぞれ命令の意味は、次の通りである。なお、本実施例において、補助プログラムの記述は、本出願人が前記特許文献1により提案したNCプログラム形式によるものである。   The meaning of each instruction of each auxiliary program shown in the upper part of FIG. 3 is as follows. In the present embodiment, the description of the auxiliary program is in the NC program format proposed by the present applicant in the aforementioned Patent Document 1.

||1ZDO :補助プログラム1の開始
#100=#5021 :#100にX軸(1軸目)の機械座標値を代入
#101=#5022 :#101にY軸(2軸目)の機械座標値を代入

ZEND :補助プログラム1の終了

||2ZDO :補助プログラム2の開始
N1…
N2…

ZEND :補助プログラム2の終了

||3ZDO :補助プログラム3の開始
#102=#100+#101 :#102に#100と#101の加算結果を代入
N1…
N2…

ZEND :補助プログラム3の終了
|| 1ZDO: Start of auxiliary program 1 # 100 = # 5021: Substitute the machine coordinate value of the X axis (first axis) for # 100 # 101 = # 5022: Machine coordinate of the Y axis (second axis) for # 101 Assign value:
ZEND: End of auxiliary program 1

|| 2ZDO: Start of auxiliary program 2 N1 ...
N2 ...
:
ZEND: End of auxiliary program 2

|| 3ZDO: Start of auxiliary program 3 # 102 = # 100 + # 101: Substitute the addition result of # 100 and # 101 into # 102 N1.
N2 ...
:
ZEND: End of auxiliary program 3

図3の上段に示すコマンドにおいて、指令要素抽出部74では、補助プログラム1乃至3の如き個々の補助プログラムで使用している処理負荷に係る変数が補助プログラム相互間で共通のデータとして使用されていないかが探索される。具体的には、指令要素抽出部74では、プログラム解析結果から補助プログラム1乃至3から変数の抽出が行われる。次に指令要素抽出部74では、補助プログラム同士の関連性の有無が判断される。図3に示す例では、補助プログラム1と補助プログラム3の変数#100と変数#101が共通であるために関連性が高い(有る)と判断され、補助プログラム2では共通する変数がないために関連性が低い(無い)と判断される。次いで指令要素抽出部74では、個々の補助プログラムと他の補助プログラムとの関連性の高さを点数化して保持し、「関連度」を決定する。関連性の高いほど「関連度」は高くなる。この場合、補助プログラム1では補助プログラム3に対して、2つの変数が共通であるために関連度を「2」とする。同様に補助プログラム3は補助プログラム1に対して、2つの変数が共通であるために関連度を「2」とする。一方、補助プログラム2は補助プログラム1及び補助プログラム3に対して変数に共通性がないために関連度は「0」である。   In the command shown in the upper part of FIG. 3, the command element extraction unit 74 uses variables relating to processing loads used in individual auxiliary programs such as the auxiliary programs 1 to 3 as common data between the auxiliary programs. Search for missing. Specifically, the command element extraction unit 74 extracts variables from the auxiliary programs 1 to 3 from the program analysis result. Next, the command element extraction unit 74 determines whether or not the auxiliary programs are related. In the example shown in FIG. 3, since variable # 100 and variable # 101 of auxiliary program 1 and auxiliary program 3 are common, it is determined that they are highly related (present), and there is no common variable in auxiliary program 2. Relevance is judged to be low (no). Next, in the command element extraction unit 74, the degree of relevance between each auxiliary program and other auxiliary programs is scored and held, and the “relevance” is determined. The higher the relevance, the higher the “relevance”. In this case, since the auxiliary program 1 and the auxiliary program 3 share two variables, the degree of association is set to “2”. Similarly, since the auxiliary program 3 has two variables in common with the auxiliary program 1, the degree of association is set to “2”. On the other hand, since the auxiliary program 2 has no common variable to the auxiliary program 1 and the auxiliary program 3, the degree of association is “0”.

次に、指令要素抽出部74において前記のように判断された関連性があった補助プログラムについて、変数を「読み取り」で使用するのか、「書き込み」で使用するのかに従って点数化を行い、「優先度」を決定する。この場合、通常は、書き込みが行われた変数を読み取って、次の条件判定処理を実行するため、「書き込み」の実行順を早くし、「読み取り」の実行順を遅くするように、「優先度」を決定する。すわなち、補助プログラム1では変数#100と#101は書き込み処理であるために優先度は「2」である。一方、補助プログラム3では変数#100と#101は読み取り処理であるために優先度は「−2」である。   Next, the auxiliary program that has been determined to be relevant as described above in the command element extraction unit 74 is scored according to whether the variable is used for “read” or “write”, and “priority” "Degree". In this case, normally, since the variable that has been written is read and the next condition determination process is executed, the priority is set so that the execution order of “write” is advanced and the execution order of “read” is delayed. "Degree". That is, in the auxiliary program 1, since the variables # 100 and # 101 are write processes, the priority is “2”. On the other hand, in the auxiliary program 3, since the variables # 100 and # 101 are reading processes, the priority is “−2”.

次に、負荷算出部76においてプログラム負荷量が算出される。プログラム負荷量とは、加工プログラムの処理時間又は補助プログラムの処理時間である。すなわち、プログラム負荷は、加工プログラム及び補助プログラムの解析段階で個々の命令について、命令の負荷量を推定した、例えば、SRAM22に格納されている図示しないプログラム負荷データテーブルを参照して負荷量を決定し、その積算値を1つのプログラム全体の負荷とする。   Next, the load calculation unit 76 calculates the program load amount. The program load amount is the processing time of the machining program or the processing time of the auxiliary program. That is, the program load is determined with reference to a program load data table (not shown) stored in the SRAM 22, for example, in which the instruction load amount is estimated for each instruction in the analysis stage of the machining program and the auxiliary program. Then, the integrated value is set as the load of one entire program.

図4は、前述した図3に示す実施例1に基づく加工プログラムの実行周期内における補助プログラムの実行順の決定方法を示すものである。図4において、「自動運転実行処理」は、加工プログラムによる工作機械の自動運転に関する実行処理状態を示し、また「補助プログラム1実行処理」、「補助プログラム2実行処理」、「補助プログラム3実行処理」は、加工プログラムの実行周期内に実行される補助プログラムの実行処理状態を示す。   FIG. 4 shows a method for determining the execution order of the auxiliary programs within the machining program execution cycle based on the first embodiment shown in FIG. In FIG. 4, “automatic operation execution processing” indicates an execution processing state related to automatic operation of the machine tool by the machining program, and “auxiliary program 1 execution processing”, “auxiliary program 2 execution processing”, “auxiliary program 3 execution processing”. "" Indicates an execution processing state of the auxiliary program executed within the execution cycle of the machining program.

図4に示すように、実行順算出部78は、加工プログラム及び補助プログラムを実行周期内で実行可能な処理時間を処理負荷の制限値として予め規定する。この場合、加工プログラムの「自動運転実行処理」の処理時間は、別異の負荷算出部82において命令の開始時から完了時までの時間の測定値から処理負荷の測定値として決定される。   As illustrated in FIG. 4, the execution order calculation unit 78 preliminarily defines a processing time during which the machining program and the auxiliary program can be executed within the execution cycle as a processing load limit value. In this case, the processing time of the “automatic operation execution processing” of the machining program is determined as a measured value of the processing load from a measured value of the time from the start to the completion of the command in a different load calculation unit 82.

そこで、実行順算出部78は、加工プログラムの実行周期内で実行される補助プログラム1乃至3のうち、関連度が高い補助プログラム1と補助プログラム3とを、同一の実行周期内で実行できるように、関連度が高い補助プログラムと隣り合って、しかも優先度が高い順になるように、実行順を並び換える(図4参照)。すなわち、実行順は加工プログラム→補助プログラム1→補助プログラム3→加工プログラム→補助プログラム2となり、関連度が低い補助プログラム2の実行処理は次なる実行周期内の処理に回される。   Therefore, the execution order calculation unit 78 can execute the auxiliary program 1 and the auxiliary program 3 having high relevance among the auxiliary programs 1 to 3 executed within the execution cycle of the machining program within the same execution cycle. In addition, the execution order is rearranged so as to be adjacent to the auxiliary program having a high degree of association and in the order of high priority (see FIG. 4). That is, the order of execution is machining program → auxiliary program 1 → auxiliary program 3 → machining program → auxiliary program 2, and the execution process of the auxiliary program 2 having a low degree of relevance is routed to the process in the next execution cycle.

実行処理部80では、このようにして決定された実行順に従って、同一の実行周期内で実行される加工プログラム及び補助プログラムのプログラム負荷が処理負荷の制限値に収まる範囲で、加工プログラム及び補助プログラムの実行処理が行われる。   In the execution processing unit 80, according to the execution order determined in this way, the machining program and the auxiliary program are within a range in which the program load of the machining program and the auxiliary program executed in the same execution cycle falls within the processing load limit value. Is executed.

(実施例2)
図5は、補助プログラムの実行処理が継続的に実行される(「継続指令」のある)場合における、前述した実施例1と同様の自動運転実行処理のための加工プログラムの実行周期内において実行される補助プログラムの関連度、優先度、プログラム負荷の算出処理方法を示すものである。図5の上段は各補助プログラムに記載される命令文や変数を示し、中段は指令要素抽出部74により各補助プログラムから抽出した変数を示し、下段は各補助プログラムの関連度、優先度、プログラム負荷及び継続指令の情報を示す。
(Example 2)
FIG. 5 shows that the execution processing of the auxiliary program is executed continuously (with a “continuation command”), and executed within the execution cycle of the machining program for the automatic operation execution processing similar to that of the first embodiment described above. The calculation method of the relevance level, priority, and program load of the auxiliary program to be executed is shown. The upper part of FIG. 5 shows the statements and variables described in each auxiliary program, the middle part shows the variables extracted from each auxiliary program by the command element extraction unit 74, and the lower part shows the relevance, priority, program of each auxiliary program Indicates information on load and continuation commands.

図5に示す、実施例2の継続指令(「補助プログラム3」参照)のある補助プログラム例のそれぞれ命令の意味は、次の通りである。なお、本実施例においても、補助プログラムの記述は、本出願人が前記特許文献1により提案したNCプログラム形式によるものである。   The meaning of each command in the auxiliary program example having the continuation command (see “auxiliary program 3”) of the second embodiment shown in FIG. 5 is as follows. Also in this embodiment, the description of the auxiliary program is in the NC program format proposed by the present applicant in the above-mentioned Patent Document 1.

||1ZDO :補助プログラム1の開始
#100=#5021 :#100にX軸(1軸目)の機械座標値を代入
#101=#5022 :#101にY軸(2軸目)の機械座標値を代入

ZEND :補助プログラム1の終了

||2ZDO :補助プログラム2の開始
N1…
N2…

ZEND :補助プログラム2の終了

||3ZDO :補助プログラム3の開始
ZEDGE[#100GE#102]ZDO :#100が#102以上になるとZDOからZENDまで実行
N1…
N2…

ZEND :ZEDGE文が成立したらここまで実行
ZEND :補助プログラム3の終了
|| 1ZDO: Start of auxiliary program 1 # 100 = # 5021: Substitute the machine coordinate value of the X axis (first axis) for # 100 # 101 = # 5022: Machine coordinate of the Y axis (second axis) for # 101 Assign value:
ZEND: End of auxiliary program 1

|| 2ZDO: Start of auxiliary program 2 N1 ...
N2 ...
:
ZEND: End of auxiliary program 2

|| 3ZDO: Start of auxiliary program 3 ZEDGE [# 100GE # 102] ZDO: When # 100 becomes # 102 or more, execution from ZDO to ZEND N1 ...
N2 ...
:
ZEND: Execution so far when ZEDGE statement is established ZEND: End of auxiliary program 3

図5における実施例2では、前述した図3に示す実施例1と同様に、関連度、優先度、プログラム負荷の算出処理が営まれ、一方、補助プログラム3には「継続指令」が加わっている。従って、関連度及び優先度の算出は、実施例1と同様に、個々の補助プログラムの関連性と、読み取り及び書き込みの関係で決定される。   In the second embodiment in FIG. 5, as in the first embodiment shown in FIG. 3 described above, the relevancy, priority, and program load calculation processing is performed, while the auxiliary program 3 is added with a “continuation command”. Yes. Therefore, the calculation of the relevance and the priority is determined by the relevance of each auxiliary program and the relationship between reading and writing, as in the first embodiment.

一方、指令要素抽出部74は、補助プログラム中に繰り返し実行処理を行う条件判定やループ処理がある制御文の場合に、「継続指令」とする情報を付加する。そして、「継続指令」を有する補助プログラムのプログラム負荷は、最も負荷が大きくなるパターンを探索し、プログラム負荷とする。   On the other hand, the command element extraction unit 74 adds information to be a “continuation command” in the case of a control statement with condition determination or loop processing for repeatedly executing processing in the auxiliary program. Then, the program load of the auxiliary program having the “continuation command” is searched for a pattern in which the load becomes the largest and is set as the program load.

図6に、図5に示す実施例2に基づく「継続指令」がある補助プログラムの実行周期内における実行順の決定方法を示す。   FIG. 6 shows a method for determining the execution order within the execution cycle of the auxiliary program having the “continuation command” based on the second embodiment shown in FIG.

本実施例2においても、前記実施例1と同様に、実行順算出部78は、実行周期内で加工プログラム及び補助プログラムを実行可能な処理時間を処理負荷の制限値として予め規定する。また、加工プログラムの「自動運転実行処理」の処理時間は、別異の負荷算出部82において命令の開始時から完了時までの時間の測定値から処理負荷の測定値として決定される。   Also in the second embodiment, as in the first embodiment, the execution order calculation unit 78 predefines a processing time during which the machining program and the auxiliary program can be executed within the execution cycle as a processing load limit value. Further, the processing time of the “automatic operation execution processing” of the machining program is determined as a measured value of the processing load from a measured value of the time from the start to the completion of the command in a different load calculation unit 82.

そこで、実行順算出部78は、加工プログラムの実行周期内で実行される補助プログラム1乃至3のうち、関連度が高い補助プログラム1と補助プログラム3を、同一の実行周期内に実行できるように、関連度が高い補助プログラムが隣り合って、しかも優先度が高い順になるように実行順を並び換える(図6参照)。すなわち、実行順は加工プログラム→補助プログラム1→補助プログラム3→加工プログラム→補助プログラム2となり、関連度が低い補助プログラム2の実行処理は次なる実行周期内の処理に回される。   Therefore, the execution order calculation unit 78 can execute the auxiliary program 1 and the auxiliary program 3 having high relevance among the auxiliary programs 1 to 3 executed within the execution cycle of the machining program within the same execution cycle. The order of execution is rearranged so that auxiliary programs having high relevance are adjacent to each other and in descending order of priority (see FIG. 6). That is, the order of execution is machining program → auxiliary program 1 → auxiliary program 3 → machining program → auxiliary program 2, and the execution process of the auxiliary program 2 having a low degree of relevance is routed to the process in the next execution cycle.

実行処理部80では、このようにして決定された実行順に従って、同一の実行周期内で実行される加工プログラム及び補助プログラムのプログラム負荷が処理負荷の制限値に収まる範囲で、加工プログラム及び補助プログラムの実行処理が行われる。   In the execution processing unit 80, according to the execution order determined in this way, the machining program and the auxiliary program are within a range in which the program load of the machining program and the auxiliary program executed in the same execution cycle falls within the processing load limit value. Is executed.

本実施例2においては、「継続指令」は、実行周期内で繰り返し実行されるため、「継続指令」が含まれる補助プログラムが終了するまで、この補助プログラムの実行処理が繰り返し行われる。そして、「継続指令」の場合は、実際に実行する制御文によって、実際の処理負荷時間がプログラム負荷と大きく乖離する可能性がある。   In the second embodiment, since the “continuation command” is repeatedly executed within the execution cycle, the auxiliary program execution process is repeatedly performed until the auxiliary program including the “continuation command” is terminated. In the case of a “continuation command”, the actual processing load time may greatly deviate from the program load depending on the control statement that is actually executed.

そのため、「継続指令」が含まれる補助プログラムでは、別異の負荷算出部82において実行周期内の処理負荷時間の測定を行い、その測定値を使用し、実行処理中において、図7に示すように、プログラム負荷の見直しを行うことが好ましい。   Therefore, in the auxiliary program including the “continuation command”, a different load calculation unit 82 measures the processing load time within the execution cycle, uses the measured value, and executes the execution process as shown in FIG. In addition, it is preferable to review the program load.

図7は、図6に示す実施例2に基づく「継続指令」がある補助プログラムの実行周期内における実行順の決定に対する見直し方法を示すものである。   FIG. 7 shows a review method for determining the execution order within the execution cycle of the auxiliary program having the “continuation command” based on the second embodiment shown in FIG. 6.

すなわち、「継続指令」が含まれる「補助プログラム3実行処理」において、測定された処理負荷時間が小さく、「補助プログラム2実行処理」のプログラム負荷が処理負荷の制限値に収まる場合、実行順算出部78は「補助プログラム2実行処理」を前の実行周期で動作させるように、実行順の見直しを行う。すなわち、実行順は加工プログラム→補助プログラム1→補助プログラム3→補助プログラム2→加工プログラムとなる。これによって処理負荷の制限値に対して実際の処理負荷時間が乖離しないように、実行順を決定することができる。   That is, in the “auxiliary program 3 execution process” including the “continuation command”, when the measured processing load time is small and the program load of the “auxiliary program 2 execution process” falls within the processing load limit value, the execution order is calculated. The unit 78 reviews the execution order so that the “auxiliary program 2 execution process” is operated in the previous execution cycle. That is, the execution order is machining program → auxiliary program 1 → auxiliary program 3 → auxiliary program 2 → machining program. As a result, the execution order can be determined so that the actual processing load time does not deviate from the limit value of the processing load.

以上、本発明の好適な実施形態についてそれぞれ説明したが、本発明は前述した実施形態に限定されることなく、本発明の要旨を逸脱しない範囲において種々設計変更が可能であることは言うまでもない。   The preferred embodiments of the present invention have been described above, but the present invention is not limited to the above-described embodiments, and it goes without saying that various design changes can be made without departing from the scope of the present invention.

10…数値制御装置 12…CPU
14…ROM 18…RAM
20…LCD/MDIユニット 22…SRAM
30…I/Oユニット 38、40、42…サーボモータ
44、46、48…サーボアンプ 50、52、54…軸制御回路
56…スピンドルモータ 58…スピンドルアンプ
60…スピンドル制御回路 70…プログラム
72…解読部 74…指令要素抽出部
76…負荷算出部 78…実行順算出部
80…実行処理部 82…別異の負荷算出部
10 ... Numerical control device 12 ... CPU
14 ... ROM 18 ... RAM
20 ... LCD / MDI unit 22 ... SRAM
30 ... I / O unit 38, 40, 42 ... Servo motor 44, 46, 48 ... Servo amplifier 50, 52, 54 ... Axis control circuit 56 ... Spindle motor 58 ... Spindle amplifier 60 ... Spindle control circuit 70 ... Program 72 ... Decoding Unit 74 ... Command element extraction unit 76 ... Load calculation unit 78 ... Execution order calculation unit 80 ... Execution processing unit 82 ... Different load calculation unit

Claims (10)

予め決められた実行周期で加工プログラムを実行するとともに、前記実行周期内において、複数の補助プログラムのうち1つ以上の前記補助プログラムを実行する工作機械の数値制御装置であって、
前記加工プログラム及び複数の前記補助プログラムの各々を解析する解読部と、
前記解読部の解析結果に基づいて、前記補助プログラム同士の関連性の有無を判断する指令要素抽出部と、
前記解読部の解析結果に基づいて、前記加工プログラムの処理時間及び複数の前記補助プログラムの各々の処理時間を算出する負荷算出部と、
互いに前記関連性を有する前記補助プログラムを同一の前記実行周期内で実行するように、前記加工プログラムの処理時間及び複数の前記補助プログラムの各々の処理時間に応じて、前記加工プログラム及び複数の前記補助プログラムの実行順を算出する実行順算出部と、
算出された前記実行順に従って、前記加工プログラム及び前記補助プログラムを実行する実行処理部と、
を備える工作機械の数値制御装置。
A numerical control device for a machine tool that executes a machining program at a predetermined execution cycle and executes one or more auxiliary programs among a plurality of auxiliary programs within the execution cycle,
A decoding unit for analyzing each of the machining program and the plurality of auxiliary programs;
Based on the analysis result of the decoding unit, a command element extraction unit that determines the presence or absence of relevance between the auxiliary programs,
Based on the analysis result of the decoding unit, a load calculation unit that calculates the processing time of the machining program and the processing time of each of the plurality of auxiliary programs,
According to the processing time of the machining program and the processing time of each of the plurality of auxiliary programs, so as to execute the auxiliary programs having the relation to each other within the same execution cycle, An execution order calculation unit for calculating the execution order of the auxiliary program;
An execution processing unit for executing the machining program and the auxiliary program according to the calculated execution order;
A numerical control device for a machine tool comprising:
請求項1に記載の工作機械の数値制御装置であって、
前記指令要素抽出部は、前記解読部の解析結果に基づいて、二以上の前記補助プログラムにおいて共通で使用している変数を抽出し、前記変数を共通で使用している前記補助プログラム同士を前記関連性有りと決定する工作機械の数値制御装置。
A numerical control device for a machine tool according to claim 1,
The command element extraction unit extracts variables commonly used in two or more auxiliary programs based on the analysis result of the decoding unit, and the auxiliary programs commonly using the variables are A numerical control device for machine tools that is determined to be relevant.
請求項2に記載の工作機械の数値制御装置であって、
前記指令要素抽出部は、前記解読部の解析結果に基づいて、共通で使用している前記変数が多いほど、前記関連性を有する前記補助プログラム間の関連度を高く設定し、
前記実行順算出部は、前記関連度が高い前記補助プログラム同士が隣り合うように前記実行順を算出する工作機械の数値制御装置。
A numerical control device for a machine tool according to claim 2,
Based on the analysis result of the decoding unit, the command element extraction unit sets a higher degree of association between the auxiliary programs having the association as the number of variables used in common increases.
The execution order calculation unit is a numerical control device for a machine tool that calculates the execution order so that the auxiliary programs having high relevance are adjacent to each other.
請求項3に記載の工作機械の数値制御装置であって、
前記指令要素抽出部は、前記解読部の解析結果に基づいて、前記関連性を有する前記補助プログラム間の実行順を決める優先度を設定し、
前記実行順算出部は、前記関連度が高い前記補助プログラム同士が隣り合い、且つ、前記優先度が高い順となるように、前記実行順を算出する工作機械の数値制御装置。
A numerical control device for a machine tool according to claim 3,
The command element extraction unit sets a priority for determining an execution order between the auxiliary programs having the relevance based on the analysis result of the decoding unit,
The execution order calculation unit is a numerical control device for a machine tool that calculates the execution order so that the auxiliary programs having a high degree of association are adjacent to each other and the order of priority is high.
請求項4に記載の工作機械の数値制御装置であって、
前記指令要素抽出部は、前記変数を共通で使用している前記補助プログラムの各々について、共通で使用している前記変数を書き込みで使用しているのか、共通で使用している前記変数を読み込みで使用しているのかを判断し、共通で使用している前記変数を書き込みで使用している前記補助プログラムの前記優先度を、共通で使用している前記変数を読み込みで使用している前記補助プログラムの前記優先度よりも高く設定する工作機械の数値制御装置。
A numerical control device for a machine tool according to claim 4,
For each of the auxiliary programs that use the variable in common, the command element extraction unit uses the variable that is used in common for writing or reads the variable that is used in common The priority of the auxiliary program that is used in writing the variable that is used in common is used, and the variable that is used in common is used in the reading A numerical control device for a machine tool that is set higher than the priority of the auxiliary program.
請求項1〜5のいずれか1項に記載の工作機械の数値制御装置であって、
前記加工プログラム及び前記補助プログラムが前記実行処理部において実行されているときに、前記加工プログラムの処理時間及び前記補助プログラムの処理時間を計測する別異の負荷算出部を有し、
前記実行順算出部は、前記別異の負荷算出部が計測した前記加工プログラムの処理時間及び前記補助プログラムの処理時間に基づいて、前記実行順を見直す工作機械の数値制御装置。
A numerical control device for a machine tool according to any one of claims 1 to 5,
When the machining program and the auxiliary program are being executed in the execution processing unit, it has a different load calculation unit that measures the processing time of the machining program and the processing time of the auxiliary program,
The execution order calculation unit is a numerical control device for a machine tool that reviews the execution order based on the processing time of the machining program and the processing time of the auxiliary program measured by the different load calculation unit.
請求項1〜5のいずれか1項に記載の工作機械の数値制御装置であって、
前記指令要素抽出部は、前記解読部の解析結果に基づいて、繰り返し処理を行う命令を示す継続指令を抽出し、
前記実行順算出部は、前記継続指令を有する前記補助プログラムが前記実行処理部において繰り返し実行されるように前記実行順を算出する工作機械の数値制御装置。
A numerical control device for a machine tool according to any one of claims 1 to 5,
The command element extraction unit extracts a continuation command indicating a command to perform repeated processing based on the analysis result of the decoding unit,
The execution order calculation unit is a numerical control device for a machine tool that calculates the execution order so that the auxiliary program having the continuation command is repeatedly executed in the execution processing unit.
請求項7に記載の工作機械の数値制御装置であって、
前記継続指令を有する前記補助プログラムが前記実行処理部において実行されているときに、前記継続指令を有する前記補助プログラムの処理時間を計測する別異の負荷算出部を有し、
前記実行順算出部は、前記別異の負荷算出部が計測した前記継続指令を有する前記補助プログラムの処理時間に基づいて、前記実行順を見直す工作機械の数値制御装置。
A numerical control device for a machine tool according to claim 7,
When the auxiliary program having the continuation command is being executed in the execution processing unit, the load processing unit has a different load calculating unit that measures the processing time of the auxiliary program having the continuation command,
The execution order calculation unit is a numerical control device for a machine tool that reviews the execution order based on a processing time of the auxiliary program having the continuation command measured by the different load calculation unit.
請求項1〜8のいずれか1項に記載の工作機械の数値制御装置であって、
前記実行順算出部は、前記実行周期内で前記加工プログラム及び前記補助プログラムを実行可能な処理時間を処理負荷の制限値として設定し、前記加工プログラムの処理時間と、前記実行周期内で実行される前記補助プログラムの処理時間との合計が前記制限値以下となるように、前記実行順を算出する工作機械の数値制御装置。
A numerical control device for a machine tool according to any one of claims 1 to 8,
The execution order calculation unit sets a processing time during which the machining program and the auxiliary program can be executed within the execution cycle as a processing load limit value, and is executed within the processing program processing time and the execution cycle. A numerical control device for a machine tool that calculates the execution order so that a total with a processing time of the auxiliary program is equal to or less than the limit value.
請求項1〜9のいずれか1項に記載の工作機械の数値制御装置であって、
前記負荷算出部は、前記加工プログラムが前記実行処理部において実行されているときに、前記加工プログラムの処理時間を計測し、
前記実行順算出部は、計測された前記加工プログラムの処理時間に応じて、前記実行順を算出する工作機械の数値制御装置。
A numerical control device for a machine tool according to any one of claims 1 to 9,
The load calculating unit measures a processing time of the machining program when the machining program is being executed in the execution processing unit,
The execution order calculation unit is a numerical control device for a machine tool that calculates the execution order according to the measured processing time of the machining program.
JP2016234809A 2016-02-29 2016-12-02 Numerical control device for machine tools Active JP6316919B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
DE102017001765.4A DE102017001765A1 (en) 2016-02-29 2017-02-23 NUMERICAL CONTROL FOR TOOL MACHINE
US15/440,210 US10120363B2 (en) 2016-02-29 2017-02-23 Numerical controller for machine tool
CN201710126354.4A CN107132818B (en) 2016-02-29 2017-02-27 The numerical control device of lathe

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2016036871 2016-02-29
JP2016036871 2016-02-29

Publications (2)

Publication Number Publication Date
JP2017157194A true JP2017157194A (en) 2017-09-07
JP6316919B2 JP6316919B2 (en) 2018-04-25

Family

ID=59810627

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016234809A Active JP6316919B2 (en) 2016-02-29 2016-12-02 Numerical control device for machine tools

Country Status (1)

Country Link
JP (1) JP6316919B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE112018004199T5 (en) 2017-08-16 2020-04-30 Sumitomo Electric Industries, Ltd. Control device, control method and computer program
JP7460357B2 (en) 2019-11-15 2024-04-02 ファナック株式会社 Control device and control system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001034320A (en) * 1999-07-26 2001-02-09 Mitsubishi Electric Corp Numerical controller
JP2001043096A (en) * 1999-07-29 2001-02-16 Atr Adaptive Communications Res Lab Scheduling method in software real time

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001034320A (en) * 1999-07-26 2001-02-09 Mitsubishi Electric Corp Numerical controller
JP2001043096A (en) * 1999-07-29 2001-02-16 Atr Adaptive Communications Res Lab Scheduling method in software real time

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE112018004199T5 (en) 2017-08-16 2020-04-30 Sumitomo Electric Industries, Ltd. Control device, control method and computer program
JP7460357B2 (en) 2019-11-15 2024-04-02 ファナック株式会社 Control device and control system

Also Published As

Publication number Publication date
JP6316919B2 (en) 2018-04-25

Similar Documents

Publication Publication Date Title
JP5000543B2 (en) Machine tool control method and apparatus therefor
JP6469065B2 (en) Machine learning device and machining time prediction device
JP4374045B2 (en) Numerical control device with program restart function
JP6802213B2 (en) Tool selection device and machine learning device
JP3827951B2 (en) NC program optimization method and apparatus in NC machining
JP2020071734A (en) Numerical control device
US9429928B2 (en) Control method, non-transitory computer readable medium and controller of numerical control machine tool
JP2003256009A (en) Optimum data conversion method for nc program and numerical control machine tool with optimum data conversion means
JP2009509780A (en) Methods for optimization of machining processes in machines
US10114363B2 (en) Numerical controller capable of partial correction of machining cycle
CN113950651A (en) Information processing apparatus, information processing method, and information processing program
US20120324415A1 (en) System Comprising Development Environments And Machine Controls
JP2018512630A (en) How to monitor machine tools
JP6316919B2 (en) Numerical control device for machine tools
JP2009122852A (en) Numerical controller for storing operating history during path table operation
US9823644B2 (en) Numerical control device and numerical control system
US10120363B2 (en) Numerical controller for machine tool
CN105278463B (en) The numerical control device operated based on sheet form data
US10241501B2 (en) Numerical controller having automatic trace function of related signal in association with NC program operation
JP2008071015A (en) Numerical controller
US20190086888A1 (en) Controller and machine learning device
JP6823032B2 (en) Program modifier
JP4112433B2 (en) Numerical control device for machine tool and numerical control method for machine tool
JP5763352B2 (en) NC program creation device
JP6568152B2 (en) Numerical controller

Legal Events

Date Code Title Description
TRDD Decision of grant or rejection written
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180228

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180306

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180328

R150 Certificate of patent or registration of utility model

Ref document number: 6316919

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150