MACHINE TOOL CONTROLLER

A machine tool controller including a storage unit configured to store three-dimensional basic shape data, a region setting unit that creates a collision detection region of an auxiliary mechanism and sets the collision detection region, and an input unit to which an operator inputs a setting value for a plurality of setting items for determining positions of a plurality of boundary surfaces of the collision detection region, where the plurality of setting items includes at least one non-essential item for which input of the setting value is not mandatory, the region setting unit sets the collision detection region based on the setting value input through the input unit, and, when there is an un-input item as the non-essential item, the region setting unit sets at least one of the boundary surfaces to be determined by the un-input item at an edge of the predetermined setting region.

TECHNICAL FIELD

The present invention relates to a machine tool controller.

BACKGROUND

Auxiliary mechanisms such as a fixture for fixing a workpiece to a table and an additional axis table for changing the orientation of the workpiece relative to the table are installed on the table of a machine tool. In order to prevent unintended collision between the auxiliary mechanisms and the tool during operation of the machine tool, there is a known machine tool controller that has a function for detecting collision between the tool and the auxiliary mechanisms (for example, see Japanese Unexamined Patent Application, Publication No. H08-115117 and Japanese Unexamined Patent Application, Publication No. 2006-102923). According to Japanese Unexamined Patent Application, Publication No. H08-115117 and Japanese Unexamined Patent Application, Publication No. 2006-102923, collision regions of the auxiliary mechanisms and the tool are set by using three-dimensional data of the auxiliary mechanisms and the tool, movements of the auxiliary mechanisms and the tool are simulated, and it is checked whether or not the collision regions interfere with each other.

SUMMARY

An aspect of the present disclosure provides a machine tool controller that has a function for detecting collision between a tool and an auxiliary mechanism on a table, the controller including: a storage unit configured to store three-dimensional basic shape data; a region setting unit that creates a collision detection region of the auxiliary mechanism based on the basic shape data and sets the collision detection region within a predetermined setting region encompassing the auxiliary mechanism; and an input unit to which an operator inputs a setting value for a plurality of setting items for determining positions of a plurality of boundary surfaces of the collision detection region, wherein the plurality of setting items include at least one non-essential item for which input of the setting value is not mandatory, the region setting unit sets the collision detection region based on the setting value input through the input unit, and when there is an un-input item, which is the non-essential item for which no setting value is input, the region setting unit sets at least one of the boundary surfaces to be determined by the un-input item at an edge of the predetermined setting region.

DETAILED DESCRIPTION OF EMBODIMENTS

Shapes and dimensions of auxiliary mechanisms being used may differ from each user. Furthermore, even with the same auxiliary mechanism, the installation directions and the installation positions may differ from each user. Thus, setting the collision region takes time and is inconvenient.

A machine tool10and a controller1therefor according to an embodiment will be described with reference to the drawings.

As illustrated inFIG.1, the machine tool10is equipped with a spindle3that holds a tool2, a table4on which a workpiece W is placed, a spindle motor5that rotates the spindle3, a Z-axis feed motor6that moves the spindle3in the Z direction relative to the table4, an X-axis feed motor7and a Y-axis feed motor8that respectively move the table4in the X direction and the Y direction relative to the spindle3, and a numerical controller1that controls the motors5,6,7, and8.

The Z direction is a direction along the longitudinal axis of the tool2held by the spindle3. The X and Y directions are directions orthogonal to the longitudinal axis of the tool2held by the spindle3, and are orthogonal to each other. In the machine tool10illustrated inFIG.1, the Z direction is a vertical direction, and the X and Y directions are horizontal directions.

The spindle3is arranged in the vertical direction and is supported by a supporting mechanism (not illustrated in the drawings) so as to be movable in the vertical direction. The tool2is held at the lower end portion of the spindle3so as to be coaxial with the spindle3and rotates and moves together with the spindle3.

The table4is horizontally arranged under the spindle3. An auxiliary mechanism9that holds the workpiece W is installed on a mounting surface4a, which is an upper surface, of the table4. Examples of the auxiliary mechanism9include a fixture that fixes the workpiece W to the table4and an additional axis table that changes the orientation of the workpiece W relative to the table4.

The feed motors6,7, and8are servo motors. The feed motors7and8move the table4in the X direction and the Y direction and thereby move the tool2in the X direction and the Y direction relative to the table4within a predetermined motion range. For example, the motion range in the X direction is between two ends of the table4in the X direction, and the motion range in the Y direction is between two ends of the table4in the Y direction.

The controller1is equipped with a storage unit11, an input unit12, and a control unit13.

The storage unit11has a RAM, a ROM, or any other desired storage devices.

The input unit12has a touch panel, a mouse, a keyboard, or the like. The operator can perform various input operations to the controller1through the input unit12.

During automatic operation, the control unit13sends control commands based on a machining program stored in the storage unit11to the motors5,6,7, and8and thereby controls the movements of the spindle3and the table4. During manual operation, the control unit13sends, to the motors5,6,7, and8, control commands based on inputs made by the operator through an operation input device (not illustrated) and thereby controls the movements of the spindle3and the table4. The control unit13is realized by at least one processor, such as a central processing unit, built in the controller1.

Furthermore, the controller1is equipped with a region setting unit14and a collision detection unit15as the functions that detect collision between the tool2and the auxiliary mechanisms9during automatic or manual operation of the machine tool10. The region setting unit14and the collision detection unit15are realized by processors as the control unit13is.

In order to detect collision, as illustrated inFIGS.2and3, a collision detection region A of the auxiliary mechanisms9is set within a predetermined setting region P. The setting region P is a three-dimensional region that encompasses the auxiliary mechanism9and that is pre-set in the controller1, and is, for example, a motion range of the tool2. The collision detection region A is constituted by a single region or a combination of multiple partial regions A1, A2, and A3. The single region and the partial regions A1, A2, and A3each have a simple shape such as a rectangular parallelepiped shape or a cylinder shape.

FIGS.2and3illustrate an example of the collision detection region A when the auxiliary mechanism9is an additional two-axes table arranged parallel to the X direction. The additional two-axes table9has a rotary table9aand two motor units9b, and the rotary table9acan rotate about a tilting axis B parallel to the X direction and about a rotary axis C, which is the center axis of the rotary table9a.

The storage unit11stores multiple sets of three-dimensional basic shape data for creating the collision detection region A. The multiple sets of basic shape data involve shapes different from one another, and each set of basic shape data is constituted by a combination of simple shapes such as a rectangular parallelepiped shape and a cylinder shape.

The operator can select the basic shape data to use for the collision detection region A through the input unit12. In the case of the collision detection region A illustrated inFIGS.2and3, the basic shape data constituted by three rectangular parallelepiped shapes corresponding to the three partial regions A1, A2, and A3is selected.

For example, each set of basic shape data is associated with at least one type of auxiliary mechanism9. Specifically, the basic shape data constituted by three rectangular parallelepiped shapes is associated with an additional two-axes table. The operator selects the auxiliary mechanism9to use from a list of types of the auxiliary mechanisms9displayed on the setting screen of the controller1. Once an auxiliary mechanism9is selected, at least one set of basic shape data associated with the selected auxiliary mechanism9is displayed on the setting screen. The operator selects, through the input unit12, one set of data from among the basic shape data displayed on the screen.

In order to define the collision detection region A, it is necessary to determine the positions of boundary surfaces that define the collision detection region A. The operator can input, to the input unit12, setting values of multiple setting items for determining the positions of the boundary surfaces. In the example illustrated inFIGS.2and3, the collision detection region A is defined by nineteen boundary surfaces a, b, . . . , m, and n, and in order to determine the positions of the boundary surfaces a, b, . . . , m, and n, sixteen setting items 1 to 16 are provided.

The setting items 1 to 3 are the XYZ coordinates (Bx, By, Bz) of the position of the tilting axis B at one side surface of the rotary table9a.

The setting item 4 is the X coordinate xj of the other side surface of the rotary table9a.

The setting item 13 is the width Δgh between the boundary surfaces h and g, and the setting item 14 is the width Δij between the boundary surfaces i and j.

The setting items 15 and 16 are, respectively, the distances Δm and Δn from the mounting surface4ato the boundary surfaces m and n, respectively.

For example, the input unit12is an operator's panel that has a numeric key pad, and the operator uses the numeric key pad to input the setting values to the input unit12. When the input unit12has a touch panel, the operator may input the setting values by touch by moving the positions of the boundary surfaces of the basic shape data displayed on the touch panel to the positions corresponding to the shape and dimensions of the auxiliary mechanism9to be used. When the input unit12has a voice-input device such as a microphone, the setting values may be input via the voice of the operator.

The multiple setting items include essential items that require the operator to input setting values, and at least one non-essential item that does not require the operator to input a setting value.

Examples of the non-essential item are items Δc, Δd, Δe, Δf, Δgh, and Δij for determining the positions of the boundary surfaces c, d, e, f, g, and i of the partial regions A2and A3that encompass the stationary portions9bof the auxiliary mechanism9among the boundary surfaces facing the outside of the collision detection region A in the X direction and the Y direction along the mounting surface4a. The stationary portion9bis a portion that remains stationary relative to the table4, and, in the case of the additional two-axes table, the stationary portion9bis a portion that does not synchronize with the rotation about the rotary axis C of the auxiliary mechanism9.

Another example of the non-essential items is the item Δl for determining the position of the table-4-side boundary surface1in the partial region A1encompassing the movable portion9aof the auxiliary mechanism9. The movable portion9ais a portion that can move relative to the table4, and, in the case of the additional two-axes table, is a portion that synchronizes with the rotation about the rotary axis C of the auxiliary mechanism9.

The region setting unit14acquires, from the storage unit11, the basic shape data of the shape selected through the input unit12. Next, the region setting unit14creates a collision detection region A on the basis of the basic shape data selected through the input unit12and the setting values of the setting items, and sets the collision detection region A within the setting region P. In other words, the region setting unit14creates a collision detection region A by extending or shrinking the basic shape data in the X, Y, and Z directions and thereby placing the boundary surfaces of the basic shape data to the positions determined by the setting values.

As described above, the region setting unit14determines the positions of the boundary surfaces on the basis of the setting values of the essential items and non-essential items input through the input unit12. When there is an un-input item, which is a non-essential item for which no setting value is input, the region setting unit14determines that the boundary surface determined by the un-input item is an edge of the setting region P that is on the same side as that boundary surface with respect to the collision detection region A and that faces the boundary surface.FIGS.2and3illustrate a collision detection region A when setting values are input for all of the setting items.FIGS.4and5illustrate an extended collision detection region A when setting values are not input for some of the non-essential items.

Specifically, when the items Δgh and Δij are un-input items, the boundary surfaces g and i are determined to be edges of the setting region P, and, as a result, the partial regions A2and A3encompassing the motor units9bare extended in the X direction to the edges of the setting region P.

When the items Δc, Δd, Δe, and Δf are un-input items, the boundary surfaces c, d, e, and f are determined to be edges of the setting region P, and, as a result, the partial regions A2and A3encompassing the motor units9bare extended in the Y direction to the edges of the setting region P.

When the item Δl is an un-input item, the boundary surface1is determined to be the mounting surface4a, which is an underside edge of the setting region P, and, as a result, the region A1encompassing the rotary table9ais extended in the Z direction.

The collision detection unit15checks whether or not the tool2and the collision detection region A collide with each other. For example, before the control unit13sends control commands to the feed motors6,7, and8, the collision detection unit15calculates the positions of the tool2and the collision detection region A on the basis of the presumption that the tool2and the table4have moved according to the control commands, and checks whether or not the tool2and the collision detection region A at the calculated positions collide with each other.

When the collision detection unit15determines that the tool2and the collision detection region A collide with each other, the control unit13controls the feed motors6,7, and8to allow at least one of the spindle3and the table4to perform a motion that avoids collision. For example, the control unit13stops the spindle3and the table4, or moves the spindle3and the table4away from each other.

Next, the effects of the controller1of the machine tool10are described.

After installing the auxiliary mechanism9on the mounting surface4aof the table4and before starting automatic or manual operation, the collision detection region A is set as illustrated inFIG.6.

First, the operator selects, through the input unit12, the basic shape data used for the collision detection region A (step S1). Next, the operator inputs, through the input unit12, the setting values for determining multiple boundary surfaces of the collision detection region A (step S2).

After the input of the setting values is completed (YES in step S3), the region setting unit14confirms that all of the setting values of the essential items have been input (step S4). Completion of input of the setting values is determined by the operator pressing a predetermined button on the setting screen. If there is any essential item for which the setting value is not input, the controller1outputs an error (step S5) and requires the operator to input the setting value for the un-input essential item.

Next, on the basis of the basic shape data selected in the step S1and the setting values input in the step S2, the region setting unit14creates and sets the collision detection region A of the auxiliary mechanism9(step S6).

When setting values are input for all non-essential items, as illustrated inFIGS.2and3, the positions of all boundary surfaces a, b, . . . , m, and n of the collision detection region A are determined on the basis of the setting values. However, when a setting value is not input for at least one non-essential item, the position of the boundary surface corresponding to the un-input item remains undetermined, and the process proceeds to step S7.

Next, the region setting unit14confirms whether or not the setting values have been input for all non-essential items (step S7). When setting values have been input for all non-essential items (YES in step S7), creation and setting of the collision detection region A of the auxiliary mechanism9end.

However, when there is at least one un-input item (NO in step S7), the region setting unit14determines that the undetermined boundary surface is an edge of the predetermined setting region P, and this extends the collision detection region A to the edge of the setting region P (step S8), thereby ending creation and setting of the collision detection region A of the auxiliary mechanism9.

After completion of the setting of the collision detection region A, the collision detection unit15checks whether or not the tool2and the collision detection region A collide with each other.

Thus, according to the present embodiment, the collision detection region A of the auxiliary mechanism9is created by a simple operation of giving setting values to the predetermined basic shape data pre-registered in the storage unit11. Thus, the collision detection regions A of various auxiliary mechanisms9can be easily set in a short time.

When no setting values are input for the non-essential items, the boundary surfaces corresponding to the un-input items are automatically determined to be the edges of the setting region P, for example, edges of the motion range of the tool2, and a collision detection region A extended to the edges of the setting region P is automatically set. In other words, the operator can omit inputting setting values for the non-essential items, and thus the collision detection region A can be more easily set in a shorter time. For example, in the example illustrated inFIGS.2to5, inputting setting values for sixteen setting items has been required conventionally. However, according to the present embodiment, the number of setting items that require inputting of the setting values can be reduced to nine.

In addition, by extending the collision detection region A to the edges of the motion range of the tool2, collision between the tool2and the auxiliary mechanism9can be more reliably prevented, and safety can be enhanced.

Furthermore, when the operator has forgotten to input setting values for the non-essential items, the collision detection region A can be automatically adjusted to enhance the safety.

Furthermore, in the case of the additional two-axes table, the tool2does not usually move to the outside of the rotary table9ain the X direction and Y direction during machining of the workpiece W. Thus, movement of the tool2is not restricted beyond what is necessary when the collision detection region A is extended to the edges of the motion range of the tool2.

When the collision detection region A includes multiple partial regions A2and A3that encompass the stationary portions9b, there are more than one boundary surfaces of the partial regions A2and A3on the same side of the collision detection region A. In the present embodiment, the item that determines the position of a boundary surface other than the outermost boundary surface among the multiple boundary surfaces on the same side may be a non-essential item. For example, in the example illustrated inFIGS.2to5, the smaller one of Δm and Δn may be a non-essential item. When one of Δm and Δn is an un-input item, the region setting unit14determines said one of Δm and Δn to be the same as the setting value of the other.

As a result, the number of setting items that require inputting of the setting values can be further reduced to eight.

FIGS.7to10illustrate an example of the collision detection region A when the auxiliary mechanism9is a vise, which is a type of fixture. The collision detection region A of the vise consists of three partial regions that respectively encompass three stationary portions. In the example illustrated inFIGS.7to10, thirteen setting items 1 to 13 are provided.FIGS.7and8illustrate a collision detection region A when setting values are input for all of the setting items.FIGS.9and10illustrate an extended collision detection region A when setting values are not input for all of the non-essential items.

The setting items 1 and 2 are the Y coordinates ya and yb of the boundary surfaces a and b. The setting items 3 to 8 are the X coordinates xc, xd, xe, xf, xg, and xh of the boundary surfaces c, d, e, f, g, and h. The setting item 9 is the width Δai between the boundary surfaces a and i, and the setting item 10 is the width Δbj between the boundary surfaces b and j. The setting items 11, 12, and 13 are the Z coordinates zk, zl, and zm of the boundary surfaces k, l, and m.

Examples of the non-essential items are items Δai and Δbj for determining the positions of the boundary surfaces i and j facing the outside of the collision detection region A in the Y direction along the mounting surface4a.

Other examples of the non-essential items are items xe and xg for determining the positions of two boundary surfaces e and g other than the outermost positioned boundary surface c selected from among three boundary surfaces c, e, and g positioned on the same side of the collision detection region A.

Yet other examples of the non-essential items are items xf and xh for determining the positions of two boundary surfaces f and h other than the outermost positioned boundary surface d selected from among three boundary surfaces d, f, and h positioned on the same side of the collision detection region A.

Yet another example of the non-essential items is an item zm for determining the position of the boundary surface m other than the outermost positioned boundary surface1selected from two boundary surfaces1and m positioned on the same side of the collision detection region A.

In this example, there are five essential items and seven non-essential items. In other words, the number of setting items that require inputting of the setting values by the operator can be further reduced to five from the conventional thirteen.

The more complicated the basic shape data used to create the collision detection region A and the larger the number of boundary surfaces, the larger the amount of computation needed to create the collision detection region A and the larger the load imposed on the controller1. In order to decrease the amount of computation, the collision detection region A does not have to be set in some part of the auxiliary mechanism9that collides rarely with the tool2.

For example, inFIGS.7and8, the middle partial region between the boundary surfaces a and b corresponds to a portion that receives the lower surface of the workpiece W. As illustrated inFIGS.9and10, the operator may omit this middle partial region by judging that this portion is highly unlikely to collide with the tool2. In this case, since there is no item zk, there are eight non-essential items.

In this embodiment, the region setting unit14may automatically set the setting values for some of the setting items by referring to the position information of the auxiliary mechanism9already stored in the storage unit11.

There may be cases where the position information regarding the position of the auxiliary mechanism9has already been input to and set in the controller1before starting the setting of the collision detection region A. For example, in the case of an additional two-axes table, the position and the direction of the tilting axis B are stored in the storage unit11before the setting of the collision detection region A. In such a case, the region setting unit14automatically sets the setting values for the items (Bx, By, Bz) on the basis of the position and direction of the tilting axis B stored in the storage unit11. As a result, the number of setting items that require the operator to input setting values can be further reduced.

Extending the collision detection region A enhances the safety. In the present embodiment, the controller1may be further equipped with a suggestion unit16, and, when there is a space in the setting region P where no object is present, the suggestion unit16may suggest extension of the collision detection region A so that this space is included in the collision detection region A.

For example, a visual sensor17, such as a camera, installed above the table4captures an image of the setting region P. The suggestion unit16determines whether or not there is an object between the auxiliary mechanism9and the edges of the setting region P on the basis of the image. When it is determined that there is no object, the suggestion unit16suggests, to the operator, changing the boundary surface of the collision detection region A to an edge of the setting region P to extend the collision detection region A.

The suggestion unit16determines, from the image, whether or not there is an object in a gap having a predetermined width or less between two partial regions, and when the suggestion unit16determines that there is no object, the suggestion unit16may suggest to the operator to extend the two partial regions and integrate these regions.

Instead of the suggestion unit16suggesting the extension of the collision detection region A, the region setting unit14may automatically extend the collision detection region A.

In order to decrease the amount of computation required to set the collision detection region A and to decrease the load imposed on the controller1, the suggestion unit16may suggest, to the operator, a collision detection region A having a simpler shape. For example, after the basic shape data is selected by the operator, the suggestion unit16may suggest extending the collision detection region A or combining multiple partial regions into one.

In the present embodiment, examples in which the auxiliary mechanisms9are an additional axis table and a fixture are described; alternatively, the auxiliary mechanism9may be any desired device installed on the mounting surface4a. For example, the auxiliary mechanism9may be a contact-type tool length measurement switch for measuring the tool length. In addition, multiple auxiliary mechanisms9may be installed on the mounting surface4a, and, in such a case, multiple collision detection regions A may be set.

In the present embodiment, the spindle3is movable in the Z direction, and the table4is movable in the X direction and the Y direction; however, it suffices that the relative movement between the spindle3and the table4is achieved by moving one or both of the spindle3and the table4. For example, the spindle3may be movable in the X and Y directions, and the table4may be movable in the Z direction; alternatively, one of the spindle3and the table4may be movable in three directions, X, Y, and Z.

Furthermore, in the present embodiment, the spindle3is arranged vertically, and the table4is arranged horizontally; however, the directions in which the spindle3and the table4are arranged can be modified as appropriate. For example, the spindle3may be arranged horizontally, and the table4may be arranged vertically.