JP2504973B2 - Numerical control unit - Google Patents

Numerical control unit

Info

Publication number
JP2504973B2
JP2504973B2 JP30604686A JP30604686A JP2504973B2 JP 2504973 B2 JP2504973 B2 JP 2504973B2 JP 30604686 A JP30604686 A JP 30604686A JP 30604686 A JP30604686 A JP 30604686A JP 2504973 B2 JP2504973 B2 JP 2504973B2
Authority
JP
Japan
Prior art keywords
current
mode
current limiting
code
current limit
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
JP30604686A
Other languages
Japanese (ja)
Other versions
JPS63157207A (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 JP30604686A priority Critical patent/JP2504973B2/en
Publication of JPS63157207A publication Critical patent/JPS63157207A/en
Application granted granted Critical
Publication of JP2504973B2 publication Critical patent/JP2504973B2/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]

本発明は、指令された目標位置に可動軸を位置決めす
るための装置で、特に、可動軸を駆動するサーボモータ
の送り動作中の駆動電流の制限機能を有した装置に関す
る。
The present invention relates to a device for positioning a movable shaft at a commanded target position, and more particularly to a device having a function of limiting a drive current during a feeding operation of a servo motor that drives the movable shaft.

【従来技術】[Prior art]

従来、数値制御装置により駆動されるサーボモータの
駆動回路には、可動軸のデッドストップによるサーボモ
ータの焼損の防止のため、サーボモータの駆動電流を制
限する電流制限回路を有したものがある。この電流制限
回路は、リミットスイッチを所定の位置に設けて、可動
軸が所定の位置に達するとリミットスイッチから出力さ
れるオン信号により駆動される。 また、数値制御装置のNCプログラムにより電流制限回
路を作動させて、電流制限モードで可動軸の送りを制御
するようにした装置も存在する。
2. Description of the Related Art Conventionally, some servomotor drive circuits driven by numerical control devices have a current limiting circuit that limits the drive current of the servomotor in order to prevent burnout of the servomotor due to dead stop of the movable shaft. This current limiting circuit is provided with a limit switch at a predetermined position, and is driven by an ON signal output from the limit switch when the movable shaft reaches the predetermined position. There is also a device in which the NC program of the numerical control device activates the current limiting circuit to control the feed of the movable shaft in the current limiting mode.

【発明が解決しようとする問題点】[Problems to be Solved by the Invention]

ところが、上記のリミットスイッチから出力される外
部信号で電流制限回路を作動させる方法は、可動軸の位
置を検出するリミットスイッチを設置する必要があるこ
と、電流制限モードにする位置を変更するにはリミット
スイッチの取付位置を変更したり多数のリミットスイッ
チを用いる必要がある等の欠点がある。 また、NCプログラムにより電流制限回路を駆動させる
方法には、可動軸の任意の位置で電流制限モードに切換
られるという利点があるが、1つのNCデータブロックに
よる送り指令中の任意の位置から電流制限モードに切換
えることができなかった。即ち、1つのNCデータブロッ
クにより電流制限モードにする位置まで送り指令を与え
た後、次のNCデータブロックで電流制限モードに指令
し、さらに次のNCデータブロックで所定の位置まで送り
指令を与えなければならなかった。このように、電流制
限モードにするには同一モードの送り行程であっても、
電流制限モードに切換えるまでの送り指令と、切換えた
後の送り指令のNCデータブロックを必要とした。このた
め、電流制限モードへの切換は、一旦送り制御が終了し
た後に行われるため、処理時間が長くなるという問題が
ある。また、送り指令を2つのデータブロックに分けな
ければならず、NCプログラムの作成も困難であるという
問題がある。
However, the method of operating the current limit circuit with the external signal output from the above limit switch is that it is necessary to install a limit switch that detects the position of the movable axis, and to change the position to enter the current limit mode. There are drawbacks such as changing the mounting position of the limit switch and using a large number of limit switches. Also, the method of driving the current limit circuit by the NC program has the advantage that it can switch to the current limit mode at any position of the movable axis, but the current limit can be set at any position during the feed command by one NC data block. Could not switch to mode. That is, one NC data block gives a feed command to the position to set the current limit mode, then the next NC data block gives a command to the current limit mode, and the next NC data block gives a feed command to the predetermined position. I had to. In this way, to set the current limit mode, even in the same stroke,
The NC data block of the feed command until switching to the current limit mode and the feed command after switching was required. Therefore, the switching to the current limit mode is performed 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 makes it difficult to create an NC program.

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

上記問題点を解決するための発明の構成は、可動軸を
駆動するサーボモータの駆動電流を制限する電流制限回
路を備え、NCプログラムにより指令された指令位置に可
動軸を位置決めする数値制御装置において、電流制限回
路を作動させる作動位置を指定してサーボモータを電流
制限モードで駆動することを指令する電流制限モード指
令手段と、可動軸の現在位置を検出する現在位置検出手
段と、電流制限モード指令手段によりモード設定された
NCプログラムの1つのNCデータブロックによる可動軸の
送り制御中に、現在位置検出手段により検出された可動
軸の現在位置が、電流制限モード指令手段で指令された
作動位置を通過したことを判定する判定手段と、判定手
段により、通過と判定された場合には、電流制限回路を
作動させてサーボモータを電流制限モードで制御する電
流制限モード実行手段とを有することを特徴とする。
The configuration of the invention for solving the above problems is provided in a numerical control device that includes a current limiting circuit that limits a drive current of a servo motor that drives a movable shaft, and that positions the movable shaft at a command position commanded by an NC program. A current limiting mode command means for instructing to drive the servo motor in the current limiting mode by designating an operating position for operating the current limiting circuit, a current position detecting means for detecting the current position of the movable axis, and a current limiting mode. Mode set by command means
During the feed control of the movable axis by one NC data block of the NC program, it is determined that the current position of the movable axis detected by the current position detection means has passed the operating position instructed by the current limit mode command means. It is characterized by having a judging means and a current limiting mode executing means for operating the current limiting circuit to control the servomotor in the current limiting mode when the judging means determines that the current is passing.

【作用】 まず、電流制限モード指令手段によりサーボモータの
駆動を電流制限モードに切換える動作位置が指令され
る。すると、電流制限モード実行手段は電流制限モード
指令手段によりモード設定された1つのNCデータブロッ
クによる可動軸の送り制御中に、現在位置検出手段によ
り検出された可動軸の現在位置が、電流制限モード指令
手段により指令された動作位置を通過したか否かが判定
される。可動軸の現在位置がその動作位置を通過したと
判定された時にサーボモータを電流制限モードで駆動す
る。 この結果、1つのNCデータブロックによる送り指令中
の任意の位置から電流制限モードに切換えることができ
るので、処理が高速化されると共にNCプログラムの作成
が簡略になる。
First, the current limit mode command means commands the operating position at which the drive of the servomotor is switched to the current limit mode. Then, the current limit mode execution means changes the current position of the movable axis detected by the current position detection means to the current limit mode during feed control of the movable axis by one NC data block whose mode is set by the current limit mode command means. It is determined whether or not the operation position commanded by the command means has been passed. The servomotor is driven in the current limiting mode when it is determined that the current position of the movable shaft has passed its operating position. As a result, it is possible to switch to the current limiting mode from any position in the feed command by one NC data block, which speeds up the processing and simplifies the creation of the NC program.

【実施例】【Example】

以下、図面により本発明の実施例を詳細に説明する。 第1図は、本発明の一実施例に係る数値制御装置を用
いた送り制御装置の構成を示す図であり、第2図はその
装置を用いた工作機械の主軸台の送り制御装置の構成図
である。 第1図において、Aは、数値制御装置、Bは、サーボ
ユニット、Cは、絶対位置検出装置である。数値制御装
置Aは、主として、制御演算を行うマイクロプロセッサ
ユニット1(以下「MPU〕と略記する)とその制御プロ
グラムを記憶したROM2とキーボード等のデータ入力装置
3とバッテリバックアップしたRAM4とから成る。RAM4に
は、NCプログラムが記憶されたNCD領域と電流制限モー
ドが指令された時に設定される電流制限モードフラグFL
Gと電流制限モードに切換える位置を設定するモード切
換位置レジスタMSRと送り制御の目標位置を設定する目
標位置レジスタOPRと送り速度を設定する速度レジスタV
Rと絶対位置検出装置Cにより、主軸台10の現在の絶対
位置(以下「現在位置」という)が検出される度に、こ
の値を記憶する現在位置レジスタAPRが形成されてい
る。 サーボユニットBは、主として、レジスタ5とDA変換
器7と駆動回路8と電流制限回路21とで構成されてい
る。MPU1から出力された速度信号S1はレジスタ5に入力
し、DA変換器7によりアナログ信号に変換されて、駆動
回路8に出力される。駆動回路8は、この信号を入力し
てサーボモータ9に電力を供給して、それを回転させ
る。また、電流制限回路21はMPU1から電流制限信号S3を
入力した時には、駆動回路8からサーボモータ9に供給
される最大電流を制限する。従って、電流制限モードで
の送りは、MPU1から電流制限信号S3を電流制限回路21に
出力することにより行われる。 サーボモータ9の出力軸には主軸台10を移動させるた
めの可動軸である送りねじ11が機械的に連結されてい
る。従って、可動軸の絶対位置は、主軸台10の絶対位置
に対応しているものとみなすことができる。主軸台10は
送りねじ11によりベッド24上を摺動する。また、ベッド
24上を摺動するテーブル26上に工作物25が載置されてお
り、この工作物25は主軸27に取付けられたドリル28によ
り加工される。また、サーボモータ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のレゾ
ルバ13は送りねじ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)に出力している。M
PU1は、係る割り込み信号S2を入力した時は、所定の追
随制御のためのプログラムの実行を開始し、速度信号を
出力する。この割り込み信号S2はRTC20から出力される
検出タイミング信号Dに対し一定時間遅れて、その信号
に同期している。したがって、本実施例では、2ms毎に
速度信号がレジスタ5に出力される。 6はストアードプログラム方式のシーケンスコントロ
ーラである。このシーケンスコントローラ6は数値制御
装置AにNCプログラムの実行を指令すると共に、主軸モ
ータ22の回転を制御する。 次に本実施例装置の作用を第3図のフローチャートに
従って説明する。NCプログラムは第6図のように与えら
れており、そのプログラムにより第7図のように送り制
御が行われる。 まず、ステップ100でNCプログラムの読出番号Iが初
期値1に設定される。次のステップ102でNCプログラム
から第I番目のデータブロックが読出され、読出された
データがステップ104においてデータエンドコード(G
9)と判定されると本プログラムによる処理が終了す
る。また、ステップ102で読出されたデータがデータエ
ンドコードでない場合には、ステップ106へ移行して早
送りコード(G0)又は切削送りコード(G1)か否かが判
定される。早送りコード(G0)又は切削送りコード(G
1)と判定された場合には、ステップ108へ移行して、読
出されたデータブロックのXコードから位置決めの目標
位置がRAM4の目標位置レジスタOPRに設定され、読出さ
れたデータブロックのFコードから送り速度がRAM4の速
度レジスタVRに設定される。 次に、ステップ110へ移行し、次の、即ち第(I+
1)番目のデータブロックに電流制限オンコード(G5)
があるか否かが判定される。電流制限オンコードがある
場合には、ステップ112へ移行してRAM4の電流制限モー
ドフラグFLGをオンに設定し、Xコードから電流制限モ
ードに切換える位置をRAM4のモード切換位置レジスタMS
Rに設定した後、MPU1の処理はステップ114の送り制御に
移行する。一方、ステップ110で第(I+1)番目のデ
ータブロックに電流制限オンコードがないと判定された
場合には、ステップ116へ移行して、第(I+1)番目
のデータブロックに電流制限オフコード(G6)があるか
否かが判定される。電流制限オフコードがあると判定さ
れた場合には、ステップ118へ移行してRAM4の電流制限
モードフラグFLGがオフに設定された後、MPU1の処理は
ステップ114の送り制御に移行する。また、ステップ116
で電流制限オフコードがないと判定された場合には、電
流制限モードフラグFLGの操作を行うことなく、ステッ
プ114の送り制御に移行する。 ステップ114で後述する送り制御プログラムの実行が
終了すると、ステップ122へ移行してNCプログラムの読
出番号Iが1だけ加算され、再度、ステップ102以下が
実行される。 尚、ステップ106において、早送りコード(G0)又は
切削送りコード(G1)以外のコードを判別した時は、ス
テップ120へ移行してそのコードに応じた機能処理が実
行される。 次に、ステップ114で起動される送り制御プログラム
について説明する。 まず、第5図の初期セットプログラムが起動される。
ステップ300でRAM4の目標位置レジスタOPRから目標位置
MとRAM4の現在位置レジスタAPRから現在位置Rが読出
され、次のステップ302で目標位置Mと現在位置Rの偏
差が演算され、その値は初期残移動量L0として記憶され
る。 この様に、初期残移動量L0が初期設定さた後、絶対位
置演算回路19から、割り込み信号S2を入力する毎に、第
4図のプログラムが実行される。まず、ステップ200
で、絶対位置演算回路19から検出された絶対位置は主軸
台10の現在位置Rとして現在位置レジスタAPRに記憶さ
れる。 次に、ステップ202で電流制限モードフラグFLGがオン
に設定されているか否かが判定される。電流制限モード
フラグFLGがオンに設定されている場合には、ステップ2
04へ移行し、現在位置レジスタAPRに記憶されている現
在位置Rがモード切換位置レジスタMSRに記憶されてい
るモード切換位置Pに等しいか否かが判定される。判定
結果がYESの場合には、主軸台10の現在位置Rがモード
切換位置Pに達したことを意味しており、この場合には
ステップ206へ移行して、電流制限信号S3が電流制限回
路21に出力され、送りモードは電流制限モードとなりサ
ーボモータ9の駆動電流の最大値が制限される。また、
ステップ204の判定結果がNOの場合には、主軸台10の現
在位置Rはモード切換位置Pを未だ越えていないのであ
るから、電流制限信号S3を出力することなく、ステップ
210へ移行する。 また、ステップ202で電流制限モードフラグFLGがオン
に設定されていないと判定された場合には、ステップ20
8へ移行して電流制限回路21に出力している電流制限信
号S3をオフとし、ステップ210へ移行する。 次にステップ210で目標位置レジスタOPRから目標位置
Mが読出され、ステップ212で目標位置Mから現在位置
Rが減算されて、実残移動量RLが演算される。次に、ス
テップ214において、実残移動量RLが零か否かが判定さ
れる。実残移動量RLが零でない場合には、ステップ216
へ移行し、目標位置Mまでの経路を補間して得られた制
御目標位置の目標位置Mに対する残移動量(以下この残
移動量を「理論残移動量」という)ILが算定される。こ
の時、経路補間により得られた制御目標位置は、目標位
置Mと指令速度とから、徐加速、徐減速等の処理を行っ
て発生される。次に、ステップ218で実残移動量RLの理
論残移動量ILに対する偏差ΔLが演算され、ステップ22
0で、偏差ΔLに応じた速度信号Vcが演算され、その速
度信号Vcはステップ222でレジスタ5に出力される。す
ると、サーボユニットBの作用により、指令速度でサー
ボモータ9は回転される。 係る処理は、一定時間毎に、ステップ214において実
残移動量RLが零となるまで繰返し実行される。零となる
とステップ226で零の速度信号Vcが出力される。 このようにして、主軸台10は制御タイミングに同期し
て変化する補間された制御目標位置に追随しながら、目
標位置Mに位置決めされる。 次に第6図のNCプログラムに沿って処理手順を説明す
る。データブロックN000がステップ102で読出される
と、G0コードが存在するためステップ106の判定がYESと
なり、ステップ108でそのデータブロックのXコードと
Fコードから目標位置と速度が目標位置レジスタOPRと
速度レジスタVRにそれぞれ設定される。次のデータブロ
ックN001にはG5コードが存在しないため、ステップ110
及びステップ116の判定が共にNOとなり、電流制限モー
ドにすることなくステップ114で送り制御され、第7図
に示すように主軸台10は早送りされる。同様に次のデー
タブロックN001が読出され実行されると、次のデータブ
ロックN002にはG5コードが存在しないため、電流制限モ
ードにすることなく第7図に示すように主軸台10の第1
切削送りが行われる。次にデータブロックN002が読出さ
れ実行されると、次のデータブロックN003にはG5コード
が存在するため、ステップ110の判定結果がYESとなり、
ステップ112で電流制限モードフラグFLGがオンに設定さ
れ、モード切換位置レジスタMSRにXコードにより指定
されたモード切換位置Pが設定された後、ステップ114
で送り制御される。その結果、第7図に示すように第2
切削が行われ、その第2切削工程中に主軸台10がモード
切換位置Pを通過すると電流制限信号S3が電流制限回路
21に出力されて、電流制限モードとなる。次に、次のデ
ータブロックN003が読出されるがステップ120を通り無
処理でステップ102へ戻り次のデータブロックN004が読
出される。そして、ステップ120でG4コードによるドウ
エル処理が実行された後、ステップ102へ戻り次のデー
タブロックN005が読出される。データブロックN005にG0
コードが存在するため、ステップ108で目標位置と速度
の設定がなされるが、次のデータブロックN006にはG6コ
ードが存在するため、ステップ116の判定結果がYESとな
り、ステップ118へ移行して電流制限モードフラグFLGが
オフに設定され、ステップ114で送り制御される。その
結果、主軸台10は第7図に示すように電流制限モードが
解除されて早戻し制御される。そして、次のデータブロ
ックN006が読出されると、ステップ120を通り無処理で
ステップ102へ戻り、次のデータブロックN007が読出さ
れてG9コードによりNCプログラムが終了する。 尚、上記実施例では、G5の電流制限オンコード又はG6
の電流制限オフコードの機能は、前のデータブロックに
G0又はG1の送りコードがある場合にのみ、そのG0又はG1
コードによる送り工程で有効に作用するようにしている
が、G5コードとG6コード間に存在する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 controller A 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. RAM4 has an NCD area that stores the NC program and a current limit mode flag FL that is set when the current limit mode is commanded.
G and mode switching position register MSR that sets the position to switch to the current limit mode and target position register OPR that sets the target position for feed control and speed register V that sets the feed speed
A current position register APR that stores this value each time the current absolute position (hereinafter referred to as “current position”) of the headstock 10 is detected by R and the absolute position detection device C is formed. The servo unit B is mainly composed of a register 5, a DA converter 7, a drive circuit 8 and a current limiting circuit 21. 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. Further, the current limiting circuit 21 limits the maximum current supplied from the drive circuit 8 to the servo motor 9 when the current limiting signal S3 is input from the MPU 1. Therefore, the feeding in the current limiting mode is performed by outputting the current limiting signal S3 from the MPU1 to the current limiting circuit 21. 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. Also bed
A work piece 25 is placed on a table 26 that slides on the work piece 24, and the work piece 25 is machined by a drill 28 attached to a spindle 27. 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 detection 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.
Resolver 15, a resolver excitation circuit 16, a first phase comparison circuit 17 for detecting the phase angle of the first resolver 13, and a second phase comparison circuit 18 for detecting the phase angle of the second resolver 15.
An absolute position calculation circuit 19 that calculates the absolute position of the headstock 10 from the outputs of both of them, and a real-time clock (abbreviated as “RTC” hereinafter) 20 that drives the circuit 19 at a constant cycle to give the absolute position detection timing. Consists of. The input shaft of the first resolver 13 rotates once when the feed screw 11 makes one rotation, and the input shaft of the second resolver 15 rotates once while the headstock 10 moves from one end to the other end of the moving range. Is configured. The phase difference between the output voltage of the resolver and the excitation voltage changes according to the rotation angle of the input shaft. First
The phase comparison circuit 17 counts the phase difference of the output voltage of the first resolver 13 with respect to the excitation voltage by the counter, converts the phase difference into a digital value, and outputs the digital value to the absolute position calculation circuit 19. Similarly, the second phase comparison circuit 18 uses the second resolver 15
The phase difference of the output voltage from the excitation voltage with respect to the excitation voltage is converted into a digital value and output 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).
Also, the absolute position calculation circuit 19 is an interrupt signal that gives the output timing of the data when the calculation of the absolute position data is completed.
S2 is output to the interrupt input pin (NMI) of MPU1. M
When the PU1 receives the interrupt signal S2, the PU1 starts executing 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 commands the numerical controller A to execute the NC program and controls the rotation of the spindle motor 22. 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 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 (G
If it is determined to be 9), 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). Rapid feed code (G0) or cutting feed code (G
If it is determined to be 1), the process proceeds to step 108, where the target position for positioning is set in the target position register OPR of the RAM 4 from the X code of the read data block, and from the F code of the read data block. The feed speed is set in the speed register VR of RAM4. Then, the process proceeds to step 110, where the next, ie, (I +
1) Current limit on code (G5) in the 1st data block
It is determined whether or not there is. If there is a current limit on code, the process proceeds to step 112, the current limit mode flag FLG of RAM4 is set to ON, and the position at which the X code is switched to the current limit mode is the mode switching position register MS of RAM4.
After setting to R, the process of MPU1 shifts to the feed control of step 114. On the other hand, if it is determined in step 110 that the (I + 1) th data block does not have the current limit on code, the process proceeds to step 116 and the current limit off code (G6 ) Is determined. When it is determined that the current limit off code is present, the process proceeds to step 118, the current limit mode flag FLG of the RAM 4 is set to off, and then the process of the MPU 1 proceeds to the feed control of step 114. Also, step 116
If it is determined that there is no current limit off code in step 4, the process proceeds to the feed control in step 114 without operating the current limit mode flag FLG. When the execution of the feed control program, which will be described later, is completed in step 114, the routine proceeds to step 122, where the read number I of the NC program is incremented by 1, and steps 102 and thereafter are executed again. When a code other than the fast feed code (G0) or the cutting feed code (G1) is determined in step 106, the process proceeds to step 120 and the functional process corresponding to the code is executed. 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 is read from the target position register OPR of RAM4 and the current position R is read from the current position register APR of RAM4, and in the next step 302, the deviation between the target position M and the current position R is calculated, and the value is initially set. It is stored as the remaining movement amount L0. In this way, after the initial remaining movement amount L0 is initialized, the program of FIG. 4 is executed every time the interrupt signal S2 is input from the absolute position calculation circuit 19. First, step 200
The absolute position detected by the absolute position calculation circuit 19 is stored in the current position register APR as the current position R of the headstock 10. Next, at step 202, it is judged if the current limiting mode flag FLG is set to ON. Step 2 if the current limit mode flag FLG is set to ON
The process proceeds to 04, and it is determined whether the current position R stored in the current position register APR is equal to the mode switching position P stored in the mode switching position register MSR. If the determination result is YES, it means that the current position R of the headstock 10 has reached the mode switching position P. In this case, the routine proceeds to step 206, where the current limiting signal S3 indicates the current limiting circuit. It is output to 21, and the feed mode becomes the current limit mode, and the maximum value of the drive current of the servo motor 9 is limited. Also,
If the decision result in the step 204 is NO, the current position R of the headstock 10 has not yet exceeded the mode switching position P, so that the current limiting signal S3 is not outputted and the step is executed.
Move to 210. If it is determined in step 202 that the current limit mode flag FLG is not set to ON, step 20
After shifting to 8, the current limiting signal S3 output to the current limiting circuit 21 is turned off, and the routine proceeds to step 210. 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, and the actual remaining movement amount RL is calculated. Next, at step 214, it is judged if the actual remaining movement amount RL is zero. If the actual remaining movement amount RL is not zero, 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 referred to as “theoretical remaining movement amount”) IL is calculated. At this time, the control target position obtained by the path interpolation is generated by performing processing such as gradual acceleration and gradual deceleration from the target position M and the command speed. Next, in step 218, the deviation ΔL of the actual remaining movement amount RL from the theoretical remaining movement amount IL is calculated, and step 22
At 0, the speed signal Vc corresponding to the deviation ΔL is calculated, and the speed signal Vc is output to the register 5 at 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. 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 there is no G5 code in the next data block N001, step 110
The determinations at step 116 and NO are both NO, the feed is controlled at step 114 without entering the current limiting mode, and the headstock 10 is fast-forwarded as shown in FIG. 7. Similarly, when the next data block N001 is read out and executed, the G5 code does not exist in the next data block N002, so that the first headstock 10 of the headstock 10 as shown in FIG.
Cutting feed is performed. Next, when the data block N002 is read and executed, since the G5 code exists in the next data block N003, the determination result of step 110 becomes YES,
In step 112, the current limiting mode flag FLG is set to ON, and the mode switching position P designated by the X code is set in the mode switching position register MSR, and then step 114
Is controlled by. As a result, as shown in FIG.
When cutting is performed and the headstock 10 passes through the mode switching position P during the second cutting process, the current limiting signal S3 changes the current limiting circuit.
It is output to 21, and the current limit mode is set. Next, the next data block N003 is read, but through step 120, the process returns to step 102 without processing, and the next data block N004 is read. Then, after the dwell processing by the G4 code is executed in step 120, the process returns to step 102 and the next data block N005 is read. G0 to data block N005
Since the code exists, the target position and speed are set in step 108, but the G6 code exists in the next data block N006, so the determination result in step 116 becomes YES, and the process proceeds to step 118 to set the current. The limit mode flag FLG is set to OFF, and the feed control is performed in step 114. As a result, the headstock 10 is released from the current limiting mode as shown in FIG. Then, when the next data block N006 is read, the process passes through step 120 and returns to step 102 without processing, the next data block N007 is read, and the NC program ends with the G9 code. In the above embodiment, the current limit on code of G5 or G6
The current limit off-code function of the previous data block
G0 or G1 only if there is a G0 or G1 feed code
Although it works effectively in the feeding process by the code, it may function effectively in the feeding process by the G0 or G1 code existing between the G5 code and the G6 code.

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

本発明の数値制御装置は、動作位置を指定してサーボ
モータを電流制限モードで駆動することを指令する電流
制限モード指令手段と、電流制限モード指令手段により
モード設定された1つのNCデータブロックによる可動軸
の送り制御中に、可動軸の検出された現在位置がその動
作位置を通過した時に電流制限回路を作動させて送りを
電流制限モードとする電流制限モード実行手段とを有し
ているので、送り動作を同時処理で電流制限モードに切
り換えることができる。従って、処理速度が向上する。
また、従来のように電流制限モード切換位置の前後で2
つの工程に分けて送り指令を与える必要がないため、NC
データの作成が簡略化される。
The numerical controller of the present invention comprises a current limit mode command means for designating an operating position and driving the servo motor in the current limit mode, and one NC data block mode-set by the current limit mode command means. During the feed control of the movable shaft, when the detected current position of the movable shaft passes through its operating position, it has a current limit mode executing means for activating the current limiting circuit to set the feed to the current limit mode. , The feeding operation can be switched to the current limiting mode by simultaneous processing. Therefore, the processing speed is improved.
In addition, as in the conventional case, 2 before and after the current limit mode switching position.
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 configuration 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 an 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番地 トヨタ自動車株 式会社内 (72)発明者 杉戸 弥寿徳 豊田市トヨタ町1番地 トヨタ自動車株 式会社内 (72)発明者 伊藤 政司 豊田市トヨタ町1番地 トヨタ自動車株 式会社内 (72)発明者 竹内 彰浩 豊田市トヨタ町1番地 トヨタ自動車株 式会社内 (56)参考文献 特開 昭61−159390(JP,A) ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Koji Hasegawa 1-1 Asahi-cho Kariya city Toyota Koki Co., Ltd. (72) Inventor Hideki Sato 1-1 Asahi-cho Kariya city Toyota Koki Co., Ltd. (72) Inventor Shoji Igawa 1 Toyota-cho, Toyota-shi, Toyota City Co., Ltd. (72) Inventor Yasunori Sugito Toyota-cho, Toyota-shi 1 Toyota Motor Co., Ltd. (72) Inventor, Masashi Ito Toyota-shi Toyota Town No. 1 inside Toyota Motor Corporation (72) Inventor Akihiro Takeuchi Toyota Town No. 1 Toyota Town inside Toyota Motor Corporation (56) Reference JP-A-61-159390 (JP, A)

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】可動軸を駆動するサーボモータの駆動電流
を制限する電流制限回路を備え、NCプログラムにより指
令された指令位置に可動軸を位置決めする数値制御装置
において、 前記電流制限回路を作動させる作動位置を指定して前記
サーボモータを電流制限モードで駆動することを指令す
る電流制限モード指令手段と、 前記可動軸の現在位置を検出する現在位置検出手段と、 前記電流制限モード指令手段によりモード設定された前
記NCプログラムの1つのNCデータブロックによる前記可
動軸の送り制御中に、前記現在位置検出手段により検出
された前記可動軸の現在位置が、前記電流制限モード指
令手段で指令された前記作動位置を通過したことを判定
する判定手段と、 前記判定手段により、通過と判定された場合には、前記
電流制限回路を作動させて前記サーボモータを電流制限
モードで制御する電流制限モード実行手段と を有することを特徴とする数値制御装置。
1. A numerical control device comprising a current limiting circuit for limiting a drive current of a servomotor for driving a movable axis, and positioning the movable axis at a command position instructed by an NC program, wherein the current limiting circuit is operated. A current limit mode command means for designating an operating position to drive the servo motor in a current limit mode, a current position detection means for detecting a current position of the movable axis, and a mode by the current limit mode command means. The current position of the movable axis detected by the current position detection means is controlled by the current limit mode command means during the feed control of the movable axis by one NC data block of the set NC program. Determining means for determining that the operating position has been passed, and if the determining means determines that the current has passed, the current limiting circuit And a current limiting mode executing means for operating the servomotor to control the servomotor in a current limiting mode.
【請求項2】前記数値制御装置は、電流制限モードを解
除することを指令する解除指令手段を有することを特徴
とする特許請求の範囲第1項記載の数値制御装置。
2. The numerical controller according to claim 1, wherein the numerical controller has cancellation command means for commanding cancellation of the current limiting mode.
JP30604686A 1986-12-22 1986-12-22 Numerical control unit Expired - Fee Related JP2504973B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP30604686A JP2504973B2 (en) 1986-12-22 1986-12-22 Numerical control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30604686A JP2504973B2 (en) 1986-12-22 1986-12-22 Numerical control unit

Publications (2)

Publication Number Publication Date
JPS63157207A JPS63157207A (en) 1988-06-30
JP2504973B2 true JP2504973B2 (en) 1996-06-05

Family

ID=17952404

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30604686A Expired - Fee Related JP2504973B2 (en) 1986-12-22 1986-12-22 Numerical control unit

Country Status (1)

Country Link
JP (1) JP2504973B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2524911Y2 (en) * 1990-03-09 1997-02-05 豊田工機株式会社 Numerical control unit
JPH056210A (en) * 1991-06-27 1993-01-14 Fanuc Ltd Torque limit system

Also Published As

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

Similar Documents

Publication Publication Date Title
JP4282631B2 (en) Numerical control device that operates with tabular data
WO1997015874A1 (en) Method of axis movement numeric control machine tool and apparatus therefor
EP1720083B1 (en) Numerical controller
JPH0910858A (en) System of punch press machine and control method thereof
WO1997008599A1 (en) Method for switching a control mode of a servo control system
WO1989006066A1 (en) Method of speed control for servomotor
JP2000347713A (en) Numerical controller
JP2700819B2 (en) Tapping method
JP2504973B2 (en) Numerical control unit
EP1139561B1 (en) Method of operating an AC servomotor
US4988937A (en) Synchronous control system and method therefor
JPH07104705B2 (en) Numerical control device
JPH08339212A (en) Method for return to absolute origin in industrial controller
JPS6232801B2 (en)
JP3427800B2 (en) Numerical control unit
WO1992009018A1 (en) Method for executing auxiliary function in numerical control equipment
JPH10301614A (en) Numeric controller
JPS6378206A (en) Following delay removal method using digital servo system in full close feedback nc system
JPH07194157A (en) Controller for servo motor
JP2788725B2 (en) Numerical control unit
JPH0797289B2 (en) Positioning device
JPH05165514A (en) Interpolating system for numerical controller
JP2524911Y2 (en) Numerical control unit
JPH08349B2 (en) Processing control device
JP2831700B2 (en) Manual operation control device for pulse motor

Legal Events

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