This application claims priority under 35 U.S.C. §119 and/or §365 to Japanese Application No. 2009-241636 filed Oct. 20, 2009, the entire contents of which are incorporated herein by reference.
1. Field of the Invention
The present invention relates to a numerical controller for controlling machine tools and industrial machines and, more particularly, to a numerical controller that can divide a memory in which to store machining programs or those in binary data format into memory areas and can combine divided memory areas.
2. Description of the Related Art
In a conventional well-known interpreter-type numerical controller, NC programs or machining programs in binary data format are stored in a memory in the numerical controller, and during an operation, the numerical controller performs analysis and preprocessing in a preprocessing part and executes the programs in an execution control part while reading the programs sequentially.
In many systems used for machining lines in factories, machining programs stored and managed in a personal computer are transferred to and stored in a memory in a numerical controller, and the machining programs stored in the memory are operated.
In a system often used when a standalone numerical controller, to which a personal computer or the like is not connected, is employed, machining programs stored and managed in a memory card or USB memory connected to the numerical controller or in a non-volatile memory in the numerical controller are transferred to and stored in another memory (such as a RAM) other than the non-volatile memory in the numerical controller, and the machining programs stored in the other memory are operated.
Each system described above is problematic in that when it is operated with conventional machining programs in such a way that after a first workpiece has been machined, a second workpiece is machined, the machining of the second workpiece must be awaited until a machining program for the second workpiece, which is stored and managed in the personal computer, in the memory card or USB card connected to the numerical controller, or in the volatile memory in the numerical controller, has been transferred to and stored in the other memory (such as a RAM) other than the non-volatile memory in the numerical controller. This problem can be solved by using a ring buffer in which an old program that has been operated is overwritten with a new machining program.
The ring buffer in
Besides the interpreter-type numerical controller described above, Japanese Patent Application Laid-Open Nos. 61-161514 and 10-161729 disclose a numerical controller having an operation function based on binary data, which reads binary data stored in a memory in succession during an operation to execute the read binary data in an execution control part. While reading programs for binary data (path tables), created as text files, in succession before an operation starts, the numerical controller performs analysis and preprocessing in a preprocessing part, carries out a conversion into binary data, which is executable by the execution control part, in a conversion part in the numerical controller, and stores the converted binary data in the memory. The numerical controllers are of the compiler type because programs are converted into object code, which is binary data, in advance and the object code is executed at an execution time.
A text file is a file in which text (in alphanumeric characters and numerals) used to code cutting procedures executed by application programs is written. A binary file, which is coded with numerical data such as binary numbers, is paired with a text file. NC programs are text files.
The above operation function based on binary data is disclosed in, for example, Japanese Patent Application Laid-Open Nos. 59-177604 and 2003-303005. A numerical controller having this operation function has a so-called path table operation function by which a path table, in which positions of control axes are set with respect to time or a spindle position, is converted into binary data, the converted binary data is stored, and the stored binary data is read in succession to drive each control axis.
In many systems used in machining lines in factories, programs for binary data, created as text files and then stored and managed in a personal computer, are transferred to a numerical controller, converted into binary data in a conversion part in the numerical controller, and stored in a memory, and the binary data stored in the memory is operated.
Conversely, in a system often used when a standalone numerical controller, to which a personal computer or the like is not connected, is employed, programs for binary data that are created as text files and stored and managed in a memory card or USB memory connected to the numerical controller or in a non-volatile memory in the numerical controller are converted into binary data by a conversion part in the numerical controller, the converted binary data is transferred to and stored in another memory other than the non-volatile memory in the numerical controller, and the binary data stored in the other memory is operated.
Each system described above is problematic in that when it is operated with conventional binary data in such a way that after a first workpiece has been machined, a second workpiece is machined, the machining of the second workpiece must be awaited until a program for binary data, which is created as a text file transferred from the personal computer to the numerical controller or as a text file stored and managed in the USB card or in the volatile memory in the numerical controller, has been converted into binary data in the numerical controller and stored in the other memory. This problem can be solved by using a ring buffer in which old binary data that has been executed is overwritten with new binary data.
A personal computer 10 creates path tables 12 needed for a path table operation. The created path tables 12 are stored on a hard disk 11. The path tables 12 stored on the hard disk 11 are transferred to a numerical controller 20. In
Each path table 12 transferred to the numerical controller 20 is converted by a conversion part 21 into binary data and stored in a memory 22 as binary data 220. While reading the binary data 220 stored in the memory 22 in succession, the numerical controller 20 executes the read binary data in an execution control part 23.
The above system is problematic in that when it is operated with conventional path tables in such a way that after a first workpiece has been machined, a second workpiece is machined, the machining of the second workpiece must be awaited until a path table for the second workpiece, which is stored and managed in the personal computer 10, has been transferred to and stored in the memory 22 in the numerical controller 20. This problem can be solved by using a ring buffer in which binary data in an old path table that has been operated is overwritten with binary data in a new path table.
A system using the ring buffer to overwrite machining programs also poses a problem in that if binary data in a path table is used a plurality of times for, for example, a skip operation, a retractive operation, a retrogradation, and a sub-program call, then a ring buffer which is designed so as not to leave any binary data in the path table that has been executed cannot be used.
It is an object of the present invention to provide a numerical controller that has a plurality of memory areas for storing machining programs or binary data and that can shorten a wait time required to prepare a machining program or binary data in each of the memory areas.
Another object of the present invention is to provide a numerical controller that can shorten wait times required to prepare many small-size machining programs or binary data items by further dividing an existing memory area into a plurality of areas.
Yet another object of the present invention is to provide a numerical controller that can combine a plurality of memory areas to store and execute a large-size machining program or a large size of binary data and can divide the combined memory area again upon completion of the operation.
Still another object of the present invention is to provide, while executing a machining program or binary data in a skip operation, a retractive operation, a retrogradation, or a sub-program call, a numerical controller that can switch to and execute a machining program or binary data in another memory area.
A numerical controller in a first embodiment of the present invention has an operation function that transfers a machining program stored in a storage unit in a computer connected to the numerical controller, an external storage unit connected to the numerical controller, or a non-volatile memory in the numerical controller to another memory other than the non-volatile memory in the numerical controller, and stores the transferred machining program therein, the operation function being based on the machining program; the numerical controller has means for dividing an area of the other memory into a plurality of memory areas in response to a command from the computer or a process in the numerical controller, deciding means for deciding, when the machining program is transferred to and stored in the other memory, whether a machining program has been stored in each of the plurality of memory areas, and writing means for writing the machining program to a memory area for which the deciding means decides that no machining program is stored.
A numerical controller in a second embodiment of the present invention has an operation function that divides a non-volatile memory in the numerical controller into a plurality of memory areas, transfers a machining program stored in any one of the divided memory areas to another memory in the non-volatile memory, and stores the transferred machining program therein, the operation function being based on the machining program; the numerical controller has means for dividing an area in the non-volatile memory, to which a machining program is transferred and in which the transferred machining program is stored, into a plurality of areas in response to a command from a computer connected to the numerical controller or a process in the numerical controller, deciding means for deciding, when the machining program is transferred to and stored in one of the divided areas, whether a machining program has been stored in each of the plurality of areas, and writing means for writing the machining program to an area for which the deciding means decides that no machining program is stored.
A numerical controller in a third embodiment of the present invention has an operation function that converts a machining program for binary data, created as a text file and stored in a storage unit in a computer connected to the numerical controller, an external storage unit connected to the numerical controller, or a non-volatile memory in the numerical controller, into binary data by performing analysis and preprocessing on the machine program while reading the machine program in succession, transfers the converted binary data to another memory other than the non-volatile memory in the numerical controller, stores the transferred binary data therein, and executes the stored binary data during an operation while reading the binary data in succession, the operation function being based on the binary data; the numerical controller has means for dividing the other memory into a plurality of memory areas in response to a command from the computer or a process in the numerical controller, deciding means for deciding, when the binary data is transferred to and stored in the other memory, whether a machining program has been stored in each of the plurality of areas, and writing means for writing the binary data to an area for which the deciding means decides that no machining program is stored.
A numerical controller in a fourth embodiment of the present invention has an operation function that divides a non-volatile memory in the numerical controller into a plurality of memory areas, converts a machining program for binary data, stored in any one of the divided memory areas, into binary data by performing analysis and preprocessing on the machine program while reading the machine program in succession, transfers the binary data to another memory area in the non-volatile memory in the numerical controller, stores the transferred binary data therein, and executes the stored binary data during an operation while reading the binary data in succession, the operation function being based on the binary data; the numerical controller has means for dividing an area, to which the binary data in the non-volatile memory is transferred and in which the transferred binary data is stored, into a plurality of areas in response to a command from a computer connected to the numerical controller or a process in the numerical controller, deciding means for deciding, when the binary data is transferred to and stored in one of the divided areas, whether binary data has been stored in each of the plurality of areas, and writing means for writing the binary data to an area for which the deciding means decides that no binary data is stored.
The numerical controllers in the first to fourth embodiments of the present invention can have the following aspects.
The numerical controller further has deciding means for deciding, when it is decided that a machining program or binary data is stored in each of the plurality of areas, in a decision as to whether a machining program or binary data is stored in each of the plurality of areas, whether the machining program or binary data stored in the other memory or each of the plurality of areas in the non-volatile memory is being operated as well as writing means for deleting any of machining programs or binary data for which it is decided by the deciding means that the machining programs or binary data is not being operated, and writing a new machining program or new binary data to the area from which the machining program or binary data has been deleted.
The numerical controller further has selection means for selecting an area, from among the plurality of areas, in which the machining program or binary data should be stored in response to a command from inside or outside of the numerical controller when the machining program or binary data is stored.
The numerical controller further has selection means for selecting an area, from the plurality of areas, from which to delete the machining program or binary data in response to a command from inside or outside of the numerical controller when the machining program or binary data is deleted.
The numerical controller further has selection means for selecting an area, from among the plurality of areas, that includes the machining program or binary data to be operated in response to a command from inside or outside of the numerical controller when the machining program or binary data is operated.
The numerical controller further has means for further dividing at least one of the divided areas into a plurality of areas for storing machining programs or binary data items which are smaller in size than that of the divided areas or larger in number than that of the divided areas, deciding means for deciding, when the machining program or binary data is transferred to and stored in the memory, whether a machining program or binary data has been stored in each of the plurality of areas; and writing means for writing the machining program or the binary data to an area for which the deciding means decides that no machining program or binary data is stored.
The numerical controller further has reserving means for reserving areas again in which a machining program or binary data larger in size than that of each of the divided areas is stored by combining the divided areas, deciding means for deciding, when the machining program or binary data is transferred to and stored in the memory, whether a machining program or binary data has been stored in each of the areas reserved by combining the divided areas, and writing means for writing the machining program or binary data to an area for which the deciding means decides that no machining program or binary data is stored. The numerical controller further can have means for storing, when a machining program or binary data used to machine a single workpiece is too large to be stored in one of the areas combined by the reserving means, the machining program or binary program in two or more of the areas combined by the reserving means, and means for storing data, in the numerical controller, for linking a divided area to a next divided area. The data for linking a divided area to a next divided area may be designed to be combined with machine programs or binary data for machining a single workpiece, stored in two or more of the divided areas, for execution. The numerical controller may further have selection means for selecting the number of areas by which the other memory or non-volatile memory is divided and the size of each divided area, in response to a command from inside or outside of the numerical controller.
The numerical controller further has selection means for selecting, from among the plurality of reserved areas, areas to be combined, in response to a command from inside or outside of the numerical controller.
The present invention can provide a numerical controller that has a plurality of memory areas for storing machining programs or binary data and that can shorten a wait time required to prepare a machining program binary data in each of the memory areas.
The present invention can also provide a numerical controller that can shorten wait times required to prepare many small-size machining programs or binary data items by further dividing an existing memory area into a plurality of areas.
The present invention can also provide a numerical controller that can combine a plurality of memory areas to store a large-size machining program or a large size of binary data to execute the program or binary data and divide the combined area again upon completion of the operation.
The present invention can also provide, while operating a machining program or binary data in a skip operation, a retractive operation, a retrogradation, or a sub-program call, a numerical controller that can switch to and execute a machining program or binary data in another memory area.
The purposes and advantages of the present invention, including those described above, will be clarified by referring to the attached drawings in combination with the description of the embodiments described below. Of these drawings:
A personal computer 10 is connected to the numerical controller 20. The numerical controller 20 includes a processor (CPU) 201, a ROM 205 in which programs for controlling the numerical controller 20 overall are stored, a RAM 206, a rewritable non-volatile memory 207 in which parameters, offset data, and the like are stored, a display unit 208, a keyboard 209, axis control circuits 202 for individual axes, a PMC 203 and an I/O unit 204 that execute a predetermined sequence and externally send and receive data to and from external units (such as machine-side power panel and operation panel), and an I/O unit 210 that sends and receives data to and from the personal computer 10 (as an external I/O unit); these components are mutually connected with a bus 211.
The numerical controller 20 has a plurality of memory areas in a memory constituted by the RAM 206 or battery-backed non-volatile memory 207 disposed in the numerical controller 20, in each of which a machining program and binary data resulting from conversion of a path table are stored. When the machining program or binary data in each memory area is executed, a wait time required to prepare a machining program and path table to machine another workpiece can be reduced.
A path table 12 created in the personal computer 10 is transferred to the numerical controller 20. The machining programs and path table 12 are stored on a hard disk 11 in the personal computer 10. A flash ROM or another large-capacity non-volatile memory may be used, instead of the hard disk 11.
The path table 12 transferred from the personal computer 10 is converted into binary data 250 by a conversion part 21 while binary data 240 stored in the first memory area 24 of the memory 22 in the numerical controller 20 is being executed; the binary data 250 that has been converted is then stored in the second memory area 25. Upon completion of the execution of the binary data 240 in the first memory area 24, the binary data stored in the second memory area 25 is executed by an execution control part 23 while being read in succession.
Information about memory areas obtained by dividing the RAM 206 or non-volatile memory 207 or by combining divided memory areas is stored in a management table 27 shown in
Data in the management table 27 can be rewritten in response to a command from the personal computer 10 or an internal command from the numerical controller 20. The number of memory areas obtained by dividing the memory and the size of each divided memory area may be selectively set.
The management table 27 is stored in, for example, the RAM 206 in
When the stored flag FA is set to 1, it indicates that the machining program or binary data has been stored; when the flag is set to 0, it indicates that the machining program or binary data has not been stored. When the deletable flag FB is set to 1, it indicates that the machining program or binary data in the memory area may be deleted; when the flag is set to 0, it indicates that the machining program or binary data must not be deleted. The deletable flag FB may be rewritten in response to a command from the personal computer 10 or an internal command from the numerical controller 20. Accordingly, whether to delete the machining program or binary data stored in the memory area can be selected.
When the in-operation flag FC is set to 1, it indicates that the machining program or binary data stored in the memory area is being operated; when the flag is set to 0, it indicates that the machining program or binary data is not being operated.
When the memory is divided into memory areas or divided memory areas are combined, the addresses of memory areas corresponding to memory area names to be stored in the management table 27 are rewritten. Alternatively, non-consecutive areas may be combined in view of the end address of each memory area. The memory may be divided so as to match the size of the machining program or binary data.
If a machining program or binary data larger than a divided memory area is stored, it is also possible to obtain a plurality of memory areas on the basis of the size information about each memory area stored in the management table 27 and combine the plurality of memory areas obtained into one memory area, for example. When a plurality of memory areas are combined into one memory area in this way, the address information about these memory areas stored in the management table 27 is used. The memory areas to be combined to reserve one memory area can be selected in response to a command from the personal computer 10 or an internal command from the numerical controller 20. In addition to divided memory areas, preset memory areas may be reserved.
If one machining program or binary data item is too large to be stored in one memory area, the machining program or binary data may be divided on the basis of memory area size information so that the machining program or binary data matches the sizes of memory areas, and each divided part may be stored in a memory area with a size that the divided part matches. The divided parts constituting the one machining program or one binary data item, which are stored in a plurality of memory areas, can be linked by using data stored in the management table 27 to operate the machining program or binary data. The management table 27 has data that indicates the locations of the memory areas in which the divided parts constituting one machining program or one binary data item are stored.
The numerical controller 20 selects a memory area in which a machining program or binary data are stored according to the stored flag FA. A new machining program or new binary data is stored in a memory area for which the stored flag FA is set to 0. The numerical controller 20 can decide whether to delete a machining program or binary data according to the deletable flag FB. The numerical controller 20 can also identify a machining program or binary data that is being executed according to the in-operation flag FC. Machining programs or binary data that is not in execution can be deleted. A memory area in which to store or from which to delete a machining program or binary data may be selected in response to command from the outside of the numerical controller 20 (a command from the personal computer 10, for example) or an internal command from the numerical controller 20.
As described with reference to
As shown in
Since the capacity (size) of each memory area obtained by dividing the memory into a plurality of parts is small, when a large machining program or large binary data based on a path table is executed, the plurality of divided memory areas are combined. Then, the large machining program or the large binary data based on the path table can be stored in the combined memory area and executed. Upon completion of the execution, the combined memory area can be divided again.
Next, steps in a flowchart indicating an algorithm of processing in the embodiment in which two memory areas are provided in the numerical controller will be described with reference to
A machining program 13 stored on the hard disk 11 in the personal computer 10 is transferred to the numerical controller 20. The numerical controller 20 then stores the machining program 13, which has been transferred, in the memory 22. In
In
Number | Date | Country | Kind |
---|---|---|---|
2009-241636 | Oct 2009 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
4692856 | Komiya | Sep 1987 | A |
6885909 | Isohata | Apr 2005 | B2 |
20100231157 | Haga et al. | Sep 2010 | A1 |
Number | Date | Country |
---|---|---|
58-164080 | Sep 1983 | JP |
59-177604 | Oct 1984 | JP |
60-132241 | Jul 1985 | JP |
61-161514 | Jul 1986 | JP |
63-019007 | Jan 1988 | JP |
02-190906 | Jul 1990 | JP |
3-116204 | May 1991 | JP |
05-265525 | Oct 1993 | JP |
8-166808 | Jun 1996 | JP |
10-161729 | Jun 1998 | JP |
11-202917 | Jul 1999 | JP |
2003-303005 | Oct 2003 | JP |
2004-139232 | May 2004 | JP |
Number | Date | Country | |
---|---|---|---|
20110093666 A1 | Apr 2011 | US |