Numerical controller

A numerical controller for generating block information of a path by analyzing an axis movement command described in a machining program includes a command analysis unit for analyzing the machining program in which the axis movement command for a plurality of sections is described in one block in a reading processing for the one block to specify a plurality of coordinate values, a command synthesis unit for generating a plurality of direction vectors constituting the path based on the plurality of coordinate values and generating a resultant vector obtained by adding the direction vectors, and a block information generation unit for generating the block information based on the resultant vector.

RELATED APPLICATIONS

The present application claims priority to Japanese Patent Application Number 2019-000836 filed Jan. 7, 2019, the disclosure of which is hereby incorporated by reference herein in its entirety.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present disclosure relates to a numerical controller, and particularly relates to a numerical controller that realizes efficient performance of a synthesis processing for blocks in a continuous axis control command.

2. Description of the Related Art

In a machining program (NC program) executed by a numerical controller, one line segment or arc movement command is normally described for each block. Therefore, when a machining path including a plurality of line segments or arcs is commanded, it is necessary to describe the axis movement command continuously over a plurality of blocks (seeFIG. 1).

In addition, the numerical controller normally reads command blocks described in the NC program successively from a head to analyze a program, generates block information, performs interpolation processing based on the block information, and creates a distribution pulse of each axis.

To obtain an excellent machined surface, the numerical controller needs to continuously create and output the distribution pulse without interruption. For this reason, the numerical controller needs to complete creation of block information necessary for interpolation prior to interpolation processing. Therefore, the numerical controller normally starts reading each block of the NC program before a command described in the block is executed, and analyzes all commands included in the NC program, which is referred to as prefetch processing (seeFIG. 2).

When a workpiece is machined into a complicated shape, the number of blocks of an axis movement command included in the NC program tends to increase. In the NC program having a large number of blocks, when an operator, etc. desires to check a rough machining path or machining flow by performing a test operation, etc., the numerical controller needs to analyze all the blocks and calculate a path. Therefore, there is a problem that processing in the numerical controller takes a large amount of time.

Conventionally, there has been a known numerical controller that reduces the number of program blocks by synthesizing program blocks within an allowable tolerance (for example, JP 9-288509 A, etc.).

However, in a method described in JP 9-288509 A, each time one block of a program is read, it is necessary to determine whether the read block corresponds to a linear interpolation block. In addition, there is a limit to the number of blocks that can be synthesized depending on the maximum number of blocks of prefetch processing.

Therefore, there is a demand for a numerical controller that realizes efficient performance of a synthesis processing for blocks in a continuous axis control command.

SUMMARY OF THE INVENTION

A numerical controller according to an embodiment of the disclosure is a numerical controller for generating block information of a path by analyzing an axis movement command described in a machining program, the numerical controller including a command analysis unit for analyzing the machining program in which the axis movement command for a plurality of sections is described in one block in a reading processing for the one block to specify a plurality of coordinate values, a command synthesis unit for generating a plurality of direction vectors constituting the path based on the plurality of coordinate values and generating a resultant vector obtained by adding the direction vectors, and a block information generation unit for generating the block information based on the resultant vector.

In the numerical controller according to the embodiment of the disclosure, the command synthesis unit generates the resultant vector when a tolerance related to the resultant vector is less than a predetermined allowable value.

In the numerical controller according to the embodiment of the disclosure, the command synthesis unit generates the resultant vector when a length of the resultant vector is less than a predetermined allowable value.

In the numerical controller according to the embodiment of the disclosure, the command synthesis unit generates the resultant vector when a plurality of the axis movement commands includes the same feed speed or main axis rotating speed.

In the numerical controller according to the embodiment of the disclosure, the command synthesis unit generates the resultant vector when a plurality of the axis movement commands includes a specific and the same G code, T code, or mode command.

According to an aspect of the disclosure, it is possible to provide a numerical controller that realizes efficient performance of a synthesis processing for blocks in a continuous axis control command.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 3is a schematic hardware configuration diagram illustrating a numerical controller1according to an embodiment. The numerical controller1is a device that controls an industrial machine including a machine tool. The numerical controller1includes a central processing unit (CPU)11, a read only memory (ROM)12, a random access memory (RAM)13, a nonvolatile memory14, a bus10, an axis control circuit16, a servo amplifier17, and an interface18. A servomotor50and an input/output device60are connected to the numerical controller1.

The CPU11is a processor that controls the numerical controller1as a whole. The CPU11reads a system program stored in the ROM12via the bus10. The CPU11controls the entire numerical controller1according to the system program.

For example, the ROM12stores in advance a system program for executing various controls of a machine.

The RAM13temporarily stores calculation data or display data, and data, a program, or the like input by an operator via the input/output device60.

For example, the nonvolatile memory14is backed up by a battery (not illustrated). The nonvolatile memory14maintains a storage state even when a power source of the numerical controller1is turned off. The nonvolatile memory14stores data, a program, etc. input from the input/output device60. The program and data stored in the nonvolatile memory14may be loaded in the RAM13during execution and use.

The axis control circuit16controls an operating axis of the machine. The axis control circuit16receives a movement command amount of the axis output by the CPU11and outputs a movement command of the operating axis to the servo amplifier17.

The servo amplifier17receives the axis movement command output by the axis control circuit16and drives the servomotor50.

The servomotor50is driven by the servo amplifier17to move the operating axis of the machine. In the present embodiment, a spindle is moved by the servomotor50. For example, the servomotor50has a position/speed detector. The position/speed detector outputs a position/speed feedback signal. This position/speed feedback signal is fed back to the axis control circuit16so that position/speed feedback control is performed.

Incidentally, inFIG. 3, only one set of an axis control circuit16, a servo amplifier17, and a servomotor50is illustrated. However, in practice, the set is prepared for each axis provided in the machine to be controlled.

The input/output device60is a data input/output device including a display, a hardware key, etc. For example, the input/output device60is an MDI unit or an operation panel. The input/output device60displays information received from the CPU11via the interface18on a display. The input/output device60passes a command, data, etc. input from a hardware key, etc. to the CPU11via the interface18.

FIG. 15is a block diagram illustrating an outline of a functional configuration of the numerical controller1. The numerical controller1includes a command analysis unit101, a command synthesis unit102, and a block information generation unit103.

The command analysis unit101reads and analyzes a machining program including an axis movement command that can define line segments of a plurality of sections using a command of one block. The command analysis unit101specifies all coordinate points as movement destinations based on an analysis result of the machining program. When there is a plurality of coordinate points specified by the command analysis unit101, the command synthesis unit102performs a processing of synthesizing vectors constituting a machining path. The block information generation unit103generates block information of the machining path indicated by a vector synthesized by the command synthesis unit102.

A specification of the axis movement command of the present embodiment that can be analyzed by the command analysis unit101will be described with reference toFIG. 4toFIG. 6.FIG. 4is a diagram illustrating an example of a conventional axis movement command. The axis movement command includes a combination of an address indicated by alphabets (G, X, Y, Z, etc.) and a command value indicated by numbers. Commands such as G91 and G00 are referred to as G codes. G code causes the numerical controller1to execute a preparation function for performing machining. A command such as F4000. is a movement command. A numerical value of the movement command indicates a feed speed. Each command such as X1.5, Y2., and Z-95 designates a coordinate value or a movement amount of an X-axis, a Y-axis, and a Z-axis. According to a conventional description method for the axis movement command, in principle, only one line segment can be expressed by one block (one line of the machining program).

On the other hand, in the axis movement command of the present embodiment, content corresponding to a command for a plurality of conventional blocks can be described using a command of one block. This axis movement command has the following features.

(1) Within a command of one block, it is possible to designate a plurality of command values (coordinate values, movement amounts, etc.) corresponding to each address.

(2) A correlation between an address and a command value is described according to a predetermined rule. The rule is not particularly limited. For example, the following rules are present.

(a) A correlation between an address and a plurality of command values is defined by a plurality of types of predetermined delimiters. For example, in an example ofFIG. 5, a set of command values for each section is defined by “[” and “]” (square brackets). In addition, “,” (comma) indicates a delimiter between command values of each address. That is, [x1, y1, z1] is a command value group that defines a line segment in a first section, x1 is an X-axis command value, y1 is a Y-axis command value, and z1 is a Z-axis command value. Similarly, [x2, y2, z2] is a command value group that defines a line segment in a second section, and [x3, y3, z3] is a command value group that defines a line segment in a third section.

FIG. 6is an axis movement command described according to a format illustrated inFIG. 5. Content described inFIG. 6is equivalent to the axis movement command according to a conventional description method illustrated inFIG. 4. Axis movement commands described from a second line to a third line inFIG. 4are integrated in a second line inFIG. 6. Similarly, axis movement commands described from a fourth line to a sixth line inFIG. 4are integrated in a third line inFIG. 6. In the present embodiment, it is possible to integrate conventional commands for a plurality of blocks into a command for one block.

(b) Correlations between addresses and a plurality of command values are defined by predetermined delimiters and numerical order. For example, a command value group x1, y1, and z defining line segments in a first section (x1 is a command value on the X-axis, y1 is a command value on the Y-axis, and z1 is a command value on the Z-axis), a command value group x2, y2, and z2 defining line segments in a second section (x2 is a command value on the X-axis, y2 is a command value on the Y-axis, and z2 is a command value on the Z-axis), . . . , a command value group xn, yn, and zn defining line segments in an n-th section (xn is a command value on the X-axis, yn is a command value on the Y-axis, and zn is a command value on the Z-axis) can also be collectively described for each section as follows.
X, Y, Z =x1, y1, z1, x2, y2, z2, . . . , xn, yn, zn

(c) The command shown in the above item (a) or (b) can also be described using an array type variable.FIG. 7(second line and fourth line) is an example in which the following axis movement command A is rewritten using an array type variable. The axis movement command A is described according to a format shown inFIG. 5. InFIG. 7, a right side of the axis movement command A is stored in advance in an array type variable (second line), and the command is described in a form referring to the variable (fourth line).

Axis movement command A:

(d) A command shown in the above item (a) or (b) can also be described using an external file reference.

FIG. 8(third line) is an example in which the following axis movement command B is rewritten using an external file reference. The axis movement command B is described according to a format shown inFIG. 5. InFIG. 8, content corresponding to a right side of the axis movement command B is described in advance in an external file (PATH1.csv), and the command is described in a form referring to content of the file (third line).

Axis movement command B:

Similarly,FIG. 9(third line) is an example in which the following axis movement command C is rewritten using an external file reference. The axis movement command C is described according to a format shown inFIG. 5. InFIG. 9, content corresponding to a right side of the axis movement command C is described in advance in an external file (CAM_DATA.NC), and the command is described in a form referring to content of the file (third line).

Axis movement command C:

A file format of the external file or a format of the axis movement command may be any file format or format as long as a correlation with the command content before rewriting is maintained. However, it is necessary that the command analysis unit101can recognize the correlation and restore the command content before rewriting.

(e) A command can also be described in a form referring to data set.FIG. 10(second line) is an example in which the following axis movement command D is rewritten into a format referring to a data set. InFIG. 10, content of a part following N21 of the axis movement command D is stored in advance in a data set (for example, a structure) (CYCLE1), and the command is described in a form referring to content of the data set (second line).

Axis movement command D:

The format of the data set may be any format as long as a correlation with the command content before rewriting is maintained. However, it is necessary that the command analysis unit101can recognize the correlation and restore the command content before rewriting. Even when a data set is used, an address is described only once in the data set.

(3) For an address having no change in a command value, command description may be omitted. For example, in an example ofFIG. 6, when the Z-axis does not move (first line), only the commands related to the X-axis and the Y-axis are described, and no command is described for the Z-axis. Similarly, when the X-axis does not move (third line), only commands related to the Y-axis and the Z-axis are described in this block, and no command is described for the X-axis.

(4) A command value (numerical value) may be omitted while defining an axis address. For example, the axis movement command F can be described as follows.

Axis movement command F:

This command is obtained by integrating and describing an axis movement command G, which has been described as the follows in a conventional description method, into one line.

Axis movement command G:

The processing of synthesizing the vectors constituting the machining path will be described in detail with reference toFIG. 16toFIG. 19. In normal machining, machining is performed according to a machining path formed by successively connecting coordinate points specified by the command analysis unit101. Meanwhile, when the operator, etc. desires to check a rough machining path or machining flow during test operation, etc., several direction vectors constituting the machining path are synthesized (path synthesis processing), and a simplified machining path is generated. In this way, the operation is performed based on the simplified machining path. In examples illustrated inFIG. 16andFIG. 17, the command synthesis unit102determines whether to execute the path synthesis processing based on tolerance. In examples illustrated inFIG. 18andFIG. 19, the command synthesis unit102determines whether to execute the path synthesis processing based on a path length.

(A) Path synthesis processing based on tolerance

The tolerance Tr refers to a distance between a connection point of two direction vectors and a resultant vector when the resultant vector is generated by synthesizing the two direction vectors constituting the machining path. For example, when a direction vector from a start point to coordinates [x1, y1] and a direction vector from the coordinates [x1, y1] to coordinates [x2, y2] are synthesized to generate a resultant vector from the start point to the coordinates [x2, y2], a distance from the coordinates [x1, y1] to the resultant vector corresponds to the tolerance Tr (seeFIG. 17).

In this processing, a resultant vector is generated when the tolerance Tr is less than a predetermined threshold value. On the other hand, when the tolerance Tr is equal to or greater than the predetermined threshold value, no resultant vector is generated. Due to this limitation, a simplified machining path is generated without greatly deviating from an original machining path.

FIG. 16is a flowchart for description of the path synthesis processing performed based on the tolerance. The command synthesis unit102reads a coordinate point having an earliest machining order among the plurality of coordinate points specified by the command analysis unit101(SA101). The command synthesis unit102generates a direction vector to the read coordinate point using a current position (start point) as an origin (SA102). In addition, the command synthesis unit102stores the generated direction vector as a first resultant vector (SA103to SA104).

In an example illustrated in (a) ofFIG. 17, the command analysis unit101specifies a plurality of coordinate points based on the following axis movement command H.

Axis movement command H:

The following three coordinate points are specified by the axis movement command H.

The command synthesis unit102first reads the coordinates [x1, y1] among these coordinates, and generates a direction vector from the start point, that is, the current position to the coordinates [x1, y1]. In addition, the command synthesis unit102stores the generated direction vector as a first resultant vector.

Subsequently, the command synthesis unit102reads a coordinate point of a subsequent machining order using the coordinate point read in SA101as a new origin (SA101), and generates a direction vector from the origin to the read coordinate point (SA102).

In the example illustrated in (a) ofFIG. 17, the command synthesis unit102reads the coordinates [x2, y2] and generates a direction vector from the origin [x1, y1] to the coordinates [x2, y2].

The command synthesis unit102adds the generated direction vector to the first resultant vector to generate a new resultant vector (SA103to SA107).

In an example illustrated in (b) ofFIG. 17, the first resultant vector from the start point to the coordinates [x1, y1] and the direction vector from the coordinates [x1, y1] to the coordinates [x2, y2] are added to generate a new resultant vector from the start point to the coordinates [x2, y2].

The command synthesis unit102calculates the tolerance Tr related to the synthesis processing, that is, a distance between a connection point of two vectors corresponding to basis of the new resultant vector and the new resultant vector (SA108).

In the example illustrated in (b) ofFIG. 17, a connection point between two vectors (the first resultant vector from the start point to the coordinates [x1, y1] and the direction vector from the coordinates [x1, y1] to the coordinates [x2, y2]) corresponding to basis of the new resultant vector (new resultant vector from the start point to the coordinates [x2, y2]) corresponds to [x1, y1]. Therefore, the command synthesis unit102calculates the distance Tr between a point indicated by the coordinates [x1, y1] and the new resultant vector.

The command synthesis unit102compares the tolerance Tr with an allowable value (threshold value) (SA109). When the tolerance Tr is less than a predetermined allowable value, the command synthesis unit102repeats processing of SA101to SA108, further reads a new coordinate point, and generates a new resultant vector.

For example, when the tolerance Tr illustrated in (b) ofFIG. 17is less than the allowable value, the command synthesis unit102reads a new coordinate point [x3, y3], and generates a direction vector from the previously read coordinate point [x2, y2] to the newly read coordinate point [x3, y3]. The command synthesis unit102adds the newly generated direction vector and the previously generated resultant vector to generate a new resultant vector from the start point to the coordinates [x3, y3].

On the other hand, when the tolerance Tr is equal to or greater than the predetermined allowable value, the command synthesis unit102discards the currently generated resultant vector and transfers the previously generated resultant vector to the block information generation unit103. In this way, a path indicated by the previously generated resultant vector is adopted as a simple machining path. Further, the command synthesis unit102sets the previously read coordinate value as an origin, and sets the currently generated direction vector as the first resultant vector (SA111to SA113). Hereinafter, the same processing is repeated for the plurality of coordinate points specified by the command analysis unit101.

For example, when the tolerance Tr illustrated in (c) ofFIG. 17is equal to or greater than the allowable value, the command synthesis unit102discards the currently generated resultant vector (a new resultant vector from the start point to the coordinates [x3, y3]). In addition, the command synthesis unit102determines a path indicated by the previously generated resultant vector (resultant vector from the start point to the coordinates [x2, y2]) as the machining path ((d) ofFIG. 17).

(B) Path synthesis processing based on path length

A path length refers to a length of a resultant vector when the resultant vector is generated by synthesizing two direction vectors constituting a machining path. For example, a direction vector from the start point to the coordinates [x1, y1] and a direction vector from the coordinates [x1, y1] to the coordinates [x2, y2] are synthesized to generate a resultant vector from the start point to the coordinates [x2, y2]. In this case, a distance from the start point to the coordinates [x2, y2] is the path length (seeFIG. 19).

In this processing, the resultant vector is generated when the path length is less than a predetermined threshold value. On the other hand, when the path length is greater than or equal to the predetermined threshold, no resultant vector is generated. Due to this limitation, a simplified machining path is generated without greatly deviating from an original machining path.

FIG. 18is a flowchart for description of a path synthesis processing performed based on the path length. The command synthesis unit102reads a coordinate point having an earliest machining order among the plurality of coordinate points specified by the command analysis unit101(SB101). The command synthesis unit102generates a direction vector to the read coordinate point using a current position (start point) as an origin (SB102). In addition, the command synthesis unit102stores the generated direction vector as the first resultant vector (SB103to SB104).

In an example illustrated in (a) ofFIG. 19, the command analysis unit101specifies a plurality of coordinate points based on the following axis movement command I.

Axis movement command I:

The following three coordinate points are specified by the axis movement command I.

The command synthesis unit102first reads the coordinates [x1, y1] among these coordinates, and generates a direction vector from the start point, that is, the current position to the coordinates [x1, y1]. In addition, the command synthesis unit102stores the generated direction vector as a first resultant vector.

Subsequently, the command synthesis unit102reads a coordinate point of a subsequent machining order using the coordinate point read in SB101as a new origin (SB101), and generates a direction vector from the origin to the read coordinate point (SB102).

In the example illustrated in (a) ofFIG. 19, the command synthesis unit102reads the coordinates [x2, y2] and generates a direction vector from the origin [x1, y1] to the coordinates [x2, y2].

The command synthesis unit102adds the generated direction vector to the first resultant vector to generate a new resultant vector (SB103to SB107).

In an example illustrated in (b) ofFIG. 19, the command synthesis unit102adds the first resultant vector from the start point to the coordinates [x1, y1] and the direction vector from the coordinates [x1, y1] to the coordinates [x2, y2] to generate a new resultant vector from the start point to the coordinates [x2, y2].

The command synthesis unit102calculates a path length of the new resultant vector generated by this synthesis processing (SB108).

In the example illustrated in (b) ofFIG. 19, the command synthesis unit102calculates the length of the new resultant vector (new resultant vector from the start point to the coordinates [x2, y2]).

The command synthesis unit102compares the path length with an allowable value (threshold value) (SB109). When the path length is less than a predetermined allowable value, the command synthesis unit102repeats processing of SB101to SB108, further reads a new coordinate point, and generates a new resultant vector.

For example, when the path length illustrated in (b) ofFIG. 19is less than the allowable value, the command synthesis unit102reads a new coordinate point [x3, y3], and generates a direction vector from the previously read coordinate point [x2, y2] to the newly read coordinate point [x3, y3]. In addition, the command synthesis unit102adds this direction vector and the previously generated resultant vector to generate a new resultant vector from the start point to the coordinates [x3, y3].

On the other hand, when the path length is equal to or greater than the predetermined allowable value, the command synthesis unit102discards the currently generated resultant vector and transfers the previously generated resultant vector to the block information generation unit103. In this way, a path indicated by the previously generated resultant vector is adopted as a simple machining path. Further, the command synthesis unit102sets the previously read coordinate value as an origin, and sets the currently generated direction vector as a new resultant vector (SB111to SB113). Hereinafter, the same processing is repeated for the plurality of coordinate points specified by the command analysis unit101.

For example, when the path length illustrated in (c) ofFIG. 19is equal to or greater than the allowable value, the command synthesis unit102discards the currently generated resultant vector (a new resultant vector from the start point to the coordinates [x3, y3]). In addition, the command synthesis unit102determines a path indicated by the previously generated resultant vector (resultant vector from the start point to the coordinates [x2, y2]) as the machining path ((d) ofFIG. 19).

(C) Path synthesis processing performed based on other threshold values

In the above-described embodiment, tolerance and path length are used as an index for determining whether the vector synthesis processing can be executed. However, similar determination can be made using various indices without being limited to these indices. Some examples are shown below.Feed speed

The command synthesis unit102can synthesize a plurality of vectors constituting the machining path set to the same feed speed. For example, a case where the command analysis unit101reads an axis movement command J of the following machining program is considered.

Axis movement command J:

By analysis of the command analysis unit101, in all paths indicated by a vector from the current position (start point) to the coordinates [x1, y1], a path indicated by a vector from the coordinates [x1, y1] to the coordinates [x2, y2], and a path indicated by a vector from the coordinates [x2, y2] to the coordinates [x3, y3], the same feed speed F=200 is commanded. In this instance, the command synthesis unit102generates one resultant vector by synthesizing a plurality of vectors constituting a continuous machining path for which the same feed speed F is commanded. A path indicated by the resultant vector is the machining path. In this example, a path indicated by a vector from the current position (start point) to the coordinates [x3, y3] is a machining path after synthesis, which corresponds to the same result as that in a case where the following axis movement command K is executed.

Axis movement command K:

The command synthesis unit102can synthesize a plurality of vectors indicating machining paths having the same spindle rotating speed (command S). Since specific processing content is the same as that of the vector synthesis based on the above-mentioned feed speed, a description thereof is omitted.G code

The command synthesis unit102can synthesize vectors constituting a plurality of paths having the same G code command. In this instance, only vectors constituting a machining path commanded by a specific G code can also be set as a target for synthesis. For example, the command synthesis unit102can set only vectors constituting a machining path commanded by a G code “G01” as a target for synthesis. In this case, vectors constituting a plurality of continuous machining paths for which the G code “G01” is commanded are synthesized. On the other hand, vectors constituting a machining path for which another G code interpolation command such as “G02” is given are not synthesized.T code, mode command, etc.

The command synthesis unit102can synthesize a plurality of vectors constituting a machining path having the same T code (tool exchange) command, that is, a machining path machined by the same tool. In addition, it is possible to synthesize a plurality of vectors constituting a machining path having the same mode command indicating a machining state, etc. Since specific processing content is the same as that of the vector synthesis processing based on the above-mentioned G code, a description thereof is omitted.

An operation of the numerical controller1will be described with reference to flowcharts ofFIG. 11andFIG. 12.FIG. 11is a diagram illustrating an operation of a conventional numerical controller. The conventional numerical controller reads one block of the machining program (S1) and analyzes the read one block of a program (S2). Then, block information of one line segment described in the block is generated (S3). Incidentally, in addition to processing of S1to S3, the numerical controller performs an ancillary processing such as modal switching or determination of various signals for each block (S4). The numerical controller repeats processing of S1to S4for all blocks of the machining program.

FIG. 12is a diagram illustrating an operation of the numerical controller1according to the present embodiment. The command analysis unit101of the numerical controller1reads one block of the machining program (S101) and analyzes the read one block of a program (S102). Here, when the machining program successively defines line segments of a plurality of sections with a command of one block described according to a format illustrated in (a) ofFIG. 13, the command analysis unit101analyzes the block and extracts a plurality of coordinate values or movement amounts described in the block (see (b) ofFIG. 13).

When the command analysis unit101outputs a plurality of coordinate values (S103), the command synthesis unit102generates a machining path based on the coordinate values (see (a) ofFIG. 14). In this instance, some of a plurality of direction vectors constituting the original machining path are synthesized and replaced with a simplified machining path (S104) (see (b) and (c) ofFIG. 14).

The block information generation unit103generates block information of the machining path synthesized by the command synthesis unit102(S105). Thereafter, an ancillary processing such as modal switching or determination of various signals is performed (S106), and processing of this block is ended. The numerical controller1repeats processing of S101to S106for all blocks of the machining program.

According to the present embodiment, the numerical controller1can synthesize a plurality of blocks without determining whether a read block is a linear interpolation block each time a program of one block is read and without depending on the maximum number of blocks for prefetch processing.

The disclosure is not limited to the above-described embodiment, and can be modified as appropriate without departing from a spirit of the disclosure.