JPH0695721A - Numerical controller - Google Patents

Numerical controller

Info

Publication number
JPH0695721A
JPH0695721A JP24625492A JP24625492A JPH0695721A JP H0695721 A JPH0695721 A JP H0695721A JP 24625492 A JP24625492 A JP 24625492A JP 24625492 A JP24625492 A JP 24625492A JP H0695721 A JPH0695721 A JP H0695721A
Authority
JP
Japan
Prior art keywords
command
rotation
coordinate
axis
coordinate rotation
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
JP24625492A
Other languages
Japanese (ja)
Inventor
Toshiaki Otsuki
俊明 大槻
Haruhiko Kozai
治彦 香西
Seiji Ishii
清次 石井
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 JP24625492A priority Critical patent/JPH0695721A/en
Publication of JPH0695721A publication Critical patent/JPH0695721A/en
Pending legal-status Critical Current

Links

Landscapes

  • Numerical Control (AREA)

Abstract

PURPOSE:To correct a revolving shaft by a working program to shorten the generation time of the working program with respect to the numerical controller provided with a machine tool having the shaft rotating function. CONSTITUTION:A preprocessing means 2 reads out and analyzes the working program to detect a block including a coordinate rotating command and outputs a revolving shaft command. A revolving shaft correcting means 3 detects rotation position coordinates and the rotation angle from the block, which is detected by the preprocessing means 2 and includes the coordinate rotating command, and corrects the coordinate rotating command to obtain the revolving shaft command. A pulse distributing means 4 distributes pulses to a servo motor 27, which rorates a shaft like a C shaft or an A shaft, based on the revolving shaft command obtained by the revolving shaft correcting means 3.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は軸回転機能を有する工作
機械を備えた数値制御装置に関し、特に加工プログラム
の指令に基づいて回転軸を補正してサーボモータを制御
する数値制御装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a numerical control device equipped with a machine tool having a shaft rotation function, and more particularly to a numerical control device for correcting a rotary shaft based on a command of a machining program to control a servomotor.

【0002】[0002]

【従来の技術】従来、数値制御装置では、加工プログラ
ムによって指令された加工経路上を、指令された送り速
度に基づき工具を移動させることによって、ワークを所
望の形状に加工している。
2. Description of the Related Art Conventionally, in a numerical controller, a work is machined into a desired shape by moving a tool on a machining path designated by a machining program based on a designated feed rate.

【0003】この加工プログラムに記述する指令の一つ
に座標回転指令がある。座標回転指令とは、形状定義指
令によって定義された形状を回転中心座標を中心にし
て、指定された回転角をもって回転させる指令である。
したがって、例えば工作機械に取り付けたワークが機械
座標に対してある回転角で回転した位置にある場合、上
記座標回転指令を用いて座標を補正し、加工を行なって
いた。
A coordinate rotation command is one of the commands described in this machining program. The coordinate rotation command is a command for rotating the shape defined by the shape definition command with the designated rotation angle about the center of rotation coordinates.
Therefore, for example, when the workpiece attached to the machine tool is at a position rotated by a certain rotation angle with respect to the machine coordinates, the coordinates are corrected using the coordinate rotation command to perform the machining.

【0004】[0004]

【発明が解決しようとする課題】しかし、従来の座標回
転指令では、定義された形状の座標位置を指定された回
転角で回転した座標位置に変換するのみであった。この
ため、ワークが正しく取り付けられた場合と、機械座標
に対してある回転角で取り付けられた場合とでは、ワー
クの加工面と工具軸とのなす角度が異なる。したがっ
て、所望の加工形状が得られないという問題点があっ
た。
However, in the conventional coordinate rotation command, only the coordinate position of the defined shape is converted into the coordinate position rotated by the designated rotation angle. For this reason, the angle formed between the machined surface of the work and the tool axis differs depending on whether the work is properly mounted or mounted at a certain rotation angle with respect to the machine coordinates. Therefore, there is a problem that a desired processed shape cannot be obtained.

【0005】また、ワークの加工面と工具軸とのなす角
度を同一にするためにマクロプログラムを使用する方法
もあるが、別途マクロを作成する必要があるため、相当
の労力を要し、かつ、加工プログラムの作成時間が長く
なるという問題点があった。
There is also a method of using a macro program in order to make the angle formed by the machined surface of the work and the tool axis the same, but since it is necessary to create a macro separately, considerable labor is required, and However, there is a problem that it takes a long time to create a machining program.

【0006】さらに、マクロプログラムでプログラムさ
れたNC機能以外のNC機能を、加工プログラムの1ブ
ロックに指定しても無視されてしまう。例えば、マクロ
プログラムではG機能のみがプログラムされている場合
に、M機能又はT機能等の他のNC機能を加工プログラ
ムの1ブロックに指定しても実行されないという問題点
もあった。
Further, even if the NC function other than the NC function programmed by the macro program is designated in one block of the machining program, it is ignored. For example, when only the G function is programmed in the macro program, another NC function such as the M function or the T function is not executed even if it is designated as one block of the machining program.

【0007】本発明はこのような点に鑑みてなされたも
のであり、加工プログラムによって自動的に回転軸を補
正し、加工プログラムの作成時間を短縮する数値制御装
置を、提供することを目的とする。
The present invention has been made in view of the above circumstances, and an object thereof is to provide a numerical control device that automatically corrects a rotation axis by a machining program and shortens the time for creating the machining program. To do.

【0008】[0008]

【課題を解決するための手段】本発明では上記課題を解
決するために、加工プログラムの読み出し及び解析を行
なって座標回転指令を含むブロックを検出し、回転軸指
令を出力する前処理手段と、前記座標回転指令を含むブ
ロックから回転位置座標及び回転角を検出し、前記座標
回転指令を補正して前記回転軸指令を求める回転軸補正
手段と、前記回転軸指令に基づいて、サーボモータへ出
力するパルスを分配するパルス分配手段と、を有するこ
とを特徴とする数値制御装置が提供される。
In order to solve the above-mentioned problems, the present invention reads out and analyzes a machining program to detect a block including a coordinate rotation command and outputs a rotation axis command, and a preprocessing means. Rotation axis correction means for detecting rotation position coordinates and rotation angle from a block including the coordinate rotation instruction, correcting the coordinate rotation instruction to obtain the rotation axis instruction, and outputting to a servo motor based on the rotation axis instruction. And a pulse distributing means for distributing the pulse to be generated.

【0009】[0009]

【作用】まず、前処理手段は加工プログラムの各ブロッ
クを読み出して解析を行い、座標回転指令を含むブロッ
クを検出する。次に、回転軸補正手段は前処理手段で検
出された座標回転指令から、回転位置座標及び回転角を
求め、座標回転指令を補正して回転軸指令を求める。さ
らに、前処理手段は回転軸補正手段によって求められる
回転軸指令を出力する。そして、パルス分配手段は前処
理手段から出力された回転軸指令に基づいて、サーボモ
ータへパルスを分配する。
First, the preprocessing means reads each block of the machining program and analyzes it to detect the block containing the coordinate rotation command. Next, the rotation axis correction means obtains the rotation position coordinates and the rotation angle from the coordinate rotation instruction detected by the preprocessing means, corrects the coordinate rotation instruction, and obtains the rotation axis instruction. Further, the preprocessing means outputs the rotation axis command obtained by the rotation axis correction means. Then, the pulse distribution means distributes the pulses to the servomotors based on the rotation axis command output from the preprocessing means.

【0010】[0010]

【実施例】以下、本発明の一実施例を図面に基づいて説
明する。図2は、本発明が適用される数値制御装置の一
つである対話形数値制御装置の構成を示すブロック図で
ある。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 2 is a block diagram showing the configuration of an interactive numerical control device which is one of the numerical control devices to which the present invention is applied.

【0011】プロセッサ11はROM12に格納された
システムプログラムに従って数値制御装置全体を制御す
る。ROM12にはEPROMあるいはEEPROMが
使用される。RAM13にはSRAM等が使用され、回
転位置座標等の各種のデータあるいは入出力信号が格納
される。不揮発性メモリ14には図示されていないバッ
テリによってバックアップされたCMOSが使用され、
電源切断後も保持すべき加工プログラム、パラメータ、
ピッチ誤差補正量及び工具補正量等が格納されている。
The processor 11 controls the entire numerical controller according to the system program stored in the ROM 12. EPROM or EEPROM is used for the ROM 12. An SRAM or the like is used for the RAM 13, and various data such as rotational position coordinates or input / output signals are stored therein. For the non-volatile memory 14, a CMOS backed up by a battery (not shown) is used,
Machining programs, parameters that should be retained after power off,
The pitch error correction amount, the tool correction amount, and the like are stored.

【0012】グラフィック制御回路15はディジタル信
号を表示用の信号に変換し、表示装置16に与える。表
示装置16にはCRTあるいは液晶表示装置が使用され
る。表示装置16は対話形式で加工プログラムを作成し
ていくときに、形状、加工条件等を表示する。キーボー
ド17はシンボリックキー及び数値キー等からなり、必
要な図形データ、NCデータをこれらのキーを使用して
入力する。タイマー26は日付及び時間を刻み、プロセ
ッサ11からの指令に応じて時間データとして出力す
る。
The graphic control circuit 15 converts the digital signal into a signal for display and gives it to the display device 16. A CRT or a liquid crystal display device is used as the display device 16. The display device 16 displays a shape, processing conditions, etc. when creating a processing program in an interactive form. The keyboard 17 is composed of symbolic keys, numerical keys, etc., and is used to input necessary graphic data and NC data. The timer 26 ticks the date and time, and outputs them as time data in response to a command from the processor 11.

【0013】軸制御回路18は、プロセッサ11から軸
の移動指令を受けて、軸の指令をサーボアンプ19に出
力する。サーボアンプ19は軸の指令を受けて、工作機
械20に設けられたX,Y,Z軸の他に、A,B,C軸
を含む各軸のサーボモータ27を駆動する。
The axis control circuit 18 receives the axis movement command from the processor 11 and outputs the axis command to the servo amplifier 19. The servo amplifier 19 receives the commands of the axes and drives the servo motors 27 of the respective axes including the A, B, and C axes in addition to the X, Y, and Z axes provided on the machine tool 20.

【0014】以上の各構成要素は、バス21によって互
いに結合されている。PMC(プログラマブル・マシン
・コントローラ)22はNCプログラムの実行時に、バ
ス21経由でT機能信号(工具選択指令)等を受け取
る。そして、この信号をシーケンス・プログラムで処理
して、動作指令として信号を出力し、工作機械20を制
御する。また、工作機械20から状態信号を受けて、シ
ーケンス処理を行い、バス21を経由して、プロセッサ
11に必要な入力信号を転送する。
The above components are connected to each other by a bus 21. A PMC (Programmable Machine Controller) 22 receives a T function signal (tool selection command) and the like via the bus 21 when executing an NC program. Then, this signal is processed by the sequence program, a signal is output as an operation command, and the machine tool 20 is controlled. Further, it receives a status signal from the machine tool 20, performs a sequence process, and transfers a necessary input signal to the processor 11 via the bus 21.

【0015】さらに、バス21には、システムプログラ
ム等によって機能が変化するソフトウェアキー23、N
Cデータをフロッピーディスク、プリンタあるいは紙テ
ープリーダ(PTR)などの外部機器に送るシリアルイ
ンタフェース24が接続されている。このソフトウェア
キー23は、上記表示装置16、キーボード17ととも
に、CRT/MDIパネル25に設けられる。
Further, on the bus 21, software keys 23, N whose functions are changed by a system program or the like.
A serial interface 24 for sending C data to an external device such as a floppy disk, a printer, or a paper tape reader (PTR) is connected. The software key 23 is provided on the CRT / MDI panel 25 together with the display device 16 and the keyboard 17.

【0016】上記バス21には、NC用のCPUである
プロセッサ11とは別に、バス30を有する対話用のプ
ロセッサ31が接続される。バス30にはROM32、
RAM33及び不揮発性メモリ34が接続されている。
In addition to the processor 11 which is the CPU for NC, the bus 21 is connected with a dialogue processor 31 having a bus 30. ROM 32 on the bus 30,
The RAM 33 and the non-volatile memory 34 are connected.

【0017】上記表示装置16に表示される対話形デー
タの入力画面は、ROM32に格納されている。この対
話形データの入力画面において、NC文の作成時にバッ
クグラウンドアニメーションとして、工具の全体の動作
軌跡などが表示される。また、表示装置16にはその入
力画面により設定可能な作業又はデータが、メニュー形
式で表示される。メニューのうちどの項目を選択するか
は、メニューに対応して、画面下部に配置されたソフト
ウェアキー23により行う。ソフトウェアキー23の意
味は各画面毎に変化する。RAM33にはSRAM等が
使用され、対話用の各種データが格納される。
The interactive data input screen displayed on the display device 16 is stored in the ROM 32. On this interactive data input screen, the entire motion trajectory of the tool and the like are displayed as a background animation when the NC sentence is created. Further, the work or data that can be set by the input screen is displayed on the display device 16 in a menu format. The item to be selected from the menu is selected by the software key 23 arranged at the bottom of the screen corresponding to the menu. The meaning of the software key 23 changes for each screen. An SRAM or the like is used as the RAM 33, and various data for dialogue are stored.

【0018】入力されたデータは対話用のプロセッサ3
1により処理されてワーク加工プログラムが作成される
とともに、対話形式で使用される表示装置16へ逐次に
バックグラウンドアニメーション表示される。また、不
揮発性メモリ34にNC文として格納されたワーク加工
プログラムは、工作機械20の加工シミュレーションの
際にも実行され、フォアグラウンドアニメーション表示
される。
The input data is the processor 3 for dialogue.
1 is processed to create a work machining program, and a background animation is sequentially displayed on the display device 16 used interactively. The work machining program stored as an NC sentence in the non-volatile memory 34 is also executed during the machining simulation of the machine tool 20, and is displayed in the foreground animation.

【0019】図1は、本発明の原理説明図である。本発
明の数値制御装置は、前処理手段2、回転軸補正手段3
及びパルス分配手段4から構成される。なお、前処理手
段2及び回転軸補正手段3は、図2のROM12に格納
されたシステムプログラムをプロセッサ11が実行する
ことによって実現される機能である。また、パルス分配
手段4は図2の軸制御回路18及びサーボアンプ19に
相当する。
FIG. 1 is a diagram for explaining the principle of the present invention. The numerical control device of the present invention includes a preprocessing unit 2 and a rotation axis correcting unit 3.
And pulse distribution means 4. The preprocessing unit 2 and the rotation axis correction unit 3 are functions realized by the processor 11 executing the system program stored in the ROM 12 of FIG. The pulse distributing means 4 corresponds to the axis control circuit 18 and the servo amplifier 19 shown in FIG.

【0020】前処理手段2は加工プログラムの読み出し
及び解析を行なって座標回転指令を含むブロックを検出
し、回転軸指令を出力する。前処理手段2は座標回転指
令を含むブロックに指定されたNC機能について所定の
処理を行なって、パルス分配手段4へ対応する指令を出
力する。回転軸補正手段3は前処理手段2によって検出
された座標回転指令を含むブロックから回転位置座標及
び回転角を検出し、座標回転指令を補正して回転軸指令
を求める。パルス分配手段4は、回転軸補正手段3によ
って求められた回転軸指令等の指令に基づいて、例えば
C軸又はA軸等の軸を回転させるサーボモータ27へパ
ルスを分配する。
The preprocessing means 2 reads out and analyzes the machining program to detect a block containing a coordinate rotation command, and outputs a rotation axis command. The preprocessing unit 2 performs a predetermined process for the NC function designated in the block including the coordinate rotation command, and outputs the corresponding command to the pulse distribution unit 4. The rotation axis correction means 3 detects the rotation position coordinates and the rotation angle from the block including the coordinate rotation instruction detected by the preprocessing means 2, and corrects the coordinate rotation instruction to obtain the rotation axis instruction. The pulse distribution unit 4 distributes a pulse to the servo motor 27 that rotates an axis such as the C-axis or the A-axis based on a command such as the rotation axis command obtained by the rotation axis correction unit 3.

【0021】次に、本発明の数値制御装置の動作につい
て説明する。まず、前処理手段2は加工プログラム1の
各ブロックを読み出して解析を行い、座標回転指令を含
むブロックを検出する。次に、回転軸補正手段3は前処
理手段1で検出された座標回転指令から、回転位置座標
及び回転角を求め、座標回転指令を補正して回転軸指令
を求める。さらに、前処理手段2は回転軸補正手段3に
よって求められた回転軸指令を出力する。そして、パル
ス分配手段4はこの回転軸指令に基づいて、サーボモー
タ27へパルスを分配する。
Next, the operation of the numerical controller according to the present invention will be described. First, the preprocessing unit 2 reads each block of the machining program 1 and analyzes it to detect a block including a coordinate rotation command. Next, the rotation axis correction means 3 obtains the rotation position coordinates and the rotation angle from the coordinate rotation instruction detected by the preprocessing means 1, corrects the coordinate rotation instruction, and obtains the rotation axis instruction. Further, the pre-processing means 2 outputs the rotation axis command obtained by the rotation axis correcting means 3. Then, the pulse distributing means 4 distributes the pulse to the servo motor 27 based on the rotation axis command.

【0022】したがって、加工プログラムに指令された
座標回転指令に基づいて、自動的に回転軸を補正した回
転軸指令によってサーボモータ27を制御することがで
きる。このため、ワークが正しく取り付けられた場合
と、機械座標に対してある回転角で取り付けられた場合
とで、ワークの加工面と工具軸とのなす角度が同一にな
り、所望の加工形状を得ることができる。また、別途マ
クロを作成する必要がなくなり、加工プログラムの作成
時間を短縮することができる。
Therefore, the servo motor 27 can be controlled by the rotation axis command in which the rotation axis is automatically corrected based on the coordinate rotation command instructed by the machining program. Therefore, the angle between the machining surface of the workpiece and the tool axis is the same when the workpiece is properly attached and when it is attached at a certain rotation angle with respect to the machine coordinates, and the desired machining shape is obtained. be able to. In addition, it is not necessary to create a separate macro, and it is possible to shorten the creation time of the machining program.

【0023】図3は加工プログラムの一例を示す図であ
って、図3(A)は一軸の座標回転指令を、図3(B)
は二軸の座標回転指令を、それぞれ示す。なお、加工プ
ログラムには原点復帰指令等の多数の他の指令がある
が、図では省略する。
FIG. 3 is a diagram showing an example of a machining program. FIG. 3A shows a uniaxial coordinate rotation command, and FIG.
Indicates a two-axis coordinate rotation command, respectively. It should be noted that the machining program has many other commands such as a return-to-origin command, but they are omitted in the figure.

【0024】図3(A)の加工プログラム300におい
て、ブロック301では座標回転指令(G68)が指定
され、ブロック302では座標回転キャンセル指令(G
69)が指定されている。
In the machining program 300 shown in FIG. 3A, the block 301 specifies the coordinate rotation command (G68), and the block 302 specifies the coordinate rotation cancel command (G68).
69) is specified.

【0025】ブロック301の座標回転指令(G68)
は、パラメータとして「X−Y−R−」が必要となる。
このうち、「X−Y−」は座標回転の中心座標を示し、
「R−」は座標回転の回転角を示す。なお、「−」には
座標回転を行うために適切な数値が指定される。また、
ブロック302の座標回転キャンセル指令(G69)に
よって座標回転がキャンセルされる。
Coordinate rotation command of block 301 (G68)
Requires "X-Y-R-" as a parameter.
Among these, "XY-" indicates the center coordinate of coordinate rotation,
"R-" indicates a rotation angle of coordinate rotation. In addition, an appropriate numerical value for performing coordinate rotation is designated as "-". Also,
The coordinate rotation cancel command (G69) of the block 302 cancels the coordinate rotation.

【0026】また、図3(B)の加工プログラム310
において、ブロック311ではC軸座標回転指令(G6
8.1)が指定され、及びブロック312ではA軸座標
回転指令(G68.2)が指定され、さらにブロック3
13では座標回転キャンセル指令(G69)が指定され
ている。
Further, the machining program 310 shown in FIG.
In the block 311, the C-axis coordinate rotation command (G6
8.1) is specified, and the A-axis coordinate rotation command (G68.2) is specified in block 312, and block 3 is further specified.
In 13, the coordinate rotation cancel command (G69) is designated.

【0027】ブロック311のC軸座標回転指令(G6
8.1)及びブロック312のA軸座標回転指令(G6
8.2)は、パラメータとして「X−Y−Z−R−」が
必要となる。このうち、「X−Y−Z−」は座標回転の
中心座標を示し、「R−」はそれぞれの軸の座標回転の
回転角を示す。なお、図3(A)と同様に「−」には座
標回転を行うために適切な数値が指定される。また、ブ
ロック313の座標回転キャンセル指令(G69)によ
って座標回転がキャンセルされる。なお、上記の例では
ブロック311,312の二つのブロックで二軸の座標
回転指令を行なったが、例えば、「G68X−Y−Z−
RC−RA−」のように一つのブロックで座標回転指令
を行えるように構成することもできる。
A C-axis coordinate rotation command (G6 of block 311)
8.1) and the A-axis coordinate rotation command (G6) of the block 312.
In 8.2), "XYZR-" is required as a parameter. Among these, "XYZ-" shows the center coordinate of coordinate rotation, and "R-" shows the rotation angle of the coordinate rotation of each axis. Note that, as in FIG. 3A, an appropriate numerical value for performing coordinate rotation is designated for "-". Further, the coordinate rotation cancel command (G69) of the block 313 cancels the coordinate rotation. In the above example, the two blocks, blocks 311 and 312, perform the biaxial coordinate rotation command. However, for example, “G68X-Y-Z-
It is also possible to configure so that the coordinate rotation command can be issued by one block like "RC-RA-".

【0028】こうして、一軸又は二軸の座標回転の指令
を行い、さらに座標回転をキャンセルすることができ
る。なお、座標回転の指令及びキャンセルはG機能によ
る指令のみならず、例えばM機能等の他のNC機能やコ
メント文等によって指令することもできる。
Thus, it is possible to issue a command for uniaxial or biaxial coordinate rotation and cancel the coordinate rotation. The coordinate rotation command and the cancel command can be issued not only by the G function but also by another NC function such as the M function or a comment sentence.

【0029】次に、座標回転の一例について説明する。
図4は、XY軸平面における座標回転を示す図である。
XY軸平面には正しく載置された場合のワーク41、正
しく載置された場合に加工を行う工具42、実際に載置
されたワーク43、座標回転前の工具44及び座標回転
後の工具45が示されている。
Next, an example of coordinate rotation will be described.
FIG. 4 is a diagram showing coordinate rotation on the XY axis plane.
A workpiece 41 when correctly placed on the XY axis plane, a tool 42 which performs machining when properly placed, a workpiece 43 which is actually placed, a tool 44 before coordinate rotation and a tool 45 after coordinate rotation. It is shown.

【0030】図において、ワーク43はワーク41に対
して、座標(x1,y1)を中心にして回転角c1をな
している。従来では座標回転を指令しても工具は回転す
ることなく、工具42の軸方向で加工を行う場合は座標
回転によって工具44の軸方向で加工が行われていた。
これに対して本発明による座標回転では、工具44の軸
方向で回転角c1だけ工具を回転させ、工具45の軸方
向で加工が行われる。
In the figure, the work 43 forms a rotation angle c1 with respect to the work 41 about the coordinates (x1, y1). Conventionally, the tool does not rotate even if the coordinate rotation is commanded, and when machining is performed in the axial direction of the tool 42, machining is performed in the axial direction of the tool 44 by coordinate rotation.
On the other hand, in the coordinate rotation according to the present invention, the tool is rotated by the rotation angle c1 in the axial direction of the tool 44, and machining is performed in the axial direction of the tool 45.

【0031】したがって、ワーク41のようにワークが
正しく取り付けられた場合と、ワーク43のように機械
座標に対してある回転角c1で取り付けられた場合と
で、ワークの加工面と工具軸とのなす角度が同一にな
り、所望の加工形状を得ることができる。
Therefore, the work surface of the work and the tool axis are different depending on whether the work is properly attached like the work 41 or the work 43 is attached at a certain rotation angle c1 with respect to the machine coordinates. The angles formed are the same, and a desired processed shape can be obtained.

【0032】図5は、本発明の処理手順を示すフローチ
ャートである。なお、このフローチャートは図2のRO
M12に格納されたシステムプログラムをプロセッサ1
1が実行することによって実現される回転軸補正手段3
の処理手順である。図において、Sの後に続く数字はス
テップ番号を示す。 〔S51〕座標回転指令か否かを判別する。例えば、G
機能(G68)がブロックに含まれているか否かを判別
する。もし、座標回転指令(YES)ならばステップS
52に進み、そうでない(NO)ならばステップS53
に進む。 〔S52〕オフセット量の設定を行う。具体的には、回
転指令機能(R)の後に続く数値がオフセット量とし
て、例えば図2のRAM13等の所定の記憶領域に設定
する。 〔S53〕座標回転キャンセル指令か否かを判別する。
例えば、G機能(G69)がブロックに含まれているか
否かを判別する。もし、座標回転キャンセル指令(YE
S)ならばステップS54に進み、そうでない(NO)
ならばステップS55に進む。 〔S54〕オフセット量の初期化を行う。具体的には、
オフセット量をゼロとして、ステップS52と同様に所
定の記憶領域に設定する。 〔S55〕座標回転の加算を行う。すなわち、ステップ
S52,S54において所定の記憶領域に設定されたオ
フセット量を回転角として、回転マトリクス等を使用し
て回転した位置座標を算出するとともに、このオフセッ
ト量を例えばC軸指令等の回転軸指令として出力する。
FIG. 5 is a flow chart showing the processing procedure of the present invention. Note that this flow chart is based on the RO of FIG.
The system program stored in M12 is processed by the processor 1
1. Rotation axis correction means 3 realized by execution of 1
Is a processing procedure of. In the figure, the number following S indicates a step number. [S51] It is determined whether the command is a coordinate rotation command. For example, G
It is determined whether the function (G68) is included in the block. If the coordinate rotation command (YES), step S
If not (NO), the process proceeds to step S53.
Proceed to. [S52] The offset amount is set. Specifically, a numerical value following the rotation command function (R) is set as an offset amount in a predetermined storage area such as the RAM 13 in FIG. [S53] It is determined whether the command is a coordinate rotation cancel command.
For example, it is determined whether the G function (G69) is included in the block. If the coordinate rotation cancel command (YE
If S), the process proceeds to step S54, otherwise (NO)
If so, the process proceeds to step S55. [S54] The offset amount is initialized. In particular,
The offset amount is set to zero and set in a predetermined storage area as in step S52. [S55] Coordinate rotation is added. That is, while using the offset amount set in the predetermined storage area in steps S52 and S54 as the rotation angle, the rotated position coordinates are calculated using a rotation matrix or the like, and the offset amount is used as the rotation axis such as the C-axis command. Output as a command.

【0033】したがって、座標回転指令及び座標回転キ
ャンセル指令を上記処理手順によって処理し、例えばM
機能又はT機能等の他のNC機能を図1の前処理手段2
が処理するので、座標回転指令又は座標回転キャンセル
指令を含むブロックに他のNC機能を指定しても、確実
に実行される。
Therefore, the coordinate rotation command and the coordinate rotation cancel command are processed according to the above processing procedure, for example, M
Function or other NC function such as T function is added to the preprocessing means 2 of FIG.
Since the processing is performed by (1), even if another NC function is specified in the block including the coordinate rotation command or the coordinate rotation cancel command, it is surely executed.

【0034】上記の説明では、本発明を対話形数値制御
装置に適用したが、軸回転機能を有する工作機械を備え
た他の数値制御装置にも同様に適用することができる。
また、回転軸補正手段3は一軸又は二軸の座標回転指令
に対応する回転軸指令を出力するように構成したが、三
軸の座標回転指令に対応する回転軸指令を出力するよう
に構成することもできる。
In the above description, the present invention is applied to the interactive numerical control device, but the present invention can be similarly applied to other numerical control devices equipped with a machine tool having an axis rotation function.
Further, the rotation axis correction means 3 is configured to output the rotation axis command corresponding to the one-axis or two-axis coordinate rotation command, but is configured to output the rotation axis command corresponding to the three-axis coordinate rotation command. You can also

【0035】[0035]

【発明の効果】以上説明したように本発明では、前処理
手段によって検出された加工プログラムの座標回転指令
を含むブロックを、回転軸補正手段が回転位置座標及び
回転角を求めて座標回転指令を補正し、パルス分配手段
がこの回転軸指令に基づいてサーボモータへパルスを分
配するように構成したので、加工プログラムに記述した
座標回転指令によって自動的に回転軸を補正して、サー
ボモータを制御することができる。
As described above, according to the present invention, the block including the coordinate rotation command of the machining program detected by the preprocessing means is determined by the rotation axis correction means to obtain the rotation position coordinates and the rotation angle, and the coordinate rotation command is issued. Since the correction and pulse distribution means distributes the pulse to the servo motor based on this rotation axis command, the rotation axis is automatically corrected by the coordinate rotation command described in the machining program to control the servo motor. can do.

【0036】このため、ワークが正しく取り付けられた
場合と、機械座標に対してある回転角で取り付けられた
場合とで、ワークの加工面と工具軸とのなす角度が同一
になり、所望の加工形状を得ることができる。また、別
途マクロを作成する必要がなくなり、加工プログラムの
作成時間を短縮することができる。
Therefore, the angle formed between the machined surface of the work and the tool axis is the same when the work is mounted correctly and when it is mounted at a certain rotation angle with respect to the machine coordinates, and the desired machining is achieved. The shape can be obtained. In addition, it is not necessary to create a separate macro, and it is possible to shorten the creation time of the machining program.

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

【図1】本発明の原理説明図である。FIG. 1 is a diagram illustrating the principle of the present invention.

【図2】対話形数値制御装置の構成を示すブロック図で
ある。
FIG. 2 is a block diagram showing a configuration of an interactive numerical control device.

【図3】加工プログラムの一例を示す図であって、
(A)は一軸の座標回転指令を、(B)は二軸の座標回
転指令を、それぞれ示す。
FIG. 3 is a diagram showing an example of a machining program,
(A) shows a uniaxial coordinate rotation command, and (B) shows a biaxial coordinate rotation command.

【図4】XY軸平面における座標回転を示す図である。FIG. 4 is a diagram showing coordinate rotation on an XY axis plane.

【図5】本発明の処理手順を示すフローチャートであ
る。
FIG. 5 is a flowchart showing a processing procedure of the present invention.

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

11,31 プロセッサ 12,32 ROM 13,33 RAM 14,34 不揮発性メモリ 18 軸制御回路 19 サーボアンプ 23 ソフトウェアキー 27 サーボモータ 11, 31 Processor 12, 32 ROM 13, 33 RAM 14, 34 Non-volatile memory 18 Axis control circuit 19 Servo amplifier 23 Software key 27 Servo motor

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 加工プログラムの指令に基づいて回転軸
を補正してサーボモータを制御する数値制御装置におい
て、 加工プログラムの読み出し及び解析を行なって座標回転
指令を含むブロックを検出し、回転軸指令を出力する前
処理手段と、 前記座標回転指令を含むブロックから回転位置座標及び
回転角を検出し、前記座標回転指令を補正して前記回転
軸指令を求める回転軸補正手段と、 前記回転軸指令に基づいて、サーボモータへ出力するパ
ルスを分配するパルス分配手段と、 を有することを特徴とする数値制御装置。
1. A numerical control device for controlling a servomotor by correcting a rotation axis based on a command of a machining program, reads a machining program and analyzes the block to detect a block including a coordinate rotation command, and then a rotary axis command. A pre-processing unit for outputting the rotation position coordinate and the rotation angle from a block including the coordinate rotation command, and a rotation axis correction unit for correcting the coordinate rotation command to obtain the rotation axis command; And a pulse distributing means for distributing a pulse to be output to a servo motor based on the above.
【請求項2】 前記回転軸補正手段は、少なくとも一つ
の回転軸を補正するように構成したことを特徴とする請
求項1記載の数値制御装置。
2. The numerical controller according to claim 1, wherein the rotation axis correction means is configured to correct at least one rotation axis.
JP24625492A 1992-09-16 1992-09-16 Numerical controller Pending JPH0695721A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24625492A JPH0695721A (en) 1992-09-16 1992-09-16 Numerical controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24625492A JPH0695721A (en) 1992-09-16 1992-09-16 Numerical controller

Publications (1)

Publication Number Publication Date
JPH0695721A true JPH0695721A (en) 1994-04-08

Family

ID=17145792

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24625492A Pending JPH0695721A (en) 1992-09-16 1992-09-16 Numerical controller

Country Status (1)

Country Link
JP (1) JPH0695721A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013041392A (en) * 2011-08-15 2013-02-28 Mitsubishi Electric Corp Numerical controller and processing program generation method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013041392A (en) * 2011-08-15 2013-02-28 Mitsubishi Electric Corp Numerical controller and processing program generation method

Similar Documents

Publication Publication Date Title
JP4837110B2 (en) Numerical control device with tool path display function
JP2641797B2 (en) Interactive numerical controller
US5327350A (en) Interactive type numerical control apparatus and method thereof
US5545959A (en) Speed control method for a numerical control apparatus
CA2029875A1 (en) Manual intervention system for an industrial robot
JPH0695725A (en) Animation drawing system for nc working program
US5337249A (en) Numerical control machining animation with workpiece and tool movement
JPH1094945A (en) Machining limit area designating method and manual machining method in numerical control device
US6999844B2 (en) Numerical controller
JPH0695721A (en) Numerical controller
JPH06202724A (en) Numerical controller
JP2667563B2 (en) Tool axis direction calculation method
JP2742172B2 (en) Feed forward control method
JPH0628021A (en) Interactive numerical controller
WO1992004664A1 (en) Method of working simulation
EP0530364A1 (en) Interactive numerical controller
JPH08263120A (en) Current position display system for cnc
JPH0695727A (en) Feed speed clamping system
JPH05341825A (en) Cnc machining control system
JPH07334223A (en) Tool spindle attitude control system
JPH0474205A (en) Correction system for tool diameter
JPH0454604A (en) Three-dimensional tool diameter correcting system
JP2796335B2 (en) Numerical control unit
JPH0566819A (en) Interactive automatic programming method
JPH0573126A (en) Simulation plotting method for numerical controller