JPH0573125A - Work monitoring system for nc machine tool - Google Patents

Work monitoring system for nc machine tool

Info

Publication number
JPH0573125A
JPH0573125A JP3258735A JP25873591A JPH0573125A JP H0573125 A JPH0573125 A JP H0573125A JP 3258735 A JP3258735 A JP 3258735A JP 25873591 A JP25873591 A JP 25873591A JP H0573125 A JPH0573125 A JP H0573125A
Authority
JP
Japan
Prior art keywords
program
machine tool
sequence number
machining
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP3258735A
Other languages
Japanese (ja)
Inventor
Yukio Ono
幸男 小野
Yujiro Honda
裕次郎 本田
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 JP3258735A priority Critical patent/JPH0573125A/en
Publication of JPH0573125A publication Critical patent/JPH0573125A/en
Pending legal-status Critical Current

Links

Landscapes

  • General Factory Administration (AREA)
  • Testing And Monitoring For Control Systems (AREA)
  • Numerical Control (AREA)

Abstract

PURPOSE:To easily detect the position of abnormality generated at a work and a work program generating the abnormality. CONSTITUTION:A controller on the side of an NC machine tool 2 detects the operating state of the machine tool, the state is successively updated and stored in a state data storage memory, and each time the change of a program number of a sequence number is detected, the values of the respective numbers are updated and stored in a program number storage register RM and a sequence number storage register RS. The NC machine tool 2 is successively polled by the processing of a cell controller 1, and the contents of the register RM or RS and the state data storage memory are read for each prescribed cycle and time sequentially stored in a process monitor file Fj of a nonvolatile RAM. The process monitor file Fj is outputted to a CRT display device or a printer by operating a keyboard, the program number of sequence number of a work program executed in the case of raising an alarm is detected, the abnormal part of the work is specified, and the work program is corrected.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、NC工作機械の加工監
視方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a machining monitoring system for NC machine tools.

【0002】[0002]

【従来の技術】各種NC工作機械、例えば、NCフライ
スやNC旋盤からのアラーム信号により工作機械側表示
画面への異常表示や警報音の出力を行うことで加工の異
常を知らせるようにした加工監視方式が既に公知であ
る。
2. Description of the Related Art Machining monitoring in which abnormality of machining is notified by displaying an abnormality on a machine tool display screen or outputting an alarm sound by an alarm signal from various NC machine tools such as NC milling machines and NC lathes. The scheme is already known.

【0003】[0003]

【発明が解決しようとする課題】従来の加工監視方式に
おいては、単純な異常表示や警報音の出力で加工の異常
を知らせるのみであったため、異常の発生したワークや
異常の発生箇所、および、異常発生時に実行されていた
加工プログラムの特定が難しく、異常原因の究明が困難
で、加工プログラムに適切な修正を加えることも容易で
なく、往々にして同じような異常発生を繰返すこととな
り、加工効率の点でも問題があった。
In the conventional machining monitoring method, since the machining abnormality is only notified by the simple abnormality display and the output of the alarm sound, the workpiece in which the abnormality occurs, the location where the abnormality occurs, and the It is difficult to identify the machining program that was being executed when the abnormality occurred, it was difficult to determine the cause of the abnormality, and it was not easy to make appropriate corrections to the machining program. There was also a problem in terms of efficiency.

【0004】そこで、本発明の目的は、これら従来技術
の欠点を解消し、異常の発生したワークや異常の発生箇
所、および、異常の発生した加工プログラムを容易に検
出することのできるNC工作機械の加工監視方式を提供
することにある。
Therefore, an object of the present invention is to solve these drawbacks of the prior art and to easily detect an abnormal work piece, an abnormal place and an abnormal machining program. It is to provide the processing monitoring method of.

【0005】[0005]

【課題を解決するための手段】本発明の加工監視方式
は、NC工作機械の制御装置によりNC工作機械の動作
状態を検出する一方、少なくとも、加工プログラムの実
行ブロックが更新される毎に実行中の加工プログラム位
置を特定するデータを検出し、該制御装置における管理
用の記憶手段またはセルコントローラにおける管理用の
記憶手段に各NC工作機械毎の検出データを所定周期毎
時系列で記憶することにより前記目的を達成した。
According to the machining monitoring method of the present invention, while the operation state of the NC machine tool is detected by the controller of the NC machine tool, at least every time the execution block of the machining program is updated, the operation is being executed. By detecting the data for specifying the machining program position and storing the detected data for each NC machine tool in the management storage means in the control device or the management storage means in the cell controller in a time series at predetermined intervals. Achieved the purpose.

【0006】加工プログラム位置を特定するデータとし
て、実行中の加工プログラムのプログラム番号とブロッ
クのシーケンス番号、または、実行中の加工プログラム
のメインプログラム番号とサブプログラム番号およびブ
ロックのシーケンス番号を用いる。
As data for specifying the machining program position, the program number of the machining program being executed and the sequence number of the block, or the main program number and sub program number of the machining program being executed and the sequence number of the block are used.

【0007】加工プログラムにメインプログラムとサブ
プログラムの区別がない場合は、実行中の加工プログラ
ムの階層をNC工作機械の制御装置により自動的に識別
し、加工プログラム位置を特定するデータとして、実行
中の加工プログラムのプログラム番号とその階層および
実行ブロックのシーケンス番号を用いるようにする。
When the machining program has no distinction between the main program and the sub-program, the hierarchy of the machining program being executed is automatically identified by the control unit of the NC machine tool, and is being executed as data for specifying the position of the machining program. The program number of the machining program, its hierarchy, and the sequence number of the execution block are used.

【0008】また、加工プログラムにおけるシーケンス
番号が未設定のブロックに対しては、実行中のブロック
の位置をNC工作機械の制御装置により自動的に検出
し、該識別番号をシーケンス番号として設定し、加工プ
ログラム位置を特定するデータとして、実行中の加工プ
ログラムのプログラム番号とその階層ならびにシーケン
ス番号を用いる。
Further, for a block for which a sequence number is not set in the machining program, the position of the block being executed is automatically detected by the controller of the NC machine tool, and the identification number is set as the sequence number, As data for identifying the machining program position, the program number of the machining program being executed, its hierarchy and sequence number are used.

【0009】[0009]

【作用】NC工作機械の制御装置によりNC工作機械の
動作状態を検出し、また、少なくとも、加工プログラム
の実行ブロックが更新される毎に、該制御装置により実
行中の加工プログラム位置を特定するデータを検出す
る。NC工作機械の制御装置またはセルコントローラ
は、管理用の記憶手段に各NC工作機械毎の検出データ
を所定周期毎時系列で記憶する。
Data for detecting the operating state of the NC machine tool by the controller of the NC machine tool, and at least each time the execution block of the machining program is updated, data for specifying the position of the machining program being executed by the controller. To detect. The control device or cell controller of the NC machine tool stores the detection data for each NC machine tool in a management storage means in a time series at predetermined intervals.

【0010】加工プログラム位置を特定するデータとし
て実行中の加工プログラムのプログラム番号と実行ブロ
ックのシーケンス番号を用いると、時系列で記憶された
加工プログラム番号の推移によりプログラム全体の流れ
を容易に把握することができ、また、各加工プログラム
における実行ブロックとNC工作機械の動作状態との関
係を容易に把握することができる。
If the program number of the machining program being executed and the sequence number of the execution block are used as the data for specifying the machining program position, the flow of the entire program can be easily grasped by the transition of the machining program number stored in time series. Further, the relationship between the execution block in each machining program and the operating state of the NC machine tool can be easily grasped.

【0011】また、加工プログラム位置を特定するデー
タとして実行中の加工プログラムのメインプログラム番
号とサブプログラム番号および実行ブロックのシーケン
ス番号を用いると、プログラム全体の流れに加え、更
に、メインプログラムとサブプログラムとの間でのプロ
グラムの推移を容易に把握することができ、しかも、各
加工プログラムにおける実行ブロックとNC工作機械の
動作状態との関係を容易に把握することができる。
If the main program number and the sub program number of the machining program being executed and the sequence number of the execution block are used as the data for specifying the machining program position, in addition to the flow of the entire program, the main program and the sub program are further added. It is possible to easily grasp the transition of the program between and, and moreover, it is possible to easily grasp the relationship between the execution block in each machining program and the operating state of the NC machine tool.

【0012】更に、実行中の加工プログラムの階層をN
C工作機械の制御装置により自動的に識別して加工プロ
グラム位置を特定するデータとして用いることにより、
メインプログラムとサブプログラムとの区別が加工プロ
グラムに定義されていない場合でも、独立したプログラ
ム間でのプログラムの推移を容易に把握することができ
る。
Furthermore, the hierarchy of the machining program being executed is set to N
C By automatically identifying by the control device of the machine tool and using as the data to specify the machining program position,
Even if the main program and the sub program are not defined in the machining program, it is possible to easily grasp the transition of the programs between the independent programs.

【0013】また、実行中のブロックの位置をNC工作
機械の制御装置により自動的に検出し、該識別番号をシ
ーケンス番号として設定すると共に、このシーケンス番
号を加工プログラム位置を特定するデータとして用いる
ことにより、加工プログラムにおけるシーケンス番号が
未設定の場合でも、各加工プログラムにおける実行ブロ
ックを特定してNC工作機械の動作状態との関係を容易
に把握することができる。
Also, the position of the block being executed is automatically detected by the controller of the NC machine tool, the identification number is set as a sequence number, and this sequence number is used as data for specifying the machining program position. Thus, even when the sequence number in the machining program is not set, the execution block in each machining program can be specified and the relationship with the operating state of the NC machine tool can be easily grasped.

【0014】[0014]

【実施例】図1は本発明の方式を適用した一実施例装置
の加工監視システムを示すブロック図であり、システム
全体は、制御装置を備えた複数のNC工作機械2とNC
工作機械2の各々に対しデータ伝送路3を介して接続さ
れた単一のセルコントローラ1によって構成される。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a block diagram showing a machining monitoring system of an apparatus according to an embodiment to which the method of the present invention is applied. The entire system includes a plurality of NC machine tools 2 and NC equipped with a controller.
A single cell controller 1 is connected to each of the machine tools 2 via a data transmission path 3.

【0015】NC工作機械2の制御装置はマイクロプロ
セッサや各種のメモリおよびデータ伝送路3との間の入
出力インターフェイス等を備えた通常の数値制御装置
で、従来と同様のアラーム検出機能を有し、予め設定さ
れた加工プログラムを順次実行して工作機械の各部を駆
動制御することにより所定のワーク加工を実施するもの
である。また、制御装置はマイクロプロセッサの処理に
より運転中の工作機械の各種動作状態を検出し、アラー
ム発生の有無と種別および前記動作状態の検出データの
各々を制御装置の状態データ記憶メモリに逐次更新記憶
するようになっている。
The control device of the NC machine tool 2 is an ordinary numerical control device having a microprocessor, various memories, an input / output interface with the data transmission line 3, and the like, and has an alarm detection function similar to the conventional one. The predetermined machining program is carried out by sequentially executing preset machining programs to drive and control the respective parts of the machine tool. Further, the control device detects various operating states of the machine tool in operation by the processing of the microprocessor, and sequentially updates and stores the presence / absence of an alarm, the type, and the detection data of the operating state in the state data storage memory of the control device. It is supposed to do.

【0016】図4は状態データ記憶メモリの一例を示す
概念図で、この実施例においては、運転モード,軸移動
状態,アラーム状態,送りオーバーライド,主軸オーバ
ーライド,主軸回転および時刻の各現在データが状態デ
ータ記憶メモリに更新記憶されるようになっている。運
転モードは手動運転または自動運転等の選択状況を示す
データで、通常、制御装置操作盤のスイッチング動作に
対応して変化する。また、軸移動状態は工具の切削移動
や早送りおよびドゥウェル等の状態を示すデータで、送
りオーバーライドおよび主軸オーバーライドの各々は、
工具送り速度や主軸回転数の値をオーバーライド値(百
分率)で示すデータである。また、主軸回転は主軸の回
転方向を示すデータであり、軸移動状態,送りオーバー
ライド,主軸オーバーライドおよび主軸回転の各データ
は、通常、加工プログラムの実行時においてプログラム
上の指令に対応して変化するようになっている。また、
アラーム検出機能は、不良プログラムの読込み等によっ
て運転不能となったときやマイクロプロセッサによりサ
ーボ系の異常が検出されたときに作動し、これに対応し
て状態データ記憶メモリのアラーム欄に異常の種別に対
応したコードが記憶される。また、制御装置に配備され
た時計装置からの現在時刻データは状態データ記憶メモ
リの時刻欄に所定周期毎更新して記憶されるようになっ
ている。
FIG. 4 is a conceptual diagram showing an example of the state data storage memory. In this embodiment, the current data of the operation mode, the axis movement state, the alarm state, the feed override, the spindle override, the spindle rotation and the time are the states. It is adapted to be updated and stored in the data storage memory. The operation mode is data indicating the selection status of manual operation or automatic operation, and normally changes in accordance with the switching operation of the control device operation panel. In addition, the axis movement state is data that indicates the cutting movement of the tool, the state of fast-forwarding, and the dwell, etc.
It is data showing the values of the tool feed speed and the spindle rotation speed as override values (percentage). Further, the spindle rotation is data indicating the rotation direction of the spindle, and each data of the axis movement state, feed override, spindle override, and spindle rotation normally changes in response to a program command when the machining program is executed. It is like this. Also,
The alarm detection function is activated when the system becomes inoperable due to the reading of a defective program, or when the microprocessor detects an abnormality in the servo system. Correspondingly, the alarm type in the status data storage memory indicates the type of abnormality. The code corresponding to is stored. The current time data from the timepiece device provided in the control device is updated and stored in the time field of the state data storage memory at predetermined intervals.

【0017】図2はセルコントローラ1の要部を示すブ
ロック図であり、該セルコントローラ1は、制御手段と
してのプロセッサ10,ROM11,RAM12および
キーボード15やデータ伝送路3との間の入出力インタ
ーフェイス14の他、管理用の記憶手段となる不揮発性
RAM13ならびにデータ出力手段となるCRT表示装
置16およびプリンタ17を備える。以下、セルコント
ローラ1側のプロセッサをCPU10、また、NC工作
機械2のプロセッサを制御装置側CPUと表記して区別
する。
FIG. 2 is a block diagram showing a main part of the cell controller 1. The cell controller 1 is an input / output interface with the processor 10, the ROM 11, the RAM 12, the keyboard 15 and the data transmission path 3 as control means. 14, a non-volatile RAM 13 that serves as a storage means for management, a CRT display device 16 that serves as a data output means, and a printer 17 are provided. Hereinafter, the processor on the side of the cell controller 1 will be referred to as a CPU 10, and the processor of the NC machine tool 2 will be referred to as a CPU on the control device side to distinguish them.

【0018】次に、前述の構成に基き、加工プログラム
位置を特定するデータとして、実行中の加工プログラム
のプログラム番号とブロックのシーケンス番号を用いる
ようにした第1実施例の加工監視方式について説明す
る。この実施例は実行中のプログラムがメインプログラ
ムにあるかサブプログラムにあるかを特に識別せず、時
系列で記憶された加工プログラム番号の推移によりプロ
グラム全体の流れを明確にして加工プログラムにおける
各ブロックとNC工作機械の動作状態との関係を把握で
きるようにしたものであり、各NC工作機械2の制御装
置は、状態データ記憶メモリに加え、プログラム番号記
憶レジスタRMおよびシーケンス番号記憶レジスタRS
を有する(図5参照)。
Next, the machining monitoring system of the first embodiment in which the program number of the machining program being executed and the sequence number of the block are used as the data for specifying the machining program position based on the above-mentioned configuration will be described. .. In this embodiment, whether the program being executed is in the main program or in the sub program is not particularly identified, and the flow of the entire program is clarified by the transition of the machining program number stored in time series, and each block in the machining program is clarified. And the operating state of the NC machine tool, the control device of each NC machine tool 2 has a program number storage register RM and a sequence number storage register RS in addition to the state data storage memory.
(See FIG. 5).

【0019】図3は第1実施例における各NC工作機械
2の制御装置側CPUが加工プログラムの実行中に所定
周期毎繰返して実行する「プログラム位置特定データ検
出処理」の概略を示すフローチャートである。
FIG. 3 is a flow chart showing an outline of the "program position specifying data detecting process" which is repeatedly executed by the control unit side CPU of each NC machine tool 2 in the first embodiment every predetermined period during execution of the machining program. ..

【0020】「プログラム位置特定データ検出処理」を
開始した制御装置側CPUは、まず、実行中の加工ブロ
ックに関するプログラム番号が変化したか否かを判別し
(ステップS01)、プログラム番号が変化していれ
ば、新たなプログラム番号を制御装置側のプログラム番
号記憶レジスタRMに更新記憶する一方(ステップS0
2)、プログラム番号に変化がなければ、プログラム番
号記憶レジスタRMの値をそのまま保持する。そして、
更に、実行中の加工ブロックに関するシーケンス番号が
変化したか否かを判別し(ステップS03)、シーケン
ス番号が変化していれば、新たなシーケンス番号を制御
装置側のシーケンス番号記憶レジスタRSに更新記憶す
る一方(ステップS04)、シーケンス番号に変化がな
ければ、シーケンス番号記憶レジスタRSの値をそのま
ま保持する。従って、制御装置側のプログラム番号記憶
レジスタRMの値は独立した新たな加工プログラムが開
始される毎に更新され、また、シーケンス番号記憶レジ
スタRSの値は各プログラム内で新たなブロックが開始
される毎に更新される結果となる。
The control unit side CPU that has started the "program position specifying data detection process" first determines whether or not the program number of the machining block being executed has changed (step S01), and the program number has changed. If so, the new program number is updated and stored in the program number storage register RM on the control device side (step S0
2) If there is no change in the program number, the value of the program number storage register RM is held as it is. And
Further, it is determined whether or not the sequence number regarding the machining block being executed has changed (step S03), and if the sequence number has changed, a new sequence number is updated and stored in the sequence number storage register RS on the control device side. On the other hand (step S04), if there is no change in the sequence number, the value of the sequence number storage register RS is held as it is. Therefore, the value of the program number storage register RM on the control device side is updated every time a new independent machining program is started, and the value of the sequence number storage register RS starts a new block in each program. The result is updated every time.

【0021】例えば、NC工作機械2の一つが図17に
示されるような加工プログラムに従って加工を実施する
とすれば、まず、メインプログラム001が開始された
段階でプログラム番号記憶レジスタRMに001が記憶
され、また、メインプログラム001における第1ブロ
ックのシーケンス番号MS1がシーケンス番号記憶レジ
スタRSに記憶される。以下、メインプログラム001
における次ブロックの処理が開始される毎にシーケンス
番号記憶レジスタRSの値のみがMS2,MS3,MS
4,…と変化して行き、メインプログラム001におけ
る第4ブロックの指令でサブプログラム002への移行
が実施されると、プログラム番号記憶レジスタRMに0
02が更新記憶されることとなる。このときシーケンス
番号の値もMS4からSF1に変化するので、シーケン
ス番号記憶レジスタRSにはSF1が更新記憶される。
For example, if one of the NC machine tools 2 performs machining according to a machining program as shown in FIG. 17, first, 001 is stored in the program number storage register RM at the stage when the main program 001 is started. The sequence number MS1 of the first block in the main program 001 is stored in the sequence number storage register RS. Below, the main program 001
Each time the processing of the next block in is started, only the value of the sequence number storage register RS is MS2, MS3, MS.
4 and so on, and when the transition to the subprogram 002 is executed by the command of the fourth block in the main program 001, 0 is set in the program number storage register RM.
02 will be updated and stored. At this time, the value of the sequence number also changes from MS4 to SF1, so SF1 is updated and stored in the sequence number storage register RS.

【0022】一方、セルコントローラ1のCPU10
は、各NC工作機械2の制御装置側CPUを所定周期毎
に順次ポーリングしており、ポーリングしたNC工作機
械2のプログラム番号記憶レジスタRMの値とシーケン
ス番号記憶レジスタRSの値ならびに制御装置の状態デ
ータ記憶メモリにおける現在内容を読込んで、このNC
工作機械に対応して不揮発性RAM13内に設定された
工程監視ファイルFjに各検出データを時系列で格納し
て行くが、セルコントローラ1のCPU10が各NC工
作機械2を一巡してポーリングする時間は制御装置側C
PUが1ブロックの処理を実行する時間に比べて短く設
定されているので、少なくとも、加工プログラム上の1
ブロックの処理が実行される毎に、該NC工作機械2の
プログラム番号記憶レジスタRMの値とシーケンス番号
記憶レジスタRSの値ならびに状態データ記憶メモリの
現在値が工程監視ファイルFjに記憶されることとな
る。
On the other hand, the CPU 10 of the cell controller 1
Sequentially polls the control device side CPU of each NC machine tool 2 every predetermined period, and the values of the program number storage register RM and the sequence number storage register RS of the NC machine tool 2 that have been polled and the state of the control device This NC is read by reading the current contents in the data storage memory.
Each detection data is stored in time series in the process monitoring file Fj set in the non-volatile RAM 13 corresponding to the machine tool, but the time when the CPU 10 of the cell controller 1 goes around each NC machine tool 2 and polls. Is the control device side C
Since the PU is set shorter than the time to execute the processing of one block, at least 1 in the machining program is set.
Each time the processing of the block is executed, the value of the program number storage register RM and the value of the sequence number storage register RS of the NC machine tool 2 and the current value of the state data storage memory are stored in the process monitoring file Fj. Become.

【0023】図6はNC工作機械2が図17に示される
ような加工プログラムに従って加工を実施したときに工
程監視ファイルFjに記憶されるプログラム番号とシー
ケンス番号の値を示す概念図である。なお、図6ではセ
ルコントローラ1のCPU10が各NC工作機械2を一
巡してポーリングする時間と制御装置側CPUが1ブロ
ックの処理を実行する時間とが同期しているものとして
プログラム番号およびシーケンス番号の値を示している
が、シーケンス番号記憶レジスタRSの値が保持されて
いる間に該NC工作機械2に対するポーリングが2回以
上実施された場合、即ち、1ブロックの処理時間に比べ
てポーリングの周期が短い場合では、工程監視ファイル
Fjの複数行に亘って同一のプログラム番号とシーケン
ス番号が記憶されることがある。なお、同一のプログラ
ム番号とシーケンス番号が工程監視ファイルFjの複数
行に亘って記憶された場合であっても、制御装置側CP
Uによる状態データ記憶メモリの更新周期が1ブロック
の実行時間に比べて短い場合には、状態データの内容、
例えば、サーボ異常等のアラームの有無や時刻等のデー
タについて差異が生じる場合がある。
FIG. 6 is a conceptual diagram showing the values of the program numbers and sequence numbers stored in the process monitoring file Fj when the NC machine tool 2 carries out machining according to the machining program as shown in FIG. Note that in FIG. 6, the program number and the sequence number are assumed to be synchronized with the time when the CPU 10 of the cell controller 1 goes around each NC machine tool 2 to poll and the time when the control unit side CPU executes the processing of one block. However, when polling is performed on the NC machine tool 2 twice or more while the value of the sequence number storage register RS is held, that is, the polling time of polling is longer than that of one block. When the cycle is short, the same program number and sequence number may be stored in multiple lines of the process monitoring file Fj. Even if the same program number and sequence number are stored in a plurality of lines of the process monitoring file Fj, the control device side CP
If the update cycle of the state data storage memory by U is shorter than the execution time of one block, the contents of the state data,
For example, there may be a difference in data such as presence or absence of an alarm such as a servo abnormality and time.

【0024】工程監視ファイルFjのデータは、セルコ
ントローラ1のキーボード15を介し、オペレータが各
NC工作機械2の個有名jを指定してデータ出力指令を
入力することにより、CRT表示装置16やプリンタ1
7で図6のように表示またはプリントアウトすることが
できる。
The data of the process monitoring file Fj is input by the operator via the keyboard 15 of the cell controller 1 by designating the individual famous j of each NC machine tool 2 and inputting a data output command. 1
It can be displayed or printed out as shown in FIG.

【0025】この実施例における工程監視ファイルFj
では各行に記憶されたプログラム番号の値がメインプロ
グラムのものであるのかサブプログラムのものであるの
かを直接知ることはできないが、時系列で記憶された加
工プログラム番号の推移によりプログラム全体の流れを
把握することができ、また、各加工プログラムにおける
ブロック、即ち、シーケンス番号とNC工作機械の動作
状態との関係を適確に把握することができるので、アラ
ームの発生に対するプログラムの修正も容易である。プ
ログラム番号の値は実質的にワーク形状を示すものであ
るから、アラーム発生時のプログラム番号が分かれば加
工対象となっているワークを知ることができ、また、シ
ーケンス番号の値により異常が発生したときのワーク上
の部位を知ることができる。
Process monitoring file Fj in this embodiment
However, it is not possible to directly know whether the value of the program number stored in each line is that of the main program or that of the sub program, but the flow of the entire program can be changed by the change of the machining program number stored in time series. Since it is possible to grasp the relation between the block in each machining program, that is, the sequence number and the operating state of the NC machine tool, it is easy to correct the program in response to the occurrence of an alarm. .. Since the value of the program number substantially indicates the shape of the work, the work to be machined can be known if the program number at the time of alarm occurrence is known, and an error has occurred depending on the value of the sequence number. It is possible to know the part on the work when.

【0026】次に、加工プログラム位置を特定するデー
タとして、実行中の加工プログラムのメインプログラム
番号とサブプログラム番号およびブロックのシーケンス
番号を用いるようにした第2実施例の加工監視方式につ
いて説明する。この実施例はメインプログラムとサブプ
ログラムとの区別が加工プログラムに定義されていない
場合に、実行中の加工プログラムの階層をNC工作機械
の制御装置により自動的に識別してメインプログラムと
サブプログラムとの区別、即ち、独立したプログラム間
でのプログラムの推移を明確にして、加工プログラムに
おける各ブロックとNC工作機械の動作状態との関係を
容易に把握できるようにしたものであり、各NC工作機
械2の制御装置は、状態データ記憶メモリに加え、必要
数のプログラム番号記憶レジスタR(1),R(2),
R(3),…およびシーケンス番号記憶レジスタRSを
有する(図8参照)。
Next, the machining monitoring system of the second embodiment in which the main program number and sub program number of the machining program being executed and the sequence number of the block are used as the data for specifying the machining program position will be described. In this embodiment, when the main program and the sub program are not distinguished from each other in the machining program, the hierarchy of the machining program being executed is automatically identified by the controller of the NC machine tool, and the main program and the sub program are identified. , That is, the transition of programs between independent programs is clarified so that the relationship between each block in the machining program and the operating state of the NC machine tool can be easily grasped. In addition to the state data storage memory, the second control device includes a required number of program number storage registers R (1), R (2),
It has R (3), ... And a sequence number storage register RS (see FIG. 8).

【0027】図7は第2実施例における各NC工作機械
2の制御装置側CPUが加工プログラムの実行中に所定
周期毎繰返して実行する「プログラム位置特定データ検
出処理」の概略を示すフローチャートである。
FIG. 7 is a flow chart showing an outline of the "program position specifying data detecting process" which is repeatedly executed by the control unit side CPU of each NC machine tool 2 at predetermined intervals during execution of the machining program in the second embodiment. ..

【0028】「プログラム位置特定データ検出処理」を
開始した制御装置側CPUは、実行中の加工ブロックに
関するプログラム番号が変化したか否かを判別するが
(ステップS11)、加工プログラムを開始する段階で
はメインプログラムとなる独立プログラムが最初に読込
まれるので、まず、この段階でプログラム番号が変化し
てステップS11の判別結果が真となる。そこで、制御
装置側CPUは、初期値0のネスティング管理指標iの
値(なお、iの値は初期設定で「0」に設定されてい
る)に基いてプログラム番号記憶レジスタR(i−1)
の値、即ち、プログラム番号記憶レジスタR(−1)の
値と、現時点における加工プログラムのプログラム番号
とを比較するが(ステップS12)、プログラム番号記
憶レジスタR(−1)の値は未設定であるから判別結果
は必然的に不一致となる。そこで、制御装置側CPUは
ネスティング管理指標iの値をインクリメントし(ステ
ップS13)、該指標iの値に基いて、第1階層のプロ
グラム番号記憶レジスタR(1)に現時点における加工
プログラムのプログラム番号、即ち、メインプログラム
となる独立プログラムのプログラム番号を記憶すること
となる(ステップS14)。
The control unit side CPU that has started the "program position specifying data detection process" determines whether or not the program number relating to the machining block being executed has changed (step S11), but at the stage of starting the machining program. Since the independent program serving as the main program is read first, the program number changes at this stage, and the determination result of step S11 becomes true. Therefore, the CPU on the control device side stores the program number storage register R (i-1) based on the value of the nesting management index i having an initial value of 0 (the value of i is set to "0" in the initial setting).
Value of the program number storage register R (-1) is compared with the program number of the machining program at the present time (step S12), but the value of the program number storage register R (-1) is not set. Because of this, the discrimination results inevitably become inconsistent. Therefore, the control unit side CPU increments the value of the nesting management index i (step S13), and based on the value of the index i, the program number of the machining program at the present time is stored in the program number storage register R (1) of the first layer. That is, the program number of the independent program serving as the main program is stored (step S14).

【0029】また、メインプログラムとなる独立プログ
ラムが読込まれてこのプログラムの第1ブロックが開始
された段階ではシーケンス番号の値が変化したものと判
別されるから(ステップS15)、シーケンス番号記憶
レジスタRSには、まず、メインプログラムとなる独立
プログラムの第1ブロックのシーケンス番号が記憶され
ることとなる(ステップS16)。
Further, since it is determined that the value of the sequence number has changed when the independent program which is the main program is read and the first block of this program is started (step S15), the sequence number storage register RS First, the sequence number of the first block of the independent program serving as the main program is stored (step S16).

【0030】以下、プログラム番号の変化が検出されな
ければ、制御装置側CPUは、メインプログラムとなる
独立プログラムにおける次ブロックの処理が開始される
毎に(ステップS15)、シーケンス番号記憶レジスタ
RSの値のみを逐次更新記憶して行くこととなる(ステ
ップS16)。
Thereafter, if no change in the program number is detected, the CPU on the control device side each time the processing of the next block in the independent program serving as the main program is started (step S15), the value of the sequence number storage register RS. Only that will be sequentially updated and stored (step S16).

【0031】そして、メインプログラムとなる独立プロ
グラムが実行される間に、この独立プログラムにおける
ブロックの指令で別の独立プログラムが開始されると、
現在実行中の加工プログラムのプログム番号に変化が生
じ、制御装置側CPUによって検出される(ステップS
11)。そこで、制御装置側CPUはネスティング管理
指標iの現在値に基いてプログラム番号記憶レジスタR
(i−1)の値、即ち、プログラム番号記憶レジスタR
(0)の値と、現時点における加工プログラムのプログ
ラム番号とを比較するが(ステップS12)、プログラ
ム番号記憶レジスタR(0)の値は未設定であるから判
別結果は必然的に不一致となる。そこで、制御装置側C
PUはネスティング管理指標iの値をインクリメントし
(ステップS13)、該指標iの値に基いて、第2階層
のプログラム番号記憶レジスタR(2)に現時点におけ
る加工プログラムのプログラム番号、即ち、第1のサブ
プログラムとなる独立プログラムのプログラム番号を記
憶することとなる(ステップS14)。
When another independent program is started by a block command in the independent program while the independent program which is the main program is executed,
The program number of the machining program currently being executed changes and is detected by the CPU on the control device side (step S
11). Therefore, the CPU on the control device side determines the program number storage register R based on the current value of the nesting management index i.
The value of (i-1), that is, the program number storage register R
The value of (0) is compared with the program number of the machining program at the present time (step S12), but since the value of the program number storage register R (0) has not been set, the determination result inevitably does not match. Therefore, the control device side C
The PU increments the value of the nesting management index i (step S13), and based on the value of the index i, the program number storage register R (2) of the second hierarchy stores the program number of the current machining program, that is, the first The program number of the independent program which is the sub-program is stored (step S14).

【0032】そして、第1のサブプログラムとなる独立
プログラムが実行される間に、メインプログラムとなる
独立プログラムとは別の第3の独立プログラムが開始さ
れると現在実行中の加工プログラムのプログム番号に変
化が生じ、再び、ステップS11およびステップS12
の判別処理が実行され、ネスティング管理指標iの現在
値に基いて、プログラム番号記憶レジスタR(i−1)
の値、即ち、プログラム番号記憶レジスタR(1)の値
と、現時点における加工プログラムのプログラム番号と
が比較されるが、この場合、プログラム番号記憶レジス
タR(1)の値はメインプログラムとなる独立プログラ
ムのプログラム番号であって、第3の独立プログラムの
プログラム番号とは異なるから、ステップS12の判別
結果は偽となり、制御装置側CPUはネスティング管理
指標iの値をインクリメントし(ステップS13)、該
指標iの値に基き第3階層のプログラム番号記憶レジス
タR(3)に現時点における加工プログラムのプログラ
ム番号、即ち、第2のサブプログラムとなる第3の独立
プログラムのプログラム番号を記憶することとなる(ス
テップS14)。
When a third independent program, which is different from the independent program which is the main program, is started while the independent program which is the first sub-program is executed, the program number of the machining program which is currently being executed is started. Change occurs, and again, step S11 and step S12
Of the program number storage register R (i-1) based on the current value of the nesting management index i.
Value, that is, the value of the program number storage register R (1) is compared with the program number of the machining program at the present time. In this case, the value of the program number storage register R (1) becomes the main program. Since it is the program number of the program and different from the program number of the third independent program, the determination result of step S12 is false, and the control device side CPU increments the value of the nesting management index i (step S13), Based on the value of the index i, the program number of the machining program at the present time, that is, the program number of the third independent program serving as the second subprogram is stored in the program number storage register R (3) of the third hierarchy. (Step S14).

【0033】一方、第1のサブプログラムとなる独立プ
ログラムが終了してメインプログラムとなる独立プログ
ラムに復帰した場合、やはり、現在実行中の加工プログ
ラムのプログム番号に変化が生じ、前記と同様にしてス
テップS11およびステップS12の判別処理が実行さ
れ、ネスティング管理指標iの現在値に基いて、プログ
ラム番号記憶レジスタR(i−1)の値、即ち、プログ
ラム番号記憶レジスタR(1)の値と、現時点における
加工プログラムのプログラム番号とが比較されるが、こ
の場合、プログラム番号記憶レジスタR(1)の値はメ
インプログラムとなる独立プログラムのプログラム番号
であって、現在実行中のプログラムのプログラムと同一
であるから、ステップS12の判別結果は真となり、制
御装置側CPUはネスティング管理指標iの値に基いて
プログラム番号記憶レジスタR(2)の値、つまり、第
1のサブプログラムとなる独立プログラムのプログラム
番号をクリアして(ステップS17)、ネスティング管
理指標iの値をディクリメントする(ステップS1
8)。従って、メインプログラムとなる独立プログラム
に復帰した後、再び別の独立プログラムが開始されたよ
うな場合には、第1のサブプログラムとなる独立プログ
ラムのプログラム番号を記憶する第2階層のプログラム
番号記憶レジスタR(2)に再びこの独立プログラムの
プログラム番号が記憶されることとなる。
On the other hand, when the independent program which is the first sub-program is completed and the independent program which is the main program is returned to, the program number of the machining program which is being executed is changed, and the same operation as described above is performed. The determination process of step S11 and step S12 is executed, and based on the current value of the nesting management index i, the value of the program number storage register R (i-1), that is, the value of the program number storage register R (1), The program number of the machining program at the present time is compared. In this case, the value of the program number storage register R (1) is the program number of the independent program which is the main program, and is the same as the program of the program currently being executed. Therefore, the determination result of step S12 becomes true, and the control device side CPU Based on the value of the sting management index i, the value of the program number storage register R (2), that is, the program number of the independent program that is the first subprogram is cleared (step S17), and the value of the nesting management index i is set. Decrement (step S1
8). Therefore, when another independent program is started again after returning to the independent program which is the main program, the program number storage of the second hierarchy for storing the program number of the independent program which is the first sub-program The program number of this independent program is stored again in the register R (2).

【0034】例えば、NC工作機械2の一つが図17に
示されるような加工プログラムに従って加工を実施する
とすれば、まず、メインプログラムとなる独立プログラ
ム001が開始された段階でステップS11の判別結果
が真、ステップS12の判別結果が偽となって、ネステ
ィング管理指標iの値が0から1にインクリメントされ
(ステップS13)、第1階層のプログラム番号記憶レ
ジスタR(1)にプログラム番号001が記憶され(ス
テップS14)、また、シーケンス番号記憶レジスタR
Sにはシーケンス番号MS1が記憶される(ステップS
15)。以下、プログラム番号001のプログラムにお
ける次ブロックの処理が開始される毎にシーケンス番号
記憶レジスタRSの値のみがMS2,MS3,MS4,
…と変化して行くが(ステップS15,ステップS1
6)、この段階におけるネスティング管理指標iの値は
1に保持されている。
For example, if one of the NC machine tools 2 performs machining according to a machining program as shown in FIG. 17, first, when the independent program 001 which is the main program is started, the determination result of step S11 is True, the determination result of step S12 is false, the value of the nesting management index i is incremented from 0 to 1 (step S13), and the program number 001 is stored in the program number storage register R (1) of the first hierarchy. (Step S14) Also, the sequence number storage register R
The sequence number MS1 is stored in S (step S
15). Hereinafter, every time the processing of the next block in the program of the program number 001 is started, only the value of the sequence number storage register RS is MS2, MS3, MS4.
... will change (Step S15, Step S1
6) The value of the nesting management index i at this stage is held at 1.

【0035】そして、プログラム番号001の独立プロ
グラムにおける第4ブロックの指令で独立プログラム0
02への移行が実施されるとプログラム番号の変化が検
出され、再びステップS11およびステップS12の判
別処理が実施されることとなるが、ステップS12の判
別結果は偽であるから、ネスティング管理指標iの値が
1から2にインクリメントされ(ステップS13)、第
2階層のプログラム番号記憶レジスタR(2)に第1の
サブプログラムとなる独立プログラムのプログラム番号
002が記憶され(ステップS14)、また、シーケン
ス番号記憶レジスタRSの値はSF1に更新される(ス
テップS15,ステップS16)。次いで、プログラム
番号002の独立プログラムにおける次ブロックの処理
が開始されるとシーケンス番号記憶レジスタRSの値の
みがSF2に変化するが(ステップS15,ステップS
16)、この段階におけるネスティング管理指標iの値
は2に保持されている。
Then, the independent program 0 is issued by the instruction of the fourth block in the independent program of program number 001.
When the shift to 02 is performed, a change in the program number is detected, and the determination process of steps S11 and S12 is performed again. However, since the determination result of step S12 is false, the nesting management index i Is incremented from 1 to 2 (step S13), the program number 002 of the independent program serving as the first subprogram is stored in the program number storage register R (2) of the second hierarchy (step S14), and The value of the sequence number storage register RS is updated to SF1 (step S15, step S16). Next, when the processing of the next block in the independent program of the program number 002 is started, only the value of the sequence number storage register RS changes to SF2 (steps S15 and S).
16), the value of the nesting management index i at this stage is held at 2.

【0036】次いで、プログラム番号002の独立プロ
グラムにおける第2ブロックの指令で独立プログラム0
03への移行が実施されると再びプログラム番号の変化
が検出され、ステップS11およびステップS12の判
別処理が実施されることとなるが、プログラム番号記憶
レジスタR(2−1)の値はメインプログラムとなる独
立プログラムのプログラム番号001であって、現在実
行中の独立プログラムのプログラム番号003とは異な
るからステップS12の判別結果は偽となり、ネスティ
ング管理指標iの値が2から3にインクリメントされ
(ステップS13)、第3階層のプログラム番号記憶レ
ジスタR(3)に第2のサブプログラムとなる独立プロ
グラムのプログラム番号003が記憶され(ステップS
14)、また、シーケンス番号記憶レジスタRSの値は
SS1に更新される(ステップS15,ステップS1
6)。以下、プログラム番号003のプログラムにおけ
る次ブロックの処理が開始される毎にシーケンス番号記
憶レジスタRSの値のみがSS2,SS3,…と変化し
て行くが(ステップS15,ステップS16)、この段
階におけるネスティング管理指標iの値は3に保持され
ている。
Then, the independent program 0 is issued by the instruction of the second block in the independent program of program number 002.
When the shift to 03 is performed, the change in the program number is detected again, and the determination processing in steps S11 and S12 is performed. However, the value of the program number storage register R (2-1) is the main program. Since the program number is 001 of the independent program which is different from the program number 003 of the currently executed independent program, the determination result of step S12 is false, and the value of the nesting management index i is incremented from 2 to 3 (step S13), the program number 003 of the independent program serving as the second subprogram is stored in the program number storage register R (3) of the third hierarchy (step S
14) Further, the value of the sequence number storage register RS is updated to SS1 (step S15, step S1).
6). Hereinafter, each time the processing of the next block in the program of program number 003 starts, only the value of the sequence number storage register RS changes to SS2, SS3, ... (Steps S15, S16), but nesting at this stage The value of the management index i is held at 3.

【0037】そして、プログラム番号003の独立プロ
グラムにおける第3ブロックの処理が終了して独立プロ
グラム002への復帰が実施されると再びプログラム番
号の変化が検出され、ステップS11およびステップS
12の判別処理が実施されることとなるが、プログラム
番号記憶レジスタR(3−1)の値は第1のサブプログ
ラムとなる独立プログラムのプログラム番号002であ
って、現在実行中の独立プログラムのプログラム番号0
02と一致するからステップS12の判別結果は真とな
り、制御装置側CPUはネスティング管理指標iの値に
基いて第3階層のプログラム番号記憶レジスタR(3)
の値、つまり、第2のサブプログラムとなる独立プログ
ラムのプログラム番号003をクリアして(ステップS
17)、該指標iの値を3から2にディクリメントし
(ステップS18)、シーケンス番号記憶レジスタRS
の値をSF3に更新する(ステップS15,ステップS
16)。以下、プログラム番号002のプログラムにお
ける次ブロックの処理が開始される毎にシーケンス番号
記憶レジスタRSの値のみがSF4,SF5,…と変化
して行くが(ステップS15,ステップS16)、この
段階におけるネスティング管理指標iの値は2に保持さ
れている。
Then, when the processing of the third block in the independent program with the program number 003 ends and the return to the independent program 002 is performed, the change in the program number is detected again, and the steps S11 and S are executed.
12, the value of the program number storage register R (3-1) is the program number 002 of the independent program which is the first subprogram, and the value of the independent program currently being executed is Program number 0
Since it coincides with 02, the determination result of step S12 becomes true, and the control device side CPU determines the program number storage register R (3) of the third layer based on the value of the nesting management index i.
Value, that is, the program number 003 of the independent program to be the second subprogram is cleared (step S
17), the value of the index i is decremented from 3 to 2 (step S18), and the sequence number storage register RS
Is updated to SF3 (step S15, step S
16). Hereinafter, each time the processing of the next block in the program of program number 002 is started, only the value of the sequence number storage register RS changes to SF4, SF5, ... (Steps S15, S16), but nesting at this stage The value of the management index i is held at 2.

【0038】次いで、プログラム番号002の独立プロ
グラムにおける第5ブロックの処理が終了して独立プロ
グラム001への復帰が実施されると再びプログラム番
号の変化が検出され、ステップS11およびステップS
12の判別処理が実施されることとなるが、プログラム
番号記憶レジスタR(2−1)の値はメインプログラム
となる独立プログラムのプログラム番号001であっ
て、現在実行中の独立プログラムのプログラム番号00
1と一致するからステップS12の判別結果が真とな
り、制御装置側CPUはネスティング管理指標iの値に
基いて第2階層のプログラム番号記憶レジスタR(2)
の値、つまり、第1のサブプログラムとなる独立プログ
ラムのプログラム番号002をクリアして(ステップS
17)、該指標iの値を2から1にディクリメントし
(ステップS18)、シーケンス番号記憶レジスタRS
の値をMS5に更新する(ステップS15,ステップS
16)。プログラム番号001のプログラムにおける次
ブロックの処理が開始されるとシーケンス番号記憶レジ
スタRSの値のみがMS6に変化するが(ステップS1
5,ステップS16)、この段階におけるネスティング
管理指標iの値は1に保持される。
Next, when the processing of the fifth block in the independent program with the program number 002 ends and the return to the independent program 001 is performed, the change in the program number is detected again, and the steps S11 and S are executed.
12, the value of the program number storage register R (2-1) is the program number 001 of the independent program which is the main program, and the program number 00 of the independent program currently being executed.
Since it matches with 1, the determination result of step S12 becomes true, and the control device side CPU determines the program number storage register R (2) of the second layer based on the value of the nesting management index i.
Value, that is, the program number 002 of the independent program that is the first subprogram is cleared (step S
17), the value of the index i is decremented from 2 to 1 (step S18), and the sequence number storage register RS
Value of MS is updated to MS5 (step S15, step S
16). When the processing of the next block in the program of program number 001 is started, only the value of the sequence number storage register RS changes to MS6 (step S1.
5, step S16), the value of the nesting management index i at this stage is held at 1.

【0039】そして、プログラム番号001の独立プロ
グラムにおける第6ブロックの指令で独立プログラム0
04への移行が実施されるとプログラム番号の変化が再
度検出され、再びステップS11およびステップS12
の判別処理が実施されることとなるが、プログラム番号
記憶レジスタR(1−1)の値は未設定であって、現在
実行中の独立プログラムのプログラム番号004とは一
致しないからステップS12の判別結果は偽となり、ネ
スティング管理指標iの値が1から2に再びインクリメ
ントされ(ステップS13)、第2階層のプログラム番
号記憶レジスタR(2)にサブプログラムとなる独立プ
ログラムのプログラム番号004が記憶され(ステップ
S14)、また、シーケンス番号記憶レジスタRSの値
はST1に更新されることとなる(ステップS15,ス
テップS16)。
Then, the independent program 0 is issued by the instruction of the sixth block in the independent program of program number 001.
When the shift to 04 is executed, a change in the program number is detected again, and steps S11 and S12 are again performed.
However, since the value of the program number storage register R (1-1) is not set and does not match the program number 004 of the independent program currently being executed, the determination of step S12 is performed. The result is false, the value of the nesting management index i is incremented again from 1 to 2 (step S13), and the program number 004 of the independent program to be the subprogram is stored in the program number storage register R (2) of the second hierarchy. (Step S14) Further, the value of the sequence number storage register RS is updated to ST1 (step S15, step S16).

【0040】以下、前記と同様の処理により、プログラ
ム番号記憶レジスタR(1),R(2),R(3),…
の各々には、メインプログラムとなる独立プログラムの
プログラム番号と、該独立プログラムから現在実行中の
ブロックを有する独立プログラムに至る全階層の独立プ
ログラムのプログラム番号が階層の従属順位に従って常
時記憶されることとなり、ネスティング管理指標iの値
はメインプログラムとなる新たな独立プログラムが読込
まれた段階で再び0に初期化される。
Thereafter, by the same processing as described above, the program number storage registers R (1), R (2), R (3), ...
In each of the above, the program number of the independent program serving as the main program and the program numbers of the independent programs of all hierarchies from the independent program to the independent program having the block currently being executed are always stored in accordance with the hierarchical order of hierarchy. The value of the nesting management index i is initialized to 0 again when a new independent program serving as the main program is read.

【0041】セルコントローラ1側の処理は前述の第1
実施例と略同等であり、CPU10は各NC工作機械2
の制御装置側CPUを所定周期毎に順次ポーリングし
て、NC工作機械2のプログラム番号記憶レジスタR
(1),R(2),R(3),…の各々の値とシーケン
ス番号記憶レジスタRSの値ならびに制御装置の状態デ
ータ記憶メモリにおける現在内容を読込んで、このNC
工作機械に対応して不揮発性RAM13内に設定された
工程監視ファイルFjに各検出データを時系列で格納し
て行く。
The processing on the side of the cell controller 1 is the above-mentioned first step.
The CPU 10 is substantially the same as that of the embodiment, and each CPU machine tool 2
The control device side CPU is sequentially polled every predetermined period, and the program number storage register R of the NC machine tool 2 is polled.
Each value of (1), R (2), R (3), ..., The value of the sequence number storage register RS and the current contents in the status data storage memory of the control unit are read, and this NC is read.
Each detection data is stored in time series in the process monitoring file Fj set in the nonvolatile RAM 13 corresponding to the machine tool.

【0042】図9はNC工作機械2が図17に示される
ような加工プログラムに従って加工を実施したときに工
程監視ファイルFjに記憶されるプログラム番号とシー
ケンス番号の値を示す概念図である。この実施例におけ
る工程監視ファイルFjによれば、加工プログラムの時
系列上での推移に加え、更に、実行中の加工プログラム
の階層をNC工作機械の制御装置により自動的に識別し
てメインプログラムとサブプログラムとの区別、即ち、
独立したプログラム間でのプログラムの推移を明確にす
ることができ、加工プログラムにおける各ブロックとN
C工作機械の動作状態との関係を一層容易に把握するこ
とができるので、アラームの発生に対するプログラムの
修正も更に容易となる。例えば、図6に示す第1実施例
の工程監視ファイルでは、実行されたブロックを含むプ
ログラムのプログラム番号が時系列で表示されるのみで
あり、各プログラムがどの様な状況で実施されているの
かを知るためにはプログラム番号の配列状態を時系列の
方向で分析する必要があるが、図9に示す工程監視ファ
イルFjによれば、実行されたブロックを含む独立プロ
グラムがどのようなプログラムをメインプログラムとし
て呼び出されたものであるのかを直ちに識別することが
できる。なお、図9では紙面の都合によりシーケンス番
号の推移を省略し、独立プログラムの移行および復帰の
時点を基準としてデータを表示してあるが、実際には、
少なくとも、加工プログラム上の1ブロックの処理が実
行される毎にポーリング処理が実行されるようになって
いるので、図6に示すものと同様、プログラム番号やそ
の組合わせ態様に対応して多数のシーケンス番号や状態
データが記憶されている。
FIG. 9 is a conceptual diagram showing the values of the program numbers and sequence numbers stored in the process monitoring file Fj when the NC machine tool 2 carries out the machining according to the machining program as shown in FIG. According to the process monitoring file Fj in this embodiment, in addition to the time-series transition of the machining program, the hierarchy of the machining program being executed is automatically identified by the controller of the NC machine tool and the main program is selected. Distinction from subprograms, that is,
The transition of programs between independent programs can be clarified, and each block and N in the machining program
Since the relationship with the operating state of the C machine tool can be more easily grasped, the program can be corrected more easily in response to the alarm. For example, in the process monitoring file of the first embodiment shown in FIG. 6, the program numbers of the programs including the executed blocks are only displayed in chronological order, and under what circumstances each program is executed. In order to know the sequence number, it is necessary to analyze the arrangement state of the program numbers in the direction of time series. According to the process monitoring file Fj shown in FIG. It is possible to immediately identify whether it is called as a program. Note that, in FIG. 9, the sequence number transition is omitted due to space limitations, and the data is displayed based on the transition and restoration points of the independent program.
At least, the polling process is executed every time one block process on the machining program is executed. Therefore, as in the case shown in FIG. 6, a large number of polling processes are performed corresponding to the program numbers and their combination modes. Sequence numbers and status data are stored.

【0043】また、図10に示す処理は、実行中の加工
プログラムのメインプログラム番号とサブプログラム番
号およびブロックのシーケンス番号を用いて加工プログ
ラム位置を特定するようにした第3実施例の加工監視方
式について示すもので、実質的な処理内容は前述の第2
実施例と略同等である。但し、第2実施例では上位階層
の独立プログラムから下位階層の独立プログラムに移行
する時点でネスティング管理指標iの値を逐次インクリ
メントして下位階層の独立プログラムのプログラム番号
をプログラム番号記憶レジスタR(i)に順次記憶して
行く一方(ステップS12〜ステップS14)、下位階
層の独立プログラムが上位階層の独立プログラムに復帰
した時点で下位階層の独立プログラムに関するプログラ
ム番号をクリアしてネスティング管理指標iの値をディ
クリメントしていたのに対し(ステップS12,ステッ
プS17〜ステップS14)、該第3実施例において
は、上位階層の独立プログラムから下位階層の独立プロ
グラムに移行する時点でネスティング管理指標iの値を
逐次インクリメントして下位階層の独立プログラムのプ
ログラム番号をプログラム番号記憶レジスタR(i)に
記憶すると共に該指標iの値を階層記憶レジスタRPに
保存し(ステップS22〜ステップS25)、また、下
位階層の独立プログラムが上位階層の独立プログラムに
復帰しても下位階層の独立プログラムに関するプログラ
ム番号の値をプログラム番号記憶レジスタR(i)にそ
のまま保持し、ネスティング管理指標iの値のみをディ
クリメントして階層記憶レジスタRPに保存することに
より(ステップS22,ステップS28,ステップS2
5)、該階層記憶レジスタRPの値により実行中の独立
プログラムの階層を示すようにした点が異なる。また、
この場合も、ネスティング管理指標iの値はメインプロ
グラムとなる新たな独立プログラムが読込まれた段階で
再び0に初期化される。
Further, the processing shown in FIG. 10 is the machining monitoring method of the third embodiment in which the machining program position is specified by using the main program number and sub program number of the machining program being executed and the sequence number of the block. The actual processing content is described in the above second item.
This is almost the same as the embodiment. However, in the second embodiment, the value of the nesting management index i is sequentially incremented at the time of shifting from the upper hierarchy independent program to the lower hierarchy independent program, and the program number of the lower hierarchy independent program is stored in the program number storage register R (i. ) Are sequentially stored (steps S12 to S14), and when the lower-layer independent program returns to the upper-layer independent program, the program number of the lower-layer independent program is cleared to determine the value of the nesting management index i. (Step S12, step S17 to step S14), the value of the nesting management index i is changed at the time of shifting from the upper-layer independent program to the lower-layer independent program in the third embodiment. Is incremented sequentially and independent professionals in the lower hierarchy The program number of the RAM is stored in the program number storage register R (i), the value of the index i is stored in the layer storage register RP (steps S22 to S25), and the independent program of the lower layer is independent of the upper layer. Even after returning to the program, the value of the program number relating to the independent program in the lower hierarchy is retained in the program number storage register R (i) as it is, and only the value of the nesting management index i is decremented and stored in the hierarchy storage register RP. By (step S22, step S28, step S2
5) The point that the hierarchy of the independent program being executed is indicated depending on the value of the hierarchy storage register RP is different. Also,
Also in this case, the value of the nesting management index i is initialized to 0 again when a new independent program serving as the main program is read.

【0044】セルコントローラ1側の処理は前述の第1
および第2実施例と略同等であり、CPU10は各NC
工作機械2の制御装置側CPUを所定周期毎に順次ポー
リングして、NC工作機械2のプログラム番号記憶レジ
スタR(1),R(2),R(3),…の各々の値とシ
ーケンス番号記憶レジスタRSの値および階層記憶レジ
スタRPの値ならびに制御装置の状態データ記憶メモリ
における現在内容(図11参照)を読込んで、このNC
工作機械に対応して不揮発性RAM13内に設定された
工程監視ファイルFjに各検出データを時系列で格納し
て行く。
The processing on the side of the cell controller 1 is the above-mentioned first step.
And is substantially equivalent to the second embodiment, and the CPU 10 is
The control device side CPU of the machine tool 2 is sequentially polled every predetermined period, and each value and sequence number of the program number storage registers R (1), R (2), R (3), ... The value of the storage register RS, the value of the hierarchical storage register RP, and the current contents (see FIG. 11) in the state data storage memory of the control device are read and the NC
Each detection data is stored in time series in the process monitoring file Fj set in the nonvolatile RAM 13 corresponding to the machine tool.

【0045】図12はNC工作機械2が図17に示され
るような加工プログラムに従って加工を実施したときに
工程監視ファイルFjに記憶されるプログラム番号とシ
ーケンス番号の値を示す概念図であり、一旦実行された
下位階層の独立プログラムのプログラム番号が消去され
ることなく保持され、各周期で階層記憶レジスタRPか
ら読込まれた階層の値によって、この段階で実施されて
いる独立プログラムのプログラム番号を特定するように
している点が図9に示されるような第2実施例のものと
は異なるが、実質的な効果に関しては前述の第2実施例
と全く同様である。
FIG. 12 is a conceptual diagram showing the values of the program number and sequence number stored in the process monitoring file Fj when the NC machine tool 2 carries out machining according to the machining program as shown in FIG. The program number of the executed independent program of the lower hierarchy is retained without being erased, and the program number of the independent program executed at this stage is specified by the value of the hierarchy read from the hierarchy storage register RP in each cycle. The difference from the second embodiment as shown in FIG. 9 is that it is done, but the substantial effect is exactly the same as that of the second embodiment.

【0046】図13は加工プログラムにおけるシーケン
ス番号が所定ブロック数毎に付されているときや全く付
されていないときに、実行中のブロックの位置を制御装
置側CPUにより自動的に検出してシーケンス番号とし
て設定する処理の概略を示すフローチャートである(な
お、各ブロック毎にシーケンス番号が付されている場合
も、この処理は使用できる)。図7に示される第2実施
例のステップS15〜ステップ16、および、図10に
示される第3実施例のステップS26〜ステップS27
の処理に替えて用いる。即ち、実行されているブロック
の属する独立プログラムの階層が検出されていることを
前提とした処理であり、この処理を用いる場合には、図
7におけるステップS18の処理および図10における
ステップS28の処理でネスティング管理指標iの値を
ディクリメントした段階で、上位階層復帰検出フラグF
をセットするようにし、また、各界層毎(各独立プログ
ラム毎)に生成したシーケンス番号を記憶するための必
要数の生成番号記憶レジスタRS(1),RS(2),
RS(3),…(図14参照)を設ける。
FIG. 13 shows a sequence in which the position of the block being executed is automatically detected by the control unit CPU when the sequence number in the machining program is given every predetermined number of blocks or not at all. It is a flow chart which shows an outline of processing set up as a number (note that this processing can be used even if a sequence number is assigned to each block). Steps S15 to 16 of the second embodiment shown in FIG. 7 and steps S26 to S27 of the third embodiment shown in FIG.
It is used instead of processing. That is, the processing is based on the assumption that the hierarchy of the independent program to which the block being executed belongs is detected. When this processing is used, the processing of step S18 in FIG. 7 and the processing of step S28 in FIG. 10 are performed. At the stage where the value of the nesting management index i is decremented by, the upper layer return detection flag F
, And a required number of generation number storage registers RS (1), RS (2), for storing the sequence numbers generated for each boundary layer (each independent program).
RS (3), ... (See FIG. 14) are provided.

【0047】以下、図13のフローチャートを参照し、
シーケンス番号を生成して設定するための処理を説明す
る。
Hereinafter, referring to the flow chart of FIG.
A process for generating and setting a sequence number will be described.

【0048】この場合、各ブロック毎にシーケンス番号
が定義されているという保証はないから、まず、前記第
2実施例のステップS15および前記第3実施例のステ
ップS26に替る処理として、次ブロックの開始を検出
することとなる(ステップS31)。そして、次ブロッ
クの開始を検出した場合、制御装置側CPUは、まず、
上位階層復帰検出フラグFがセットされているか否か、
即ち、この実行ブロックが下位階層の独立プログラムか
ら上位階層の独立プログラムに復帰した直後のものであ
るか否かを判別する(ステップS32)。
In this case, since there is no guarantee that the sequence number is defined for each block, first, as a process to replace step S15 of the second embodiment and step S26 of the third embodiment, the next block is processed. The start will be detected (step S31). When the start of the next block is detected, the control device side CPU first
Whether or not the upper hierarchy return detection flag F is set,
That is, it is determined whether or not this execution block has just been restored from the independent program of the lower hierarchy to the independent program of the upper hierarchy (step S32).

【0049】このとき上位階層復帰検出フラグFがセッ
トされていなければ、独立プログラム内での実行ブロッ
クの更新、または、上位階層から下位階層への移行に関
する実行ブロックの更新を意味するので、制御装置側C
PUはステップS33乃至ステップS34の処理を非実
行とし、この実行ブロックにシーケンス番号が定義され
ているか否かを判別する(ステップS35)。そして、
シーケンス番号が定義されていれば、ネスティング管理
指標iの値に基き、実行中の階層に対応した生成番号記
憶レジスタRS(i)に今回検出したシーケンス番号の
値を更新記憶する一方(ステップS36)、シーケンス
番号が定義されていなければ、生成番号記憶レジスタR
S(i)の値をインクリメントしてシーケンス番号を自
動的に生成し(ステップS38)、いずれの場合も、実
行中の階層に対応した生成番号記憶レジスタRS(i)
の現在値をシーケンス番号記憶レジスタRSに格納する
(ステップS37)。
At this time, if the upper layer return detection flag F is not set, it means updating the execution block in the independent program or updating the execution block relating to the transition from the upper layer to the lower layer. Side C
The PU does not execute the processing of steps S33 to S34 and determines whether or not a sequence number is defined in this execution block (step S35). And
If the sequence number is defined, the value of the sequence number detected this time is updated and stored in the generation number storage register RS (i) corresponding to the layer under execution based on the value of the nesting management index i (step S36). , If the sequence number is not defined, the generation number storage register R
The value of S (i) is incremented to automatically generate a sequence number (step S38), and in any case, the generation number storage register RS (i) corresponding to the layer being executed.
The current value of is stored in the sequence number storage register RS (step S37).

【0050】一方、ステップS32の判別結果が偽とな
った場合、即ち、この実行ブロックが下位階層の独立プ
ログラムから上位階層の独立プログラムに復帰した直後
のものであると判別された場合には、これまで実行され
ていた独立プログラム、即ち、i+1階層の独立プログ
ラムが終了したことを意味するので、制御装置側CPU
はi+1階層の独立プログラムに対応した生成番号記憶
レジスタRS(i+1)の値を0に初期化し(ステップ
S33)、上位階層復帰検出フラグFをリセットした後
(ステップS34)、前記と同様にしてステップS35
以降の処理を実施することとなる。
On the other hand, if the result of the determination in step S32 is false, that is, if it is determined that this execution block has just returned from the independent program in the lower hierarchy to the independent program in the upper hierarchy, Since the independent program that has been executed up to now, that is, the independent program of the i + 1th layer has ended, the control unit side CPU
Initializes the value of the generation number storage register RS (i + 1) corresponding to the independent program of the i + 1 layer to 0 (step S33), resets the upper layer return detection flag F (step S34), and then performs the same step as above. S35
The subsequent processing will be carried out.

【0051】例えば、図18に示される例のように独立
プログラム001の第3および第4ブロックと独立プロ
グラム002の第1乃至第3ブロックのシーケンス番号
が未定儀であったとすれば、シーケンス番号記憶レジス
タRSに格納されるシーケンス番号の値は以下に示すよ
うに変化する。
For example, if the sequence numbers of the third and fourth blocks of the independent program 001 and the first to third blocks of the independent program 002 are undefined as in the example shown in FIG. 18, the sequence number storage The value of the sequence number stored in the register RS changes as shown below.

【0052】まず、上位階層復帰検出フラグFは初期段
階で未設定であり、また、独立プログラム001の第1
および第2ブロックには共にシーケンス番号が定義され
ているから、まず、独立プログラム001の第1および
第2ブロックが開始される毎にステップS31,ステッ
プS32およびステップS35乃至ステップS37の処
理が実行され、各段階で、生成番号記憶レジスタRS
(1)およびシーケンス番号記憶レジスタRSの値は逐
次MS1,MS2と更新される。しかし、独立プログラ
ム001の第3および第4ブロックにはシーケンス番号
が定義されていないので、独立プログラム001の第3
および第4ブロックが開始された段階でステップS35
の判別結果が各々偽となり、ステップS38の処理で生
成番号記憶レジスタRS(1)の値が逐次インクリメン
トされてMS2+1,MS2+2と変化するので、この
値MS2+1,MS2+2が生成番号記憶レジスタRS
(1)およびシーケンス番号記憶レジスタRSに逐次更
新記憶されることとなる。
First, the upper hierarchy return detection flag F is not set at the initial stage, and the first program of the independent program 001 is not set.
Since the sequence numbers are defined in both the second block and the second block, first, the processing of step S31, step S32, and steps S35 to S37 is executed every time the first and second blocks of the independent program 001 are started. , At each stage, generation number storage register RS
(1) and the value of the sequence number storage register RS are sequentially updated to MS1 and MS2. However, since the sequence number is not defined in the third and fourth blocks of the independent program 001, the third block of the independent program 001
And when the fourth block is started, step S35
Of the generation number storage register RS (1) are sequentially incremented and changed to MS2 + 1 and MS2 + 2 in the process of step S38, and thus the values MS2 + 1 and MS2 + 2 are stored in the generation number storage register RS.
(1) and is sequentially updated and stored in the sequence number storage register RS.

【0053】そして、独立プログラム001の第4ブロ
ックの指令で独立プログラム002への移行が実施さ
れ、独立プログラム002の第1ブロックの処理が開始
されることとなるが、独立プログラム002の第1ブロ
ックにはシーケンス番号が定義されていないので、独立
プログラム001の第1ブロックが開始された段階でス
テップS35の判別結果が偽となり、また、ネスティン
グ管理指標iの値が1から2に更新されているので、ス
テップS38の処理で生成番号記憶レジスタRS(2)
の値がインクリメントされ、この値が生成番号記憶レジ
スタRS(2)およびシーケンス番号記憶レジスタRS
に更新記憶されることとなる。生成番号記憶レジスタR
S(1),RS(2),RS(3),…の初期値は共に
0であるから、このときの生成番号記憶レジスタRS
(2)およびシーケンス番号記憶レジスタRSの値は共
に1に更新される。また、独立プログラム002の第2
ブロックの処理が開始されると、前記と同様にして、生
成番号記憶レジスタRS(2)およびシーケンス番号記
憶レジスタRSの値は共に2に更新される。
Then, in response to the instruction of the fourth block of the independent program 001, the transition to the independent program 002 is carried out, and the processing of the first block of the independent program 002 is started, but the first block of the independent program 002 is started. Since the sequence number is not defined in, the determination result of step S35 becomes false at the stage when the first block of the independent program 001 is started, and the value of the nesting management index i is updated from 1 to 2. Therefore, in the processing of step S38, the generation number storage register RS (2)
Of the sequence number storage register RS and the generation number storage register RS (2)
Will be updated and stored in. Generation number storage register R
Since the initial values of S (1), RS (2), RS (3), ... Are all 0, the generation number storage register RS at this time
(2) and the value of the sequence number storage register RS are both updated to 1. In addition, the second of the independent program 002
When the processing of the block is started, both the values of the generation number storage register RS (2) and the sequence number storage register RS are updated to 2 in the same manner as described above.

【0054】そして、独立プログラム002の第2ブロ
ックの指令で独立プログラム003への移行が実施さ
れ、独立プログラム003の第1ブロックの処理が開始
されることとなるが、独立プログラム003の第1ブロ
ックにはシーケンス番号が定義されており、また、ネス
ティング管理指標iの値が2から3に更新されているの
で、独立プログラム003の第1ブロックが開始された
段階でステップS31,ステップS32およびステップ
S35乃至ステップS37の処理が実行され、生成番号
記憶レジスタRS(3)およびシーケンス番号記憶レジ
スタRSの値は共にSS1に更新される。また、独立プ
ログラム003の各ブロックには全てシーケンス番号が
定義されているから、以下、生成番号記憶レジスタRS
(3)およびシーケンス番号記憶レジスタRSの値は共
にSS2,SS3…と変化することになる。
Then, the command of the second block of the independent program 002 shifts to the independent program 003 and the processing of the first block of the independent program 003 is started, but the first block of the independent program 003 is started. Has a sequence number defined therein, and the value of the nesting management index i has been updated from 2 to 3, so that step S31, step S32, and step S35 are executed at the stage when the first block of the independent program 003 is started. The process from step S37 is executed, and the values of the generation number storage register RS (3) and the sequence number storage register RS are both updated to SS1. Further, since the sequence numbers are defined in all the blocks of the independent program 003, the generation number storage register RS
Both (3) and the value of the sequence number storage register RS change to SS2, SS3 ....

【0055】次いで、独立プログラム003の第3ブロ
ックの処理が終了して独立プログラム002の第3ブロ
ックに復帰することとなるが、独立プログラム002の
第3ブロックにはシーケンス番号が定義されていないの
で、独立プログラム002の第3ブロックが開始された
段階でステップS35の判別結果が偽となり、また、ネ
スティング管理指標iの値が3から2に更新されている
ので、ステップS38の処理で生成番号記憶レジスタR
S(2)の値が2から3にインクリメントされ、この値
3が生成番号記憶レジスタRS(2)およびシーケンス
番号記憶レジスタRSに更新記憶される。また、下位階
層から上位階層への復帰により上位階層復帰検出フラグ
Fがセットされているので、ステップS33の処理が実
行されて、生成番号記憶レジスタRS(3)の値が0に
初期化されることとなる。また、独立プログラム002
の第4ブロック以降に関しては全てシーケンス番号が定
義されているから、以下、生成番号記憶レジスタRS
(2)およびシーケンス番号記憶レジスタRSの値は共
にSF4,SF5…と変化する。
Next, the processing of the third block of the independent program 003 ends and the processing returns to the third block of the independent program 002. However, since the third block of the independent program 002 has no sequence number defined. At the stage when the third block of the independent program 002 is started, the determination result of step S35 becomes false, and the value of the nesting management index i is updated from 3 to 2, so the generation number is stored in the process of step S38. Register R
The value of S (2) is incremented from 2 to 3, and this value 3 is updated and stored in the generation number storage register RS (2) and the sequence number storage register RS. Further, since the upper layer return detection flag F is set by the return from the lower layer to the upper layer, the process of step S33 is executed and the value of the generation number storage register RS (3) is initialized to 0. It will be. Independent program 002
Since the sequence numbers are defined for all the fourth and subsequent blocks of, the generation number storage register RS
Both (2) and the value of the sequence number storage register RS change to SF4, SF5 ....

【0056】以下、制御装置側CPUは同様の処理を繰
返し実行することとなるが、上位階層の独立プログラム
から下位階層の独立プログラムに移行する際には上位階
層の生成番号記憶レジスタRS(i−1)の値を保持す
る一方、下位階層の独立プログラムから上位階層の独立
プログラムに復帰する際には上位階層の生成番号記憶レ
ジスタRS(i+1)の値を初期化し、また、シーケン
ス番号が定義されていなければ現在実行中の独立プログ
ラムの階層に対応した生成番号記憶レジスタRS(i)
の値を逐次インクリメントしてシーケンス番号を生成
し、実行中の独立プログラムの階層に対応したシーケン
ス番号の値をシーケンス番号記憶レジスタRSを介して
セルコントローラ1に転送する。生成番号記憶レジスタ
RS(1)の値はメインプログラムとなる新たな独立プ
ログラムが読込まれた段階で再び0に初期化される。
Thereafter, the CPU on the control device side repeatedly executes the same processing. However, when the independent program of the upper layer is transferred to the independent program of the lower layer, the generation number storage register RS (i- of the upper layer). While retaining the value of 1), when returning from the independent program of the lower layer to the independent program of the upper layer, the value of the generation number storage register RS (i + 1) of the upper layer is initialized, and the sequence number is defined. If not, the generation number storage register RS (i) corresponding to the hierarchy of the independent program currently being executed
Is sequentially incremented to generate a sequence number, and the value of the sequence number corresponding to the hierarchy of the independent program being executed is transferred to the cell controller 1 via the sequence number storage register RS. The value of the generation number storage register RS (1) is initialized to 0 again when a new independent program serving as the main program is read.

【0057】セルコントローラ1側の処理は前述の第1
乃至第3実施例と略同等であり、CPU10は各NC工
作機械2の制御装置側CPUを所定周期毎に順次ポーリ
ングして、NC工作機械2のプログラム番号記憶レジス
タR(1),R(2),R(3),…の各々の値とシー
ケンス番号記憶レジスタRSの値ならびに制御装置の状
態データ記憶メモリにおける現在内容を読込んで、この
NC工作機械に対応して不揮発性RAM13内に設定さ
れた工程監視ファイルFjに各検出データを時系列で格
納して行く。
The processing on the side of the cell controller 1 is the above-mentioned first step.
This is substantially the same as that of the third embodiment, and the CPU 10 sequentially polls the control device side CPU of each NC machine tool 2 for every predetermined cycle, and the program number storage registers R (1), R (2 of the NC machine tool 2 are used. ), R (3), ..., The value of the sequence number storage register RS and the current contents in the status data storage memory of the control device are read and set in the nonvolatile RAM 13 corresponding to this NC machine tool. Each detection data is stored in time series in the process monitoring file Fj.

【0058】図15は図7に示されるような第2実施例
の処理に図13の処理を適用し、NC工作機械2が図1
8に示されるような加工プログラムに従って加工を実施
したときに工程監視ファイルFjに記憶されるプログラ
ム番号とシーケンス番号の値を示す概念図である。図1
3に示される処理によれば、シーケンス番号が未設定の
ブロックがあった場合でも、実行中のブロックの位置を
制御装置側CPUにより自動的に検出してシーケンス番
号として設定し、このシーケンス番号を工程監視ファイ
ルFjに記憶させることができるので、シーケンス番号
の有無に関わりなく、各ブロックとNC工作機械の動作
状態との関係を容易に把握することができ、アラームの
発生に対するプログラムの修正が容易である。なお、こ
の場合、プログラムリスト上に存在しないシーケンス番
号が表示されたり、また、予め定義されたシーケンス番
号の刻み幅等によっては、生成されたシーケンス番号と
プログラムリスト上のシーケンス番号との間に重複が生
じる場合もあるが、ステップS38で生成されたシーケ
ンス番号をシーケンス番号記憶レジスタRSに格納する
段階で「*」等の識別記号を挿入するようにすればシー
ケンス番号の混乱を防止することができる(図15参
照)。生成されたシーケンス番号の値は予め定義された
直近のシーケンス番号を初期値としてインクリメントさ
れるから、工程監視ファイルFjとプログラムリストと
を参照してブロック数を数えることにより、生成された
シーケンス番号に対応するブロックをプログラムリスト
から検出することができる。
FIG. 15 applies the process of FIG. 13 to the process of the second embodiment as shown in FIG.
9 is a conceptual diagram showing values of a program number and a sequence number stored in a process monitoring file Fj when machining is performed according to a machining program as shown in FIG. Figure 1
According to the process shown in 3, even if there is a block for which the sequence number has not been set, the position of the block being executed is automatically detected by the control unit CPU and set as the sequence number, and this sequence number is set. Since it can be stored in the process monitoring file Fj, the relation between each block and the operating state of the NC machine tool can be easily grasped regardless of the presence or absence of the sequence number, and the program can be easily corrected when an alarm occurs. Is. In this case, a sequence number that does not exist in the program list may be displayed, or depending on the step size of the predefined sequence number, etc., it may overlap between the generated sequence number and the sequence number on the program list. Occasionally, the sequence number can be prevented from being confused by inserting an identification symbol such as "*" at the stage of storing the sequence number generated in step S38 in the sequence number storage register RS. (See FIG. 15). Since the value of the generated sequence number is incremented with the latest defined sequence number as an initial value, the number of blocks is counted by referring to the process monitoring file Fj and the program list to obtain the generated sequence number. The corresponding block can be found from the program list.

【0059】また、実行されているブロックの属する独
立プログラムの階層が検出されていない場合、即ち、図
3に示すような処理を行う場合であっても、実行中のブ
ロックの位置を制御装置側CPUで自動的に検出してシ
ーケンス番号として設定することは可能である。図16
はその一例を示すフローチャートである。
Even when the hierarchy of the independent program to which the block being executed belongs is not detected, that is, even when the processing shown in FIG. 3 is performed, the position of the block being executed is determined by the control device side. It is possible for the CPU to automatically detect and set as a sequence number. FIG.
Is a flowchart showing an example thereof.

【0060】この場合、「プログラム位置特定データ検
出処理」を開始した制御装置側CPUは、まず、実行中
の加工ブロックに関するプログラム番号が変化したか否
かを判別し(ステップS41)、プログラム番号が変化
していれば新たなプログラム番号を制御装置側のプログ
ラム番号記憶レジスタRMに更新記憶すると共に(ステ
ップS42)、更に、シーケンス番号記憶レジスタRS
を0に初期化する(ステップS43)。また、プログラ
ム番号に変化がなければ、第1実施例と同様、プログラ
ム番号記憶レジスタRMの値をそのまま保持する。次い
で、次ブロックの処理が開始されているか否かを判別し
(ステップS44)、新たな実行ブロックが開始されて
いれば、この実行ブロックにシーケンス番号が定義され
ているか否かを判別する(ステップS45)。そして、
シーケンス番号が定義されていれば、このシーケンス番
号をシーケンス番号記憶レジスタRSに格納し(ステッ
プS46)、また、シーケンス番号が定義されていなけ
ればシーケンス番号記憶レジスタRSの値をインクリメ
ントし、この値を当該実行ブロックのシーケンス番号と
してシーケンス番号記憶レジスタRSに再設定すること
となる(ステップS47)。
In this case, the control unit side CPU which has started the "program position specifying data detection process" first determines whether or not the program number of the machining block being executed has changed (step S41). If it has changed, the new program number is updated and stored in the program number storage register RM on the control device side (step S42), and further, the sequence number storage register RS
Is initialized to 0 (step S43). If the program number has not changed, the value of the program number storage register RM is held as it is, as in the first embodiment. Then, it is determined whether or not the processing of the next block is started (step S44), and if a new execution block is started, it is determined whether or not a sequence number is defined in this execution block (step S44). S45). And
If the sequence number is defined, this sequence number is stored in the sequence number storage register RS (step S46). If the sequence number is not defined, the value of the sequence number storage register RS is incremented and this value is The sequence number of the execution block is reset in the sequence number storage register RS (step S47).

【0061】従って、下位階層の独立プログラムから上
位階層の独立プログラムへの復帰が実施された場合、上
位階層における復帰先の実行ブロックにシーケンス番号
が付されていないと、復帰先の実行ブロックに対して常
にシーケンス番号1が設定されることとなるが、独立プ
ログラムの実行過程が工程監視ファイルFjに時系列で
記憶されているので、上位階層から下位階層に移行した
時点のシーケンス番号を検出することにより、復帰時点
の実行ブロックの位置を容易に特定することができる。
また、図3および図16に示されるような処理で独立プ
ログラムの階層表示を行わない場合でも、階層の検出の
みを実施するようにして複数の生成番号記憶レジスタR
(i)を設けるようにすれば、復帰先の実行ブロックに
設定するシーケンス番号の値を継続的にインクリメント
して行くことも可能となる。
Therefore, when the independent program of the lower hierarchy is restored to the independent program of the upper hierarchy, unless the sequence number is attached to the execution block of the restoration destination in the upper hierarchy, the execution block of the restoration destination is However, since the sequence number 1 is always set, since the execution process of the independent program is stored in the process monitoring file Fj in time series, it is necessary to detect the sequence number at the time of shifting from the upper layer to the lower layer. Thus, the position of the execution block at the time of returning can be easily specified.
Further, even when the hierarchy display of the independent program is not performed in the processing as shown in FIGS. 3 and 16, only the hierarchy is detected so that the plurality of generation number storage registers R
By providing (i), it becomes possible to continuously increment the value of the sequence number set in the execution block of the return destination.

【0062】以上の実施例では制御装置側の状態データ
記憶メモリに、運転モード,軸移動状態,アラーム状
態,送りオーバーライド,主軸オーバーライド,主軸回
転方向および時刻の各現在データを記憶させるものとし
て説明したが、その他、NC工作機械の状態を示すデー
タであれば、NC工作機械の構成に応じ、アラーム状態
に加え、各種の検出現在値およびプログラム上の設定値
を初め、必要とする任意のデータを用いることができ
る。また、時刻データに関しては、制御装置側CPUの
処理で制御装置側の状態データ記憶メモリに記憶させる
必要は必ずしもなく、セルコントローラ1側のCPU1
0がポーリング処理で検出したデータを格納する段階で
工程監視ファイルFjに記憶させるようにしてもよい。
In the above embodiments, the state data storage memory on the side of the control device has been described as storing the current data of the operation mode, the axis movement state, the alarm state, the feed override, the spindle override, the spindle rotation direction and the time. Is other data that indicates the state of the NC machine tool, in addition to the alarm state, various detected current values and program set values, as well as any necessary data, depending on the configuration of the NC machine tool, are displayed. Can be used. Further, the time data does not necessarily need to be stored in the state data storage memory on the control device side by the processing of the CPU on the control device side, and the CPU 1 on the cell controller 1 side
The data may be stored in the process monitoring file Fj when 0 stores the data detected by the polling process.

【0063】[0063]

【発明の効果】本発明の加工監視方式によれば、NC工
作機械の動作状態に関する検出データと加工プログラム
位置を特定する検出データとが対応して所定周期毎時系
列で記憶されるから、動作状態に異常を生じた加工プロ
グラムの位置やワークの異常箇所等を容易に特定するこ
とができ、加工プログラムの修正も容易となる。
According to the machining monitoring system of the present invention, the detection data relating to the operation state of the NC machine tool and the detection data specifying the machining program position are stored in correspondence with each other in a time series at predetermined intervals. It is possible to easily specify the position of the machining program in which the abnormality has occurred, the abnormal part of the work, and the like, and it is easy to correct the machining program.

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

【図1】本発明の方式を適用した実施例装置の加工監視
システムを示すブロック図
FIG. 1 is a block diagram showing a processing monitoring system for an apparatus according to an embodiment of the present invention.

【図2】同実施例装置におけるセルコントローラの要部
を示すブロック図
FIG. 2 is a block diagram showing a main part of a cell controller in the apparatus of the embodiment.

【図3】本発明方式の第1実施例における処理の要部を
示すフローチャート
FIG. 3 is a flowchart showing a main part of processing in the first embodiment of the method of the present invention.

【図4】状態データ記憶メモリの一例を示す概念図FIG. 4 is a conceptual diagram showing an example of a state data storage memory.

【図5】第1実施例における転送データを示す概念図FIG. 5 is a conceptual diagram showing transfer data in the first embodiment.

【図6】第1実施例における工程監視ファイルを示す概
念図
FIG. 6 is a conceptual diagram showing a process monitoring file in the first embodiment.

【図7】本発明方式の第2実施例における処理の要部を
示すフローチャート
FIG. 7 is a flowchart showing the main parts of the processing in the second embodiment of the method of the present invention.

【図8】第2実施例における転送データを示す概念図FIG. 8 is a conceptual diagram showing transfer data in the second embodiment.

【図9】第2実施例における工程監視ファイルを示す概
念図
FIG. 9 is a conceptual diagram showing a process monitoring file in the second embodiment.

【図10】本発明方式の第3実施例における処理の要部
を示すフローチャート
FIG. 10 is a flowchart showing a main part of processing in a third embodiment of the method of the present invention.

【図11】第3実施例における転送データを示す概念図FIG. 11 is a conceptual diagram showing transfer data in the third embodiment.

【図12】第3実施例における工程監視ファイルを示す
概念図
FIG. 12 is a conceptual diagram showing a process monitoring file in the third embodiment.

【図13】シーケンス番号が未設定のブロックに対して
シーケンス番号を生成するための処理を示すフローチャ
ート
FIG. 13 is a flowchart showing a process for generating a sequence number for a block for which a sequence number has not been set.

【図14】生成したシーケンス番号を設定した転送デー
タを示す概念図
FIG. 14 is a conceptual diagram showing transfer data in which a generated sequence number is set.

【図15】生成したシーケンス番号を格納した工程監視
ファイルを示す概念図
FIG. 15 is a conceptual diagram showing a process monitoring file that stores generated sequence numbers.

【図16】シーケンス番号が未設定のブロックに対して
シーケンス番号を生成するための別の処理を示すフロー
チャート
FIG. 16 is a flowchart showing another process for generating a sequence number for a block whose sequence number has not been set.

【図17】加工プログラム例を示す概念図FIG. 17 is a conceptual diagram showing a processing program example.

【図18】シーケンス番号未定儀のブロックを含む加工
プログラム例を示す概念図
FIG. 18 is a conceptual diagram showing an example of a machining program including blocks with undetermined sequence numbers.

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

1 セルコントローラ 2 NC工作機械 3 データ伝送路 4 セルコントローラ 13 管理用の記憶手段を構成する不揮発性RAM 15 キーボード 16 CRT表示装置 17 プリンタ RM プログラム番号記憶レジスタ RS シーケンス番号記憶レジスタ Fj 工程監視ファイル DESCRIPTION OF SYMBOLS 1 cell controller 2 NC machine tool 3 data transmission path 4 cell controller 13 non-volatile RAM 15 constituting a storage means for management 15 keyboard 16 CRT display device 17 printer RM program number storage register RS sequence number storage register Fj process monitoring file

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 NC工作機械の制御装置によりNC工作
機械の動作状態を検出する一方、少なくとも、加工プロ
グラムの実行ブロックが更新される毎に実行中の加工プ
ログラム位置を特定するデータを検出し、該制御装置に
おける管理用の記憶手段に各検出データを所定周期毎時
系列で記憶するようにしたことを特徴とするNC工作機
械の加工監視方式。
1. An NC machine tool control device detects an operating state of an NC machine tool, and at least detects data identifying a machining program position being executed each time an execution block of the machining program is updated. A machining monitoring system for an NC machine tool, wherein each detection data is stored in a time series in a predetermined cycle in a management storage means in the control device.
【請求項2】 加工プログラム位置を特定するデータと
して、実行中の加工プログラムのプログラム番号と実行
ブロックのシーケンス番号を用いるようにした請求項1
記載のNC工作機械の加工監視方式。
2. A program number of a machining program being executed and a sequence number of an execution block are used as data for identifying a machining program position.
The machining monitoring method for the NC machine tool described.
【請求項3】 加工プログラムにおけるシーケンス番号
が未設定のブロックに対し、実行中のブロックの位置を
NC工作機械の制御装置により自動的に検出して該識別
番号をシーケンス番号として設定し、加工プログラム位
置を特定するデータとして、実行中の加工プログラムの
プログラム番号と実行ブロックのシーケンス番号を用い
るようにした請求項2記載のNC工作機械の加工監視方
式。
3. A machining program in which a position of a block being executed is automatically detected by a control device of an NC machine tool and the identification number is set as a sequence number for a block in which a sequence number is not set in the machining program. The machining monitoring system for an NC machine tool according to claim 2, wherein the program number of the machining program being executed and the sequence number of the execution block are used as the data for specifying the position.
【請求項4】 加工プログラム位置を特定するデータと
して、実行中の加工プログラムのメインプログラム番号
とサブプログラム番号および実行ブロックのシーケンス
番号を用いるようにした請求項2記載のNC工作機械の
加工監視方式。
4. The machining monitoring system for an NC machine tool according to claim 2, wherein a main program number and a sub program number of a machining program being executed and a sequence number of an execution block are used as data for specifying a machining program position. ..
【請求項5】 実行中の加工プログラムの階層をNC工
作機械の制御装置により自動的に識別すると共に、加工
プログラム位置を特定するデータとして、実行中の加工
プログラムのプログラム番号とその階層ならびに実行ブ
ロックのシーケンス番号を用いるようにした請求項2記
載のNC工作機械の加工監視方式。
5. A program number of a machining program being executed, its hierarchy, and an execution block as data for automatically identifying a hierarchy of a machining program being executed by a control device of an NC machine tool and specifying a machining program position. The machining monitoring system for an NC machine tool according to claim 2, wherein the sequence number is used.
【請求項6】 加工プログラムにおけるシーケンス番号
が未設定のブロックに対し、実行中のブロックの位置を
NC工作機械の制御装置により自動的に検出して該識別
番号をシーケンス番号として設定し、加工プログラム位
置を特定するデータとして、実行中の加工プログラムの
プログラム番号とその階層ならびにブロックのシーケン
ス番号を用いるようにした請求項4および請求項5記載
のNC工作機械の加工監視方式。
6. A machining program, in which a position of a block being executed is automatically detected by a controller of an NC machine tool for a block for which a sequence number is not set in the machining program, and the identification number is set as a sequence number. 6. The machining monitoring system for an NC machine tool according to claim 4, wherein the program number of the machining program being executed, its hierarchy and the sequence number of the block are used as the data for specifying the position.
【請求項7】 NC工作機械の制御装置によりNC工作
機械の動作状態を検出する一方、少なくとも、加工プロ
グラムの実行ブロックが更新される毎に実行中の加工プ
ログラム位置を特定するデータを検出し、前記NC工作
機械の制御装置に替え、複数のNC工作機械に対してデ
ータ伝送可能に接続されたセルコントローラにより、各
NC工作機械からの検出データを所定周期毎に検出し、
該セルコントローラにおける管理用の記憶手段に各NC
工作機械毎の検出データを所定周期毎時系列で記憶する
ようにしたことを特徴とする請求項1,請求項2,請求
項3,請求項4,請求項5または請求項6記載のNC工
作機械の加工監視方式。
7. The NC machine tool control device detects an operating state of the NC machine tool, and at least detects data identifying a machining program position being executed each time an execution block of the machining program is updated, Instead of the control device of the NC machine tool, a cell controller connected to a plurality of NC machine tools so that data can be transmitted detects detection data from each NC machine tool at predetermined intervals,
Each NC is stored in the storage means for management in the cell controller.
7. The NC machine tool according to claim 1, claim 2, claim 3, claim 4, claim 5, or claim 6, wherein the detection data for each machine tool is stored in a time series at predetermined intervals. Processing monitoring method.
JP3258735A 1991-09-11 1991-09-11 Work monitoring system for nc machine tool Pending JPH0573125A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3258735A JPH0573125A (en) 1991-09-11 1991-09-11 Work monitoring system for nc machine tool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3258735A JPH0573125A (en) 1991-09-11 1991-09-11 Work monitoring system for nc machine tool

Publications (1)

Publication Number Publication Date
JPH0573125A true JPH0573125A (en) 1993-03-26

Family

ID=17324360

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3258735A Pending JPH0573125A (en) 1991-09-11 1991-09-11 Work monitoring system for nc machine tool

Country Status (1)

Country Link
JP (1) JPH0573125A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07129220A (en) * 1993-11-05 1995-05-19 Fanuc Ltd Robot controller with program execution history data display function
JP2002082706A (en) * 2000-09-06 2002-03-22 Niigata Eng Co Ltd Restoration support system for machine tool
JP2011096127A (en) * 2009-10-30 2011-05-12 Hitachi Ltd Device and method for monitoring plant
WO2011074518A1 (en) * 2009-12-17 2011-06-23 株式会社安川電機 Control system
JP2016103193A (en) * 2014-11-28 2016-06-02 ファナック株式会社 Numerical control device having parameter setting support function about cycle time
JP2016186686A (en) * 2015-03-27 2016-10-27 ファナック株式会社 Numerical control device including presentation function of program depending on situation
US9753449B2 (en) 2013-04-08 2017-09-05 Mitsubishi Electric Corporation Numerical control device
US10254743B2 (en) 2013-12-16 2019-04-09 Mitsubishi Electric Corporation Numerical control apparatus and logging method
JP2021096551A (en) * 2019-12-16 2021-06-24 株式会社安川電機 Production system, production method, and program

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07129220A (en) * 1993-11-05 1995-05-19 Fanuc Ltd Robot controller with program execution history data display function
JP2002082706A (en) * 2000-09-06 2002-03-22 Niigata Eng Co Ltd Restoration support system for machine tool
JP2011096127A (en) * 2009-10-30 2011-05-12 Hitachi Ltd Device and method for monitoring plant
WO2011074518A1 (en) * 2009-12-17 2011-06-23 株式会社安川電機 Control system
US9753449B2 (en) 2013-04-08 2017-09-05 Mitsubishi Electric Corporation Numerical control device
US10254743B2 (en) 2013-12-16 2019-04-09 Mitsubishi Electric Corporation Numerical control apparatus and logging method
JP2016103193A (en) * 2014-11-28 2016-06-02 ファナック株式会社 Numerical control device having parameter setting support function about cycle time
US10444737B2 (en) 2014-11-28 2019-10-15 Fanuc Corporation Numerical controller having parameter setting support function relating to cycle time
JP2016186686A (en) * 2015-03-27 2016-10-27 ファナック株式会社 Numerical control device including presentation function of program depending on situation
US10539948B2 (en) 2015-03-27 2020-01-21 Fanuc Corporation Numerical controller with program presentation function depending on situation
JP2021096551A (en) * 2019-12-16 2021-06-24 株式会社安川電機 Production system, production method, and program
US11520315B2 (en) 2019-12-16 2022-12-06 Kabushiki Kaisha Yaskawa Denki Production system, production method, and information storage medium

Similar Documents

Publication Publication Date Title
US4245316A (en) System for providing time control data in a numerical control system
US5315523A (en) Numerical control apparatus having a work simulation function
US5267145A (en) Method and apparatus for program navigation and editing for ladder logic programs by determining which instructions reference a selected data element address
US5323325A (en) Method of displaying an operation history of a machine
JPS62277244A (en) Accommodation control device for machine tool
JPH0573125A (en) Work monitoring system for nc machine tool
US5243511A (en) Method and apparatus for block move re-addressing in ladder logic programs
JP2008176579A (en) Controller of machine
JPS59142613A (en) Restart controller of numerical control working
US20060106616A1 (en) NC device
EP0148951B1 (en) System for checking abnormality in programmable controller
EP0425674A1 (en) Automatic tool selecting system
JPS62137609A (en) Nc data generation method
EP0144435B1 (en) Numerical control apparatus with automatic tool determination function
JP7448377B2 (en) Processing program management device, management system, and management method
US5155425A (en) Nc data execution method
JP4151402B2 (en) Numerical controller with parameter rewriting history function
EP0380700A1 (en) Machining data display system
JP2606714B2 (en) Numerical control unit
US5189352A (en) Drilling restart control system
JP4501244B2 (en) NC device for electric discharge machining and electric discharge machining method
JP3489855B2 (en) Numerical control unit
WO1989001198A1 (en) Interactive programming apparatus
KR100254185B1 (en) Tool checking method
JP2788461B2 (en) Processing machine status detector