Numerical controller

11194313 · 2021-12-07

Assignee

Inventors

Cpc classification

International classification

Abstract

A numerical controller 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 of the machining program in a reading processing for the one block to specify a plurality of coordinate values or movement amounts, and a block information generation unit for generating the block information for the plurality of sections based on the plurality of coordinate values or movement amounts. Each of one or more addresses is described only once and a plurality of command values corresponding to the respective addresses is described according to a predetermined order in the axis movement command, and the command analysis unit specifies a correlation between the addresses and the command values according to the order.

Claims

1. A numerical controller for analyzing an axis movement command described in a machining program to generate block information of a path, the numerical controller comprising: a command analysis unit for analyzing the machining program in which the axis movement command for a plurality of successive line segment movements along a same axis is described in one block of the machining program in a reading processing for the one block to specify a plurality of coordinate values or a plurality of movement amounts corresponding to the plurality of the successive line segment movements along the same axis; and a block information generation unit for generating the block information for the plurality of the successive line segment movements along the same axis based on the plurality of coordinate values or the plurality of movement amounts of the successive line segment movements along the same axis, wherein an address to the same axis is described only once and a plurality of command values corresponding to the address to the same axis are described according to a predetermined order of the successive line segment movements along the same axis in the axis movement command, and the command analysis unit specifies a correlation between the address to the same axis and the plurality of command values according to the order.

2. The numerical controller according to claim 1, wherein a modal switching processing is performed after the block information for the plurality of the successive line segment movements described in the one block is generated.

3. The numerical controller according to claim 1, wherein the plurality of command values are given as array type variables.

4. The numerical controller according to claim 1, wherein the plurality of command values are given by an external file.

5. The numerical controller according to claim 1, wherein the address and the plurality of command values are given as a data set.

6. The numerical controller according to claim 1, wherein the address is related to various commands other than a command of a coordinate value of the plurality of coordinate values or a movement amount of the plurality of movement amounts.

7. The numerical controller according to claim 1, wherein the address is allowed to be omitted when there is no change in the plurality of command values corresponding to the address.

8. The numerical controller according to claim 1, wherein the plurality of command values corresponding to the address is allowed to be omitted when there is no change in the plurality of command values.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) The above-described object and feature of the disclosure and other objects and characteristics will be apparent from description of embodiments below with reference to accompanying drawings. In the drawings:

(2) FIG. 1 is a diagram illustrating an example of a conventional machining program;

(3) FIG. 2 is a diagram illustrating an example of conventional prefetch processing;

(4) FIG. 3 is a diagram illustrating a hardware configuration example of a numerical controller;

(5) FIG. 4 is a diagram illustrating an example of a conventional axis movement command;

(6) FIG. 5 is a diagram illustrating an example of an axis movement command in the present embodiment;

(7) FIG. 6 is a diagram illustrating an example of an axis movement command in the present embodiment;

(8) FIG. 7 is a diagram illustrating an example of an axis movement command in the present embodiment;

(9) FIG. 8 is a diagram illustrating an example of an axis movement command in the present embodiment;

(10) FIG. 9 is a diagram illustrating an example of an axis movement command in the present embodiment;

(11) FIG. 10 is a diagram illustrating an example of an axis movement command in the present embodiment;

(12) FIG. 11 is a diagram illustrating an example of an axis movement command in the present embodiment;

(13) FIG. 12 is a diagram illustrating an operation example of a conventional numerical controller;

(14) FIG. 13 is a diagram illustrating an operation example of the numerical controller;

(15) FIG. 14 is a diagram illustrating an operation example of the numerical controller; and

(16) FIG. 15 is a diagram illustrating an example of a functional configuration of the numerical controller.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

(17) FIG. 3 is a schematic hardware configuration diagram illustrating a numerical controller 1 according to an embodiment. The numerical controller 1 is a device that controls, for example, an industrial machine that performs drilling. The numerical controller 1 includes a central processing unit (CPU) 11, a read only memory (ROM) 12, a random access memory (RAM) 13, a nonvolatile memory 14, a bus 10, an axis control circuit 16, a servo amplifier 17, and an interface 18. A servomotor 50 and an input/output device 60 are connected to the numerical controller 1.

(18) The CPU 11 is a processor that controls the numerical controller 1 as a whole. The CPU 11 reads a system program stored in the ROM 12 via the bus 10. The CPU 11 controls the entire numerical controller 1 according to the system program.

(19) For example, the ROM 12 stores in advance a system program for executing various controls of a machine.

(20) The RAM 13 temporarily stores calculation data or display data, and data, a program, or the like input by an operator via the input/output device 60.

(21) For example, the nonvolatile memory 14 is backed up by a battery (not illustrated). The nonvolatile memory 14 maintains a storage state even when a power source of the numerical controller 1 is turned off. The nonvolatile memory 14 stores data, a program, etc. input from the input/output device 60. The program and data stored in the nonvolatile memory 14 may be loaded in the RAM 13 during execution and use.

(22) The axis control circuit 16 controls an operating axis of the machine. The axis control circuit 16 receives a movement command amount of the axis output by the CPU 11 and outputs a movement command of the operating axis to the servo amplifier 17.

(23) The servo amplifier 17 receives the axis movement command output by the axis control circuit 16 and drives the servomotor 50.

(24) The servomotor 50 is driven by the servo amplifier 17 to move the operating axis of the machine. In the present embodiment, a spindle is moved by the servomotor 50. For example, the servomotor 50 has 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 circuit 16 so that position/speed feedback control is performed.

(25) Incidentally, in FIG. 3, only one set of an axis control circuit 16, a servo amplifier 17, and a servomotor 50 is illustrated. However, in practice, the set is prepared for each axis provided in the machine to be controlled.

(26) The input/output device 60 is a data input/output device including a display, a hardware key, etc. For example, the input/output device 60 is an MDI unit or an operation panel. The input/output device 60 displays information received from the CPU 11 via the interface 18 on a display. The input/output device 60 passes a command, data, etc. input from a hardware key, etc. to the CPU 11 via the interface 18.

(27) FIG. 15 is a block diagram illustrating an outline of a functional configuration of the numerical controller 1. The numerical controller 1 includes a command analysis unit 101 and a block information generation unit 103.

(28) The command analysis unit 101 reads and analyzes a machining program including an axis movement command that can define line segments of a plurality of sections using one block command. The command analysis unit 101 specifies all coordinate points as movement destinations based on an analysis result of the machining program. The block information generation unit 103 generates block information of the line segments of the plurality of sections based on the coordinate points specified by the command analysis unit 101.

(29) A specification of the axis movement command of the present embodiment that can be analyzed by the command analysis unit 101 will be described with reference to FIG. 4 to FIG. 6. FIG. 4 is 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 controller 1 to 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).

(30) 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.

(31) (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.

(32) (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.

(33) (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 of FIG. 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.

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

(35) (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 z1 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.

(36) X, Y, Z=x1, y1, z1, x2, y2, z2, . . . , xn, yn, zn

(37) Alternatively, the command value groups can also be collectively described for each address as follows.

(38) X, Y, Z=x1, x2, . . . , xn, y1, y2, . . . , yn, z1, z2, . . . , zn

(39) (c) The command shown in the above item (a) or (b) can also be described using an array type variable. FIG. 8 (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 in FIG. 5. In FIG. 8, 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).

(40) Axis movement command A:

(41) N22 G0l X, Y, Z=[1, 2, 3], [2, 3, 4], [3, 4, 5], . . . , [10, 11, 12];

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

(43) FIG. 9 (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 in FIG. 5. In FIG. 9, 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).

(44) Axis movement command B:

(45) N22 G01 X, Y, Z=[0, 0, 0], [1, 1, 1], [2, 2, 2], . . . ;

(46) Similarly, FIG. 10 (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 in FIG. 5. In FIG. 10, 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).

(47) Axis movement command C:

(48) N22 G01 X, Y, Z=[X0, Y0, Z0], [X1, Y1, Z1], [X2, Y2, Z2], [X3, Y3, Z3], . . . ;

(49) 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 unit 101 can recognize the correlation and restore the command content before rewriting.

(50) (e) A command can also be described in a form referring to data set. FIG. 11 (second line) is an example in which the following axis movement command D is rewritten into a format referring to a data set. In FIG. 11, 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).

(51) Axis movement command D:

(52) N21 G00 X0. Y10. Z50.;

(53) G01 Y20. Z55. F100.;

(54) X10.;

(55) G00 X15. Y20.;

(56) 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 unit 101 can 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.

(57) (3) Commands such as G codes can also be integrated and described as shown in item (2). For example, FIG. 7 shows an example in which a command described as the following axis movement command E in a conventional description method is integrated into one line according to the format of FIG. 5 and described.

(58) Axis movement command E:

(59) G00 X100, Y100, Z0

(60) G01 X1, Y1, Z1

(61) G01 X2, Y2, Z2

(62) (4) For an address having no change in a command value, command description may be omitted. For example, in an example of FIG. 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.

(63) (5) 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.

(64) Axis movement command F:

(65) G01 X, Y=[0, 0], [1,], [, 2], . . .

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

(67) Axis movement command G:

(68) G01 X0 Y0;

(69) G01 X1;

(70) G01 Y2;

(71) A characteristic operation of the numerical controller 1 will be described with reference to flowcharts of FIG. 12 and FIG. 13. FIG. 12 is a diagram illustrating an operation of a conventional numerical controller. The conventional numerical controller reads one block of a machining program (S1) and analyzes the block (S2). Then, block information of one line segment described in the block is generated (S3). In addition to processing of S1 to 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 S1 to S4 for all blocks of the machining program.

(72) FIG. 13 is a diagram illustrating an operation of the numerical controller 1 according to the present embodiment. The command analysis unit 101 of the numerical controller 1 reads one block of the machining program (S101) and analyzes a program of the read one block (S102). Here, when the machining program successively defines line segments of a plurality of sections with a command of one block described according to the above-described format (see (a) of FIG. 14), the command analysis unit 101 analyzes the block and extracts a plurality of coordinate values or movement amounts described therein (see (b) of FIG. 14).

(73) The block information generation unit 103 generates block information of one line segment using the coordinate point or the movement amount extracted by the command analysis unit 101 (S103). Here, block information of one line segment is generated using an unprocessed coordinate point or movement amount having an earliest command order (S103). Thereafter, it is determined whether an unprocessed coordinate point or movement amount is left (S104). When the unprocessed coordinate point or movement amount is left, the processing returns to S103, and block information of one line segment is generated. When no unprocessed coordinate point or movement amount is left, ancillary processing such as modal switching or determination of various signals is executed (S105), and processing of this block is terminated. The numerical controller 1 repeats processing of S101 to S105 for all blocks of the machining program.

(74) According to the present embodiment, the command analysis unit 101 reads and analyzes a machining program including an axis movement command that can define line segments of a plurality of sections with a command of one block, and specifies all coordinate points as a movement destination. The block information generation unit 103 generates block information of line segments of a plurality of sections based on the coordinate points specified by the command analysis unit 101. In this way, it is possible to command a machining path including a plurality of line segments using a small number of blocks.

(75) In addition, according to the present embodiment, it is possible to prefetch one block of the machining program to generate a plurality of pieces of block information. For this reason, it is possible to suppress overhead associated with ancillary processing such as modal switching and determination of various signals. As a result, efficiency is improved compared with conventional prefetch processing.

(76) In addition, conventionally, only a canned operation can be performed in a canned cycle. However, in the present embodiment, a path can be freely set in the form of a matrix shown in FIG. 11 using a data set. In this way, it is easy for an operator to understand a command point.

(77) In addition, in the present embodiment, by performing an axis movement command in a format referring to an array type variable or an external file, it is possible to command axis movement without specifying a coordinate value directly on the program. In this way, versatility increases because the coordinate values can be reused.

(78) In addition, in the present embodiment, block information of line segments of a plurality of sections is created using a command of one block. For this reason, it is unnecessary to use a specific subprogram function or a specific character. As a result, it is possible to introduce a technology according to the present disclosure at a low cost.

(79) Incidentally, the present disclosure is not limited to the above-described embodiment, and can be appropriately changed without departing from the spirit of the present disclosure. For example, in the above-described embodiment, an example in which the block information generation unit 103 generates the block information of the line segments has been mainly described. However, the present disclosure is not limited thereto. For example, block information of any path such as an arc can be generated by a similar scheme.

(80) In addition, the above-described embodiment shows an example in which G codes related to commands in a plurality of sections are integrated into one line. However, the present disclosure is not limited thereto. For example, it is also possible to similarly integrate any commands of a machining command such as F code, an auxiliary function such as M code, etc.

(81) A description method of a correlation between an address and a plurality of command values shown in the above embodiment is merely an example. When a command related to a path of a plurality of sections is described in one block, an address is described only once, and at least one command value corresponding to each address is defined, description in any format is allowed.