Problem - Read from Closed Loop Stepper Motor while Rotating

Thanks for your reply johnwasser!

Yes, by commenting out the attachInterrupt, the stepper still lags. Also, by commenting out all the Serial.print in the for-loop, it does not lag.

However, by rotating without any Serial-print except at start, midway(rotated 360 one way), and at the end, the pos-variable is printed differently everytime, but for instance now [0,549,-844]. It is supposed to be [0,1000,0], (start,360,back), of which our result makes no sense.

A remarkable problem is also that it heats up, after a couple of go's it is really hot.

Any idea how to measure real position, working around this problem?