FORMAT CONVERTING INTERFACE APPARATUS

Abstract: A numerical control apparatus (NC) makes it possible for machine tool manufacturers to easily define or modify the contents of conversion from macroinstructions into microin­ structions while the specification of a processor (3) for the numerical control apparatus (NC) is left unchanged. For this purpose, the numerical control apparatus (NC) is provided with reception circuits (9, 10) which receive macroinstruc­ tions delivered from the NC processor (3), format converter means (6, 8) which convert the macroinstructions received by the reception circuits (9, 10) into a series of microinstruc­ tions and transmission circuits (11, 12) which transmit to the NC processor (3) the series of microinstructions obtained by the conversion in the format converter means (6, 8).

Description: The present invention relates to an interface part of numerical control equipment, and more particularly to an interface unit for format conversion which converts a macro instruction to micro instructions. Since conventional numerical control equipment (NC), for example see JP-A-57 113 109 and US-A-4038533 is arranged so that when a group of commands (micro instructions) for performing a certain operation is made programmable in the form of a single command (a macro instruction), a program for converting the single command to the group of commands is stored in a ROM or the like of the NC as is the case with an ordinary cutting program, it is difficult to make the NC versatile. That is to say, the contents of the above conversion program usually differ with machine tools, so it is necessary to modify the specifications of the NC system for each machine tool to which the NC is connected. Furthermore, the situation occasionally arises where it would be desirable, from the standpoint of a machine tool maker, to change the conversion program to their own program with a view to presenting their characteristic feature, but such a change is not always easy with the prior art numerical control equipment, as mentioned above. An object of the present invention is to provide a novel interface unit for format conversion which converts a macro instruction to micro instructions. Another object of the present invention is to provide an interface unit format conversion which permits machine tool makers to adopt their own contents of conversion while holding the specifications of the NC processor side unified. According to the present invention there is provided an interface unit for format conversion in numerical control equipment which numerically controls a machine tool by interpreting and executing an NC machining program through use of the operation function of an NC processor, comprising format converting means for converting a macro instruction in the NC program into a series of micro instructions for execution by the NC processor, and characterised in that the format converting means comprises a format conversion processor, and a writable-readable memory containing micro instructions which are to replace corresponding macro instructions, and by a first bus connected to the format converting means, a second bus connected to the NC processor, an input register connected between the first and second buses for receiving a macro instruction delivered from the NC processor and then conveying it to the format converting means, an input flag connected between the first and second buses for indicating that data has been set in the input register, an output register for transmitting the series of micro instructions obtained by the format converting means to the NC processor, an output flag connected between the first and second buses for indicating that data has been set in the output register, and an in-cycle flag for indicating that a conversion cycle is in progress, the NC processor being associated with a RAM for storing said NC machining program, and the interface unit being operable such that in use the NC processor reads out, block by block, the NC machining program from the RAM, identifies the contents of each read-out block, interprets and executes the block directly when the latter uses a code indicating that the block need not be format-converted, and sets the read-out block in the input register and sets the input flag when the block uses a code indicating that the block is to be format-converted, this latter block then being format-converted by the format conversion processor with the help of the writable-readable memory, and then being interpreted and executed by the NC processor via the output register. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram illustrating the principal part of an example of the hardware construction of numerical control equipment provided with a format converting interface unit of the present invention; Fig. 2 is a flowchart showing an example of processing which is performed by an NC processor 3 of Fig. 1; and Fig. 3 is a flowchart showing an example of processing which is performed by a format converting processor 6 of Fig. 1. In Fig. 1, reference numeral 1 indicates a ROM for storing a system program, 2 a RAM for storing a machining program, and 3 an NC processor which has its general operation defined by the system program stored in the ROM 1 and interprets and executes the machining program stored in the RAM 2 to drive servo motors 4 and 5, effecting numerical control of a machine tool not shown. Reference numeral 6 designates a processor for format conversion, which is connected via a bus 7 to peripheral circuits such as a writable-readable memory, for example, a magnetic bubble memory 8, an input register 9, an input flag 10, an output register 11, an output flag 12 and an in-cycle flag 13. These peripheral circuits are connected via a bus 14 to the NC processor 3. The right-hand side of the one-dot chain line 15 in Fig. 1 is the NC side and the left-hand side the interface side. The input register 9 is a register for conveying data of the NC side to the interface side, the input flag 10 is a flag indicating that data has been set in the input register 9, the output register 11 is a register for conveying data of the interface side to the NC side, and the output flag 12 is a flag indicating that the data has been set in the output register 11. The input register 9, the input flag 10, the output register 11 and the output flag 12 are accessible from either of the NC processor 3 and the processor 6 for format conversion. The in-cycle flag 13 is a flag indicating that the format conversion is under way, i.e. the conversion cycle is in progress. As shown in Fig. 2, the NC processor 3 reads out, block by block, the machining program from the RAM 2, identifies the contents of the read-out block and, when deciding that no format conversion is necessary, interprets and executes the block (S2, S3), whereas when the format conversion is necessary, it sets the read-out block in the input register 9 and sets the input flag 10 (S2, S3). Since a code used for the block of the macro instruction which is to be format-converted is distinct from codes used for blocks which need not be converted, the decision in step S2 can be made by identifying the code of the block. As shown in Fig. 3, when detecting the setting of the input register 10 (S20), the processor 6 for format conversion reads out the data of the input register 9 and resets the input flag 10 (S21). Further, it sets the in-cycle flag 13 (S22). Next, the processor reads out the leading one of a series of blocks stored in the magnetic bubble memory 8 corresponding to the read-out data (S23), sets it in the output register 11 and sets the output flag 12, notifying the NC program 3 of the data setting in the output register. When the output flag 12 is set after sending data to the interface side, the NC processor 3 reads out the contents of the output register and resets the output flag 12 (S6, S7). Then it interprets and executes the read-out data (data of one block) (S8). The processor 6 for format conversion checks whether the conversion is finished or not (S25), and if not, it counts up the value of a pointer by one and, when the output flag 12 is reset, reads out data of one block of the next micro instruction from the memory 8, sets it in the output register 11 and sets the output flag 12 (S27, S23, S24). When the conversion is finished, that is, when the sending of a series of blocks is completed, the processor resets the in-cycle flag 13 (S28). The NC processor 3 repeats the operations of steps S6 to S8 while the in-cycle flag 13 is being set, and when the in-cycle flag 13 is reset, that is, when the convertion is finished, it returns to step S1 to process the next machining block (S4) except when the machining program has already been completed. For example, in the case where three blocks for performing a tool exchenge, such as G00G90X100000Y200000Z100000; T12; X0Y0Z0 are made programmable using a single block M06; prestoring of the three blocks in the magnetic bubble memory 8 corresponding to the code of M06 makes it possible to execute them simply by incorporating a command of M06; in the machining program of the RAM 2. When the contents of the three blocks change owing to the difference in the type of the machine tool used, it is necessary only to rewrite the contents of the magnetic bubble memory 8. That is, the function can easily be changed without involving any changes to the unified specifications of the NC side. As described above, the present invention controls the conversion of a macro instruction to micro instructions apart from an NC processor through use of a format converting interface unit which comprises a receiving circuit for receiving the macro instruction delivered from the NC processor, which interprets and executes an NC cutting program, format converting means for converting the macro instruction to a series of micro instructions and a transmitting circuit for transmitting the series of micro instructions obtained by the conversion to the NC processor. Therefore, a change in the contents of a conversion program can be dealt with simply by modifying the constitution of the format converting means, specifically, the stored contents of the magnetic bubble memory 8, making it possible to add various functions without changing unified specifications of the NC processor side. Accordingly, the present invention offers the advantages that a numerical controller maker can cut the cost of the equipment by the unification of its specifications and that a machine tool maker can easily adopt their own contents of conversion and hence can present their unique feature.

Claims: An interface unit for format conversion in numerical control equipment which numerically controls a machine tool by interpreting and executing an NC machining program through use of the operation function of an NC processor (3), comprising format converting means (6,8) for converting a macro instruction in the NC program into a series of micro instructions for execution by the NC processor (3), and characterised in that the format converting means comprises a format conversion processor (6), and a writable-readable memory (8) containing micro instructions which are to replace corresponding macro instructions, and by a first bus (7) connected to the format converting means (6,8), a second bus (14) connected to the NC processor (3), an input register (9) connected between the first and second buses (7,14) for receiving a macro instruction delivered from the NC processor (3) and then conveying it to the format converting means (6,8), an input flag (10) connected between the first and second buses (7,14) for indicating that data has been set in the input register (9), an output register (11) for transmitting the series of micro instructions obtained by the format converting means (6,8) to the NC processor (3), an output flag (12) connected between the first and second buses (7,14) for indicating that data has been set in the output register (11), and an in-cycle flag (13) settable for indicating that a conversion cycle is in progress, the NC processor (3) being associated with a RAM (2) for storing said NC machining program, and the interface unit being operable such that in use the NC processor (3) reads out, block by block, the NC machining program from the RAM (2), identifies the contents of each read-out block, interprets and executes the block directly when the latter uses a code indicating that the block need not be format-converted, and sets the read-out block in the input register (9) and sets the input flag (10) when the block uses a code indicating that the block is to be format-converted, this latter block then being format-converted by the format conversion processor (6) with the help of the writable-readable memory (8), and then being interpreted and executed by the NC processor (3) via the output register (11). An interface unit according to claim 1, which is adapted to operate such that when the in-cycle flag (13) is set to indicate that a conversion cycle is in progress, the NC processor (3) does not process the next block of the NC machining program in the RAM (2) until the in-cycle flag is reset.

Inventors: KAWAMURA, HIDEAKI, OTSUKI, TOSHIAKI
Applicants: FANUC LTD.
Application year: 1984
Main classification: G05B19
IPC codes: G05B19