NUMERIC CONTROLLER

Abstract: This invention relates to a numeric controller which effects movement of a next block without interrupting the movement of a work, etc, even when a skip signal is inputted, and thus reduces a cycle time. First, skip signal detection means (1b), in response to a skip signal SS outputted from detection means (2), stores a present position (1aa) of a work (4) in memory means (1a), and outputs a skip completion signal AS. Next, acceleration/deceleration distribution means (1c) effects pulse interpolation of a present block, and outputs a distribution completion signal ES after the movement is completed. Receiving this skip completion signal AS, pre-treatment distribution means (1d) determines a moving distance of the next block from the present position (1aa) of the work (4), and conducts pre-treatment of the next block of the machining program (1ac). The means (1d) receives the distribution completion signal ES outputted from the acceleration/deceleration distribution means (1c), outputs the interpolation pulse IP2, and moves the work (4) without an interruption.

Description: TECHNICAL FIELD The present invention relates to a numerical control apparatus provided with a skip function, and more specifically, to a numerical control apparatus for measuring a tool length and a workpiece configuration. BACKGROUND ART In general, numerical control apparatuses are provided with a skip function for measuring a tool length and a workpiece configuration. The skip function is arranged such that when a skip signal is input from the outside by a contact type or non-contact type sensor having sensed the existence a workpiece and a tool (hereinafter, referred to as "a workpiece and the like"), the numerical control apparatus stops an axis movement corresponding to the block of a machining program which is being executed at present and goes to a next block of the machining program (hereinafter, simply referred to as "a next block"). Consequently, when an amount of movement is not known because a cutting depth or the like is not given in grinding machines, lathes and the like, the amount of movement can be measured by making effective use of the skip function. Nevertheless, when a conventional numerical control apparatus provided with the skip function is supplied with a skip signal from the outside, since the numerical control apparatus temporarily stops the movement of a workpiece and the like and then executes the movement command of a next block, a considerable period of time is needed to reach a feed speed for the movement of the next block. Thus, a problem arises in that a cycle time is increased. JP-A-4-260105 discloses a motion controller for a NC device which executes a command for the movement of a next block without temporarily stopping the movement of a workpiece or the like even if a skip signal is input. Taking the above into consideration, an object of the present invention is to provide an alternative numerical control apparatus which executes a command for the movement of a next block without temporarily stopping the movement of a workpiece and the like even if a skip signal is input so as to reduce a cycle time. To solve the above problem, according to the present invention, there is provided a numerical control apparatus for measuring a tool length and a workpiece configuration by a skip function, the apparatus characterised by: memory means for storing a time constant used when a feed speed of a workpiece or the like is accelerated or decelerated and a machining program; skip signal sensing means for storing the present position of said workpiece or the like in a predetermined storing region of said memory means in response to a skip signal output from a sensing means as well as outputting a skip completion signal; acceleration/deceleration distribution means for outputting a first interpolation pulse for accelerating or decelerating the feed speed based on said time constant and said present position in response to said skip completion signal and outputting a distribution completion signal after said workpiece or the like has been moved to an end position commanded in the present block of said machining program; and preprocessing distribution means for determining a amount of movement of a next block from the present position of said workpiece or the like in response to said skip completion signal, preprocessing the next block of said machining program and outputting a second interpolation pulse based on said preprocessing in response to said distribution completion signal. The memory means stores the time constant used when a feed speed of the workpiece and the like is accelerated or decelerated in the machining program. First, the skip signal sensing means having received a skip signal output from the sensing means stores the present position of the workpiece and the like in a predetermined memory region of the memory means as well as outputting a skip completion signal. The acceleration/deceleration distribution means moves the workpiece or the like to an end position commanded by the present block in the machining program and then outputs a movement completion signal. Further, the preprocessing distribution means having received the skip completion signal determines an amount of movement of a next block from the present position of the workpiece and the like, preprocesses the next block of the machining program and outputs a second interpolation pulse based on the preprocessing in response to a distribution completion signal. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram explaining the principle of the present invention; FIG. 2 is a block diagram showing the overall arrangement of a one-axis numerical control apparatus; FIG. 3 is a view showing an example of a machining program; FIGS. 4(A), 4(B), 4(C), and 4(D) are views showing states of movement of a workpiece gripped by a pusher; and FIG. 5 is a flowchart showing a processing sequence of the present invention. BEST MODE OF CARRYING OUT THE INVENTION An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram explaining the principle of the present invention as well as explaining the embodiment. In FIG. 1, a numerical control apparatus 1 of the present invention includes the respective components of memory means 1a, skip signal sensing means 1b, acceleration/deceleration distribution means 1c and preprocessing distribution means 1d. The memory means 1a is composed of a RAM 13 to be described later and stores a time constant 1ab used when a feed speed of a workpiece 4 is accelerated/decelerated, the present position 1aa of the workpiece 4 and a machining program 1ac. Note, the time constant 1ab can command acceleration/deceleration of a feed speed according to machining conditions by being set by a parameter. First, the skip signal sensing means 1b having received a skip signal SS output from sensing means 2 stores the present position 1aa of the workpiece 4 in the memory means 1a as well as outputs a skip completion signal AS. The sensing means 2 is composed of a non-contact type sensor such as a laser sensor, a sound sensor or the like. The acceleration/deceleration distribution means 1c having received the skip completion signal AS moves the workpiece 4 to an end position commanded by the present block without temporarily stopping the workpiece 4 and outputs a distribution completion signal ES. Further, the preprocessing distribution means 1d having received the skip completion signal AS determines an amount of movement of a next block from the present position 1aa of the workpiece 4 simultaneously with the above movement and preprocesses a next block of the machining program 1ac. Then, the preprocessing distribution means 1d receives the distribution completion signal ES output from the acceleration/deceleration distribution means 1c, outputs an interpolation pulse IP2 and moves the workpiece 4 to an end position commanded by the next block in the machining program 1ac without temporarily stopping the workpiece 4. Consequently, even if a workpiece configuration is measured by inputting the skip signal SS, the workpiece 4 can be moved without being temporarily stopped so that a cycle time can be reduced. Next, a specific hardware arrangement of the numerical control apparatus 1 will be described. FIG. 2 is a block diagram showing the overall arrangement of a one-axis CNC (numerical control apparatus) as the numerical control apparatus 1. In FIG. 2, the one-axis CNC 10 includes a CPU (processor) 11, a ROM 12, a RAM 13, a PMC (programmable machine controller) 14, an I/O (input/output) unit 15, an axis control circuit 16, a servo amplifier 17, a buffer 18a and a connector 18b. The CPU 11 controls the one-axis CNC 10 in its entirety according to a system program stored in the ROM 12. The RAM 13 is composed of an SRAM or the like and backed up by a battery not shown. Therefore, even if a power supply to the one-axis CNC 10 is shut off, data stored in the RAM 13 is maintained as it is. The RAM 13 stores various data such as the present position 1aa of the workpiece 4, the time constant 1ab, the machining program 1ac and the like. Note, in the relationship with the respective components shown in FIG. 1, the skip signal sensing means 1b, the acceleration/deceleration distribution means 1c and the preprocessing distribution means 1d shown in FIG. 1 are functions realized by the CPU 11 that executes one of the system programs stored in the ROM 12. By a sequence program created in a ladder form, the PMC 14 controls a machine tool through the I/O unit 15 to be described later. More specifically, the PMC 14 converts respective command functions such as an M function, S function, T function and the like commanded by the machining program 1ac into signals necessary to operate a machine tool through the sequence program and outputs the signals. Magnets, hydraulic valves, electric actuators and the like of the machine tool are driven in response to the signals output at this time. Further, the PMC 14 receives signals from limit switches of the machine tool and switches and the like of a machine control panel and carries out a predetermined processing. Further, the PMC 14 receives the skip signal SS output from the laser sensor, the sound sensor or the like as the non-contact type sensor serving as the sensing means 2 through the I/O unit 15. Then, the PMC 14 converts the received skip signal SS into a predetermined data format and sends it to the CPU 11. Note, the CPU 11 may directly read the skip signal through the I/O unit 15. The axis control circuit 16 receives a movement command of a control axis (X-axis) from the CPU 11 and drives a servo motor 17a through the servo amplifier 17. The buffer 18a is connected to the connector 18b and a data packet including an instruction command and the like is sent from the connector 18b to a serial signal line. Next, operation of the present invention will be described with reference to FIGS. 3 to 5. To make the description simple, a case in which a workpiece configuration is measured in a lathe will be described here. FIG. 3 is a view showing an example of a machining program. The machining program 100 is a portion of the machining program lac shown in FIG. 1 and composed of 4 lines from a block 101 to a block 104 and the like for executing operation commands. At the block 101, a series of operations is commanded by an M function "M10" such that the new workpiece 4 is loaded and clamped by a clamp and then gripped by a pusher 3 and the clamped workpiece 4 is released as described later. At the block 102, an X-coordinate is quick fed to "150" and positioned there by a G function "G00". At the block 103, an operation command for measuring the workpiece configuration, i.e., a skip function command is issued by a G function "G31" so that the X-coordinate is moved to "50" at a feed speed "100" (mm/min) by an F function "F100". Note, "#500" in the block 104 means the 500th macro variable. Consequently, the X-coordinate is positioned at the position of a numerical value stored in the macro variable "500" by a G function "G01". Although the blocks following the above blocks are not shown, ordinary lathe turning operation commands and the like will be executed. The positional relationship of the pusher 3 and the workpiece 4 which is changed by a series of the operation commands of the machining program 100 will be described with reference to FIG. 1 and FIG. 3. FIGS. 4(A), 4(B), 4(C), and 4(D) are views showing states of movement of the workpiece 4 gripped by the pusher 3. FIG. 4 (A) shows a state that the newly loaded workpiece 4 is gripped by the pusher 3, FIG. 4 (B) shows a state that the workpiece 4 is sensed by the sensing means 2, FIG. 4 (C) shows a state that the workpiece 4 has moved to the X-coordinate commanded by the operation command at the block 103 of FIG. 3, and FIG. 4 (D) shows a state that the workpiece 4 has finally moved to the X-coordinate commanded by the operation command at the block 104 of FIG. 3. Note, the workpiece 4 is, for example, a columnar metal raw material. In FIG. 4 (A), first, the newly loaded workpiece 4 is gripped by the pusher 3 in response to the operation command issued at the block 101 of FIG. 3. Then, the workpiece 4 is quick fed up to the X-coordinate "150" and positioned there in response to the operation command issued at the block 102. Specifically, the workpiece 4 is positioned so that the right end of the workpiece 4 is positioned at the X-coordinate "150" in the drawing. Thus, a measurement start point for measuring the configuration of the workpiece 4 is set. Then, a sensing wave W for sensing the workpiece 4 as an object to be sensed is output from the sensing means 2 in response to the operation command issued at the block 103 of FIG. 3, and then the pusher 3 and the workpiece 4 move in a moving direction DIR at a feed speed "100" (mm/min"). In FIG. 4 (B), the sensing wave W impinges on the workpiece 4 and the sensing means 2 senses the left end of the workpiece 4 by the reflection of the sensing wave and outputs the skip signal SS shown in FIG. 1. The skip signal sensing means 1b stores the X-coordinate of the left end position of the workpiece 4 in the macro variable "500" of the memory means 1a as the present position 1aa of the workpiece 4 in response to the skip signal SS and outputs the skip completion signal AS. Note, a length of the workpiece 4 can be determined by the X-coordinate "100" of the sensing means 2 and the X-coordinate of the right end position of the workpiece 4 in FIG. 4 (B). For example, when the X-coordinate of the right end position of the workpiece 4 in FIG. 4 (B) is "130", the length of the workpiece 4 is 130 - 100 = 30. Note, the X- coordinate "100" of the sensing means 2 is to be previously measured. Further, the right end position of the workpiece 4 in FIG. 4 (B) is recognized as a present position in the interior of the numerical control apparatus. Further, even if the skip completion signal AS is received, since the acceleration/deceleration distribution means 1c distributes an interpolation pulse IP1 up to an end position, the pusher 3 and the workpiece 4 move in the moving direction DIR without being temporarily stopped. When the pusher 3 and the workpiece 4 move, the preprocessing distribution means 1d preprocesses a next block of the machining block 100, i.e., the block 104. FIG. 4 (C) shows a state that the workpiece 4 has moved to the X-coordinate "50" commanded by the operation command at the block 103 of FIG. 3. and the acceleration/deceleration distribution means 1c outputs a distribution completion signal ES at this time. The preprocessing distribution means 1d having received the distribution completion signal ES outputs an interpolation pulse IP2 and moves the workpiece 4 to an end position commanded at the block 104 of FIG. 3 without temporarily stopping the workpiece 4. Specifically, the preprocessing distribution means 1d moves the workpiece 4 up to the position of a numerical value (the above mentioned 30 mm) stored in the macro variable "500" without temporarily stopping it. FIG. 4 (D) shows a state that the movement of the workpiece 4 has been finished as described above. Next, a processing sequence of the present invention will be described. FIG. 5 is a flowchart showing the processing sequence of the present invention. In FIG. 5, each numeral following the letter "S" represents a step number. Note, steps S1 and S2 are executed by the skip signal sensing means 1b, steps S3 and S4 are executed by the acceleration/deceleration distribution means 1c and step S5 is executed by the preprocessing distribution means 1d. [S1] It is determined whether or not a skip signal SS output from the sensing means 2 is sensed. When the skip signal SS is sensed (YES), the process goes to step S2, whereas when the skip signal SS is not sensed (NO), step S1 is repeated. [S2] The present position 1aa, e.g., the X-coordinate of the workpiece 4 at the time when the skip signal SS is sensed at step S1 is stored in the memory means 1a. [S3] An amount of movement at a next block (an amount of movement to be stored in the macro variable #500 of the block 104 of FIG. 3) is determined based on the present position of the workpiece 4 stored in the memory means 1a and the X-coordinate of the sensing means 2 while a movement command of the present block is executed. [S4] It is determined whether the workpiece 4 has moved to the end position commanded by the present block in the machining program 1ac or not. When the workpiece 4 has moved to the end position (YES), the distribution completion signal ES is output and the process goes to step S5, whereas when the workpiece 4 has not yet moved there (NO), step S4 is repeated. [S5] An interpolation pulse IP2 is output in response to the distribution completion signal ES output at step S4 and the workpiece 4 is moved to the end position commanded by a next block in the machining program 1ac without being temporarily stopped. Since the workpiece 4 is moved without being temporarily stopped even if a workpiece configuration is measured in response to the skip signal SS, a cycle time can be reduced. Further, since the memory means 1a is composed of the non-volatile RAM 13, even if a power supply to the numerical control apparatus 1 is shut off by a power outage or the like, the present position 1aa of the workpiece 4, the time constant 1ab and the machining program 1ac can be maintained without being lost. The present invention is applied to the measurement of the workpiece configuration in a lathe in the above description. Furthermore, it can be also applied to a grinding machine having two or more axes controlled simultaneously in the same way if the position information of the corresponding number of axes is stored as the present position 1aa of the workpiece 4. Further, the present invention can be also applied to the measurement of a tool length in the same way in addition of the measurement of the workpiece configuration. Although the sensing means 2 is composed of the non-contact type sensor such as the laser sensor, the sound sensor or the like, it may be composed of a contact type sensor such as a micro switch and the like provided with a bar-shaped switch knob. Although the time constant 1ab is set by the parameter, it may be set by a predetermined address, a comment sentence or the like in the machining program 1ac. With this arrangement, acceleration and deceleration can be strictly commanded for each machining process in the machining program 1ac. As described above, according to the present invention, the time constant and the machining program are stored in the memory means, the skip signal sensing means having received a skip signal output from the sensing means stores the present position of a workpiece and the like in a predetermined storing region of the memory means as well as determines an amount of movement of a next block based on the present position of the workpiece and the like and the preprocessing distribution means preprocesses the next block of the machining program. Therefore, even if a tool length and a workpiece configuration are measured, the workpiece and the like can be moved without being temporarily stopped and a cycle time can be reduced.

Claims: A numerical control apparatus (1) for measuring a tool length and a workpiece configuration by a skip function, the apparatus characterised by: memory means (la) for storing a time constant used when a feed speed of a workpiece (4) or the like is accelerated or decelerated and a machining program; skip signal sensing means (1b) for storing the present position of said workpiece or the like in a predetermined storing region of said memory means in response to a skip signal output from a sensing means (12) as well as outputting a skip completion signal; acceleration/deceleration distribution means (lc) for outputting a first interpolation pulse for accelerating or decelerating the feed speed based on said time constant and said present position in response to said skip completion signal and outputting a distribution completion signal after said workpiece or the like has been moved to an end position commanded in the present block of said machining program; and preprocessing distribution means (ld) for determining a amount of movement of a next block from the present position of said workpiece or the like in response to said skip completion signal, preprocessing the next block of said machining program and outputting a second interpolation pulse based on said preprocessing in response to said distribution completion signal. A numerical control apparatus (1) according to claim 1, wherein said sensing means (2) is composed of a non-contact type sensor such as a laser sensor, a sound sensor or the like. A numerical control apparatus (1) according to claim 1, wherein said memory means (la) is composed of a non-volatile memory. A numerical control apparatus (1) according to claim 1, wherein the predetermined region of said memory means (la) is a macro variable region. A numerical control apparatus (1) according to claim 1, wherein said time constant is set by a parameter.

Inventors: FUKUI YORIKAZU, MURAKAMI KUNIHIKO, OTSUKI TOSHIAKI, FUKUI, YORIKAZU, MURAKAMI, KUNIHIKO, OTSUKI, TOSHIAKI
Applicants: FANUC LTD, FANUC LTD.
Application year: 1994
Main classification: G05B19
IPC codes: G05B19, B23Q17