Hi, I'm making a robot arm using linuxcnc.
I have a python interface that i'm playing with. I send the robot commands by setting the axis.L.eoffset-counts pins and the robot moves as expected.
I have a function that polls the robot for its position and waits until it reaches the desired position before sending the next point.
The position is read using the python interface
Code:
s = linuxcnc.stat()
s.poll()
print(s.actual_position)
but every now and then, the robot reaches its position and waits there for another few seconds before the function exits. I realized that the position feedback gets stuck at some value, and my console prints
Code:
task: main loop took 5.019013 seconds
I also tried reading the position through the halui.axis.L.pos-relative but the same issue happens.
I assume this is because the internal emcStatus buffer doesn't get updated for those 5 seconds of the main loop.
Why does the loop take so long? How can I debug that?