Servo controller

10860003 ยท 2020-12-08

Assignee

Inventors

Cpc classification

International classification

Abstract

The servo controller is provided with a command reception unit and a servo control computation unit. In a measurement mode, the command reception unit asynchronously receives with every command reception period a counter output by the control device with every command update period. The servo controller is further provided with an event detection unit configured to detect the occurrence of an event which entails variation in reception intervals of the counter in the measurement mode, a deviation calculation unit configured to calculate a deviation amount between respective clocks of the control device and the servo controller, based on an occurrence period of the event and the command reception period, in the measurement mode, and a reception period adjustment unit configured to adjust the command reception period based on the deviation amount in an operation mode.

Claims

1. A servo controller comprising a command reception unit configured to asynchronously receive with every command reception period a command output by a control device with every command update period and a servo control computation unit configured to control a motor in response to the command, wherein the command reception unit asynchronously receives with every said command reception period a counter output by the control device with every said command update period in a measurement mode, the servo controller comprising: an event detection unit configured to detect the occurrence of an event which entails variation in reception intervals of the counter in the measurement mode; a deviation calculation unit configured to calculate a deviation amount between respective clocks of the control device and the servo controller, based on an occurrence period of the event and the command reception period, in the measurement mode; and a reception period adjustment unit configured to adjust the command reception period based on the deviation amount in an operation mode.

2. The servo controller according to claim 1, wherein adjustment time of the command reception period by the reception period adjustment unit is an integer multiple of a minimum clock value of the servo controller.

3. The servo controller according to claim 1, wherein the phase of the command reception period after the adjustment thereof by the reception period adjustment unit is shifted by a substantially half-period length from that before the adjustment.

4. The servo controller according to claim 1 further comprising a deviation buffer unit configured to store the deviation amount.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) The above and other objects and features of the present disclosure will be obvious from the description of embodiments with reference to the accompanying drawings, in which:

(2) FIG. 1 is a diagram illustrating the structure of a motion system comprising a servo controller;

(3) FIG. 2 is a diagram showing the operation of a motion system comprising a conventional servo controller;

(4) FIG. 3 is a diagram showing the operation of the motion system comprising the conventional servo controller;

(5) FIG. 4 is a diagram showing a method in which the servo controller calculates deviation amounts;

(6) FIG. 5 is a diagram showing a method in which the servo controller calculates deviation amounts;

(7) FIG. 6 is a diagram showing the operation of a motion system comprising a servo controller of Example 1;

(8) FIG. 7 is a diagram showing the operation of the motion system comprising the servo controller of Example 1;

(9) FIG. 8 is a diagram showing the operation of a motion system comprising a servo controller of Example 2;

(10) FIG. 9 is diagram showing the operation of the motion system comprising the servo controller of Example 2;

(11) FIG. 10 is a diagram showing the structure of a motion system comprising a servo controller; and

(12) FIG. 11 is a diagram showing another example of the structure of the motion system comprising the servo controller.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

(13) The following is a description of the operation of a servo controller 100 according to embodiments of the present invention. The servo controller 100 comprises a mechanism for detecting and correcting variation in command reception intervals variation. The servo controller 100 has two modes of operation, a measurement mode and an operation mode.

(14) The measurement mode is a mode for calculating the deviation amount between the respective clocks of a control device 200 and the servo controller 100 before an operation based on an actual command. The servo controller 100 is assumed to be previously stored with the following relationship between the respective command update periods of these two devices.

(15) Command update period M=Command reception period Sa (a=1, 2, 3 . . . ).

(16) A method for calculating the deviation amount between the respective clocks of the two devices will be described with reference to FIGS. 4 and 5. The control device 200 periodically outputs a signal called a counter in place of the command. The period of counter output is the command update period M. The servo controller 100 periodically attempts the reception of the counter. The period of reception attempt is the command reception period S. In most cases, the servo controller 100 receives the counter with every a number of reception attempts. As the clock deviation accumulates, however, such a phenomenon (hereinafter referred to as event) occurs that the counter cannot be received with every a number of reception attempts. Specifically, the servo controller 100 at the time of the occurrence of the event receives the counter upon an (a+1)th (see FIG. 4) or (a1)th (see FIG. 5) reception attempt since the last reception. The occurrence of the event has a periodicity and its period is repeated with every x number of counter updates. The servo controller 100 measures this period x. A deviation amount t is calculated from the event occurrence period x and the command reception period S according to the following equations. The deviation amount t represents the progress of time for each command reception period S indicated by the clock of the servo controller 100 relative to a time indicated by the clock of the control device 200. It is indicated that the clock of the servo controller 100 is faster if the deviation amount t is positive and is slower if the deviation amount t is negative.

(17) In the case where the servo controller 100 receives the counter when (a+1) number of reception attempts are performed with every x number of counter updates (see FIG. 4), the deviation amount t can be represented by the following equation:
t=S/(xa)(reception interval>a).

(18) In the case where the servo controller 100 receives the counter when (a1) number of reception attempts are performed with every x number of counter updates (see FIG. 5), the deviation amount t can be represented by the following equation:
t=S/(xa)(reception interval<a).

(19) The operation mode is a mode in which the operation is performed based on the actual command output by the control device 200. Based on the clock deviation amount calculated in the measurement mode, the servo controller 100 adjusts the command reception period S so that the event ceases to occur with every command reception. Specifically, the servo controller 100 changes the length of the command reception period S.

(20) Deviation amounts D.sub.n at the time of an nth command reception in the servo controller 100 can be represented by the following equation:
D.sub.n=t+R.sub.n-1,
where t is a deviation amount for each command reception period S and R.sub.n-1 represents deviation amounts (hereinafter referred to as carry-over times) having failed to be adjusted at the time of the last or (n1)th command reception.

(21) Of the amounts D.sub.n, a deviation amount (hereinafter referred to as adjustment time) that can be adjusted at the time of the nth command reception depends on a minimum clock value T. The minimum clock value T is a clock period that defines the timing of every processing of the servo controller 100 and is a minimum time unit for the adjustment of the length of the command reception period S. Thus, the adjustment time is an integer multiple of the minimum clock value T, which can be represented as follows:
Adjustment time=Q.sub.nT,
where Q.sub.n is an integer part of the quotient of D.sub.n/T.

(22) The servo controller 100 adds the calculated adjustment time to the command reception period S. Thereupon, the length of the command reception period S is adjusted. The deviation amounts having failed to be adjusted at the time of the nth command reception are handled as the carry-over times at the time of the next or (n+1)th command reception. Carry-over times R.sub.n for the (n+1)th command reception can be represented as follows:
R.sub.n=D.sub.n(Q.sub.nT).

(23) According to these steps of processing, the reception period is adjusted in units of minimum clock value T in each command reception. Thus, the accumulation of the deviation amount t between the respective clocks of the control device 200 and the servo controller 100 is eliminated as required, so that the occurrence of the event is suppressed.

(24) Since the deviation amount t never changes even when a motion system 1 comprising the servo controller 100 is restarted, recalculation is unnecessary. The timing of processing start changes, however. After the restart, therefore, the timing of the occurrence of the next event should be once predicted in the measurement mode, which is to be switched over to the operation mode for the adjustment of the command reception period S.

(25) FIG. 10 is a block diagram showing the structure of a motion system 1 comprising a servo controller 100 according to an embodiment of the present invention. The motion system 1 comprises the servo controller 100, a control device 200, a motor 300, and a pulse coder 310.

(26) The control device 200 is a host controller such as a numerical controller or PLC (programmable logic controller). The control device 200 outputs to the servo controller 100 a counter in the measurement mode and position and speed commands in the operation mode.

(27) The servo controller 100 comprises a command reception unit 110, event detection unit 111, deviation calculation unit 112, deviation buffer unit 113, reception period adjustment unit 114, and servo control computation unit 120.

(28) The command reception unit 110 receives the counter or the commands such as the position and speed commands output by the control device 200.

(29) In the measurement mode, the event detection unit 111 detects the occurrence of the event in the servo controller 100.

(30) In the measurement mode, the deviation calculation unit 112 calculates the relative deviation amount t between the respective internal clocks of the control device 200 and the servo controller 100 based on the event occurrence period x (for which the event occurs with every x number of counter updates) and the command reception period S.

(31) The deviation buffer unit 113 temporarily saves the deviation amount t calculated by the deviation calculation unit 112 in the measurement mode.

(32) In the operation mode, the reception period adjustment unit 114 adjusts the command reception period S based on the deviation amount t saved by the deviation buffer unit 113, thereby suppressing the occurrence of the event.

(33) The servo control computation unit 120 outputs a command pulse signal responsive to a command to the motor 300. The motor 300 is driven at a rotation angle and a rotation speed corresponding to the command pulse signal. The pulse coder 310 detects the rotation angle and the rotation speed of the axis of the motor 300 and feeds them back as encoder signals to the servo control computation unit 120. The servo control computation unit 120 performs feedback control based on the encoder signals, thereby adjusting the command pulse signal.

(34) A specific operation example of the servo controller 100 will be disclosed as an example.

Example 1

(35) The operation of a motion system 1 comprising a servo controller 100 according to Example 1 will be described with reference to FIGS. 6 and 7. In the measurement mode, as shown in FIG. 6, a control device 200 output counters in the command update period M1 ms. Before the adjustment or in the measurement mode, the servo controller 100 attempted the counter reception with the command reception period S=250 s. Consequently, events with long command reception intervals periodically occurred entailing x=5,000 and a=4. Thus, a command reception unit 110 received the counter with every four reception attempts in most cases but with five reception attempts in seldom cases (event occurrence). An event occurred with every 5,000 command updates. Consequently, a deviation calculation unit 112 calculated the deviation amount t for each command reception period S as 12.5.

(36) In the operation mode, a reception period adjustment unit 114 of the servo controller 100 calculated the deviation amount D.sub.n, adjustment amount Q.sub.n, and carry-over time R.sub.n with every command reception. FIG. 7 shows transitions of the calculated deviation amount D.sub.n, adjustment amount Q.sub.n, and carry-over time R.sub.n. In command reception cycles (indicated by asterisks) with the adjustment amount Q.sub.n of 1, the command reception period S was adjusted in units of minimum clock value T=20 ns so that the accumulation of the deviation amount was partially eliminated. Thus, it can be understood that the deviation amount D.sub.n was reduced in the next command reception cycle.

(37) As shown in FIG. 6, the servo controller 100 after the adjustment or in the operation mode adjusted the command reception period S to 250 s+20 ns in the command reception cycles indicated by the asterisks. Since no adjustment is made in the unmarked command reception cycles, the command reception period S remains at 250 s. The accumulation of the clock deviation amount t was eliminated as required by this adjustment. Thus, no event occurred in the operation mode.

(38) Preferably, as shown in FIG. 6, the servo controller 100 should shift the phase of the command reception period after the adjustment by about a/2 from that before the adjustment by interruption when the measurement mode transfers to the operation mode, that is, when the adjustment is started. In this way, the command reception can be started at a timing when an event is least liable to occur. Moreover, this interruption should preferably be performed at a timing one cycle or more before a command reception cycle in which the event is expected to occur. Thus, a processing time can be secured for the adjustment of the command reception period S, so that the mode can be smoothly shifted to the operation mode.

Example 2

(39) The operation of a motion system 1 comprising a servo controller 100 according to Example 2 will be described with reference to FIGS. 8 and 9. In the measurement mode, as shown in FIG. 8, a control device 200 output counters in the command update period M1 ms. Before the adjustment or in the measurement mode, the servo controller 100 attempted the counter reception with the command reception period S=250 s. Consequently, events with short command reception intervals periodically occurred entailing x=5,000 and a=4. Thus, a command reception unit 110 received the counter with every four reception attempts in most cases but with three reception attempts in seldom cases (event occurrence). An event occurred with every 5,000 command updates. Consequently, a deviation calculation unit 112 calculated the deviation amount t for each command reception period S as 12.5.

(40) In the operation mode, a reception period adjustment unit 114 of the servo controller 100 calculated the deviation amount D.sub.n, adjustment amount Q.sub.n, and carry-over time R.sub.n with every command reception. FIG. 9 shows transitions of the calculated deviation amount D.sub.n, adjustment amount Q.sub.n, and carry-over time R.sub.n. In command reception cycles (indicated by asterisks) with the adjustment amount Q.sub.n of 1, the command reception period S was adjusted in units of minimum clock value T=20 ns so that the accumulation of the deviation amount was partially eliminated. Thus, it can be understood that the absolute value of the deviation amount D.sub.n was reduced in the next command reception cycle.

(41) As shown in FIG. 8, the servo controller 100 after the adjustment or in the operation mode adjusted the command reception period S to 250 s-20 ns in the command reception cycles indicated by the asterisks. Since no adjustment is made in the unmarked command reception cycles, the command reception period S remains at 250 s. The accumulation of the clock deviation amount t was eliminated as required by this adjustment. Thus, no event occurred in the operation mode.

(42) Preferably, also in Example 2 as shown in FIG. 8, the servo controller 100 should shift the phase of the command reception period after the adjustment by about a/2 from that before the adjustment by interruption when the measurement mode transfers to the operation mode, that is, when the adjustment is started. In this way, the command reception can be started at a timing when an event is least liable to occur. Moreover, this interruption should preferably be performed at a timing one cycle or more before a command reception cycle in which the event is expected to occur. Thus, a processing time can be secured for the adjustment of the command reception period S, so that the mode can be smoothly shifted to the operation mode.

(43) According to the present embodiment, even in the case where the command update by the control device 200 and the command reception by the servo controller 100 are asynchronous, the servo controller 100 calculates the deviation amount between the respective clocks of these two devices and adjusts the command reception period based on the deviation amount. Thus, the servo controller 100 can suppress the variation in the command reception intervals. Consequently, disagreement between the command output by the control device 200 and the actual command to be output by the servo controller 100 can be reduced, so that the responsiveness is improved. Moreover, the positioning accuracy is improved. Furthermore, the machining accuracy is improved to reduce the defect rate, so that the productivity is enhanced. In addition, a test facility can be operated with stability.

(44) The present invention is not limited to the embodiment described above and various changes may be made without departing from the spirit of the invention. As shown in FIG. 11, for example, a plurality of servo controllers 100 may be connected to the control device 200. In this case, the processing described in connection with the above embodiment is carried out between the control device 200 and the individual servo controllers 100.