A method for operating an encoder system comprising the steps of: determining a value of a first encoder operational variable; weighting said value in dependence of at least one other operational variable of the encoder, influencing the lifetime of the encoder; providing a reference value of total encoder lifetime in respect of said first encoder operational variable; calculating the remaining lifetime of the encoder in respect of the first operational variable based on the weighted value and the reference value of total encoder lifetime wherein; weighting values are predetermined for intervals of the operational variable influencing the lifetime of the encoder whereby, the weighting value for the operational variable in question corresponds to the interval in which a sampled value of the operational variable falls within; whereby the remaining lifetime of several specific parts of the encoder system are calculated and the remaining lifetime of the encoder system is set to the remaining lifetime of the specific part which has the shortest remaining lifetime, characterized in that operational variables influencing the lifetime of the encoder are sampled during measurement cycles that are continuously repeated, the calculation of remaining lifetime of an electronic part of the encoder comprises the steps of: sampling a value of encoder temperature and a time period (Δt); associating the time period (Δt) with a predetermined temperature interval (ΔT); corresponding to the sampled temperature value; providing, based the predetermined temperature interval (ΔT), a temperature dependent weighting value (λ); multiplying the time period (Δt) with the temperature dependent weighting value (λ), thereby achieving the effective running time (N eff) of the encoder; providing a reference value (N ref) of total lifetime of the encoder corresponding to maximum running time at nominal conditions; calculating the remaining lifetime (N rem) of the encoder by subtracting the effective running time (N eff) from the lifetime reference value (N ref). determining a value of a first encoder operational variable; weighting said value in dependence of at least one other operational variable of the encoder, influencing the lifetime of the encoder; providing a reference value of total encoder lifetime in respect of said first encoder operational variable; calculating the remaining lifetime of the encoder in respect of the first operational variable based on the weighted value and the reference value of total encoder lifetime wherein; weighting values are predetermined for intervals of the operational variable influencing the lifetime of the encoder whereby, the weighting value for the operational variable in question corresponds to the interval in which a sampled value of the operational variable falls within; whereby the remaining lifetime of several specific parts of the encoder system are calculated and the remaining lifetime of the encoder system is set to the remaining lifetime of the specific part which has the shortest remaining lifetime, characterized in that operational variables influencing the lifetime of the encoder are sampled during measurement cycles that are continuously repeated, the calculation of remaining lifetime of an electronic part of the encoder comprises the steps of: sampling a value of encoder temperature and a time period (Δt); associating the time period (Δt) with a predetermined temperature interval (ΔT); corresponding to the sampled temperature value; providing, based the predetermined temperature interval (ΔT), a temperature dependent weighting value (λ); multiplying the time period (Δt) with the temperature dependent weighting value (λ), thereby achieving the effective running time (N eff) of the encoder; providing a reference value (N ref) of total lifetime of the encoder corresponding to maximum running time at nominal conditions; calculating the remaining lifetime (N rem) of the encoder by subtracting the effective running time (N eff) from the lifetime reference value (N ref). sampling a value of encoder temperature and a time period (Δt); associating the time period (Δt) with a predetermined temperature interval (ΔT); corresponding to the sampled temperature value; providing, based the predetermined temperature interval (ΔT), a temperature dependent weighting value (λ); multiplying the time period (Δt) with the temperature dependent weighting value (λ), thereby achieving the effective running time (N eff) of the encoder; providing a reference value (N ref) of total lifetime of the encoder corresponding to maximum running time at nominal conditions; calculating the remaining lifetime (N rem) of the encoder by subtracting the effective running time (N eff) from the lifetime reference value (N ref).