You could connect the encoder input in parallel to a regular input. The NO contact of this regular input drives one timer and the NC contact of this regular input drives another timer. Set both timers to time out after 1 seconds. As long as the encoder is rotating both timer will be reset and neither will time out. But when the encoder stop rotating, one of the timers will time out within 1 second since the encoder stop and this could be used by your program to determine that the encoder has stopped.