摘要 |
An encoder of the present invention is provided with a position information generation unit that generates first position information on the basis of a detection signal output by a sensor unit and an IIR filter unit that outputs second position information produced by subjecting the first position information to filtering processing. In the IIR filter unit, a counter unit stores prescribed significant digits of the first position information as a count value and an input unit generates input information by subtracting the count value from the first position information. A computation unit generates internal computation results on the basis of delay information, which is the result of internal computation results stored by a delay information storage unit, the input information, and a prescribed filter coefficient, and the computation generates filtering-processed output information. An output unit generates the second position information by adding the count value to the output information. If the value of the delay information is outside a prescribed range, a change unit changes the value of the delay information as well as the count value on the basis of the change unit of the input information. |