What is the encoder connected to? Many devices that use encoder feedback will have a serial communications option and Modbus RTU is probably the most common protocol. Even devices that normally use their own proprietary serial protocol may offer Modbus RTU as an option. It's almost everyone's "second language".