Program works great, motor works as predicted, then suddenly it deviates ???

I attached a link to a video of what i am seeing it doing, and what i had done so far to get here. You can see it running normally for a while then it stops moving the motor smoothly: