A disclosed device eliminates an error in a displacement amount measured
value caused by changes over time in a characteristic of a displacement
sensor, and can always maintain high accuracy of measurement. When a
hydraulic valve, to which the displacement sensor is mounted, is
positioned at predetermined positions, output signals from the
displacement sensor are acquired as sample values. On the basis of the
acquired sample values, a trend of changes over time in the
characteristic of the displacement sensor is computed. Settings of a
conversion table, which is used for displacement amount computation, are
corrected in a direction along the computed trend of changes.