Hello Spadan,
I haven't been on the forum much lately and sorry for now getting back to you earlier.
When I reviewed your alarms, I think you should go to the service displays on the 840D. There you'll find that you can monitor both the velocity and the position feedback for the axis you're having problems with. You should attempt to rotate the motor shaft by hand when the drive is not enabled. If you turn the motor shaft clockwise, you should know what direction to actual counts on the CNC should be (i.e., + or -). Check to see that both are working correctly. If not, you may have a polarity difference or a bad encoder cable connection.
It sounds like the feedback of the encoder is not in phase correctly.
Hope this helps...