JP2018005440A - Numerical controller - Google Patents

Numerical controller Download PDF

Info

Publication number
JP2018005440A
JP2018005440A JP2016129662A JP2016129662A JP2018005440A JP 2018005440 A JP2018005440 A JP 2018005440A JP 2016129662 A JP2016129662 A JP 2016129662A JP 2016129662 A JP2016129662 A JP 2016129662A JP 2018005440 A JP2018005440 A JP 2018005440A
Authority
JP
Japan
Prior art keywords
axis
rotation
cpu
stop
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2016129662A
Other languages
Japanese (ja)
Other versions
JP6729078B2 (en
Inventor
崇 大高
Takashi Otaka
崇 大高
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.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2016129662A priority Critical patent/JP6729078B2/en
Publication of JP2018005440A publication Critical patent/JP2018005440A/en
Application granted granted Critical
Publication of JP6729078B2 publication Critical patent/JP6729078B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a numerical controller capable of stopping a servo motor for a short time in response to stop of operation relative to an input unit.SOLUTION: A CPU of a numerical controller acquires (S67) a total amount of rotation that is a sum of an amount of rotation relative to a steering wheel for each prescribed period. The CPU determines (S69) whether an absolute value of the total amount of rotation acquired during an n-th period (n is an integer) is larger than a prescribed threshold. When determining that the total amount of rotation is larger than the prescribed threshold (S69: YES), the CPU identifies (S71) a target position based on the total amount of rotation. An A shaft drive controller outputs a pulse signal for rotating an A shaft motor up to the target position during a (n+1) period. When the CPU determines that the total amount of rotation is equal to or smaller than the prescribed threshold, the A shaft drive controller outputs (S75) a stop signal for stopping rotation of the A shaft motor at a time of a start of the (n+1) period.SELECTED DRAWING: Figure 7

Description

本発明は数値制御装置に関する。   The present invention relates to a numerical controller.

特許文献1は、ステージを駆動するサーボモータを備えた工作機械と数値制御装置を開示する。数値制御装置は、サーボモータを駆動する駆動制御部と、駆動制御部を制御する制御部を備える。制御部は、ステージを最終目標位置迄移動する為の複数の位置指令に対応する複数のポイント信号を、駆動制御部に順次出力する。駆動制御部は、各ポイント信号に応じてサーボモータを順次駆動する。ステージは、複数のポイント信号に応じたサーボモータの駆動が全て完了した時、最終目標位置に到達する。   Patent Document 1 discloses a machine tool and a numerical control device that include a servomotor that drives a stage. The numerical control device includes a drive control unit that drives a servo motor and a control unit that controls the drive control unit. The control unit sequentially outputs a plurality of point signals corresponding to a plurality of position commands for moving the stage to the final target position to the drive control unit. The drive control unit sequentially drives the servo motor according to each point signal. The stage reaches the final target position when the drive of the servo motor according to the plurality of point signals is completed.

ハンドルを備える手動パルス発生器を用いて工作機械を制御する技術が周知である。工作機械は、ハンドルの回転量を所定周期毎に蓄積する。工作機械は、蓄積した回転量に応じて目標位置を所定周期毎に更新する。制御部は、更新した目標位置迄ステージを移動する為のポイント信号を、所定周期で駆動制御部に出力する。   Techniques for controlling machine tools using a manual pulse generator with a handle are well known. The machine tool accumulates the rotation amount of the handle every predetermined period. The machine tool updates the target position at predetermined intervals according to the accumulated amount of rotation. The control unit outputs a point signal for moving the stage to the updated target position to the drive control unit at a predetermined cycle.

特開2014−106936号公報JP 2014-106936 A

使用者は、ステージの移動を緊急停止する為にハンドルの回転を停止する時がある。該時、制御部は、ハンドルの回転停止に応じ、ハンドルの回転量0に応じたポイント信号を駆動制御部に出力する。しかし、ハンドルの回転を停止してから、制御部がハンドルの回転停止を検出する迄に、所定周期分の遅延が生じる時がある。又、駆動制御部は、制御部が出力したポイント信号を受けてからサーボモータの制御を開始する迄に、時間を要する時がある。故に、ハンドルの回転が停止してからサーボモータが回転停止する迄に、大きな遅延が生じる時がある。   The user sometimes stops the rotation of the handle in order to stop the movement of the stage urgently. At this time, the control unit outputs a point signal corresponding to the rotation amount 0 of the handle to the drive control unit according to the stop of the rotation of the handle. However, there is a case in which a delay of a predetermined period occurs from when the rotation of the handle is stopped until the control unit detects the stop of the rotation of the handle. Further, the drive control unit sometimes takes time from the point signal output by the control unit to the start of servo motor control. Therefore, there may be a large delay between the stop of the rotation of the handle and the stop of the rotation of the servo motor.

本発明の目的は、入力部に対する操作の停止に応じてサーボモータを短時間で停止できる数値制御装置を提供することである。   The objective of this invention is providing the numerical control apparatus which can stop a servomotor for a short time according to the stop of operation with respect to an input part.

本発明に係る数値制御装置は、第一入力部に対する操作量の、所定周期毎の総量である操作総量を取得する第一取得手段と、前記第一取得手段によって第n周期(nは整数)の間に取得した前記操作総量が、所定閾値よりも大きいか判定する判定手段と、前記判定手段によって前記操作総量が前記所定閾値よりも大きいと判定した時、前記操作総量に基づいて目標位置を特定する第一特定手段と、ステージを移動する為のサーボモータを、前記第一特定手段によって特定した前記目標位置迄回転する為の第一駆動信号を、第(n+1)周期の間に出力する第一出力手段と、前記判定手段によって前記操作量が前記所定閾値以下と判定した時、前記サーボモータの回転を停止する為の停止信号を、第(n+1)周期の開始時に出力する第二出力手段とを備えている。   The numerical control device according to the present invention includes a first acquisition unit that acquires an operation total amount that is a total amount of operation amounts for a first input unit per predetermined period, and an nth period (n is an integer) by the first acquisition unit. Determining means for determining whether the total operation amount acquired during the period is greater than a predetermined threshold, and when the determination unit determines that the total operation amount is greater than the predetermined threshold, the target position is determined based on the total operation amount. A first drive signal for rotating the first specifying means for specifying and the servo motor for moving the stage to the target position specified by the first specifying means is output during the (n + 1) period. A second output that outputs a stop signal for stopping the rotation of the servo motor at the start of the (n + 1) period when the operation amount is determined to be equal to or less than the predetermined threshold by the first output means and the determination means. And a stage.

上記の数値制御装置は、第n周期の間における第一入力部に対する操作総量が所定閾値よりも大きい時、操作総量に応じた目標位置を特定する。数値制御装置は、目標位置迄サーボモータを回転する為に、第一駆動信号を第(n+1)周期の間出力する。該時、サーボモータは、第(n+2)周期の開始時点から、第一駆動信号に応じた回転を開始する。一方、数値制御装置は、操作総量が所定閾値以下の時、停止信号を、第(n+1)周期の開始時に出力する。該時、サーボモータは、第(n+1)周期の開始時点で回転を停止する。故に、数値制御装置は、回転総量が所定閾値以下と判定した時に停止信号を即座に出力できる。従って、数値制御装置は、操作総量が所定閾値以下の時、サーボモータを短時間で停止できる。   The numerical control device specifies a target position corresponding to the total operation amount when the total operation amount with respect to the first input unit during the nth period is larger than a predetermined threshold. The numerical controller outputs a first drive signal for the (n + 1) th cycle in order to rotate the servo motor to the target position. At this time, the servo motor starts rotating in accordance with the first drive signal from the start point of the (n + 2) th cycle. On the other hand, the numerical control device outputs a stop signal at the start of the (n + 1) -th cycle when the total operation amount is equal to or less than the predetermined threshold value. At this time, the servo motor stops rotating at the start of the (n + 1) th cycle. Therefore, the numerical controller can immediately output a stop signal when it is determined that the total rotation amount is equal to or less than the predetermined threshold value. Therefore, the numerical controller can stop the servo motor in a short time when the total operation amount is equal to or less than the predetermined threshold value.

本発明において、前記第一特定手段は、第二入力部を介して設定する倍率と前記操作総量とを乗算した値に基づいて前記目標位置を特定し、前記第二出力手段によって前記停止信号を出力することに応じて停止した前記サーボモータの停止位置を取得する第二取得手段と、前記倍率に対応し且つ等間隔に配列する複数の単位位置のうち、前記第二取得手段によって取得した前記停止位置に近接する近接単位位置を特定する第二特定手段と、前記第二取得手段によって取得した前記停止位置から、前記第二特定手段によって特定した前記近接単位位置迄前記サーボモータを回転する為の第二駆動信号を、前記第二出力手段によって前記停止信号を出力した後に出力する第三出力手段とを備えてもよい。該時、数値制御装置は、停止信号に応じてサーボモータが停止した後、近接単位位置迄サーボモータを回転できる。   In the present invention, the first specifying means specifies the target position based on a value obtained by multiplying a magnification set via a second input unit and the total operation amount, and outputs the stop signal by the second output means. Second acquisition means for acquiring the stop position of the servo motor stopped in response to the output, and the plurality of unit positions corresponding to the magnification and arranged at equal intervals, acquired by the second acquisition means A second specifying means for specifying a proximity unit position close to the stop position; and for rotating the servo motor from the stop position acquired by the second acquisition means to the proximity unit position specified by the second specifying means. And a third output means for outputting the second drive signal after the stop signal is outputted by the second output means. At this time, the numerical controller can rotate the servo motor to the proximity unit position after the servo motor is stopped according to the stop signal.

本発明において、前記近接単位位置は、前記停止信号に応じて停止した前記サーボモータの位置に対し、停止前の回転方向と同一方向に前記サーボモータが回転した時に到達する位置であってもよい。該時、サーボモータの回転方向は、停止前と停止後とで一致する。故に、使用者は、停止後に手動パルス発生器を用いた段取り作業などを効率的に再開できる。   In the present invention, the proximity unit position may be a position reached when the servo motor rotates in the same direction as the rotation direction before the stop with respect to the position of the servo motor stopped according to the stop signal. . At this time, the rotation direction of the servo motor is the same before and after the stop. Therefore, the user can efficiently restart the setup work using the manual pulse generator after the stop.

本発明において、前記近接単位位置は、前記停止信号に応じて停止した前記サーボモータの位置に対し、停止前の回転方向と逆方向に前記サーボモータが回転した時に到達する位置であってもよい。該時、サーボモータ回転方向は、停止前と停止後とで相違する。故に、数値制御装置は、回転再開後のサーボモータの位置が、停止前のサーボモータの位置よりも先に進むことを抑制できる。   In the present invention, the proximity unit position may be a position reached when the servo motor rotates in a direction opposite to the rotation direction before the stop with respect to the position of the servo motor stopped according to the stop signal. . At this time, the servo motor rotation direction is different between before and after the stop. Therefore, the numerical control apparatus can suppress that the position of the servo motor after resuming the rotation advances beyond the position of the servo motor before the stop.

本発明において、前記第一入力部は、回転操作可能なハンドルであり、前記操作量は、前記ハンドルの回転量であってもよい。該時、数値制御装置は、ハンドルの回転操作に応じてサーボモータの回転を制御できる。又、数値制御装置は、所定周期の間のハンドルの回転量が所定閾値以下の時、サーボモータの回転を停止できる。   In the present invention, the first input unit may be a handle that can be rotated, and the operation amount may be a rotation amount of the handle. At this time, the numerical controller can control the rotation of the servo motor in accordance with the rotation operation of the handle. Further, the numerical control device can stop the rotation of the servo motor when the rotation amount of the handle during a predetermined period is equal to or less than a predetermined threshold value.

本発明において、前記所定閾値は0であってもよい。該時、数値制御装置は、所定周期の間で使用者が第一入力部を操作しない時、サーボモータの回転を停止できる。   In the present invention, the predetermined threshold value may be zero. At this time, the numerical controller can stop the rotation of the servo motor when the user does not operate the first input unit during a predetermined period.

工作機械1の斜視図。1 is a perspective view of a machine tool 1. 被削材支持装置8の斜視図。The perspective view of the workpiece support apparatus 8. FIG. 数値制御装置40と工作機械1の電気的構成を示すブロック図。FIG. 2 is a block diagram showing an electrical configuration of the numerical control device 40 and the machine tool 1. X軸モータ61の制御時期を示すタイミングチャート。6 is a timing chart showing the control timing of the X-axis motor 61. A軸モータ65の制御時期を示すタイミングチャート。6 is a timing chart showing the control timing of the A-axis motor 65. 回転量取得処理のフローチャート。The flowchart of a rotation amount acquisition process. メイン処理のフローチャート。The flowchart of a main process. A軸モータ65の制御時期を示すタイミングチャート。6 is a timing chart showing the control timing of the A-axis motor 65.

本発明の実施形態を図面を参照し説明する。以下説明は、図中に矢印で示す左右、前後、上下を使用する。工作機械1の左右方向、前後方向、上下方向は夫々、工作機械1のX軸方向、Y軸方向、Z軸方向である。右方向、前方向、上方向は夫々、正方向であり、左方向、後方向、下方向は夫々、負方向である。図1に示す工作機械1は、被削材(図示略)の切削加工と旋削加工ができる複合機である。   Embodiments of the present invention will be described with reference to the drawings. In the following description, left, right, front, back, and top and bottom indicated by arrows in the figure are used. The left-right direction, the front-rear direction, and the up-down direction of the machine tool 1 are the X-axis direction, the Y-axis direction, and the Z-axis direction of the machine tool 1, respectively. The right direction, the forward direction, and the upward direction are positive directions, respectively, and the left direction, the backward direction, and the downward direction are negative directions, respectively. A machine tool 1 shown in FIG. 1 is a composite machine capable of cutting and turning a work material (not shown).

<工作機械1の構造>
図1を参照し、工作機械1の構造を説明する。工作機械1は基台2、Y軸移動機構(図示略)、X軸移動機構(図示略)、Z軸移動機構(図示略)、移動体15、立柱5、主軸ヘッド6、主軸(図示略)、被削材支持装置8、工具交換装置9、制御箱(図示略)、数値制御装置40(図3参照)等を備える。基台2は架台11、主軸基台12、右側基台13、左側基台14等を備える。架台11は前後方向に長い略直方体状の構造体である。主軸基台12は前後方向に長い略直方体状に形成し、架台11上面後方に設ける。右側基台13は架台11上面右前方に設ける。左側基台14は架台11上面左前方に設ける。右側基台13と左側基台14は夫々、上面に被削材支持装置8を支持する。
<Structure of machine tool 1>
The structure of the machine tool 1 will be described with reference to FIG. The machine tool 1 includes a base 2, a Y-axis moving mechanism (not shown), an X-axis moving mechanism (not shown), a Z-axis moving mechanism (not shown), a moving body 15, a standing column 5, a spindle head 6, and a spindle (not shown). ), A work material support device 8, a tool changer 9, a control box (not shown), a numerical controller 40 (see FIG. 3), and the like. The base 2 includes a gantry 11, a spindle base 12, a right base 13, a left base 14, and the like. The gantry 11 is a substantially rectangular parallelepiped structure that is long in the front-rear direction. The spindle base 12 is formed in a substantially rectangular parallelepiped shape that is long in the front-rear direction, and is provided behind the upper surface of the gantry 11. The right base 13 is provided on the top right of the top surface of the gantry 11. The left base 14 is provided on the upper left side of the top surface of the gantry 11. The right base 13 and the left base 14 each support the work material support device 8 on the upper surface.

Y軸移動機構は主軸基台12上面に設け、Y軸モータ62(図3参照)等を備える。Y軸移動機構はY軸モータ62の駆動により、略平板状の移動体15をY軸方向に移動する。X軸移動機構は移動体15上面に設け、X軸モータ61(図3参照)等を備える。X軸移動機構はX軸モータ61の駆動により、立柱5をX軸方向に移動する。立柱5は、Y軸移動機構、移動体15、X軸移動機構により、基台2上をX軸方向とY軸方向に移動可能である。Z軸移動機構は立柱5前面に設け、Z軸モータ63(図3参照)等を備える。Z軸移動機構はZ軸モータ63の駆動により、主軸ヘッド6をZ軸方向に移動する。主軸(図示略)は主軸ヘッド6内部に設け、主軸下部に工具装着穴(図示略)を備える。工具装着穴は工具を装着する。故に、X軸移動機構、Y軸移動機構、Z軸移動機構は夫々、主軸に装着した工具に対して被削材を、X軸方向、Y軸方向、Z軸方向に移動できる。主軸は主軸ヘッド6上部に設けた主軸モータ66(図3参照)で回転する。   The Y-axis moving mechanism is provided on the upper surface of the spindle base 12 and includes a Y-axis motor 62 (see FIG. 3). The Y-axis moving mechanism moves the substantially flat moving body 15 in the Y-axis direction by driving the Y-axis motor 62. The X-axis moving mechanism is provided on the upper surface of the moving body 15 and includes an X-axis motor 61 (see FIG. 3). The X-axis moving mechanism moves the upright column 5 in the X-axis direction by driving the X-axis motor 61. The upright 5 is movable on the base 2 in the X-axis direction and the Y-axis direction by the Y-axis moving mechanism, the moving body 15 and the X-axis moving mechanism. The Z-axis moving mechanism is provided on the front surface of the upright column 5 and includes a Z-axis motor 63 (see FIG. 3). The Z-axis moving mechanism moves the spindle head 6 in the Z-axis direction by driving the Z-axis motor 63. The spindle (not shown) is provided inside the spindle head 6 and has a tool mounting hole (not shown) in the lower part of the spindle. A tool is mounted in the tool mounting hole. Therefore, the X-axis movement mechanism, the Y-axis movement mechanism, and the Z-axis movement mechanism can move the work material in the X-axis direction, the Y-axis direction, and the Z-axis direction with respect to the tool mounted on the main shaft, respectively. The spindle is rotated by a spindle motor 66 (see FIG. 3) provided on the spindle head 6.

工具交換装置9は立柱5と主軸ヘッド6周囲を取り巻く略円環状である。工具交換装置9は主軸ヘッド6を昇降する間に、主軸に現在装着する工具を交換する。制御箱は工作機械1を覆うカバー(図示略)の外壁に取り付ける。数値制御装置40(図3参照)は制御箱の内側に格納する。数値制御装置40はNCプログラムに基づき工作機械1の動作を制御する。工作機械1を覆うカバーは外壁面に操作盤10(図3参照)を備える。操作盤10は操作部18と表示部19を備える。操作部18は数値制御装置40の各種設定を行う。表示部19は各種画面、メッセージ、アラーム等を表示する。   The tool changer 9 has a substantially annular shape surrounding the upright column 5 and the spindle head 6. The tool changer 9 changes the tool currently mounted on the spindle while raising and lowering the spindle head 6. The control box is attached to the outer wall of a cover (not shown) that covers the machine tool 1. The numerical controller 40 (see FIG. 3) is stored inside the control box. The numerical controller 40 controls the operation of the machine tool 1 based on the NC program. The cover that covers the machine tool 1 includes an operation panel 10 (see FIG. 3) on the outer wall surface. The operation panel 10 includes an operation unit 18 and a display unit 19. The operation unit 18 performs various settings of the numerical control device 40. The display unit 19 displays various screens, messages, alarms, and the like.

被削材支持装置8は右側基台13と左側基台14の上面に固定する。図2に示すように、被削材支持装置8はA軸台20、左側支持台27、右側駆動機構部28、回転台29、C軸駆動部50等を備える。A軸台20は台部21、右連結部22、左連結部23を備える。台部21は、A軸台20の傾斜角度が0度で上面が水平面となる平面視略長方形状の板状部である。右連結部22は台部21の右端部から右斜め上方に延び且つ右側駆動機構部28と回動可能に連結する。左連結部23は台部21の左端部から左斜め上方に延び且つ後述する左側支持台27と回動可能に連結する。左連結部23はその左端面から左方に突出する略円柱状の支軸31を有する。左側支持台27は支軸31を回転可能に支持する。左側支持台27の底部は、左側基台14(図1参照)の上面に固定する。   The work material support device 8 is fixed to the upper surfaces of the right base 13 and the left base 14. As shown in FIG. 2, the work material support device 8 includes an A-axis base 20, a left-side support base 27, a right-side drive mechanism section 28, a rotary base 29, a C-axis drive section 50, and the like. The A-axis base 20 includes a base part 21, a right connection part 22, and a left connection part 23. The pedestal 21 is a plate-like part having a substantially rectangular shape in plan view, in which the inclination angle of the A-shaft pedestal 20 is 0 degree and the upper surface is a horizontal plane. The right connecting portion 22 extends obliquely upward to the right from the right end portion of the base portion 21 and is rotatably connected to the right drive mechanism portion 28. The left connecting portion 23 extends obliquely to the left from the left end portion of the base portion 21 and is rotatably connected to a left side support base 27 described later. The left connecting portion 23 has a substantially cylindrical support shaft 31 protruding leftward from the left end surface. The left support 27 supports the support shaft 31 in a rotatable manner. The bottom of the left support base 27 is fixed to the upper surface of the left base 14 (see FIG. 1).

右側駆動機構部28はA軸台20右側に位置する。右側駆動機構部28は内側に、右側支持台(図示略)、A軸モータ65(図3参照)等を格納する。右連結部22はその右端面から右方に突出する略円柱状の支軸(図示略)を有する。右側支持台は右連結部22の支軸を回転可能に支持する。右連結部22の支軸とA軸モータ65の出力軸は、互いに連結する。A軸モータ65の出力軸が回転すると、A軸台20はX軸方向に対して平行な支軸31を中心に、右連結部22と一体して回転する。A軸台20を回転する軸はA軸である。右側駆動機構部28は工具に対して被削材を、A軸を中心として回転できる。A軸台20はA軸回りに任意角度で傾くことで、主軸に装着する工具に対して被削材を任意方向に傾けることができる。A軸を左側から見た時の時計回りの回転方向を正方向と称し、反時計回りの回転方向を負方向と称す。右側支持台の底部は、右側基台13(図1参照)の上面に固定する。   The right drive mechanism 28 is located on the right side of the A-shaft 20. The right drive mechanism 28 stores therein a right support (not shown), an A-axis motor 65 (see FIG. 3), and the like. The right connecting part 22 has a substantially cylindrical support shaft (not shown) protruding rightward from the right end surface thereof. The right support base rotatably supports the support shaft of the right connecting portion 22. The support shaft of the right connecting portion 22 and the output shaft of the A-axis motor 65 are connected to each other. When the output shaft of the A-axis motor 65 rotates, the A-shaft 20 rotates integrally with the right connecting portion 22 around the support shaft 31 parallel to the X-axis direction. The axis that rotates the A-axis base 20 is the A-axis. The right drive mechanism 28 can rotate the work material about the A axis with respect to the tool. By tilting the A-shaft 20 at an arbitrary angle around the A-axis, the work material can be tilted in an arbitrary direction with respect to the tool mounted on the main shaft. The clockwise rotation direction when viewing the A axis from the left side is referred to as a positive direction, and the counterclockwise rotation direction is referred to as a negative direction. The bottom of the right support base is fixed to the upper surface of the right base 13 (see FIG. 1).

回転台29は台部21上面略中央に回転可能に設ける。回転台29は円盤状に形成し、A軸台20上面略中央に設ける。C軸駆動部50は台部21下面に設け且つ台部21の略中央に設けた穴(図示略)を介して回転台29と連結する。C軸駆動部50は内部に回転軸(図示略)、C軸モータ64(図3参照)等を備える。回転軸は回転台29に対して直交する方向に延びる。回転軸は回転台29に固定する。C軸モータ64は回転軸に固定する。故に、C軸モータ64が回転軸を回転すると、回転台29はZ軸方向に平行な軸を中心に回転可能である。回転台29を回転する軸はC軸である。回転台29上面の冶具200は、被削材を固定する。C軸駆動部50は工具に対して被削材を、C軸を中心として回転できる。C軸を上側から見た時の時計回りの回転方向を正方向と称し、反時計回りの回転方向を負方向と称す。   The turntable 29 is rotatably provided at the approximate center of the top surface of the table 21. The turntable 29 is formed in a disk shape and is provided at the approximate center of the upper surface of the A-shaft table 20. The C-axis drive unit 50 is connected to the turntable 29 through a hole (not shown) provided on the lower surface of the base part 21 and provided substantially at the center of the base part 21. The C-axis drive unit 50 includes a rotation shaft (not shown), a C-axis motor 64 (see FIG. 3), and the like. The rotation axis extends in a direction orthogonal to the turntable 29. The rotating shaft is fixed to the turntable 29. The C-axis motor 64 is fixed to the rotating shaft. Therefore, when the C-axis motor 64 rotates the rotation shaft, the turntable 29 can rotate around an axis parallel to the Z-axis direction. The axis that rotates the turntable 29 is the C axis. The jig 200 on the upper surface of the turntable 29 fixes the work material. The C-axis drive unit 50 can rotate the workpiece with respect to the tool about the C-axis. A clockwise rotation direction when the C-axis is viewed from above is referred to as a positive direction, and a counterclockwise rotation direction is referred to as a negative direction.

<手動パルス発生器16の構造>
図1に示すように、手動パルス発生器16は数値制御装置40(図3参照)に接続する。手動パルス発生器16は倍率スイッチ16A、軸スイッチ16B、ハンドル16Cを備える。倍率スイッチ16Aと軸スイッチ16Bは夫々、ダイヤル式のスイッチである。倍率スイッチ16Aは倍率として、×1、×10、×100の何れかを選択できる。×1、×10、×100は夫々、1倍、10倍、100倍の倍率に対応する。以下、倍率スイッチ16Aにより選択した倍率を、選択倍率と称す。
<Structure of manual pulse generator 16>
As shown in FIG. 1, the manual pulse generator 16 is connected to a numerical controller 40 (see FIG. 3). The manual pulse generator 16 includes a magnification switch 16A, an axis switch 16B, and a handle 16C. The magnification switch 16A and the shaft switch 16B are dial switches. The magnification switch 16A can select any one of x1, x10, and x100 as a magnification. × 1, × 10, and × 100 correspond to magnifications of 1 ×, 10 ×, and 100 ×, respectively. Hereinafter, the magnification selected by the magnification switch 16A is referred to as a selection magnification.

軸スイッチ16Bは軸として、OFF、X、Y、Z、4の何れかを選択できる。OFFは、何れの軸も選択しないことに対応する。言い換えれば、OFFは後述するハンドル16Cの操作が無効であることに対応する。X、Y、Zは夫々、X軸、Y軸、Z軸に対応する。4は、表示部19(図3参照)がA軸を示す情報(以下、A軸情報と称す。)を表示する時、A軸に対応し、C軸を示す情報(以下、C軸情報と称す。)を表示する時、C軸に対応する。以下、軸スイッチ16Bにより選択した軸を選択軸と称す。表示部19がA軸情報を表示し且つ軸スイッチ16Bが4を選択した時、選択軸はA軸である。表示部19がC軸情報を表示し且つ軸スイッチ16Bが4を選択した時、選択軸はC軸である。   The axis switch 16B can select any of OFF, X, Y, Z, and 4 as an axis. OFF corresponds to selecting no axis. In other words, OFF corresponds to an invalid operation of the handle 16C described later. X, Y, and Z correspond to the X axis, the Y axis, and the Z axis, respectively. 4, when the display unit 19 (see FIG. 3) displays information indicating the A axis (hereinafter referred to as A axis information), information corresponding to the A axis and indicating the C axis (hereinafter referred to as C axis information and When displaying ")", it corresponds to the C-axis. Hereinafter, the axis selected by the axis switch 16B is referred to as a selected axis. When the display unit 19 displays the A axis information and the axis switch 16B selects 4, the selected axis is the A axis. When the display unit 19 displays C axis information and the axis switch 16B selects 4, the selected axis is the C axis.

ハンドル16Cは所定角度分ずつ左右両側に回転できるダイヤル式のハンドルである。以下、ハンドル16Cの正面視で時計回りの回転方向を正方向と称し、反時計回りの回転方向を負方向と称す。手動パルス発生器16はハンドル16Cが所定角度分回転する毎に、数値制御装置40に回転量を出力できる。回転量はハンドル16Cが正方向に所定角度回転した時、正の値+1となり、ハンドル16Cが負方向に所定角度回転した時、負の値−1となる。   The handle 16C is a dial-type handle that can rotate to the left and right by a predetermined angle. Hereinafter, the clockwise rotation direction in front view of the handle 16C is referred to as a positive direction, and the counterclockwise rotation direction is referred to as a negative direction. The manual pulse generator 16 can output the rotation amount to the numerical controller 40 every time the handle 16C rotates by a predetermined angle. The amount of rotation becomes a positive value +1 when the handle 16C rotates by a predetermined angle in the positive direction, and becomes a negative value -1 when the handle 16C rotates by a predetermined angle in the negative direction.

工作機械1は使用者が手動パルス発生器16を使用した時、工具に対して被削材を移動する。例えば被削材は、選択軸がX軸、Y軸、Z軸の何れか且つハンドル16Cが正方向に回転した時、選択軸に沿って正方向に移動する。被削材の移動距離は、回転量の総量をN(Nは整数)と表記する時、
N×単位長さ×選択倍率・・・(第一式)
である。単位長さは0.001mmである。以下、第一式により算出する距離を換算距離と称す。例えば換算距離は、Nが+1、選択倍率が×1の時、+0.001mmである。つまり、被削材は使用者が手動パルス発生器16のハンドル16Cを正方向に所定角度×1分回転した時、選択軸に沿って正方向に0.001mm移動する。例えば換算距離は、Nが−2、選択倍率が×100の時、−0.2mmである。つまり、被削材は使用者が手動パルス発生器16のハンドル16Cを負方向に所定角度×2分回転した時、選択軸に沿って負方向に0.2mm移動する。
The machine tool 1 moves the workpiece with respect to the tool when the user uses the manual pulse generator 16. For example, the work material moves in the positive direction along the selection axis when the selection axis is any of the X axis, the Y axis, and the Z axis and the handle 16C rotates in the positive direction. The moving distance of the work material is expressed when the total amount of rotation is expressed as N (N is an integer),
N x unit length x selection magnification ... (first formula)
It is. The unit length is 0.001 mm. Hereinafter, the distance calculated by the first equation is referred to as a converted distance. For example, the conversion distance is +0.001 mm when N is +1 and the selection magnification is x1. That is, when the user rotates the handle 16C of the manual pulse generator 16 in the positive direction by a predetermined angle × 1 minute, the work material moves 0.001 mm in the positive direction along the selected axis. For example, the conversion distance is -0.2 mm when N is -2 and the selection magnification is x100. That is, when the user rotates the handle 16C of the manual pulse generator 16 in the negative direction by a predetermined angle × 2 minutes, the work material moves 0.2 mm in the negative direction along the selected axis.

例えば被削材は、選択軸がA軸且つハンドル16Cが正方向に回転した時、A軸を中心として正方向に回転する。該時、被削材の回転角度は、回転量の総量がNの時、
N×単位角度×選択倍率・・・(第二式)
である。単位角度は0.001度である。以下、第二式により算出する角度を換算角度と称す。例えば換算角度は、Nが+1、選択倍率が×1の時、+0.001度である。つまり、被削材は使用者が手動パルス発生器16のハンドル16Cを正方向に所定角度×1分回転した時、A軸を中心として正方向に0.001度回転する。例えば換算角度は、Nが−2、選択倍率が×10の時、−0.02度である。つまり、被削材は使用者が手動パルス発生器16のハンドル16Cを負方向に所定角度×2分回転した時、A軸を中心として負方向に0.02度回転する。
For example, when the selected axis is the A axis and the handle 16C rotates in the positive direction, the work material rotates in the positive direction around the A axis. At this time, the rotation angle of the work material is such that when the total amount of rotation is N,
N x Unit angle x Selection magnification (2nd formula)
It is. The unit angle is 0.001 degree. Hereinafter, the angle calculated by the second equation is referred to as a converted angle. For example, the conversion angle is +0.001 degrees when N is +1 and the selection magnification is x1. That is, when the user rotates the handle 16C of the manual pulse generator 16 in the positive direction by a predetermined angle × 1 minute, the work material rotates 0.001 degrees in the positive direction around the A axis. For example, the conversion angle is −0.02 degrees when N is −2 and the selection magnification is × 10. That is, when the user rotates the handle 16C of the manual pulse generator 16 in the negative direction by a predetermined angle × 2 minutes, the workpiece rotates 0.02 degrees in the negative direction around the A axis.

例えば被削材は、選択軸がC軸且つハンドル16Cが正方向又は負方向に回転した時、C軸を中心として正方向又は負方向に換算角度分回転する。換算角度の算出式は第二式であり、選択軸がA軸の時と同一である。   For example, when the selected axis is the C axis and the handle 16C is rotated in the positive direction or the negative direction, the work material rotates around the C axis by a conversion angle in the positive direction or the negative direction. The calculation formula for the conversion angle is the second formula, which is the same as when the selection axis is the A axis.

<電気的構成>
図3を参照して数値制御装置40と工作機械1の電気的構成を説明する。数値制御装置40はCPU41、ROM42、RAM43、フラッシュメモリ44、入出力部45、通信インタフェース(I/F)46、駆動回路51〜54、56、A軸駆動制御部55を備える。工作機械1はX軸モータ61、Y軸モータ62、Z軸モータ63、C軸モータ64、A軸モータ65、主軸モータ66、エンコーダ71〜76を備える。
<Electrical configuration>
The electrical configuration of the numerical controller 40 and the machine tool 1 will be described with reference to FIG. The numerical control device 40 includes a CPU 41, ROM 42, RAM 43, flash memory 44, input / output unit 45, communication interface (I / F) 46, drive circuits 51 to 54, 56, and A-axis drive control unit 55. The machine tool 1 includes an X-axis motor 61, a Y-axis motor 62, a Z-axis motor 63, a C-axis motor 64, an A-axis motor 65, a main shaft motor 66, and encoders 71 to 76.

CPU41は工作機械1の動作を制御する。ROM42は後述する回転量取得処理(図6参照)、メイン処理(図7参照)を実行する為の制御プログラム等を記憶する。RAM43は各種処理実行中に発生する各種データを記憶する。RAM43はX軸方向位置、Y軸方向位置、Z軸方向位置を記憶する。X軸方向位置、Y軸方向位置、Z軸方向位置は夫々、所定の原点位置を基準とした時の被削材のX軸方向、Y軸方向、Z軸方向の位置を示す。RAM43は、A軸方向角度、C軸方向角度を記憶する。A軸方向角度、C軸方向角度は夫々、所定の原点角度を基準とした時の被削材のA軸、C軸を回転軸とした角度を示す。フラッシュメモリ44はNCプログラム等を記憶する。入出力部45は駆動回路51〜54、56、エンコーダ71〜76、操作部18、表示部19、手動パルス発生器16との間で各種信号の入出力を行う。通信I/F46はA軸駆動制御部55との間で各種信号の入出力を行う。   The CPU 41 controls the operation of the machine tool 1. The ROM 42 stores a control program for executing a rotation amount acquisition process (see FIG. 6) and a main process (see FIG. 7), which will be described later. The RAM 43 stores various data generated during execution of various processes. The RAM 43 stores an X-axis direction position, a Y-axis direction position, and a Z-axis direction position. The X-axis direction position, the Y-axis direction position, and the Z-axis direction position indicate the positions of the work material in the X-axis direction, the Y-axis direction, and the Z-axis direction, respectively, with a predetermined origin position as a reference. The RAM 43 stores an A-axis direction angle and a C-axis direction angle. The A-axis direction angle and the C-axis direction angle indicate angles with the A-axis and C-axis of the work material as rotational axes when a predetermined origin angle is used as a reference. The flash memory 44 stores an NC program and the like. The input / output unit 45 inputs / outputs various signals to / from the drive circuits 51 to 54, 56, the encoders 71 to 76, the operation unit 18, the display unit 19, and the manual pulse generator 16. The communication I / F 46 inputs / outputs various signals to / from the A-axis drive control unit 55.

駆動回路51はCPU41が出力するパルス信号(後述)を、X軸モータ61に出力する。エンコーダ71はX軸モータ61の回転位置を検出し、該検出信号を入出力部45に出力する。駆動回路52はCPU41が出力するパルス信号を、Y軸モータ62に出力する。エンコーダ72はY軸モータ62の回転位置を検出し、該検出信号を入出力部45に出力する。駆動回路53はCPU41が出力するパルス信号を、Z軸モータ63に出力する。エンコーダ73はZ軸モータ63の回転位置を検出し、該検出信号を入出力部45に出力する。駆動回路54はCPU41が出力するパルス信号を、C軸モータ64に出力する。エンコーダ74はC軸モータ64の回転位置を検出し、該検出信号を入出力部45に出力する。駆動回路56はCPU41が出力するパルス信号を、主軸モータ66に出力する。エンコーダ76は主軸モータ66の回転位置を検出し、該検出信号を入出力部45に出力する。A軸駆動制御部55はCPU41が出力するパルス信号を、A軸モータ65に出力する。エンコーダ75はA軸モータ65の回転位置を検出し、該検出信号を入出力部45に出力する。   The drive circuit 51 outputs a pulse signal (described later) output from the CPU 41 to the X-axis motor 61. The encoder 71 detects the rotational position of the X-axis motor 61 and outputs the detection signal to the input / output unit 45. The drive circuit 52 outputs a pulse signal output from the CPU 41 to the Y-axis motor 62. The encoder 72 detects the rotational position of the Y-axis motor 62 and outputs the detection signal to the input / output unit 45. The drive circuit 53 outputs a pulse signal output from the CPU 41 to the Z-axis motor 63. The encoder 73 detects the rotational position of the Z-axis motor 63 and outputs the detection signal to the input / output unit 45. The drive circuit 54 outputs a pulse signal output from the CPU 41 to the C-axis motor 64. The encoder 74 detects the rotational position of the C-axis motor 64 and outputs the detection signal to the input / output unit 45. The drive circuit 56 outputs a pulse signal output from the CPU 41 to the spindle motor 66. The encoder 76 detects the rotational position of the spindle motor 66 and outputs the detection signal to the input / output unit 45. The A-axis drive control unit 55 outputs a pulse signal output from the CPU 41 to the A-axis motor 65. The encoder 75 detects the rotational position of the A-axis motor 65 and outputs the detection signal to the input / output unit 45.

駆動回路51〜54とA軸駆動制御部55は、モータ61〜65に対するパルス信号の出力に要する時間が互いに相違する。A軸駆動制御部55がパルス信号をA軸モータ65に出力する為に必要な時間は、駆動回路51〜54がパルス信号をモータ61〜64に出力する為に必要な時間よりも長い。   The drive circuits 51 to 54 and the A-axis drive control unit 55 are different from each other in time required for outputting pulse signals to the motors 61 to 65. The time required for the A-axis drive control unit 55 to output the pulse signal to the A-axis motor 65 is longer than the time required for the drive circuits 51 to 54 to output the pulse signal to the motors 61 to 64.

モータ61〜66は何れもサーボモータである。エンコーダ71〜76は一般的な絶対値エンコーダであり、回転位置の絶対位置を検出して出力する位置センサである。   The motors 61 to 66 are all servo motors. The encoders 71 to 76 are general absolute value encoders, and are position sensors that detect and output the absolute position of the rotational position.

<手動パルス発生器16使用時の動作タイミング(モータ61〜64)>
図4を参照し、使用者が手動パルス発生器16を用いて工作機械1を制御する時のモータ61〜64の動作タイミングを説明する。駆動回路51〜54がパルス信号をモータ61〜64に出力する為に必要な時間を、t(ms)とする。CPU41は手動パルス発生器16の倍率スイッチ16Aの状態に基づき、選択倍率を取得する。CPU41は表示部19の表示内容と手動パルス発生器16の軸スイッチ16Bの状態に基づき、選択軸を取得する。以下では、使用者が軸スイッチ16BによりX軸を選択軸として選択した時を例示する。使用者は手動パルス発生器16のハンドル16Cを、時間0tから32t迄等速で正方向に回転し、時間32tでハンドル16Cの回転を停止する。
<Operation timing when using the manual pulse generator 16 (motors 61 to 64)>
The operation timing of the motors 61 to 64 when the user controls the machine tool 1 using the manual pulse generator 16 will be described with reference to FIG. A time required for the drive circuits 51 to 54 to output a pulse signal to the motors 61 to 64 is defined as t (ms). The CPU 41 acquires the selected magnification based on the state of the magnification switch 16A of the manual pulse generator 16. The CPU 41 acquires the selected axis based on the display content of the display unit 19 and the state of the axis switch 16B of the manual pulse generator 16. In the following, a case where the user selects the X axis as the selection axis by the axis switch 16B will be exemplified. The user rotates the handle 16C of the manual pulse generator 16 in the positive direction at a constant speed from time 0t to 32t, and stops the rotation of the handle 16C at time 32t.

CPU41はハンドル16Cが所定角度分回転する毎に、手動パルス発生器16から回転量を取得する(P11)。CPU41は周期tの間の回転量の総量(以下、回転総量と称す。)を繰り返し算出する。具体的には、CPU41は時間n×t(nは整数)から時間(n+1)×t迄の周期t(以下、第n周期と称す。)の間に取得したハンドル16Cの回転総量rを、第n周期の終了時点で算出する。CPU41は算出した回転総量r、選択倍率に基づき、第一式を適用して換算距離を算出する。
換算距離 = 回転総量r×単位長さ(0.001mm)×選択倍率
CPU41はRAM43に記憶したX軸方向位置に換算距離を加算し、X軸方向位置を更新する。CPU41は、原点位置から更新後のX軸方向位置迄被削材が移動した時のX軸モータ61の回転位置を、X軸モータ61の目標位置として特定する。
The CPU 41 acquires the rotation amount from the manual pulse generator 16 every time the handle 16C rotates by a predetermined angle (P11). The CPU 41 repeatedly calculates the total amount of rotation during the period t (hereinafter referred to as the total amount of rotation). Specifically, the CPU 41 calculates the total rotation amount r of the handle 16C acquired during a period t (hereinafter referred to as the nth period) from time n × t (n is an integer) to time (n + 1) × t. It is calculated at the end of the nth cycle. The CPU 41 calculates the conversion distance by applying the first equation based on the calculated total rotation amount r and the selected magnification.
Conversion distance = total rotation amount r × unit length (0.001 mm) × selection magnification The CPU 41 adds the conversion distance to the X-axis direction position stored in the RAM 43 and updates the X-axis direction position. The CPU 41 specifies the rotational position of the X-axis motor 61 when the work material moves from the origin position to the updated X-axis direction position as the target position of the X-axis motor 61.

CPU41は特定した目標位置を示すパルス信号を、入出力部45を介して駆動回路51に出力する(P12)。駆動回路51はX軸モータ61が目標位置迄回転する為のパルス信号を、X軸モータ61に出力する(P13)。前述のように、駆動回路51がパルス信号をX軸モータ61に出力する為に必要な時間は、tである。つまり、駆動回路51は第n周期の回転総量rに基づくパルス信号を、次の第(n+1)周期の間にX軸モータ61に出力する。X軸モータ61はパルス信号を全て入力した後、該パルス信号に応じた回転を開始する。X軸モータ61はパルス信号に基づき、所定の回転速度vで目標位置迄回転する。   The CPU 41 outputs a pulse signal indicating the specified target position to the drive circuit 51 via the input / output unit 45 (P12). The drive circuit 51 outputs a pulse signal for rotating the X-axis motor 61 to the target position to the X-axis motor 61 (P13). As described above, the time required for the drive circuit 51 to output the pulse signal to the X-axis motor 61 is t. That is, the drive circuit 51 outputs a pulse signal based on the total rotation amount r in the nth cycle to the X-axis motor 61 during the next (n + 1) cycle. After all the pulse signals are input, the X-axis motor 61 starts rotating according to the pulse signals. The X-axis motor 61 rotates to a target position at a predetermined rotation speed v based on the pulse signal.

上記のように、X軸モータ61は第n周期の回転総量rに応じた回転を、第(n+1)周期の終了時点から開始する。故に、CPU41がパルス信号を駆動回路51に出力してから、X軸モータ61が該パルス信号に応じた回転を開始する迄に、周期t分の遅延が生じる。このため例えば、ハンドル16Cの回転開始直後の第0周期(時間0t〜1t)の回転総量r(P14)に応じてX軸モータ61が開始を回転する時期は、時間2tとなる(P15)。   As described above, the X-axis motor 61 starts the rotation corresponding to the total rotation amount r of the nth cycle from the end point of the (n + 1) th cycle. Therefore, there is a delay of the period t from when the CPU 41 outputs the pulse signal to the drive circuit 51 until the X-axis motor 61 starts rotating according to the pulse signal. Therefore, for example, the timing at which the X-axis motor 61 starts to rotate according to the total rotation amount r (P14) of the 0th period (time 0t to 1t) immediately after the start of rotation of the handle 16C is time 2t (P15).

CPU41はハンドル16Cの回転が時間32tで停止した時、第32周期(時間32t〜33t)の間の回転総量として0を、第32周期の終了時点で算出する。取得した回転総量0に基づき第一式を適用して算出する換算距離は、0である(P16)。該時、RAM43に記憶したX軸方向位置に換算距離を加算しても、X軸方向位置は変化しない。故に、更新後のX軸方向位置に基づいて特定するX軸モータ61の目標位置も変化しない。   When the rotation of the handle 16C stops at time 32t, the CPU 41 calculates 0 as the total amount of rotation during the 32nd cycle (time 32t to 33t) at the end of the 32nd cycle. The conversion distance calculated by applying the first formula based on the acquired total rotation amount 0 is 0 (P16). At this time, even if the conversion distance is added to the X-axis direction position stored in the RAM 43, the X-axis direction position does not change. Therefore, the target position of the X-axis motor 61 specified based on the updated X-axis direction position does not change.

駆動回路51は該目標位置迄X軸モータ61を回転する為のパルス信号を、第33周期(時間33t〜34t)の間にX軸モータ61に出力する。X軸モータ61は入力したパルス信号に対応する目標位置が変化しない為、目標位置迄回転した時回転を停止する(P17)。図4において、X軸モータ61は時間34tで回転を停止する。つまり、ハンドル16Cの回転が停止した時間32tから、X軸モータ61が回転を停止する時間34t迄、時間2t分遅延する。   The drive circuit 51 outputs a pulse signal for rotating the X-axis motor 61 to the target position to the X-axis motor 61 during the 33rd period (time 33t to 34t). Since the target position corresponding to the input pulse signal does not change, the X-axis motor 61 stops rotating when rotated to the target position (P17). In FIG. 4, the X-axis motor 61 stops rotating at time 34t. That is, the time is delayed by 2t from the time 32t when the rotation of the handle 16C is stopped to the time 34t when the X-axis motor 61 stops rotating.

尚、詳細説明は省略するが、CPU41は使用者が軸スイッチ16BによりY軸、Z軸を選択軸として選択した時、上記と同じ方法で換算距離を算出する。CPU41は算出した換算距離を、RAM43に記憶したY軸方向位置、Z軸方向位置に夫々加算し、Y軸方向位置、Z軸方向位置を夫々更新する。CPU41は更新後のY軸方向位置、Z軸方向位置迄被削材を移動した時のY軸モータ62、Z軸モータ63の回転位置を、Y軸モータ62、Z軸モータ63の目標位置として夫々特定する。CPU41は特定した目標位置に基づき、パルス信号を駆動回路52、53に出力する。   Although detailed description is omitted, when the user selects the Y axis and the Z axis as the selection axes by the axis switch 16B, the CPU 41 calculates the conversion distance by the same method as described above. The CPU 41 adds the calculated conversion distance to the Y-axis direction position and the Z-axis direction position stored in the RAM 43, and updates the Y-axis direction position and the Z-axis direction position, respectively. The CPU 41 sets the rotational positions of the Y-axis motor 62 and the Z-axis motor 63 when the workpiece is moved to the updated Y-axis direction position and Z-axis direction position as the target positions of the Y-axis motor 62 and the Z-axis motor 63. Identify each one. The CPU 41 outputs a pulse signal to the drive circuits 52 and 53 based on the specified target position.

CPU41は使用者が軸スイッチ16BによりC軸を選択軸として選択した時、取得した回転総量r、選択倍率に基づき、第二式を適用して換算角度を算出する。
換算角度 = 回転総量r×単位角度(0.001度)×選択倍率
CPU41はRAM43に記憶したC軸方向角度に換算角度を加算し、C軸方向角度を更新する。CPU41は、原点角度から更新後のC軸方向角度迄被削材が回転した時のC軸モータ64の回転位置を、C軸モータ64の目標位置として特定する。CPU41は特定した目標位置に基づき、パルス信号を駆動回路54に出力する。
When the user selects the C axis as the selection axis by the axis switch 16B, the CPU 41 calculates the conversion angle by applying the second equation based on the acquired total rotation amount r and the selection magnification.
Conversion angle = total rotation amount r × unit angle (0.001 degree) × selection magnification The CPU 41 adds the conversion angle to the C-axis direction angle stored in the RAM 43 and updates the C-axis direction angle. The CPU 41 specifies the rotation position of the C-axis motor 64 when the workpiece rotates from the origin angle to the updated C-axis direction angle as the target position of the C-axis motor 64. The CPU 41 outputs a pulse signal to the drive circuit 54 based on the specified target position.

<手動パルス発生器16使用時の動作タイミング(A軸モータ65)>
図5を参照し、CPU41が駆動回路51〜54に対する制御と同じ方法でA軸駆動制御部55を制御したと仮定し、A軸モータ65の動作タイミングを説明する。A軸駆動制御部55がパルス信号をA軸モータ65に出力する為に必要な時間を、駆動回路51〜54にて必要な時間t(図4参照)よりも長い8tとする。使用者は軸スイッチ16BによりA軸を選択軸として選択する。図4と同様、使用者は手動パルス発生器16のハンドル16Cを、時間0tから32t迄等速で正方向に回転し、時間32tでハンドル16Cの回転を停止する。
<Operation timing when using manual pulse generator 16 (A-axis motor 65)>
With reference to FIG. 5, the operation timing of the A-axis motor 65 will be described assuming that the CPU 41 controls the A-axis drive control unit 55 in the same manner as the control for the drive circuits 51 to 54. The time required for the A-axis drive control unit 55 to output the pulse signal to the A-axis motor 65 is 8t, which is longer than the time t (see FIG. 4) required by the drive circuits 51-54. The user selects the A axis as the selected axis by the axis switch 16B. As in FIG. 4, the user rotates the handle 16C of the manual pulse generator 16 in the positive direction at a constant speed from time 0t to 32t, and stops the rotation of the handle 16C at time 32t.

CPU41はハンドル16Cが所定角度分回転する毎に、手動パルス発生器16から回転量を取得する(P21)。CPU41は時間n×8tから時間(n+1)×8t迄の周期8t(第n周期)の間に取得したハンドル16Cの回転総量8rを、第n周期の終了時点で算出する。CPU41は算出した回転総量8r、選択倍率に基づき、第二式を適用して換算角度を算出する。CPU41はRAM43に記憶したA軸方向角度に換算角度を加算し、A軸方向角度を更新する。CPU41は、原点角度から更新後のA軸方向角度迄被削材が回転した時のA軸モータ65の回転位置を、A軸モータ65の目標位置として特定する。   The CPU 41 acquires the rotation amount from the manual pulse generator 16 every time the handle 16C rotates by a predetermined angle (P21). The CPU 41 calculates the total rotation amount 8r of the handle 16C acquired during a period 8t (nth period) from time n × 8t to time (n + 1) × 8t at the end of the nth period. The CPU 41 calculates the conversion angle by applying the second formula based on the calculated total rotation amount 8r and the selection magnification. The CPU 41 adds the conversion angle to the A-axis direction angle stored in the RAM 43 and updates the A-axis direction angle. The CPU 41 specifies the rotational position of the A-axis motor 65 when the workpiece rotates from the origin angle to the updated A-axis direction angle as the target position of the A-axis motor 65.

CPU41は特定した目標位置に基づき、通信I/F46を介してパルス信号をA軸駆動制御部55に出力する(P22)。A軸駆動制御部55はA軸モータ65が目標位置迄回転する為のパルス信号を、A軸モータ65に出力する(P23)。つまり、A軸駆動制御部55は第n周期の回転総量8rに基づくパルス信号を、次の第(n+1)周期の間にA軸モータ65に出力する。A軸モータ65はパルス信号を全て入力した後、パルス信号に応じた回転を開始する。故に、CPU41がパルス信号をA軸駆動制御部55に出力してから、A軸モータ65が回転を開始する迄に、周期8t分の遅延が生じる。このため例えば、ハンドル16Cの回転開始直後の第0周期(時間0t〜8t)の回転総量8r(P24)に対応する回転をA軸モータ65が開始する時期は、時間16tとなる(P25)。   Based on the identified target position, the CPU 41 outputs a pulse signal to the A-axis drive controller 55 via the communication I / F 46 (P22). The A-axis drive control unit 55 outputs a pulse signal for rotating the A-axis motor 65 to the target position to the A-axis motor 65 (P23). That is, the A-axis drive control unit 55 outputs a pulse signal based on the total rotation amount 8r in the n-th cycle to the A-axis motor 65 during the next (n + 1) cycle. The A-axis motor 65 starts rotation in accordance with the pulse signal after inputting all the pulse signals. Therefore, a delay of 8t occurs after the CPU 41 outputs the pulse signal to the A-axis drive control unit 55 until the A-axis motor 65 starts rotating. For this reason, for example, the time when the A-axis motor 65 starts the rotation corresponding to the total rotation amount 8r (P24) of the 0th period (time 0t to 8t) immediately after the start of the rotation of the handle 16C is time 16t (P25).

CPU41はハンドル16Cの回転が時間32tで停止した時、第4周期(時間32t〜40t)の間の回転総量として0を、第4周期の終了時点で算出する。取得した回転総量0に基づき第二式を適用して算出する換算角度は、0である(P26)。該時、RAM43に記憶したA軸方向角度に換算角度を加算しても、A軸方向角度は変化しない。故に、更新後のA軸方向角度に基づいて特定するA軸モータ65の目標位置も変化しない。   When the rotation of the handle 16C stops at time 32t, the CPU 41 calculates 0 as the total rotation amount during the fourth period (time 32t to 40t) at the end of the fourth period. The conversion angle calculated by applying the second equation based on the acquired total rotation amount 0 is 0 (P26). At this time, even if the converted angle is added to the A-axis direction angle stored in the RAM 43, the A-axis direction angle does not change. Therefore, the target position of the A-axis motor 65 specified based on the updated A-axis direction angle does not change.

CPU41は該目標位置を示すパルス信号を、A軸駆動制御部55に出力する。A軸駆動制御部55は該目標位置迄A軸モータ65を回転する為のパルス信号を、第5周期(時間40t〜48t)の間にA軸モータ65に出力する。A軸モータ65は入力したパルス信号に対応する目標位置が変化しない為、目標位置迄回転した時回転を停止する。図5において、X軸モータは時間48tで回転を停止する(P27)。つまり、ハンドル16Cの回転が停止した時間32tから、A軸モータ65が回転を停止する時間48t迄、時間16t分遅延する。このように、A軸モータ65の回転停止迄の遅延は、モータ61〜64の回転停止迄の時間2t(図4参照)に比べて大きくなる。   The CPU 41 outputs a pulse signal indicating the target position to the A-axis drive control unit 55. The A-axis drive control unit 55 outputs a pulse signal for rotating the A-axis motor 65 to the target position to the A-axis motor 65 during the fifth period (time 40t to 48t). Since the target position corresponding to the input pulse signal does not change, the A-axis motor 65 stops rotating when rotated to the target position. In FIG. 5, the X-axis motor stops rotating at time 48t (P27). That is, the time 16t is delayed from the time 32t at which the rotation of the handle 16C is stopped to the time 48t at which the A-axis motor 65 stops rotating. As described above, the delay until the rotation of the A-axis motor 65 stops is longer than the time 2t (see FIG. 4) until the motors 61 to 64 stop rotating.

CPU41は本実施形態において、上記の遅延を小さくする為、回転量取得処理(図6参照)、メイン処理(図7参照)を実行する。CPU41は数値制御装置40の電源を投入するに応じ、ROM42に記憶したプログラムを実行する。これにより、CPU41は回転量取得処理、メイン処理を開始する。   In this embodiment, the CPU 41 executes a rotation amount acquisition process (see FIG. 6) and a main process (see FIG. 7) in order to reduce the delay. The CPU 41 executes the program stored in the ROM 42 when the numerical controller 40 is turned on. Thereby, the CPU 41 starts the rotation amount acquisition process and the main process.

<回転量取得処理>
図6を参照し回転量取得処理を説明する。CPU41は手動パルス発生器16のハンドル16Cが所定角度回転したか判定する(S51)。CPU41は手動パルス発生器16が回転量を出力していない時、ハンドル16Cが所定角度回転していないと判定する(S51:NO)。CPU41は処理をS51に戻す。CPU41は手動パルス発生器16が回転量を出力したと判定した時(S51:YES)、処理をS53に進める。CPU41は手動パルス発生器16が出力した回転量を取得する(S53)。CPU41は取得した回転量を、RAM43に記憶する。CPU41は処理をS51に戻す。
<Rotation amount acquisition process>
The rotation amount acquisition process will be described with reference to FIG. The CPU 41 determines whether the handle 16C of the manual pulse generator 16 has rotated by a predetermined angle (S51). When the manual pulse generator 16 does not output the rotation amount, the CPU 41 determines that the handle 16C is not rotated by a predetermined angle (S51: NO). CPU41 returns a process to S51. When it is determined that the manual pulse generator 16 has output the rotation amount (S51: YES), the CPU 41 advances the process to S53. The CPU 41 acquires the rotation amount output from the manual pulse generator 16 (S53). The CPU 41 stores the acquired rotation amount in the RAM 43. CPU41 returns a process to S51.

図7を参照しメイン処理を説明する。CPU41は軸スイッチ16Bにより選択した選択軸を取得する。CPU41は取得した選択軸がOFFの時、手動パルス発生器16による制御を行わない動作モード(以下、通常モードと称す。)と判定する(S61:NO)。該時、CPU41は処理をS61に戻す。CPU41は取得した選択軸がOFF以外の時、手動パルス発生器16による制御を行う動作モード(以下、ハンドルモードと称す。)と判定する(S61:YES)。該時、CPU41は処理をS63に進める。CPU41は選択軸がA軸であるか判定する(S63)。CPU41は選択軸がA軸以外と判定した時(S63:NO)、図4を参照して説明した処理(P11、P12、P14、P16等)を実行する。CPU41は処理をS61に戻す。尚、図4を参照して説明した処理は従来の処理と同様(回転総量に基づき、パルス信号を出力する)である為、図7に図示していない。CPU41は選択軸がA軸と判定した時(S63:YES)、処理をS65に進める。   The main process will be described with reference to FIG. The CPU 41 acquires the selected axis selected by the axis switch 16B. When the acquired selected axis is OFF, the CPU 41 determines that the operation mode (hereinafter referred to as the normal mode) in which control by the manual pulse generator 16 is not performed (S61: NO). At this time, the CPU 41 returns the process to S61. When the acquired selected axis is other than OFF, the CPU 41 determines that the operation mode (hereinafter referred to as the handle mode) in which the manual pulse generator 16 performs control (S61: YES). At this time, the CPU 41 advances the process to S63. The CPU 41 determines whether the selected axis is the A axis (S63). When the CPU 41 determines that the selected axis is other than the A axis (S63: NO), the CPU 41 executes the processing (P11, P12, P14, P16, etc.) described with reference to FIG. The CPU 41 returns the process to S61. The process described with reference to FIG. 4 is the same as the conventional process (outputs a pulse signal based on the total amount of rotation), and is not shown in FIG. When the CPU 41 determines that the selected axis is the A axis (S63: YES), the process proceeds to S65.

CPU41は時間8tの周期が到来したか判定する(S65)。CPU41は時間8tの周期が到来していないと判定した時(S65:NO)、処理をS61に戻す。CPU41は、時間8tの周期が到来したと判定した時(S65:YES)、処理をS67に進める。CP41はRAM43に記憶した回転量の総量を、回転総量として算出する(S67)。CPU41は回転総量の算出後、RAM43に記憶した回転量を削除する。これによりCPU41は、第n周期の間に取得したハンドル16Cの回転総量8rを、第n周期の終了時点で算出する。   The CPU 41 determines whether the period of time 8t has arrived (S65). When the CPU 41 determines that the period of time 8t has not arrived (S65: NO), it returns the process to S61. When the CPU 41 determines that the period of time 8t has arrived (S65: YES), the process proceeds to S67. The CP 41 calculates the total rotation amount stored in the RAM 43 as the total rotation amount (S67). After calculating the total rotation amount, the CPU 41 deletes the rotation amount stored in the RAM 43. As a result, the CPU 41 calculates the total rotation amount 8r of the handle 16C acquired during the nth cycle at the end of the nth cycle.

CPU41は第n周期でハンドル16Cが回転したかを、算出した回転総量に基づいて判定する(S69)。CPU41は算出した回転総量の絶対値が0より大きい時、第n周期でハンドル16Cが回転したと判定する(S69:YES)。該時、CPU41は処理をS71に進める。CPU41は倍率スイッチ16Aにより選択した選択倍率を取得する。CPU41は算出した回転総量、取得した選択倍率、単位角度に基づき、第二式を適用して換算角度を特定する。CPU41はRAM43に記憶したA軸方向角度に換算角度を加算し、A軸方向角度を更新する。CPU41は、原点角度から更新後のA軸方向角度迄被削材が回転した時のA軸モータ65の回転位置を、A軸モータ65の目標位置として特定する(S71)。CPU41は特定した目標位置に応じたパルス信号を、A軸駆動制御部55に出力する(S73)。CPU41は処理をS61に戻す。   The CPU 41 determines whether or not the handle 16C has rotated in the nth cycle based on the calculated total rotation amount (S69). When the absolute value of the calculated total rotation amount is greater than 0, the CPU 41 determines that the handle 16C has rotated in the nth cycle (S69: YES). At this time, the CPU 41 advances the process to S71. The CPU 41 acquires the selection magnification selected by the magnification switch 16A. The CPU 41 specifies the conversion angle by applying the second formula based on the calculated total rotation amount, the acquired selection magnification, and the unit angle. The CPU 41 adds the conversion angle to the A-axis direction angle stored in the RAM 43 and updates the A-axis direction angle. The CPU 41 specifies the rotational position of the A-axis motor 65 when the workpiece rotates from the origin angle to the updated A-axis direction angle as the target position of the A-axis motor 65 (S71). CPU41 outputs the pulse signal according to the specified target position to the A-axis drive control part 55 (S73). The CPU 41 returns the process to S61.

図8に示すように、CPU41は上記処理を周期8tで繰り返した時、ハンドル16Cが所定角度分回転する毎に、手動パルス発生器16から回転量を取得する(P31、図6参照)。CPU41は時間n×8tから(n+1)×8t迄の周期8t(第n周期)の間に取得したハンドル16Cの回転総量8rを、第n周期の終了時点で算出する(S67(図7参照))。CPU41は算出した回転総量8r、選択軸、選択倍率に基づき、第二式を適用して換算角度を算出する。CPU41は算出した換算角度に基づき、A軸モータ65の目標位置を特定する(S71(図7参照))。CPU41は特定した目標位置に応じたパルス信号を、通信I/F46を介してA軸駆動制御部55に出力する(P32、S73(図7参照))。   As shown in FIG. 8, when the CPU 41 repeats the above process at a cycle of 8t, the CPU 41 acquires the rotation amount from the manual pulse generator 16 every time the handle 16C rotates by a predetermined angle (see P31 and FIG. 6). The CPU 41 calculates the total rotation amount 8r of the handle 16C acquired during the period 8t (nth period) from the time n × 8t to (n + 1) × 8t at the end of the nth period (S67 (see FIG. 7)). ). The CPU 41 calculates the conversion angle by applying the second formula based on the calculated total rotation amount 8r, the selection axis, and the selection magnification. The CPU 41 specifies the target position of the A-axis motor 65 based on the calculated conversion angle (S71 (see FIG. 7)). CPU41 outputs the pulse signal according to the specified target position to A-axis drive control part 55 via communication I / F46 (P32, S73 (refer FIG. 7)).

A軸駆動制御部55はA軸モータ65が目標位置迄回転する為パルス信号を、A軸モータ65に出力する(P33)。図5の時と同様、A軸駆動制御部55は第n周期の回転総量8rに基づくパルス信号を、次の第(n+1)周期の間にA軸モータ65に出力する。故に、CPU41がパルス信号をA軸駆動制御部55に出力してから(P34)、A軸モータ65が該パルス信号に応じた回転を開始する(P35)迄に、周期8t分の遅延が生じる。   The A-axis drive control unit 55 outputs a pulse signal to the A-axis motor 65 because the A-axis motor 65 rotates to the target position (P33). As in the case of FIG. 5, the A-axis drive control unit 55 outputs a pulse signal based on the total rotation amount 8r in the nth cycle to the A-axis motor 65 during the next (n + 1) th cycle. Therefore, a delay of 8t occurs after the CPU 41 outputs the pulse signal to the A-axis drive controller 55 (P34) and before the A-axis motor 65 starts to rotate according to the pulse signal (P35). .

図7に示すように、CPU41は算出した回転総量の絶対値が0の時、第n周期でハンドル16Cが所定角度以上回転していないと判定する(S69:NO)。該時、CPU41は処理をS75に進める。CPU41はA軸モータ65の回転を停止する停止信号を、A軸駆動制御部55に出力する(S75)。   As shown in FIG. 7, when the absolute value of the calculated total rotation amount is 0, the CPU 41 determines that the handle 16C has not rotated more than a predetermined angle in the nth cycle (S69: NO). At this time, the CPU 41 advances the process to S75. The CPU 41 outputs a stop signal for stopping the rotation of the A-axis motor 65 to the A-axis drive control unit 55 (S75).

図8に示すように、CPU41は時間t40で停止信号をA軸駆動制御部55に出力した時(P36)、A軸駆動制御部55は停止信号を、時間t40でA軸モータ65に出力する(P37)。つまり、第4周期(時間t32〜t40)の終了時、言い換えれば、次の第5周期(時間t40〜t48)の開始時にCPU41が出力した停止信号(P36)は、略同時期にA軸駆動制御部55からA軸モータ65に出力する(P37)。A軸モータ65はA軸駆動制御部55が出力した停止信号を検出した時、A軸モータ65の回転を停止する(P38)。故に、CPU41が停止信号をA軸駆動制御部55に出力してから、A軸モータ65が回転を停止する迄の遅延は略0になる(P36、P37、P38参照)。該時、ハンドル16Cの回転が停止した時間32tから、A軸モータ65が回転を停止する時間40t迄、時間8t分遅延する。このように、A軸モータ65の回転停止迄の遅延は、CPU41が停止信号を出力しない図5の時の遅延時間16tと比べて、小さくなる。   As shown in FIG. 8, when the CPU 41 outputs a stop signal to the A-axis drive control unit 55 at time t40 (P36), the A-axis drive control unit 55 outputs a stop signal to the A-axis motor 65 at time t40. (P37). That is, the stop signal (P36) output by the CPU 41 at the end of the fourth period (time t32 to t40), in other words, at the start of the next fifth period (time t40 to t48) is A-axis driven substantially simultaneously. It outputs to the A-axis motor 65 from the control part 55 (P37). When the A-axis motor 65 detects the stop signal output by the A-axis drive control unit 55, the A-axis motor 65 stops the rotation of the A-axis motor 65 (P38). Therefore, the delay from when the CPU 41 outputs a stop signal to the A-axis drive control unit 55 until the A-axis motor 65 stops rotating is substantially zero (see P36, P37, and P38). At this time, there is a delay of time 8t from the time 32t when the rotation of the handle 16C stops until the time 40t when the A-axis motor 65 stops rotating. Thus, the delay until the rotation of the A-axis motor 65 stops is smaller than the delay time 16t in FIG. 5 in which the CPU 41 does not output a stop signal.

図7に示すように、CPU41はA軸駆動制御部55に停止信号を出力した(S75)後、停止したA軸モータ65の回転位置(以下、停止位置と称す。)を、エンコーダ75を介して取得する(S77)。CPU41は原点角度におけるA軸モータ65の回転位置(以下、基準位置と称す。)を基準としてA軸モータ65が単位角度分ずつ回転したときの夫々の回転位置(以下、単位位置と称す。)を特定する。単位角度は、選択倍率と単位角度を乗算した値である。複数の単位位置は夫々、基準位置に対して等間隔に配列される。   As shown in FIG. 7, the CPU 41 outputs a stop signal to the A-axis drive control unit 55 (S 75), and then the rotation position (hereinafter referred to as stop position) of the stopped A-axis motor 65 via the encoder 75. (S77). The CPU 41 uses the rotational position of the A-axis motor 65 at the origin angle (hereinafter referred to as a reference position) as a reference to each rotational position (hereinafter referred to as a unit position) when the A-axis motor 65 rotates by a unit angle. Is identified. The unit angle is a value obtained by multiplying the selection magnification and the unit angle. The plurality of unit positions are arranged at regular intervals with respect to the reference position.

例えば図8に示すように、選択倍率が×100の時、複数の単位位置は夫々、A軸モータ65が基準位置(原点角度0度)から正負両側に0.1度(=0.001度×100倍)ずつ回転した時の回転位置(±0.1度、±0.2度、±0.3度・・・)に対応する。尚、図8では、説明を容易とする為、A軸モータ65により回転するA軸台20を図示してA軸モータ65の回転位置を説明する。   For example, as shown in FIG. 8, when the selection magnification is x100, the plurality of unit positions are respectively 0.1 degrees (= 0.001 degrees) on both sides of the A-axis motor 65 from the reference position (origin angle 0 degree). Corresponds to the rotation position (± 0.1 degree, ± 0.2 degree, ± 0.3 degree...) When rotated by (× 100 times). In FIG. 8, for ease of explanation, the rotational position of the A-axis motor 65 will be described with the A-axis base 20 rotated by the A-axis motor 65.

図7に示すように、CPU41はハンドル16Cの正方向の回転が停止した時、複数の単位位置のうち停止位置に対して正方向に最も近接する単位位置を、近接単位位置として特定する(S79)。CPU41はハンドル16Cの負方向の回転が停止した時、複数の単位位置のうち停止位置に対して負方向に最も近接する単位位置を、近接単位位置として特定する(S79)。つまり、CPU41は複数の単位位置のうち、停止前のA軸モータ65の回転方向と同一方向にA軸モータ65が回転したときに到達する最も近い位置を、近接単位位置として特定する。CPU41は停止位置から近接単位位置迄A軸モータ65を回転する為に、近接単位位置を示すパルス信号をA軸駆動制御部55に出力する(S81)。CPU41は処理をS61に戻す。   As shown in FIG. 7, when the rotation of the handle 16C in the forward direction stops, the CPU 41 specifies the unit position closest to the stop position in the forward direction as the proximity unit position among the plurality of unit positions (S79). ). When the rotation of the handle 16C in the negative direction stops, the CPU 41 identifies the unit position closest to the stop position in the negative direction as the proximity unit position among the plurality of unit positions (S79). That is, the CPU 41 specifies the closest position that is reached when the A-axis motor 65 rotates in the same direction as the rotation direction of the A-axis motor 65 before stopping, among the plurality of unit positions, as the proximity unit position. In order to rotate the A-axis motor 65 from the stop position to the proximity unit position, the CPU 41 outputs a pulse signal indicating the proximity unit position to the A-axis drive control unit 55 (S81). The CPU 41 returns the process to S61.

図8において、ハンドル16Cの回転に応じてA軸モータ65が原点角度(P51)から停止位置0.18度(P52)迄正方向に回転し、停止位置(P52)で停止信号によりA軸モータ65が回転を停止した時を例示する。選択倍率は×100とする。該時、CPU41は複数の単位位置(±0.1度、±0.2度、±0.3度・・・)のうち停止位置0.18度から正方向に近接する単位位置0.2度を、近接単位位置として特定する(S79)。CPU41は近接単位位置を示すパルス信号を、時間t42にA軸駆動制御部55に出力する(P39、S81(図7参照))。該時、A軸駆動制御部55はA軸モータ65が停止位置0.18度から近接単位位置0.2度迄正方向に回転する為のパルス信号を、周期8t(時間42t〜50t)の間にA軸モータ65に出力する(P40)。A軸モータ65はパルス信号を全て入力した後、該パルス信号に応じた回転を開始する(P41)。A軸モータ65は近接単位位置0.2度(P53)迄正方向に0.02度回転し、回転を停止する(P42)。   In FIG. 8, the A-axis motor 65 rotates in the positive direction from the origin angle (P51) to the stop position 0.18 degrees (P52) in accordance with the rotation of the handle 16C, and the A-axis motor is received by the stop signal at the stop position (P52). The time when 65 stops rotation is illustrated. The selection magnification is x100. At this time, the CPU 41 has a unit position 0.2 of the plurality of unit positions (± 0.1 degrees, ± 0.2 degrees, ± 0.3 degrees,...) Close to the stop position 0.18 degrees in the positive direction. The degree is specified as the proximity unit position (S79). The CPU 41 outputs a pulse signal indicating the proximity unit position to the A-axis drive control unit 55 at time t42 (P39, S81 (see FIG. 7)). At this time, the A-axis drive control unit 55 generates a pulse signal for rotating the A-axis motor 65 in the positive direction from the stop position 0.18 degrees to the proximity unit position 0.2 degrees in a cycle of 8t (time 42t to 50t). In the meantime, it is output to the A-axis motor 65 (P40). After inputting all the pulse signals, the A-axis motor 65 starts to rotate according to the pulse signals (P41). The A-axis motor 65 rotates 0.02 degree in the forward direction to the proximity unit position 0.2 degree (P53) and stops rotating (P42).

<本実施形態の主たる作用、効果>
数値制御装置40のCPU41は第n周期の間における手動パルス発生器16のハンドル16Cに対する回転総量の絶対値が0より大きい時(S69:YES)、回転総量に応じた目標位置を特定する(S71)。CPU41は目標位置に応じたパルス信号を、A軸駆動制御部55に出力する(S73、P32)。A軸駆動制御部55は目標位置迄A軸モータ65を回転する為にパルス信号を第(n+1)周期の間出力する(P33)。A軸モータ65は第(n+2)周期の開始時点から、該パルス信号に応じた回転を開始する(P35)。CPU41は、操作総量の絶対値が0以下の時(S69:NO)、第(n+1)周期の開始時に停止信号をA軸駆動制御部55に出力する(S75、P36)。A軸駆動制御部55は停止信号に応じ、A軸モータ65の回転を第(n+1)周期の開始時点で停止する(P37、P38)。故に、数値制御装置40は、ハンドル16Cの回転が停止した時にA軸モータ65を短時間で停止できる。
<Main functions and effects of this embodiment>
When the absolute value of the total rotation amount with respect to the handle 16C of the manual pulse generator 16 during the nth period is larger than 0 (S69: YES), the CPU 41 of the numerical controller 40 specifies a target position according to the total rotation amount (S71). ). The CPU 41 outputs a pulse signal corresponding to the target position to the A-axis drive control unit 55 (S73, P32). The A-axis drive controller 55 outputs a pulse signal for the (n + 1) -th cycle in order to rotate the A-axis motor 65 to the target position (P33). The A-axis motor 65 starts rotating in accordance with the pulse signal from the start point of the (n + 2) -th cycle (P35). When the absolute value of the total operation amount is 0 or less (S69: NO), the CPU 41 outputs a stop signal to the A-axis drive control unit 55 at the start of the (n + 1) period (S75, P36). In response to the stop signal, the A-axis drive control unit 55 stops the rotation of the A-axis motor 65 at the start of the (n + 1) -th cycle (P37, P38). Therefore, the numerical controller 40 can stop the A-axis motor 65 in a short time when the rotation of the handle 16C stops.

使用者はハンドル16Cの回転を停止した時、倍率スイッチ16Aで設定した選択倍率に応じた複数の単位位置の何れかでA軸モータ65が停止することを所望する。複数の単位位置の何れかでA軸モータ65が停止しない時、使用者は最終的に複数の単位位置の何れか迄A軸モータ65を回転する為に倍率スイッチ16Aを再設定する必要がある。これに対し、CPU41はA軸駆動制御部55に停止信号を出力した(S75)後で停止位置を取得する(S77)。CPU41は複数の単位位置のうち停止位置に近接する位置を、近接単位位置として特定する(S79)。CPU41は停止位置から近接単位位置迄A軸モータ65を回転する為に、近接単位位置を示すパルス信号をA軸駆動制御部55に出力する(S81)。A軸モータ65は停止信号に応じて回転停止した後、近接単位位置迄回転する(P41)。該時、使用者はハンドル16Cの回転を再開して最終的に複数の単位位置の何れか迄A軸モータ65を回転する時、倍率スイッチ16Aの再設定が不要となる。故に、使用者は容易に作業を再開できる。   When the user stops the rotation of the handle 16C, the user desires that the A-axis motor 65 stops at any one of a plurality of unit positions corresponding to the selection magnification set by the magnification switch 16A. When the A-axis motor 65 does not stop at any one of the plurality of unit positions, the user needs to reset the magnification switch 16A to finally rotate the A-axis motor 65 to any one of the plurality of unit positions. . On the other hand, the CPU 41 outputs a stop signal to the A-axis drive control unit 55 (S75), and acquires the stop position (S77). The CPU 41 specifies a position close to the stop position among the plurality of unit positions as the proximity unit position (S79). In order to rotate the A-axis motor 65 from the stop position to the proximity unit position, the CPU 41 outputs a pulse signal indicating the proximity unit position to the A-axis drive control unit 55 (S81). The A-axis motor 65 stops rotating in response to the stop signal, and then rotates to the proximity unit position (P41). At this time, when the user restarts the rotation of the handle 16C and finally rotates the A-axis motor 65 to any one of the plurality of unit positions, the resetting of the magnification switch 16A becomes unnecessary. Therefore, the user can easily resume the work.

CPU41は複数の単位位置のうち、停止前のA軸モータ65の回転方向と同一方向にA軸モータ65が回転したときに到達する最も近い位置を、近接単位位置として特定する(S79)。該時、A軸モータ65の回転方向は、停止前と停止後とで一致する。故に、使用者は停止後に手動パルス発生器を用いた段取り作業などを効率的に再開できる。   The CPU 41 specifies, as a proximity unit position, the closest position reached when the A-axis motor 65 rotates in the same direction as the rotation direction of the A-axis motor 65 before stopping, among the plurality of unit positions (S79). At this time, the rotation direction of the A-axis motor 65 is the same before and after the stop. Therefore, the user can efficiently restart the setup work using the manual pulse generator after the stop.

手動パルス発生器16はダイヤル式のハンドル16Cを備える。該時、CPU41はハンドル16Cの回転操作に応じてモータ61〜65の回転を制御できる。又、CPU41は所定周期の間のハンドル16Cの回転総量の絶対値が0の時、モータ61〜65の回転を停止する。故に、CPU41は使用者がハンドル16Cの回転を停止した時、モータ61〜65の回転を停止できる。   The manual pulse generator 16 includes a dial type handle 16C. At this time, the CPU 41 can control the rotation of the motors 61 to 65 in accordance with the rotation operation of the handle 16C. Further, the CPU 41 stops the rotation of the motors 61 to 65 when the absolute value of the total rotation amount of the handle 16C during a predetermined period is 0. Therefore, the CPU 41 can stop the rotation of the motors 61 to 65 when the user stops the rotation of the handle 16C.

<変形例>
本発明は上記実施形態に限らない。駆動回路51〜54、A軸駆動制御部55が夫々モータ61〜65にパルス信号を送信する為に必要な時間t、8tは一例であり、他の値でもよい。CPU41はS67で算出した回転総量の絶対値が、0よりも大きい所定閾値(例えは、1、2等)よりも大きい時、第n周期でハンドル16Cが回転したと判定してもよい。
<Modification>
The present invention is not limited to the above embodiment. The times t and 8t necessary for the drive circuits 51 to 54 and the A-axis drive control unit 55 to transmit pulse signals to the motors 61 to 65 are examples, and other values may be used. The CPU 41 may determine that the handle 16C has rotated in the nth period when the absolute value of the total rotation amount calculated in S67 is greater than a predetermined threshold value (eg, 1, 2, etc.) greater than 0.

数値制御装置40はモータ61〜65の少なくとも何れかを、A軸駆動制御部55と同じ方法で駆動する駆動制御部で駆動してもよい。該時、CPU41は該駆動制御部で駆動するモータ61〜65の何れかを、図7で示すメイン処理を実行することで制御してもよい。手動パルス発生器16はハンドル16Cの代わりに、ダイヤル式以外の入力機器を有してもよい。手動パルス発生器16は正方向と負方向に対応する2つのボタンを有してもよい。手動パルス発生器16は該ボタンの押下時間に応じた回転量を数値制御装置40に出力してもよい。CPU41が回転総量を算出する周期と、A軸駆動制御部55がA軸モータ65にパルス信号を出力する為に必要な時間は相違してもよい。   The numerical control device 40 may drive at least one of the motors 61 to 65 by a drive control unit that drives in the same manner as the A-axis drive control unit 55. At this time, the CPU 41 may control any of the motors 61 to 65 driven by the drive control unit by executing a main process shown in FIG. The manual pulse generator 16 may have an input device other than the dial type instead of the handle 16C. The manual pulse generator 16 may have two buttons corresponding to the positive direction and the negative direction. The manual pulse generator 16 may output a rotation amount corresponding to the button pressing time to the numerical controller 40. The period in which the CPU 41 calculates the total rotation amount and the time required for the A-axis drive control unit 55 to output a pulse signal to the A-axis motor 65 may be different.

選択倍率は常に所定倍率(例えば1倍)でもよい。該時、手動パルス発生器16は倍率スイッチ16Aを有さなくてもよい。CPU41は停止信号によるA軸モータ65の停止後、複数の単位位置のうち2番目、3番目に近い位置迄A軸モータ65を回転してもよい。つまり、停止信号により停止したA軸モータ65の回転を再開した時の最終的な回転位置は、複数の単位位置のうち停止状態のA軸モータ65の回転位置から最も近い単位位置でなくてもよい。   The selection magnification may always be a predetermined magnification (for example, 1 time). At this time, the manual pulse generator 16 may not have the magnification switch 16A. After stopping the A-axis motor 65 by the stop signal, the CPU 41 may rotate the A-axis motor 65 to the second and third closest positions among the plurality of unit positions. That is, the final rotation position when the rotation of the A-axis motor 65 stopped by the stop signal is restarted may not be the unit position closest to the rotation position of the stopped A-axis motor 65 among the plurality of unit positions. Good.

CPU41は複数の単位位置のうち、A軸モータ65の停止前の回転方向と逆方向にA軸モータ65が回転したときに到達する最も近い位置を、近接単位位置として特定してもよい。該時、A軸モータ65の回転方向は、停止前と停止後とで相違する。CPU41は、回転再開後のA軸モータ65の位置が、停止前のA軸モータ65の位置よりも先に進むことを抑制できる。   The CPU 41 may specify the closest position reached when the A-axis motor 65 rotates in the direction opposite to the rotation direction before the A-axis motor 65 stops among the plurality of unit positions as the proximity unit position. At this time, the rotation direction of the A-axis motor 65 is different between before and after the stop. The CPU 41 can prevent the position of the A-axis motor 65 after resuming rotation from proceeding further than the position of the A-axis motor 65 before stopping.

<その他>
手動パルス発生器16のハンドル16Cは本発明の第一入力部の一例である。手動パルス発生器16の倍率スイッチ16Aは本発明の第二入力部の一例である。ハンドル16Cの回転量は本発明の操作量の一例である。回転総量は本発明の操作総量の一例である。S65の処理を行うCPU41は本発明の第一取得手段の一例である。S69の処理を行うCPU41は本発明の判定処理の一例である。S71の処理を行うCPU41は本発明の第一特定手段の一例である。冶具200は本発明のステージの一例である。P33の処理を行うA軸駆動制御部55は本発明の第一出力手段の一例である。P37の処理を行うA軸駆動制御部55は本発明の第二出力手段の一例である。S77の処理を行うCPU41は本発明の第二取得手段の一例である。S79の処理を行うCPU41は本発明の第二特定手段の一例である。P40の処理を行うA軸駆動制御部55は本発明の第三出力手段の一例である。
<Others>
The handle 16C of the manual pulse generator 16 is an example of the first input unit of the present invention. The magnification switch 16A of the manual pulse generator 16 is an example of the second input unit of the present invention. The rotation amount of the handle 16C is an example of the operation amount of the present invention. The total rotation amount is an example of the total operation amount of the present invention. The CPU 41 that performs the process of S65 is an example of a first acquisition unit of the present invention. The CPU 41 that performs the process of S69 is an example of the determination process of the present invention. The CPU 41 that performs the process of S71 is an example of a first specifying unit of the present invention. The jig 200 is an example of the stage of the present invention. The A-axis drive control unit 55 that performs the process of P33 is an example of the first output means of the present invention. The A-axis drive control unit 55 that performs the process of P37 is an example of the second output means of the present invention. The CPU 41 that performs the process of S77 is an example of a second acquisition unit of the present invention. The CPU 41 that performs the process of S79 is an example of the second specifying means of the present invention. The A-axis drive control unit 55 that performs the process of P40 is an example of a third output unit of the present invention.

1 :工作機械
16 :手動パルス発生器
16A :倍率スイッチ
16B :軸スイッチ
16C :ハンドル
40 :数値制御装置
41 :CPU
1: Machine tool 16: Manual pulse generator 16A: Magnification switch 16B: Axis switch 16C: Handle 40: Numerical control device 41: CPU

Claims (6)

第一入力部に対する操作量の、所定周期毎の総量である操作総量を取得する第一取得手段と、
前記第一取得手段によって第n周期(nは整数)の間に取得した前記操作総量が、所定閾値よりも大きいか判定する判定手段と、
前記判定手段によって前記操作総量が前記所定閾値よりも大きいと判定した時、前記操作総量に基づいて目標位置を特定する第一特定手段と、
ステージを移動する為のサーボモータを、前記第一特定手段によって特定した前記目標位置迄回転する為の第一駆動信号を、第(n+1)周期の間に出力する第一出力手段と、
前記判定手段によって前記操作量が前記所定閾値以下と判定した時、前記サーボモータの回転を停止する為の停止信号を、第(n+1)周期の開始時に出力する第二出力手段と
を備えたことを特徴とする数値制御装置。
A first acquisition means for acquiring a total operation amount that is a total amount for each predetermined period of the operation amount for the first input unit;
Determination means for determining whether the total operation amount acquired during the nth period (n is an integer) by the first acquisition means is greater than a predetermined threshold;
First determination means for specifying a target position based on the total operation amount when the determination unit determines that the total operation amount is larger than the predetermined threshold;
First output means for outputting a first drive signal for rotating a servo motor for moving the stage to the target position specified by the first specifying means during the (n + 1) period;
A second output means for outputting a stop signal for stopping the rotation of the servo motor at the start of the (n + 1) period when the operation amount is determined to be equal to or less than the predetermined threshold by the determination means; A numerical control device characterized by.
前記第一特定手段は、
第二入力部を介して設定する倍率と前記操作総量とを乗算した値に基づいて前記目標位置を特定し、
前記第二出力手段によって前記停止信号を出力することに応じて停止した前記サーボモータの停止位置を取得する第二取得手段と、
前記倍率に対応し且つ等間隔に配列する複数の単位位置のうち、前記第二取得手段によって取得した前記停止位置に近接する近接単位位置を特定する第二特定手段と、
前記第二取得手段によって取得した前記停止位置から、前記第二特定手段によって特定した前記近接単位位置迄前記サーボモータを回転する為の第二駆動信号を、前記第二出力手段によって前記停止信号を出力した後に出力する第三出力手段と
を備えたことを特徴とする請求項1に記載の数値制御装置。
The first specifying means includes
Specifying the target position based on a value obtained by multiplying the operation total amount by the magnification set through the second input unit;
Second acquisition means for acquiring a stop position of the servo motor stopped in response to outputting the stop signal by the second output means;
Among a plurality of unit positions corresponding to the magnification and arranged at equal intervals, second specifying means for specifying a proximity unit position close to the stop position acquired by the second acquisition means;
A second drive signal for rotating the servo motor from the stop position acquired by the second acquisition means to the proximity unit position specified by the second specification means, and the stop signal by the second output means. The numerical control device according to claim 1, further comprising third output means for outputting after outputting.
前記近接単位位置は、
前記停止信号に応じて停止した前記サーボモータの位置に対し、停止前の回転方向と同一方向に前記サーボモータが回転した時に到達する位置であることを特徴とする請求項2に記載の数値制御装置。
The proximity unit position is
3. The numerical control according to claim 2, wherein the position is reached when the servo motor rotates in the same direction as the rotation direction before the stop with respect to the position of the servo motor stopped according to the stop signal. apparatus.
前記近接単位位置は、
前記停止信号に応じて停止した前記サーボモータの位置に対し、停止前の回転方向と逆方向に前記サーボモータが回転した時に到達する位置であることを特徴とする請求項2に記載の数値制御装置。
The proximity unit position is
3. The numerical control according to claim 2, wherein the position is reached when the servo motor rotates in a direction opposite to a rotation direction before the stop with respect to a position of the servo motor stopped according to the stop signal. apparatus.
前記第一入力部は、回転操作可能なハンドルであり、
前記操作量は、前記ハンドルの回転量であることを特徴とする請求項1から4の何れかに記載の数値制御装置。
The first input unit is a handle that can be rotated,
The numerical control device according to claim 1, wherein the operation amount is a rotation amount of the handle.
前記所定閾値は0であることを特徴とする請求項1から5の何れかに記載の数値制御装置。   The numerical control apparatus according to claim 1, wherein the predetermined threshold is 0.
JP2016129662A 2016-06-30 2016-06-30 Numerical control device Active JP6729078B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016129662A JP6729078B2 (en) 2016-06-30 2016-06-30 Numerical control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016129662A JP6729078B2 (en) 2016-06-30 2016-06-30 Numerical control device

Publications (2)

Publication Number Publication Date
JP2018005440A true JP2018005440A (en) 2018-01-11
JP6729078B2 JP6729078B2 (en) 2020-07-22

Family

ID=60949303

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016129662A Active JP6729078B2 (en) 2016-06-30 2016-06-30 Numerical control device

Country Status (1)

Country Link
JP (1) JP6729078B2 (en)

Also Published As

Publication number Publication date
JP6729078B2 (en) 2020-07-22

Similar Documents

Publication Publication Date Title
JP5333938B2 (en) Industrial equipment and machine tools
US9897991B2 (en) Machine tool
JP6398254B2 (en) Numerical control device and control method of numerical control device
JP6651815B2 (en) Numerical control device and control method of numerical control device
US7292913B2 (en) Articulated robot
JP2006227886A (en) Servo-control device and method for adjusting servo system
JP2019063914A (en) On-machine measurement method for machine tool and control device
JPWO2017168727A1 (en) Work measuring device and machine tool
JP6400095B2 (en) Machine tool controller
JP2007213238A (en) Numerical control method
JP6729078B2 (en) Numerical control device
JP2016085650A (en) Numeral control device and control method
JP2018183866A (en) Machine tool
JP6028573B2 (en) Control system, machine tool, servo motor control device, and position information transmission / reception method
JP2015041221A (en) Control device for machine tool
KR102371475B1 (en) Control method and control appratus for tool machine inlcuding rotary table
JP5110021B2 (en) Numerical control device for machine tools
US11577381B2 (en) Teaching apparatus, robot system, and teaching program
JP6471446B2 (en) Robot operation device, robot system, and robot operation program
JP2003202909A (en) Origin return device
JP3076466B2 (en) General-purpose milling machine
JP2006072909A (en) Numeric controller
JP2002108425A (en) Control parameter setting device for machining device and machining device
JP6730365B2 (en) Axial feeder
JP7167811B2 (en) Machine tool, information processing method and computer program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190322

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200602

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200615

R150 Certificate of patent or registration of utility model

Ref document number: 6729078

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150