Cannot read orientation sensor during the while do loop

Hello,
I can't read any data from the orientation sensor within the Do loop (rolling inclination).
Is there a known problem and if so is there a workaround?

greeting