NUMERICAL CONTROLLER

Abstract: A data section sets positional relationships between the work's rotation angle and the machine tool. A computing circuit determines tool displacement and work rotation speed on the basis of the set data, and a drive controller distributes displacement data to the tool. The controller comprises a processor linked to a ROM storing a custom macroprogram, a RAM, a nonvolatile memory and a keyboard for input by an operator. Programs prepd. on the basis of keyboard input and corresponding tool loci may be displayed (105). The user has the choice of using the prestored macroprogram or his own data.

Description: This invention relates to a numerical control apparatus for an NC machine tool which performs C-axis machining. A numerical control apparatus ordinarily is adapted to execute numerical control processing based on NC program data, and to control an NC machine tool such as a lathe in accordance with the results of processing to subject a workpiece to machining specified by a command. Recent numerical control apparatus come equipped with subprogram and custom macro functions through which it is capable of preparing various complicated machining control programs and repetitive control programs in a simple manner. The aforementioned custom macro is utilized in order to comply with a user request that the NC machine tool be provided with the function of a lead processing machine in a case where C-axis machining is to be performed. However, this makes it necessary that the machining command data be supplied to each axis at a rate greater than the conventional distribution frequency. In other words, a lead machining function refers to a machining function in which, in an NC machine tool having a mechanical construction of the kind shown in Fig. 7, a tool t on a Z axis parallel to the rotational axis C of a workpiece w is moved at high speed along the Y axis by a move command independent of the Z axis to subject the workpiece w to milling. Such a lead machining function is essential in the machining of e.g. the head of a video deck, which requires that the workpiece w be rotated and that the movement of the tool be controlled in such a manner that the amount of machining differs at every rotational angle during one revolution of the workpiece. In a machine tool for practicing this lead machining, it is also necessary to deal not only with lead machining but also with ordinary milling by the tool t in accordance with the drive axes X, Z of the tool t. With the conventional numerical control apparatus, the preparation of the amount of high-speed distribution data necessary for lead machining and the editing of programs cannot be performed in a simple manner, and special-purpose machinery is required for this type of machining. The present invention has been devised to solve the aforementioned problems and its object is to provide a numerical control apparatus through which high-speed distribution data for controlling a machine tool having the foregoing mechanical construction can be prepared with facility by a user whenever necessary. It is known in the art of filament winding machines to move a filament-feeding head along a rotational axis of a bobbin upon which the filament is being wound. Thus see for example US-A-4,145,740, and also JP-A-52-32480 wherein the position of the filament-feeding head is a function of the rotary angle of the bobbin. According to the present invention there is provided a numerically controlled machine tool comprising in combination a machine tool and a numerical control apparatus for controlling the machine tool, the machine tool having a machining function for moving a material-removing tool thereof relative to a workpiece or vice versa along a rotational axis of the workpiece to machine the workpiece to a predetermined shape, the numerical control apparatus comprising: data setting means for setting a relation between a rotational angle of said workpiece and a position of the tool relative to the workpiece along said rotational axis; processing means for determining move command data which commands an amount of tool movement along said rotational axis and a rotational velocity of the workpiece in accordance with the set data; and drive control means operable for distributing said determined move command data to said machine tool at high speed, with the speed of tool movement along the rotational axis being dependent upon the rotational speed of the workpiece. Thus, in an embodiment of numerical control apparatus of the invention, data in an execution format required by a specific machining function such as a lead machining function are prepared based on data set by an operator, and high-speed distribution data for controlling the machine tool are readily prepared by a user whenever necessary by setting parameters similar to those in ordinary milling. Thus, a specific machining function which requires high-speed interpolation is realized. Brief Description of the Drawings Fig. 1 is a block diagram illustrating an embodiment of the present invention, Fig. 2 is a displacement diagram illustrating an example of lead machining, Figs 3(a), (b) are explanatory views illustrating the constitution of an area storing execution format data, Figs. 4(a), (b) are explanatory views illustrating the arrangement of a header, Fig. 5 is an explanatory view illustrating the correspondence between variables and the area storing the execution format data, Figs. 6(a), (b) are explanatory views illustrating examples of a program for preparing execution format data and an execution program, respectively, and Fig. 7 is a view showing the mechanical construction of a lead processing machine. An embodiment of the present invention will now be described in detail with reference to the drawings. Fig. 1 is a block diagram illustrating an example of a processing section for executing the programming function processing of the numerical control apparatus of the present invention. In Fig. 1, numeral 101 denotes processing means, e.g. a microprocessor, which executes processing such as for preparing a machining program. Connected to the processor 101 are a ROM 102 for storing a data preparation custom macro or a display data editing control program described below, a reloadable memory (RAM) 103 for storing a prepared machining program, data setting means, e.g. a keyboard 104, for inputting data, a graphic display unit 105 for displaying a program prepared based on data inputted from the keyboard 104 as well as a machining path based on the program, and an input/output interface 106 for administering an exchange of data with a machining control section. The processor 101 also has a non-volatile memory 107 for storing system parameters and files for automatic programming, as well as NC parameters. The machining control section connected to the input/output interface 106 controls a machine tool having a machining function for moving a tool relative to a workpiece or the workpiece relative to the tool along the rotational axis of the workpiece to machine the workpiece to a predetermined shape. Fig. 2 illustrates an example of execution format data necessary for controlling the drive of the machine tool, based on set data inputted by the keyboard 104, in order that lead machining may be performed. The execution format data referred to here are distribution data having a period of 2 msec created by the custom macro stored in the ROM 102. When an amount of displacement along the Y axis during one revolution about the C axis is inputted from the keyboard 104 in order to control drive along the C and Y axes shown in Fig. 7, the execution format data are outputted to the machining control section from the interface 106. The amount of distribution along the C axis in 2 msec is decided by the rotational speed of the workpiece. If the number of broken lines of the displacement curve of Fig. 2 is limited to within 30, it will be possible in theory to achieve a maximum rotational speed of about 850 rpm about the C axis. Figs. 3(a), (b) illustrates the constitution of an area for storing execution format data. The execution format data area is secured together with an NC program area in a tape editing memory of the RAM 103 or the like and is composed of the three types of data described hereinbelow. N represents the number of cycles of the execution format data and indicates a number, stored as execution format data, which is a total of a cycle 1 for executing ordinary milling by controlling the X and Z axes simultaneously, and a cycle 2 for lead machining. The number of cycles corresponds to the number of headers HDR1, HDR2, ... which manage and define the data of each cycle. A header HDR is composed of six items of information. Specifically, as shown in Figs. 4(a), (b), a number of set items of data per one revolution of the workpiece is written at a first address, the type of data is written at a second address, data for a first axis are written at a third address, and data for a second axis are written at a fourth address. The number n of set items of data is decided by the rotational speed s of the workpiece such that n = 30000/s holds. However, since the amount of distribution every 2 msec along the C axis is a divisor of 36000, some discrepancy will occur. The type of data is arranged as shown in Fig. 4(b). That is, 0/1 designating the C-axis data type is written at the location of the 0 bit and 0/1 designating the Y-axis data type is written at the location of the 1 bit, respectively. A 0 means that the distribution data are fixed at all times, and a 1 means that the distribution data are designated in units of 2 msec in the next execution format data area. Ordinarily, fixed distribution data δC or a starting data number dp1 indicating a variable distribution data storage region is designated depending upon the data for the first axis. In the case of lead machining, the first axis is the C axis, so that δC is set. Similarly, what is designated depending upon the data for the second axis is a starting data number dp2 indicating a variable distribution data storage area. The execution format data are stored upon being divided into data for cycle 1 and data for cycle 2. In the case of lead machining, the format data are selected from the area for cycle 2 by the data number dP2 designated by the header HDR. The execution format data are stored in advance by an execution format data preparation program described below and are computed as 2 msec distribution data on the basis of input data relating to the displacement curve shown in Fig. 2. Ordinarily, the command unit along the C axis is 0.01 deg, and the command unit along the Y axis is 0.01 mm or 0.001 inch. A method of accessing the aforementioned execution format data area will now be described. The execution format data can be read and written in response to a custom macro instruction inserted in an ordinary program. Indirect accessing is possible by setting actual values in the variables of the custom macro instruction. Accordingly, execution format data may also be referred to as execution format variables and are stored at 10,000 addresses from #10000 to #19999. An example of an execution format data area is shown in Fig. 5. The correspondence with variable numbers is shown in Table 1, and the correspondence with distribution data in the data area is shown in Table 2. An example of a program for preparing the foregoing format data will now be described with reference to Fig. 6(a). The preparation program 01000 executes the registration of the machining shape, which is indicated by the displacement curve for the C and Y axes, n times by means of a G code G10 in the data input. By using a function for registering the amount of tool offset, this enables the shape to be set while it is being called to the display unit 105. Here x1 ∼ xn and z1 ∼ zn are the angle of rotation about the C axis and the amount of movement along the Z axis, respectively, and r1 is the rotational speed necessary for machining. Further, q designates 1 in case of an absolute command and 2 in case of an incremental command, namely depending upon the method of commanding the angle of rotation and displacement. Also, P is a point number, and n≦30. The next line, which starts at G65, sets the maximum value of the execution format variable to a common variable. By successively calling subprograms P9011, P9012, described below, format execution data of cycle 1 and cycle 2 can be prepared from the machining shape. The rotational speed is changed from r1 to r2 at this time after the execution format data of cycle 1 are prepared. The execution format data thus prepared and stored can be called within a machining cycle by an execution program of the kind shown in Fig. 6(b), thus allowing lead machining to be carried out. The preparatory code G07 is a one-shot read machining call instruction, in which the type of cycle to be called is designated by p and the number of times lead machining is to be repeated is designated by n. If the execution format data have not yet been registered, a PS alarm is issued. The described and illustrated numerical control apparatus of the present invention finds applicability in controlling a machine tool by inputting data relating to a change in the relative position of a tool during one revolution of a workpiece, deciding the amount of tool movement and the rotational speed of the workpiece, and outputting machine movement command data as high-speed distribution data on the basis of an instruction for executing lead machining commanded whenever necessary.

Claims: A numerically controlled machine tool comprising in combination a machine tool and a numerical control apparatus for controlling the machine tool, the machine tool having a machining function for moving a material-removing tool (t) thereof relative to a workpiece (w) or vice versa along a rotational axis (C) of the workpiece (w) to machine the workpiece (w) to a predetermined shape, the numerical control apparatus comprising: data setting means for setting a relation between a rotational angle of said workpiece (w) and a position of the tool (t) relative to the workpiece (w) along said rotational axis (C); processing means for determining move command data which commands an amount of tool movement along said rotational axis (C) and a rotational velocity of the workpiece (w) in accordance with the set data; and drive control means operable for distributing said determined move command data to said machine tool at high speed, with the speed of tool movement along the rotational axis (C) being dependent upon the rotational speed of the workpiece (w). A numerically controlled machine tool according to claim 1, characterized by having a graphic display unit (105) for displaying a program prepared on the basis of data inputted from said data setting means, and a machining path based on the program. A numerically controlled machine tool according to claim 1 or 2, characterized in that said processing means calls a custom macro program in which the set relation between the rotational angle of the workpiece (w) and the position of the tool relative to the workpiece (w) serves as a parameter, prepares, in accordance with said program, execution format data for deciding the amount of tool movement and the rotational speed of the workpiece (w), and decides move command data necessary for a lead machining function. A numerically controlled machine tool according to claim 3, characterized in that said execution format data are accessed indirectly by setting a value of a variable in a custom macro instruction inserted in a program.

Inventors: IWAGAYA TAKASHI, IWAGAYA, TAKASHI
Applicants: FANUC LTD, FANUC LTD.
Application year: 1987
Main classification: G05B19
IPC codes: G05B19