processing prg for absolute encoder, v0.0