A motor for a tree processing machine is provided. The motor includes a mechanism configured to drive a wheel. The wheel is configured to engage a portion of a tree. The motor also includes a housing containing the mechanism. The motor further includes an encoder. The encoder is configured to be operably coupled to the mechanism. The encoder is also configured to generate a signal indicative of a length of a portion of a tree engaged by the wheel. The encoder is contained in the housing.