Numerical control system
This application is a continuation of application Ser. No. 07/427,847, filed as PCT/JP89/00223, Mar. 2, 1989, and published as WO89/08874 now abandoned. 
    
    
     CROSS-REFERENCE TO RELATED APPLICATIONS 
     This application is related to U.S. application Ser. Nos. 07/427,124, 07/427,846 and 07/425,175 which issued on Apr. 23, 1991. 
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a numerical control system having a plurality of controllers, and more particularly to a numerical control system having controllers for reading, decoding, and executing numerical control commands. 
     2. Description of Related Art 
     Numerical control systems generally have one functional arrangement for reading, decoding, and executing numerical control commands to control a plurality of axes. There has also been employed a numerical control system having a plurality of such functional arrangements for controlling a numerically controlled multiple-head lathe or the like which has a plurality of spindles. Such a numerical control system is essentially in the form of two numerical control apparatuses combined with each other, one for controlling a first spindle, an X1 axis, and a Z1 axis and the other for controlling a second spindle, an X2 axis, and a Z2 axis. 
     While the above numerical control system can control a numerically controlled lathe having two spindles, since it is merely a combination of two numerical control apparatuses, it suffers the following problems: 
     First, the numerical control system has an unbalanced processing capability. Although there is no problem when the task of the processor of one of the numerical control apparatuses and the task of the processor of the other numerical control apparatus are in equilibrium, i.e. each of the processors has the capacity to handle its task at roughly the same rate, when these tasks are brought out of equilibrium, the processors do not have the ability to accept and process tasks from another processor which is overtasked even though the processors may have the capacity to do so. 
     Secondly, the two numerical control apparatuses cannot access each other&#39;s data. The numerical control system has two functional arrangements, but the lathe which is to be controlled is a single machine. Even under conditions where the numerical control apparatuses are to operate on the same data, they are unable to do so because, they cannot access each other&#39;s data. The numerical control system therefore requires memory units which would otherwise be unnecessary, and the system cannot perform flexible control. Communication ports or the like are also required by the numerical control system to eliminate the above drawback. 
     Thirdly, the numerical control apparatus must be provided with common peripherals such as a CRT/MDI unit, a floppy disk, etc. 
     SUMMARY OF THE INVENTION 
     In view of the aforesaid problems of the conventional numerical control systems, it is an object of the present invention to provide a numerical control system having a plurality of controllers for reading, decoding, and executing numerical control commands. 
     According to the present invention, the above object can be achieved by a numerical control system for controlling a plurality of axes with a plurality of functional arrangements, comprising a controllers bus having a plurality of slots, a plurality of controllers for reading, decoding, and executing numerical control commands for a group of axes, the controllers being connected to the controllers bus, and an axis control module for controlling a plurality of servomotors. 
     One of the controllers is used as a master channel for controlling the entire numerical control system. 
     The controllers connected to the controllers bus process numerical control commands so that the processing capacities of the controllers are kept in equilibrium. The data of the controllers can be accessed by each other, and the controllers can use common peripherals. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of a numerical control system according to the present invention; and 
     FIG. 2 is a block diagram showing the functions of a controller of the numerical control system. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     An embodiment of the present invention will hereinafter be described with reference to the drawings. 
     FIG. 1 shows in block form a numerical control system according to the present invention. A controller bus 1 comprises a multiple-channel master bus interconnecting a plurality of controllers. The channel bus 1 has a number slots 1a, 1b, . . . 1f to which the controllers (described later) are connected. 
     A CRT/MDI unit 2 is connected to the slot 1f. The CRT/MDI unit 2 can display data and graphic information for the numerical control system and also receive data from a keyboard thereof. The CRT/MDI unit 2 can be accessed by each of the controllers. 
     Axis control modules 3, and 4 are connected respectively to the slots 1b, and 1d. Each of the axis control modules 3, and 4 can control servomotors for 2 or 3 axes. 
     Controllers 10, 20, and 30 are connected respectively to the slots 1a, 1c, and 1e. Each of the controllers has the functions of a conventional numerical control apparatus. Thus, one controller can read, decode, and execute numerical control commands. Additionally, each can control a component such as the CRT/MDI unit 2 or the like. Therefore, each individual controller can process commands for a certain number of axes processed by a conventional numerical control apparatus. For example, to control a numerically controlled lathe having two heads, the controller I 10 can control a first spindle, an X1 axis, and a Z1 axis, the controller II 20 can control a second spindle, an X2 axis, and a Z2 axis, and the controller III 30, as a master controller, can perform the control of the entire system for monitoring the other controllers. The master channel 30 can also control an axis control module, a spindle, etc. Each of the controllers 10, 20, and 30 can access the CRT/MDI unit 2. 
     These controllers 10, 20, and 30 are connected to the controller bus 1 and share their processing operation. If one of the controller runs short of its processing ability, part of the processing operation thereof is transferred to another controller. For example, while the controller I 10 is executing interpolation at very small intervals and the controller II 20 is executing linear interpolation, part of preprocessing operations for the interpolation carried out by controller I 10 may be executed by controller II 20. Therefore, the processing abilities of the channels can be balanced so that the processing operation will not be brought out of equilibrium. 
     The controllers can access data through controller bus 1. The CRT/MDI unit 2 connected to the slot 1f is supplied with display data from the controllers 10, 20, and 30. Input data entered from the keyboard of the CRT/MDI unit 2 are supplied to the controllers 10, 20, and 30. 
     The controller III 30 as a master controller performs the control of the entire system. Controller III 30 determine the priority for use of the bus 1 ad monitors the other controllers. If the number of tasks to be processed by the controller III 30 is increased to the point where it can no longer perform the control of the entire system, and any of the other controllers still has processing ability left, then the controller III 30 can transfer its master function to the other controller. 
     Although the axes to be controlled have heretofore been given in a fixed combination, they can be given in various combinations by connecting the above controllers 10, 20, and 30 to the controller bus 1. For example, the axes may first e combined such that the X1 axis and the Z1 axis are controlled by the controller I 10 and the X2 axis and the Z2 axis are controlled by the controller II 20. Then, when a different workpiece is to be machined, the axes may be combined such that the X1 axis, the Z1 axis, and the X2 axis are controlled by the controller I 10 and the Z2 axis is controlled by the controller II 20. By thus varying the combination of the axes to be controlled, the function of the machine tool being controlled is also varied. 
     The combination of the axes can be varied by varying the parameters or the like depending on the machine tool to be controlled. Commands for varying the axis combination may be inserted in a machining program. The axis combination may also be varied by using an external signal. 
     Through the use of such a numerical control system, it becomes possible to design a numerically controlled machine tool having a conceptually new mechanism. 
     Although not shown in FIG. 1, input/output units such as a floppy disk drive, a tape reader, a tape puncher a hard disk drive, etc. may be connected to the controller bus. These input/output units may be controlled by the controllers through the controller bus, and may receive and issue data for a machining program or the like. An interface to be connected to the communication circuit of a host computer or the like may also be connected to the controller bus and controlled by the controllers. Moreover, a spindle control circuit for controlling a spindle, a PC (programmable controller) of the built-in type, or the like may also be connected to the controller bus and controlled by the channels. 
     FIG. 2 shows the functions of a channel in block form. Denoted at 10 is a controller and a readout means 11 for reading a machining program from an internal memory or an external memory of another controller. 
     The controller 10 has a decoding means 12 for decoding the machining program read by the readout means 11 and converting the program into a form that can be executed. The decoding means 12 effects preprocessing operations for the numerical control system. The preprocessing operations include the conversion of an absolute command value to an incremental value, offset calculations, and the conversion of a curve to be interpolated to a straight line. The decoding means 12 also processes axis control commands and other commands such as an MST function. 
     An executing means 13 interpolates the commands processed by the decoding means 12 and issues output pulses. The executing means 13 also issues contact outputs for the MST function, etc. These output signals are applied to the axis control modules or the PC directly or through the controller bus. 
     A display control means 14 supplies display data to the CRT/MDI unit 2 through the controller bus, and receives signals from the keyboard of the CRT/MDI unit 2. 
     An external interface 15 controls, through the controller bus, peripherals such as a floppy disk drive, a tape puncher, a tape reader, and a hard disk drive, for example. The external interface 15 can also control a communication interface connected to a host computer. 
     Each of the controllers may comprise a microprocessor system comprising a processor, a RAM, a ROM, and an interface. A portion of the RAM may be constructed as a bubble memory or a non-volatile memory backed up by a battery. The ROM may comprise an EPROM or EEPROM. 
     For an increased processing capability, a coprocessor, an MMU (memory management unit), or the like may be added to each of the controllers. With respect to hardware, one printed-circuit board may be used as one controller, and a suitable number of channels may be employed depending on the system construction, so that an economic numerical control system can be designed. 
     Since the controllers share the processing operation, can transmit and receive data through the control bus 1, and change their share of processing operations as needed, the numerical control system can provide control for various machine tools. 
     With the present invention, as described above, each controller has the function of a conventional numerical control apparatus, and the controllers are interconnected by a controller bus. Therefore, the decentralized processing capability is increased, each controllers data can be accessed by other controllers, and the CRT/MDI unit can be shared by the controllers. 
     The task to be processed by each controller can be varied by program commands, input signals, or parameters. Therefore, a flexible numerical control system can be constructed which depends upon the machine tool to be controlled.