Numerical controller provided with program pre-reading function

10191472 ยท 2019-01-29

Assignee

Inventors

Cpc classification

International classification

Abstract

A numerical controller successively pre-reads blocks of a plurality of NC programs from a memory or from a storage device connected via a network, while executing the NC programs in parallel. The execution times of the pre-read blocks are integrated in respect of all of the NC programs that are the object of pre-reading, and when an NC program having the shortest integrated execution time of the pre-read blocks can be pre-read, the next block in that NC program is pre-read. On the other hand, when that NC program cannot be pre-read, the NC program is excluded from the pre-reading objects.

Claims

1. A numerical controller which executes a plurality of numerical control (NC) programs at a same time in parallel by successively pre-reading blocks of the plurality of NC programs from a memory or from a storage device connected via a network so that the generation of an alarm or an immediate axes stop due to the pre-reading failing to be performed in time becomes less liable to occur, the numerical controller comprising: non-transitory computer readable memory; one or more hardware processors coupled to the non-transitory memory and configured to read instructions from the non-transitory memory to cause the numerical controller to perform operations comprising: storing execution times of the respective blocks in the plurality of NC programs; reading out, when one block in an NC program among the plurality of NC programs is pre-read, the execution time of the pre-read block, and calculates a sum total of the execution time of the pre-read block and the execution times of other blocks in the NC program which have been pre-read; extracting, from the plurality of NC programs, one NC program having the smallest sum total of the execution times calculated; and subsequently performing pre-reading of one block of the NC program which is extracted and has the smallest sum total of the execution times among those of the plurality of NC programs.

2. The numerical controller according to claim 1, wherein a result of measuring the execution times of the blocks in each of the NC programs by previously carrying out processing in accordance with the NC program is stored, and the execution times stored are read out in next and subsequent processes.

3. The numerical controller according to claim 2, the operations further comprising: continuously monitoring, in parallel with an operation based on the NC program, an integrated value of the execution times of the pre-read blocks of an NC program which is being executed; decelerating or temporarily halting the operation based on the NC program, when it has been determined that the integrated value of the execution times of the pre-read blocks has become equal to a time required to safely decelerate and halt the operation based on the NC program; pre-reading the NC program from the memory or from the storage device connected via the network, during deceleration or temporarily halting of the operation based on the NC program; and restarting the operation based on the NC program, when the integrated value of the execution times of the pre-read blocks is greater than or equal to the time required to safely decelerate and halt the operation based on the NC program, during deceleration or temporary halting of the operation based on the NC program, wherein the blocks of the plurality of NC programs are pre-read successively from the memory or from the storage device connected via the network.

4. The numerical controller according to claim 2, further comprising a program pre-reading function in which, when the machining is carried out previously and the execution time for the machining is measured and stored, and if a decrease in a feed rate occurs due to the integrated value of the execution times of the pre-read blocks having become equal to a time required for deceleration and halting, then the execution time in a case where no decrease in the feed rate has occurred is stored rather than storing the measured execution time directly.

5. The numerical controller according to claim 1, the operations further comprising: continuously monitoring, in parallel with an operation based on the NC program, an integrated value of the execution times of the pre-read blocks of an NC program which is being executed; decelerating or temporarily halting the operation based on the NC program, when it has been determined that the integrated value of the execution times of the pre-read blocks has become equal to a time required to safely decelerate and halt the operation based on the NC program; pre-reading the NC program from the memory or from the storage device connected via the network, during deceleration or temporarily halting of the operation based on the NC program; and restarting the operation based on the NC program, when the integrated value of the execution times of the pre-read blocks is greater than or equal to the time required to safely decelerate and halt the operation based on the NC program, during deceleration or temporary halting of the operation based on the NC program, wherein the blocks of the plurality of NC programs are pre-read successively from the memory or from the storage device connected via the network.

6. The numerical controller according to claim 1, further comprising a program pre-reading function in which, when the machining is carried out previously and the execution time for the machining is measured and stored, and if a decrease in a feed rate occurs due to the integrated value of the execution times of the pre-read blocks having become equal to a time required for deceleration and halting, then the execution time in a case where no decrease in the feed rate has occurred is stored rather than storing the measured execution time directly.

7. A numerical controller having a program pre-reading function which executes a plurality of numerical control (NC) programs at a same time in parallel by successively pre-reading blocks of the plurality of NC programs from a memory or from a storage device connected via a network so that the generation of an alarm or an immediate axes stop due to the pre-reading failing to be performed in time becomes less liable to occur, the numerical controller comprising: non-transitory computer readable memory; one or more hardware processors coupled to the non-transitory memory and configured to read instructions from the non-transitory memory to cause the numerical controller to perform operations comprising: calculating execution times from contents of commands of the respective blocks in the plurality of NC programs; reading out, when one block in an NC program among the plurality of NC programs is pre-read, the execution time of the pre-read block calculated and calculates a sum total of the execution time of the pre-read block and the execution times of other blocks in the NC program which have been pre-read; extracting, from the plurality of NC programs, one NC program having the smallest sum total of the execution times calculated; and subsequently performing pre-reading of one block of the NC program which is extracted and has the smallest sum total of the execution times among those of the plurality of NC programs.

8. The numerical controller according to claim 7, wherein the operations further include: dividing a tool path into segments which are small sections; determining a speed in a tangential direction of the segment; calculating a time required for a tool to move along each segment, on the basis of the speed in the tangential direction as determined; and determining, as a tool movement time, a sum of the times taken to move along each segment calculated by the segment movement, and wherein the numerical controller is configured so as to calculate a time required for the tool to move along a designated path in accordance with NC commands.

9. The numerical controller according to claim 8, the operations further comprising: continuously monitoring, in parallel with an operation based on the NC program, an integrated value of the execution times of the pre-read blocks of an NC program which is being executed; decelerating or temporarily halting the operation based on the NC program, when it has been determined that the integrated value of the execution times of the pre-read blocks has become equal to a time required to safely decelerate and halt the operation based on the NC program; pre-reading the NC program from the memory or from the storage device connected via the network, during deceleration or temporarily halting of the operation based on the NC program; and restarting the operation based on the NC program, when the integrated value of the execution times of the pre-read blocks is greater than or equal to the time required to safely decelerate and halt the operation based on the NC program, during deceleration or temporary halting of the operation based on the NC program, wherein the blocks of the plurality of NC programs are pre-read successively from the memory or from the storage device connected via the network.

10. The numerical controller according to claim 7, the operations further comprising: continuously monitoring, in parallel with an operation based on the NC program, an integrated value of the execution times of the pre-read blocks of an NC program which is being executed; decelerating or temporarily halting the operation based on the NC program, when it has been determined that the integrated value of the execution times of the pre-read blocks has become equal to a time required to safely decelerate and halt the operation based on the NC program; pre-reading the NC program from the memory or from the storage device connected via the network, during deceleration or temporarily halting of the operation based on the NC program; and restarting the operation based on the NC program, when the integrated value of the execution times of the pre-read blocks is greater than or equal to the time required to safely decelerate and halt the operation based on the NC program, during deceleration or temporary halting of the operation based on the NC program, wherein the blocks of the plurality of NC programs are pre-read successively from the memory or from the storage device connected via the network.

11. The numerical controller according to claim 7, further comprising a program pre-reading function in which, when the machining is carried out previously and the execution time for the machining is measured and stored, and if a decrease in a feed rate occurs due to the integrated value of the execution times of the pre-read blocks having become equal to a time required for deceleration and halting, then the execution time in a case where no decrease in the feed rate has occurred is stored rather than storing the measured execution time directly.

12. A numerical controller which sets a time, a position of an axis, or a position of a spindle, as a reference, and which: stores a plurality of pieces of table format data in which the reference time, the reference axis position or the reference spindle position is associated with a position of an axis or a spindle, other than the reference axis or the reference spindle, in a memory or a storage device connected via a network; and executes the plurality of pieces of table format data in parallel at the same time by successively pre-reading a block of table format data composed of (i) the reference time, the reference axis position or the reference spindle position, and (ii) the position of the axis or the spindle other than the reference axis or the reference spindle, so that the generation of an alarm or an immediate axes stop due to the pre-reading failing to be performed in time becomes less liable to occur, the numerical controller comprising: non-transitory computer readable memory; one or more hardware processors coupled to the non-transitory memory and configured to read instructions from the non-transitory memory to cause the numerical controller to perform operations comprising: storing execution times of the respective blocks in the plurality of pieces of table format data; reading out, when one block in a piece of table format data among the plurality of pieces of table format data is pre-read, the execution time of the pre-read block, and calculating a sum total of the execution time of the pre-read block and execution times of other blocks in the pieces of table format data which have been pre-read; extracting, from the plurality of pieces of table format data, one piece of table format data in which the sum total of the execution times calculated is the smallest; and subsequently performing pre-reading of one block of the piece of table format data which is extracted and has the smallest sum total of the execution times among those of the plurality of table format data.

13. The numerical controller according to claim 12, wherein the operations further comprise storing an execution time of one block in one piece of table format data by predicting the execution time of the one block based on the difference between the reference time of the one block and the reference time of a block immediately before the one block.

14. The numerical controller according to claim 13, the operations further comprising: continuously monitoring, in parallel with an operation based on the table format data, an integrated value of the execution times of the pre-read blocks of table format data which is being executed; decelerating or temporarily halting the operation based on the table format data, when it has been determined that the integrated value of the execution times of the pre-read blocks has become equal to a time required to safely decelerate and halt the operation based on the table format data; pre-reading the table format data from the memory or from the storage device connected via the network, during deceleration or temporarily halting of the operation based on the table format data; and restarting the operation based on the table format data, when the integrated value of the execution times of the pre-read blocks is greater than or equal to the time required to safely decelerate and halt the operation based on the table format data, during deceleration or temporary halting of the operation based on the table format data, wherein the blocks of the table format data are pre-read successively from the memory or from the storage device connected via the network.

15. The numerical controller according to claim 12, the operations further comprising: continuously monitoring, in parallel with an operation based on the table format data, an integrated value of the execution times of the pre-read blocks of table format data which is being executed; decelerating or temporarily halting the operation based on the table format data, when it has been determined that the integrated value of the execution times of the pre-read blocks has become equal to a time required to safely decelerate and halt the operation based on the table format data; pre-reading the table format data from the memory or from the storage device connected via the network, during deceleration or temporarily halting of the operation based on the table format data; and restarting the operation based on the table format data, when the integrated value of the execution times of the pre-read blocks is greater than or equal to the time required to safely decelerate and halt the operation based on the table format data, during deceleration or temporary halting of the operation based on the table format data, wherein the blocks of the table format data are pre-read successively from the memory or from the storage device connected via the network.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) The abovementioned and further objects and characteristic features of the present invention will become evident from the following description of the embodiments with reference to the drawings, in which:

(2) FIG. 1 is a diagram showing the integrated value (the integrated execution time) of the execution times of the pre-read blocks in each of the three programs shown in FIG. 12, at a stage where nine blocks have been pre-read by a numerical controller according to the present invention;

(3) FIG. 2 is a diagram illustrating a flow of a pre-reading process when a plurality of NC programs are executed in parallel by the numerical controller according to the present invention;

(4) FIG. 3 is a block diagram illustrating path table operation;

(5) FIG. 4 is a block diagram illustrating path table operation;

(6) FIG. 5 is an example of path tables for an X axis, a spindle S and an auxiliary function, which are executed in the path table operation shown in FIG. 4;

(7) FIG. 6 is a diagram illustrating an operation executed in accordance with the advance of the reference time, when executing the path tables in FIG. 5;

(8) FIG. 7 is a diagram showing the integrated value of the execution times of the pre-read blocks in each of the three path tables shown in FIG. 14, at a stage where nine blocks have been pre-read by a numerical controller according to the present invention;

(9) FIG. 8 is a diagram illustrating deceleration of the operation by reducing the feed rate override in the case of NC program operation or reducing the time override in the case of path table operation, if pre-reading of an NC program or path table operation is not performed in time, and temporary halting by setting the feed rate override or the time override to zero, if there are not any pre-read blocks at all;

(10) FIG. 9 is a flowchart illustrating processing of an NC program;

(11) FIG. 10 is a flowchart illustrating processing of a path table operation;

(12) FIG. 11 is a principal block diagram of a numerical controller according to the present invention which executes an NC program or path table operation;

(13) FIG. 12 is a diagram showing three program examples which are executed mutually in parallel by pre-reading in NC program operation;

(14) FIG. 13 is a diagram showing the integrated value (the integrated execution time) of the execution times of the pre-read blocks in each of the three programs shown in FIG. 12, at a stage where nine blocks have been pre-read, in accordance with the prior art;

(15) FIG. 14 shows examples of three path tables (X-axis path table <X>, spindle S path table <S> and auxiliary function path table <M>);

(16) FIG. 15 is a diagram showing the integrated value (integrated execution time) of the execution times of the pre-read blocks in each of the three path tables shown in FIG. 14, at a stage where nine blocks have been pre-read, in accordance with the prior art; and

(17) FIG. 16 is an example of the execution time for a particular block in a case where operation is decelerated, when the pre-reading is not performed in time in NC program operation.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

(18) Below, an embodiment of the present invention is described with reference to the drawings, in respect of (I) a case where a plurality of NC programs are executed, and (II) a case where operation (path table operation) is executed on the basis of the table format data.

(19) (I) Executing a Plurality of NC Programs

(20) In the present invention, pre-reading is performed by prioritizing programs having a short integrated value of the execution times of the pre-read blocks. When the three NC programs shown in FIG. 12 are operated, pre-reading is performed according to the sequence indicated below. The values inside the [ ] below indicate the program names, and the integrated values (integrated execution times) of the execution times of the blocks corresponding to the respective programs. Furthermore, the underlining indicates the program having the shortest integrated value of the execution times of the pre-read program blocks. The method for determining the execution times of the blocks in order to integrate the execution times of the pre-read blocks is described below.

(21) (1) N11 is pre-read and then the execution times of the pre-read blocks in each of the programs are integrated.

(22) [Integrated value of execution times of pre-read blocks (O0001, O0002, O0003)=(300, 0, 0)]

(23) (2) Since O0002 has the shortest integrated value of the execution times of the pre-read blocks in (1) above, then N21 is pre-read and subsequently, the execution times of the pre-read blocks of each of the programs are integrated.

(24) [Integrated value of execution times of pre-read blocks (O0001, O0002, O0003)=(300, 10, 0)]

(25) (3) Since 00003 has the shortest integrated value of the execution times of the pre-read blocks in (2) above, then N31 is pre-read and subsequently, the execution times of the pre-read blocks of each of the programs are integrated.

(26) [Integrated value of execution times of pre-read blocks (O0001, O0002, O0003)=(300, 10, 1)]

(27) (4) Since 00003 has the shortest integrated value of the execution times of the pre-read blocks in (3) above, then N32 is pre-read and subsequently, the execution times of the pre-read blocks of each of the programs are integrated.

(28) [Integrated value of execution times of pre-read blocks (O0001, O0002, O0003)=(300, 10, 2)]

(29) (5) Since 00003 has the shortest integrated value of the execution times of the pre-read blocks in (4) above, then N33 is pre-read and subsequently, the execution times of the pre-read blocks of each of the programs are integrated.

(30) [Integrated value of execution times of pre-read blocks (O0001, O0002, O0003)=(300, 10, 3)]

(31) (6) Since O0003 has the shortest integrated value of the execution times of the pre-read blocks in (5) above, then N34 is pre-read and subsequently, the execution times of the pre-read blocks of each of the programs are integrated.

(32) [Integrated value of execution times of pre-read blocks (O0001, O0002, O0003)=(300, 10, 403)]

(33) (7) Since 00002 has the shortest integrated value of the execution times of the pre-read blocks in (6) above, then N22 is pre-read and subsequently, the execution times of the pre-read blocks of each of the programs are integrated.

(34) [Integrated value of execution times of pre-read blocks (O0001, O0002, O0003)=(300, 110, 403)]

(35) (8) Since 00002 has the shortest integrated value of the execution times of the pre-read blocks in (7) above, then N23 is pre-read and subsequently, the execution times of the pre-read blocks of each of the programs are integrated.

(36) [Integrated value of execution times of pre-read blocks (O0001, O0002, O0003)=(300, 160, 403)]

(37) (9) Since 00002 has the shortest integrated value of the execution times of the pre-read blocks in (8) above, then N24 is pre-read and subsequently, the execution times of the pre-read blocks of each of the programs are integrated.

(38) [Integrated value of execution times of pre-read blocks (O0001, O0002, O0003)=(300, 360, 403)]

(39) FIG. 1 is a diagram showing the integrated value (the integrated execution time) of the execution times of the pre-read blocks in each of the three programs shown in FIG. 12, at a stage where nine blocks have been pre-read by the numerical controller according to the present invention. As shown in FIG. 1, at the stage where the same number of blocks as in the prior art case (nine blocks in total) have been pre-read, the integrated value of the execution times of the pre-read blocks in each program is shortest, 300 ms, in the case of O0001. Since pre-reading is performed in parallel during the operation of pre-read blocks, a wait does not occur due to the pre-reading not being performed in time.

(40) FIG. 2 is a diagram illustrating a flow of a pre-reading process when a plurality of NC programs are executed in parallel. This is described below on the basis of the respective steps.

(41) [Step SA01] The execution time of the pre-read blocks is integrated in respect of all of the programs which are targets to be pre-read. This step constitutes an execution time integration unit of the numerical controller.

(42) [Step SA02] It is determined whether or not it is possible to pre-read the program PA having the shortest integrated value of the execution times of the pre-read blocks, and if the program can be pre-read (YES), then the procedure proceeds to step SA03, whereas if the program cannot be pre-read (NO), then the procedure proceeds to step SA04. This step constitutes an execution time determination unit of the numerical controller.

(43) [Step SA03] The next block of the program PA is pre-read and the procedure returns to step SA01. This step constitutes a pre-reading unit of the numerical controller.

(44) [Step SA04] Because it was determined in step SA02 tnat the program PA cannot be pre-read, then program PA is excluded from the pre-reading objects.

(45) [Step SA05] It is determined whether or not any of the programs which have been excluded from the current pre-reading objects has become pre-readable object, and if one of these programs has become a pre-readable object (YES), then the procedure proceeds to step SA06, whereas if none of these programs has become pre-readable (NO), then the procedure proceeds to step SA07.

(46) [Step SA06] The program which could be pre-read is added to the pre-reading objects, and the procedure returns to step SA01.

(47) [Step SA07] It is determined whether or not all of the program have been excluded from the pre-reading objects, and if all of the programs have been excluded from the pre-reading objects (YES), then this process is terminated, whereas if all of the programs have not been excluded from the pre-reading objects (NO), then the procedure returns to step SA01.

(48) The following reasons can be envisaged as examples in which a program is excluded from the pre-reading objects in the flowchart shown in FIG. 2: a program termination, reset, stop by alarm, or pre-read prohibition command.

(49) Here, the method for determining the execution times of the blocks in order to integrate the execution times of the pre-read blocks is described below.

(50) Firstly, in first means for determining the execution times of pre-read blocks, machining is performed in advance by using the machine tool, the execution times of each block when the machining is performed is measured, and the execution times thus measured are stored in a storage device of the controller of the machine tool. In the next and subsequent process by the machine tool, the execution times stored in the storage device are read out to give the execution times of the pre-read blocks.

(51) Next, in second means for determining the execution times of pre-read blocks, the execution times are calculated from the details of the commands in each block of the NC program. This second means (execution time calculation unit) is means for calculating the time required to move the tool along the designated path by an NC command, and is constituted by: means for dividing the tool path into segments, which are small sections; a speed calculation unit which determines a speed in the tangential direction of the segments; a segment movement time calculation unit which calculates the time required to move the tool in each segment, on the basis of the speed in the tangential direction determined by the speed calculation unit; and a tool movement time calculation unit which determines the total time for moving in each segment calculated by the segment movement time calculation unit (in other words, the block execution time). The second means is well-known technology which has been disclosed in Japanese Patent Application Laid-Open No. 2012-93975, and is not described further here.

(52) Here, a supplementary explanation is given with reference to FIG. 8 with regard to monitoring, operational deceleration and temporary halting, in a case where the pre-reading of the NC program operation is not performed in time.

(53) FIG. 8 is a diagram illustrating a case where operation is decelerated by reducing the feed rate override when the pre-reading of the NC program operation is not performed in time, and if there are not any pre-read blocks at all, then the feed rate override is set to zero and the tool is temporarily halted.

(54) When operating while pre-reading a NC program, the pre-read blocks which enable deceleration or halting of the NC program operation are guaranteed, at minimum, with reference to the ratio of the actual rate relative to the current command rate for the feed axis (the feed rate override).

(55) If the pre-reading is not performed in time at the current feed rate override, then the operation is decelerated by reducing the feed rate override, and if there are not any pre-read blocks at all, then the feed rate override is set to zero and the tool is temporarily halted. If pre-reading of a NC program is performed during this deceleration or halting, and the situation of the pre-reading not being performed in time ceases to exist, then an acceleration is applied by increasing the feed rate override.

(56) A method for determining that pre-reading has failed to be performed is now described, taking the current feed rate override to be OVRD, and taking the time for safe deceleration and halting with a linear deceleration to be T (ms).

(57) The integrated value (the integrated execution time) X of the execution times of the pre-read blocks in the period T (ms) from the start of deceleration until a temporary halt is consumed by (OVRD/100)T/2, and therefore, if it is determined that pre-reading has failed to be performed in time when a situation occurs in which
X=(OVRD/100)T/2,
then the deceleration and halting can be performed in the deceleration time T (ms).

(58) The foregoing supposes that deceleration is linear, but it is also possible to determine that pre-reading has failed to be performed in time, in a similar fashion, in the case of bell-shaped deceleration or other situations.

(59) FIG. 9 is a flowchart illustrating processing of an NC program operation. The integrated value of the execution times of the pre-read blocks is taken to be X. The current feed rate override is taken to be OVRD (%) and the deceleration time is taken to be T (ms). This is described below on the basis of the respective steps.

(60) [Step SB01] It is determined whether or not the integrated value X of the execution times of the pre-read blocks is smaller than the amount of time consumed by the pre-read blocks, (OVRD/100)T/2, during the deceleration time T (from the start of deceleration until a temporary halt), and if the integrated value X is smaller (YES), then the procedure proceeds to step SB03, whereas if the integrated value X is not smaller (NO), then the procedure proceeds to step SB02.

(61) [Step SB02] The NC program operation is continued as normal, and the procedure returns to step SB01.

(62) [Step SB03] It is determined whether or not pre-reading has been completed up to the final block, and if pre-reading has been completed up to the final block (YES), then this process is terminated, whereas if pre-reading has not been completed up to the final block (NO), then the procedure proceeds to step SB04.

(63) [Step SB04] It is determined that pre-reading will not be performed in time, and deceleration is started.

(64) [Step SB05] It is determined whether pre-reading is performed and then the integrated value X of the execution times of the pre-read blocks has been updated or not, and if the integrated value X of the execution times of the pre-read blocks has been updated after performing pre-reading (YES), then the procedure proceeds to step SB07, whereas if the integrated value X of the execution times of the pre-read blocks has not been updated after performing pre-reading (NO), then the procedure proceeds to step SB06. [Step SB06] Deceleration is continued (a temporary halt is performed if there are no pre-read blocks), and the procedure returns to step SB05.

(65) [Step SB07] Since the situation of pre-reading not being performed in time has ceased to exist as a result of the routines performed in step SB05 and SB06, then the deceleration or temporary halt is suspended, acceleration is applied, and the procedure returns to step SB01.

(66) FIG. 16 is a diagram illustrating a process for storing the execution time, assuming that the NC program operation is performed at the commanded feed rate (a state where the feed rate override is 100%), even if there is change in the execution time of a particular block, due to the deceleration or temporary halt described above with reference to FIG. 8 and FIG. 9.

(67) During the initial 100 (ms), operation is executed at a feed rate override of 100% in accordance with the command rate, but thereafter, pre-reading is not performed in time, and hence the operation is decelerated by 1.0 (%/ms) and for the following 100 ms, the tool is operated at a feed rate override of 60%, and execution of the corresponding block is finished. In this case, the execution time where deceleration is not to be performed would be: 100(100/100)=100 (ms) in section (1), (100/100+60/100)/240=32 (ms) in section (2), and 100(60/100)=60 (ms) in section (3), making a total of 192 (ms).

(68) Therefore, even if deceleration and a temporary halt is performed without the pre-reading being performed in time, it is still possible to store an accurate execution time by the first means described above.

(69) (II) Executing Operation (Path Table Operation) Based on Table Format Data

(70) In the table format data used in path table operation, a time or a position of an axis or spindle is used as a reference time or a reference axis or spindle position, and a position of an axis or spindle, other than the axis or spindle of which position serves as the reference axis or spindle position, is associated with the reference time or reference axis or spindle position.

(71) In operation based on table format data, all of the axes operate in synchronization with the reference time, by designating, on the basis of the table format data, the timings at which the tool is to pass through each point of the program path. Similarly, all of the command for the spindle and auxiliary function commands are output in synchronization with the reference time, by designating, on the basis of the table format data, the timings at which the command for the spindle and auxiliary function commands are output.

(72) FIG. 3 is a path table operation block diagram which is disclosed in Japanese Patent Application Laid-Open No. 2012-234445 described above.

(73) A numerical controller which performs path table operation is provided with: a reference value counter 3, an X axis path table Tx, a Z axis path table Tz, an X axis path table interpolation processing unit 4x, a Z axis path table interpolation processing unit 4z, an X axis (feed axis) motor 5x, and a Z axis (feed axis) motor 5z.

(74) The reference time may be shared with all of the table format data, or alternatively, it is possible to use individual reference times for each table format data. In the description given below, for the purposes of simplicity, it is assumed that a common reference time is used for all of the table format data.

(75) Japanese Patent Application Laid-Open No. 2012-234445 described above also discloses the path table operation block diagram shown in FIG. 4.

(76) The numerical controller which performs the path table operation shown in FIG. 4 is provided with: a first reference value counter 3a, a second reference value counter 3b and a third reference value counter 3c, which count, in respectively independent fashion, a time, the position of a spindle, or the position of a feed axis; an X axis path table Tx; a spindle path table Ts; an auxiliary function path table Tm; an X axis path table interpolation processing unit 4x; a spindle path table interpolation processing unit 4s; an auxiliary function path table output processing unit 4m; an X axis motor 5x; and a spindle motor 5s.

(77) The first reference value counter 3a, the second reference value counter 3b and the third reference value counter 3c count a signal from a clock function of the numerical controller or a position detection signal from a position detector which is installed on the respective feed axes or the spindle. When the first reference value counter 3a, the second reference value counter 3b and the third reference value counter 3c respectively receive a counter reset signal, the count value is returned to an initial value, when a halt signal is received thereby, the updating of the count value is stopped, and when a restart signal is received, the updating of the count value is restarted.

(78) The reference values from the first reference value counter 3a, the second reference value counter 3b and the third reference value counter 3c are switched as desired, by switches 6a, 6b and 6c. For example, the path table operation can be executed by executing the X axis path table Tx in accordance with the reference value from the first reference value counter 3a, executing the spindle path table Ts in accordance with the reference value from the second reference value counter 3b, and executing the auxiliary function path table Tm in accordance with the reference value from the third reference value counter 3c. Alternatively, path table operation can also be executed by executing all of the path tables Tx, Ts, Tm in accordance with the reference value from the reference value counter 3a, depending on the settings of the switches 6a, 6b and 6c.

(79) Examples are given here of an X axis path table, a spindle S path table and an auxiliary function path table shown in FIG. 5, which are executed by the numerical controller shown in FIG. 4. When the path tables shown in FIG. 5 are executed by the numerical controller in FIG. 4, then the machine tool performing a path table operation carries out the operations shown in FIG. 6, as the reference time progresses.

(80) In the present invention, pre-reading is performed by prioritizing the pre-reading of the path table having a short integrated value of the execution times of the pre-read blocks. If the path tables shown in FIG. 14 are operated, pre-reading is performed in the following sequence. The values inside the [ ] below indicate the path table names, and the integrated values (integrated execution times) of the execution times of the blocks corresponding to the respective path tables. Furthermore, the underlining indicates the path table having the shortest integrated value of the execution times of the pre-read program blocks. The execution times of the blocks for integrating the execution times of the pre-read blocks are described below.

(81) (1) L1 in <X> is pre-read and then the execution times of the pre-read blocks in each of the programs are calculated.

(82) [Integrated value of execution times of pre-read blocks (<X>, <S>, <M>)=(1, 0, 0)]

(83) (2) Since <S> has the shortest integrated value of the execution times of the pre-read blocks in (1) above, then L100 in <S> is pre-read and subsequently, the execution times of the pre-read blocks of each of the programs are calculated.

(84) [Tntegrated value of execution times of pre-read blocks (<X>, <S>, <M>)=(1, 100, 0)]

(85) (3) Since <M> has the shortest integrated value of the execution times of the pre-read blocks in (2) above, then L1000 in <M> is pre-read and subsequently, the execution times of the pre-read blocks of each of the programs are calculated.

(86) [Integrated value of execution times of pre-read blocks (<X>, <S>, <M>)=(1, 100, 1000)]

(87) (4) Since <X> has the shortest integrated value of the execution times of the pre-read blocks in (3) above, then L2 in <X> is pre-read and subsequently, the execution times of the pre-read blocks of each of the programs are calculated.

(88) [Integrated value of execution times of pre-read blocks (<X>, <S>, <M>)=(2, 100, 1000)]

(89) (5) Since <X> has the shortest integrated value of the execution times of the pre-read blocks in (4) above, then L3 in <X> is pre-read and subsequently, the execution times of the pre-read blocks of each of the programs are calculated.

(90) [Integrated value of execution times of pre-read blocks (<X>, <S>, <M>)=(3, 100, 1000)]

(91) (6) Since <X> has the shortest integrated value of the execution times of the pre-read blocks in (5) above, then L300 in <X> is pre-read and subsequently, the execution times of the pre-read blocks of each of the programs are calculated.

(92) [Integrated value of execution times of pre-read blocks (<X>, <S>, <M>)=(300, 100, 1000)]

(93) (7) Since <S> has the shortest integrated value of the execution times of the pre-read blocks in (6) above, then L150 in <S> is pre-read and subsequently, the execution times of the pre-read blocks of each of the programs are calculated.

(94) [Integrated value of execution times of pre-read blocks (<X>, <S>, <M>)=(300, 150, 1000)]

(95) (8) Since <S> has the shortest integrated value of the execution times of the pre-read blocks in (7) above, then L200 in <S> is pre-read and subsequently, the execution times of the pre-read blocks of each of the programs are calculated.

(96) [Integrated value of execution times of pre-read blocks (<X>, <S>, <M>)=(300, 200, 1000)]

(97) (9) Since <S> has the shortest integrated value of the execution times of the pre-read blocks in (8) above, then L300 in <S> is pre-read and subsequently, the execution times of the pre-read blocks of each of the programs are calculated.

(98) [Integrated value of execution times of pre-read blocks (<X>, <S>, <M>)=(300, 300, 1000)]

(99) FIG. 7 is a diagram showing the integrated value of the execution times of the pre-read blocks in each of the three path tables shown in FIG. 14, at a stage where nine blocks have been pre-read, in accordance with the present invention.

(100) As shown in FIG. 7, at the stage where the same number of blocks as in the prior art case (nine blocks in total) have been pre-read, the integrated value of the execution times of the pre-read blocks is shortest, 300 ms, in the case of <X> and <S>. Since pre-reading is performed in parallel during the operation of pre-read blocks, there is a low probability of the pre-reading not being performed in time. Even if the pre-reading is not performed in time, since the operation of the path table involves a wait for pre-reading, then an alarm or immediate axes stop is not caused, as with the prior art technology.

(101) Here, a supplementary explanation is given with reference to FIG. 8 with regard to monitoring, operational deceleration and temporary halting, in a case where the pre-reading of the path table operation is not performed in time. FIG. 8 is a diagram illustrating a case where operation is decelerated by reducing the time override when the pre-reading of the path table operation is not performed in time, and if there are not any pre-read blocks at all, then the time override is set to zero to perform a temporary halt.

(102) When operating while pre-reading path tables, the pre-read blocks which enable deceleration and halting of the path table operation are guaranteed, at minimum, with reference to the rate of advance of the current reference time (time override).

(103) If the pre-reading is not performed in time at the current time override, then the operation is decelerated by reducing the time override, and if there are not any pre-read blocks at all, then the time override is set to zero and the tool is temporarily halted. If pre-reading of the path table is performed during deceleration or halting, and the situation of the pre-reading not being performed in time has ceased to exist, then an acceleration is applied by increasing the time override.

(104) A method for calculating the reference time in order to determine that pre-reading has failed to be performed in time is now described, taking the current time override to be OVRD, and taking the time for decelerating and halting safely with a linear deceleration to be T (ms).

(105) The integrated value (the integrated execution time) X of the execution times of the pre-read blocks in the period T (ms) from the start of deceleration until a temporary halt is consumed by (OVRD/100)T/2, and therefore, if it is determined that the pre-reading has failed to be performed in time when a situation occurs in which
X=(OVRD/100)T/2,
then deceleration and halting can be performed in the deceleration time T (ms).

(106) The foregoing supposes that deceleration is linear, but it is also possible to calculate the reference time in order to determine that pre-reading has failed to be performed in time, in a similar fashion, in the case of bell-shaped deceleration or other situations.

(107) FIG. 10 is a flowchart illustrating processing in a path table operation. The integrated value of the execution times of the pre-read blocks is taken to be X. The current time override is taken to be OVRD (%) and the deceleration time is taken to be T (ms). This is described below on the basis of the respective steps.

(108) [Step SC01] It is determined whether or not the integrated value X of the execution times of the pre-read blocks is smaller than the amount of time consumed by the pre-read blocks, (OVRD/100)T/2, during the deceleration time T (from the start of deceleration until the temporary halt), and if the integrated value X is smaller (YES), then the procedure proceeds to step SC 03, whereas if the integrated value X is not smaller (NO), then the procedure proceeds to step SC02.

(109) [Step SC02] The table format data operation is continued as normal, and the procedure returns to step SC01.

(110) [Step SC03] It is determined whether or not pre-reading has been completed up to the final block, and if pre-reading has been completed up to the final block (YES), then this process is terminated, whereas if pre-reading has not been completed up to the final block (NO), then the procedure proceeds to step SC04.

(111) [Step SC04] It is determined that pre-reading is not being be performed in time, and deceleration is started.

(112) [Step SC05] Pre-reading is performed, it is determined whether or not the integrated value X of the execution times of the pre-read blocks has been updated, and if the integrated value X of the execution times of the pre-read blocks has been updated (YES), then the procedure proceeds to step SC07, whereas if the integrated value X of the execution times of the pre-read blocks has not been updated (NO), then the procedure proceeds to step SC06.

(113) [Step SC06] Deceleration is continued (a temporary halt is performed if there are no pre-read blocks), and the procedure returns to step SC05.

(114) [Step SC07] Because the situation of the pre-reading not being performed in time has ceased to exist due to the processes in step SC05 and SCO6, then the deceleration or temporary halt is suspended, acceleration is applied, and the procedure returns to step SC01.

(115) The execution times of the blocks which are used for integrating the execution times of the pre-read blocks are described below. The execution time integration unit which integrates the execution times of the pre-read blocks is means for predicting the integrated value of the execution times of the pre-read blocks, from the difference between the current reference time and the reference times of the pre-read blocks.

(116) FIG. 11 is a principal block diagram of a numerical controller according to the present invention which executes an NC program or path table operation. The CPU 11 is a processor which implements overall control of the numerical controller 10. The CPU 11 reads out a system program stored in a ROM 12, via the bus 20, and controls the whole of the numerical controller 10 in accordance with this system program. Temporary calculation data, display data and various data input by the operator via the display device or manual data input (MDI) unit 70 is stored in a RAM 13. The SRAM 14 is backed up by a battery (not illustrated), and is configured as a non-volatile memory in which the storage device is maintained, even if the power supply to the numerical controller 10 is turned off.

(117) A machining program (NC program) which is read out via the interface 15 and a machining program input via the display device MDI unit 70, and the like, are stored in the SRAM 14. Moreover, the various table format data (path tables) described above are stored in advance. Furthermore, various system programs for creating a machining program and executing editing routines, are written in advance to the ROM 12. With regard to the storage location of the NC programs and path tables, in the present invention, the NC program and path table data may be stored in advance in an external storage device which is connected via a network, for example, rather than in a storage device inside the numerical controller, and the respective blocks of the NC programs and the data of the path tables may be read out successively via the network.

(118) The interface 15 makes it possible to connect the numerical controller 10 and an external device such as an adapter (not illustrated). Furthermore, a machining program that has been edited in the numerical controller 10 can be stored in an external storage device, via an external device. The programmable machine controller (PMC) 16 implements control by outputting signals via the I/O unit 17 to the auxiliary equipment, such as the actuators, of the machine tool, in accordance with a sequence program which is installed in the numerical controller 10. Furthermore, the PMC 16 also receives signals from various switches, and the like, of the operating panel which is provided on the main body of the machine tool, carries out necessary signal processing on those signals, and transfers same to the CPU 11. The display device/MDI unit 70 is a manual data input device provided with a display monitor and a keyboard, etc., and the interface 18 receives data and commands from the display device and/or the keyboard of the MDI unit 70 and transfers same to the CPU 11. The interface 19 is connected to the operating panel 71 so as to receive various commands from the operating panel 71.

(119) Axis control circuits 30, 31 of the feed axes receive movement commands for the respective feed axes from the CPU 0.1, and output the commands for the respective feed axes to servo amplifiers 40, 41. The servo amplifiers 40, 41 receive these commands and drive the servo motors 50x, 51z of the feed axes. The servo motors 50x, 51z of the feed axes have built-in position/speed detectors (not illustrated), and position and speed feedback signals from the position/speed detectors are fed back to the axis control circuits 30, 31 so as to perform feedback control of the position and speed. In FIG. 11, this position and speed feedback is not illustrated.

(120) Furthermore, the spindle control circuit 60 receives a spindle rotation command and outputs a spindle speed signal to a spindle amplifier 61. The spindle amplifier 61 receives the spindle speed signal and causes the spindle motor (spindle motor) 62 to rotate at a designated speed of rotation. A position coder 63 feeds back a feedback pulse (reference pulse) and a single rotation signal, to the spindle control circuit 60, in synchronization with the rotation of the spindle motor (spindle motor) 62, and implements speed control. This feedback pulse (reference pulse) and the single rotation signal are read in by the CPU 11 via the spindle control circuit 60, and the feedback pulse (reference pulse) is counted up by a counter which is provided in the RAM 13 (a counter corresponding to the respective reference value counters shown in FIG. 3 and FIG. 4). The command pulses of the spindle may also be counted.

(121) Furthermore, the counter provided in the RAM 13 may obtain a reference signal for path table operation by counting up the number of pulses of a time signal which is obtained from a clock function provided in the numerical controller 10, or by counting up the number of pulses obtained from a feedback signal from the feed axis or the number of feed axis command pulses.