Waveform measuring device, measuring method, and measuring program

By using a waveform measuring device and a zero-position determination circuit to perform counting signal transformation during the HI period of the Z-phase signal, the inconsistency problem of zero-position determination of the rotary encoder in different directions is solved, and high-precision angle zero-position determination is achieved.

CN122192385APending Publication Date: 2026-06-12YOKOGAWA TEST & MEASUREMENT CORP

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YOKOGAWA TEST & MEASUREMENT CORP
Filing Date
2025-11-26
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

In the existing technology, the zero-position determination of rotary encoders is not accurate when rotating in the forward and reverse directions, making it difficult to determine the angular zero position with high precision under different rotation directions.

Method used

A waveform measuring device is used to generate a setting signal through a zero-position determination circuit. The counting signal is transformed during the HI period of the Z-phase signal to ensure that the rotation angle zero position can be accurately set during both forward and reverse rotation. The counter is used to increase or decrease the rotation angle during the HI period of the Z-phase signal.

🎯Benefits of technology

It enables high-precision determination of the zero angle position regardless of the direction of rotation, thus improving the accuracy and consistency of rotation angle measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122192385A_ABST
    Figure CN122192385A_ABST
Patent Text Reader

Abstract

A waveform measurer, a measurement method, and a measurement program are disclosed. A waveform measurer (1) converts a count signal output from an encoder (10) into a rotation angle. The waveform measurer (1) has a zero position determination circuit (114) that generates a setting signal based on a Z-phase signal having a pulse width that spans a period including a plurality of zero position detection timings based on the count signal, and a counter (107) that increases or decreases the rotation angle based on the count signal, sets a count value to zero when the rotation angle is increased and sets the count value to a maximum value when the rotation angle is decreased, based on the setting signal. The zero position determination circuit (114) outputs the setting signal when the zero position detection timings have been generated in a prescribed number corresponding to forward rotation or reverse rotation, respectively, during a HI period of the Z-phase signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a waveform measuring device, a measuring method, and a measuring procedure for measuring the waveform of a rotary encoder signal converted into an angle. Background Technology

[0002] As described in Patent Document 1, an encoder is known that determines the origin by storing the abutment position of the stop.

[0003] Patent Document 1: Japanese Patent Application Publication No. 2017-111026

[0004] Encoders mounted on electric motors sometimes use signals from the motor's excitation position sensor to determine the origin, or zero point, of the angle. When the pulse width of the signal used to determine the zero point is large, the zero point can be determined by different angles depending on whether the rotation is in the forward or reverse direction. The requirement is to determine the zero point of the angle with high accuracy regardless of the direction of rotation. Summary of the Invention

[0005] The present invention was proposed in view of the above-mentioned problems, and its purpose is to provide a waveform measuring device, measuring method and measuring procedure that can determine the zero position of the angle with high precision regardless of the direction of rotation.

[0006] (1) Several embodiments of the waveform measuring device convert a counting signal output by an encoder into a rotation angle. The waveform measuring device includes: a zero-position determination circuit that generates a setting signal based on a Z-phase signal having a pulse width spanning a period including multiple zero-position detection timings based on the counting signal; and a counter that increases or decreases the rotation angle based on the counting signal, setting the count value to zero when the rotation angle is increased and setting the count value to a maximum value when the rotation angle is decreased, based on the setting signal. The zero-position determination circuit outputs the setting signal when the zero-position detection timings are generated at a predetermined number corresponding to forward or reverse rotation during the HI period of the Z-phase signal.

[0007] Therefore, regardless of the pulse width of the Z-phase signal, the timing for resetting the rotation angle to zero during forward and reverse rotation is consistent. As a result, the zero position of the rotation angle is determined with high precision, regardless of the direction of rotation.

[0008] (2) In the waveform measuring device described in (1) above, the sum of the predetermined number corresponding to the forward rotation and the predetermined number corresponding to the reverse rotation may be the number obtained by adding 1 to the number of zero-position detection timings during the HI period of the Z-phase signal. Therefore, the rotation angle can be reset to zero at any timing during the HI period of the Z-phase signal. As a result, the degree of freedom of movement is increased.

[0009] (3) In the waveform measuring device described in (2) above, the number corresponding to the reversal is equal to the number of zero-position detection timings during the HI period of the Z-phase signal. Thus, the determination circuit can be easily constructed.

[0010] (4) The waveform measuring device described in any of (1) to (3) above may also have a Z-phase counter that counts the zero-position detection timing during the HI period of the Z-phase signal. Thus, it can cope even when a Z-phase signal with an unknown pulse width is input.

[0011] (5) Several embodiments of the measurement method convert the encoder output count signal into a rotation angle, the measurement method comprising the following steps: the Z-phase signal has a pulse width spanning a period including a plurality of zero-position detection timings based on the count signal, and based on the Z-phase signal, when the zero-position detection timings are generated at a predetermined number corresponding to forward or reverse rotation during the HI period of the Z-phase signal, a setting signal is generated; the rotation angle is increased or decreased based on the count signal; and based on the setting signal, the count value is set to zero when the rotation angle is increased, and the count value is set to a maximum value when the rotation angle is decreased.

[0012] (6) In the measurement method described in (5) above, the sum of the specified number corresponding to the forward rotation and the specified number corresponding to the reverse rotation is the number of zero-position detection timings during the HI period of the Z-phase signal plus 1.

[0013] (7) In the measurement method described in (6) above, the specified number corresponding to the reversal is equal to the number of zero-position detection timings during the HI period of the Z-phase signal.

[0014] (8) The measurement method described in any of (5) to (7) above may further include the following step, namely, counting the zero-position detection timing during the HI period of the Z-phase signal.

[0015] (9) Several embodiments of the measurement procedure convert the count signal output by the encoder into a rotation angle, the measurement procedure causing the processor to perform the following steps: the Z-phase signal has a pulse width spanning a period including a plurality of zero-position detection timings based on the count signal, and based on the Z-phase signal, when the zero-position detection timings are generated in a predetermined number corresponding to forward or reverse rotation during the HI period of the Z-phase signal, a setting signal is generated; the rotation angle is increased or decreased based on the count signal; and based on the setting signal, the count value is set to zero when the rotation angle is increased, and the count value is set to the maximum value when the rotation angle is decreased.

[0016] (10) In the measurement procedure described in (9) above, the sum of the specified number corresponding to the forward rotation and the specified number corresponding to the reverse rotation is the number of zero-position detection timings during the HI period of the Z-phase signal plus 1.

[0017] (11) In the measurement procedure described in (10) above, the number corresponding to the reversal may be equal to the number of zero-position detection timings during the HI period of the Z-phase signal.

[0018] (12) The measurement procedure described in any of (9) to (11) above may further include the following step, namely, counting the zero-position detection timing during the HI period of the Z-phase signal.

[0019] The effects of the invention

[0020] According to the waveform measuring device, measuring method and measuring procedure of the present invention, the zero position of the angle is determined with high precision regardless of the direction of rotation. Attached Figure Description

[0021] Figure 1 This is a schematic diagram showing an example of an encoder mounted on the motor of the object being measured.

[0022] Figure 2 It is a graph representing the signal when the rotation angle is measured using the device involved in the comparison.

[0023] Figure 3A It is a graph showing the results of measuring the forward rotation angle based on the Z-phase signal of HI during a period containing only one counting signal, using the apparatus involved in the comparative example.

[0024] Figure 3B It is a graph showing the results of measuring only the forward rotation angle using the apparatus involved in the comparative example based on the Z-phase signal of HI during a period including multiple counting signals.

[0025] Figure 3C It is a graph showing the results of measuring the rotation angle when the forward rotation turns into the reverse rotation midway through the process using the apparatus involved in the comparative example based on the Z-phase signal of HI during the period including multiple counting signals.

[0026] Figure 3D It is a graph showing the results of measuring the rotation angle when the forward rotation turns into the reverse rotation midway through the process using the apparatus involved in the comparative example based on the Z-phase signal of HI during the period including multiple counting signals.

[0027] Figure 4 This is a block diagram illustrating an example of the structure of the waveform measuring device involved in the present invention.

[0028] Figure 5 This is a graph representing an example of the signal when measuring a rotation angle using the waveform measuring device of the present invention.

[0029] Figure 6A This is a diagram illustrating an example of the conditions for incrementally counting the rotation angle during forward rotation.

[0030] Figure 6B This is a diagram illustrating an example of the condition for decreasing the count of rotation angles during reversal.

[0031] Figure 7A This is a diagram illustrating an example of the conditions for generating a forward zero-position timing.

[0032] Figure 7B This is a diagram illustrating an example of the conditions for generating a zero-position inversion timing.

[0033] Figure 8 This is a diagram illustrating an example of the circuit's operation during the counting period in forward rotation.

[0034] Figure 9 This is a diagram illustrating an example of the circuit creation process during the counting period when the circuit is reversed.

[0035] Figure 10A This is a diagram illustrating an example of the operation of a rotation direction detection circuit during continuous forward rotation.

[0036] Figure 10B This is a diagram illustrating an example of the operation of a rotation direction detection circuit during continuous reverse rotation.

[0037] Figure 10C This diagram illustrates an example of the operation of a rotation direction detection circuit when the rotation changes from forward to reverse.

[0038] Figure 10D This diagram illustrates an example of the operation of a rotation direction detection circuit when the rotation changes from reverse to forward.

[0039] Figure 11A This is a diagram illustrating an example of a signal indicating the action during forward rotation.

[0040] Figure 11B This is a diagram illustrating an example of a signal representing the action during reversal.

[0041] Figure 12A This is a diagram illustrating an example of actions starting from a reversal.

[0042] Figure 12B This is a graph representing an example of the signal when measuring the rotation angle starting from the reverse direction.

[0043] Figure 13This is a graph representing an example of the signal measured when the rotation angle changes from forward to reverse midway through a rotation.

[0044] Figure 14 This is a graph representing an example of the signal when the rotation angle is measured midway through a reversal to a forward rotation.

[0045] Figure 15A This is a graph showing an example of the results obtained by measuring only the rotation angle of forward rotation in this invention.

[0046] Figure 15B This is a graph showing an example of the results of measuring the rotation angle when the rotation changes to reverse midway through a forward rotation in this invention.

[0047] Figure 16 This is a flowchart illustrating an example of the measurement method involved in the present invention. Detailed Implementation

[0048] For example Figure 1 As shown, the waveform measuring device 1 involved in this invention (refer to...) Figure 4 The waveform measuring device 1 measures the rotation angle of the motor 20 based on the pulse signals output by the encoder 10 installed on the motor 20, namely the A-phase signal and the B-phase signal. Additionally, the waveform measuring device 1 sets the rotation angle of the motor 20 to 0 based on the pulse signal output from the excitation position sensor 21 of the motor 20, namely the Z-phase signal. Hereinafter, embodiments of the waveform measuring device 1 and the measurement method or procedure performed using the waveform measuring device 1 according to the present invention will be described. The encoder 10 may be a rotary encoder. The object of measurement is not limited to the motor 20. The device outputting the Z-phase signal is not limited to the excitation position sensor 21.

[0049] (Comparative example)

[0050] The device involved in the comparison is based on the A-phase and B-phase signals output by encoder 10, which increases or decreases the measured rotation angle of motor 20. When the Z-phase signal is HI and the A-phase and B-phase signals meet the specified conditions, the rotation angle is set to zero. Whether the rotation of motor 20 is forward or reverse is determined based on the state of the A-phase and B-phase signals when they change from LO to HI or from HI to LO, i.e., the combination of A-phase and B-phase signals being HI or LO.

[0051] Figure 2 The image below is an example of a graph representing the signal when the rotation angle of the motor 20 is measured using a device involved in the comparison. For example... Figure 2As shown in the enlarged section, in the comparative device, the timing of the change in the state of the A-phase signal or the B-phase signal between LO and HI is set as the angle counting timing, thereby increasing the rotation angle. Furthermore, in the comparative device, the timing of the change in the A-phase signal from LO to HI when the Z-phase signal is HI and the B-phase signal is LO is set as the position detection timing, thereby setting the rotation angle to zero.

[0052] like Figure 3A As shown, when the pulse width of the Z-phase signal is short, specifically, when only one zero-position detection timing is generated during the period when the Z-phase signal is HI, the rotation angle is set to zero only once. On the other hand, as... Figure 3B As shown, when the pulse width of the Z-phase signal is relatively long, specifically when multiple zero-position detection timings are generated during the period when the Z-phase signal is HI, the rotation angle is continuously set to zero during the period when the Z-phase signal is HI.

[0053] Here, as Figure 3C and Figure 3D As shown, sometimes the rotation changes to reverse midway through a clockwise rotation. For example... Figure 3C As shown, when the pulse width of the Z-phase signal is short, even if the rotation changes to reverse midway through forward rotation, no error in the rotation angle when the rotation angle is set to zero occurs. On the other hand, as... Figure 3D As shown, when the pulse width of the Z-phase signal is large, the rotation angle error during reversal occurs due to the timing difference of the change from forward to reverse in the middle of the forward rotation.

[0054] As described above, the Z-phase signal is sometimes obtained by utilizing, for example, the output of the excitation position sensor 21 of the motor 20. However, it is difficult to adjust the pulse width of the pulse signal output from the excitation position sensor 21. Therefore, it is difficult to adjust it so that only one zero-position detection timing is generated during the period when the Z-phase signal is HI. Even when multiple zero-position detection timings are generated during the period when the Z-phase signal is HI, regardless of whether it is forward or reverse rotation, i.e., regardless of the direction of rotation, it is necessary to reduce the error of the rotation angle.

[0055] (Overview of Waveform Measuring Device 1)

[0056] The waveform measuring device 1 involved in this invention (see reference) Figure 4 The encoder 10, which detects the rotation of motor 20, outputs phase A and phase B signals, which are then converted into the rotation angle of motor 20 for measurement. Specifically, the waveform measuring device 1 sets the rotation angle from 0 degrees to 360 degrees as the count value of the rotation angle and counts it with values ​​from 0 to M-1. When the phase A and phase B signals meet the counting conditions, the waveform measuring device 1 increases or decreases the count value of the rotation angle.

[0057] Furthermore, the waveform measuring device 1 of the present invention sets the count value of the rotation angle to zero when the A-phase signal and the B-phase signal meet the generation conditions for zero-position detection timing during the period when the Z-phase signal is HI. In the present invention, multiple zero-position detection timings are generated during the period when the Z-phase signal is HI. That is, in the present invention, the Z-phase signal has a pulse width spanning a period including multiple zero-position detection timings. The period when the Z-phase signal is HI is also called the HI period of the Z-phase signal.

[0058] When the Z-phase signal has a pulse width spanning a period including multiple zero-position detection timings, as described in the apparatus described as a comparative example, an error occurs when setting the rotation angle to zero in both forward and reverse rotation. The waveform measuring device 1 of the present invention sets the rotation angle to zero when a predetermined number of zero-position detection timings corresponding to forward or reverse rotation are generated, in a manner that reduces the error when setting the rotation angle to zero regardless of the direction of rotation.

[0059] (Structure example of waveform measuring device 1)

[0060] The following is for reference Figure 4 An example of the structure of the waveform measuring device 1 involved in this invention will be described.

[0061] The functions of each structural unit of the waveform measuring device 1 described below can be implemented as a dedicated circuit. The functions of each structural unit of the waveform measuring device 1 can be implemented by executing a program using at least one general-purpose processor. The general-purpose processor may include a CPU (Central Processing Unit) or a GPU (Graphics Processing Unit), etc. Each structural unit of the waveform measuring device 1 may include a storage unit as needed. The storage unit may include, for example, a semiconductor memory or an electromagnetic storage medium. Each structural unit of the waveform measuring device 1 may include a communication interface as needed. The communication interface can be configured to enable communication of data or information using various communication standards.

[0062] Figure 4 The waveform measuring device 1 operates as follows (in summary): The waveform measuring device 1 obtains waveforms from the encoder 10 of the motor 20. Figure 5 The waveforms shown in the example graph represent phase A and phase B signals as waveforms. Based on the phase A and phase B signals, the waveform measuring device 1 calculates count values ​​corresponding to the rotation angles of the motor 20 in the forward and reverse directions. The waveform measuring device 1 then calculates angle calculation values ​​that convert the count values ​​into actual angles of rotation of the motor 20. These angle calculation values ​​are the actual angles from 0 degrees to 360 degrees, converted from the count values ​​of rotation angle. Figure 5 The horizontal axis of the graph corresponds to time.

[0063] Waveform measuring device 1 obtains the waveform from excitation position sensor 21 of motor 20. Figure 5 The illustrated curve represents the Z-phase signal as a waveform. Based on the Z-phase signal, the rotational position (angle zero) of the motor 20 when its rotational angle becomes zero is detected. To detect the angle zero, the waveform measuring device 1 counts the rising or falling signals during the HI period of the Z-phase signal, calculating the Z-phase pulse width count. When the motor 20 rotates forward, the waveform measuring device 1 sets the count value corresponding to the rotational angle to zero so that the angle calculation value becomes zero when the angle zero is detected. During the forward rotation of the motor 20, the waveform measuring device 1 counts the Z-phase signal during the HI period using rising signals, calculating the Z-phase pulse width count value. When the motor 20 rotates in reverse, during the HI period of the Z-phase signal, the waveform measuring device 1 calculates the Z-phase pulse width count value using falling signals based on the Z-phase pulse width count value calculated during forward rotation, determines the angle zero, and sets the count value corresponding to the rotational angle to its maximum value so that the angle calculation value reaches its maximum value. The maximum value of the angle calculation is, for example, 359 degrees when the rotation angle is calculated in units of 1 degree. In this invention, the rotation angle from 0 degrees to 360 degrees is represented by M count values. In this case, the maximum value of the angle calculation is 360 × (M-1) / M degrees.

[0064] The waveform measuring device 1 includes: an input amplifier 121 that obtains the A-phase signal from the encoder 10; an input amplifier 131 that obtains the B-phase signal from the encoder 10; and an input amplifier 141 that obtains the Z-phase signal from the excitation position sensor 21 of the motor 20.

[0065] The waveform measuring device 1 has a sampling timing generation circuit 101. The sampling timing generation circuit 101 may be a clock generation circuit. The sampling timing generation circuit 101 outputs the sampling timing signal to the A / D converters 122, 132 and 142, the interface circuits 123, 133 and 143 and the memory controller 102, which are described later.

[0066] The waveform measuring device 1 includes: an A / D converter 122, which converts the A-phase signal obtained by the input amplifier 121 into a digital signal; an A / D converter 132, which converts the B-phase signal obtained by the input amplifier 131 into a digital signal; and an A / D converter 142, which converts the Z-phase signal obtained by the input amplifier 141 into a digital signal. Hereinafter, the signals into which the A-phase, B-phase, and Z-phase signals are converted into digital signals are referred to as the A-phase signal, B-phase signal, and Z-phase signal, respectively. The A / D converters 122, 132, and 142 operate synchronously with the sampling timing signal.

[0067] The waveform measuring device 1 includes: an interface circuit 123 that outputs the A-phase signal to each structural unit; an interface circuit 133 that outputs the B-phase signal to each structural unit; and an interface circuit 143 that outputs the Z-phase signal to each structural unit. The interface circuits 123, 133, and 143 operate synchronously with the sampling timing signal.

[0068] The waveform measuring device 1 includes a memory controller 102, a waveform memory 103, a waveform creation circuit 104, and a display 105. The memory controller 102 acquires A-phase signals, B-phase signals, Z-phase signals, and angle signals (described later) synchronously with the sampling timing signal. The waveform memory 103 stores the waveforms of the various signals acquired by the memory controller 102. The waveform creation circuit 104 creates images of the waveforms stored in the waveform memory 103. The display 105 displays the images created using the waveform creation circuit 104. The display 105 can be configured to include various displays such as liquid crystal displays (LCDs).

[0069] The waveform measuring device 1 includes: an edge detection circuit 124 that detects the edge of the A-phase signal, i.e., the change between the LO and HI states of the A-phase signal; and an edge detection circuit 134 that detects the edge of the B-phase signal, i.e., the change between the LO and HI states of the B-phase signal.

[0070] The waveform measuring device 1 includes: a level judgment circuit 125, which judges the level of the A-phase signal, i.e., whether the A-phase signal is LO or HI; a level judgment circuit 135, which judges the level of the B-phase signal, i.e. whether the B-phase signal is LO or HI; and a level judgment circuit 145, which judges the level of the Z-phase signal, i.e. whether the Z-phase signal is LO or HI.

[0071] The waveform measuring device 1 includes a counting condition judgment circuit 106. The counting condition judgment circuit 106 determines whether the rotation of the motor 20 is forward or reverse based on the edges and levels of the A-phase signal and the B-phase signal. Forward rotation can be either clockwise or counterclockwise. Reverse rotation is rotation in the opposite direction to forward rotation. In this invention, forward rotation is clockwise rotation, and reverse rotation is counterclockwise rotation. Forward and reverse rotation are represented as CW and CCW, respectively. When the motor 20 is rotating forward, the counting condition judgment circuit 106 increases the count value of the rotation angle; when the motor 20 is rotating in reverse, it decreases the count value of the rotation angle. That is, the A-phase signal and the B-phase signal are used to determine whether the count value of the rotation angle increases or decreases. The A-phase signal and the B-phase signal are also collectively referred to as counting signals. When the counting condition judgment circuit 106 determines to increase the count value of the rotation angle, it outputs a rising signal; when it determines to decrease the count value of the rotation angle, it outputs a falling signal. Figure 4In this context, an upward signal is represented as "up," and a downward signal is represented as "down."

[0072] The counting condition judgment circuit 106 outputs a rising signal when the edge and level of the A-phase signal and the edge and level of the B-phase signal meet the conditions shown in Table 1 below. Figure 6A The waveforms of phase A and phase B signals corresponding to conditions (1) to (4) in Table 1 are shown.

[0073] [Table 1]

[0074]

[0075] In addition, the counting condition judgment circuit 106 outputs a falling signal when the edge and level of the A-phase signal and the edge and level of the B-phase signal meet the conditions shown in Table 2 below. Figure 6B The waveforms of phase A and phase B signals corresponding to conditions (1) to (4) in Table 2 are shown.

[0076] [Table 2]

[0077]

[0078] The counting condition judgment circuit 106 determines the forward zero-position timing and the reverse zero-position timing based on the edge and level of the A-phase signal and the edge and level of the B-phase signal. The forward zero-position timing and the reverse zero-position timing are collectively referred to as zero-position timing. Forward zero-position timing determines the zero position when the motor 20 is rotating forward. Reverse zero-position timing determines the zero position when the motor 20 is rotating in reverse.

[0079] The counting condition judgment circuit 106 determines the condition when the A-phase signal and the B-phase signal meet the conditions shown in Table 3 below, i.e., the conditions in Table 1 and... Figure 6A Under the condition of (1), it is determined that a positive rotation zero position timing has been generated. Figure 7A The following shows the conditions that satisfy Table 3 and Figure 6A Under the condition of (1), the forward rotation zero position timing is generated.

[0080] [Table 3]

[0081]

[0082] The counting condition judgment circuit 106 determines the condition when the A-phase signal and the B-phase signal meet the conditions shown in Table 4 below, i.e., the conditions in Table 2 and... Figure 6B Under the condition of (4), it is determined that a reverse zero-position timing has been generated. Figure 7B The following shows the conditions that satisfy Table 4 and Figure 6B The inverted zero-position timing is generated under the condition of (4).

[0083] [Table 4]

[0084]

[0085] The waveform measuring device 1 includes an up / down counter 107. The up / down counter 107 increases the count value of the rotation angle when a rising signal is received from the counting condition judgment circuit 106, and decreases the count value of the rotation angle when a falling signal is received from the counting condition judgment circuit 106. In this invention, the up / down counter 107 represents the rotation angle from 0 degrees to 360 degrees using M values ​​from 0 to M-1. That is, the count value of the rotation angle is set to a value from 0 to M-1. The up / down counter 107 detects... Figure 5 When the angle shown is zero, the count value of the rotation angle is set to zero during clockwise rotation and to M-1, which is the maximum count value in this invention, during counterclockwise rotation. The up / down counter 107 is also simply referred to as a counter.

[0086] The waveform measuring device 1 has an angle transformation circuit 108. The angle transformation circuit 108 obtains the count value of the rotation angle from the up-down counter 107 and transforms the rotation angle into a value in the range of 0 degrees to 360 degrees, which is then output as an angle signal to the memory controller 102.

[0087] The waveform measuring device 1 has a counting period creation circuit 109. (Refer to...) Figure 8 The graph illustrates the operation of circuit 109 during the counting period in forward rotation. Figure 8 The horizontal axis of the graph represents time. When the counting period creation circuit 109 obtains the forward zero-position timing from the counting condition judgment circuit 106, it checks whether the forward zero-position timing is after the initial acquisition of the Z-phase signal changing to HI. When the forward zero-position timing is initially acquired, the counting period creation circuit 109 sets the counting period signal to HI; when the Z-phase signal is LO, the counting period signal is set to LO.

[0088] Reference Figure 9 The graph illustrates the operation of circuit 109 during the counting period when the circuit reverses. Figure 9 The horizontal axis of the graph represents time. When the counting period creation circuit 109 obtains the reversal zero-position timing from the counting condition judgment circuit 106, it checks whether it is the reversal zero-position timing after the initial acquisition of the Z-phase signal becoming HI. When the reversal zero-position timing is initially acquired, the counting period creation circuit 109 sets the counting period signal to HI; when the Z-phase signal is LO, the counting period signal is set to LO.

[0089] The waveform measuring device 1 has a Z-phase up / down counter 112 and a first holding memory 113. The Z-phase up / down counter 112 is also simply referred to as the Z-phase counter.

[0090] The Z-phase up / down counter 112 activates its counting action when the counting period signal output from the counting period creation circuit 109 changes to HI. During forward rotation, the Z-phase up / down counter 112 is set to zero when the counting action is activated, and counts the period during which the counting period signal changes to HI by incrementing the count value according to the rising signal.

[0091] The first holding memory 113 stores the number of count signals generated during the period when the Z-phase up / down counter 112 counts the rising signals during forward rotation, specifically the period when the counting period signal changes to HI. That is, whenever a forward zero-position timing occurs, the Z-phase up / down counter 112 stores the count of rising signals in the first holding memory 113. In this invention, the number of count signals during the period when the counting period signal changes to HI is set to N. Furthermore, when a forward zero-position timing is generated under the conditions in Table 3 above, one forward zero-position timing occurs whenever four rising signals are generated. Therefore, in this case, N is a multiple of 4.

[0092] The quantity obtained by the Z-phase adder / subtractor counter 112 and Figure 5 The Z-phase pulse width count value shown corresponds to this.

[0093] When the Z-phase up / down counter 112 is rotating forward, N is loaded from the first holding memory 113 when the counting period signal output from the counting period creation circuit 109 changes to LO.

[0094] When the Z-phase up / down counter 112 reverses, it counts down according to the falling signal when the counting period signal output from the counting period creation circuit 109 changes to HI. In such cases... Figure 5 In the case of switching from forward to reverse rotation, during forward rotation, when the counting period signal output from the counting period creation circuit 109 becomes LO, the Z-phase up / down counter 112 is loaded with N from the first holding memory 113. Therefore, during reverse rotation, the Z-phase up / down counter 112 decrements from N according to the falling signal, that is, it performs a decrement operation of 1.

[0095] During the reversal, the Z-phase up / down counter 112 decrements from N according to the falling signal, and the position that becomes 0 is determined as the 0 position of the rotation angle during the reversal.

[0096] If the rotation of motor 20 starts in reverse without producing one forward rotation, the Z-phase up / down counter 112 cannot be used to calculate the number (N) of the count signal during the period when the signal changes to HI during the counting period, therefore the value is not stored in the first holding memory 113. Waveform measuring device 1 has a reverse Z-phase increment counter 115 to count N when the rotation of motor 20 starts in reverse. The reverse Z-phase increment counter 115 activates the counting operation when the signal changes to HI during the counting period. The reverse Z-phase increment counter 115 increments according to the falling signal, thereby counting the falling signal during the period when the signal changes to HI during the counting period. During reverse, whenever a reverse zero-position timing occurs, the reverse Z-phase increment counter 115 stores the count of the falling signal obtained by counting the falling signal in the first holding memory 113. If the reverse continues until the Z-phase signal changes to LO, the operation of the reverse Z-phase increment counter 115 stores the number (N) of the count signal during the period when the signal changes to HI during the counting period in the first holding memory 113. Similar to the forward rotation, during the reverse rotation, when the reverse zero-position timing is generated under the conditions in Table 4 above, a reverse zero-position timing is also generated once for every four falling signals. Therefore, in this case, N is also a multiple of 4.

[0097] During the inversion, the Z-phase up / down counter 112 also loads N from the first holding memory 113 when the count period signal output from the count period creation circuit 109 changes to LO.

[0098] According to the above description, the value stored in the first holding memory 113 is the value of the Z-phase up / down counter 112 at the last forward zero position timing before the Z-phase signal drops, that is, before the Z-phase signal becomes LO, during forward rotation, and the value of the reverse Z-phase up / down counter 115 at the last reverse zero position timing during reverse rotation.

[0099] The timing for loading the value of the first holding memory 113 into the Z-phase up / down counter 112 is the timing for the signal to change to LO during both forward and reverse rotation.

[0100] During the period when the Z-phase signal changes to HI, the rotation of motor 20 sometimes changes from forward to reverse. Additionally, during the period when the Z-phase signal changes to HI, the rotation of motor 20 sometimes changes from reverse to forward.

[0101] For example, during the period when the Z-phase signal changes to HI, if the rotation of the motor 20 changes from forward to reverse, the Z-phase up / down counter 112 is cleared to 0 when the Z-phase signal changes to HI and increments according to the rising signal. From the time of reversal, it decrements according to the falling signal, and when the Z-phase signal changes to LO, the value of the Z-phase up / down counter 112 becomes 0. The reverse Z-phase up / down counter 115 increments only according to the falling signal after reversal. Therefore, when the Z-phase signal changes to LO, the value of the reverse Z-phase up / down counter 115 becomes less than N. Therefore, in this case, when the Z-phase signal changes to LO, the value stored in the first holding memory 113 from the reverse Z-phase up / down counter 115 becomes less than N, and as a result, the value loaded into the Z-phase up / down counter 112 also becomes less than N, and the waveform measuring device 1 cannot operate accurately.

[0102] The waveform measuring device 1 has a second holding memory 116 and a rotation direction detection circuit 117 to cope with the situation where the rotation direction of the motor 20 changes during the period when the Z phase signal becomes HI.

[0103] When the rotation direction detection circuit 117 detects the initial zero-position timing after the Z-phase signal changes to HI during the counting period in the creation circuit 109, it maintains information on whether a forward or reverse zero-position timing is detected. When the zero-position timing is re-detected, the rotation direction detection circuit 117 compares the newly detected zero-position timing with the initial zero-position timing. The rotation direction detection circuit 117 sets to 0 if both the newly detected and initial zero-position timings are forward zero-position timings, or if both are reverse zero-position timings. Furthermore, the rotation direction detection circuit 117 sets to 1 if the newly detected zero-position timing is a forward zero-position timing and the initial zero-position timing is a reverse zero-position timing, or if the newly detected zero-position timing is a reverse zero-position timing and the initial zero-position timing is a forward zero-position timing. In other words, the rotation direction detection circuit 117 sets to 0 if both the newly detected and initial zero-position timings are in the same rotation direction, and sets to 1 if the two zero-position timings are in different rotation directions. The rotation direction detection circuit 117 maintains the value of the Z-phase signal when it becomes LO, i.e., when the signal becomes LO during the counting period, i.e., 0 or 1.

[0104] When the motor 20 is continuously rotating in the forward direction, the rotation direction detection circuit 117, such as Figure 10A As shown, when the motor 20 continues to reverse, such as Figure 10B It operates as shown. The rotation direction detection circuit 117, when the rotation of the motor 20 changes from forward to reverse, will... Figure 10C As shown, when the rotation of motor 20 changes from reverse to forward, such as... Figure 10DPerform the actions shown.

[0105] When the rotation direction detection circuit 117 becomes 0, as the Z-phase signal decreases, the value of the first holding memory 113 is loaded into the Z-phase up / down counter 112, and the value of the first holding memory 113 is stored in the second holding memory 116. When the rotation direction detection circuit 117 becomes 1, the value of the first holding memory 113 is not stored in the second holding memory 116. That is, when the rotation direction detection circuit 117 becomes 1, the value of the second holding memory 116 is maintained as is.

[0106] Here, the rotation direction detection circuit 117 becoming 0 means that the rotation direction did not change during the period when the signal changes to HI during the counting period. Therefore, when the rotation direction detection circuit 117 becomes 0, the value of the first holding memory 113 when the Z-phase signal decreases is the number (N) of the count signal during the period when the signal changes to HI during the counting period. That is, in this case, the value stored in the second holding memory 116 is the number (N) of the count signal during the period when the signal changes to HI during the counting period.

[0107] On the other hand, the rotation direction detection circuit 117 becoming 1 means that the rotation direction changes midway through the period when the signal becomes HI during the counting period. Therefore, when the rotation direction detection circuit 117 becomes 1, the value of the first holding memory 113 when the Z-phase signal decreases is less than the number (N) of the count signals during the period when the signal becomes HI during the counting period. In this case, the value of the first holding memory 113 is not stored in the second holding memory 116, and thus the value of the second holding memory 116 remains unchanged at N. That is, regardless of whether the rotation direction changes midway through the period when the signal becomes HI during the counting period, the value stored in the second holding memory 116 remains unchanged at the number (N) of the count signals during the period when the signal becomes HI during the counting period.

[0108] The counting operation of the Z-phase up / down counter 112 described above is summarized in Table 5 below.

[0109] [Table 5]

[0110]

[0111] In addition, Table 6 below summarizes the counting operation of the above-mentioned inverted Z-phase increment counter 115.

[0112] [Table 6]

[0113]

[0114] The waveform measuring device 1 has a zero-position determination circuit 114. During forward rotation, the zero-position determination circuit 114 outputs an indication to the up / down counter 107 to set the count value of the rotation angle to zero based on the value obtained from counting using the Z-phase up / down counter 112. This indication to set the count value of the rotation angle to zero is also called a zero-set signal. Figure 4 The zero position is represented as zero. Furthermore, during inversion, the zero-position determination circuit 114, based on the value obtained from counting using the Z-phase up / down counter 112, outputs an indication of the maximum value of the counted rotation angle to the up / down counter 107. This indication of the maximum value is also called the maximum value setting signal. Figure 4 The value is represented as "borrow". As mentioned above, the waveform measuring device 1 uses M values ​​from 0 to M-1 to represent rotation angles from 0 degrees to 360 degrees. Therefore, the maximum value of the rotation angle count is M-1.

[0115] (Example of the operation of waveform measuring device 1)

[0116] The specific operation examples of each structural part of the waveform measuring device 1 described above will be explained.

[0117] Reference Figure 11A The operation of the waveform measuring device 1 during forward rotation will be explained. The Z-phase up / down counter 112 is set to zero when the signal during the counting period changes to HI (i.e., after the Z-phase signal changes to HI), generating the initial forward zero-position timing. Then, during the period when the signal during the counting period changes to HI, the Z-phase up / down counter 112 increments based on the input of the rising signal generated during forward rotation, i.e., performs an increment operation of 1. When the Z-phase signal changes to LO (i.e., when the signal during the counting period changes to LO), the Z-phase up / down counter 112 causes the first holding memory 113 to retain the value obtained during the period when the signal during the counting period changes to HI, which is N in this invention. In other words, the Z-phase up / down counter 112 generates the final forward zero-position timing count value by keeping the first holding memory 113 in the period when the signal during the counting period is HI. The value (N) stored in the first holding memory 113 is loaded onto the Z-phase up / down counter 112 according to the falling edge (L) of the signal during the counting period. Furthermore, since the rotation direction does not change during the period when the signal during the counting period changes to HI, the rotation direction detection circuit 117 is 0. When the rotation direction detection circuit 117 is 0, N is stored from the first holding memory 113 to the second holding memory 116. The Z-phase up / down counter 112 repeatedly performs the above operation whenever the Z-phase signal becomes HI during repeated forward rotation.

[0118] When the zero-position determination circuit 114 determines that the Z-phase up / down counter 112 has become zero, it outputs a zero-setting signal to the up / down counter 107. During forward rotation, the Z-phase up / down counter 112 becomes zero when its signal changes to HI during the counting period. Therefore, during forward rotation, the zero-position determination circuit 114 outputs a zero-setting signal to the up / down counter 107 when its signal changes to HI during the counting period.

[0119] The up / down counter 107 is set to zero when it receives a zero-setting signal from the zero-position determination circuit 114. In other words, the up / down counter 107 is set to zero when the signal changes to HI during the counting period, that is, when the initial forward zero-position timing is generated after the Z-phase signal changes to HI. Then, the up / down counter 107 performs incremental counting whenever it receives a rising signal.

[0120] Reference Figure 11B The operation of the waveform measuring device 1 during inversion will be explained, assuming that N is initially stored in the first holding memory 113 starting from forward rotation. As described above, N is loaded from the first holding memory 113 into the Z-phase up / down counter 112. During the period when the signal of the Z-phase up / down counter 112 changes to HI during the counting period, it decrements by 1 based on the input of the falling signal generated during inversion.

[0121] Inverting Z-phase increment counter 115 Figure 11B During the inversion shown, counting is performed when the signal changes to HI during the counting period, and when the signal changes to LO during the counting period, the count value N during the period when the signal changes to HI is stored in the first holding memory 113. In other words, the Z-phase increment counter 115 keeps the first holding memory 113 holding the count value generated at the final inversion zero-position timing during the period when the signal is HI during the counting period. The value (N) stored in the first holding memory 113 is loaded into the Z-phase up / down counter 112 according to the falling edge of the counting period signal, i.e., the L edge. In addition, during the period when the signal changes to HI during the counting period, the rotation direction does not change, so the rotation direction detection circuit 117 is 0. Since the rotation direction detection circuit 117 is 0, N stored in the first holding memory 113 is also stored in the second holding memory 116. The Z-phase increment counter 115 repeatedly performs the above operation whenever the Z-phase signal changes to HI during repeated inversions.

[0122] The zero-position determination circuit 114, in time with the further input of a decreasing signal after the count value of the Z-phase up / down counter 112 becomes zero, outputs the maximum value of the count value of the applied rotation angle to the up / down counter 107, i.e., M-1 in this invention. This action achieves the function of setting the count value of the rotation angle to the maximum value, i.e., M-1, during reversal.

[0123] Add / subtract counter 107 Figure 11A When shown in forward rotation and Figure 11B In any case of the inversion shown, the increment and decrement of the rotation angle count value are performed based on the rising and falling signals from the counting condition judgment circuit 106. The rotation angle count value is set to zero based on the indication from the zero-position judgment circuit 114, i.e., the zero-setting signal, or the rotation angle count value is loaded with M-1 based on the maximum value setting signal. The rotation angle count value of the up / down counter 107 is converted into the rotation angle by the angle transformation circuit 108.

[0124] In any case during forward or reverse rotation, incrementing and decrementing counting are performed based on the value of the pulse width of the Z-phase signal, i.e., N.

[0125] pass Figure 11A and Figure 11B By comparison, it can be seen that the count value of the up-down counter 107 becomes zero at the same position when rotating forward and backward.

[0126] Reference Figure 12A The operation of waveform measuring device 1 starting from the reverse direction will be explained. The operation starting from the reverse direction is in principle the same as the operation starting from the forward direction, but there are a few differences. The Z-phase up / down counter 112 starts counting from zero, so it becomes a value less than zero whenever a reverse zero-position timing occurs. Therefore, not only when the value of the Z-phase up / down counter 112 becomes zero, but also when the value of the Z-phase up / down counter 112 becomes a value less than zero, the zero-position determination circuit 114 outputs a setting signal to the up / down counter 107 to M-1. Similar to the operation during forward rotation, at the last reverse zero-position timing before the signal becomes LO during the counting period, the value of the reverse Z-phase increment counter 115 and the value of the first holding memory 113 become N. Furthermore, when the signal becomes LO during the counting period, N is loaded from the first holding memory 113 into the Z-phase up / down counter 112.

[0127] Figure 12B The diagram shows the count value of the rotation angle of the up / down counter 107 when operating in the manner described above. Starting from the reversal point, the waveform measuring device 1 counts the number of pulses (i.e., falling signals) in phases A and B during the period when the Z-phase signal initially changes to HI. When the Z-phase signal subsequently changes to HI, the waveform measuring device 1 uses the Z-phase up / down counter 112 to perform a decrementing count starting from N. When the Z-phase signal changes to LO, the count value of the rotation angle of the up / down counter 107 is set to its maximum value, M-1. Figure 12B As shown, in the case of starting from reversal, the value of N is not specified in the first Z phase, so the angle cannot be accurately measured. However, the value of N can be determined from the second phase onwards, and the angle can be accurately measured.

[0128] Reference Figure 13 The operation of waveform measuring device 1 when the signal changes from positive to negative during the counting period is explained.

[0129] In the above description, the value stored in the first holding memory 113 is the value of the Z-phase up / down counter 112 when the last zero-position timing before the signal falls during the counting period is a forward zero-position timing, and the value of the reverse Z-phase up / down counter 115 when the zero-position timing is reversed. Furthermore, the Z-phase up / down counter 112 loads the value stored in the first holding memory 113 after the signal falls during the counting period.

[0130] When the signal changes from forward to reverse, the Z-phase up / down counter 112 performs a decrement count. The reverse Z-phase up / down counter 115 performs an up / down count from the start of the reverse. The number of count values ​​of the reverse Z-phase up / down counter 115 from the start of the reverse until the Z-phase signal decreases is set to K. Assuming that the reverse Z-phase up / down counter 115 stores K in the first holding memory 113, K is loaded into the Z-phase up / down counter 112. K is a value different from the count value N during the period when the signal changes to HI during the counting period. Therefore, because K is loaded into the Z-phase up / down counter 112, the waveform measuring device 1 cannot operate accurately. Even when the signal changes from forward to reverse during the period when the signal changes to HI during the counting period, the waveform measuring device 1 can load N into the Z-phase up / down counter 112 using the rotation direction detection circuit 117 and the second holding memory 116.

[0131] As a premise, it is assumed that a continuous forward or reverse operation is performed during the period when the signal changes to HI during the counting period. In this case, as described above, the number (N) of the count values ​​during the period when the signal changes to HI during the counting period is stored in the second holding memory 116.

[0132] The rotation direction detection circuit 117 maintains the initial zero-position timing after the Z-phase signal rises, determining whether it is a forward or reverse zero-position timing. The rotation direction detection circuit 117 compares the zero-position timing generated during the signal transition to HI during the counting period with the maintained initial zero-position timing. The rotation direction detection circuit 117 sets its value to 0 if the forward or reverse zero-position timings of the compared circuits are the same, and sets its value to 1 if the compared circuits are different. Figure 13 In the example, the rotation direction detection circuit 117 maintains the initial timing for generating the forward zero position, thus becoming 0 during the continuous forward rotation and becoming 1 when the initial timing for generating the reverse zero position is generated after the rotation turns to reverse. The rotation direction detection circuit 117 maintains 1 when the signal decreases during the counting period.

[0133] During the counting period, when the signal changes to HI, the rotation direction detection circuit 117 changes from positive to negative, causing it to become 1. Therefore, the value held in the first holding memory 113, i.e., a value less than N, is not stored in the second holding memory 116. That is, the value in the second holding memory 116 remains unchanged at N. The Z-phase up / down counter 112 loads the value in the second holding memory 116 when the signal changes to LO during the counting period, thus accurately loading N.

[0134] Reference Figure 14 The operation of waveform measuring device 1 when the signal changes from inverse to forward during the counting period is explained.

[0135] The Z-phase up / down counter 112 performs a decrementing count during inversion. The count value of the Z-phase up / down counter 112 during the timing of the transition from inversion to forward rotation is set to L. The Z-phase up / down counter 112 performs an incrementing count after transitioning to forward rotation. In this state, the count value of the Z-phase up / down counter 112 is restored from L to N, therefore, the count value of the Z-phase up / down counter 112 when the signal changes to LO during the counting period is restored to N. As a result, when the signal changes to LO during the counting period, N is stored in the first holding memory 113 from the Z-phase up / down counter 112. In this case, regarding the Z-phase up / down counter 112, when the signal changes to LO during the counting period, the value of either the first holding memory 113 or the second holding memory 116 becomes N. Regardless of which value is loaded into the Z-phase up / down counter 112, the waveform measuring device 1 can operate accurately. In this case, the output of the rotation direction detection circuit 117 is 1, thus simplifying the operation logic by uniformly loading from the second holding memory 116.

[0136] When the signal changes from forward to reverse during the counting period as described above, the value of the second holding memory 116 is loaded. This causes the timing for setting the count value of the rotation angle to become the same for the Z-phase signal, which is symmetrical during forward and reverse rotation. As a result, no zero-position error occurs during forward and reverse rotation.

[0137] Furthermore, even if the Z-phase signal changes from forward to reverse and then back to forward during the period when it changes to HI, or if it changes from reverse to forward and then back to reverse, the count value during the period when the counting period signal changes to HI will normally become N. In this case, the rotation direction of the initial zero-position timing is the same as the rotation direction of the final zero-position timing, therefore the rotation direction detection circuit 117 becomes 0. Even in this state, the count value during the period when the counting period signal changes to HI will still become N.

[0138] If there are multiple forward and reverse switching during the period when the Z-phase signal changes to HI, and the rotation direction when the signal changes to HI during the counting period is the same as the rotation direction when the signal changes to LO during the counting period, then the rotation direction detection circuit 117 changes to 0; otherwise, the rotation direction detection circuit 117 changes to 1. The operation is the same at this time, and the number of count values ​​during the period when the signal changes to HI during the counting period is N.

[0139] Figure 15A and Figure 15B An example is shown where the waveform measuring device 1 of the present invention measures the result of rotation angle. For example... Figure 15A As shown, while maintaining a constant forward rotation during the measurement, the initial zero-point detection timing during the period when the signal changes to HI during the counting period sets the rotation angle to zero. As a result, the timing of setting the rotation angle to zero remains constant regardless of the pulse width of the Z-phase signal. Furthermore, as... Figure 15B As shown, even when the measurement changes from forward to reverse midway, the initial zero-position detection timing for the rotation angle during forward rotation is set to zero, and the timing for the Z-phase up / down counter 112 to become 0 during reverse rotation is also set to zero. As a result, no zero-position error occurs during both forward and reverse rotation.

[0140] In the above example, the waveform measuring device 1 sets the rotation angle count to zero during the initial zero-position detection timing in forward rotation. During reverse rotation, it decrements the count of the Z-phase up / down counter 112 from N, setting the rotation angle count to M-1 when it reaches zero. The waveform measuring device 1 can set the rotation angle count to zero at any time during the period when the signal changes to HI. Specifically, the waveform measuring device 1 can set the rotation angle count to zero when P zero-position detection timings occur during forward rotation, and set the rotation angle count to the maximum value, M-1, when (N-P+1) zero-position detection timings occur during reverse rotation. That is, a predetermined number corresponding to forward and reverse rotation can be set, and the rotation angle count can be set to zero or the maximum value when a predetermined number of zero-position detection timings are generated. In this example, the condition for generating the zero-position detection timing is consistent with one of the four conditions for generating the counting signal. Therefore, the number of zero-position detection timings generated is 1 / 4 of the number of counting signals. The Z-phase up / down counter 112 and the inverting Z-phase up / down counter 115 are considered to count four times the number of zero-position detection timings generated. The Z-phase up / down counter 112 and the inverting Z-phase up / down counter 115 can count the number of zero-position detection timings generated. In the above example, P is the predetermined number corresponding to forward rotation. N-P+1 is the predetermined number corresponding to reverse rotation. Therefore, the sum of the predetermined number corresponding to forward rotation and the predetermined number corresponding to reverse rotation is the number obtained by adding 1 to the count signal during the HI period of the counting period signal, i.e., N+1. By setting the count value of the rotation angle to zero when a zero-position detection timing is generated with the predetermined number corresponding to forward rotation during forward rotation, and setting the count value of the rotation angle to the maximum value, i.e., M-1, when a zero-position detection timing is generated with the predetermined number corresponding to reverse rotation during reverse rotation, the rotation angle can be set to zero during forward rotation and M-1 during reverse rotation at any timing during the HI period of the counting period signal. As a result, the degree of freedom of movement is increased.

[0141] The above implementation corresponds to the predetermined number corresponding to forward rotation, i.e., P is 1. In this case, the predetermined number corresponding to reverse rotation is N. That is, the predetermined number corresponding to reverse rotation is equal to the number of count signals during the HI period of the counting period signal. Therefore, the determination circuit can be easily constructed.

[0142] In the above example, the Z-phase up / down counter 112 initially counts the number of count signals during the period when the counting period signal changes to HI (i.e., the HI period of the counting period signal) and stores the count in the first holding memory 113. However, it is also possible to store the count as a known value in the first holding memory 113 without using the waveform measuring device 1. When the waveform measuring device 1 has a second holding memory 116, the number of count signals during the HI period of the counting period signal can also be stored in the second holding memory 116. By pre-storing the number of count signals during the HI period of the counting period signal, the circuit structure of the waveform measuring device 1 can be simplified. By counting the count signals during the HI period of the counting period signal using the waveform measuring device 1, it is possible to handle situations where a Z-phase signal with an unknown pulse width is input.

[0143] <Example of the measurement method flow>

[0144] Each structural part of the waveform measuring device 1 can perform functions including... Figure 16 The measurement method is illustrated in the flowchart shown. The measurement method can be implemented as a measurement program executed by the processors of each structural unit of the waveform measuring device 1. The measurement program can be stored on a non-transitory, computer-readable medium.

[0145] Waveform measuring device 1 obtains a counting signal from encoder 10 (step S1). Waveform measuring device 1 determines whether the Z-phase signal changes to HI (step S2). If the Z-phase signal does not change to HI (step S2: NO), that is, if the Z-phase signal is LO, waveform measuring device 1 proceeds to step S8.

[0146] When the Z-phase signal changes to HI (step S2: YES), waveform measuring device 1 determines whether a zero-position signal was generated after the Z-phase signal changed to HI (step S3). If no zero-position signal was generated (step S3: NO), waveform measuring device 1 proceeds to step S7. If a zero-position signal was generated (step S3: YES), waveform measuring device 1 sets the counting period signal to HI, increments the count value of Z-phase up / down counter 112 when a rising signal is obtained, decrements the count value of Z-phase up / down counter 112 when a falling signal is obtained, and increments the count value of inverted Z-phase up / down counter 115 (step S4).

[0147] Waveform measuring device 1 determines whether the count value of Z-phase up / down counter 112 has changed to a predetermined value (step S5). The predetermined value is the value set for forward and reverse rotation respectively. If the count value of Z-phase up / down counter 112 has not changed to the predetermined value (step S5: NO), waveform measuring device 1 proceeds to step S7.

[0148] When the count value of the Z-phase up / down counter 112 reaches the specified number (step S5: YES), the waveform measuring device 1 sets the count value of the rotation angle to zero according to the forward zero-position signal, and sets the count value of the rotation angle to the maximum value, M-1, according to the reverse zero-position signal (step S6). The waveform measuring device 1 ends after executing the process in step S6. Figure 16 The flowchart is as follows. Waveform measuring device 1 can return to the flowchart of step S1 after the execution of step S6.

[0149] If no zero-position signal is generated even once (step S3: NO), or if the count value of the Z-phase up / down counter 112 does not reach the specified value (step S5: NO), the waveform measuring device 1 does not set the rotation angle count value to zero. Instead, it increases the rotation angle count value during forward rotation and decreases the rotation angle count value during reverse rotation (step S7). The waveform measuring device 1 terminates after executing the process in step S7. Figure 16 The flowchart is as follows. Waveform measuring device 1 can return to the flowchart of step S1 after the execution of step S6.

[0150] If the Z-phase signal does not change to HI (step S2: NO), the waveform measuring device 1 determines whether the Z-phase signal changes from HI to LO (step S8). If the Z-phase signal does not change from HI to LO (step S8: NO), the waveform measuring device 1 proceeds to step S7, increasing or decreasing the count value of the rotation angle.

[0151] When the Z-phase signal changes from HI to LO (step S8: YES), the waveform measuring device 1 determines whether the rotation direction detection circuit 117 is 0 (step S9). When the rotation direction detection circuit 117 is 0 (step S9: YES), the waveform measuring device 1 loads the value of the first holding memory 113 into the Z-phase up / down counter 112 (step S10), proceeds to step S7, and increases or decreases the count value of the rotation angle. When the rotation direction detection circuit 117 is not 0 (step S9: NO), that is, when the rotation direction detection circuit 117 is 1, the waveform measuring device 1 loads the value of the second holding memory 116 into the Z-phase up / down counter 112 (step S11), proceeds to step S7, and increases or decreases the count value of the rotation angle.

[0152] (Summarize)

[0153] As described above, regardless of the pulse width of the Z-phase signal, the waveform measuring device 1 of the present invention can ensure consistent timing in setting the rotation angle to zero during forward and reverse rotation. As a result, the zero position of the rotation angle can be determined with high precision regardless of the direction of rotation.

[0154] (Other implementation methods)

[0155] In the above embodiment, a rotary encoder is used as encoder 10. A linear encoder may also be used as encoder 10. In this case, a count value corresponding to the displacement along a straight line is measured instead of a count value corresponding to the rotation angle.

[0156] The conditions for outputting a rising or falling signal are not limited to those based on Tables 1 and 2. For example, the output of a rising or falling signal may be limited to the timing of the generation of either the H-edge or L-edge of the A-phase signal or the H-edge or L-edge of the B-phase signal. In this case, the resolution for measuring the rotation angle or displacement is 1 / 4. Alternatively, the output of a rising or falling signal may be limited to the timing of the generation of either the H-edge or L-edge of the A-phase signal or the H-edge or L-edge of the B-phase signal. In this case, the resolution for measuring the rotation angle or displacement is 1 / 2.

[0157] The embodiments of the present invention have been described above with reference to the accompanying drawings, but the specific structure is not limited to these embodiments and includes various modifications that do not depart from the spirit of the present invention.

[0158] Explanation of the label

[0159] 1. Waveform measuring device (101: Sampling timing generation circuit, 102: Memory controller, 103: Waveform memory, 104: Display waveform creation circuit, 105: Display, 106: Counting condition judgment circuit, 107: Up / down counter, 108: Angle transformation circuit, 109: Counting period creation circuit, 112: Z-phase up / down counter, 113: First holding memory, 114: Zero position judgment circuit, 115: Reverse Z-phase increment counter, 116: Second holding memory) 117: Rotation direction detection circuit; 121: Input amplifier; 122: A / D converter; 123: Interface circuit; 124: Edge detection circuit; 125: Level judgment circuit; 131: Input amplifier; 132: A / D converter; 133: Interface circuit; 134: Edge detection circuit; 135: Level judgment circuit; 141: Input amplifier; 142: A / D converter; 143: Interface circuit; 145: Level judgment circuit)

[0160] 10 Encoders

[0161] 20 Electric motor (21: Excitation position sensor)

Claims

1. A waveform measuring device that converts a counting signal output by an encoder into a rotation angle, wherein, The waveform measuring device has: A zero-position determination circuit generates a set signal based on a Z-phase signal having a pulse width spanning a period including multiple zero-position detection timings based on the count signal. as well as A counter that increases or decreases the rotation angle based on the counting signal, and sets the count value to zero when the rotation angle increases and to the maximum value when the rotation angle decreases, based on the setting signal. When the zero-position detection timing is generated in a predetermined number corresponding to forward or reverse rotation respectively during the HI period of the Z-phase signal, the zero-position determination circuit outputs the set signal.

2. The waveform measuring device according to claim 1, wherein, The sum of the predetermined number corresponding to the forward rotation and the predetermined number corresponding to the reverse rotation is the number of zero-position detection timings during the HI period of the Z-phase signal plus 1.

3. The waveform measuring device according to claim 2, wherein, The specified number corresponding to the reversal is equal to the number of zero-position detection timings during the HI period of the Z-phase signal.

4. The waveform measuring device according to any one of claims 1 to 3, wherein, The waveform measuring device also has a Z-phase counter that counts the zero-position detection timing during the HI period of the Z-phase signal.

5. A measurement method that converts a counting signal output by an encoder into a rotation angle. The determination method includes the following steps: The Z-phase signal has a pulse width spanning a period including multiple zero-position detection timings based on the count signal. Based on the Z-phase signal, a setting signal is generated when the zero-position detection timings are generated in a predetermined number corresponding to forward or reverse rotation during the HI period of the Z-phase signal. The rotation angle is increased or decreased based on the counting signal; and Based on the set signal, the count value is set to zero when the rotation angle is increased, and the count value is set to the maximum value when the rotation angle is decreased.

6. The determination method according to claim 5, wherein, The sum of the predetermined number corresponding to the forward rotation and the predetermined number corresponding to the reverse rotation is the number of zero-position detection timings during the HI period of the Z-phase signal plus 1.

7. The determination method according to claim 6, wherein, The specified number corresponding to the reversal is equal to the number of zero-position detection timings during the HI period of the Z-phase signal.

8. The determination method according to any one of claims 5 to 7, wherein, The measurement method further includes the following step: counting the zero-position detection timing during the HI period of the Z-phase signal.

9. A measurement procedure that converts a counting signal output by an encoder into a rotation angle. The measurement program causes the processor to perform the following steps: The Z-phase signal has a pulse width spanning a period including multiple zero-position detection timings based on the count signal. Based on the Z-phase signal, a setting signal is generated when the zero-position detection timings are generated in a predetermined number corresponding to forward or reverse rotation during the HI period of the Z-phase signal. The rotation angle is increased or decreased based on the counting signal; and Based on the set signal, the count value is set to zero when the rotation angle is increased, and the count value is set to the maximum value when the rotation angle is decreased.

10. The measurement procedure according to claim 9, wherein, The sum of the predetermined number corresponding to the forward rotation and the predetermined number corresponding to the reverse rotation is the number of zero-position detection timings during the HI period of the Z-phase signal plus 1.

11. The measurement procedure according to claim 10, wherein, The specified number corresponding to the reversal is equal to the number of zero-position detection timings during the HI period of the Z-phase signal.

12. The measurement procedure according to any one of claims 9 to 11, wherein, The measurement procedure also includes the following step: counting the zero-position detection timing during the HI period of the Z-phase signal.