NUMERICAL CONTROLLER

Abstract: In a numerical controller, a movement instruction and an operation instruction are produced from an NC tape as NC instructions of the same block, a movement completion signal is formed at a moment when the movement of the tool is finished based on the movement instruction, and the operation on the machine side is instructed by an instruction execu­ tion function based on the movement instruction. As the movement completion signal, furthermore, there are choices: a dummy signal (DEN, A) containing programmable parameters and an intrinsic movement completion signal (DEN, B).

Description: Technical Field This invention relates to a numerical control apparatus in which it is possible to control the start of execution of machine-side operations such as M, S, T and B functions. Background Art With a numerical control apparatus for controlling a machine tool upon decoding an ordinary NC command, there are two ways to execute commands in a case where a movement command and an operation command are issued from the same block. Specifically, there is a method in which execution of a tool movement command starts at the same time as execution of an operation command, and a method in which the operation command is executed after execution of the movement command. As to which method is used to control the machine tool by the NC commands, one or the other is selected depending upon the particulars of the operation performed by the machine tool. For example, among commands based on M codes (auxiliary function codes), the operation command is outputted to the machine side using the former method with regard to M03, M04 and M05 (control for rotating and stopping a spindle) and the latter method with regard to M20 and M21. When an NC command for drilling a plurality of holes in a workpiece is delivered to the machine tool in this conventional numerical control apparatus, a movement command for moving the tool to a predetermined position on the workpiece and a command for the drilling operation at this position are read in the numerical control apparatus from the same data block, and the operation of the machine tool is controlled upon decoding these commands. If the former of the two methods mentioned above is adopted as this command execution function, it is required that a coolant be supplied by a coolant start command executed at the same time that the tool is moved. If a long period of time is required to move the tool, coolant is wasted correspondingly. If the latter method is adopted, on the other hand, start of coolant supply is commanded at the end of tool movement in response to the movement command. When this is done, however, a time delay due to an exchange of signals between the numerical control apparatus and the machine tool is involved before the supply of coolant starts, and a great deal of time is wasted in the overall machining operation particularly in a case where the tool traveling distance on the workpiece is short. In order to solve this problem which arises owing to the relationship between tool movement and the operation commanded on the machine side, in the prior art the traveling distance commanded at the same time as the operation command on the machine side is limited to a fixed value, the distance required is commanded by being split between two data blocks, and the tool is moved by executing these commands in succession. Yet even in this case there is no essential solution to the problem; all that is done is to make the NC commands more complicated and place an extra burden upon the operator. EP-A-0 091 663 discloses an apparatus for controlling operation of an industrial robot, in which a robot arm carries an actuator, and the actuator is actuated prior to completion of a movement by the robot arm. A prescribed position, ahead of the final destination of the arm, is stored in a memory and compared with a detected current position of the arm. When the arm reaches the prescribed position, a position completion signal is issued irrespective of arm movement and the actuator is activated. According to the present invention, there is provided a numerical control apparatus having a command execution function in which a movement command and an operation command are outputted from an NC tape as NC commands of the same block, comprising:- decoding means for reading out commands from the NC tape including the movement command and operation command, and decoding a dimension word associated with the movement command to determine a destination point of a tool; strobe outputting means for outputting a strobe in response to the operation command; control means for controlling movement of the tool towards said destination point based on said movement command; pseudo-signal forming means for outputting a pseudo-movement completion signal when the tool reaches a predetermined stage of said movement, before completion thereof, at which said operation command is to be executed; signal combining means for performing an AND operation upon said strobe and said pseudo-movement completion signal, and causing immediate decoding and execution of said operation command if the AND operation is satisfied before the tool reaches said destination point; and means for outputting a movement completion signal (DEN.B) when the tool reaches said destination point; wherein said predetermined stage is defined by an additional code inserted in said block, said decoding means decoding a numerical value associated with said additional code in order to determine the point at which said operation command is to be executed. The invention may thus provide a numerical control apparatus having a command execution function for executing an operation command before completion of tool movement, in parallel with a function for executing an operation command at the end of a movement command. An operation command designated on the machine side is decoded by a pseudo-movement completion signal formed at any timing from start of execution of the movement command to completion of movement, with the operation command being executed before completion of tool movement. The pseudo-movement completion signal is generated by using an additional code integrated into the block format of commands on an NC tape. Reference is made, by way of example, to the accompanying drawings, in which:- Fig. 1 is a block diagram illustrating an embodiment of the present invention; Fig. 2 is an explanatory view illustrating an example of movement control; Fig. 3 is an explanatory view illustrating timing of command execution control in the same embodiment; Fig. 4 is an explanatory view illustrating timing in a case where an operation command is executed at the same time as a movement command; and Fig. 5 is an explanatory view illustrating timing in a case where an operation command is executed at the end of movement. 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 numerical control apparatus for controlling an NC machine tool. A processing unit (CPU) 11 for forming command data for a machine tool is connected, via a bus line 10, to a tape reader 12 for reading NC commands from an NC tape, a CRT 13 serving as a display unit, and a keyboard 14 for performing data input manually as for the purpose of revising a program. Also connected to the CPU are a ROM 15 storing a control program for operating the system efficiently, and a non-volatile memory 16 for storing control programs by part for the purpose of milling and the like, as well as data necessary for machining. Connected to the bus line 10 of CPU 11 is a writable RAM 17 used as a working memory for controlling a motor 20, which is for moving a tool along a predetermined axis, via position control means 18 and velocity control means 19. An input/output unit (DI/DO) 21 which exchanges operation control signals, for M, S, T and B functions and the like, with the machine side is connected to the machine tool directly or through a PMC or the like. Though the motor 20 illustrated in Fig. 1 is for one axis only, in actuality at least three motors, position control means and velocity control means each are provided in order to move and control the tool of the machine tool freely in three-dimensional space. Fig. 2 illustrates the path of a tool moved from point Po to points P1, P2, P3 by NC data from the tape reader 12. Various operations performed by the NC machine tool are expressed by the following variable block word address format in terms of the NC tape. Specifically, one block of data which commands one operation of the machine tool is composed of a plurality of words, and a word comprises an address indicating the meaning of a numerical value, and the numerical value following the address. For example, in a case where the tool is positioned from point Po to point P1, and the workpiece (the side below the one-dot chain line) is subjected to machining from point P2 to point P3, by the next data block, commands from the NC tape are executed at the timing shown in Fig. 3. The format is as follows: Nl G91 G00 X -100.0 Z50.0 Q20 M07 Specifically, when a dimension word (X -100.0 Z50.0) which follows G00 indicative of the position function in the data block is read out, the CPU 11 outputs a predetermined movement command upon decoding the dimension word. Then, when the M-code signal is read out, the CPU outputs a strobe (MF), which is the code read command. In order to execute a coolant-on command issued in accordance with M07 when the tool arrives as a point intermediate the points Po, P1, a Q code is inserted between the positioning code G00 and M code in the abovementioned data block. This Q code, which has a numerical value following it that designates the remaining traveling distance 20 (mm) of the tool, specifies the point P at which the M function is to be executed. As a result, when the tool arrives at the point P, a pseudo-movement completion signal (DEN.A) is outputted. When this signal and the strobe (MF) satisfy an AND condition, the machine operation function is immediately executed. Thus, even though a tool movement command and an operation command on the machine side are outputted as NC commands of the same data block, in the above-described numerical control apparatus the command for the machine operation is decoded after the tool is moved to a point a designated distance short of the workpiece. Therefore, the coolant-on command (M07) is executed after the tool arrives at a position a required distance short of the workpiece, and wasting of coolant can be eliminated. In a case where the distance between points Po and P1 is short, the M code can be executed at the same time that movement from point Po starts without the Q code being inserted, just as in the prior-art method. The timing chart of Fig. 4 illustrates timing for a case where an operation command is executed at the same time as a movement command. As shown in Fig. 5, it is also possible to adopt a set-up in which, depending upon the particulars of the operation command designated by the M code, a movement completion signal (DEN.B) formed at the moment movement ends is outputted, thereby starting operation on the machine side. It should be noted that the timing at which the pseudo-movement completion signal (DEN.A) is generated in the above-described embodiment is set by designating the remaining traveling distance of the tool. However, in a case where the traveling velocity is set along with the G code (G00), it is preferred that the units of the numerical value following the Q code be changed to units of time. In the above-described embodiment, a case is described in which the operation command on the machine side is issued by the auxiliary function code M. However, the invention can be applied in a similar manner even in a case where operation on the machine side is commanded by a spindle function S, tool function T or second auxiliary function B. Industrial Applicability The numerical control apparatus of the present invention is such that an operation command on a machine side is executed at a predetermined timing before completion of tool movement, whereby control for starting execution of machine-side operations such as M, S, T and B functions can be performed without complicating NC commands and without placing an extra burden upon the operator.

Claims: A numerical control apparatus having a command execution function in which a movement command (G) and an operation command (M) are outputted from an NC tape as NC commands of the same block, comprising:- decoding means for reading out commands from the NC tape including the movement command (G) and operation command (M), and decoding a dimension word associated with the movement command to determine a destination point (P1) of a tool; strobe outputting means for outputting a strobe (MF) in response to the operation command; control means for controlling movement of the tool towards said destination point (P1) based on said movement command; pseudo-signal forming means for outputting a pseudo-movement completion signal (DEN.A) when the tool reaches a predetermined stage (P) of said movement, before completion thereof, at which said operation command (M) is to be executed; signal combining means for performing an AND operation upon said strobe (MF) and said pseudo-movement completion signal (DEN.A), and causing immediate decoding and execution of said operation command (M) if the AND operation is satisfied before the tool reaches said destination point (P1); and means for outputting a movement completion signal (DEN.B) when the tool reaches said destination point (P1); wherein said predetermined stage is defined by an additional code (Q) inserted in said block, said decoding means decoding a numerical value associated with said additional code in order to determine the point at which said operation command (M) is to be executed. An apparatus according to claim 1, wherein said additional code (Q) defines said predetermined stage (P) of said movement command in accordance with a remaining movement distance before said tool reaches said destination point (P1). An apparatus according to claim 1, wherein said additional code (Q) defines said predetermined stage (P) of said movement command in accordance with a remaining time before completion of said movement command. An apparatus according to claim 2, wherein said block has the following block format:- Naa G91 G00 Xxx Zzz Qnn Mmm wherein Naa is the block address, G91 and G00 are G codes for positioning the tool, Xxx and Zzz constitute a dimension word associated with G00, Qnn is the additional code including said remaining movement distance nn, and Mmm is an M, S, T or B code defining the operation command; aa, xx, zz, nn and mm being integer values. An apparatus according to any preceding claim, wherein said operation command (M) is a coolant-on command (M07).

Inventors: SASAKI TAKAO, SASAKI, TAKAO
Applicants: FANUC LTD, FANUC LTD.
Application year: 1988
Main classification: G05B19
IPC codes: G05B19