NUMERICAL CONTROLLER

Abstract: A main shaft motor (5) is instructed to return to the origin, in order to control the position of a tool. The main shaft can be returned to the origin by simply giving an instruction for returning to origin to a main shaft amplifier (SPA) that drives the main shaft motor (5). Prior to CNC-operating the machine tool, the grid shifting amount (P2) determined by a relationship pf the main shaft motor (5) and the object to be controlled is set to the side of the spindle amplifier (SPA), and position data (P3) corresponding to a distance from the origin of machine to a machining starting point transferred prior to a predetermined position stop instruction and the grid shifting amount (P2) are added up together. Therefore, when the instruction for returning to origin is produced from the numerical controller to the spindle amplifier, the position control is automatically assummed, and the moving operation is started with respect to a desired position.

Description: This invention relates to a numerical control apparatus in which an operation for returning the spindle of a spindle motor to a reference point is improved. Generally, in a numerically controlled machine tool such as a machining center or a numerically controlled lathe, an orientation function is required for stopping a spindle at a predetermined machine reference point as when automatically changing tools. Thus see for example JP-A-57-75752 and JP-A-59-128615. Other methods of commanding return to a reference point for the purpose of implementing an orientation function of this kind include a method in which a servomotor or the like is provided separately of a spindle motor, and a method in which a spindle amplifier is provided with a spindle reference-point restoration function and a command necessary for orientation is supplied by an NC apparatus. However, the method in which a servomotor is separately provided has economical disadvantages. Specifically, a more complicated mechanical structure cannot be avoided, and a motor for returning the spindle to the reference point must be installed. In the arrangement wherein a spindle amplifier is internally provided with a spindle reference-point return function, the signal system for commands from the NC apparatus and for reference-point setting commands is complicated, and control for positioning the spindle cannot be carried out with a single-step reference-point return command. Accordingly, in order to run the NC apparatus, the command program steps must be modified depending upon the type of machine tool to be numerically controlled. The present invention has been devised in order to solve the foregoing problems and its object is to provide a numerical control apparatus in which the distance from a one-revolution signal to a machine reference point is set beforehand on the side of a spindle amplifier, and return to the reference point can be commanded in simple fashion merely by commanding the distance from the machine reference point to a stopping position. In accordance with the present invention, there can be provided a numerical control apparatus having a function for controlling, for return to a reference point, a spindle motor capable of positionally controlling a controlled object by a position signal, comprising setting means for setting a driving amplifier of the spindle motor to a grid-shift quantity of the controlled object, command means for commanding a distance to a stopping target position during a positional control operation by a positioning control mode command, and monitoring means for monitoring the status of positional control by the spindle motor. In the numerical control apparatus of the present invention, a grid-shift quantity decided by the relationship between the spindle motor and the controlled object is set on the side of the spindle amplifier before CNC operation of a machine tool or the like, and the grid-shift quantity is added to position data, which corresponds to a machining starting point, transferred before a fixed-position stopping command. Therefore, when a reference-point return command is outputted to the side of the spindle amplifier, a transition is made automatically to positional control to start a reference-point return operation with respect to the target position so that the spindle can be positioned at the machining starting point. Accordingly, when the spindle is controlled to be positioned at a machining starting point of C-axis machining, it will suffice merely to execute a single-step reference-point return command. Brief Description of the Drawings Fig. 1 is a block diagram illustrating an embodiment of the present invention, Fig. 2 is a diagram for describing an operation for returning a spindle to a reference point, Fig. 3 is a timing chart illustrating the procedure of the reference-point return operation, Fig. 4 is a flowchart illustrating the procedure of the reference-point return operation in the same embodiment, and Fig. 5 is a flowchart illustrating the flow of C-axis control. An embodiment of the present invention will now be described in detail with reference to the drawings. Fig. 1 illustrates a spindle SP, which is controlled by a numerical control unit CNC, and a spindle amplifier SPA. In Fig. 1, numeral 1 denotes a spindle controller, which is constituted by a special-purpose microprocessor and memory, for outputting velocity commands and the like to the SPA based on commands from the CNC. The spindle amplifier SPA, which is constituted by an error counter 2, a velocity amplifier 3 and a current amplifier 4, controls a spindle motor 5 to rotate the motor at the commanded velocity. The spindle motor 5 is provided with a velocity detector 6, which returns a velocity feedback signal Vf to an arithmetic unit 7. A current feedback signal If is returned to an arithmetic unit 8. The spindle motor 5 has its torque transferred to the spindle SP via a gear mechanism 9 and drives a controlled object 11, such as a workpiece, via a gear mechanism 10. Numeral 12 denotes a position detector for detecting the control position of the controlled object 11. The position detector 12 supplies the spindle controller 1 with position feedback pulses Pf and one-revolution pulses Pi. The position feedback pulses Pf are fed back to an arithmetic unit 13, which computes the error between these pulses and the position command which the CNC applied to the spindle amplifier SPA. Fig. 2 is for describing operating position when the spindle is positionally controlled by using the spindle motor 5 having the construction mentioned above. Here the operating position of the controlled object 11 is illustrated as an angular position corresponding to detection pulses from the position detector 12. It will be assumed that the position control command from the CNC is outputted as a C-axis control mode command, and that the spindle has passed a one-revolution signal detection point Pb in the clockwise direction from any initial stopping position Pa. Pc represents the machine reference point set specifically for the controlled object 11. A grid-shift quantity P2 between Pb and Pc is preset internally of the spindle controller 1. Pd represents a control target position such as a machining starting point or the like for performing C-axis machining. A number P3 of pulses corresponding to the distance from the machine reference point Pc to the target position Pd is set in the error counter 2 at a predetermined timing by the CNC. Fig. 3 is a diagram showing the timing of signals exchanged by the CNC and the spindle amplifier SPA, and Fig. 4 is a flowchart illustrating the procedure of the reference-point return operation. The operation of the embodiment of Fig. 1 will now be described with reference to the timing diagram and the flowchart showing the processing of signals within the CNC and SPA. First, a positional control mode command SCSL is turned on in the CNC, and the CNC outputs the command to the spindle side. As a result, on the SPA side which until now has been undergoing ordinary spindle-velocity control, the spindle motor 5 is decelerated and the spindle SP is stopped at the arbitrary initial stopping position Pa. Thereafter, the error counter 2 is reset and waits in standby until a reference-point return command RNMS command is turned on. Meanwhile, data H in a move command register set in the spindle controller 1 is ignored by the CNC. On the side of the spindle amplifier SPA thus placed in state capable of positional control, a positional control status signal SCST is turned on. The reference-point return command RNMS is turned on on the side of the CNC, which detects the fact that the signal SCST has turned on. In response to the reference-point return command RNMS, the CNC rotates the spindle at the commanded velocity, which is that at which the one-revolution signal can be detected, namely the detection velocity. When the one-revolution signal Pi is detected, a commanded position P (= P2 + P3) is set in the error counter 2 and a position loop, which includes the position detector 12, is closed. Owing to formation of the position loop on the spindle side, a position signal POS is transferred to the CNC side, which is thus informed of the fact that the SPA has made the transition to position control. In response, the CNC cancels the reference-point command RNMS and renders the move command effective. In other words, the data delivered by the CNC to the move command region on the spindle side indicates a number P3 of pulses corresponding to the distance from the machine reference point Pc to the commanded stopping position Pd only if the reference-point return command RNMS is on. Thereafter, a transition is made to C-axis control signal processing within the CNC and SPA. Fig. 5 is a flowchart of C-axis control summing up the control flow of Fig. 4 set forth above. Though an embodiment of the present invention has been described, the invention is not limited to this embodiment but can be modified in various ways without departing from the scope of the claims. Industrial Applicability The numerical control apparatus of the present invention is such that when the spindle motor is controlled to perform C-axis control, the outputted reference-point return command RNMS can be responded to quickly and the exchange of signals is simplified. As a result, the load on the CNC side is reduced and highly precise control becomes possible.

Claims: A numerical control apparatus having a function for controlling, for return to a reference point (Pc), a spindle motor (5) capable of positionally controlling a controlled object (11) by a position signal, characterised by: setting means (1) for setting a control amplifier (SPA) of said spindle motor (5) to a grid-shift quantity (P2) of said controlled object (11); command means for commanding a distance to a stopping target position during a positional control operation by a positioning control mode command; and monitoring means (12) for monitoring the status of positional control by said spindle motor (5). A numerical control apparatus according to claim 1, characterized in that said position control mode command is a C-axis mode command for commanding C-axis machining, the C-axis mode command is outputted before a command for returning said spindle motor (5) to the reference point (Pc), and the spindle (SP) is controlled to be positioned at a machining starting point of C-axis machining. A numerical control apparatus according to claim 1 or 2, characterized in that positional control of said controlled object (11) is performed by an error counter (2) provided within the spindle motor control amplifier (SPA), and end of positioning control is sensed by monitoring the contents of the error counter (2).

Inventors: KONO SHINICHI FANUC MANSION HA, TAKAHASHI HIRONOBU FANUC DAI V, KONO, SHINICHI FANUC MANSION HARIMOMI 7-203, TAKAHASHI, HIRONOBU FANUC DAI 3 VILLA-KARAMATSU
Applicants: FANUC LTD, FANUC LTD.
Application year: 1989
Main classification: G05B19
IPC codes: G05D3, G05B19