Timeout error
Posted: Sat Aug 27, 2022 2:59 pm
Hello Tom,
On the lathe I use a ToolEye to measure the tools, C programs handle that, but in case the operator would like to stop the measurement before it is finished I implemented a button on the screen which set high the bit 1184 (not used) which is supposed to stop the axis and pause the thread, but it does not work properly, first KMotionCNC stops updating the position (but machine still moving), then it gives a timeout error and continues moving, if I press a second time on the button it finally works :
ClearBit(1184);
WaitNextTimeSlice();
Jog(0,1000);
while(ReadBit(Sensor))
{
if (ReadBit(1184))
{
Jog(0,0);
PauseThread(2);
}
}
Jog(0,0);
while(!CheckDone(0));
Is there someting I did wrong?
Cordially,
Francois
On the lathe I use a ToolEye to measure the tools, C programs handle that, but in case the operator would like to stop the measurement before it is finished I implemented a button on the screen which set high the bit 1184 (not used) which is supposed to stop the axis and pause the thread, but it does not work properly, first KMotionCNC stops updating the position (but machine still moving), then it gives a timeout error and continues moving, if I press a second time on the button it finally works :
ClearBit(1184);
WaitNextTimeSlice();
Jog(0,1000);
while(ReadBit(Sensor))
{
if (ReadBit(1184))
{
Jog(0,0);
PauseThread(2);
}
}
Jog(0,0);
while(!CheckDone(0));
Is there someting I did wrong?
Cordially,
Francois