AGFA does not support Avantras anymore.
To avoid error 13 - remove and inspect safety switch installed on the Avantra's frame. It it damaged - make a short cut between two wires to put 24V DC via safety line.
Error 165 -Inspect Digital Encoder small wheel touches the rail properly. Just look...