JPH07104705B2 - Numerical control device - Google Patents

Numerical control device

Info

Publication number
JPH07104705B2
JPH07104705B2 JP61306045A JP30604586A JPH07104705B2 JP H07104705 B2 JPH07104705 B2 JP H07104705B2 JP 61306045 A JP61306045 A JP 61306045A JP 30604586 A JP30604586 A JP 30604586A JP H07104705 B2 JPH07104705 B2 JP H07104705B2
Authority
JP
Japan
Prior art keywords
output
command
code
feed
target position
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP61306045A
Other languages
Japanese (ja)
Other versions
JPS63157206A (en
Inventor
稔 榎本
鉦治 稲垣
寿男 高野
宏治 長谷川
秀樹 佐藤
正治 井川
弥寿徳 杉戸
政司 伊藤
彰浩 竹内
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.)
Toyota Motor Corp
Toyoda Koki KK
Original Assignee
Toyota Motor Corp
Toyoda Koki KK
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toyota Motor Corp, Toyoda Koki KK filed Critical Toyota Motor Corp
Priority to JP61306045A priority Critical patent/JPH07104705B2/en
Publication of JPS63157206A publication Critical patent/JPS63157206A/en
Publication of JPH07104705B2 publication Critical patent/JPH07104705B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Numerical Control (AREA)

Description

【発明の詳細な説明】Detailed Description of the Invention 【産業上の利用分野】[Industrial applications]

本発明は、可動軸の送り制御中に、可動軸が指令された
位置に到達した時に、M出力をオンとする同時処理機能
を有した数値制御装置に関する。
The present invention relates to a numerical controller having a simultaneous processing function of turning on an M output when a movable shaft reaches a commanded position during feed control of the movable shaft.

【従来技術】[Prior art]

従来、数値制御装置はM出力(M機能により出力される
信号)をオンオフするM機能を有している。そして、こ
のM出力に同期して、クーラント動作、工具交換動作、
テーブル割出動作、工作物交換動作等のシーケンスを起
動することにより、可動軸の送り位置と上記シーケンス
の動作開始との同期がとれるようになっている。
Conventionally, a numerical controller has an M function for turning on and off an M output (a signal output by the M function). Then, in synchronization with this M output, the coolant operation, tool change operation,
By activating a sequence such as a table indexing operation and a workpiece exchanging operation, the feed position of the movable shaft and the operation start of the above sequence can be synchronized.

【発明が解決しようとする問題点】 ところが、従来は、M出力と送り制御とを同時に処理す
ることができなかった。即ち、1つの送りコードによる
パルス分配が完了した後に、M出力コードがプログラム
されておれば、M出力をオンとしていた。このため、可
動軸の任意の位置でM出力をオンとするには、同一モー
ドの送り工程であっても、、その送り指令を、M出力を
オンとするまでの送り指令とM出力をオンとした後の送
り指令との2つの指令に分割し、その2つの指令間にM
出力をオンとする指令を挿入するにようにプログラムし
なければならなかった。 従って、M出力がオンとなるのは、一旦送り制御が終了
した後に行われるため、処理時間が長くなるという問題
がある。また、送り指令を2つのデータブロックに分け
なければならず、NCプログラムの作成が煩雑になるとい
う問題がある。
[Problems to be Solved by the Invention] However, conventionally, it was not possible to process M output and feed control at the same time. That is, if the M output code was programmed after the pulse distribution by one feed code was completed, the M output was turned on. Therefore, in order to turn on the M output at an arbitrary position of the movable axis, even if the feed process is in the same mode, the feed command is the feed command until the M output is turned on and the M output is turned on. The command is divided into two commands, the feed command after
I had to program it to insert a command to turn the output on. Therefore, the M output is turned on after the feed control is once completed, which causes a problem that the processing time becomes long. In addition, the feed command must be divided into two data blocks, which complicates the creation of the NC program.

【問題点を解決するための手段】[Means for solving problems]

上記問題点を解決するための発明の構成は、少なくとも
可動軸の目標位置を指令する移動指令コードを有する複
数の指令コードからなるNCデータに基づいて可動軸の送
りを数値制御する数値制御装置において、前記移動指令
コードに指定された目標位置に前記可動軸の送りを制御
する送り制御手段と、前記可動軸の任意位置を指定して
外部機器を制御するM出力をオンすることを指令するM
出力指令手段と、前記M出力指令手段による指令が有効
な前記送り制御手段による可動軸の送り制御中に、前記
可動軸がM出力指令手段で指令された前記任意位置を経
過した時に、M出力をオンとするM出力実行手段と前記
M出力のオンにより制御される外部機器の状態に係わら
ず前記可動軸が目標位置に到達したことによって次の指
令コードを実行する指令コード実行手段とを設けたこと
である。
The configuration of the invention for solving the above problems is a numerical controller for numerically controlling the feed of a movable axis based on NC data composed of a plurality of command codes having at least a movement command code for commanding a target position of the movable axis. , A feed control means for controlling the feed of the movable shaft to a target position designated by the movement command code, and an M for controlling an external device by designating an arbitrary position of the movable shaft, and an M for instructing to turn on the output.
During the feed control of the movable axis by the output command means and the feed control means in which the command by the M output command means is valid, when the movable axis has passed the arbitrary position commanded by the M output command means, M output And an instruction code executing means for executing the next instruction code when the movable axis reaches the target position regardless of the state of the external device controlled by turning on the M output. That is.

【作用】[Action]

送り制御手段は、移動指令コードが指令されると目標位
置に可動軸を移動する制御を行い、 M出力指令手段によりM出力をオンとする可動軸の任意
位置を指定してM出力をオンとすることが指令される
と、M出力実行手段はM出力指令手段による指令が有効
な可動軸の送り制御中に、可動軸がM出力指令手段で指
令された任意位置を通過した時に、M出力をオンとす
る。 この結果、M出力を指令する1つのNCデータブロックに
より、1つのNCデータブロックによる送り指令中の任意
の位置でM出力をオンとすることができるので、処理が
高速化されると共にNCプログラムの作成が簡単になる。 また、指令コード実行手段はM出力のオンにより制御さ
れる外部機器の状態に係わらず前記可動軸が目標位置に
到達したことによって次の指令コードを実行する。 このため、NCデータの実行はM出力のオンにより制御さ
れる外部機器の状態に係わらず進行されるので、処理の
進行を高速化することができる。
The feed control means performs control to move the movable axis to the target position when the movement command code is commanded, and the M output command means specifies an arbitrary position of the movable axis for turning on the M output to turn on the M output. When it is instructed to do so, the M output execution means outputs the M output when the movable axis passes the arbitrary position instructed by the M output command means during the feed control of the movable axis in which the command by the M output command means is effective. To turn on. As a result, one NC data block that commands the M output can turn on the M output at an arbitrary position in the feed command by one NC data block, which speeds up the process and enables the NC program to be processed. Easy to create. Further, the command code executing means executes the next command code when the movable axis reaches the target position regardless of the state of the external device controlled by turning on the M output. For this reason, the execution of the NC data proceeds regardless of the state of the external device controlled by turning on the M output, so that the progress of the processing can be accelerated.

【実施例】【Example】

以下、図面により本発明の実施例を詳細に説明する。 第1図は、本発明の一実施例に係る数値制御装置を用い
た送り制御装置の構成を示す図であり、第2図はその装
置を用いた工作機械の主軸台の送り制御装置の構成図で
ある。 第1図において、Aは数値制御装置、Bはサーボユニッ
ト、Cは絶対位置検出装置である。数値制御装置Aは、
主として、制御演算を行うマイクロプロセッサユニット
1(以下「MPU」と略記する)とその制御プログラムを
記憶したROM2とキーボード等のデータ入力装置3とバッ
テリバックアップしたRAM4とから成る。RAM4には、NCプ
ログラムが記憶されたNCD領域とM出力オンが指令され
た時に設定されるM出力フラグF1〜F4とM出力をオンに
する位置を設定するM出力位置レジスタMSR1〜MSR4と送
り制御の目標位置を設定する目標位置レジスタOPRと送
り速度を設定する速度レジスタVRと絶対位置検出装置C
により、主軸台10の現在の絶対位置(以下「現在位置」
という)が検出される度に、この値を記憶する現在位置
レジスタAPRが形成されている。尚、M出力はM1〜M4の
4出力あり、M出力フラグとM出力位置レジスタは各M
出力毎に設けられている。 サーボユニットBは、主として、レジスタ5とDA変換器
7と駆動回路8とで構成されている。MPU1から出力され
た速度信号S1はレジスタ5に入力し、DA変換器7により
アナログ信号に変換されて、駆動回路8に出力される。
駆動回路8は、この信号を入力してサーボモータ9に電
力を供給して、それを回転させる。 サーボモータ9の出力軸には主軸台10を移動させるため
の可動軸である送りねじ11が機械的に連結されている。
従って、可動軸の絶対位置は、主軸台10の絶対位置に対
応しているものとみなすことができる。主軸台10は送り
ねじ11によりベッド24上を摺動する。また、ベッド24上
を摺動するテーブル26上に工作物25が載置されており、
この工作物25は主軸27に取付けられたドリル28により加
工される。ドリル28は冷却装置29から出力される冷却液
で冷却される。また、サーボモータ9の出力軸には、主
軸台10の移動速度を検出して駆動回路8に速度フィード
バック信号を送出する速度検出器12が配設されている。 絶対位置検出装置Cは、主として、サーボモータ9の出
力軸に機械的に結合している第1のレゾルバ13と、減速
機構14を介して第1のレゾルバ13に結合している第2の
レゾルバ15と、レゾルバ励磁回路16と、第1のレゾルバ
13の位相角を検出する第1位相比較回路17と、第2のレ
ゾルバ15の位相角を検出する第2位相比較回路18と、そ
の両者の出力から主軸台10の絶対位置を演算する絶対位
置演算回路19と、その回路19を一定周期で駆動し絶対位
置の検出タイミングを与えるリアルタイムクロック(以
下「RTC」と略記する)20とから成る。第1のレゾルバ1
3は送りねじ11が1回転するとその入力軸が1回転し、
かつ第2のレゾルバ15は主軸台10が移動範囲の端から端
まで移動する間にその入力軸が1回転するように構成さ
れている。レゾルバの出力電圧と励磁電圧との位相差
は、その入力軸の回転角度に対応して変化する。第1の
位相比較回路17は、第1のレゾルバ13の出力電圧の励磁
電圧に対する位相差を、カウンタによりカウントしてデ
ィジタル値に変換して絶対位置演算回路19に出力する。
同様に第2の位相比較回路18は、第2のレゾルバ15の出
力電圧の励磁電圧に対する位相差を、ディジタル値に変
換して絶対位置演算回路19に出力する。絶対位置演算回
路19は、RTC20から検出タイミング信号Dを入力する毎
(2ms)に起動され、両位相比較回路17、18から位相デ
ータを入力し、主軸台10の絶対位置を演算して、インタ
フェース回路(IF)を介してMPU1に出力している。又、
絶対位置演算回路19は、絶対位置データの演算が完了し
た時、そのデータの出力時期を与える割り込み信号S2を
MPU1の割り込み入力端子(NMI)に出力している。MPU1
は、係る割り込み信号S2を入力した時は、所定の追随制
御のためのプログラムの実行を開始し、速度信号を出力
する。この割り込み信号S2はRTC20から出力される検出
タイミング信号Dに対し一定時間遅れて、その信号に同
期している。したがって、本実施例では、2ms毎に速度
信号がレジスタ5に出力される。 6はストアードプログラム方式のシーケンスコントロー
ラである。このシーケンスコントローラ6は数値制御装
置AにNCプログラムの実行の指令とM出力をオフする指
令MFINを与えると共に、主軸モータ22の回転と冷却装置
29を制御する。 次に本実施例装置の作用を第3図のフローチャートに従
って説明する。NCプログラムは第6図のように与えられ
ており、そのプログラムにより第7図のように送り制御
が行われる。 まず、ステップ100でNCプログラムの読出番号Iが初期
値1に設定される。次のステップ102でNCプログラムか
ら第I番目のデータブロックが読出され、読出されたデ
ータがステップ104においてデータエンドコード(G9)
と判定されると本プログラムによる処理が終了する。ま
た、ステップ102で読出されたデータがデータエンドコ
ードでない場合には、ステップ106へ移行して早送りコ
ード(G0)又は切削送りコード(G1)か否かが判定され
る。早送りコード(G0)又は切削送りコード(G1)と判
定された場合には、ステップ108へ移行して、読出され
たデータブロックのXコードから位置決めの目標位置が
RAM4の目標位置レジスタOPRに設定され、読出されたデ
ータブロックのFコードから送り速度がRAM4の速度レジ
スタVRに設定される。 次に、ステップ110へ移行し、次のG0又はG1コードの存
在するデータブロックまでに、M出力をオンとすること
を指令するG7コードが有るか否かが判定される。G7コー
ドは第6図に示すように、M出力をオンとする可動軸の
位置を与えるXコードとM出力のアドレスを与えるMコ
ードと共にプログラムされる。本実施例では、M出力は
M1出力〜M4出力の4出力ある。そして、これらのM出力
は、次のG0又はG1コードまでに存在するG7コードにより
自由に指定される。ステップ110でいずれかのM出力を
オンにする指令が有ると判定されると、ステップ112へ
移行してM出力フラグF1〜F4のうち、オンとすることを
指令されたM出力のフラグが全てセットされる。また、
それらのM出力をオンとする。各位置は、対応するM出
力位置レジスタMSRに設定される。その後、MPU1の処理
はステップ114の送り制御に移行する。一方、ステップ1
10で次のG〇又はG1コードまでにG7コードが1つも存在
しないと判定された時は、処理はステップ114の送り制
御に移行する。 ステップ114で後述する送り制御プログラムの実行が終
了すると、ステップ116へ移行しシーケンスコントロー
ラの出力するMFIN信号がオンか否かが判定され、MFIN信
号がオンとなっている時は、M出力をオフにする指令を
意味するので、ステップ118へ移行してM1出力〜M4出力
が全てオフとされる。その後、MPU1の処理はステップ12
2へ移行してNCプログラムの読出番号Iが1だけ加算さ
れ、再度、ステップ102以下が実行される。また、ステ
ップ116でMFINがオンとなっていない時は、直ちにステ
ップ122へ移行する。 尚、ステップ106において、早送りコード(G0)又は切
削送りコード(G1)以外のコードを判別した時は、ステ
ップ120へ移行してそのコードに応じた機能処理が実行
された後、ステップ116へ移行する。 次に、ステップ114で起動される送り制御プログラムに
ついて説明する。 まず、第5図の初期セットプログラムが起動される。ス
テップ300でRAM4の目標位置レジスタOPRから目標位置M
とRAM4の現在位置レジスタAPRから現在位置Rが読出さ
れ、次のステップ302で目標位置Mと現在位置Rの偏差
が演算され、その値は初期残移動量L0として記憶され
る。 この様に、初期残移動量L0が初期設定さた後、絶対位置
演算回路19から、割り込み信号S2を入力する毎に、第4
図のプログラムが実行される。まず、ステップ200で、
絶対位置演算回路19から検出された絶対位置は主軸台10
の現在位置Rとして現在位置レジスタAPRに記憶され
る。次に、ステップ202でM出力フラグF1〜F4を調べフ
ラグがセットされているか否かが判定される。フラグが
セットされていると判定された場合には、ステップ204
へ移行し現在位置レジスタAPRに記憶されている現在位
置Rのフラグがセットされている全てのM出力に対応す
るM出力位置レジスタMSRに記憶されているM出力位置
に等しいか否かが判定される。等しいと判定されるM出
力位置が存在する場合には、主軸台10の現在位置Rが何
れかの指令されたM出力位置に達したことを意味してお
り、この場合にはステップ206へ移行して、M1出力〜M4
出力のうち該当するM出力をオンとし、次のステップ20
8でオンとしたM出力に対応するM出力フラグがオフと
される。また、ステップ204の判定結果がNOの場合に
は、主軸台10の現在位置Rは何れのM出力位置も未だ越
えていないのであるから、M出力をオンとすることな
く、ステップ210へ移行する。 また、ステップ202で何れのM出力フラグもオンに設定
されていないと判定された場合には、直ちにステップ21
0へ移行する。 次に、ステップ210では、目標位置レジスタOPRから目標
位置Mが読出され、ステップ212で目標位置Mから現在
位置Rが減算されて、実残移動量RLが演算される。次
に、ステップ214において、実残移動量RLが零か否かが
判定される。実残移動量RLが零でない場合には、ステッ
プ216へ移行し、目標位置Mまでの経路を補間して得ら
れた制御目標位置の目標位置Mに対する残移動量(以下
この残移動量を「理論残移動量」という)ILが算定され
る。この時、経路補間により得られた制御目標位置は、
目標位置Mと指令速度とから、徐加速、徐減速等の処理
を行って発生される。次に、ステップ218で実残移動量R
Lの理論残移動量ILに対する偏差ΔLが演算され、ステ
ップ220で、偏差ΔLに応じた速度信号Vcが演算され、
その速度信号Vcはステップ222でレジスタ5に出力され
る。すると、サーボユニットBの作用により、指令速度
でサーボモータ9は回転される。 係る処理は、一定時間毎に、ステップ214において実残
移動量RLが零となるまで繰返し実行される。零となると
ステップ226で零の速度信号Vcが出力される。 このようにして、主軸台10は制御タイミングに同期して
変化する補間された制御目標位置に追随しながら、目標
位置Mに位置決めされる。そして、指令されたM出力は
可動軸の送り処理中に可動軸が指令位置に達した時にオ
ンとなる。また、オンとしたM出力は、送り制御の切れ
目、即ちステップ116でMFIN信号がオンとなっていると
判定された時にオフされる。 次に第6図のNCプログラムに沿って処理手順を説明す
る。データブロックN000がステップ102で読出される
と、G0コードが存在するためステップ106の判定がYESと
なり、ステップ108でそのデータブロックのXコードと
Fコードから目標位置と速度が目標位置レジスタOPRと
速度レジスタVRにそれぞれ設定される。次のデータブロ
ックN001にはM出力を指令するG7コードが存在するた
め、ステップ110の判定結果がYESとなり、データブロッ
クN001のM1コードによりオンさせるM出力はM1と指令さ
れているので、ステップ112でM出力フラグF1がセット
される。また、Xコードで指定されたM1出力位置がM出
力位置レジスタMSR1に設定される。その後、ステップ11
4で送り制御される。その結果、第7図に示すように早
送りが行われ、その早送り工程中に主軸台10がM1出力位
置を通過するとM1出力がオンとなる。このM1出力オンは
クーラントオンを意味している。このM1出力オンによ
り、シーケンスコントローラ6は冷却装置29を駆動す
る。こうして、早送り工程の途中からクーラントオンと
なる。 次に、次のデータブロックN001が読出されるが、このデ
ータブロックは既に前のブロックN000の実行時に処理さ
れているので、無操作で、ステップ120、116、122を経
てステップ102へ戻り、次のデータブロックN002が読出
される。データブロックN002が読出され実行されると、
次のG0又はG1コードまでにG7コードが存在しないため、
M出力に関する操作が行われることなく、第7図に示す
ように主軸台10の第1切削送りが行われる。同様に、次
にデータブロックN003が読出され実行されると、第7図
に示すように第2切削が行われる。次に、データブロッ
クN004が読出され実行されると、ステップ120でG4コー
ドによるドウエル処理が実行された後、ステップ116、1
22を経てステップ102へ戻り次のデータブロックN005が
読出される。データブロックN005にはG0コードが存在す
るが、後のデータブロックにはG7コードが存在しないた
め、M出力に関する操作が行われることなく、第7図に
示すように主軸台10の早戻しが行われる。そして、次の
データブロックN006が読出されると、G9コードによりス
テップ104の判定結果がYESとなり、NCプログラムが終了
する。 尚、オンされたM出力は、各データブロックによる処理
が完了した時点でシーケンスコントローラ6から入力す
るMFIN信号がオンの時にオフとなる。 上記実施例では、MFIN信号のオンによりM出力をオフと
しているが、各M出力を選択的にオフとする指令手段を
設けてもよい。また、M出力をオンとする位置を指定す
る機能と同様に、オフとする位置を指定して送り処理と
同時処理によりその位置に達した時にM出力をオフとす
るようにしてもよい。 また、上記実施例では、M出力オンを指令するG7コード
はその前に存在するG0又はG1コードによる送り時に有効
に機能するが、G7コードから後又はM出力をオフとする
コードを設けた場合にはそのコードまでに存在するG0又
はG1コードによる送り工程において有効に機能するよう
にしてもよい。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a diagram showing a configuration of a feed control device using a numerical control device according to an embodiment of the present invention, and FIG. 2 is a configuration of a feed control device of a headstock of a machine tool using the device. It is a figure. In FIG. 1, A is a numerical control device, B is a servo unit, and C is an absolute position detection device. The numerical control device A is
It mainly comprises a microprocessor unit 1 (hereinafter abbreviated as “MPU”) for performing control calculation, a ROM 2 storing a control program therefor, a data input device 3 such as a keyboard, and a battery-backed RAM 4. In the RAM4, the NCD area in which the NC program is stored, the M output flags F1 to F4 that are set when the M output is instructed, and the M output position registers MSR1 to MSR4 that set the position to turn on the M output are sent. Target position register OPR for setting the control target position, speed register VR for setting the feed speed, and absolute position detector C
The present absolute position of the headstock 10 (hereinafter "current position"
Is detected, a current position register APR is formed to store this value. There are four M outputs, M1 to M4, and the M output flag and M output position register are each M
It is provided for each output. The servo unit B is mainly composed of a register 5, a DA converter 7 and a drive circuit 8. The speed signal S1 output from the MPU1 is input to the register 5, converted into an analog signal by the DA converter 7, and output to the drive circuit 8.
The drive circuit 8 inputs this signal and supplies power to the servo motor 9 to rotate it. A feed screw 11, which is a movable shaft for moving the headstock 10, is mechanically connected to the output shaft of the servomotor 9.
Therefore, the absolute position of the movable shaft can be regarded as corresponding to the absolute position of the headstock 10. The headstock 10 slides on a bed 24 with a feed screw 11. Further, the workpiece 25 is placed on the table 26 that slides on the bed 24,
This workpiece 25 is machined by a drill 28 attached to a spindle 27. The drill 28 is cooled by the cooling liquid output from the cooling device 29. A speed detector 12 that detects the moving speed of the headstock 10 and sends a speed feedback signal to the drive circuit 8 is provided on the output shaft of the servomotor 9. The absolute position detecting device C mainly includes a first resolver 13 mechanically coupled to the output shaft of the servomotor 9 and a second resolver 13 coupled to the first resolver 13 via a reduction mechanism 14. 15, the resolver excitation circuit 16, and the first resolver
A first phase comparison circuit 17 that detects the phase angle of 13, a second phase comparison circuit 18 that detects the phase angle of the second resolver 15, and an absolute position that calculates the absolute position of the headstock 10 from the outputs of both. It is composed of an arithmetic circuit 19 and a real-time clock (hereinafter abbreviated as "RTC") 20 which drives the circuit 19 at a constant cycle and gives an absolute position detection timing. First resolver 1
3 shows that when the feed screw 11 makes one revolution, its input shaft makes one revolution,
In addition, the second resolver 15 is configured such that its input shaft makes one rotation while the headstock 10 moves from one end of the moving range to the other. The phase difference between the output voltage of the resolver and the excitation voltage changes according to the rotation angle of the input shaft. The first phase comparison circuit 17 counts the phase difference of the output voltage of the first resolver 13 with respect to the excitation voltage by a counter, converts it into a digital value, and outputs it to the absolute position calculation circuit 19.
Similarly, the second phase comparison circuit 18 converts the phase difference between the output voltage of the second resolver 15 and the excitation voltage into a digital value and outputs it to the absolute position calculation circuit 19. The absolute position calculation circuit 19 is activated every time the detection timing signal D is input from the RTC 20 (2 ms), the phase data is input from both phase comparison circuits 17 and 18, and the absolute position of the spindle headstock 10 is calculated and the interface is calculated. Output to MPU1 via the circuit (IF). or,
When the absolute position calculation circuit 19 completes the calculation of the absolute position data, it outputs an interrupt signal S2 that gives the output timing of that data.
Output to the interrupt input pin (NMI) of MPU1. MPU1
When the interrupt signal S2 is input, starts the execution of a program for predetermined tracking control and outputs a speed signal. The interrupt signal S2 is synchronized with the detection timing signal D output from the RTC 20 after a certain time delay. Therefore, in this embodiment, the speed signal is output to the register 5 every 2 ms. Reference numeral 6 is a stored program type sequence controller. The sequence controller 6 gives the numerical control device A a command to execute the NC program and a command MFIN to turn off the M output, and also rotates the spindle motor 22 and cools the cooling device.
Control 29. Next, the operation of the apparatus of this embodiment will be described with reference to the flowchart of FIG. The NC program is given as shown in FIG. 6, and the feed control is performed as shown in FIG. 7 by the program. First, in step 100, the read number I of the NC program is set to the initial value 1. In the next step 102, the I-th data block is read from the NC program, and the read data is read in step 104 as a data end code (G9).
If it is determined, the processing by this program ends. If the data read in step 102 is not the data end code, the process proceeds to step 106 and it is determined whether it is the fast-forward code (G0) or the cutting-feed code (G1). If it is determined to be the rapid feed code (G0) or the cutting feed code (G1), the process proceeds to step 108 and the target position for positioning is determined from the X code of the read data block.
It is set in the target position register OPR of RAM4, and the feed speed is set in the speed register VR of RAM4 from the F code of the read data block. Next, the routine proceeds to step 110, where it is judged whether or not there is a G7 code for instructing to turn on the M output by the next data block in which the G0 or G1 code exists. The G7 code, as shown in FIG. 6, is programmed with an X code that gives the position of the moveable axis that will turn the M output on and an M code that gives the address of the M output. In this embodiment, the M output is
There are four outputs, M1 output to M4 output. Then, these M outputs are freely designated by the G7 code existing up to the next G0 or G1 code. If it is determined in step 110 that there is a command to turn on any of the M outputs, the process proceeds to step 112, and all of the M output flags that are instructed to be turned on among the M output flags F1 to F4. Set. Also,
Turn on those M outputs. Each position is set in the corresponding M output position register MSR. After that, the process of MPU1 shifts to the feed control of step 114. Meanwhile, step 1
When it is determined at 10 that no G7 code exists by the next G ○ or G1 code, the process proceeds to the feed control of step 114. When the execution of the feed control program, which will be described later, is completed in step 114, the routine proceeds to step 116, where it is judged whether or not the MFIN signal output by the sequence controller is ON. When the MFIN signal is ON, the M output is turned off. Since this means a command to turn on, all the M1 to M4 outputs are turned off in step 118. After that, the process of MPU1 is step 12
The process shifts to step 2, the read number I of the NC program is incremented by 1, and steps 102 and thereafter are executed again. If the MFIN is not turned on in step 116, the process immediately proceeds to step 122. When a code other than the rapid feed code (G0) or the cutting feed code (G1) is determined in step 106, the process proceeds to step 120 and the functional process according to the code is executed, and then the process proceeds to step 116. To do. Next, the feed control program started in step 114 will be described. First, the initial setting program shown in FIG. 5 is started. In step 300, the target position M from the target position register OPR of RAM4
The current position R is read from the current position register APR of the RAM 4, the deviation between the target position M and the current position R is calculated in the next step 302, and the value is stored as the initial remaining movement amount L0. In this way, after the initial remaining movement amount L0 is initialized, the fourth time is input each time the interrupt signal S2 is input from the absolute position calculation circuit 19.
The program shown in the figure is executed. First, in step 200,
The absolute position detected by the absolute position calculation circuit 19 is the headstock 10.
The current position R is stored in the current position register APR. Next, at step 202, the M output flags F1 to F4 are examined to determine whether or not the flags are set. If it is determined that the flag is set, step 204
Then, it is judged whether or not the flag of the current position R stored in the current position register APR is equal to the M output position stored in the M output position register MSR corresponding to all the M outputs for which the flag is set. It If there are M output positions that are determined to be equal, it means that the current position R of the headstock 10 has reached any of the commanded M output positions. In this case, the process proceeds to step 206. Then, M1 output ~ M4
Turn on the corresponding M output among the outputs, and proceed to the next Step 20.
The M output flag corresponding to the M output turned on in 8 is turned off. If the decision result in the step 204 is NO, since the current position R of the headstock 10 has not exceeded any M output position yet, the process shifts to the step 210 without turning on the M output. . If it is determined in step 202 that none of the M output flags is set to ON, immediately step 21
Move to 0. Next, at step 210, the target position M is read from the target position register OPR, and at step 212 the current position R is subtracted from the target position M to calculate the actual remaining movement amount RL. Next, at step 214, it is judged if the actual remaining movement amount RL is zero. When the actual remaining movement amount RL is not zero, the process proceeds to step 216, and the remaining movement amount of the control target position obtained by interpolating the route to the target position M with respect to the target position M (hereinafter, this remaining movement amount is IL) is calculated. At this time, the control target position obtained by the route interpolation is
It is generated by performing processing such as gradual acceleration and gradual deceleration from the target position M and the commanded speed. Next, in step 218, the actual remaining movement amount R
The deviation ΔL of L from the theoretical remaining movement amount IL is calculated, and in step 220, the speed signal Vc corresponding to the deviation ΔL is calculated,
The speed signal Vc is output to the register 5 in step 222. Then, by the action of the servo unit B, the servo motor 9 is rotated at the command speed. This process is repeatedly executed at regular intervals until the actual remaining movement amount RL becomes zero in step 214. When it becomes zero, a zero velocity signal Vc is output in step 226. In this way, the headstock 10 is positioned at the target position M while following the interpolated control target position that changes in synchronization with the control timing. Then, the commanded M output is turned on when the movable shaft reaches the command position during the feed processing of the movable shaft. Further, the M output which is turned on is turned off when the feed control is interrupted, that is, when it is determined in step 116 that the MFIN signal is turned on. Next, the processing procedure will be described with reference to the NC program in FIG. When the data block N000 is read in step 102, since the G0 code exists, the determination in step 106 becomes YES, and in step 108, the target position and speed are determined from the X code and F code of the data block, the target position register OPR and the speed. It is set in each register VR. Since the next data block N001 has the G7 code for instructing the M output, the determination result of step 110 is YES, and the M output to be turned on by the M1 code of the data block N001 is instructed to be M1. The M output flag F1 is set by. Further, the M1 output position designated by the X code is set in the M output position register MSR1. Then step 11
The feed is controlled by 4. As a result, rapid feed is performed as shown in FIG. 7, and the M1 output is turned on when the headstock 10 passes the M1 output position during the rapid feed step. This M1 output ON means coolant ON. When the M1 output is turned on, the sequence controller 6 drives the cooling device 29. In this way, the coolant is turned on from the middle of the fast-forwarding process. Next, the next data block N001 is read, but since this data block has already been processed at the time of execution of the previous block N000, the operation is returned to step 102 through steps 120, 116 and 122, and The data block N002 of is read. When the data block N002 is read and executed,
Since there is no G7 code by the next G0 or G1 code,
As shown in FIG. 7, the first cutting feed of the headstock 10 is performed without performing the operation related to the M output. Similarly, when the data block N003 is next read out and executed, the second cutting is performed as shown in FIG. Next, when the data block N004 is read and executed, the dwell processing by the G4 code is executed in step 120, and then steps 116 and 1 are executed.
The process returns to step 102 via 22 and the next data block N005 is read. G0 code exists in data block N005, but G7 code does not exist in the subsequent data block. Therefore, as shown in FIG. 7, the spindle headstock 10 is quickly returned without performing the operation related to M output. Be seen. Then, when the next data block N006 is read, the determination result of step 104 becomes YES by the G9 code, and the NC program ends. The M output that is turned on is turned off when the MFIN signal input from the sequence controller 6 is turned on when the processing by each data block is completed. In the above embodiment, the M output is turned off by turning on the MFIN signal, but a command means for selectively turning off each M output may be provided. Further, similarly to the function of designating the position where the M output is turned on, the position where the M output is turned off may be designated and the M output may be turned off when the position is reached by the feed processing and the simultaneous processing. Further, in the above embodiment, the G7 code for instructing the M output ON functions effectively at the time of feeding by the G0 or G1 code existing before the M7 code. May function effectively in the feeding process by the G0 or G1 code existing up to that code.

【発明の効果】【The invention's effect】

本発明の数値制御装置は、移動指令コードに指令された
目標位置に可動軸の送りを制御する送り制御手段と、可
動軸の任意位置を指定してM出力をオンとすることを指
令するM出力指令手段と、M出力指令手段による指令が
有効な可動軸の送り制御中に、可動軸がM出力指令手段
で指令された任意位置を通過した時に、M出力をオンと
するM出力実行手段とを有しているので、送り動作と同
時処理にてM出力をオンとすることができる。さらにM
出力のオンにより制御される外部機器の状態に係わらず
前記可動軸が目標位置に到達したことによって次の指令
コードを実行する指令コード実行手段を備えたので、NC
データはM出力をオンにより制御される外部機器の状態
に係わらず進行できる。従って、処理速度が向上する。
また、従来のようにM出力をオンとする位置の前後で2
つの工程に分けて送り指令を与える必要がないため、NC
データの作成が簡略化される。
The numerical control device of the present invention, the feed control means for controlling the feed of the movable axis to the target position instructed by the movement command code, and the M for instructing to turn on the M output by designating an arbitrary position of the movable axis. M output execution means for turning on the M output when the movable axis passes an arbitrary position commanded by the M output command means during the feed control of the movable axis in which the command by the output command means and the M output command means is effective. Since M and M are provided, the M output can be turned on by the simultaneous processing with the feeding operation. Furthermore M
Since the movable shaft reaches the target position regardless of the state of the external device controlled by turning on the output, command code executing means for executing the next command code is provided.
Data can proceed regardless of the state of the external device controlled by turning on the M output. Therefore, the processing speed is improved.
In addition, as in the conventional case, 2 before and after the position where the M output is turned on.
Since it is not necessary to give a feed command separately for one process, NC
Data creation is simplified.

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

第1図は本発明の具体的な一実施例に係る数値制御装置
を用いた主軸台送り装置の構成を示したブロックダイヤ
グラム。第2図はその主軸台送り装置を用いた工作機械
の構成図。第3図、第4図、第5図は本実施例装置に使
用されているMPUの処理手順を示したフローチャート。
第6図はNCプログラムの一例を示した説明図。第7図は
そのNCプログラムによる送り工程を示した説明図であ
る。 1…マイクロプロセッサユニット、9…サーボモータ、
10…主軸台、11…送りねじ、13…第1のレゾルバ、15…
第2のレゾルバ
FIG. 1 is a block diagram showing a configuration of a headstock feeding device using a numerical control device according to a specific embodiment of the present invention. FIG. 2 is a block diagram of a machine tool using the headstock feeder. FIG. 3, FIG. 4, and FIG. 5 are flowcharts showing the processing procedure of the MPU used in the apparatus of this embodiment.
FIG. 6 is an explanatory diagram showing an example of the NC program. FIG. 7 is an explanatory view showing the feeding process by the NC program. 1 ... Microprocessor unit, 9 ... Servo motor,
10 ... Headstock, 11 ... Feed screw, 13 ... First resolver, 15 ...
Second resolver

───────────────────────────────────────────────────── フロントページの続き (72)発明者 高野 寿男 愛知県刈谷市朝日町1丁目1番地 豊田工 機株式会社内 (72)発明者 長谷川 宏治 愛知県刈谷市朝日町1丁目1番地 豊田工 機株式会社内 (72)発明者 佐藤 秀樹 愛知県刈谷市朝日町1丁目1番地 豊田工 機株式会社内 (72)発明者 井川 正治 愛知県豊田市トヨタ町1番地 トヨタ自動 車株式会社内 (72)発明者 杉戸 弥寿徳 愛知県豊田市トヨタ町1番地 トヨタ自動 車株式会社内 (72)発明者 伊藤 政司 愛知県豊田市トヨタ町1番地 トヨタ自動 車株式会社内 (72)発明者 竹内 彰浩 愛知県豊田市トヨタ町1番地 トヨタ自動 車株式会社内 (56)参考文献 特開 昭58−177289(JP,A) ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Hisao Takano 1-1, Asahi-cho, Kariya city, Aichi Toyota Koki Co., Ltd. (72) Inventor Koji Hasegawa 1-1-chome, Asahi-cho, Kariya city, Aichi Toyota Koki Incorporated (72) Inventor Hideki Sato 1-1 Asahi-cho, Kariya city, Aichi Toyota Koki Co., Ltd. (72) Inventor Shoji Igawa 1 Toyota-cho, Toyota-shi, Aichi Toyota Automobile Co., Ltd. (72) Inventor Yasutoku Sugito 1 Toyota Town, Toyota City, Aichi Prefecture, Toyota Motor Corporation (72) Inventor, Masashi Ito 1 Toyota Town, Toyota City, Aichi Prefecture Toyota Motor Corporation, (72) Inventor, Akihiro Takeuchi Toyota Motor Corporation, Aichi Prefecture City, Toyota-cho, Toyota City (56) References JP-A-58-177289 (JP, A)

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】少なくとも可動軸の目標位置を指令する移
動指令コードを有する複数の指令コードからなるNCデー
タに基づいて可動軸の送りを数値制御する数値制御装置
において、 前記移動指令コードに指定された目標位置に前記可動軸
の送りを制御する送り制御手段と、 前記可動軸の任意位置を指定して外部機器を制御するM
出力をオンとすることを指令するM出力指令手段と、 前記M出力指令手段による指令が有効な前記送り制御手
段による前記可動軸の送り制御中に、前記可動軸が前記
M出力指令手段で指令された前記任意位置を通過した時
に、M出力をオンとするM出力実行手段と 前記M出力のオンにより制御される外部機器の状態に係
わらず前記可動軸が目標位置に到達したことによって次
の指令コードを実行する指令コード実行手段とを有する
ことを特徴とする数値制御装置。
1. A numerical control device for numerically controlling the feed of a movable axis based on NC data consisting of a plurality of command codes having at least a movement command code for commanding a target position of a movable axis. Feed control means for controlling the feed of the movable shaft to a target position, and M for controlling an external device by designating an arbitrary position of the movable shaft.
During the feed control of the movable axis by the M output command means for instructing to turn on the output and the feed control means in which the command by the M output command means is valid, the movable axis commands the M output command means. When the movable shaft reaches the target position regardless of the states of the M output execution means for turning on the M output and the external device controlled by turning on the M output when the movable shaft passes through the arbitrary position A numerical control device comprising: a command code executing means for executing a command code.
JP61306045A 1986-12-22 1986-12-22 Numerical control device Expired - Fee Related JPH07104705B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61306045A JPH07104705B2 (en) 1986-12-22 1986-12-22 Numerical control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61306045A JPH07104705B2 (en) 1986-12-22 1986-12-22 Numerical control device

Publications (2)

Publication Number Publication Date
JPS63157206A JPS63157206A (en) 1988-06-30
JPH07104705B2 true JPH07104705B2 (en) 1995-11-13

Family

ID=17952393

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61306045A Expired - Fee Related JPH07104705B2 (en) 1986-12-22 1986-12-22 Numerical control device

Country Status (1)

Country Link
JP (1) JPH07104705B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01295306A (en) * 1988-05-23 1989-11-29 Fanuc Ltd Numerical controller
JPH07104690B2 (en) * 1988-07-29 1995-11-13 三菱電機株式会社 Synchronous control method for multiple turrets
JP2619520B2 (en) * 1989-03-10 1997-06-11 ファナック株式会社 Numerical controller for transfer machine
JPH04177404A (en) * 1990-11-08 1992-06-24 Fanuc Ltd M function output system for numerical controller

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58177289A (en) * 1982-04-12 1983-10-17 株式会社三協精機製作所 Controller for operation of industrial robot

Also Published As

Publication number Publication date
JPS63157206A (en) 1988-06-30

Similar Documents

Publication Publication Date Title
JP3671020B2 (en) Numerical controller
KR940011352B1 (en) Numerically controlled machine tool
JPH0569275A (en) Numerical control device
JP2935706B2 (en) Machining program correction method
WO1989006066A1 (en) Method of speed control for servomotor
JPH07104705B2 (en) Numerical control device
JP2504973B2 (en) Numerical control unit
WO1992009018A1 (en) Method for executing auxiliary function in numerical control equipment
JPS6377638A (en) Numerically controlled machine tool
JP2619520B2 (en) Numerical controller for transfer machine
JPH0630011B2 (en) Numerical control Machining restart control method
JP2997270B2 (en) Interpolation method
JPH0797289B2 (en) Positioning device
JP2788725B2 (en) Numerical control unit
JPH05165514A (en) Interpolating system for numerical controller
JPH05100723A (en) Tool length correcting system for machine tool
JP2652789B2 (en) Arc tracking control method
JP2611123B2 (en) Numerical control cam grinder
JP2524911Y2 (en) Numerical control unit
JPH056210A (en) Torque limit system
JP3188396B2 (en) Feed rate control method and apparatus in numerical control
JPH0885044A (en) Working load monitoring system
JPH07100281B2 (en) Numerical control machine tool
JPH0751995A (en) Machining load monitoring method
JP2915202B2 (en) Numerical control unit

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees