MOTOR CONTROL DEVICE

Motor drive information is sampled at a regular interval and stored in a storage unit, during a period when a normal operation is performed in accordance with a first command signal received from a controller. When an abnormality occurs, a second command signal with which a motor can be driven is internally generated from the motor drive information stored in the storage unit. When the abnormality occurs, the internally-generated second command signal is input as a command signal to a motor drive unit, and thereby it is possible to achieve a necessary retracting operation without any problem even if the first command signal cannot be obtained from the controller.

DESCRIPTION OF EMBODIMENTS

Exemplary embodiments of a motor control device according to the present invention will be described below in detail with reference to the accompanying drawings. It should be noted that the present invention is not limited to the embodiments.

First Embodiment

FIG. 1is a block diagram showing a configuration of a motor control device according to a first embodiment of the present invention. InFIG. 1, a motor control device la according to the first embodiment includes error-component extraction units5and7, a position control unit6, a differentiating unit8, a speed control unit9, and a current control unit10, as a basic configuration (corresponding to a “motor drive unit”) for performing a drive control of a motor4based on a command signal R (corresponding to a “first command signal”) input from a controller3ato a communication port2.

Here, the command signal R input from the controller3ais a position command signal or a speed command signal. InFIG. 1, for the sake of explanations, the command signal R is assumed to be a position command signal. A detector11attached to the motor4detects a motor position k. The detected motor position k is input as a feedback signal to the error-component extraction unit5and the differentiating unit8.

In addition to the basic configuration, the motor control device la according to the first embodiment further includes a switch12being a command switching unit, an abnormality detection unit13, a storage unit14a,a command generation unit15a,a status-display output unit16, and a status display unit17, as a configuration for causing the motor4to perform a retracting operation at a time when an abnormality occurs.

First, the basic configuration for performing the drive control of the motor4based on the command signal R received from the controller3awill be briefly described.

In the basic configuration for performing the drive control of the motor4, the command signal R from the controller3ais directly input to an addition input terminal (+) of the error-component extraction unit5through the communication port2. The motor position k detected by the detector11attached to the motor4is input to a subtraction input terminal (−) of the error-component extraction unit5and the differentiating unit8.

The error-component extraction unit5calculates a difference between the command signal R received from the controller3aand the motor position k detected by the detector11. The position control unit6performs processing including a proportional operation with respect to the position difference calculated by the error-component extraction unit5and outputs a speed command S for decreasing the position difference to an addition input terminal (+) of the error-component extraction unit7. The differentiating unit8calculates a motor speed m by differentiating the motor position k, and the calculated motor speed m is input to a subtraction input terminal (−) of the error-component extraction unit7.

The error-component extraction unit7calculates a speed difference of the speed command S output from the position control unit6and the motor speed m output from the differentiating unit8. The speed control unit9performs processing including a proportional operation and an integration operation with respect to the speed difference calculated by the error-component extraction unit7and outputs a current command T for decreasing the speed difference to the current control unit10. The current control unit10outputs a drive current for driving the motor4, based on the current command T calculated by the speed control unit9.

In this manner, the basic configuration for performing the drive control of the motor4, including “the error-component extraction units5and7, the position control unit6, the differentiating unit8, the speed control unit9, and the current control unit10”, performs an operation that drives the motor4to follow the command signal R input from the controller3a.

Next, a configuration for causing the motor4to perform a retracting operation when an abnormality occurs will be described below with taking a machining tool for instance.

The abnormality detection unit13monitors occurrence of an electric power failure and a drive status of the motor4(such as whether or not the motor4is driven to follow the command signal R input from the controller3a) during an operation of the machining tool, and notifies the switch12, the storage unit14a,and the command generation unit15aof a monitor result indicating whether or not an abnormality occurs. The reason why the abnormality detection unit13notifies the occurrence of the electric power failure is to perform, when the electric power failure occurs, a retracting operation by using electric power remaining in capacitive components. The amount of electric power remaining at the time of the electric power failure is known in advance.

The switch12is provided between the communication port2for communicating with the controller3a,the addition input terminal (+) of the error-component extraction unit5, and an output terminal of the command generation unit15a.In a case where the abnormality detection unit13detects no abnormality, the switch12inputs the command signal R input to the communication port2from the controller3ato the addition input terminal (+) of the error-component extraction unit5. Meanwhile, in a case where the abnormality detection unit13detects an abnormality, the switch12inputs an internal command signal ra (corresponding to a “second command signal”) output from the command generation unit15ato the addition input terminal (+) of the error-component extraction unit5.

The storage unit14aincludes a RAM and a control circuit. When the abnormality detection unit13detects no abnormality, the control circuit samples motor drive information at an arbitrarily-set regular interval and stores the sampled motor drive information in the RAM. Here, the motor drive information includes any one of or a combination of the position command or the speed command indicated by the command signal R input to the addition input terminal (+) of the error-component extraction unit5, the motor position k detected by the detector11, and the motor speed m calculated by the differentiating unit8from the motor position k. The storing of the motor drive information in the RAM is repeated in a manner that a predetermined number of pieces of the information are overwritten.

In the case where the abnormality detection unit13detects the abnormality, the command generation unit15areads the motor drive information that has been stored in the storage unit14at the regular interval, specifically reads a predetermined number of pieces of the motor drive information in order of time from the detection of the abnormality to the past. Then, the command generation unit15agenerates the internal command signal ra that causes a retraction path tracking back a pre-abnormality-occurrence motor drive trajectory from the time of the detection of the abnormality to the past, and outputs the generated internal command signal ra to the addition input terminal (+) of the error-component extraction unit5through the switch12. As a result, the motor4is driven to perform the retracting operation based on the internal command signal ra instead of the command signal R. Therefore, when the abnormality occurs, the retracting operation can be achieved regardless of whether or not the command signal R can be obtained from the controller3a.

Here, in a case where the abnormality detected by the abnormality detection unit13is an electric power failure, the command generation unit15agenerates a required number of internal command signals ra for causing the motor4to achieve the retracting operation within a range of the remaining amount of electric power. Meanwhile, in a case where the abnormality detected by the abnormality detection unit13is other than an electric power failure, the command generation unit15agenerates a required number of internal command signals ra for causing the motor4to achieve the retracting operation within a range of any one of a preset operation time and a preset operation distance.

The status-display output unit16displays, on the status display unit17, a fact that the motor4is being driven in accordance with the internal command signal ra generated by the command generation unit15aor the driving of the motor4is completed, and outputs the fact as a status signal A to the controller3a.As a result, a user can recognize that the motor4has been driven by the internal command signal ra, that is, the motor4has performed the retracting operation.

Next, the retracting operation according to the first embodiment will be described with reference toFIGS. 2 to 4.FIG. 2is a flowchart for explaining a procedure of the retracting operation performed by the motor control device shown inFIG. 1when the motor control device detects an abnormality such as an electric power failure that disables normal driving of the motor. InFIG. 2, a step indicating a process procedure is denoted by “ST”.FIGS. 3 and 4are explanatory diagrams of an operation of generating the internal command signal by the command generation unit shown inFIG. 1.

InFIG. 2, at ST1, the switch12connects the communication port2and the addition input terminal (+) of the error-component extraction unit5. As a result, the command signal R input from the controller3ato the communication port2is input to the addition input terminal (+) of the error-component extraction unit5(ST2), and motor driving is performed based on the command signal R (ST3). Concurrently, the motor drive information is sampled at a regular interval and stored in the storage unit14a(ST4). The processing of ST1to ST4is repeated (ST5: No), until the abnormality detection unit13detects occurrence of an abnormality.

If the abnormality detection unit13detects occurrence of an abnormality (ST5: Yes), the switch12switches the command signal to be input to the addition input terminal (+) of the error-component extraction unit5from the command signal R output from the controller3ato the internal command signal ra generated and output by the command generation unit15a(ST6).

When the abnormality detection unit13detects the occurrence of the abnormality (ST5: Yes), the command generation unit15areads a piece of the motor drive information from the storage unit14a(ST7) and generates a single internal command signal ra (ST8). As a result, the single internal command signal ra is input to the addition input terminal (+) of the error-component extraction unit5, and thus motor driving is performed based on the internal command signal ra (ST9). The processing of ST7to ST9is repeated (ST10: No), until the retracting operation is completed, that is, the required number of the internal command signals ra for achieving the retracting operation is generated.

The command generation unit15anotifies the status-display output unit16of whether or not the retracting operation is completed. When receiving a notification that the retracting operation is not yet completed, the status-display output unit16displays, on the status display unit17, a fact that the retracting operation is in progress, and outputs “the status signal A=the retracting operation in progress” to the controller3a(ST11). On the other hand, when receiving a notification that the retracting operation is completed, the status-display output unit16displays, on the status display unit17, a fact that the retracting operation is completed, and outputs “the status signal A=completion of the retracting operation” to the controller3a(ST12).

Next, operations of generating the internal command signal ra will be described with reference toFIGS. 3 and 4. InFIGS. 3 and 4, a horizontal axis represents a time and a vertical axis represents a motor position. Shown inFIG. 3is an example where a retraction trajectory21having the same slope as a motor trajectory20prior to occurrence of an abnormality but with an inverse gradient is traced. Shown inFIG. 4is an example where a retraction trajectory22having a smaller slope than that of the motor trajectory20prior to occurrence of an abnormality but with an inverse gradient is traced.

InFIG. 3, a value N1, a value N1−1, a value N1−2, and a value N1−3 represented on the motor trajectory20at a regular interval T1, respectively indicating the motor positions, correspond to the motor drive information stored in the storage unit14aat the regular interval. When receiving a notification of occurrence of an abnormality, the command generation unit15areads, from the storage unit14a,the motor drive information N1 as position information Sa1, the motor drive information N1−1 as position information Sa1+1, the motor drive information N1−2 as position information Sa1+2, and the motor drive information N1−3 as position information Sa1+3, respectively. Then, the read position information Sa1, Sa1+1, Sa1+2, and Sa1+3 are interpolated with the same interval T1 as in the case of the motor trajectory20, and thereby the internal command signal ra for tracing the retraction trajectory21having the same slope as the motor trajectory20prior to the occurrence of the abnormality but with an inverse gradient is generated.

InFIG. 4, when receiving a notification of occurrence of an abnormality, the command generation unit15areads, from the storage unit14a,the motor drive information N1 as position information Sb1, the motor drive information N1−1 as position information Sb1+1, the motor drive information N1−2 as position information Sb1+2, and the motor drive information N1−3 as position information Sb1+3, respectively. Then, the read position information Sb1, Sb1+1, Sb1+2, and Sb1+3 are interpolated with an interval T2 larger than the interval T1 in the case of the motor trajectory20, and thereby the internal command signal ra for tracing the retraction trajectory22having a smaller slope than that of the motor trajectory20prior to the occurrence of the abnormality but with an inverse gradient is generated.

The examples shown inFIGS. 3 and 4have the following relationship, for example. When an abnormality that disables normal driving of the motor occurs, the motor is so driven as to trace back to the past at the same motor speed as compared with the motor speed prior to the occurrence of the abnormality to move to the position Sa1+3 and then stopped, as shown inFIG. 3. In an operation thereafter, an abnormality that disables normal driving of the motor occurs again. In this case, the retraction process is changed. At this time, as shown inFIG. 4, the motor is so driven as to trace back to the past at a lower speed as compared with the motor speed prior to the occurrence of the abnormality to move to the position Sb1+3 and then stopped.

According to the first embodiment, as described above, the motor drive information is stored in the storage unit at a regular interval, during a period when a normal operation is performed. When an abnormality occurs, the internal command signal with which the motor can be driven is generated from the motor drive information stored in the storage unit. It is therefore possible to achieve a necessary retracting operation without any problem even if the command signal R cannot be obtained from the controller. Moreover, since the retracting operation is performed by the motor control device, the controller needs not to constantly calculate a retraction program and store move amount. It is thus possible to avoid increase in a device size of the controller, which also is advantageous.

Second Embodiment

FIG. 5is a block diagram showing a configuration of a motor control device according to a second embodiment of the present invention. It should be noted inFIG. 5that the same reference signs are given to the same or equivalent constituent elements as those described inFIG. 1(the first embodiment). A part related to the second embodiment will be mainly described below.

InFIG. 5, a controller3b(reference sign is changed) outputs a retraction position P as well as the command signal R. In a case of a motor control device1baccording to the second embodiment, the retraction position P output from the controller3binstead of the motor drive information in the case of the first embodiment is input through a communication port19to and stored in a storage unit14bwhose reference sign is changed from that in the configuration shown inFIG. 1(the first embodiment).

Furthermore, a command generation unit15b(reference sign is changed) generates an internal command signal rb based on the retraction position P stored in the storage unit14b.The internal command signal rb is generated such that the retracting operation is completed within a range of any one of a preset operation time, a preset operation distance, and a remaining amount of electric power. The other configurations are similar to those inFIG. 1.

Operations of the part related to the second embodiment will be described below with reference toFIGS. 6 and 7.FIG. 6is a flowchart for explaining a procedure of the retracting operation performed by the motor control device shown inFIG. 5when the motor control device detects an abnormality such as an electric power failure that disables normal driving of the motor.FIG. 7is an explanatory diagram of an operation of generating the internal command signal in the command generation unit shown inFIG. 5.

InFIG. 6, at ST21, the switch12connects the communication port2and the addition input terminal (+) of the error-component extraction unit5. As a result, the command signal R input from the controller3bto the communication port2is input to the addition input terminal (+) of the error-component extraction unit5(ST22), and motor driving is performed based on the command signal R (ST23). Concurrently, the retraction position P output from the controller3bis stored in the storage unit14b(ST24). The processing of ST21to ST24is repeated (ST25; No), until the abnormality detection unit13detects occurrence of an abnormality. The retraction position P stored in the storage unit14bis overwritten every time it is changed (ST24).

If the abnormality detection unit13detects occurrence of an abnormality (ST25: Yes), the switch12switches the command signal to be input to the addition input terminal (+) of the error-component extraction unit5from the command signal R output from the controller3bto the internal command signal rb generated and output by the command generation unit15b(ST26).

When the abnormality detection unit13detects occurrence of the abnormality (ST25: Yes), the command generation unit15breads the retraction position P from the storage unit14b(ST27), and performs interpolation for forming a retraction path whose target position is the retraction position P to generate the internal command signal rb (ST28). As a result, the internal command signal rb is input to the addition input terminal (+) of the error-component extraction unit5, and thus motor driving is performed based on the internal command signal rb (ST29). The processing of ST27to ST29is repeated (ST30: No), until the retracting operation is completed, that is, the internal command signal rb that completes the retracting operation within a range of any one of a preset operation time, a preset operation distance, and a remaining amount of electric power is generated in ST28.

The command generation unit15bnotifies the status-display output unit16of whether or not the retracting operation is completed. When receiving a notification that the retracting operation is not yet completed, the status-display output unit16displays, on the status display unit17, a fact that the retracting operation is in progress, and outputs “the status signal A=the retracting operation in progress” to the controller3b(ST31). On the other hand, when receiving a notification that the retracting operation is completed, the status-display output unit16displays, on the status display unit17, a fact that the retracting operation is completed, and outputs “the status signal A=completion of the retracting operation” to the controller3b(ST32).

Next, an operation of generating the internal command signal rb will be described with reference toFIG. 7. InFIG. 7, a horizontal axis represents a time and a vertical axis represents a motor position. Two retraction positions P1 and P2 (P1<P2) among a plurality of retraction positions output from the controller3bare shown on the vertical axis. It should be noted that the retraction position stored in the storage unit14bis the latest retraction position. The retraction position P1 is output within a period32(an interval of retraction to the retraction position P1) from a retraction update point30to a retraction update position31. The retraction position P2 is output within a period34(an interval of retraction to the retraction position P2) from the retraction update point31to a retraction update position33. Therefore, a trajectory35of the retraction positions output from the controller3bis changed in a stepwise manner.

A diagonally right-up straight line36represents a motor trajectory based on the command signal R output from the controller3b.A point N2 and a point N2+1 on the motor trajectory36respectively indicate timings at which abnormalities that disable the normal driving of the motor occur. The point N2 is located within the period32, and the point N2+1 is located within the period34.

When the abnormality occurs at the point N2 located within the period32, the command generation unit15bgenerates the internal command signal rb that is interpolated to cause a retraction path whose target position is the retraction position P1 as indicated by an arrow37. As a result, the retracting operation whose target position is the retraction position P1 is executed in response to the abnormality occurred at the point N2.

Similarly, when the abnormality occurs at the point N2+1 located within the period34, the command generation unit15bgenerates the internal command signal rb that is interpolated to cause a retraction path whose target position is the retraction position P2 as indicated by an arrow38. As a result, the retracting operation whose target position is the retraction position P2 is executed in response to the abnormality occurred at the point N2+1.

According to the second embodiment, as described above, it is possible to drive toward an arbitrarily-set retraction position specified by the controller. Therefore, the retraction can be achieved even when a retraction direction is limited due to a condition such as the machining status or machine attitude.

In the second embodiment, a retracting operation by using a single retraction position has been explained; however, a configuration wherein a plurality of retraction positions managed with sequential numbers are used and the retraction operation of the motor is performed to trace their trajectory also is possible in a similar manner.

In the first and second embodiments, a method of performing the retracting operation when the abnormality is detected has been explained. Besides the abnormality, it is also possible to start the retracting operation in response to another signal received from the controller. With this configuration, it is possible to simulate the retracting operation of the motor control device, triggered by the controller.

The invention of the present application is not limited to the above-described embodiments, and when the present invention is carried out, the invention can be variously modified without departing from the scope thereof. In the above embodiments, inventions of various stages are included, and various inventions can be extracted by appropriately combining a plurality of constituent elements disclosed herein. For example, even when some constituent elements are omitted from all the constituent elements described in the embodiments, as far as the problems mentioned in the section of Solution to Problem can be solved and effects mentioned in the section of Advantageous Effects of Invention are obtained, the configuration from which these constituent elements have been omitted can be extracted as an invention. Furthermore, constituent elements common to different embodiments can be appropriately combined.

INDUSTRIAL APPLICABILITY

As described above, the motor control device according to the present invention is useful as a motor control device that can cause a motor to perform a retracting operation without fail even when a command signal cannot be obtained from a controller in a case where an abnormality occurs. In particular, the motor control device according to the present invention is suitable for a motor control device that drives a motor in an industrial machine apparatus based on a command signal received from a controller.

REFERENCE SIGNS LIST

1a,1bmotor control device

5,7error-component extraction unit

6position control unit

9speed control unit

10current control unit

13abnormality detection unit

15a,15bcommand generation unit

16status-display output unit

17status display unit