Dear Sir,
I added c program for initiating the Gcode and External Emergency Stop button. when i am executing the C program for homing and Pressed the Emergency stop.it doesnot respond and continuing the execution of the C program.
Is there a way to stop the execution of any C program when the Emergency Stop button is pressed.
note: The Emergency stop button works fine when executing the G code.
Regards,
Ajith Arawinth
exit the executing c program for homing when Estop is pressed
Moderators: TomKerekes, dynomotion
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: exit the executing c program for homing when Estop is pressed
Hi Ajith ,
An ESTOP command should kill all Threads except Thread #1.
However once a Thread commands a Move the Move will complete regardless of whether the Thread is still running or not.
But then the ESTOP should disable all Axes so that should stop all Axes.
When the ESTOP_BIT is active the C Program will send continuous ESTOPS to KMotionCNC. Instead of sending infinite commands to KMotionCNC you might change your code to send only one. Or only send the command if the Axes are enabled.
So it isn't clear what is happening. Does the C Program stop? You can check which Threads are running on the KMotion C Program Screen. Running Threads have a green band.
Do the axes disable? You can see which Threads are running on the KMotion Axis Screen.
An ESTOP command should kill all Threads except Thread #1.
However once a Thread commands a Move the Move will complete regardless of whether the Thread is still running or not.
But then the ESTOP should disable all Axes so that should stop all Axes.
When the ESTOP_BIT is active the C Program will send continuous ESTOPS to KMotionCNC. Instead of sending infinite commands to KMotionCNC you might change your code to send only one. Or only send the command if the Axes are enabled.
So it isn't clear what is happening. Does the C Program stop? You can check which Threads are running on the KMotion C Program Screen. Running Threads have a green band.
Do the axes disable? You can see which Threads are running on the KMotion Axis Screen.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.