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
Timeout error
Moderators: TomKerekes, dynomotion
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Timeout error
Hi Francois,
I think the issue is that only 1 Action at a time can be in progress. If one button is configured to do the Measure and the action is configured to wait. And the other Abort Button is configured to do an Action to set the Abort Bit. Then the Abort will need to wait until the Measurement is complete. If it has to wait too long it will timeout.
Try configuring the Measure Action without the wait.
Alternately you might perform the Abort with a Momentary Button to set the Abort bit without performing an Action.
Please post program code with the code tags to be readable.
HTH
I think the issue is that only 1 Action at a time can be in progress. If one button is configured to do the Measure and the action is configured to wait. And the other Abort Button is configured to do an Action to set the Abort Bit. Then the Abort will need to wait until the Measurement is complete. If it has to wait too long it will timeout.
Try configuring the Measure Action without the wait.
Alternately you might perform the Abort with a Momentary Button to set the Abort bit without performing an Action.
Please post program code with the code tags to be readable.
HTH
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Timeout error
Hello Tom,
Surely works without the wait. (took some minutes to understand which wait you were talking about)
Thanks for your help, with that I just finished the work on it and will try to sell it, as promised I will share all the programs.
Cordially,
Francois
Surely works without the wait. (took some minutes to understand which wait you were talking about)
Thanks for your help, with that I just finished the work on it and will try to sell it, as promised I will share all the programs.
Cordially,
Francois
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Timeout error
Hi Francois,
Thanks for sharing and good luck!
Thanks for sharing and good luck!
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.